]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.7 - patch 20100605
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.495 .
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/lib/ada/adainclude)
811   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
812
813 Some influential environment variables:
814   CC          C compiler command
815   CFLAGS      C compiler flags
816   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
817               nonstandard directory <lib dir>
818   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
819               headers in a nonstandard directory <include dir>
820   CPP         C preprocessor
821   CXX         C++ compiler command
822   CXXFLAGS    C++ compiler flags
823   CXXCPP      C++ preprocessor
824
825 Use these variables to override the choices made by `configure' or to help
826 it to find libraries and programs with nonstandard names/locations.
827
828 EOF
829 fi
830
831 if test "$ac_init_help" = "recursive"; then
832   # If there are subdirs, report their specific --help.
833   ac_popdir=`pwd`
834   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
835     cd $ac_subdir
836     # A "../" for each directory in /$ac_subdir.
837     ac_dots=`echo $ac_subdir |
838              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
839
840     case $srcdir in
841     .) # No --srcdir option.  We are building in place.
842       ac_sub_srcdir=$srcdir ;;
843     [\\/]* | ?:[\\/]* ) # Absolute path.
844       ac_sub_srcdir=$srcdir/$ac_subdir ;;
845     *) # Relative path.
846       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
847     esac
848
849     # Check for guested configure; otherwise get Cygnus style configure.
850     if test -f $ac_sub_srcdir/configure.gnu; then
851       echo
852       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
853     elif test -f $ac_sub_srcdir/configure; then
854       echo
855       $SHELL $ac_sub_srcdir/configure  --help=recursive
856     elif test -f $ac_sub_srcdir/configure.ac ||
857            test -f $ac_sub_srcdir/configure.in; then
858       echo
859       $ac_configure --help
860     else
861       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
862     fi
863     cd $ac_popdir
864   done
865 fi
866
867 test -n "$ac_init_help" && exit 0
868 if $ac_init_version; then
869   cat <<\EOF
870
871 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
872 Free Software Foundation, Inc.
873 This configure script is free software; the Free Software Foundation
874 gives unlimited permission to copy, distribute and modify it.
875 EOF
876   exit 0
877 fi
878 exec 5>config.log
879 cat >&5 <<EOF
880 This file contains any messages produced by compilers while
881 running configure, to aid debugging if configure makes a mistake.
882
883 It was created by $as_me, which was
884 generated by GNU Autoconf 2.52.20100530.  Invocation command line was
885
886   $ $0 $@
887
888 EOF
889 {
890 cat <<_ASUNAME
891 ## ---------- ##
892 ## Platform.  ##
893 ## ---------- ##
894
895 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
896 uname -m = `(uname -m) 2>/dev/null || echo unknown`
897 uname -r = `(uname -r) 2>/dev/null || echo unknown`
898 uname -s = `(uname -s) 2>/dev/null || echo unknown`
899 uname -v = `(uname -v) 2>/dev/null || echo unknown`
900
901 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
902 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
903
904 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
905 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
906 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
907 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
908 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
909 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
910 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
911
912 PATH = $PATH
913
914 _ASUNAME
915 } >&5
916
917 cat >&5 <<EOF
918 ## ------------ ##
919 ## Core tests.  ##
920 ## ------------ ##
921
922 EOF
923
924 # Keep a trace of the command line.
925 # Strip out --no-create and --no-recursion so they do not pile up.
926 # Also quote any args containing shell meta-characters.
927 ac_configure_args=
928 ac_sep=
929 for ac_arg
930 do
931   case $ac_arg in
932   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
933   | --no-cr | --no-c) ;;
934   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
935   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
936   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
937     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
938     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
939     ac_sep=" " ;;
940   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
941      ac_sep=" " ;;
942   esac
943   # Get rid of the leading space.
944 done
945
946 # When interrupted or exit'd, cleanup temporary files, and complete
947 # config.log.  We remove comments because anyway the quotes in there
948 # would cause problems or look ugly.
949 trap 'exit_status=$?
950   # Save into config.log some information that might help in debugging.
951   echo >&5
952   echo "## ----------------- ##" >&5
953   echo "## Cache variables.  ##" >&5
954   echo "## ----------------- ##" >&5
955   echo >&5
956   # The following way of writing the cache mishandles newlines in values,
957 {
958   (set) 2>&1 |
959     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
960     *ac_space=\ *)
961       sed -n \
962         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
963           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
964       ;;
965     *)
966       sed -n \
967         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
968       ;;
969     esac;
970 } >&5
971   sed "/^$/d" confdefs.h >conftest.log
972   if test -s conftest.log; then
973     echo >&5
974     echo "## ------------ ##" >&5
975     echo "## confdefs.h.  ##" >&5
976     echo "## ------------ ##" >&5
977     echo >&5
978     cat conftest.log >&5
979   fi
980   (echo; echo) >&5
981   test "$ac_signal" != 0 &&
982     echo "$as_me: caught signal $ac_signal" >&5
983   echo "$as_me: exit $exit_status" >&5
984   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
985     exit $exit_status
986      ' 0
987 for ac_signal in 1 2 13 15; do
988   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
989 done
990 ac_signal=0
991
992 # confdefs.h avoids OS command line length limits that DEFS can exceed.
993 rm -rf conftest* confdefs.h
994 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
995 echo >confdefs.h
996
997 # Let the site file select an alternate cache file if it wants to.
998 # Prefer explicitly selected file to automatically selected ones.
999 if test -z "$CONFIG_SITE"; then
1000   if test "x$prefix" != xNONE; then
1001     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1002   else
1003     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1004   fi
1005 fi
1006 for ac_site_file in $CONFIG_SITE; do
1007   if test -r "$ac_site_file"; then
1008     { echo "$as_me:1008: loading site script $ac_site_file" >&5
1009 echo "$as_me: loading site script $ac_site_file" >&6;}
1010     cat "$ac_site_file" >&5
1011     . "$ac_site_file"
1012   fi
1013 done
1014
1015 if test -r "$cache_file"; then
1016   # Some versions of bash will fail to source /dev/null (special
1017   # files actually), so we avoid doing that.
1018   if test -f "$cache_file"; then
1019     { echo "$as_me:1019: loading cache $cache_file" >&5
1020 echo "$as_me: loading cache $cache_file" >&6;}
1021     case $cache_file in
1022       [\\/]* | ?:[\\/]* ) . $cache_file;;
1023       *)                      . ./$cache_file;;
1024     esac
1025   fi
1026 else
1027   { echo "$as_me:1027: creating cache $cache_file" >&5
1028 echo "$as_me: creating cache $cache_file" >&6;}
1029   >$cache_file
1030 fi
1031
1032 # Check that the precious variables saved in the cache have kept the same
1033 # value.
1034 ac_cache_corrupted=false
1035 for ac_var in `(set) 2>&1 |
1036                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1037   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1038   eval ac_new_set=\$ac_env_${ac_var}_set
1039   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1040   eval ac_new_val="\$ac_env_${ac_var}_value"
1041   case $ac_old_set,$ac_new_set in
1042     set,)
1043       { echo "$as_me:1043: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1044 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1045       ac_cache_corrupted=: ;;
1046     ,set)
1047       { echo "$as_me:1047: error: \`$ac_var' was not set in the previous run" >&5
1048 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1049       ac_cache_corrupted=: ;;
1050     ,);;
1051     *)
1052       if test "x$ac_old_val" != "x$ac_new_val"; then
1053         { echo "$as_me:1053: error: \`$ac_var' has changed since the previous run:" >&5
1054 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1055         { echo "$as_me:1055:   former value:  $ac_old_val" >&5
1056 echo "$as_me:   former value:  $ac_old_val" >&2;}
1057         { echo "$as_me:1057:   current value: $ac_new_val" >&5
1058 echo "$as_me:   current value: $ac_new_val" >&2;}
1059         ac_cache_corrupted=:
1060       fi;;
1061   esac
1062   # Pass precious variables to config.status.  It doesn't matter if
1063   # we pass some twice (in addition to the command line arguments).
1064   if test "$ac_new_set" = set; then
1065     case $ac_new_val in
1066     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1067       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1068       ac_configure_args="$ac_configure_args '$ac_arg'"
1069       ;;
1070     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1071        ;;
1072     esac
1073   fi
1074 done
1075 if $ac_cache_corrupted; then
1076   { echo "$as_me:1076: error: changes in the environment can compromise the build" >&5
1077 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1078   { { echo "$as_me:1078: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1079 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1080    { (exit 1); exit 1; }; }
1081 fi
1082
1083 ac_ext=c
1084 ac_cpp='$CPP $CPPFLAGS'
1085 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1086 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1087 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1088 ac_main_return=return
1089
1090 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1091   *c*,-n*) ECHO_N= ECHO_C='
1092 ' ECHO_T='      ' ;;
1093   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1094   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1095 esac
1096 echo "#! $SHELL" >conftest.sh
1097 echo  "exit 0"   >>conftest.sh
1098 chmod +x conftest.sh
1099 if { (echo "$as_me:1099: PATH=\".;.\"; conftest.sh") >&5
1100   (PATH=".;."; conftest.sh) 2>&5
1101   ac_status=$?
1102   echo "$as_me:1102: \$? = $ac_status" >&5
1103   (exit $ac_status); }; then
1104   ac_path_separator=';'
1105 else
1106   ac_path_separator=:
1107 fi
1108 PATH_SEPARATOR="$ac_path_separator"
1109 rm -f conftest.sh
1110
1111 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1112
1113 top_builddir=`pwd`
1114
1115 echo "$as_me:1115: checking for egrep" >&5
1116 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1117 if test "${ac_cv_prog_egrep+set}" = set; then
1118   echo $ECHO_N "(cached) $ECHO_C" >&6
1119 else
1120   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1121     then ac_cv_prog_egrep='grep -E'
1122     else ac_cv_prog_egrep='egrep'
1123     fi
1124 fi
1125 echo "$as_me:1125: result: $ac_cv_prog_egrep" >&5
1126 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1127  EGREP=$ac_cv_prog_egrep
1128
1129 test -z "$EGREP" && { { echo "$as_me:1129: error: No egrep program found" >&5
1130 echo "$as_me: error: No egrep program found" >&2;}
1131    { (exit 1); exit 1; }; }
1132
1133 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1134 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1135 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1136 cf_cv_abi_version=${NCURSES_MAJOR}
1137 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1138 cf_cv_timestamp=`date`
1139 echo "$as_me:1139: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1140 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1141
1142 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1143
1144 # Check whether --with-rel-version or --without-rel-version was given.
1145 if test "${with_rel_version+set}" = set; then
1146   withval="$with_rel_version"
1147   { echo "$as_me:1147: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1148 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1149  cf_cv_rel_version=$withval
1150 fi;
1151
1152  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1153  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1154
1155 if test -n "$NCURSES_MAJOR" ; then
1156   case $NCURSES_MAJOR in #(vi
1157   [0-9]*) #(vi
1158         ;;
1159   *)
1160         { { echo "$as_me:1160: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1161 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1162    { (exit 1); exit 1; }; }
1163         ;;
1164   esac
1165 else
1166   { { echo "$as_me:1166: error: Release major-version value is empty" >&5
1167 echo "$as_me: error: Release major-version value is empty" >&2;}
1168    { (exit 1); exit 1; }; }
1169 fi
1170
1171 if test -n "$NCURSES_MINOR" ; then
1172   case $NCURSES_MINOR in #(vi
1173   [0-9]*) #(vi
1174         ;;
1175   *)
1176         { { echo "$as_me:1176: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1177 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1178    { (exit 1); exit 1; }; }
1179         ;;
1180   esac
1181 else
1182   { { echo "$as_me:1182: error: Release minor-version value is empty" >&5
1183 echo "$as_me: error: Release minor-version value is empty" >&2;}
1184    { (exit 1); exit 1; }; }
1185 fi
1186
1187 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1188
1189 # Check whether --with-abi-version or --without-abi-version was given.
1190 if test "${with_abi_version+set}" = set; then
1191   withval="$with_abi_version"
1192   { echo "$as_me:1192: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1193 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1194  cf_cv_abi_version=$withval
1195 fi;
1196
1197 if test -n "$cf_cv_abi_version" ; then
1198   case $cf_cv_abi_version in #(vi
1199   [0-9]*) #(vi
1200         ;;
1201   *)
1202         { { echo "$as_me:1202: error: ABI version is not a number: $cf_cv_abi_version" >&5
1203 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1204    { (exit 1); exit 1; }; }
1205         ;;
1206   esac
1207 else
1208   { { echo "$as_me:1208: error: ABI version value is empty" >&5
1209 echo "$as_me: error: ABI version value is empty" >&2;}
1210    { (exit 1); exit 1; }; }
1211 fi
1212
1213 ac_aux_dir=
1214 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1215   if test -f $ac_dir/install-sh; then
1216     ac_aux_dir=$ac_dir
1217     ac_install_sh="$ac_aux_dir/install-sh -c"
1218     break
1219   elif test -f $ac_dir/install.sh; then
1220     ac_aux_dir=$ac_dir
1221     ac_install_sh="$ac_aux_dir/install.sh -c"
1222     break
1223   elif test -f $ac_dir/shtool; then
1224     ac_aux_dir=$ac_dir
1225     ac_install_sh="$ac_aux_dir/shtool install -c"
1226     break
1227   fi
1228 done
1229 if test -z "$ac_aux_dir"; then
1230   { { echo "$as_me:1230: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1231 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1232    { (exit 1); exit 1; }; }
1233 fi
1234 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1235 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1236 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1237
1238 # Make sure we can run config.sub.
1239 $ac_config_sub sun4 >/dev/null 2>&1 ||
1240   { { echo "$as_me:1240: error: cannot run $ac_config_sub" >&5
1241 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1242    { (exit 1); exit 1; }; }
1243
1244 echo "$as_me:1244: checking build system type" >&5
1245 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1246 if test "${ac_cv_build+set}" = set; then
1247   echo $ECHO_N "(cached) $ECHO_C" >&6
1248 else
1249   ac_cv_build_alias=$build_alias
1250 test -z "$ac_cv_build_alias" &&
1251   ac_cv_build_alias=`$ac_config_guess`
1252 test -z "$ac_cv_build_alias" &&
1253   { { echo "$as_me:1253: error: cannot guess build type; you must specify one" >&5
1254 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1255    { (exit 1); exit 1; }; }
1256 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1257   { { echo "$as_me:1257: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1258 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1259    { (exit 1); exit 1; }; }
1260
1261 fi
1262 echo "$as_me:1262: result: $ac_cv_build" >&5
1263 echo "${ECHO_T}$ac_cv_build" >&6
1264 build=$ac_cv_build
1265 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1266 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1267 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1268
1269 echo "$as_me:1269: checking host system type" >&5
1270 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1271 if test "${ac_cv_host+set}" = set; then
1272   echo $ECHO_N "(cached) $ECHO_C" >&6
1273 else
1274   ac_cv_host_alias=$host_alias
1275 test -z "$ac_cv_host_alias" &&
1276   ac_cv_host_alias=$ac_cv_build_alias
1277 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1278   { { echo "$as_me:1278: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1279 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1280    { (exit 1); exit 1; }; }
1281
1282 fi
1283 echo "$as_me:1283: result: $ac_cv_host" >&5
1284 echo "${ECHO_T}$ac_cv_host" >&6
1285 host=$ac_cv_host
1286 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1287 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1288 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1289
1290 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1291         echo "$as_me:1291: checking target system type" >&5
1292 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1293 if test "${ac_cv_target+set}" = set; then
1294   echo $ECHO_N "(cached) $ECHO_C" >&6
1295 else
1296   ac_cv_target_alias=$target_alias
1297 test "x$ac_cv_target_alias" = "x" &&
1298   ac_cv_target_alias=$ac_cv_host_alias
1299 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1300   { { echo "$as_me:1300: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1301 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1302    { (exit 1); exit 1; }; }
1303
1304 fi
1305 echo "$as_me:1305: result: $ac_cv_target" >&5
1306 echo "${ECHO_T}$ac_cv_target" >&6
1307 target=$ac_cv_target
1308 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1309 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1310 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1311
1312 # The aliases save the names the user supplied, while $host etc.
1313 # will get canonicalized.
1314 test -n "$target_alias" &&
1315   test "$program_prefix$program_suffix$program_transform_name" = \
1316     NONENONEs,x,x, &&
1317   program_prefix=${target_alias}-
1318         system_name="$host_os"
1319 else
1320         system_name="`(uname -s -r) 2>/dev/null`"
1321         if test -z "$system_name" ; then
1322                 system_name="`(hostname) 2>/dev/null`"
1323         fi
1324 fi
1325 test -n "$system_name" && cat >>confdefs.h <<EOF
1326 #define SYSTEM_NAME "$system_name"
1327 EOF
1328
1329 if test "${cf_cv_system_name+set}" = set; then
1330   echo $ECHO_N "(cached) $ECHO_C" >&6
1331 else
1332   cf_cv_system_name="$system_name"
1333 fi
1334
1335 test -z "$system_name" && system_name="$cf_cv_system_name"
1336 test -n "$cf_cv_system_name" && echo "$as_me:1336: result: Configuring for $cf_cv_system_name" >&5
1337 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1338
1339 if test ".$system_name" != ".$cf_cv_system_name" ; then
1340         echo "$as_me:1340: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1341 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1342         { { echo "$as_me:1342: error: \"Please remove config.cache and try again.\"" >&5
1343 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1344    { (exit 1); exit 1; }; }
1345 fi
1346
1347 # Check whether --with-system-type or --without-system-type was given.
1348 if test "${with_system_type+set}" = set; then
1349   withval="$with_system_type"
1350   { echo "$as_me:1350: WARNING: overriding system type to $withval" >&5
1351 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1352  cf_cv_system_name=$withval
1353 fi;
1354
1355 ###     Save the given $CFLAGS to allow user-override.
1356 cf_user_CFLAGS="$CFLAGS"
1357
1358 ###     Default install-location
1359
1360 echo "$as_me:1360: checking for prefix" >&5
1361 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1362 if test "x$prefix" = "xNONE" ; then
1363         case "$cf_cv_system_name" in
1364                 # non-vendor systems don't have a conflict
1365         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1366                 prefix=/usr
1367                 ;;
1368         *)      prefix=$ac_default_prefix
1369                 ;;
1370         esac
1371 fi
1372 echo "$as_me:1372: result: $prefix" >&5
1373 echo "${ECHO_T}$prefix" >&6
1374
1375 if test "x$prefix" = "xNONE" ; then
1376 echo "$as_me:1376: checking for default include-directory" >&5
1377 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1378 test -n "$verbose" && echo 1>&6
1379 for cf_symbol in \
1380         $includedir \
1381         $includedir/ncurses \
1382         $prefix/include \
1383         $prefix/include/ncurses \
1384         /usr/local/include \
1385         /usr/local/include/ncurses \
1386         /usr/include \
1387         /usr/include/ncurses
1388 do
1389         cf_dir=`eval echo $cf_symbol`
1390         if test -f $cf_dir/curses.h ; then
1391         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1392                 includedir="$cf_symbol"
1393                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1394                 break
1395         fi
1396         fi
1397         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1398 done
1399 echo "$as_me:1399: result: $includedir" >&5
1400 echo "${ECHO_T}$includedir" >&6
1401 fi
1402
1403 ###     Checks for programs.
1404 ac_ext=c
1405 ac_cpp='$CPP $CPPFLAGS'
1406 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1407 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1408 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1409 ac_main_return=return
1410 if test -n "$ac_tool_prefix"; then
1411   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1412 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1413 echo "$as_me:1413: checking for $ac_word" >&5
1414 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1415 if test "${ac_cv_prog_CC+set}" = set; then
1416   echo $ECHO_N "(cached) $ECHO_C" >&6
1417 else
1418   if test -n "$CC"; then
1419   ac_cv_prog_CC="$CC" # Let the user override the test.
1420 else
1421   ac_save_IFS=$IFS; IFS=$ac_path_separator
1422 ac_dummy="$PATH"
1423 for ac_dir in $ac_dummy; do
1424   IFS=$ac_save_IFS
1425   test -z "$ac_dir" && ac_dir=.
1426   $as_executable_p "$ac_dir/$ac_word" || continue
1427 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1428 echo "$as_me:1428: found $ac_dir/$ac_word" >&5
1429 break
1430 done
1431
1432 fi
1433 fi
1434 CC=$ac_cv_prog_CC
1435 if test -n "$CC"; then
1436   echo "$as_me:1436: result: $CC" >&5
1437 echo "${ECHO_T}$CC" >&6
1438 else
1439   echo "$as_me:1439: result: no" >&5
1440 echo "${ECHO_T}no" >&6
1441 fi
1442
1443 fi
1444 if test -z "$ac_cv_prog_CC"; then
1445   ac_ct_CC=$CC
1446   # Extract the first word of "gcc", so it can be a program name with args.
1447 set dummy gcc; ac_word=$2
1448 echo "$as_me:1448: checking for $ac_word" >&5
1449 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1450 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1451   echo $ECHO_N "(cached) $ECHO_C" >&6
1452 else
1453   if test -n "$ac_ct_CC"; then
1454   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1455 else
1456   ac_save_IFS=$IFS; IFS=$ac_path_separator
1457 ac_dummy="$PATH"
1458 for ac_dir in $ac_dummy; do
1459   IFS=$ac_save_IFS
1460   test -z "$ac_dir" && ac_dir=.
1461   $as_executable_p "$ac_dir/$ac_word" || continue
1462 ac_cv_prog_ac_ct_CC="gcc"
1463 echo "$as_me:1463: found $ac_dir/$ac_word" >&5
1464 break
1465 done
1466
1467 fi
1468 fi
1469 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1470 if test -n "$ac_ct_CC"; then
1471   echo "$as_me:1471: result: $ac_ct_CC" >&5
1472 echo "${ECHO_T}$ac_ct_CC" >&6
1473 else
1474   echo "$as_me:1474: result: no" >&5
1475 echo "${ECHO_T}no" >&6
1476 fi
1477
1478   CC=$ac_ct_CC
1479 else
1480   CC="$ac_cv_prog_CC"
1481 fi
1482
1483 if test -z "$CC"; then
1484   if test -n "$ac_tool_prefix"; then
1485   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1486 set dummy ${ac_tool_prefix}cc; ac_word=$2
1487 echo "$as_me:1487: checking for $ac_word" >&5
1488 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1489 if test "${ac_cv_prog_CC+set}" = set; then
1490   echo $ECHO_N "(cached) $ECHO_C" >&6
1491 else
1492   if test -n "$CC"; then
1493   ac_cv_prog_CC="$CC" # Let the user override the test.
1494 else
1495   ac_save_IFS=$IFS; IFS=$ac_path_separator
1496 ac_dummy="$PATH"
1497 for ac_dir in $ac_dummy; do
1498   IFS=$ac_save_IFS
1499   test -z "$ac_dir" && ac_dir=.
1500   $as_executable_p "$ac_dir/$ac_word" || continue
1501 ac_cv_prog_CC="${ac_tool_prefix}cc"
1502 echo "$as_me:1502: found $ac_dir/$ac_word" >&5
1503 break
1504 done
1505
1506 fi
1507 fi
1508 CC=$ac_cv_prog_CC
1509 if test -n "$CC"; then
1510   echo "$as_me:1510: result: $CC" >&5
1511 echo "${ECHO_T}$CC" >&6
1512 else
1513   echo "$as_me:1513: result: no" >&5
1514 echo "${ECHO_T}no" >&6
1515 fi
1516
1517 fi
1518 if test -z "$ac_cv_prog_CC"; then
1519   ac_ct_CC=$CC
1520   # Extract the first word of "cc", so it can be a program name with args.
1521 set dummy cc; ac_word=$2
1522 echo "$as_me:1522: checking for $ac_word" >&5
1523 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1524 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1525   echo $ECHO_N "(cached) $ECHO_C" >&6
1526 else
1527   if test -n "$ac_ct_CC"; then
1528   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1529 else
1530   ac_save_IFS=$IFS; IFS=$ac_path_separator
1531 ac_dummy="$PATH"
1532 for ac_dir in $ac_dummy; do
1533   IFS=$ac_save_IFS
1534   test -z "$ac_dir" && ac_dir=.
1535   $as_executable_p "$ac_dir/$ac_word" || continue
1536 ac_cv_prog_ac_ct_CC="cc"
1537 echo "$as_me:1537: found $ac_dir/$ac_word" >&5
1538 break
1539 done
1540
1541 fi
1542 fi
1543 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1544 if test -n "$ac_ct_CC"; then
1545   echo "$as_me:1545: result: $ac_ct_CC" >&5
1546 echo "${ECHO_T}$ac_ct_CC" >&6
1547 else
1548   echo "$as_me:1548: result: no" >&5
1549 echo "${ECHO_T}no" >&6
1550 fi
1551
1552   CC=$ac_ct_CC
1553 else
1554   CC="$ac_cv_prog_CC"
1555 fi
1556
1557 fi
1558 if test -z "$CC"; then
1559   # Extract the first word of "cc", so it can be a program name with args.
1560 set dummy cc; ac_word=$2
1561 echo "$as_me:1561: checking for $ac_word" >&5
1562 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1563 if test "${ac_cv_prog_CC+set}" = set; then
1564   echo $ECHO_N "(cached) $ECHO_C" >&6
1565 else
1566   if test -n "$CC"; then
1567   ac_cv_prog_CC="$CC" # Let the user override the test.
1568 else
1569   ac_prog_rejected=no
1570   ac_save_IFS=$IFS; IFS=$ac_path_separator
1571 ac_dummy="$PATH"
1572 for ac_dir in $ac_dummy; do
1573   IFS=$ac_save_IFS
1574   test -z "$ac_dir" && ac_dir=.
1575   $as_executable_p "$ac_dir/$ac_word" || continue
1576 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1577   ac_prog_rejected=yes
1578   continue
1579 fi
1580 ac_cv_prog_CC="cc"
1581 echo "$as_me:1581: found $ac_dir/$ac_word" >&5
1582 break
1583 done
1584
1585 if test $ac_prog_rejected = yes; then
1586   # We found a bogon in the path, so make sure we never use it.
1587   set dummy $ac_cv_prog_CC
1588   shift
1589   if test $# != 0; then
1590     # We chose a different compiler from the bogus one.
1591     # However, it has the same basename, so the bogon will be chosen
1592     # first if we set CC to just the basename; use the full file name.
1593     shift
1594     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1595     shift
1596     ac_cv_prog_CC="$@"
1597   fi
1598 fi
1599 fi
1600 fi
1601 CC=$ac_cv_prog_CC
1602 if test -n "$CC"; then
1603   echo "$as_me:1603: result: $CC" >&5
1604 echo "${ECHO_T}$CC" >&6
1605 else
1606   echo "$as_me:1606: result: no" >&5
1607 echo "${ECHO_T}no" >&6
1608 fi
1609
1610 fi
1611 if test -z "$CC"; then
1612   if test -n "$ac_tool_prefix"; then
1613   for ac_prog in cl
1614   do
1615     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1616 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1617 echo "$as_me:1617: checking for $ac_word" >&5
1618 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1619 if test "${ac_cv_prog_CC+set}" = set; then
1620   echo $ECHO_N "(cached) $ECHO_C" >&6
1621 else
1622   if test -n "$CC"; then
1623   ac_cv_prog_CC="$CC" # Let the user override the test.
1624 else
1625   ac_save_IFS=$IFS; IFS=$ac_path_separator
1626 ac_dummy="$PATH"
1627 for ac_dir in $ac_dummy; do
1628   IFS=$ac_save_IFS
1629   test -z "$ac_dir" && ac_dir=.
1630   $as_executable_p "$ac_dir/$ac_word" || continue
1631 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1632 echo "$as_me:1632: found $ac_dir/$ac_word" >&5
1633 break
1634 done
1635
1636 fi
1637 fi
1638 CC=$ac_cv_prog_CC
1639 if test -n "$CC"; then
1640   echo "$as_me:1640: result: $CC" >&5
1641 echo "${ECHO_T}$CC" >&6
1642 else
1643   echo "$as_me:1643: result: no" >&5
1644 echo "${ECHO_T}no" >&6
1645 fi
1646
1647     test -n "$CC" && break
1648   done
1649 fi
1650 if test -z "$CC"; then
1651   ac_ct_CC=$CC
1652   for ac_prog in cl
1653 do
1654   # Extract the first word of "$ac_prog", so it can be a program name with args.
1655 set dummy $ac_prog; ac_word=$2
1656 echo "$as_me:1656: checking for $ac_word" >&5
1657 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1658 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1659   echo $ECHO_N "(cached) $ECHO_C" >&6
1660 else
1661   if test -n "$ac_ct_CC"; then
1662   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1663 else
1664   ac_save_IFS=$IFS; IFS=$ac_path_separator
1665 ac_dummy="$PATH"
1666 for ac_dir in $ac_dummy; do
1667   IFS=$ac_save_IFS
1668   test -z "$ac_dir" && ac_dir=.
1669   $as_executable_p "$ac_dir/$ac_word" || continue
1670 ac_cv_prog_ac_ct_CC="$ac_prog"
1671 echo "$as_me:1671: found $ac_dir/$ac_word" >&5
1672 break
1673 done
1674
1675 fi
1676 fi
1677 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1678 if test -n "$ac_ct_CC"; then
1679   echo "$as_me:1679: result: $ac_ct_CC" >&5
1680 echo "${ECHO_T}$ac_ct_CC" >&6
1681 else
1682   echo "$as_me:1682: result: no" >&5
1683 echo "${ECHO_T}no" >&6
1684 fi
1685
1686   test -n "$ac_ct_CC" && break
1687 done
1688
1689   CC=$ac_ct_CC
1690 fi
1691
1692 fi
1693
1694 test -z "$CC" && { { echo "$as_me:1694: error: no acceptable cc found in \$PATH" >&5
1695 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1696    { (exit 1); exit 1; }; }
1697
1698 # Provide some information about the compiler.
1699 echo "$as_me:1699:" \
1700      "checking for C compiler version" >&5
1701 ac_compiler=`set X $ac_compile; echo $2`
1702 { (eval echo "$as_me:1702: \"$ac_compiler --version </dev/null >&5\"") >&5
1703   (eval $ac_compiler --version </dev/null >&5) 2>&5
1704   ac_status=$?
1705   echo "$as_me:1705: \$? = $ac_status" >&5
1706   (exit $ac_status); }
1707 { (eval echo "$as_me:1707: \"$ac_compiler -v </dev/null >&5\"") >&5
1708   (eval $ac_compiler -v </dev/null >&5) 2>&5
1709   ac_status=$?
1710   echo "$as_me:1710: \$? = $ac_status" >&5
1711   (exit $ac_status); }
1712 { (eval echo "$as_me:1712: \"$ac_compiler -V </dev/null >&5\"") >&5
1713   (eval $ac_compiler -V </dev/null >&5) 2>&5
1714   ac_status=$?
1715   echo "$as_me:1715: \$? = $ac_status" >&5
1716   (exit $ac_status); }
1717
1718 cat >conftest.$ac_ext <<_ACEOF
1719 #line 1719 "configure"
1720 #include "confdefs.h"
1721
1722 int
1723 main ()
1724 {
1725
1726   ;
1727   return 0;
1728 }
1729 _ACEOF
1730 ac_clean_files_save=$ac_clean_files
1731 ac_clean_files="$ac_clean_files a.out a.exe"
1732 # Try to create an executable without -o first, disregard a.out.
1733 # It will help us diagnose broken compilers, and finding out an intuition
1734 # of exeext.
1735 echo "$as_me:1735: checking for C compiler default output" >&5
1736 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1737 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1738 if { (eval echo "$as_me:1738: \"$ac_link_default\"") >&5
1739   (eval $ac_link_default) 2>&5
1740   ac_status=$?
1741   echo "$as_me:1741: \$? = $ac_status" >&5
1742   (exit $ac_status); }; then
1743   # Find the output, starting from the most likely.  This scheme is
1744 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1745 # resort.
1746 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1747                 ls a.out conftest 2>/dev/null;
1748                 ls a.* conftest.* 2>/dev/null`; do
1749   case $ac_file in
1750     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1751     a.out ) # We found the default executable, but exeext='' is most
1752             # certainly right.
1753             break;;
1754     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1755           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1756           export ac_cv_exeext
1757           break;;
1758     * ) break;;
1759   esac
1760 done
1761 else
1762   echo "$as_me: failed program was:" >&5
1763 cat conftest.$ac_ext >&5
1764 { { echo "$as_me:1764: error: C compiler cannot create executables" >&5
1765 echo "$as_me: error: C compiler cannot create executables" >&2;}
1766    { (exit 77); exit 77; }; }
1767 fi
1768
1769 ac_exeext=$ac_cv_exeext
1770 echo "$as_me:1770: result: $ac_file" >&5
1771 echo "${ECHO_T}$ac_file" >&6
1772
1773 # Check the compiler produces executables we can run.  If not, either
1774 # the compiler is broken, or we cross compile.
1775 echo "$as_me:1775: checking whether the C compiler works" >&5
1776 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1777 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1778 # If not cross compiling, check that we can run a simple program.
1779 if test "$cross_compiling" != yes; then
1780   if { ac_try='./$ac_file'
1781   { (eval echo "$as_me:1781: \"$ac_try\"") >&5
1782   (eval $ac_try) 2>&5
1783   ac_status=$?
1784   echo "$as_me:1784: \$? = $ac_status" >&5
1785   (exit $ac_status); }; }; then
1786     cross_compiling=no
1787   else
1788     if test "$cross_compiling" = maybe; then
1789         cross_compiling=yes
1790     else
1791         { { echo "$as_me:1791: error: cannot run C compiled programs.
1792 If you meant to cross compile, use \`--host'." >&5
1793 echo "$as_me: error: cannot run C compiled programs.
1794 If you meant to cross compile, use \`--host'." >&2;}
1795    { (exit 1); exit 1; }; }
1796     fi
1797   fi
1798 fi
1799 echo "$as_me:1799: result: yes" >&5
1800 echo "${ECHO_T}yes" >&6
1801
1802 rm -f a.out a.exe conftest$ac_cv_exeext
1803 ac_clean_files=$ac_clean_files_save
1804 # Check the compiler produces executables we can run.  If not, either
1805 # the compiler is broken, or we cross compile.
1806 echo "$as_me:1806: checking whether we are cross compiling" >&5
1807 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1808 echo "$as_me:1808: result: $cross_compiling" >&5
1809 echo "${ECHO_T}$cross_compiling" >&6
1810
1811 echo "$as_me:1811: checking for executable suffix" >&5
1812 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1813 if { (eval echo "$as_me:1813: \"$ac_link\"") >&5
1814   (eval $ac_link) 2>&5
1815   ac_status=$?
1816   echo "$as_me:1816: \$? = $ac_status" >&5
1817   (exit $ac_status); }; then
1818   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1819 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1820 # work properly (i.e., refer to `conftest.exe'), while it won't with
1821 # `rm'.
1822 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1823   case $ac_file in
1824     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1825     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1826           export ac_cv_exeext
1827           break;;
1828     * ) break;;
1829   esac
1830 done
1831 else
1832   { { echo "$as_me:1832: error: cannot compute EXEEXT: cannot compile and link" >&5
1833 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1834    { (exit 1); exit 1; }; }
1835 fi
1836
1837 rm -f conftest$ac_cv_exeext
1838 echo "$as_me:1838: result: $ac_cv_exeext" >&5
1839 echo "${ECHO_T}$ac_cv_exeext" >&6
1840
1841 rm -f conftest.$ac_ext
1842 EXEEXT=$ac_cv_exeext
1843 ac_exeext=$EXEEXT
1844 echo "$as_me:1844: checking for object suffix" >&5
1845 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1846 if test "${ac_cv_objext+set}" = set; then
1847   echo $ECHO_N "(cached) $ECHO_C" >&6
1848 else
1849   cat >conftest.$ac_ext <<_ACEOF
1850 #line 1850 "configure"
1851 #include "confdefs.h"
1852
1853 int
1854 main ()
1855 {
1856
1857   ;
1858   return 0;
1859 }
1860 _ACEOF
1861 rm -f conftest.o conftest.obj
1862 if { (eval echo "$as_me:1862: \"$ac_compile\"") >&5
1863   (eval $ac_compile) 2>&5
1864   ac_status=$?
1865   echo "$as_me:1865: \$? = $ac_status" >&5
1866   (exit $ac_status); }; then
1867   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1868   case $ac_file in
1869     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1870     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1871        break;;
1872   esac
1873 done
1874 else
1875   echo "$as_me: failed program was:" >&5
1876 cat conftest.$ac_ext >&5
1877 { { echo "$as_me:1877: error: cannot compute OBJEXT: cannot compile" >&5
1878 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1879    { (exit 1); exit 1; }; }
1880 fi
1881
1882 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1883 fi
1884 echo "$as_me:1884: result: $ac_cv_objext" >&5
1885 echo "${ECHO_T}$ac_cv_objext" >&6
1886 OBJEXT=$ac_cv_objext
1887 ac_objext=$OBJEXT
1888 echo "$as_me:1888: checking whether we are using the GNU C compiler" >&5
1889 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1890 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1891   echo $ECHO_N "(cached) $ECHO_C" >&6
1892 else
1893   cat >conftest.$ac_ext <<_ACEOF
1894 #line 1894 "configure"
1895 #include "confdefs.h"
1896
1897 int
1898 main ()
1899 {
1900 #ifndef __GNUC__
1901        choke me
1902 #endif
1903
1904   ;
1905   return 0;
1906 }
1907 _ACEOF
1908 rm -f conftest.$ac_objext
1909 if { (eval echo "$as_me:1909: \"$ac_compile\"") >&5
1910   (eval $ac_compile) 2>&5
1911   ac_status=$?
1912   echo "$as_me:1912: \$? = $ac_status" >&5
1913   (exit $ac_status); } &&
1914          { ac_try='test -s conftest.$ac_objext'
1915   { (eval echo "$as_me:1915: \"$ac_try\"") >&5
1916   (eval $ac_try) 2>&5
1917   ac_status=$?
1918   echo "$as_me:1918: \$? = $ac_status" >&5
1919   (exit $ac_status); }; }; then
1920   ac_compiler_gnu=yes
1921 else
1922   echo "$as_me: failed program was:" >&5
1923 cat conftest.$ac_ext >&5
1924 ac_compiler_gnu=no
1925 fi
1926 rm -f conftest.$ac_objext conftest.$ac_ext
1927 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1928
1929 fi
1930 echo "$as_me:1930: result: $ac_cv_c_compiler_gnu" >&5
1931 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1932 GCC=`test $ac_compiler_gnu = yes && echo yes`
1933 ac_test_CFLAGS=${CFLAGS+set}
1934 ac_save_CFLAGS=$CFLAGS
1935 CFLAGS="-g"
1936 echo "$as_me:1936: checking whether $CC accepts -g" >&5
1937 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1938 if test "${ac_cv_prog_cc_g+set}" = set; then
1939   echo $ECHO_N "(cached) $ECHO_C" >&6
1940 else
1941   cat >conftest.$ac_ext <<_ACEOF
1942 #line 1942 "configure"
1943 #include "confdefs.h"
1944
1945 int
1946 main ()
1947 {
1948
1949   ;
1950   return 0;
1951 }
1952 _ACEOF
1953 rm -f conftest.$ac_objext
1954 if { (eval echo "$as_me:1954: \"$ac_compile\"") >&5
1955   (eval $ac_compile) 2>&5
1956   ac_status=$?
1957   echo "$as_me:1957: \$? = $ac_status" >&5
1958   (exit $ac_status); } &&
1959          { ac_try='test -s conftest.$ac_objext'
1960   { (eval echo "$as_me:1960: \"$ac_try\"") >&5
1961   (eval $ac_try) 2>&5
1962   ac_status=$?
1963   echo "$as_me:1963: \$? = $ac_status" >&5
1964   (exit $ac_status); }; }; then
1965   ac_cv_prog_cc_g=yes
1966 else
1967   echo "$as_me: failed program was:" >&5
1968 cat conftest.$ac_ext >&5
1969 ac_cv_prog_cc_g=no
1970 fi
1971 rm -f conftest.$ac_objext conftest.$ac_ext
1972 fi
1973 echo "$as_me:1973: result: $ac_cv_prog_cc_g" >&5
1974 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1975 if test "$ac_test_CFLAGS" = set; then
1976   CFLAGS=$ac_save_CFLAGS
1977 elif test $ac_cv_prog_cc_g = yes; then
1978   if test "$GCC" = yes; then
1979     CFLAGS="-g -O2"
1980   else
1981     CFLAGS="-g"
1982   fi
1983 else
1984   if test "$GCC" = yes; then
1985     CFLAGS="-O2"
1986   else
1987     CFLAGS=
1988   fi
1989 fi
1990 # Some people use a C++ compiler to compile C.  Since we use `exit',
1991 # in C++ we need to declare it.  In case someone uses the same compiler
1992 # for both compiling C and C++ we need to have the C++ compiler decide
1993 # the declaration of exit, since it's the most demanding environment.
1994 cat >conftest.$ac_ext <<_ACEOF
1995 #ifndef __cplusplus
1996   choke me
1997 #endif
1998 _ACEOF
1999 rm -f conftest.$ac_objext
2000 if { (eval echo "$as_me:2000: \"$ac_compile\"") >&5
2001   (eval $ac_compile) 2>&5
2002   ac_status=$?
2003   echo "$as_me:2003: \$? = $ac_status" >&5
2004   (exit $ac_status); } &&
2005          { ac_try='test -s conftest.$ac_objext'
2006   { (eval echo "$as_me:2006: \"$ac_try\"") >&5
2007   (eval $ac_try) 2>&5
2008   ac_status=$?
2009   echo "$as_me:2009: \$? = $ac_status" >&5
2010   (exit $ac_status); }; }; then
2011   for ac_declaration in \
2012    ''\
2013    '#include <stdlib.h>' \
2014    'extern "C" void std::exit (int) throw (); using std::exit;' \
2015    'extern "C" void std::exit (int); using std::exit;' \
2016    'extern "C" void exit (int) throw ();' \
2017    'extern "C" void exit (int);' \
2018    'void exit (int);'
2019 do
2020   cat >conftest.$ac_ext <<_ACEOF
2021 #line 2021 "configure"
2022 #include "confdefs.h"
2023 #include <stdlib.h>
2024 $ac_declaration
2025 int
2026 main ()
2027 {
2028 exit (42);
2029   ;
2030   return 0;
2031 }
2032 _ACEOF
2033 rm -f conftest.$ac_objext
2034 if { (eval echo "$as_me:2034: \"$ac_compile\"") >&5
2035   (eval $ac_compile) 2>&5
2036   ac_status=$?
2037   echo "$as_me:2037: \$? = $ac_status" >&5
2038   (exit $ac_status); } &&
2039          { ac_try='test -s conftest.$ac_objext'
2040   { (eval echo "$as_me:2040: \"$ac_try\"") >&5
2041   (eval $ac_try) 2>&5
2042   ac_status=$?
2043   echo "$as_me:2043: \$? = $ac_status" >&5
2044   (exit $ac_status); }; }; then
2045   :
2046 else
2047   echo "$as_me: failed program was:" >&5
2048 cat conftest.$ac_ext >&5
2049 continue
2050 fi
2051 rm -f conftest.$ac_objext conftest.$ac_ext
2052   cat >conftest.$ac_ext <<_ACEOF
2053 #line 2053 "configure"
2054 #include "confdefs.h"
2055 $ac_declaration
2056 int
2057 main ()
2058 {
2059 exit (42);
2060   ;
2061   return 0;
2062 }
2063 _ACEOF
2064 rm -f conftest.$ac_objext
2065 if { (eval echo "$as_me:2065: \"$ac_compile\"") >&5
2066   (eval $ac_compile) 2>&5
2067   ac_status=$?
2068   echo "$as_me:2068: \$? = $ac_status" >&5
2069   (exit $ac_status); } &&
2070          { ac_try='test -s conftest.$ac_objext'
2071   { (eval echo "$as_me:2071: \"$ac_try\"") >&5
2072   (eval $ac_try) 2>&5
2073   ac_status=$?
2074   echo "$as_me:2074: \$? = $ac_status" >&5
2075   (exit $ac_status); }; }; then
2076   break
2077 else
2078   echo "$as_me: failed program was:" >&5
2079 cat conftest.$ac_ext >&5
2080 fi
2081 rm -f conftest.$ac_objext conftest.$ac_ext
2082 done
2083 rm -f conftest*
2084 if test -n "$ac_declaration"; then
2085   echo '#ifdef __cplusplus' >>confdefs.h
2086   echo $ac_declaration      >>confdefs.h
2087   echo '#endif'             >>confdefs.h
2088 fi
2089
2090 else
2091   echo "$as_me: failed program was:" >&5
2092 cat conftest.$ac_ext >&5
2093 fi
2094 rm -f conftest.$ac_objext conftest.$ac_ext
2095 ac_ext=c
2096 ac_cpp='$CPP $CPPFLAGS'
2097 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2098 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2099 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2100 ac_main_return=return
2101
2102 GCC_VERSION=none
2103 if test "$GCC" = yes ; then
2104         echo "$as_me:2104: checking version of $CC" >&5
2105 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2106         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2107         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2108         echo "$as_me:2108: result: $GCC_VERSION" >&5
2109 echo "${ECHO_T}$GCC_VERSION" >&6
2110 fi
2111
2112 ac_ext=c
2113 ac_cpp='$CPP $CPPFLAGS'
2114 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2115 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2116 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2117 ac_main_return=return
2118 echo "$as_me:2118: checking how to run the C preprocessor" >&5
2119 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2120 # On Suns, sometimes $CPP names a directory.
2121 if test -n "$CPP" && test -d "$CPP"; then
2122   CPP=
2123 fi
2124 if test -z "$CPP"; then
2125   if test "${ac_cv_prog_CPP+set}" = set; then
2126   echo $ECHO_N "(cached) $ECHO_C" >&6
2127 else
2128       # Double quotes because CPP needs to be expanded
2129     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2130     do
2131       ac_preproc_ok=false
2132 for ac_c_preproc_warn_flag in '' yes
2133 do
2134   # Use a header file that comes with gcc, so configuring glibc
2135   # with a fresh cross-compiler works.
2136   # On the NeXT, cc -E runs the code through the compiler's parser,
2137   # not just through cpp. "Syntax error" is here to catch this case.
2138   cat >conftest.$ac_ext <<_ACEOF
2139 #line 2139 "configure"
2140 #include "confdefs.h"
2141 #include <assert.h>
2142                      Syntax error
2143 _ACEOF
2144 if { (eval echo "$as_me:2144: \"$ac_cpp conftest.$ac_ext\"") >&5
2145   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2146   ac_status=$?
2147   egrep -v '^ *\+' conftest.er1 >conftest.err
2148   rm -f conftest.er1
2149   cat conftest.err >&5
2150   echo "$as_me:2150: \$? = $ac_status" >&5
2151   (exit $ac_status); } >/dev/null; then
2152   if test -s conftest.err; then
2153     ac_cpp_err=$ac_c_preproc_warn_flag
2154   else
2155     ac_cpp_err=
2156   fi
2157 else
2158   ac_cpp_err=yes
2159 fi
2160 if test -z "$ac_cpp_err"; then
2161   :
2162 else
2163   echo "$as_me: failed program was:" >&5
2164   cat conftest.$ac_ext >&5
2165   # Broken: fails on valid input.
2166 continue
2167 fi
2168 rm -f conftest.err conftest.$ac_ext
2169
2170   # OK, works on sane cases.  Now check whether non-existent headers
2171   # can be detected and how.
2172   cat >conftest.$ac_ext <<_ACEOF
2173 #line 2173 "configure"
2174 #include "confdefs.h"
2175 #include <ac_nonexistent.h>
2176 _ACEOF
2177 if { (eval echo "$as_me:2177: \"$ac_cpp conftest.$ac_ext\"") >&5
2178   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2179   ac_status=$?
2180   egrep -v '^ *\+' conftest.er1 >conftest.err
2181   rm -f conftest.er1
2182   cat conftest.err >&5
2183   echo "$as_me:2183: \$? = $ac_status" >&5
2184   (exit $ac_status); } >/dev/null; then
2185   if test -s conftest.err; then
2186     ac_cpp_err=$ac_c_preproc_warn_flag
2187   else
2188     ac_cpp_err=
2189   fi
2190 else
2191   ac_cpp_err=yes
2192 fi
2193 if test -z "$ac_cpp_err"; then
2194   # Broken: success on invalid input.
2195 continue
2196 else
2197   echo "$as_me: failed program was:" >&5
2198   cat conftest.$ac_ext >&5
2199   # Passes both tests.
2200 ac_preproc_ok=:
2201 break
2202 fi
2203 rm -f conftest.err conftest.$ac_ext
2204
2205 done
2206 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2207 rm -f conftest.err conftest.$ac_ext
2208 if $ac_preproc_ok; then
2209   break
2210 fi
2211
2212     done
2213     ac_cv_prog_CPP=$CPP
2214
2215 fi
2216   CPP=$ac_cv_prog_CPP
2217 else
2218   ac_cv_prog_CPP=$CPP
2219 fi
2220 echo "$as_me:2220: result: $CPP" >&5
2221 echo "${ECHO_T}$CPP" >&6
2222 ac_preproc_ok=false
2223 for ac_c_preproc_warn_flag in '' yes
2224 do
2225   # Use a header file that comes with gcc, so configuring glibc
2226   # with a fresh cross-compiler works.
2227   # On the NeXT, cc -E runs the code through the compiler's parser,
2228   # not just through cpp. "Syntax error" is here to catch this case.
2229   cat >conftest.$ac_ext <<_ACEOF
2230 #line 2230 "configure"
2231 #include "confdefs.h"
2232 #include <assert.h>
2233                      Syntax error
2234 _ACEOF
2235 if { (eval echo "$as_me:2235: \"$ac_cpp conftest.$ac_ext\"") >&5
2236   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2237   ac_status=$?
2238   egrep -v '^ *\+' conftest.er1 >conftest.err
2239   rm -f conftest.er1
2240   cat conftest.err >&5
2241   echo "$as_me:2241: \$? = $ac_status" >&5
2242   (exit $ac_status); } >/dev/null; then
2243   if test -s conftest.err; then
2244     ac_cpp_err=$ac_c_preproc_warn_flag
2245   else
2246     ac_cpp_err=
2247   fi
2248 else
2249   ac_cpp_err=yes
2250 fi
2251 if test -z "$ac_cpp_err"; then
2252   :
2253 else
2254   echo "$as_me: failed program was:" >&5
2255   cat conftest.$ac_ext >&5
2256   # Broken: fails on valid input.
2257 continue
2258 fi
2259 rm -f conftest.err conftest.$ac_ext
2260
2261   # OK, works on sane cases.  Now check whether non-existent headers
2262   # can be detected and how.
2263   cat >conftest.$ac_ext <<_ACEOF
2264 #line 2264 "configure"
2265 #include "confdefs.h"
2266 #include <ac_nonexistent.h>
2267 _ACEOF
2268 if { (eval echo "$as_me:2268: \"$ac_cpp conftest.$ac_ext\"") >&5
2269   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2270   ac_status=$?
2271   egrep -v '^ *\+' conftest.er1 >conftest.err
2272   rm -f conftest.er1
2273   cat conftest.err >&5
2274   echo "$as_me:2274: \$? = $ac_status" >&5
2275   (exit $ac_status); } >/dev/null; then
2276   if test -s conftest.err; then
2277     ac_cpp_err=$ac_c_preproc_warn_flag
2278   else
2279     ac_cpp_err=
2280   fi
2281 else
2282   ac_cpp_err=yes
2283 fi
2284 if test -z "$ac_cpp_err"; then
2285   # Broken: success on invalid input.
2286 continue
2287 else
2288   echo "$as_me: failed program was:" >&5
2289   cat conftest.$ac_ext >&5
2290   # Passes both tests.
2291 ac_preproc_ok=:
2292 break
2293 fi
2294 rm -f conftest.err conftest.$ac_ext
2295
2296 done
2297 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2298 rm -f conftest.err conftest.$ac_ext
2299 if $ac_preproc_ok; then
2300   :
2301 else
2302   { { echo "$as_me:2302: error: C preprocessor \"$CPP\" fails sanity check" >&5
2303 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2304    { (exit 1); exit 1; }; }
2305 fi
2306
2307 ac_ext=c
2308 ac_cpp='$CPP $CPPFLAGS'
2309 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2310 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2311 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2312 ac_main_return=return
2313
2314 if test $ac_cv_c_compiler_gnu = yes; then
2315     echo "$as_me:2315: checking whether $CC needs -traditional" >&5
2316 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2317 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2318   echo $ECHO_N "(cached) $ECHO_C" >&6
2319 else
2320     ac_pattern="Autoconf.*'x'"
2321   cat >conftest.$ac_ext <<_ACEOF
2322 #line 2322 "configure"
2323 #include "confdefs.h"
2324 #include <sgtty.h>
2325 int Autoconf = TIOCGETP;
2326 _ACEOF
2327 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2328   egrep "$ac_pattern" >/dev/null 2>&1; then
2329   ac_cv_prog_gcc_traditional=yes
2330 else
2331   ac_cv_prog_gcc_traditional=no
2332 fi
2333 rm -f conftest*
2334
2335   if test $ac_cv_prog_gcc_traditional = no; then
2336     cat >conftest.$ac_ext <<_ACEOF
2337 #line 2337 "configure"
2338 #include "confdefs.h"
2339 #include <termio.h>
2340 int Autoconf = TCGETA;
2341 _ACEOF
2342 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2343   egrep "$ac_pattern" >/dev/null 2>&1; then
2344   ac_cv_prog_gcc_traditional=yes
2345 fi
2346 rm -f conftest*
2347
2348   fi
2349 fi
2350 echo "$as_me:2350: result: $ac_cv_prog_gcc_traditional" >&5
2351 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2352   if test $ac_cv_prog_gcc_traditional = yes; then
2353     CC="$CC -traditional"
2354   fi
2355 fi
2356
2357 echo "$as_me:2357: checking whether $CC understands -c and -o together" >&5
2358 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2359 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2360   echo $ECHO_N "(cached) $ECHO_C" >&6
2361 else
2362
2363 cat > conftest.$ac_ext <<CF_EOF
2364 #include <stdio.h>
2365 int main()
2366 {
2367         ${cf_cv_main_return:-return}(0);
2368 }
2369 CF_EOF
2370 # We do the test twice because some compilers refuse to overwrite an
2371 # existing .o file with -o, though they will create one.
2372 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2373 if { (eval echo "$as_me:2373: \"$ac_try\"") >&5
2374   (eval $ac_try) 2>&5
2375   ac_status=$?
2376   echo "$as_me:2376: \$? = $ac_status" >&5
2377   (exit $ac_status); } &&
2378   test -f conftest2.$ac_objext && { (eval echo "$as_me:2378: \"$ac_try\"") >&5
2379   (eval $ac_try) 2>&5
2380   ac_status=$?
2381   echo "$as_me:2381: \$? = $ac_status" >&5
2382   (exit $ac_status); };
2383 then
2384   eval cf_cv_prog_CC_c_o=yes
2385 else
2386   eval cf_cv_prog_CC_c_o=no
2387 fi
2388 rm -f conftest*
2389
2390 fi
2391 if test $cf_cv_prog_CC_c_o = yes; then
2392   echo "$as_me:2392: result: yes" >&5
2393 echo "${ECHO_T}yes" >&6
2394 else
2395   echo "$as_me:2395: result: no" >&5
2396 echo "${ECHO_T}no" >&6
2397 fi
2398
2399 echo "$as_me:2399: checking for POSIXized ISC" >&5
2400 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2401 if test -d /etc/conf/kconfig.d &&
2402    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2403 then
2404   echo "$as_me:2404: result: yes" >&5
2405 echo "${ECHO_T}yes" >&6
2406   ISC=yes # If later tests want to check for ISC.
2407
2408 cat >>confdefs.h <<\EOF
2409 #define _POSIX_SOURCE 1
2410 EOF
2411
2412   if test "$GCC" = yes; then
2413     CC="$CC -posix"
2414   else
2415     CC="$CC -Xp"
2416   fi
2417 else
2418   echo "$as_me:2418: result: no" >&5
2419 echo "${ECHO_T}no" >&6
2420   ISC=
2421 fi
2422
2423 echo "$as_me:2423: checking for ${CC-cc} option to accept ANSI C" >&5
2424 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2425 if test "${cf_cv_ansi_cc+set}" = set; then
2426   echo $ECHO_N "(cached) $ECHO_C" >&6
2427 else
2428
2429 cf_cv_ansi_cc=no
2430 cf_save_CFLAGS="$CFLAGS"
2431 cf_save_CPPFLAGS="$CPPFLAGS"
2432 # Don't try gcc -ansi; that turns off useful extensions and
2433 # breaks some systems' header files.
2434 # AIX                   -qlanglvl=ansi
2435 # Ultrix and OSF/1      -std1
2436 # HP-UX                 -Aa -D_HPUX_SOURCE
2437 # SVR4                  -Xc
2438 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2439 for cf_arg in "-DCC_HAS_PROTOS" \
2440         "" \
2441         -qlanglvl=ansi \
2442         -std1 \
2443         -Ae \
2444         "-Aa -D_HPUX_SOURCE" \
2445         -Xc
2446 do
2447
2448 cf_fix_cppflags=no
2449 cf_new_cflags=
2450 cf_new_cppflags=
2451 cf_new_extra_cppflags=
2452
2453 for cf_add_cflags in $cf_arg
2454 do
2455 case $cf_fix_cppflags in
2456 no)
2457         case $cf_add_cflags in #(vi
2458         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2459                 case $cf_add_cflags in
2460                 -D*)
2461                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2462
2463                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2464                                 && test -z "${cf_tst_cflags}" \
2465                                 && cf_fix_cppflags=yes
2466
2467                         if test $cf_fix_cppflags = yes ; then
2468                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2469                                 continue
2470                         elif test "${cf_tst_cflags}" = "\"'" ; then
2471                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2472                                 continue
2473                         fi
2474                         ;;
2475                 esac
2476                 case "$CPPFLAGS" in
2477                 *$cf_add_cflags) #(vi
2478                         ;;
2479                 *) #(vi
2480                         case $cf_add_cflags in #(vi
2481                         -D*)
2482                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2483
2484 CPPFLAGS=`echo "$CPPFLAGS" | \
2485         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2486                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2487
2488                                 ;;
2489                         esac
2490                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2491                         ;;
2492                 esac
2493                 ;;
2494         *)
2495                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2496                 ;;
2497         esac
2498         ;;
2499 yes)
2500         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2501
2502         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2503
2504         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2505                 && test -z "${cf_tst_cflags}" \
2506                 && cf_fix_cppflags=no
2507         ;;
2508 esac
2509 done
2510
2511 if test -n "$cf_new_cflags" ; then
2512
2513         CFLAGS="$CFLAGS $cf_new_cflags"
2514 fi
2515
2516 if test -n "$cf_new_cppflags" ; then
2517
2518         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2519 fi
2520
2521 if test -n "$cf_new_extra_cppflags" ; then
2522
2523         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2524 fi
2525
2526         cat >conftest.$ac_ext <<_ACEOF
2527 #line 2527 "configure"
2528 #include "confdefs.h"
2529
2530 #ifndef CC_HAS_PROTOS
2531 #if !defined(__STDC__) || (__STDC__ != 1)
2532 choke me
2533 #endif
2534 #endif
2535
2536 int
2537 main ()
2538 {
2539
2540         int test (int i, double x);
2541         struct s1 {int (*f) (int a);};
2542         struct s2 {int (*f) (double a);};
2543   ;
2544   return 0;
2545 }
2546 _ACEOF
2547 rm -f conftest.$ac_objext
2548 if { (eval echo "$as_me:2548: \"$ac_compile\"") >&5
2549   (eval $ac_compile) 2>&5
2550   ac_status=$?
2551   echo "$as_me:2551: \$? = $ac_status" >&5
2552   (exit $ac_status); } &&
2553          { ac_try='test -s conftest.$ac_objext'
2554   { (eval echo "$as_me:2554: \"$ac_try\"") >&5
2555   (eval $ac_try) 2>&5
2556   ac_status=$?
2557   echo "$as_me:2557: \$? = $ac_status" >&5
2558   (exit $ac_status); }; }; then
2559   cf_cv_ansi_cc="$cf_arg"; break
2560 else
2561   echo "$as_me: failed program was:" >&5
2562 cat conftest.$ac_ext >&5
2563 fi
2564 rm -f conftest.$ac_objext conftest.$ac_ext
2565 done
2566 CFLAGS="$cf_save_CFLAGS"
2567 CPPFLAGS="$cf_save_CPPFLAGS"
2568
2569 fi
2570 echo "$as_me:2570: result: $cf_cv_ansi_cc" >&5
2571 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2572
2573 if test "$cf_cv_ansi_cc" != "no"; then
2574 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2575
2576 cf_fix_cppflags=no
2577 cf_new_cflags=
2578 cf_new_cppflags=
2579 cf_new_extra_cppflags=
2580
2581 for cf_add_cflags in $cf_cv_ansi_cc
2582 do
2583 case $cf_fix_cppflags in
2584 no)
2585         case $cf_add_cflags in #(vi
2586         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2587                 case $cf_add_cflags in
2588                 -D*)
2589                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2590
2591                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2592                                 && test -z "${cf_tst_cflags}" \
2593                                 && cf_fix_cppflags=yes
2594
2595                         if test $cf_fix_cppflags = yes ; then
2596                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2597                                 continue
2598                         elif test "${cf_tst_cflags}" = "\"'" ; then
2599                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2600                                 continue
2601                         fi
2602                         ;;
2603                 esac
2604                 case "$CPPFLAGS" in
2605                 *$cf_add_cflags) #(vi
2606                         ;;
2607                 *) #(vi
2608                         case $cf_add_cflags in #(vi
2609                         -D*)
2610                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2611
2612 CPPFLAGS=`echo "$CPPFLAGS" | \
2613         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2614                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2615
2616                                 ;;
2617                         esac
2618                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2619                         ;;
2620                 esac
2621                 ;;
2622         *)
2623                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2624                 ;;
2625         esac
2626         ;;
2627 yes)
2628         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2629
2630         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2631
2632         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2633                 && test -z "${cf_tst_cflags}" \
2634                 && cf_fix_cppflags=no
2635         ;;
2636 esac
2637 done
2638
2639 if test -n "$cf_new_cflags" ; then
2640
2641         CFLAGS="$CFLAGS $cf_new_cflags"
2642 fi
2643
2644 if test -n "$cf_new_cppflags" ; then
2645
2646         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2647 fi
2648
2649 if test -n "$cf_new_extra_cppflags" ; then
2650
2651         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2652 fi
2653
2654 else
2655         cat >>confdefs.h <<\EOF
2656 #define CC_HAS_PROTOS 1
2657 EOF
2658
2659 fi
2660 fi
2661
2662 if test "$cf_cv_ansi_cc" = "no"; then
2663         { { echo "$as_me:2663: error: Your compiler does not appear to recognize prototypes.
2664 You have the following choices:
2665         a. adjust your compiler options
2666         b. get an up-to-date compiler
2667         c. use a wrapper such as unproto" >&5
2668 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2669 You have the following choices:
2670         a. adjust your compiler options
2671         b. get an up-to-date compiler
2672         c. use a wrapper such as unproto" >&2;}
2673    { (exit 1); exit 1; }; }
2674 fi
2675
2676 case $cf_cv_system_name in
2677 os2*)
2678     CFLAGS="$CFLAGS -Zmt"
2679     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2680     CXXFLAGS="$CXXFLAGS -Zmt"
2681     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2682     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2683     ac_cv_exeext=.exe
2684     ;;
2685 esac
2686
2687 PROG_EXT="$EXEEXT"
2688
2689 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2690 #define PROG_EXT "$PROG_EXT"
2691 EOF
2692
2693 if test "$cross_compiling" = yes ; then
2694   LDCONFIG=:
2695 else
2696 case "$cf_cv_system_name" in #(vi
2697 dragonfly*|freebsd*) #(vi
2698   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2699   ;;
2700 *) LDPATH=$PATH:/sbin:/usr/sbin
2701   # Extract the first word of "ldconfig", so it can be a program name with args.
2702 set dummy ldconfig; ac_word=$2
2703 echo "$as_me:2703: checking for $ac_word" >&5
2704 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2705 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2706   echo $ECHO_N "(cached) $ECHO_C" >&6
2707 else
2708   case $LDCONFIG in
2709   [\\/]* | ?:[\\/]*)
2710   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2711   ;;
2712   *)
2713   ac_save_IFS=$IFS; IFS=$ac_path_separator
2714 ac_dummy="$LDPATH"
2715 for ac_dir in $ac_dummy; do
2716   IFS=$ac_save_IFS
2717   test -z "$ac_dir" && ac_dir=.
2718   if $as_executable_p "$ac_dir/$ac_word"; then
2719    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2720    echo "$as_me:2720: found $ac_dir/$ac_word" >&5
2721    break
2722 fi
2723 done
2724
2725   ;;
2726 esac
2727 fi
2728 LDCONFIG=$ac_cv_path_LDCONFIG
2729
2730 if test -n "$LDCONFIG"; then
2731   echo "$as_me:2731: result: $LDCONFIG" >&5
2732 echo "${ECHO_T}$LDCONFIG" >&6
2733 else
2734   echo "$as_me:2734: result: no" >&5
2735 echo "${ECHO_T}no" >&6
2736 fi
2737
2738   ;;
2739 esac
2740 fi
2741
2742 echo "$as_me:2742: checking if you want to ensure bool is consistent with C++" >&5
2743 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2744
2745 # Check whether --with-cxx or --without-cxx was given.
2746 if test "${with_cxx+set}" = set; then
2747   withval="$with_cxx"
2748   cf_with_cxx=$withval
2749 else
2750   cf_with_cxx=yes
2751 fi;
2752 echo "$as_me:2752: result: $cf_with_cxx" >&5
2753 echo "${ECHO_T}$cf_with_cxx" >&6
2754 if test "X$cf_with_cxx" = Xno ; then
2755         CXX=""
2756         GXX=""
2757 else
2758         # with autoconf 2.13, we can change the error to a warning:
2759                 ac_ext=cc
2760 ac_cpp='$CXXCPP $CPPFLAGS'
2761 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2762 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2763 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2764 ac_main_return=return
2765 if test -n "$ac_tool_prefix"; then
2766   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2767   do
2768     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2769 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2770 echo "$as_me:2770: checking for $ac_word" >&5
2771 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2772 if test "${ac_cv_prog_CXX+set}" = set; then
2773   echo $ECHO_N "(cached) $ECHO_C" >&6
2774 else
2775   if test -n "$CXX"; then
2776   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2777 else
2778   ac_save_IFS=$IFS; IFS=$ac_path_separator
2779 ac_dummy="$PATH"
2780 for ac_dir in $ac_dummy; do
2781   IFS=$ac_save_IFS
2782   test -z "$ac_dir" && ac_dir=.
2783   $as_executable_p "$ac_dir/$ac_word" || continue
2784 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2785 echo "$as_me:2785: found $ac_dir/$ac_word" >&5
2786 break
2787 done
2788
2789 fi
2790 fi
2791 CXX=$ac_cv_prog_CXX
2792 if test -n "$CXX"; then
2793   echo "$as_me:2793: result: $CXX" >&5
2794 echo "${ECHO_T}$CXX" >&6
2795 else
2796   echo "$as_me:2796: result: no" >&5
2797 echo "${ECHO_T}no" >&6
2798 fi
2799
2800     test -n "$CXX" && break
2801   done
2802 fi
2803 if test -z "$CXX"; then
2804   ac_ct_CXX=$CXX
2805   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2806 do
2807   # Extract the first word of "$ac_prog", so it can be a program name with args.
2808 set dummy $ac_prog; ac_word=$2
2809 echo "$as_me:2809: checking for $ac_word" >&5
2810 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2811 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2812   echo $ECHO_N "(cached) $ECHO_C" >&6
2813 else
2814   if test -n "$ac_ct_CXX"; then
2815   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2816 else
2817   ac_save_IFS=$IFS; IFS=$ac_path_separator
2818 ac_dummy="$PATH"
2819 for ac_dir in $ac_dummy; do
2820   IFS=$ac_save_IFS
2821   test -z "$ac_dir" && ac_dir=.
2822   $as_executable_p "$ac_dir/$ac_word" || continue
2823 ac_cv_prog_ac_ct_CXX="$ac_prog"
2824 echo "$as_me:2824: found $ac_dir/$ac_word" >&5
2825 break
2826 done
2827
2828 fi
2829 fi
2830 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2831 if test -n "$ac_ct_CXX"; then
2832   echo "$as_me:2832: result: $ac_ct_CXX" >&5
2833 echo "${ECHO_T}$ac_ct_CXX" >&6
2834 else
2835   echo "$as_me:2835: result: no" >&5
2836 echo "${ECHO_T}no" >&6
2837 fi
2838
2839   test -n "$ac_ct_CXX" && break
2840 done
2841 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2842
2843   CXX=$ac_ct_CXX
2844 fi
2845
2846 # Provide some information about the compiler.
2847 echo "$as_me:2847:" \
2848      "checking for C++ compiler version" >&5
2849 ac_compiler=`set X $ac_compile; echo $2`
2850 { (eval echo "$as_me:2850: \"$ac_compiler --version </dev/null >&5\"") >&5
2851   (eval $ac_compiler --version </dev/null >&5) 2>&5
2852   ac_status=$?
2853   echo "$as_me:2853: \$? = $ac_status" >&5
2854   (exit $ac_status); }
2855 { (eval echo "$as_me:2855: \"$ac_compiler -v </dev/null >&5\"") >&5
2856   (eval $ac_compiler -v </dev/null >&5) 2>&5
2857   ac_status=$?
2858   echo "$as_me:2858: \$? = $ac_status" >&5
2859   (exit $ac_status); }
2860 { (eval echo "$as_me:2860: \"$ac_compiler -V </dev/null >&5\"") >&5
2861   (eval $ac_compiler -V </dev/null >&5) 2>&5
2862   ac_status=$?
2863   echo "$as_me:2863: \$? = $ac_status" >&5
2864   (exit $ac_status); }
2865
2866 echo "$as_me:2866: checking whether we are using the GNU C++ compiler" >&5
2867 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2868 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2869   echo $ECHO_N "(cached) $ECHO_C" >&6
2870 else
2871   cat >conftest.$ac_ext <<_ACEOF
2872 #line 2872 "configure"
2873 #include "confdefs.h"
2874
2875 int
2876 main ()
2877 {
2878 #ifndef __GNUC__
2879        choke me
2880 #endif
2881
2882   ;
2883   return 0;
2884 }
2885 _ACEOF
2886 rm -f conftest.$ac_objext
2887 if { (eval echo "$as_me:2887: \"$ac_compile\"") >&5
2888   (eval $ac_compile) 2>&5
2889   ac_status=$?
2890   echo "$as_me:2890: \$? = $ac_status" >&5
2891   (exit $ac_status); } &&
2892          { ac_try='test -s conftest.$ac_objext'
2893   { (eval echo "$as_me:2893: \"$ac_try\"") >&5
2894   (eval $ac_try) 2>&5
2895   ac_status=$?
2896   echo "$as_me:2896: \$? = $ac_status" >&5
2897   (exit $ac_status); }; }; then
2898   ac_compiler_gnu=yes
2899 else
2900   echo "$as_me: failed program was:" >&5
2901 cat conftest.$ac_ext >&5
2902 ac_compiler_gnu=no
2903 fi
2904 rm -f conftest.$ac_objext conftest.$ac_ext
2905 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2906
2907 fi
2908 echo "$as_me:2908: result: $ac_cv_cxx_compiler_gnu" >&5
2909 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2910 GXX=`test $ac_compiler_gnu = yes && echo yes`
2911 ac_test_CXXFLAGS=${CXXFLAGS+set}
2912 ac_save_CXXFLAGS=$CXXFLAGS
2913 CXXFLAGS="-g"
2914 echo "$as_me:2914: checking whether $CXX accepts -g" >&5
2915 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2916 if test "${ac_cv_prog_cxx_g+set}" = set; then
2917   echo $ECHO_N "(cached) $ECHO_C" >&6
2918 else
2919   cat >conftest.$ac_ext <<_ACEOF
2920 #line 2920 "configure"
2921 #include "confdefs.h"
2922
2923 int
2924 main ()
2925 {
2926
2927   ;
2928   return 0;
2929 }
2930 _ACEOF
2931 rm -f conftest.$ac_objext
2932 if { (eval echo "$as_me:2932: \"$ac_compile\"") >&5
2933   (eval $ac_compile) 2>&5
2934   ac_status=$?
2935   echo "$as_me:2935: \$? = $ac_status" >&5
2936   (exit $ac_status); } &&
2937          { ac_try='test -s conftest.$ac_objext'
2938   { (eval echo "$as_me:2938: \"$ac_try\"") >&5
2939   (eval $ac_try) 2>&5
2940   ac_status=$?
2941   echo "$as_me:2941: \$? = $ac_status" >&5
2942   (exit $ac_status); }; }; then
2943   ac_cv_prog_cxx_g=yes
2944 else
2945   echo "$as_me: failed program was:" >&5
2946 cat conftest.$ac_ext >&5
2947 ac_cv_prog_cxx_g=no
2948 fi
2949 rm -f conftest.$ac_objext conftest.$ac_ext
2950 fi
2951 echo "$as_me:2951: result: $ac_cv_prog_cxx_g" >&5
2952 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2953 if test "$ac_test_CXXFLAGS" = set; then
2954   CXXFLAGS=$ac_save_CXXFLAGS
2955 elif test $ac_cv_prog_cxx_g = yes; then
2956   if test "$GXX" = yes; then
2957     CXXFLAGS="-g -O2"
2958   else
2959     CXXFLAGS="-g"
2960   fi
2961 else
2962   if test "$GXX" = yes; then
2963     CXXFLAGS="-O2"
2964   else
2965     CXXFLAGS=
2966   fi
2967 fi
2968 for ac_declaration in \
2969    ''\
2970    '#include <stdlib.h>' \
2971    'extern "C" void std::exit (int) throw (); using std::exit;' \
2972    'extern "C" void std::exit (int); using std::exit;' \
2973    'extern "C" void exit (int) throw ();' \
2974    'extern "C" void exit (int);' \
2975    'void exit (int);'
2976 do
2977   cat >conftest.$ac_ext <<_ACEOF
2978 #line 2978 "configure"
2979 #include "confdefs.h"
2980 #include <stdlib.h>
2981 $ac_declaration
2982 int
2983 main ()
2984 {
2985 exit (42);
2986   ;
2987   return 0;
2988 }
2989 _ACEOF
2990 rm -f conftest.$ac_objext
2991 if { (eval echo "$as_me:2991: \"$ac_compile\"") >&5
2992   (eval $ac_compile) 2>&5
2993   ac_status=$?
2994   echo "$as_me:2994: \$? = $ac_status" >&5
2995   (exit $ac_status); } &&
2996          { ac_try='test -s conftest.$ac_objext'
2997   { (eval echo "$as_me:2997: \"$ac_try\"") >&5
2998   (eval $ac_try) 2>&5
2999   ac_status=$?
3000   echo "$as_me:3000: \$? = $ac_status" >&5
3001   (exit $ac_status); }; }; then
3002   :
3003 else
3004   echo "$as_me: failed program was:" >&5
3005 cat conftest.$ac_ext >&5
3006 continue
3007 fi
3008 rm -f conftest.$ac_objext conftest.$ac_ext
3009   cat >conftest.$ac_ext <<_ACEOF
3010 #line 3010 "configure"
3011 #include "confdefs.h"
3012 $ac_declaration
3013 int
3014 main ()
3015 {
3016 exit (42);
3017   ;
3018   return 0;
3019 }
3020 _ACEOF
3021 rm -f conftest.$ac_objext
3022 if { (eval echo "$as_me:3022: \"$ac_compile\"") >&5
3023   (eval $ac_compile) 2>&5
3024   ac_status=$?
3025   echo "$as_me:3025: \$? = $ac_status" >&5
3026   (exit $ac_status); } &&
3027          { ac_try='test -s conftest.$ac_objext'
3028   { (eval echo "$as_me:3028: \"$ac_try\"") >&5
3029   (eval $ac_try) 2>&5
3030   ac_status=$?
3031   echo "$as_me:3031: \$? = $ac_status" >&5
3032   (exit $ac_status); }; }; then
3033   break
3034 else
3035   echo "$as_me: failed program was:" >&5
3036 cat conftest.$ac_ext >&5
3037 fi
3038 rm -f conftest.$ac_objext conftest.$ac_ext
3039 done
3040 rm -f conftest*
3041 if test -n "$ac_declaration"; then
3042   echo '#ifdef __cplusplus' >>confdefs.h
3043   echo $ac_declaration      >>confdefs.h
3044   echo '#endif'             >>confdefs.h
3045 fi
3046
3047 ac_ext=c
3048 ac_cpp='$CPP $CPPFLAGS'
3049 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3050 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3051 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3052 ac_main_return=return
3053
3054                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3055         if test "$CXX" = "g++" ; then
3056                 # Extract the first word of "g++", so it can be a program name with args.
3057 set dummy g++; ac_word=$2
3058 echo "$as_me:3058: checking for $ac_word" >&5
3059 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3060 if test "${ac_cv_path_CXX+set}" = set; then
3061   echo $ECHO_N "(cached) $ECHO_C" >&6
3062 else
3063   case $CXX in
3064   [\\/]* | ?:[\\/]*)
3065   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3066   ;;
3067   *)
3068   ac_save_IFS=$IFS; IFS=$ac_path_separator
3069 ac_dummy="$PATH"
3070 for ac_dir in $ac_dummy; do
3071   IFS=$ac_save_IFS
3072   test -z "$ac_dir" && ac_dir=.
3073   if $as_executable_p "$ac_dir/$ac_word"; then
3074    ac_cv_path_CXX="$ac_dir/$ac_word"
3075    echo "$as_me:3075: found $ac_dir/$ac_word" >&5
3076    break
3077 fi
3078 done
3079
3080   ;;
3081 esac
3082 fi
3083 CXX=$ac_cv_path_CXX
3084
3085 if test -n "$CXX"; then
3086   echo "$as_me:3086: result: $CXX" >&5
3087 echo "${ECHO_T}$CXX" >&6
3088 else
3089   echo "$as_me:3089: result: no" >&5
3090 echo "${ECHO_T}no" >&6
3091 fi
3092
3093         fi
3094         if test "$CXX" = "g++" ; then
3095                 { echo "$as_me:3095: WARNING: ignoring hardcoded g++" >&5
3096 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3097                 cf_with_cxx=no; CXX=""; GXX="";
3098         fi
3099 fi
3100
3101 GXX_VERSION=none
3102 if test "$GXX" = yes; then
3103         echo "$as_me:3103: checking version of g++" >&5
3104 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3105         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3106         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3107         echo "$as_me:3107: result: $GXX_VERSION" >&5
3108 echo "${ECHO_T}$GXX_VERSION" >&6
3109 fi
3110
3111 case $GXX_VERSION in
3112 1*|2.[0-6]*)
3113         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3114         # cf_cxx_library=no
3115         { echo "$as_me:3115: WARNING: templates do not work" >&5
3116 echo "$as_me: WARNING: templates do not work" >&2;}
3117         ;;
3118 esac
3119
3120 echo "$as_me:3120: checking if you want to build C++ binding and demo" >&5
3121 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3122
3123 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3124 if test "${with_cxx_binding+set}" = set; then
3125   withval="$with_cxx_binding"
3126   cf_with_cxx_binding=$withval
3127 else
3128   cf_with_cxx_binding=$cf_with_cxx
3129 fi;
3130 echo "$as_me:3130: result: $cf_with_cxx_binding" >&5
3131 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3132
3133 echo "$as_me:3133: checking if you want to build with Ada95" >&5
3134 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3135
3136 # Check whether --with-ada or --without-ada was given.
3137 if test "${with_ada+set}" = set; then
3138   withval="$with_ada"
3139   cf_with_ada=$withval
3140 else
3141   cf_with_ada=yes
3142 fi;
3143 echo "$as_me:3143: result: $cf_with_ada" >&5
3144 echo "${ECHO_T}$cf_with_ada" >&6
3145
3146 echo "$as_me:3146: checking if you want to install manpages" >&5
3147 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3148
3149 # Check whether --with-manpages or --without-manpages was given.
3150 if test "${with_manpages+set}" = set; then
3151   withval="$with_manpages"
3152   cf_with_manpages=$withval
3153 else
3154   cf_with_manpages=yes
3155 fi;
3156 echo "$as_me:3156: result: $cf_with_manpages" >&5
3157 echo "${ECHO_T}$cf_with_manpages" >&6
3158
3159 echo "$as_me:3159: checking if you want to build programs such as tic" >&5
3160 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3161
3162 # Check whether --with-progs or --without-progs was given.
3163 if test "${with_progs+set}" = set; then
3164   withval="$with_progs"
3165   cf_with_progs=$withval
3166 else
3167   cf_with_progs=yes
3168 fi;
3169 echo "$as_me:3169: result: $cf_with_progs" >&5
3170 echo "${ECHO_T}$cf_with_progs" >&6
3171
3172 echo "$as_me:3172: checking if you wish to install curses.h" >&5
3173 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3174
3175 # Check whether --with-curses-h or --without-curses-h was given.
3176 if test "${with_curses_h+set}" = set; then
3177   withval="$with_curses_h"
3178   with_curses_h=$withval
3179 else
3180   with_curses_h=yes
3181 fi;
3182 echo "$as_me:3182: result: $with_curses_h" >&5
3183 echo "${ECHO_T}$with_curses_h" >&6
3184
3185 modules_to_build="ncurses"
3186 if test "X$cf_with_progs" != Xno ; then
3187 modules_to_build="$modules_to_build progs tack"
3188 fi
3189 modules_to_build="$modules_to_build panel menu form"
3190
3191 test "$program_prefix" != NONE &&
3192   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3193 # Use a double $ so make ignores it.
3194 test "$program_suffix" != NONE &&
3195   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3196 # Double any \ or $.  echo might interpret backslashes.
3197 # By default was `s,x,x', remove it if useless.
3198 cat <<\_ACEOF >conftest.sed
3199 s/[\\$]/&&/g;s/;s,x,x,$//
3200 _ACEOF
3201 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3202 rm conftest.sed
3203
3204 for ac_prog in mawk gawk nawk awk
3205 do
3206   # Extract the first word of "$ac_prog", so it can be a program name with args.
3207 set dummy $ac_prog; ac_word=$2
3208 echo "$as_me:3208: checking for $ac_word" >&5
3209 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3210 if test "${ac_cv_prog_AWK+set}" = set; then
3211   echo $ECHO_N "(cached) $ECHO_C" >&6
3212 else
3213   if test -n "$AWK"; then
3214   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3215 else
3216   ac_save_IFS=$IFS; IFS=$ac_path_separator
3217 ac_dummy="$PATH"
3218 for ac_dir in $ac_dummy; do
3219   IFS=$ac_save_IFS
3220   test -z "$ac_dir" && ac_dir=.
3221   $as_executable_p "$ac_dir/$ac_word" || continue
3222 ac_cv_prog_AWK="$ac_prog"
3223 echo "$as_me:3223: found $ac_dir/$ac_word" >&5
3224 break
3225 done
3226
3227 fi
3228 fi
3229 AWK=$ac_cv_prog_AWK
3230 if test -n "$AWK"; then
3231   echo "$as_me:3231: result: $AWK" >&5
3232 echo "${ECHO_T}$AWK" >&6
3233 else
3234   echo "$as_me:3234: result: no" >&5
3235 echo "${ECHO_T}no" >&6
3236 fi
3237
3238   test -n "$AWK" && break
3239 done
3240
3241 test -z "$AWK" && { { echo "$as_me:3241: error: No awk program found" >&5
3242 echo "$as_me: error: No awk program found" >&2;}
3243    { (exit 1); exit 1; }; }
3244
3245 echo "$as_me:3245: checking for egrep" >&5
3246 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3247 if test "${ac_cv_prog_egrep+set}" = set; then
3248   echo $ECHO_N "(cached) $ECHO_C" >&6
3249 else
3250   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3251     then ac_cv_prog_egrep='grep -E'
3252     else ac_cv_prog_egrep='egrep'
3253     fi
3254 fi
3255 echo "$as_me:3255: result: $ac_cv_prog_egrep" >&5
3256 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3257  EGREP=$ac_cv_prog_egrep
3258
3259 test -z "$EGREP" && { { echo "$as_me:3259: error: No egrep program found" >&5
3260 echo "$as_me: error: No egrep program found" >&2;}
3261    { (exit 1); exit 1; }; }
3262
3263 # Find a good install program.  We prefer a C program (faster),
3264 # so one script is as good as another.  But avoid the broken or
3265 # incompatible versions:
3266 # SysV /etc/install, /usr/sbin/install
3267 # SunOS /usr/etc/install
3268 # IRIX /sbin/install
3269 # AIX /bin/install
3270 # AmigaOS /C/install, which installs bootblocks on floppy discs
3271 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3272 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3273 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3274 # ./install, which can be erroneously created by make from ./install.sh.
3275 echo "$as_me:3275: checking for a BSD compatible install" >&5
3276 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3277 if test -z "$INSTALL"; then
3278 if test "${ac_cv_path_install+set}" = set; then
3279   echo $ECHO_N "(cached) $ECHO_C" >&6
3280 else
3281     ac_save_IFS=$IFS; IFS=$ac_path_separator
3282   for ac_dir in $PATH; do
3283     IFS=$ac_save_IFS
3284     # Account for people who put trailing slashes in PATH elements.
3285     case $ac_dir/ in
3286     / | ./ | .// | /cC/* \
3287     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3288     | /usr/ucb/* ) ;;
3289     *)
3290       # OSF1 and SCO ODT 3.0 have their own names for install.
3291       # Don't use installbsd from OSF since it installs stuff as root
3292       # by default.
3293       for ac_prog in ginstall scoinst install; do
3294         if $as_executable_p "$ac_dir/$ac_prog"; then
3295           if test $ac_prog = install &&
3296             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3297             # AIX install.  It has an incompatible calling convention.
3298             :
3299           elif test $ac_prog = install &&
3300             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3301             # program-specific install script used by HP pwplus--don't use.
3302             :
3303           else
3304             ac_cv_path_install="$ac_dir/$ac_prog -c"
3305             break 2
3306           fi
3307         fi
3308       done
3309       ;;
3310     esac
3311   done
3312
3313 fi
3314   if test "${ac_cv_path_install+set}" = set; then
3315     INSTALL=$ac_cv_path_install
3316   else
3317     # As a last resort, use the slow shell script.  We don't cache a
3318     # path for INSTALL within a source directory, because that will
3319     # break other packages using the cache if that directory is
3320     # removed, or if the path is relative.
3321     INSTALL=$ac_install_sh
3322   fi
3323 fi
3324 echo "$as_me:3324: result: $INSTALL" >&5
3325 echo "${ECHO_T}$INSTALL" >&6
3326
3327 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3328 # It thinks the first close brace ends the variable substitution.
3329 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3330
3331 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3332
3333 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3334
3335 case $INSTALL in
3336 /*)
3337   ;;
3338 *)
3339   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3340   test -z "$cf_dir" && cf_dir=.
3341   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3342   ;;
3343 esac
3344
3345 for ac_prog in tdlint lint alint splint lclint
3346 do
3347   # Extract the first word of "$ac_prog", so it can be a program name with args.
3348 set dummy $ac_prog; ac_word=$2
3349 echo "$as_me:3349: checking for $ac_word" >&5
3350 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3351 if test "${ac_cv_prog_LINT+set}" = set; then
3352   echo $ECHO_N "(cached) $ECHO_C" >&6
3353 else
3354   if test -n "$LINT"; then
3355   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3356 else
3357   ac_save_IFS=$IFS; IFS=$ac_path_separator
3358 ac_dummy="$PATH"
3359 for ac_dir in $ac_dummy; do
3360   IFS=$ac_save_IFS
3361   test -z "$ac_dir" && ac_dir=.
3362   $as_executable_p "$ac_dir/$ac_word" || continue
3363 ac_cv_prog_LINT="$ac_prog"
3364 echo "$as_me:3364: found $ac_dir/$ac_word" >&5
3365 break
3366 done
3367
3368 fi
3369 fi
3370 LINT=$ac_cv_prog_LINT
3371 if test -n "$LINT"; then
3372   echo "$as_me:3372: result: $LINT" >&5
3373 echo "${ECHO_T}$LINT" >&6
3374 else
3375   echo "$as_me:3375: result: no" >&5
3376 echo "${ECHO_T}no" >&6
3377 fi
3378
3379   test -n "$LINT" && break
3380 done
3381
3382 echo "$as_me:3382: checking whether ln -s works" >&5
3383 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3384 LN_S=$as_ln_s
3385 if test "$LN_S" = "ln -s"; then
3386   echo "$as_me:3386: result: yes" >&5
3387 echo "${ECHO_T}yes" >&6
3388 else
3389   echo "$as_me:3389: result: no, using $LN_S" >&5
3390 echo "${ECHO_T}no, using $LN_S" >&6
3391 fi
3392
3393 echo "$as_me:3393: checking for long file names" >&5
3394 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3395 if test "${ac_cv_sys_long_file_names+set}" = set; then
3396   echo $ECHO_N "(cached) $ECHO_C" >&6
3397 else
3398   ac_cv_sys_long_file_names=yes
3399 # Test for long file names in all the places we know might matter:
3400 #      .                the current directory, where building will happen
3401 #      $prefix/lib      where we will be installing things
3402 #      $exec_prefix/lib likewise
3403 # eval it to expand exec_prefix.
3404 #      $TMPDIR          if set, where it might want to write temporary files
3405 # if $TMPDIR is not set:
3406 #      /tmp             where it might want to write temporary files
3407 #      /var/tmp         likewise
3408 #      /usr/tmp         likewise
3409 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3410   ac_tmpdirs=$TMPDIR
3411 else
3412   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3413 fi
3414 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3415   test -d $ac_dir || continue
3416   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3417   ac_xdir=$ac_dir/cf$$
3418   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3419   ac_tf1=$ac_xdir/conftest9012345
3420   ac_tf2=$ac_xdir/conftest9012346
3421   (echo 1 >$ac_tf1) 2>/dev/null
3422   (echo 2 >$ac_tf2) 2>/dev/null
3423   ac_val=`cat $ac_tf1 2>/dev/null`
3424   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3425     ac_cv_sys_long_file_names=no
3426     rm -rf $ac_xdir 2>/dev/null
3427     break
3428   fi
3429   rm -rf $ac_xdir 2>/dev/null
3430 done
3431 fi
3432 echo "$as_me:3432: result: $ac_cv_sys_long_file_names" >&5
3433 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3434 if test $ac_cv_sys_long_file_names = yes; then
3435
3436 cat >>confdefs.h <<\EOF
3437 #define HAVE_LONG_FILE_NAMES 1
3438 EOF
3439
3440 fi
3441
3442 # if we find pkg-config, check if we should install the ".pc" files.
3443
3444 echo "$as_me:3444: checking if you want to use pkg-config" >&5
3445 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3446
3447 # Check whether --with-pkg-config or --without-pkg-config was given.
3448 if test "${with_pkg_config+set}" = set; then
3449   withval="$with_pkg_config"
3450   cf_pkg_config=$withval
3451 else
3452   cf_pkg_config=yes
3453 fi;
3454 echo "$as_me:3454: result: $cf_pkg_config" >&5
3455 echo "${ECHO_T}$cf_pkg_config" >&6
3456
3457 case $cf_pkg_config in #(vi
3458 no) #(vi
3459         PKG_CONFIG=none
3460         ;;
3461 yes) #(vi
3462         # Extract the first word of "pkg-config", so it can be a program name with args.
3463 set dummy pkg-config; ac_word=$2
3464 echo "$as_me:3464: checking for $ac_word" >&5
3465 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3466 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3467   echo $ECHO_N "(cached) $ECHO_C" >&6
3468 else
3469   case $PKG_CONFIG in
3470   [\\/]* | ?:[\\/]*)
3471   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3472   ;;
3473   *)
3474   ac_save_IFS=$IFS; IFS=$ac_path_separator
3475 ac_dummy="$PATH"
3476 for ac_dir in $ac_dummy; do
3477   IFS=$ac_save_IFS
3478   test -z "$ac_dir" && ac_dir=.
3479   if $as_executable_p "$ac_dir/$ac_word"; then
3480    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3481    echo "$as_me:3481: found $ac_dir/$ac_word" >&5
3482    break
3483 fi
3484 done
3485
3486   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
3487   ;;
3488 esac
3489 fi
3490 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3491
3492 if test -n "$PKG_CONFIG"; then
3493   echo "$as_me:3493: result: $PKG_CONFIG" >&5
3494 echo "${ECHO_T}$PKG_CONFIG" >&6
3495 else
3496   echo "$as_me:3496: result: no" >&5
3497 echo "${ECHO_T}no" >&6
3498 fi
3499
3500         ;;
3501 *)
3502         PKG_CONFIG=$withval
3503         ;;
3504 esac
3505
3506 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3507 if test "$PKG_CONFIG" != none ; then
3508
3509 if test "x$prefix" != xNONE; then
3510   cf_path_syntax="$prefix"
3511 else
3512   cf_path_syntax="$ac_default_prefix"
3513 fi
3514
3515 case ".$PKG_CONFIG" in #(vi
3516 .\$\(*\)*|.\'*\'*) #(vi
3517   ;;
3518 ..|./*|.\\*) #(vi
3519   ;;
3520 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3521   ;;
3522 .\${*prefix}*) #(vi
3523   eval PKG_CONFIG="$PKG_CONFIG"
3524   case ".$PKG_CONFIG" in #(vi
3525   .NONE/*)
3526     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3527     ;;
3528   esac
3529   ;; #(vi
3530 .no|.NONE/*)
3531   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3532   ;;
3533 *)
3534   { { echo "$as_me:3534: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3535 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3536    { (exit 1); exit 1; }; }
3537   ;;
3538 esac
3539
3540 fi
3541
3542 if test "$PKG_CONFIG" != no ; then
3543         echo "$as_me:3543: checking if we should install .pc files for $PKG_CONFIG" >&5
3544 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3545
3546         # Leave this as something that can be overridden in the environment.
3547         if test -z "$PKG_CONFIG_LIBDIR" ; then
3548                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
3549         fi
3550         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
3551         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3552
3553 # Check whether --enable-pc-files or --disable-pc-files was given.
3554 if test "${enable_pc_files+set}" = set; then
3555   enableval="$enable_pc_files"
3556   enable_pc_files=$enableval
3557 else
3558   enable_pc_files=no
3559 fi;
3560                 echo "$as_me:3560: result: $enable_pc_files" >&5
3561 echo "${ECHO_T}$enable_pc_files" >&6
3562         else
3563                 echo "$as_me:3563: result: no" >&5
3564 echo "${ECHO_T}no" >&6
3565                 { echo "$as_me:3565: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3566 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3567                 enable_pc_files=no
3568         fi
3569 fi
3570
3571 echo "$as_me:3571: checking if we should assume mixed-case filenames" >&5
3572 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3573
3574 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3575 if test "${enable_mixed_case+set}" = set; then
3576   enableval="$enable_mixed_case"
3577   enable_mixedcase=$enableval
3578 else
3579   enable_mixedcase=auto
3580 fi;
3581 echo "$as_me:3581: result: $enable_mixedcase" >&5
3582 echo "${ECHO_T}$enable_mixedcase" >&6
3583 if test "$enable_mixedcase" = "auto" ; then
3584
3585 echo "$as_me:3585: checking if filesystem supports mixed-case filenames" >&5
3586 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3587 if test "${cf_cv_mixedcase+set}" = set; then
3588   echo $ECHO_N "(cached) $ECHO_C" >&6
3589 else
3590
3591 if test "$cross_compiling" = yes ; then
3592         case $target_alias in #(vi
3593         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3594                 cf_cv_mixedcase=no
3595                 ;;
3596         *)
3597                 cf_cv_mixedcase=yes
3598                 ;;
3599         esac
3600 else
3601         rm -f conftest CONFTEST
3602         echo test >conftest
3603         if test -f CONFTEST ; then
3604                 cf_cv_mixedcase=no
3605         else
3606                 cf_cv_mixedcase=yes
3607         fi
3608         rm -f conftest CONFTEST
3609 fi
3610
3611 fi
3612 echo "$as_me:3612: result: $cf_cv_mixedcase" >&5
3613 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3614 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3615 #define MIXEDCASE_FILENAMES 1
3616 EOF
3617
3618 else
3619     cf_cv_mixedcase=$enable_mixedcase
3620     if test "$enable_mixedcase" = "yes" ; then
3621         cat >>confdefs.h <<\EOF
3622 #define MIXEDCASE_FILENAMES 1
3623 EOF
3624
3625     fi
3626 fi
3627
3628 # do this after mixed-case option (tags/TAGS is not as important as tic).
3629 echo "$as_me:3629: checking whether ${MAKE-make} sets \${MAKE}" >&5
3630 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3631 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3632 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3633   echo $ECHO_N "(cached) $ECHO_C" >&6
3634 else
3635   cat >conftest.make <<\EOF
3636 all:
3637         @echo 'ac_maketemp="${MAKE}"'
3638 EOF
3639 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3640 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3641 if test -n "$ac_maketemp"; then
3642   eval ac_cv_prog_make_${ac_make}_set=yes
3643 else
3644   eval ac_cv_prog_make_${ac_make}_set=no
3645 fi
3646 rm -f conftest.make
3647 fi
3648 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3649   echo "$as_me:3649: result: yes" >&5
3650 echo "${ECHO_T}yes" >&6
3651   SET_MAKE=
3652 else
3653   echo "$as_me:3653: result: no" >&5
3654 echo "${ECHO_T}no" >&6
3655   SET_MAKE="MAKE=${MAKE-make}"
3656 fi
3657
3658 for ac_prog in exctags ctags
3659 do
3660   # Extract the first word of "$ac_prog", so it can be a program name with args.
3661 set dummy $ac_prog; ac_word=$2
3662 echo "$as_me:3662: checking for $ac_word" >&5
3663 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3664 if test "${ac_cv_prog_CTAGS+set}" = set; then
3665   echo $ECHO_N "(cached) $ECHO_C" >&6
3666 else
3667   if test -n "$CTAGS"; then
3668   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3669 else
3670   ac_save_IFS=$IFS; IFS=$ac_path_separator
3671 ac_dummy="$PATH"
3672 for ac_dir in $ac_dummy; do
3673   IFS=$ac_save_IFS
3674   test -z "$ac_dir" && ac_dir=.
3675   $as_executable_p "$ac_dir/$ac_word" || continue
3676 ac_cv_prog_CTAGS="$ac_prog"
3677 echo "$as_me:3677: found $ac_dir/$ac_word" >&5
3678 break
3679 done
3680
3681 fi
3682 fi
3683 CTAGS=$ac_cv_prog_CTAGS
3684 if test -n "$CTAGS"; then
3685   echo "$as_me:3685: result: $CTAGS" >&5
3686 echo "${ECHO_T}$CTAGS" >&6
3687 else
3688   echo "$as_me:3688: result: no" >&5
3689 echo "${ECHO_T}no" >&6
3690 fi
3691
3692   test -n "$CTAGS" && break
3693 done
3694
3695 for ac_prog in exetags etags
3696 do
3697   # Extract the first word of "$ac_prog", so it can be a program name with args.
3698 set dummy $ac_prog; ac_word=$2
3699 echo "$as_me:3699: checking for $ac_word" >&5
3700 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3701 if test "${ac_cv_prog_ETAGS+set}" = set; then
3702   echo $ECHO_N "(cached) $ECHO_C" >&6
3703 else
3704   if test -n "$ETAGS"; then
3705   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3706 else
3707   ac_save_IFS=$IFS; IFS=$ac_path_separator
3708 ac_dummy="$PATH"
3709 for ac_dir in $ac_dummy; do
3710   IFS=$ac_save_IFS
3711   test -z "$ac_dir" && ac_dir=.
3712   $as_executable_p "$ac_dir/$ac_word" || continue
3713 ac_cv_prog_ETAGS="$ac_prog"
3714 echo "$as_me:3714: found $ac_dir/$ac_word" >&5
3715 break
3716 done
3717
3718 fi
3719 fi
3720 ETAGS=$ac_cv_prog_ETAGS
3721 if test -n "$ETAGS"; then
3722   echo "$as_me:3722: result: $ETAGS" >&5
3723 echo "${ECHO_T}$ETAGS" >&6
3724 else
3725   echo "$as_me:3725: result: no" >&5
3726 echo "${ECHO_T}no" >&6
3727 fi
3728
3729   test -n "$ETAGS" && break
3730 done
3731
3732 # Extract the first word of "${CTAGS-ctags}", so it can be a program name with args.
3733 set dummy ${CTAGS-ctags}; ac_word=$2
3734 echo "$as_me:3734: checking for $ac_word" >&5
3735 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3736 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3737   echo $ECHO_N "(cached) $ECHO_C" >&6
3738 else
3739   if test -n "$MAKE_LOWER_TAGS"; then
3740   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3741 else
3742   ac_save_IFS=$IFS; IFS=$ac_path_separator
3743 ac_dummy="$PATH"
3744 for ac_dir in $ac_dummy; do
3745   IFS=$ac_save_IFS
3746   test -z "$ac_dir" && ac_dir=.
3747   $as_executable_p "$ac_dir/$ac_word" || continue
3748 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3749 echo "$as_me:3749: found $ac_dir/$ac_word" >&5
3750 break
3751 done
3752
3753   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3754 fi
3755 fi
3756 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3757 if test -n "$MAKE_LOWER_TAGS"; then
3758   echo "$as_me:3758: result: $MAKE_LOWER_TAGS" >&5
3759 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3760 else
3761   echo "$as_me:3761: result: no" >&5
3762 echo "${ECHO_T}no" >&6
3763 fi
3764
3765 if test "$cf_cv_mixedcase" = yes ; then
3766         # Extract the first word of "${ETAGS-etags}", so it can be a program name with args.
3767 set dummy ${ETAGS-etags}; ac_word=$2
3768 echo "$as_me:3768: checking for $ac_word" >&5
3769 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3770 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3771   echo $ECHO_N "(cached) $ECHO_C" >&6
3772 else
3773   if test -n "$MAKE_UPPER_TAGS"; then
3774   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3775 else
3776   ac_save_IFS=$IFS; IFS=$ac_path_separator
3777 ac_dummy="$PATH"
3778 for ac_dir in $ac_dummy; do
3779   IFS=$ac_save_IFS
3780   test -z "$ac_dir" && ac_dir=.
3781   $as_executable_p "$ac_dir/$ac_word" || continue
3782 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3783 echo "$as_me:3783: found $ac_dir/$ac_word" >&5
3784 break
3785 done
3786
3787   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3788 fi
3789 fi
3790 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3791 if test -n "$MAKE_UPPER_TAGS"; then
3792   echo "$as_me:3792: result: $MAKE_UPPER_TAGS" >&5
3793 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3794 else
3795   echo "$as_me:3795: result: no" >&5
3796 echo "${ECHO_T}no" >&6
3797 fi
3798
3799 else
3800         MAKE_UPPER_TAGS=no
3801 fi
3802
3803 if test "$MAKE_UPPER_TAGS" = yes ; then
3804         MAKE_UPPER_TAGS=
3805 else
3806         MAKE_UPPER_TAGS="#"
3807 fi
3808
3809 if test "$MAKE_LOWER_TAGS" = yes ; then
3810         MAKE_LOWER_TAGS=
3811 else
3812         MAKE_LOWER_TAGS="#"
3813 fi
3814
3815 echo "$as_me:3815: checking for makeflags variable" >&5
3816 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3817 if test "${cf_cv_makeflags+set}" = set; then
3818   echo $ECHO_N "(cached) $ECHO_C" >&6
3819 else
3820
3821         cf_cv_makeflags=''
3822         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3823         do
3824                 cat >cf_makeflags.tmp <<CF_EOF
3825 SHELL = /bin/sh
3826 all :
3827         @ echo '.$cf_option'
3828 CF_EOF
3829                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3830                 case "$cf_result" in
3831                 .*k)
3832                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3833                         case "$cf_result" in
3834                         .*CC=*) cf_cv_makeflags=
3835                                 ;;
3836                         *)      cf_cv_makeflags=$cf_option
3837                                 ;;
3838                         esac
3839                         break
3840                         ;;
3841                 .-)     ;;
3842                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3843                         ;;
3844                 esac
3845         done
3846         rm -f cf_makeflags.tmp
3847
3848 fi
3849 echo "$as_me:3849: result: $cf_cv_makeflags" >&5
3850 echo "${ECHO_T}$cf_cv_makeflags" >&6
3851
3852 if test -n "$ac_tool_prefix"; then
3853   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3854 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3855 echo "$as_me:3855: checking for $ac_word" >&5
3856 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3857 if test "${ac_cv_prog_RANLIB+set}" = set; then
3858   echo $ECHO_N "(cached) $ECHO_C" >&6
3859 else
3860   if test -n "$RANLIB"; then
3861   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3862 else
3863   ac_save_IFS=$IFS; IFS=$ac_path_separator
3864 ac_dummy="$PATH"
3865 for ac_dir in $ac_dummy; do
3866   IFS=$ac_save_IFS
3867   test -z "$ac_dir" && ac_dir=.
3868   $as_executable_p "$ac_dir/$ac_word" || continue
3869 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3870 echo "$as_me:3870: found $ac_dir/$ac_word" >&5
3871 break
3872 done
3873
3874 fi
3875 fi
3876 RANLIB=$ac_cv_prog_RANLIB
3877 if test -n "$RANLIB"; then
3878   echo "$as_me:3878: result: $RANLIB" >&5
3879 echo "${ECHO_T}$RANLIB" >&6
3880 else
3881   echo "$as_me:3881: result: no" >&5
3882 echo "${ECHO_T}no" >&6
3883 fi
3884
3885 fi
3886 if test -z "$ac_cv_prog_RANLIB"; then
3887   ac_ct_RANLIB=$RANLIB
3888   # Extract the first word of "ranlib", so it can be a program name with args.
3889 set dummy ranlib; ac_word=$2
3890 echo "$as_me:3890: checking for $ac_word" >&5
3891 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3892 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3893   echo $ECHO_N "(cached) $ECHO_C" >&6
3894 else
3895   if test -n "$ac_ct_RANLIB"; then
3896   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3897 else
3898   ac_save_IFS=$IFS; IFS=$ac_path_separator
3899 ac_dummy="$PATH"
3900 for ac_dir in $ac_dummy; do
3901   IFS=$ac_save_IFS
3902   test -z "$ac_dir" && ac_dir=.
3903   $as_executable_p "$ac_dir/$ac_word" || continue
3904 ac_cv_prog_ac_ct_RANLIB="ranlib"
3905 echo "$as_me:3905: found $ac_dir/$ac_word" >&5
3906 break
3907 done
3908
3909   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3910 fi
3911 fi
3912 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3913 if test -n "$ac_ct_RANLIB"; then
3914   echo "$as_me:3914: result: $ac_ct_RANLIB" >&5
3915 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3916 else
3917   echo "$as_me:3917: result: no" >&5
3918 echo "${ECHO_T}no" >&6
3919 fi
3920
3921   RANLIB=$ac_ct_RANLIB
3922 else
3923   RANLIB="$ac_cv_prog_RANLIB"
3924 fi
3925
3926 if test -n "$ac_tool_prefix"; then
3927   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3928 set dummy ${ac_tool_prefix}ld; ac_word=$2
3929 echo "$as_me:3929: checking for $ac_word" >&5
3930 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3931 if test "${ac_cv_prog_LD+set}" = set; then
3932   echo $ECHO_N "(cached) $ECHO_C" >&6
3933 else
3934   if test -n "$LD"; then
3935   ac_cv_prog_LD="$LD" # Let the user override the test.
3936 else
3937   ac_save_IFS=$IFS; IFS=$ac_path_separator
3938 ac_dummy="$PATH"
3939 for ac_dir in $ac_dummy; do
3940   IFS=$ac_save_IFS
3941   test -z "$ac_dir" && ac_dir=.
3942   $as_executable_p "$ac_dir/$ac_word" || continue
3943 ac_cv_prog_LD="${ac_tool_prefix}ld"
3944 echo "$as_me:3944: found $ac_dir/$ac_word" >&5
3945 break
3946 done
3947
3948 fi
3949 fi
3950 LD=$ac_cv_prog_LD
3951 if test -n "$LD"; then
3952   echo "$as_me:3952: result: $LD" >&5
3953 echo "${ECHO_T}$LD" >&6
3954 else
3955   echo "$as_me:3955: result: no" >&5
3956 echo "${ECHO_T}no" >&6
3957 fi
3958
3959 fi
3960 if test -z "$ac_cv_prog_LD"; then
3961   ac_ct_LD=$LD
3962   # Extract the first word of "ld", so it can be a program name with args.
3963 set dummy ld; ac_word=$2
3964 echo "$as_me:3964: checking for $ac_word" >&5
3965 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3966 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3967   echo $ECHO_N "(cached) $ECHO_C" >&6
3968 else
3969   if test -n "$ac_ct_LD"; then
3970   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3971 else
3972   ac_save_IFS=$IFS; IFS=$ac_path_separator
3973 ac_dummy="$PATH"
3974 for ac_dir in $ac_dummy; do
3975   IFS=$ac_save_IFS
3976   test -z "$ac_dir" && ac_dir=.
3977   $as_executable_p "$ac_dir/$ac_word" || continue
3978 ac_cv_prog_ac_ct_LD="ld"
3979 echo "$as_me:3979: found $ac_dir/$ac_word" >&5
3980 break
3981 done
3982
3983   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3984 fi
3985 fi
3986 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3987 if test -n "$ac_ct_LD"; then
3988   echo "$as_me:3988: result: $ac_ct_LD" >&5
3989 echo "${ECHO_T}$ac_ct_LD" >&6
3990 else
3991   echo "$as_me:3991: result: no" >&5
3992 echo "${ECHO_T}no" >&6
3993 fi
3994
3995   LD=$ac_ct_LD
3996 else
3997   LD="$ac_cv_prog_LD"
3998 fi
3999
4000 if test -n "$ac_tool_prefix"; then
4001   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4002 set dummy ${ac_tool_prefix}ar; ac_word=$2
4003 echo "$as_me:4003: checking for $ac_word" >&5
4004 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4005 if test "${ac_cv_prog_AR+set}" = set; then
4006   echo $ECHO_N "(cached) $ECHO_C" >&6
4007 else
4008   if test -n "$AR"; then
4009   ac_cv_prog_AR="$AR" # Let the user override the test.
4010 else
4011   ac_save_IFS=$IFS; IFS=$ac_path_separator
4012 ac_dummy="$PATH"
4013 for ac_dir in $ac_dummy; do
4014   IFS=$ac_save_IFS
4015   test -z "$ac_dir" && ac_dir=.
4016   $as_executable_p "$ac_dir/$ac_word" || continue
4017 ac_cv_prog_AR="${ac_tool_prefix}ar"
4018 echo "$as_me:4018: found $ac_dir/$ac_word" >&5
4019 break
4020 done
4021
4022 fi
4023 fi
4024 AR=$ac_cv_prog_AR
4025 if test -n "$AR"; then
4026   echo "$as_me:4026: result: $AR" >&5
4027 echo "${ECHO_T}$AR" >&6
4028 else
4029   echo "$as_me:4029: result: no" >&5
4030 echo "${ECHO_T}no" >&6
4031 fi
4032
4033 fi
4034 if test -z "$ac_cv_prog_AR"; then
4035   ac_ct_AR=$AR
4036   # Extract the first word of "ar", so it can be a program name with args.
4037 set dummy ar; ac_word=$2
4038 echo "$as_me:4038: checking for $ac_word" >&5
4039 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4040 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4041   echo $ECHO_N "(cached) $ECHO_C" >&6
4042 else
4043   if test -n "$ac_ct_AR"; then
4044   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4045 else
4046   ac_save_IFS=$IFS; IFS=$ac_path_separator
4047 ac_dummy="$PATH"
4048 for ac_dir in $ac_dummy; do
4049   IFS=$ac_save_IFS
4050   test -z "$ac_dir" && ac_dir=.
4051   $as_executable_p "$ac_dir/$ac_word" || continue
4052 ac_cv_prog_ac_ct_AR="ar"
4053 echo "$as_me:4053: found $ac_dir/$ac_word" >&5
4054 break
4055 done
4056
4057   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4058 fi
4059 fi
4060 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4061 if test -n "$ac_ct_AR"; then
4062   echo "$as_me:4062: result: $ac_ct_AR" >&5
4063 echo "${ECHO_T}$ac_ct_AR" >&6
4064 else
4065   echo "$as_me:4065: result: no" >&5
4066 echo "${ECHO_T}no" >&6
4067 fi
4068
4069   AR=$ac_ct_AR
4070 else
4071   AR="$ac_cv_prog_AR"
4072 fi
4073
4074 if test -n "$ac_tool_prefix"; then
4075   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4076 set dummy ${ac_tool_prefix}ar; ac_word=$2
4077 echo "$as_me:4077: checking for $ac_word" >&5
4078 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4079 if test "${ac_cv_prog_AR+set}" = set; then
4080   echo $ECHO_N "(cached) $ECHO_C" >&6
4081 else
4082   if test -n "$AR"; then
4083   ac_cv_prog_AR="$AR" # Let the user override the test.
4084 else
4085   ac_save_IFS=$IFS; IFS=$ac_path_separator
4086 ac_dummy="$PATH"
4087 for ac_dir in $ac_dummy; do
4088   IFS=$ac_save_IFS
4089   test -z "$ac_dir" && ac_dir=.
4090   $as_executable_p "$ac_dir/$ac_word" || continue
4091 ac_cv_prog_AR="${ac_tool_prefix}ar"
4092 echo "$as_me:4092: found $ac_dir/$ac_word" >&5
4093 break
4094 done
4095
4096 fi
4097 fi
4098 AR=$ac_cv_prog_AR
4099 if test -n "$AR"; then
4100   echo "$as_me:4100: result: $AR" >&5
4101 echo "${ECHO_T}$AR" >&6
4102 else
4103   echo "$as_me:4103: result: no" >&5
4104 echo "${ECHO_T}no" >&6
4105 fi
4106
4107 fi
4108 if test -z "$ac_cv_prog_AR"; then
4109   ac_ct_AR=$AR
4110   # Extract the first word of "ar", so it can be a program name with args.
4111 set dummy ar; ac_word=$2
4112 echo "$as_me:4112: checking for $ac_word" >&5
4113 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4114 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4115   echo $ECHO_N "(cached) $ECHO_C" >&6
4116 else
4117   if test -n "$ac_ct_AR"; then
4118   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4119 else
4120   ac_save_IFS=$IFS; IFS=$ac_path_separator
4121 ac_dummy="$PATH"
4122 for ac_dir in $ac_dummy; do
4123   IFS=$ac_save_IFS
4124   test -z "$ac_dir" && ac_dir=.
4125   $as_executable_p "$ac_dir/$ac_word" || continue
4126 ac_cv_prog_ac_ct_AR="ar"
4127 echo "$as_me:4127: found $ac_dir/$ac_word" >&5
4128 break
4129 done
4130
4131   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4132 fi
4133 fi
4134 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4135 if test -n "$ac_ct_AR"; then
4136   echo "$as_me:4136: result: $ac_ct_AR" >&5
4137 echo "${ECHO_T}$ac_ct_AR" >&6
4138 else
4139   echo "$as_me:4139: result: no" >&5
4140 echo "${ECHO_T}no" >&6
4141 fi
4142
4143   AR=$ac_ct_AR
4144 else
4145   AR="$ac_cv_prog_AR"
4146 fi
4147
4148 echo "$as_me:4148: checking for options to update archives" >&5
4149 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4150 if test "${cf_cv_ar_flags+set}" = set; then
4151   echo $ECHO_N "(cached) $ECHO_C" >&6
4152 else
4153
4154         cf_cv_ar_flags=unknown
4155         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4156         do
4157
4158                 # check if $ARFLAGS already contains this choice
4159                 if test "x$ARFLAGS" != "x" ; then
4160                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4161                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4162                                 cf_cv_ar_flags=
4163                                 break
4164                         fi
4165                 fi
4166
4167                 rm -f conftest.$ac_cv_objext
4168                 rm -f conftest.a
4169
4170                 cat >conftest.$ac_ext <<EOF
4171 #line 4171 "configure"
4172 int     testdata[3] = { 123, 456, 789 };
4173 EOF
4174                 if { (eval echo "$as_me:4174: \"$ac_compile\"") >&5
4175   (eval $ac_compile) 2>&5
4176   ac_status=$?
4177   echo "$as_me:4177: \$? = $ac_status" >&5
4178   (exit $ac_status); } ; then
4179                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4180                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4181                         if test -f conftest.a ; then
4182                                 cf_cv_ar_flags=$cf_ar_flags
4183                                 break
4184                         fi
4185                 else
4186                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4187
4188 echo "${as_me-configure}:4188: testing cannot compile test-program ..." 1>&5
4189
4190                         break
4191                 fi
4192         done
4193         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4194
4195 fi
4196 echo "$as_me:4196: result: $cf_cv_ar_flags" >&5
4197 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4198
4199 if test -n "$ARFLAGS" ; then
4200         if test -n "$cf_cv_ar_flags" ; then
4201                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4202         fi
4203 else
4204         ARFLAGS=$cf_cv_ar_flags
4205 fi
4206
4207 echo "$as_me:4207: checking if you have specified an install-prefix" >&5
4208 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4209
4210 # Check whether --with-install-prefix or --without-install-prefix was given.
4211 if test "${with_install_prefix+set}" = set; then
4212   withval="$with_install_prefix"
4213   case "$withval" in #(vi
4214         yes|no) #(vi
4215                 ;;
4216         *)      DESTDIR="$withval"
4217                 ;;
4218         esac
4219 fi;
4220 echo "$as_me:4220: result: $DESTDIR" >&5
4221 echo "${ECHO_T}$DESTDIR" >&6
4222
4223 ###############################################################################
4224
4225 # If we're cross-compiling, allow the user to override the tools and their
4226 # options.  The configure script is oriented toward identifying the host
4227 # compiler, etc., but we need a build compiler to generate parts of the source.
4228
4229 if test "$cross_compiling" = yes ; then
4230
4231         # defaults that we might want to override
4232         : ${BUILD_CFLAGS:=''}
4233         : ${BUILD_CPPFLAGS:=''}
4234         : ${BUILD_LDFLAGS:=''}
4235         : ${BUILD_LIBS:=''}
4236         : ${BUILD_EXEEXT:='$x'}
4237         : ${BUILD_OBJEXT:='o'}
4238
4239 # Check whether --with-build-cc or --without-build-cc was given.
4240 if test "${with_build_cc+set}" = set; then
4241   withval="$with_build_cc"
4242   BUILD_CC="$withval"
4243 else
4244   for ac_prog in gcc cc cl
4245 do
4246   # Extract the first word of "$ac_prog", so it can be a program name with args.
4247 set dummy $ac_prog; ac_word=$2
4248 echo "$as_me:4248: checking for $ac_word" >&5
4249 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4250 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4251   echo $ECHO_N "(cached) $ECHO_C" >&6
4252 else
4253   if test -n "$BUILD_CC"; then
4254   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4255 else
4256   ac_save_IFS=$IFS; IFS=$ac_path_separator
4257 ac_dummy="$PATH"
4258 for ac_dir in $ac_dummy; do
4259   IFS=$ac_save_IFS
4260   test -z "$ac_dir" && ac_dir=.
4261   $as_executable_p "$ac_dir/$ac_word" || continue
4262 ac_cv_prog_BUILD_CC="$ac_prog"
4263 echo "$as_me:4263: found $ac_dir/$ac_word" >&5
4264 break
4265 done
4266
4267 fi
4268 fi
4269 BUILD_CC=$ac_cv_prog_BUILD_CC
4270 if test -n "$BUILD_CC"; then
4271   echo "$as_me:4271: result: $BUILD_CC" >&5
4272 echo "${ECHO_T}$BUILD_CC" >&6
4273 else
4274   echo "$as_me:4274: result: no" >&5
4275 echo "${ECHO_T}no" >&6
4276 fi
4277
4278   test -n "$BUILD_CC" && break
4279 done
4280
4281 fi;
4282         echo "$as_me:4282: checking for native build C compiler" >&5
4283 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4284         echo "$as_me:4284: result: $BUILD_CC" >&5
4285 echo "${ECHO_T}$BUILD_CC" >&6
4286
4287         echo "$as_me:4287: checking for native build C preprocessor" >&5
4288 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4289
4290 # Check whether --with-build-cpp or --without-build-cpp was given.
4291 if test "${with_build_cpp+set}" = set; then
4292   withval="$with_build_cpp"
4293   BUILD_CPP="$withval"
4294 else
4295   BUILD_CPP='${BUILD_CC} -E'
4296 fi;
4297         echo "$as_me:4297: result: $BUILD_CPP" >&5
4298 echo "${ECHO_T}$BUILD_CPP" >&6
4299
4300         echo "$as_me:4300: checking for native build C flags" >&5
4301 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4302
4303 # Check whether --with-build-cflags or --without-build-cflags was given.
4304 if test "${with_build_cflags+set}" = set; then
4305   withval="$with_build_cflags"
4306   BUILD_CFLAGS="$withval"
4307 fi;
4308         echo "$as_me:4308: result: $BUILD_CFLAGS" >&5
4309 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4310
4311         echo "$as_me:4311: checking for native build C preprocessor-flags" >&5
4312 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4313
4314 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4315 if test "${with_build_cppflags+set}" = set; then
4316   withval="$with_build_cppflags"
4317   BUILD_CPPFLAGS="$withval"
4318 fi;
4319         echo "$as_me:4319: result: $BUILD_CPPFLAGS" >&5
4320 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4321
4322         echo "$as_me:4322: checking for native build linker-flags" >&5
4323 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4324
4325 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4326 if test "${with_build_ldflags+set}" = set; then
4327   withval="$with_build_ldflags"
4328   BUILD_LDFLAGS="$withval"
4329 fi;
4330         echo "$as_me:4330: result: $BUILD_LDFLAGS" >&5
4331 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4332
4333         echo "$as_me:4333: checking for native build linker-libraries" >&5
4334 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4335
4336 # Check whether --with-build-libs or --without-build-libs was given.
4337 if test "${with_build_libs+set}" = set; then
4338   withval="$with_build_libs"
4339   BUILD_LIBS="$withval"
4340 fi;
4341         echo "$as_me:4341: result: $BUILD_LIBS" >&5
4342 echo "${ECHO_T}$BUILD_LIBS" >&6
4343
4344         # this assumes we're on Unix.
4345         BUILD_EXEEXT=
4346         BUILD_OBJEXT=o
4347
4348         : ${BUILD_CC:='${CC}'}
4349
4350         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4351                 { { echo "$as_me:4351: error: Cross-build requires two compilers.
4352 Use --with-build-cc to specify the native compiler." >&5
4353 echo "$as_me: error: Cross-build requires two compilers.
4354 Use --with-build-cc to specify the native compiler." >&2;}
4355    { (exit 1); exit 1; }; }
4356         fi
4357
4358 else
4359         : ${BUILD_CC:='${CC}'}
4360         : ${BUILD_CPP:='${CPP}'}
4361         : ${BUILD_CFLAGS:='${CFLAGS}'}
4362         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4363         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4364         : ${BUILD_LIBS:='${LIBS}'}
4365         : ${BUILD_EXEEXT:='$x'}
4366         : ${BUILD_OBJEXT:='o'}
4367 fi
4368
4369 ###############################################################################
4370
4371 ### Options to allow the user to specify the set of libraries which are used.
4372 ### Use "--without-normal --with-shared" to allow the default model to be
4373 ### shared, for example.
4374 cf_list_models=""
4375
4376 echo "$as_me:4376: checking if libtool -version-number should be used" >&5
4377 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4378
4379 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4380 if test "${enable_libtool_version+set}" = set; then
4381   enableval="$enable_libtool_version"
4382   test "$enableval" != no && enableval=yes
4383   if test "$enableval" != "yes" ; then
4384     cf_libtool_version=no
4385   else
4386     cf_libtool_version=yes
4387   fi
4388 else
4389   enableval=yes
4390   cf_libtool_version=yes
4391
4392 fi;
4393 echo "$as_me:4393: result: $cf_libtool_version" >&5
4394 echo "${ECHO_T}$cf_libtool_version" >&6
4395
4396 if test "$cf_libtool_version" = yes ; then
4397         LIBTOOL_VERSION="-version-number"
4398 else
4399         LIBTOOL_VERSION="-version-info"
4400 fi
4401
4402 LIBTOOL=
4403
4404 # common library maintenance symbols that are convenient for libtool scripts:
4405 LIB_CREATE='${AR} -cr'
4406 LIB_OBJECT='${OBJECTS}'
4407 LIB_SUFFIX=.a
4408 LIB_PREP="$RANLIB"
4409
4410 # symbols used to prop libtool up to enable it to determine what it should be
4411 # doing:
4412 LIB_CLEAN=
4413 LIB_COMPILE=
4414 LIB_LINK='${CC}'
4415 LIB_INSTALL=
4416 LIB_UNINSTALL=
4417
4418 echo "$as_me:4418: checking if you want to build libraries with libtool" >&5
4419 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4420
4421 # Check whether --with-libtool or --without-libtool was given.
4422 if test "${with_libtool+set}" = set; then
4423   withval="$with_libtool"
4424   with_libtool=$withval
4425 else
4426   with_libtool=no
4427 fi;
4428 echo "$as_me:4428: result: $with_libtool" >&5
4429 echo "${ECHO_T}$with_libtool" >&6
4430 if test "$with_libtool" != "no"; then
4431
4432         if test "$with_libtool" != "yes" ; then
4433
4434 if test "x$prefix" != xNONE; then
4435   cf_path_syntax="$prefix"
4436 else
4437   cf_path_syntax="$ac_default_prefix"
4438 fi
4439
4440 case ".$with_libtool" in #(vi
4441 .\$\(*\)*|.\'*\'*) #(vi
4442   ;;
4443 ..|./*|.\\*) #(vi
4444   ;;
4445 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4446   ;;
4447 .\${*prefix}*) #(vi
4448   eval with_libtool="$with_libtool"
4449   case ".$with_libtool" in #(vi
4450   .NONE/*)
4451     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4452     ;;
4453   esac
4454   ;; #(vi
4455 .no|.NONE/*)
4456   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4457   ;;
4458 *)
4459   { { echo "$as_me:4459: error: expected a pathname, not \"$with_libtool\"" >&5
4460 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4461    { (exit 1); exit 1; }; }
4462   ;;
4463 esac
4464
4465                 LIBTOOL=$with_libtool
4466         else
4467                 # Extract the first word of "libtool", so it can be a program name with args.
4468 set dummy libtool; ac_word=$2
4469 echo "$as_me:4469: checking for $ac_word" >&5
4470 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4471 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4472   echo $ECHO_N "(cached) $ECHO_C" >&6
4473 else
4474   case $LIBTOOL in
4475   [\\/]* | ?:[\\/]*)
4476   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4477   ;;
4478   *)
4479   ac_save_IFS=$IFS; IFS=$ac_path_separator
4480 ac_dummy="$PATH"
4481 for ac_dir in $ac_dummy; do
4482   IFS=$ac_save_IFS
4483   test -z "$ac_dir" && ac_dir=.
4484   if $as_executable_p "$ac_dir/$ac_word"; then
4485    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4486    echo "$as_me:4486: found $ac_dir/$ac_word" >&5
4487    break
4488 fi
4489 done
4490
4491   ;;
4492 esac
4493 fi
4494 LIBTOOL=$ac_cv_path_LIBTOOL
4495
4496 if test -n "$LIBTOOL"; then
4497   echo "$as_me:4497: result: $LIBTOOL" >&5
4498 echo "${ECHO_T}$LIBTOOL" >&6
4499 else
4500   echo "$as_me:4500: result: no" >&5
4501 echo "${ECHO_T}no" >&6
4502 fi
4503
4504         fi
4505         if test -z "$LIBTOOL" ; then
4506                 { { echo "$as_me:4506: error: Cannot find libtool" >&5
4507 echo "$as_me: error: Cannot find libtool" >&2;}
4508    { (exit 1); exit 1; }; }
4509         fi
4510         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
4511         LIB_OBJECT='${OBJECTS:.o=.lo}'
4512         LIB_SUFFIX=.la
4513         LIB_CLEAN='${LIBTOOL} --mode=clean'
4514         LIB_COMPILE='${LIBTOOL} --mode=compile'
4515         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4516         LIB_INSTALL='${LIBTOOL} --mode=install'
4517         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4518         LIB_PREP=:
4519
4520         # Show the version of libtool
4521         echo "$as_me:4521: checking version of libtool" >&5
4522 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4523
4524         # Save the version in a cache variable - this is not entirely a good
4525         # thing, but the version string from libtool is very ugly, and for
4526         # bug reports it might be useful to have the original string. "("
4527         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.].*//'`
4528         echo "$as_me:4528: result: $cf_cv_libtool_version" >&5
4529 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4530         if test -z "$cf_cv_libtool_version" ; then
4531                 { { echo "$as_me:4531: error: This is not GNU libtool" >&5
4532 echo "$as_me: error: This is not GNU libtool" >&2;}
4533    { (exit 1); exit 1; }; }
4534         fi
4535
4536         # special hack to add -no-undefined (which libtool should do for itself)
4537         LT_UNDEF=
4538         case "$cf_cv_system_name" in #(vi
4539         cygwin*|mingw32*|uwin*|aix[456]) #(vi
4540                 LT_UNDEF=-no-undefined
4541                 ;;
4542         esac
4543
4544         # special hack to add --tag option for C++ compiler
4545         case $cf_cv_libtool_version in #(vi
4546         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4547                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4548                 LIBTOOL="$LIBTOOL --tag=CC"
4549                 ;;
4550         *)
4551                 LIBTOOL_CXX="$LIBTOOL"
4552                 ;;
4553         esac
4554 else
4555         LIBTOOL=""
4556         LIBTOOL_CXX=""
4557 fi
4558
4559 test -z "$LIBTOOL" && ECHO_LT=
4560
4561 if test "$with_libtool" != "no" ; then
4562
4563 cf_list_models="$cf_list_models libtool"
4564
4565 else
4566
4567 echo "$as_me:4567: checking if you want to build shared libraries" >&5
4568 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4569
4570 # Check whether --with-shared or --without-shared was given.
4571 if test "${with_shared+set}" = set; then
4572   withval="$with_shared"
4573   with_shared=$withval
4574 else
4575   with_shared=no
4576 fi;
4577 echo "$as_me:4577: result: $with_shared" >&5
4578 echo "${ECHO_T}$with_shared" >&6
4579 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4580
4581 echo "$as_me:4581: checking if you want to build static libraries" >&5
4582 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4583
4584 # Check whether --with-normal or --without-normal was given.
4585 if test "${with_normal+set}" = set; then
4586   withval="$with_normal"
4587   with_normal=$withval
4588 else
4589   with_normal=yes
4590 fi;
4591 echo "$as_me:4591: result: $with_normal" >&5
4592 echo "${ECHO_T}$with_normal" >&6
4593 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4594
4595 echo "$as_me:4595: checking if you want to build debug libraries" >&5
4596 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4597
4598 # Check whether --with-debug or --without-debug was given.
4599 if test "${with_debug+set}" = set; then
4600   withval="$with_debug"
4601   with_debug=$withval
4602 else
4603   with_debug=yes
4604 fi;
4605 echo "$as_me:4605: result: $with_debug" >&5
4606 echo "${ECHO_T}$with_debug" >&6
4607 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4608
4609 echo "$as_me:4609: checking if you want to build profiling libraries" >&5
4610 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4611
4612 # Check whether --with-profile or --without-profile was given.
4613 if test "${with_profile+set}" = set; then
4614   withval="$with_profile"
4615   with_profile=$withval
4616 else
4617   with_profile=no
4618 fi;
4619 echo "$as_me:4619: result: $with_profile" >&5
4620 echo "${ECHO_T}$with_profile" >&6
4621 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4622
4623 fi
4624
4625 ###############################################################################
4626
4627 echo "$as_me:4627: checking for specified models" >&5
4628 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4629 test -z "$cf_list_models" && cf_list_models=normal
4630 test "$with_libtool" != "no" && cf_list_models=libtool
4631 echo "$as_me:4631: result: $cf_list_models" >&5
4632 echo "${ECHO_T}$cf_list_models" >&6
4633
4634 ### Use the first model as the default, and save its suffix for use in building
4635 ### up test-applications.
4636 echo "$as_me:4636: checking for default model" >&5
4637 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4638 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4639 echo "$as_me:4639: result: $DFT_LWR_MODEL" >&5
4640 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4641
4642 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4643
4644 TICS_NAME=tic
4645
4646 TINFO_NAME=tinfo
4647
4648 LIB_NAME=ncurses
4649
4650 LIB_DIR=../lib
4651 LIB_2ND=../../lib
4652
4653         case $cf_cv_system_name in #(vi
4654         OS/2*|os2*) #(vi
4655         LIB_PREFIX=''
4656         ;;
4657         *)      LIB_PREFIX='lib'
4658         ;;
4659         esac
4660 cf_prefix=$LIB_PREFIX
4661
4662 LIB_PREFIX=$cf_prefix
4663
4664 LIB_SUFFIX=
4665
4666 ###############################################################################
4667
4668 echo "$as_me:4668: checking if you want to build a separate terminfo library" >&5
4669 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4670
4671 # Check whether --with-termlib or --without-termlib was given.
4672 if test "${with_termlib+set}" = set; then
4673   withval="$with_termlib"
4674   with_termlib=$withval
4675 else
4676   with_termlib=no
4677 fi;
4678 echo "$as_me:4678: result: $with_termlib" >&5
4679 echo "${ECHO_T}$with_termlib" >&6
4680
4681 echo "$as_me:4681: checking if you want to build a separate tic library" >&5
4682 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4683
4684 # Check whether --with-ticlib or --without-ticlib was given.
4685 if test "${with_ticlib+set}" = set; then
4686   withval="$with_ticlib"
4687   with_ticlib=$withval
4688 else
4689   with_ticlib=no
4690 fi;
4691 echo "$as_me:4691: result: $with_ticlib" >&5
4692 echo "${ECHO_T}$with_ticlib" >&6
4693
4694 ### Checks for special libraries, must be done up-front.
4695 SHLIB_LIST=""
4696
4697 echo "$as_me:4697: checking if you want to link with the GPM mouse library" >&5
4698 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4699
4700 # Check whether --with-gpm or --without-gpm was given.
4701 if test "${with_gpm+set}" = set; then
4702   withval="$with_gpm"
4703   with_gpm=$withval
4704 else
4705   with_gpm=maybe
4706 fi;
4707 echo "$as_me:4707: result: $with_gpm" >&5
4708 echo "${ECHO_T}$with_gpm" >&6
4709
4710 if test "$with_gpm" != no ; then
4711         echo "$as_me:4711: checking for gpm.h" >&5
4712 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4713 if test "${ac_cv_header_gpm_h+set}" = set; then
4714   echo $ECHO_N "(cached) $ECHO_C" >&6
4715 else
4716   cat >conftest.$ac_ext <<_ACEOF
4717 #line 4717 "configure"
4718 #include "confdefs.h"
4719 #include <gpm.h>
4720 _ACEOF
4721 if { (eval echo "$as_me:4721: \"$ac_cpp conftest.$ac_ext\"") >&5
4722   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4723   ac_status=$?
4724   egrep -v '^ *\+' conftest.er1 >conftest.err
4725   rm -f conftest.er1
4726   cat conftest.err >&5
4727   echo "$as_me:4727: \$? = $ac_status" >&5
4728   (exit $ac_status); } >/dev/null; then
4729   if test -s conftest.err; then
4730     ac_cpp_err=$ac_c_preproc_warn_flag
4731   else
4732     ac_cpp_err=
4733   fi
4734 else
4735   ac_cpp_err=yes
4736 fi
4737 if test -z "$ac_cpp_err"; then
4738   ac_cv_header_gpm_h=yes
4739 else
4740   echo "$as_me: failed program was:" >&5
4741   cat conftest.$ac_ext >&5
4742   ac_cv_header_gpm_h=no
4743 fi
4744 rm -f conftest.err conftest.$ac_ext
4745 fi
4746 echo "$as_me:4746: result: $ac_cv_header_gpm_h" >&5
4747 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4748 if test $ac_cv_header_gpm_h = yes; then
4749
4750                 cat >>confdefs.h <<\EOF
4751 #define HAVE_GPM_H 1
4752 EOF
4753
4754                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4755                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4756
4757 echo "${as_me-configure}:4757: testing assuming we really have GPM library ..." 1>&5
4758
4759                         cat >>confdefs.h <<\EOF
4760 #define HAVE_LIBGPM 1
4761 EOF
4762
4763                 else
4764                         echo "$as_me:4764: checking for Gpm_Open in -lgpm" >&5
4765 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4766 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4767   echo $ECHO_N "(cached) $ECHO_C" >&6
4768 else
4769   ac_check_lib_save_LIBS=$LIBS
4770 LIBS="-lgpm  $LIBS"
4771 cat >conftest.$ac_ext <<_ACEOF
4772 #line 4772 "configure"
4773 #include "confdefs.h"
4774
4775 /* Override any gcc2 internal prototype to avoid an error.  */
4776 #ifdef __cplusplus
4777 extern "C"
4778 #endif
4779 /* We use char because int might match the return type of a gcc2
4780    builtin and then its argument prototype would still apply.  */
4781 char Gpm_Open ();
4782 int
4783 main ()
4784 {
4785 Gpm_Open ();
4786   ;
4787   return 0;
4788 }
4789 _ACEOF
4790 rm -f conftest.$ac_objext conftest$ac_exeext
4791 if { (eval echo "$as_me:4791: \"$ac_link\"") >&5
4792   (eval $ac_link) 2>&5
4793   ac_status=$?
4794   echo "$as_me:4794: \$? = $ac_status" >&5
4795   (exit $ac_status); } &&
4796          { ac_try='test -s conftest$ac_exeext'
4797   { (eval echo "$as_me:4797: \"$ac_try\"") >&5
4798   (eval $ac_try) 2>&5
4799   ac_status=$?
4800   echo "$as_me:4800: \$? = $ac_status" >&5
4801   (exit $ac_status); }; }; then
4802   ac_cv_lib_gpm_Gpm_Open=yes
4803 else
4804   echo "$as_me: failed program was:" >&5
4805 cat conftest.$ac_ext >&5
4806 ac_cv_lib_gpm_Gpm_Open=no
4807 fi
4808 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4809 LIBS=$ac_check_lib_save_LIBS
4810 fi
4811 echo "$as_me:4811: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4812 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4813 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4814   :
4815 else
4816
4817                                 { { echo "$as_me:4817: error: Cannot link with GPM library" >&5
4818 echo "$as_me: error: Cannot link with GPM library" >&2;}
4819    { (exit 1); exit 1; }; }
4820                 fi
4821                 with_gpm=yes
4822
4823 fi
4824
4825 else
4826
4827                 test "$with_gpm" != maybe && { echo "$as_me:4827: WARNING: Cannot find GPM header" >&5
4828 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4829                 with_gpm=no
4830
4831 fi
4832
4833 fi
4834
4835 if test "$with_gpm" != no ; then
4836         echo "$as_me:4836: checking if you want to load GPM dynamically" >&5
4837 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4838
4839 # Check whether --with-dlsym or --without-dlsym was given.
4840 if test "${with_dlsym+set}" = set; then
4841   withval="$with_dlsym"
4842   with_dlsym=$withval
4843 else
4844   with_dlsym=yes
4845 fi;
4846         echo "$as_me:4846: result: $with_dlsym" >&5
4847 echo "${ECHO_T}$with_dlsym" >&6
4848         if test "$with_dlsym" = yes ; then
4849
4850 cf_have_dlsym=no
4851 echo "$as_me:4851: checking for dlsym" >&5
4852 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4853 if test "${ac_cv_func_dlsym+set}" = set; then
4854   echo $ECHO_N "(cached) $ECHO_C" >&6
4855 else
4856   cat >conftest.$ac_ext <<_ACEOF
4857 #line 4857 "configure"
4858 #include "confdefs.h"
4859 /* System header to define __stub macros and hopefully few prototypes,
4860     which can conflict with char dlsym (); below.  */
4861 #include <assert.h>
4862 /* Override any gcc2 internal prototype to avoid an error.  */
4863 #ifdef __cplusplus
4864 extern "C"
4865 #endif
4866 /* We use char because int might match the return type of a gcc2
4867    builtin and then its argument prototype would still apply.  */
4868 char dlsym ();
4869 char (*f) ();
4870
4871 int
4872 main ()
4873 {
4874 /* The GNU C library defines this for functions which it implements
4875     to always fail with ENOSYS.  Some functions are actually named
4876     something starting with __ and the normal name is an alias.  */
4877 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4878 choke me
4879 #else
4880 f = dlsym;
4881 #endif
4882
4883   ;
4884   return 0;
4885 }
4886 _ACEOF
4887 rm -f conftest.$ac_objext conftest$ac_exeext
4888 if { (eval echo "$as_me:4888: \"$ac_link\"") >&5
4889   (eval $ac_link) 2>&5
4890   ac_status=$?
4891   echo "$as_me:4891: \$? = $ac_status" >&5
4892   (exit $ac_status); } &&
4893          { ac_try='test -s conftest$ac_exeext'
4894   { (eval echo "$as_me:4894: \"$ac_try\"") >&5
4895   (eval $ac_try) 2>&5
4896   ac_status=$?
4897   echo "$as_me:4897: \$? = $ac_status" >&5
4898   (exit $ac_status); }; }; then
4899   ac_cv_func_dlsym=yes
4900 else
4901   echo "$as_me: failed program was:" >&5
4902 cat conftest.$ac_ext >&5
4903 ac_cv_func_dlsym=no
4904 fi
4905 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4906 fi
4907 echo "$as_me:4907: result: $ac_cv_func_dlsym" >&5
4908 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4909 if test $ac_cv_func_dlsym = yes; then
4910   cf_have_dlsym=yes
4911 else
4912
4913 cf_have_libdl=no
4914 echo "$as_me:4914: checking for dlsym in -ldl" >&5
4915 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4916 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4917   echo $ECHO_N "(cached) $ECHO_C" >&6
4918 else
4919   ac_check_lib_save_LIBS=$LIBS
4920 LIBS="-ldl  $LIBS"
4921 cat >conftest.$ac_ext <<_ACEOF
4922 #line 4922 "configure"
4923 #include "confdefs.h"
4924
4925 /* Override any gcc2 internal prototype to avoid an error.  */
4926 #ifdef __cplusplus
4927 extern "C"
4928 #endif
4929 /* We use char because int might match the return type of a gcc2
4930    builtin and then its argument prototype would still apply.  */
4931 char dlsym ();
4932 int
4933 main ()
4934 {
4935 dlsym ();
4936   ;
4937   return 0;
4938 }
4939 _ACEOF
4940 rm -f conftest.$ac_objext conftest$ac_exeext
4941 if { (eval echo "$as_me:4941: \"$ac_link\"") >&5
4942   (eval $ac_link) 2>&5
4943   ac_status=$?
4944   echo "$as_me:4944: \$? = $ac_status" >&5
4945   (exit $ac_status); } &&
4946          { ac_try='test -s conftest$ac_exeext'
4947   { (eval echo "$as_me:4947: \"$ac_try\"") >&5
4948   (eval $ac_try) 2>&5
4949   ac_status=$?
4950   echo "$as_me:4950: \$? = $ac_status" >&5
4951   (exit $ac_status); }; }; then
4952   ac_cv_lib_dl_dlsym=yes
4953 else
4954   echo "$as_me: failed program was:" >&5
4955 cat conftest.$ac_ext >&5
4956 ac_cv_lib_dl_dlsym=no
4957 fi
4958 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4959 LIBS=$ac_check_lib_save_LIBS
4960 fi
4961 echo "$as_me:4961: result: $ac_cv_lib_dl_dlsym" >&5
4962 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4963 if test $ac_cv_lib_dl_dlsym = yes; then
4964
4965         cf_have_dlsym=yes
4966         cf_have_libdl=yes
4967 fi
4968
4969 fi
4970
4971 if test "$cf_have_dlsym" = yes ; then
4972         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4973
4974         echo "$as_me:4974: checking whether able to link to dl*() functions" >&5
4975 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4976         cat >conftest.$ac_ext <<_ACEOF
4977 #line 4977 "configure"
4978 #include "confdefs.h"
4979 #include <dlfcn.h>
4980 int
4981 main ()
4982 {
4983
4984                 void *obj;
4985                 if ((obj = dlopen("filename", 0)) != 0) {
4986                         if (dlsym(obj, "symbolname") == 0) {
4987                         dlclose(obj);
4988                         }
4989                 }
4990   ;
4991   return 0;
4992 }
4993 _ACEOF
4994 rm -f conftest.$ac_objext conftest$ac_exeext
4995 if { (eval echo "$as_me:4995: \"$ac_link\"") >&5
4996   (eval $ac_link) 2>&5
4997   ac_status=$?
4998   echo "$as_me:4998: \$? = $ac_status" >&5
4999   (exit $ac_status); } &&
5000          { ac_try='test -s conftest$ac_exeext'
5001   { (eval echo "$as_me:5001: \"$ac_try\"") >&5
5002   (eval $ac_try) 2>&5
5003   ac_status=$?
5004   echo "$as_me:5004: \$? = $ac_status" >&5
5005   (exit $ac_status); }; }; then
5006
5007                 cat >>confdefs.h <<\EOF
5008 #define HAVE_LIBDL 1
5009 EOF
5010
5011 else
5012   echo "$as_me: failed program was:" >&5
5013 cat conftest.$ac_ext >&5
5014
5015                 { { echo "$as_me:5015: error: Cannot link test program for libdl" >&5
5016 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5017    { (exit 1); exit 1; }; }
5018 fi
5019 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5020         echo "$as_me:5020: result: ok" >&5
5021 echo "${ECHO_T}ok" >&6
5022 else
5023         { { echo "$as_me:5023: error: Cannot find dlsym function" >&5
5024 echo "$as_me: error: Cannot find dlsym function" >&2;}
5025    { (exit 1); exit 1; }; }
5026 fi
5027
5028                 if test "$with_gpm" != yes ; then
5029                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5030
5031 echo "${as_me-configure}:5031: testing assuming soname for gpm is $with_gpm ..." 1>&5
5032
5033                         cf_cv_gpm_soname="$with_gpm"
5034                 else
5035
5036 echo "$as_me:5036: checking for soname of gpm library" >&5
5037 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5038 if test "${cf_cv_gpm_soname+set}" = set; then
5039   echo $ECHO_N "(cached) $ECHO_C" >&6
5040 else
5041
5042 cf_cv_gpm_soname=unknown
5043 if test "$cross_compiling" != yes ; then
5044 cat >conftest.$ac_ext <<CF_EOF
5045 #include <gpm.h>
5046 int main()
5047 {
5048 if (Gpm_Open(0,0)) Gpm_Close();
5049         ${cf_cv_main_return:-return}(0);
5050 }
5051 CF_EOF
5052 cf_save_LIBS="$LIBS"
5053         LIBS="-lgpm $LIBS"
5054         if { (eval echo "$as_me:5054: \"$ac_compile\"") >&5
5055   (eval $ac_compile) 2>&5
5056   ac_status=$?
5057   echo "$as_me:5057: \$? = $ac_status" >&5
5058   (exit $ac_status); } ; then
5059                 if { (eval echo "$as_me:5059: \"$ac_link\"") >&5
5060   (eval $ac_link) 2>&5
5061   ac_status=$?
5062   echo "$as_me:5062: \$? = $ac_status" >&5
5063   (exit $ac_status); } ; then
5064                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5065                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5066                 fi
5067         fi
5068 rm -f conftest*
5069 LIBS="$cf_save_LIBS"
5070 fi
5071
5072 fi
5073 echo "$as_me:5073: result: $cf_cv_gpm_soname" >&5
5074 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5075
5076                 fi
5077                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5078 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5079 EOF
5080
5081                 SHLIB_LIST="-ldl $SHLIB_LIST"
5082         else
5083                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5084                 TEST_LIBS="-lgpm $TEST_LIBS"
5085         fi
5086         cat >>confdefs.h <<\EOF
5087 #define HAVE_LIBGPM 1
5088 EOF
5089
5090 echo "$as_me:5090: checking for Gpm_Wgetch in -lgpm" >&5
5091 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5092 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5093   echo $ECHO_N "(cached) $ECHO_C" >&6
5094 else
5095   ac_check_lib_save_LIBS=$LIBS
5096 LIBS="-lgpm  $LIBS"
5097 cat >conftest.$ac_ext <<_ACEOF
5098 #line 5098 "configure"
5099 #include "confdefs.h"
5100
5101 /* Override any gcc2 internal prototype to avoid an error.  */
5102 #ifdef __cplusplus
5103 extern "C"
5104 #endif
5105 /* We use char because int might match the return type of a gcc2
5106    builtin and then its argument prototype would still apply.  */
5107 char Gpm_Wgetch ();
5108 int
5109 main ()
5110 {
5111 Gpm_Wgetch ();
5112   ;
5113   return 0;
5114 }
5115 _ACEOF
5116 rm -f conftest.$ac_objext conftest$ac_exeext
5117 if { (eval echo "$as_me:5117: \"$ac_link\"") >&5
5118   (eval $ac_link) 2>&5
5119   ac_status=$?
5120   echo "$as_me:5120: \$? = $ac_status" >&5
5121   (exit $ac_status); } &&
5122          { ac_try='test -s conftest$ac_exeext'
5123   { (eval echo "$as_me:5123: \"$ac_try\"") >&5
5124   (eval $ac_try) 2>&5
5125   ac_status=$?
5126   echo "$as_me:5126: \$? = $ac_status" >&5
5127   (exit $ac_status); }; }; then
5128   ac_cv_lib_gpm_Gpm_Wgetch=yes
5129 else
5130   echo "$as_me: failed program was:" >&5
5131 cat conftest.$ac_ext >&5
5132 ac_cv_lib_gpm_Gpm_Wgetch=no
5133 fi
5134 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5135 LIBS=$ac_check_lib_save_LIBS
5136 fi
5137 echo "$as_me:5137: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5138 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5139 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5140
5141 echo "$as_me:5141: checking if GPM is weakly bound to curses library" >&5
5142 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5143 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5144   echo $ECHO_N "(cached) $ECHO_C" >&6
5145 else
5146
5147 cf_cv_check_gpm_wgetch=unknown
5148 if test "$cross_compiling" != yes ; then
5149
5150 cat >conftest.$ac_ext <<CF_EOF
5151 #include <gpm.h>
5152 int main()
5153 {
5154         Gpm_Wgetch();
5155         ${cf_cv_main_return:-return}(0);
5156 }
5157 CF_EOF
5158
5159         cf_save_LIBS="$LIBS"
5160         # This only works if we can look at the symbol table.  If a shared
5161         # library is stripped for install, we cannot use that.  So we're forced
5162         # to rely on the static library, noting that some packagers may not
5163         # include it.
5164         LIBS="-static -lgpm -dynamic $LIBS"
5165         if { (eval echo "$as_me:5165: \"$ac_compile\"") >&5
5166   (eval $ac_compile) 2>&5
5167   ac_status=$?
5168   echo "$as_me:5168: \$? = $ac_status" >&5
5169   (exit $ac_status); } ; then
5170                 if { (eval echo "$as_me:5170: \"$ac_link\"") >&5
5171   (eval $ac_link) 2>&5
5172   ac_status=$?
5173   echo "$as_me:5173: \$? = $ac_status" >&5
5174   (exit $ac_status); } ; then
5175                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5176                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5177                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5178                 fi
5179         fi
5180         rm -f conftest*
5181         LIBS="$cf_save_LIBS"
5182 fi
5183
5184 fi
5185 echo "$as_me:5185: result: $cf_cv_check_gpm_wgetch" >&5
5186 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5187
5188 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5189         { echo "$as_me:5189: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5190 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5191 fi
5192
5193 fi
5194
5195 fi
5196
5197 # not everyone has "test -c"
5198 if test -c /dev/sysmouse 2>/dev/null ; then
5199 echo "$as_me:5199: checking if you want to use sysmouse" >&5
5200 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5201
5202 # Check whether --with-sysmouse or --without-sysmouse was given.
5203 if test "${with_sysmouse+set}" = set; then
5204   withval="$with_sysmouse"
5205   cf_with_sysmouse=$withval
5206 else
5207   cf_with_sysmouse=maybe
5208 fi;
5209         if test "$cf_with_sysmouse" != no ; then
5210         cat >conftest.$ac_ext <<_ACEOF
5211 #line 5211 "configure"
5212 #include "confdefs.h"
5213
5214 #include <osreldate.h>
5215 #if (__FreeBSD_version >= 400017)
5216 #include <sys/consio.h>
5217 #include <sys/fbio.h>
5218 #else
5219 #include <machine/console.h>
5220 #endif
5221
5222 int
5223 main ()
5224 {
5225
5226         struct mouse_info the_mouse;
5227         ioctl(0, CONS_MOUSECTL, &the_mouse);
5228
5229   ;
5230   return 0;
5231 }
5232 _ACEOF
5233 rm -f conftest.$ac_objext
5234 if { (eval echo "$as_me:5234: \"$ac_compile\"") >&5
5235   (eval $ac_compile) 2>&5
5236   ac_status=$?
5237   echo "$as_me:5237: \$? = $ac_status" >&5
5238   (exit $ac_status); } &&
5239          { ac_try='test -s conftest.$ac_objext'
5240   { (eval echo "$as_me:5240: \"$ac_try\"") >&5
5241   (eval $ac_try) 2>&5
5242   ac_status=$?
5243   echo "$as_me:5243: \$? = $ac_status" >&5
5244   (exit $ac_status); }; }; then
5245   cf_with_sysmouse=yes
5246 else
5247   echo "$as_me: failed program was:" >&5
5248 cat conftest.$ac_ext >&5
5249 cf_with_sysmouse=no
5250 fi
5251 rm -f conftest.$ac_objext conftest.$ac_ext
5252         fi
5253 echo "$as_me:5253: result: $cf_with_sysmouse" >&5
5254 echo "${ECHO_T}$cf_with_sysmouse" >&6
5255 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5256 #define USE_SYSMOUSE 1
5257 EOF
5258
5259 fi
5260
5261 if test X"$CC_G_OPT" = X"" ; then
5262         CC_G_OPT='-g'
5263         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5264 fi
5265
5266 if test X"$CXX_G_OPT" = X"" ; then
5267         CXX_G_OPT='-g'
5268         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5269 fi
5270
5271 echo "$as_me:5271: checking for default loader flags" >&5
5272 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5273 case $DFT_LWR_MODEL in
5274 libtool) LD_MODEL=''   ;;
5275 normal)  LD_MODEL=''   ;;
5276 debug)   LD_MODEL=$CC_G_OPT ;;
5277 profile) LD_MODEL='-pg';;
5278 shared)  LD_MODEL=''   ;;
5279 esac
5280 echo "$as_me:5280: result: $LD_MODEL" >&5
5281 echo "${ECHO_T}$LD_MODEL" >&6
5282
5283 case $DFT_LWR_MODEL in
5284 shared)
5285
5286 echo "$as_me:5286: checking if rpath option should be used" >&5
5287 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5288
5289 # Check whether --enable-rpath or --disable-rpath was given.
5290 if test "${enable_rpath+set}" = set; then
5291   enableval="$enable_rpath"
5292   cf_cv_enable_rpath=$enableval
5293 else
5294   cf_cv_enable_rpath=no
5295 fi;
5296 echo "$as_me:5296: result: $cf_cv_enable_rpath" >&5
5297 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5298
5299 echo "$as_me:5299: checking if shared libraries should be relinked during install" >&5
5300 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5301
5302 # Check whether --enable-relink or --disable-relink was given.
5303 if test "${enable_relink+set}" = set; then
5304   enableval="$enable_relink"
5305   cf_cv_do_relink=$enableval
5306 else
5307   cf_cv_do_relink=yes
5308 fi;
5309 echo "$as_me:5309: result: $cf_cv_do_relink" >&5
5310 echo "${ECHO_T}$cf_cv_do_relink" >&6
5311         ;;
5312 esac
5313
5314 LD_RPATH_OPT=
5315 echo "$as_me:5315: checking for an rpath option" >&5
5316 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5317 case $cf_cv_system_name in #(vi
5318 irix*) #(vi
5319         if test "$GCC" = yes; then
5320                 LD_RPATH_OPT="-Wl,-rpath,"
5321         else
5322                 LD_RPATH_OPT="-rpath "
5323         fi
5324         ;;
5325 linux*|gnu*|k*bsd*-gnu) #(vi
5326         LD_RPATH_OPT="-Wl,-rpath,"
5327         ;;
5328 openbsd[2-9].*) #(vi
5329         LD_RPATH_OPT="-Wl,-rpath,"
5330         ;;
5331 freebsd*) #(vi
5332         LD_RPATH_OPT="-rpath "
5333         ;;
5334 netbsd*) #(vi
5335         LD_RPATH_OPT="-Wl,-rpath,"
5336         ;;
5337 osf*|mls+*) #(vi
5338         LD_RPATH_OPT="-rpath "
5339         ;;
5340 solaris2*) #(vi
5341         LD_RPATH_OPT="-R"
5342         ;;
5343 *)
5344         ;;
5345 esac
5346 echo "$as_me:5346: result: $LD_RPATH_OPT" >&5
5347 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5348
5349 case "x$LD_RPATH_OPT" in #(vi
5350 x-R*)
5351         echo "$as_me:5351: checking if we need a space after rpath option" >&5
5352 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5353         cf_save_LIBS="$LIBS"
5354         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5355         cat >conftest.$ac_ext <<_ACEOF
5356 #line 5356 "configure"
5357 #include "confdefs.h"
5358
5359 int
5360 main ()
5361 {
5362
5363   ;
5364   return 0;
5365 }
5366 _ACEOF
5367 rm -f conftest.$ac_objext conftest$ac_exeext
5368 if { (eval echo "$as_me:5368: \"$ac_link\"") >&5
5369   (eval $ac_link) 2>&5
5370   ac_status=$?
5371   echo "$as_me:5371: \$? = $ac_status" >&5
5372   (exit $ac_status); } &&
5373          { ac_try='test -s conftest$ac_exeext'
5374   { (eval echo "$as_me:5374: \"$ac_try\"") >&5
5375   (eval $ac_try) 2>&5
5376   ac_status=$?
5377   echo "$as_me:5377: \$? = $ac_status" >&5
5378   (exit $ac_status); }; }; then
5379   cf_rpath_space=no
5380 else
5381   echo "$as_me: failed program was:" >&5
5382 cat conftest.$ac_ext >&5
5383 cf_rpath_space=yes
5384 fi
5385 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5386         LIBS="$cf_save_LIBS"
5387         echo "$as_me:5387: result: $cf_rpath_space" >&5
5388 echo "${ECHO_T}$cf_rpath_space" >&6
5389         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5390         ;;
5391 esac
5392
5393         LOCAL_LDFLAGS=
5394         LOCAL_LDFLAGS2=
5395         LD_SHARED_OPTS=
5396         INSTALL_LIB="-m 644"
5397
5398         cf_cv_do_symlinks=no
5399         cf_ld_rpath_opt=
5400         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5401
5402         echo "$as_me:5402: checking if release/abi version should be used for shared libs" >&5
5403 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5404
5405 # Check whether --with-shlib-version or --without-shlib-version was given.
5406 if test "${with_shlib_version+set}" = set; then
5407   withval="$with_shlib_version"
5408   test -z "$withval" && withval=auto
5409         case $withval in #(vi
5410         yes) #(vi
5411                 cf_cv_shlib_version=auto
5412                 ;;
5413         rel|abi|auto|no) #(vi
5414                 cf_cv_shlib_version=$withval
5415                 ;;
5416         *)
5417                 { { echo "$as_me:5417: error: option value must be one of: rel, abi, auto or no" >&5
5418 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5419    { (exit 1); exit 1; }; }
5420                 ;;
5421         esac
5422
5423 else
5424   cf_cv_shlib_version=auto
5425 fi;
5426         echo "$as_me:5426: result: $cf_cv_shlib_version" >&5
5427 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5428
5429         cf_cv_rm_so_locs=no
5430
5431         # Some less-capable ports of gcc support only -fpic
5432         CC_SHARED_OPTS=
5433         if test "$GCC" = yes
5434         then
5435                 echo "$as_me:5435: checking which $CC option to use" >&5
5436 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5437                 cf_save_CFLAGS="$CFLAGS"
5438                 for CC_SHARED_OPTS in -fPIC -fpic ''
5439                 do
5440                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5441                         cat >conftest.$ac_ext <<_ACEOF
5442 #line 5442 "configure"
5443 #include "confdefs.h"
5444 #include <stdio.h>
5445 int
5446 main ()
5447 {
5448 int x = 1
5449   ;
5450   return 0;
5451 }
5452 _ACEOF
5453 rm -f conftest.$ac_objext
5454 if { (eval echo "$as_me:5454: \"$ac_compile\"") >&5
5455   (eval $ac_compile) 2>&5
5456   ac_status=$?
5457   echo "$as_me:5457: \$? = $ac_status" >&5
5458   (exit $ac_status); } &&
5459          { ac_try='test -s conftest.$ac_objext'
5460   { (eval echo "$as_me:5460: \"$ac_try\"") >&5
5461   (eval $ac_try) 2>&5
5462   ac_status=$?
5463   echo "$as_me:5463: \$? = $ac_status" >&5
5464   (exit $ac_status); }; }; then
5465   break
5466 else
5467   echo "$as_me: failed program was:" >&5
5468 cat conftest.$ac_ext >&5
5469 fi
5470 rm -f conftest.$ac_objext conftest.$ac_ext
5471                 done
5472                 echo "$as_me:5472: result: $CC_SHARED_OPTS" >&5
5473 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5474                 CFLAGS="$cf_save_CFLAGS"
5475         fi
5476
5477         cf_cv_shlib_version_infix=no
5478
5479         case $cf_cv_system_name in #(vi
5480         aix[56]*) #(vi
5481                 if test "$GCC" = yes; then
5482                         CC_SHARED_OPTS=
5483                         MK_SHARED_LIB="$(CC) -shared"
5484                 fi
5485                 ;;
5486         beos*) #(vi
5487                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5488                 ;;
5489         cygwin*) #(vi
5490                 CC_SHARED_OPTS=
5491                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5492                 cf_cv_shlib_version=cygdll
5493                 cf_cv_shlib_version_infix=cygdll
5494                 cat >mk_shared_lib.sh <<-CF_EOF
5495                 #!/bin/sh
5496                 SHARED_LIB=\$1
5497                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5498                 shift
5499                 cat <<-EOF
5500                 Linking shared library
5501                 ** SHARED_LIB \$SHARED_LIB
5502                 ** IMPORT_LIB \$IMPORT_LIB
5503 EOF
5504                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5505 CF_EOF
5506                 chmod +x mk_shared_lib.sh
5507                 ;;
5508         darwin*) #(vi
5509                 EXTRA_CFLAGS="-no-cpp-precomp"
5510                 CC_SHARED_OPTS="-dynamic"
5511                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5512                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5513                 cf_cv_shlib_version_infix=yes
5514                 echo "$as_me:5514: checking if ld -search_paths_first works" >&5
5515 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5516 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5517   echo $ECHO_N "(cached) $ECHO_C" >&6
5518 else
5519
5520                         cf_save_LDFLAGS=$LDFLAGS
5521                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5522                         cat >conftest.$ac_ext <<_ACEOF
5523 #line 5523 "configure"
5524 #include "confdefs.h"
5525
5526 int
5527 main ()
5528 {
5529 int i;
5530   ;
5531   return 0;
5532 }
5533 _ACEOF
5534 rm -f conftest.$ac_objext conftest$ac_exeext
5535 if { (eval echo "$as_me:5535: \"$ac_link\"") >&5
5536   (eval $ac_link) 2>&5
5537   ac_status=$?
5538   echo "$as_me:5538: \$? = $ac_status" >&5
5539   (exit $ac_status); } &&
5540          { ac_try='test -s conftest$ac_exeext'
5541   { (eval echo "$as_me:5541: \"$ac_try\"") >&5
5542   (eval $ac_try) 2>&5
5543   ac_status=$?
5544   echo "$as_me:5544: \$? = $ac_status" >&5
5545   (exit $ac_status); }; }; then
5546   cf_cv_ldflags_search_paths_first=yes
5547 else
5548   echo "$as_me: failed program was:" >&5
5549 cat conftest.$ac_ext >&5
5550 cf_cv_ldflags_search_paths_first=no
5551 fi
5552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5553                                 LDFLAGS=$cf_save_LDFLAGS
5554 fi
5555 echo "$as_me:5555: result: $cf_cv_ldflags_search_paths_first" >&5
5556 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5557                 if test $cf_cv_ldflags_search_paths_first = yes; then
5558                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5559                 fi
5560                 ;;
5561         hpux*) #(vi
5562                 # (tested with gcc 2.7.2 -- I don't have c89)
5563                 if test "$GCC" = yes; then
5564                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5565                 else
5566                         CC_SHARED_OPTS='+Z'
5567                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5568                 fi
5569                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5570                 # HP-UX shared libraries must be executable, and should be
5571                 # readonly to exploit a quirk in the memory manager.
5572                 INSTALL_LIB="-m 555"
5573                 ;;
5574         irix*) #(vi
5575                 if test "$cf_cv_enable_rpath" = yes ; then
5576                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5577                 fi
5578                 # tested with IRIX 5.2 and 'cc'.
5579                 if test "$GCC" != yes; then
5580                         CC_SHARED_OPTS='-KPIC'
5581                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5582                 else
5583                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5584                 fi
5585                 cf_cv_rm_so_locs=yes
5586                 ;;
5587         linux*|gnu*|k*bsd*-gnu) #(vi
5588                 if test "$DFT_LWR_MODEL" = "shared" ; then
5589                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5590                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5591                 fi
5592                 if test "$cf_cv_enable_rpath" = yes ; then
5593                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5594                 fi
5595
5596         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5597         if test "$cf_cv_shlib_version" = rel; then
5598                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5599         else
5600                 cf_cv_shared_soname='`basename $@`'
5601         fi
5602
5603                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5604                 ;;
5605         openbsd[2-9].*) #(vi
5606                 if test "$DFT_LWR_MODEL" = "shared" ; then
5607                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5608                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5609                 fi
5610                 if test "$cf_cv_enable_rpath" = yes ; then
5611                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5612                 fi
5613                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5614
5615         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5616         if test "$cf_cv_shlib_version" = rel; then
5617                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5618         else
5619                 cf_cv_shared_soname='`basename $@`'
5620         fi
5621
5622                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5623                 ;;
5624         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5625                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5626                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5627                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5628                 ;;
5629         freebsd*) #(vi
5630                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5631                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5632                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5633                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
5634                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5635                 fi
5636
5637         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5638         if test "$cf_cv_shlib_version" = rel; then
5639                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5640         else
5641                 cf_cv_shared_soname='`basename $@`'
5642         fi
5643
5644                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5645                 ;;
5646         netbsd*) #(vi
5647                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5648                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5649                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5650                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5651                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5652                         if test "$cf_cv_shlib_version" = auto; then
5653                         if test -f /usr/libexec/ld.elf_so; then
5654                                 cf_cv_shlib_version=abi
5655                         else
5656                                 cf_cv_shlib_version=rel
5657                         fi
5658                         fi
5659
5660         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5661         if test "$cf_cv_shlib_version" = rel; then
5662                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5663         else
5664                 cf_cv_shared_soname='`basename $@`'
5665         fi
5666
5667                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5668                 else
5669                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5670                 fi
5671                 ;;
5672         osf*|mls+*) #(vi
5673                 # tested with OSF/1 V3.2 and 'cc'
5674                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5675                 # link with shared libs).
5676                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5677                 case $host_os in #(vi
5678                 osf4*)
5679                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5680                         ;;
5681                 esac
5682                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5683                 if test "$DFT_LWR_MODEL" = "shared" ; then
5684                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5685                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5686                 fi
5687                 cf_cv_rm_so_locs=yes
5688                 ;;
5689         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5690                 # tested with osr5.0.5
5691                 if test "$GCC" != yes; then
5692                         CC_SHARED_OPTS='-belf -KPIC'
5693                 fi
5694                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5695                 if test "$cf_cv_enable_rpath" = yes ; then
5696                         # only way is to set LD_RUN_PATH but no switch for it
5697                         RUN_PATH=$libdir
5698                 fi
5699                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5700                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5701                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5702                 ;;
5703         sunos4*) #(vi
5704                 # tested with SunOS 4.1.1 and gcc 2.7.0
5705                 if test "$GCC" != yes; then
5706                         CC_SHARED_OPTS='-KPIC'
5707                 fi
5708                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5709                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5710                 ;;
5711         solaris2*) #(vi
5712                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5713                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5714                 if test "$DFT_LWR_MODEL" = "shared" ; then
5715                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5716                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5717                 fi
5718                 if test "$cf_cv_enable_rpath" = yes ; then
5719                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5720                 fi
5721
5722         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5723         if test "$cf_cv_shlib_version" = rel; then
5724                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5725         else
5726                 cf_cv_shared_soname='`basename $@`'
5727         fi
5728
5729                 if test "$GCC" != yes; then
5730                         cf_save_CFLAGS="$CFLAGS"
5731                         for cf_shared_opts in -xcode=pic13 -xcode=pic32 -Kpic -KPIC -O
5732                         do
5733                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5734                                 cat >conftest.$ac_ext <<_ACEOF
5735 #line 5735 "configure"
5736 #include "confdefs.h"
5737 #include <stdio.h>
5738 int
5739 main ()
5740 {
5741 printf("Hello\n");
5742   ;
5743   return 0;
5744 }
5745 _ACEOF
5746 rm -f conftest.$ac_objext
5747 if { (eval echo "$as_me:5747: \"$ac_compile\"") >&5
5748   (eval $ac_compile) 2>&5
5749   ac_status=$?
5750   echo "$as_me:5750: \$? = $ac_status" >&5
5751   (exit $ac_status); } &&
5752          { ac_try='test -s conftest.$ac_objext'
5753   { (eval echo "$as_me:5753: \"$ac_try\"") >&5
5754   (eval $ac_try) 2>&5
5755   ac_status=$?
5756   echo "$as_me:5756: \$? = $ac_status" >&5
5757   (exit $ac_status); }; }; then
5758   break
5759 else
5760   echo "$as_me: failed program was:" >&5
5761 cat conftest.$ac_ext >&5
5762 fi
5763 rm -f conftest.$ac_objext conftest.$ac_ext
5764                         done
5765                         CFLAGS="$cf_save_CFLAGS"
5766                         CC_SHARED_OPTS=$cf_shared_opts
5767                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5768                 else
5769                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5770                 fi
5771                 ;;
5772         sysv5uw7*|unix_sv*) #(vi
5773                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5774                 if test "$GCC" != yes; then
5775                         CC_SHARED_OPTS='-KPIC'
5776                 fi
5777                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5778                 ;;
5779         *)
5780                 CC_SHARED_OPTS='unknown'
5781                 MK_SHARED_LIB='echo unknown'
5782                 ;;
5783         esac
5784
5785         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5786         case "$cf_cv_shlib_version" in #(vi
5787         rel|abi)
5788                 case "$MK_SHARED_LIB" in #(vi
5789                 *'-o $@') #(vi
5790                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5791                         ;;
5792                 *)
5793                         { echo "$as_me:5793: WARNING: ignored --with-shlib-version" >&5
5794 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5795                         ;;
5796                 esac
5797                 ;;
5798         esac
5799
5800         if test -n "$cf_ld_rpath_opt" ; then
5801                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5802         fi
5803
5804 if test "$CC_SHARED_OPTS" = "unknown"; then
5805         for model in $cf_list_models; do
5806                 if test "$model" = "shared"; then
5807                         { { echo "$as_me:5807: error: Shared libraries are not supported in this version" >&5
5808 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5809    { (exit 1); exit 1; }; }
5810                 fi
5811         done
5812 fi
5813
5814 ### If we're building with rpath, try to link non-standard libs that way too.
5815 if test "$DFT_LWR_MODEL" = "shared"; then
5816
5817 echo "$as_me:5817: checking if rpath should be not be set" >&5
5818 echo $ECHO_N "checking if rpath should be not be set... $ECHO_C" >&6
5819
5820 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
5821 if test "${enable_rpath_hack+set}" = set; then
5822   enableval="$enable_rpath_hack"
5823   test "$enableval" != no && enableval=yes
5824   if test "$enableval" != "yes" ; then
5825     cf_disable_rpath_hack=yes
5826   else
5827     cf_disable_rpath_hack=no
5828   fi
5829 else
5830   enableval=yes
5831   cf_disable_rpath_hack=no
5832
5833 fi;
5834 echo "$as_me:5834: result: $cf_disable_rpath_hack" >&5
5835 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
5836 if test "$cf_disable_rpath_hack" = no ; then
5837
5838 echo "$as_me:5838: checking for updated LDFLAGS" >&5
5839 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
5840 if test -n "$LD_RPATH_OPT" ; then
5841         echo "$as_me:5841: result: maybe" >&5
5842 echo "${ECHO_T}maybe" >&6
5843
5844         for ac_prog in ldd
5845 do
5846   # Extract the first word of "$ac_prog", so it can be a program name with args.
5847 set dummy $ac_prog; ac_word=$2
5848 echo "$as_me:5848: checking for $ac_word" >&5
5849 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5850 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
5851   echo $ECHO_N "(cached) $ECHO_C" >&6
5852 else
5853   if test -n "$cf_ldd_prog"; then
5854   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
5855 else
5856   ac_save_IFS=$IFS; IFS=$ac_path_separator
5857 ac_dummy="$PATH"
5858 for ac_dir in $ac_dummy; do
5859   IFS=$ac_save_IFS
5860   test -z "$ac_dir" && ac_dir=.
5861   $as_executable_p "$ac_dir/$ac_word" || continue
5862 ac_cv_prog_cf_ldd_prog="$ac_prog"
5863 echo "$as_me:5863: found $ac_dir/$ac_word" >&5
5864 break
5865 done
5866
5867 fi
5868 fi
5869 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
5870 if test -n "$cf_ldd_prog"; then
5871   echo "$as_me:5871: result: $cf_ldd_prog" >&5
5872 echo "${ECHO_T}$cf_ldd_prog" >&6
5873 else
5874   echo "$as_me:5874: result: no" >&5
5875 echo "${ECHO_T}no" >&6
5876 fi
5877
5878   test -n "$cf_ldd_prog" && break
5879 done
5880 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
5881
5882         cf_rpath_list="/usr/lib /lib"
5883         if test "$cf_ldd_prog" != no
5884         then
5885 cat >conftest.$ac_ext <<_ACEOF
5886 #line 5886 "configure"
5887 #include "confdefs.h"
5888 #include <stdio.h>
5889 int
5890 main ()
5891 {
5892 printf("Hello");
5893   ;
5894   return 0;
5895 }
5896 _ACEOF
5897 rm -f conftest.$ac_objext conftest$ac_exeext
5898 if { (eval echo "$as_me:5898: \"$ac_link\"") >&5
5899   (eval $ac_link) 2>&5
5900   ac_status=$?
5901   echo "$as_me:5901: \$? = $ac_status" >&5
5902   (exit $ac_status); } &&
5903          { ac_try='test -s conftest$ac_exeext'
5904   { (eval echo "$as_me:5904: \"$ac_try\"") >&5
5905   (eval $ac_try) 2>&5
5906   ac_status=$?
5907   echo "$as_me:5907: \$? = $ac_status" >&5
5908   (exit $ac_status); }; }; then
5909   cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[     ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
5910 else
5911   echo "$as_me: failed program was:" >&5
5912 cat conftest.$ac_ext >&5
5913 fi
5914 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5915         fi
5916
5917         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
5918
5919 echo "${as_me-configure}:5919: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
5920
5921 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
5922
5923 echo "${as_me-configure}:5923: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
5924
5925 cf_rpath_dst=
5926 for cf_rpath_src in $LDFLAGS
5927 do
5928         case $cf_rpath_src in #(vi
5929         -L*) #(vi
5930
5931                 # check if this refers to a directory which we will ignore
5932                 cf_rpath_skip=no
5933                 if test -n "$cf_rpath_list"
5934                 then
5935                         for cf_rpath_item in $cf_rpath_list
5936                         do
5937                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
5938                                 then
5939                                         cf_rpath_skip=yes
5940                                         break
5941                                 fi
5942                         done
5943                 fi
5944
5945                 if test "$cf_rpath_skip" = no
5946                 then
5947                         # transform the option
5948                         if test "$LD_RPATH_OPT" = "-R " ; then
5949                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
5950                         else
5951                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
5952                         fi
5953
5954                         # if we have not already added this, add it now
5955                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
5956                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
5957                         then
5958                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
5959
5960 echo "${as_me-configure}:5960: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
5961
5962                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
5963                         fi
5964                 fi
5965                 ;;
5966         esac
5967         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
5968 done
5969 LDFLAGS=$cf_rpath_dst
5970
5971 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
5972
5973 echo "${as_me-configure}:5973: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
5974
5975 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
5976
5977 echo "${as_me-configure}:5977: testing ...checking LIBS $LIBS ..." 1>&5
5978
5979 cf_rpath_dst=
5980 for cf_rpath_src in $LIBS
5981 do
5982         case $cf_rpath_src in #(vi
5983         -L*) #(vi
5984
5985                 # check if this refers to a directory which we will ignore
5986                 cf_rpath_skip=no
5987                 if test -n "$cf_rpath_list"
5988                 then
5989                         for cf_rpath_item in $cf_rpath_list
5990                         do
5991                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
5992                                 then
5993                                         cf_rpath_skip=yes
5994                                         break
5995                                 fi
5996                         done
5997                 fi
5998
5999                 if test "$cf_rpath_skip" = no
6000                 then
6001                         # transform the option
6002                         if test "$LD_RPATH_OPT" = "-R " ; then
6003                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6004                         else
6005                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6006                         fi
6007
6008                         # if we have not already added this, add it now
6009                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6010                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6011                         then
6012                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6013
6014 echo "${as_me-configure}:6014: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6015
6016                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6017                         fi
6018                 fi
6019                 ;;
6020         esac
6021         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6022 done
6023 LIBS=$cf_rpath_dst
6024
6025 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6026
6027 echo "${as_me-configure}:6027: testing ...checked LIBS $LIBS ..." 1>&5
6028
6029         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6030
6031 echo "${as_me-configure}:6031: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6032
6033 fi
6034
6035 fi
6036
6037 fi
6038
6039 ###############################################################################
6040
6041 ###     use option --disable-overwrite to leave out the link to -lcurses
6042 echo "$as_me:6042: checking if you wish to install ncurses overwriting curses" >&5
6043 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6044
6045 # Check whether --enable-overwrite or --disable-overwrite was given.
6046 if test "${enable_overwrite+set}" = set; then
6047   enableval="$enable_overwrite"
6048   with_overwrite=$enableval
6049 else
6050   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6051 fi;
6052 echo "$as_me:6052: result: $with_overwrite" >&5
6053 echo "${ECHO_T}$with_overwrite" >&6
6054
6055 echo "$as_me:6055: checking if external terminfo-database is used" >&5
6056 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6057
6058 # Check whether --enable-database or --disable-database was given.
6059 if test "${enable_database+set}" = set; then
6060   enableval="$enable_database"
6061   use_database=$enableval
6062 else
6063   use_database=yes
6064 fi;
6065 echo "$as_me:6065: result: $use_database" >&5
6066 echo "${ECHO_T}$use_database" >&6
6067
6068 case $host_os in #(vi
6069 os2*) #(vi
6070         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6071         ;;
6072 *) #(vi
6073         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6074         ;;
6075 esac
6076
6077         case $cf_cv_system_name in
6078         os2*)   PATH_SEPARATOR=';'  ;;
6079         *)      PATH_SEPARATOR=':'  ;;
6080         esac
6081
6082 if test "$use_database" != no ; then
6083         cat >>confdefs.h <<\EOF
6084 #define USE_DATABASE 1
6085 EOF
6086
6087         echo "$as_me:6087: checking which terminfo source-file will be installed" >&5
6088 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6089
6090 # Check whether --with-database or --without-database was given.
6091 if test "${with_database+set}" = set; then
6092   withval="$with_database"
6093   TERMINFO_SRC=$withval
6094 fi;
6095         echo "$as_me:6095: result: $TERMINFO_SRC" >&5
6096 echo "${ECHO_T}$TERMINFO_SRC" >&6
6097
6098         echo "$as_me:6098: checking whether to use hashed database instead of directory/tree" >&5
6099 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6100
6101 # Check whether --with-hashed-db or --without-hashed-db was given.
6102 if test "${with_hashed_db+set}" = set; then
6103   withval="$with_hashed_db"
6104
6105 else
6106   with_hashed_db=no
6107 fi;
6108         echo "$as_me:6108: result: $with_hashed_db" >&5
6109 echo "${ECHO_T}$with_hashed_db" >&6
6110 else
6111         with_hashed_db=no
6112 fi
6113
6114 echo "$as_me:6114: checking for list of fallback descriptions" >&5
6115 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6116
6117 # Check whether --with-fallbacks or --without-fallbacks was given.
6118 if test "${with_fallbacks+set}" = set; then
6119   withval="$with_fallbacks"
6120   with_fallback=$withval
6121 else
6122   with_fallback=
6123 fi;
6124 echo "$as_me:6124: result: $with_fallback" >&5
6125 echo "${ECHO_T}$with_fallback" >&6
6126 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6127
6128 echo "$as_me:6128: checking if you want modern xterm or antique" >&5
6129 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6130
6131 # Check whether --with-xterm-new or --without-xterm-new was given.
6132 if test "${with_xterm_new+set}" = set; then
6133   withval="$with_xterm_new"
6134   with_xterm_new=$withval
6135 else
6136   with_xterm_new=yes
6137 fi;
6138 case $with_xterm_new in
6139 no)     with_xterm_new=xterm-old;;
6140 *)      with_xterm_new=xterm-new;;
6141 esac
6142 echo "$as_me:6142: result: $with_xterm_new" >&5
6143 echo "${ECHO_T}$with_xterm_new" >&6
6144 WHICH_XTERM=$with_xterm_new
6145
6146 MAKE_TERMINFO=
6147 if test "$use_database" = no ; then
6148         TERMINFO="${datadir}/terminfo"
6149         MAKE_TERMINFO="#"
6150 else
6151
6152 echo "$as_me:6152: checking for list of terminfo directories" >&5
6153 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6154
6155 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6156 if test "${with_terminfo_dirs+set}" = set; then
6157   withval="$with_terminfo_dirs"
6158
6159 else
6160   withval=${TERMINFO_DIRS-${datadir}/terminfo}
6161 fi;
6162 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6163 cf_dst_path=
6164 for cf_src_path in $withval
6165 do
6166
6167 if test "x$prefix" != xNONE; then
6168   cf_path_syntax="$prefix"
6169 else
6170   cf_path_syntax="$ac_default_prefix"
6171 fi
6172
6173 case ".$cf_src_path" in #(vi
6174 .\$\(*\)*|.\'*\'*) #(vi
6175   ;;
6176 ..|./*|.\\*) #(vi
6177   ;;
6178 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6179   ;;
6180 .\${*prefix}*) #(vi
6181   eval cf_src_path="$cf_src_path"
6182   case ".$cf_src_path" in #(vi
6183   .NONE/*)
6184     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6185     ;;
6186   esac
6187   ;; #(vi
6188 .no|.NONE/*)
6189   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6190   ;;
6191 *)
6192   { { echo "$as_me:6192: error: expected a pathname, not \"$cf_src_path\"" >&5
6193 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6194    { (exit 1); exit 1; }; }
6195   ;;
6196 esac
6197
6198   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6199   cf_dst_path="${cf_dst_path}${cf_src_path}"
6200 done
6201 IFS="$ac_save_ifs"
6202
6203 eval 'TERMINFO_DIRS="$cf_dst_path"'
6204
6205 echo "$as_me:6205: result: $TERMINFO_DIRS" >&5
6206 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6207 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
6208 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6209 EOF
6210
6211 echo "$as_me:6211: checking for default terminfo directory" >&5
6212 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6213
6214 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6215 if test "${with_default_terminfo_dir+set}" = set; then
6216   withval="$with_default_terminfo_dir"
6217
6218 else
6219   withval="${TERMINFO-${datadir}/terminfo}"
6220 fi; if test -n "${datadir}/terminfo" ; then
6221
6222 if test "x$prefix" != xNONE; then
6223   cf_path_syntax="$prefix"
6224 else
6225   cf_path_syntax="$ac_default_prefix"
6226 fi
6227
6228 case ".$withval" in #(vi
6229 .\$\(*\)*|.\'*\'*) #(vi
6230   ;;
6231 ..|./*|.\\*) #(vi
6232   ;;
6233 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6234   ;;
6235 .\${*prefix}*) #(vi
6236   eval withval="$withval"
6237   case ".$withval" in #(vi
6238   .NONE/*)
6239     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6240     ;;
6241   esac
6242   ;; #(vi
6243 .no|.NONE/*)
6244   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6245   ;;
6246 *)
6247   { { echo "$as_me:6247: error: expected a pathname, not \"$withval\"" >&5
6248 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6249    { (exit 1); exit 1; }; }
6250   ;;
6251 esac
6252
6253 fi
6254 TERMINFO="$withval"
6255
6256 echo "$as_me:6256: result: $TERMINFO" >&5
6257 echo "${ECHO_T}$TERMINFO" >&6
6258 cat >>confdefs.h <<EOF
6259 #define TERMINFO "$TERMINFO"
6260 EOF
6261
6262 fi
6263
6264 ###     use option --disable-big-core to make tic run on small machines
6265 ###     We need 4Mb, check if we can allocate 50% more than that.
6266 echo "$as_me:6266: checking if big-core option selected" >&5
6267 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6268
6269 # Check whether --enable-big-core or --disable-big-core was given.
6270 if test "${enable_big_core+set}" = set; then
6271   enableval="$enable_big_core"
6272   with_big_core=$enableval
6273 else
6274   if test "$cross_compiling" = yes; then
6275   with_big_core=no
6276 else
6277   cat >conftest.$ac_ext <<_ACEOF
6278 #line 6278 "configure"
6279 #include "confdefs.h"
6280
6281 #include <stdlib.h>
6282 #include <string.h>
6283 int main() {
6284         unsigned long n = 6000000L;
6285         char *s = malloc(n);
6286         if (s != 0)
6287                 s[0] = s[n-1] = 0;
6288         ${cf_cv_main_return:-return}(s == 0);
6289 }
6290 _ACEOF
6291 rm -f conftest$ac_exeext
6292 if { (eval echo "$as_me:6292: \"$ac_link\"") >&5
6293   (eval $ac_link) 2>&5
6294   ac_status=$?
6295   echo "$as_me:6295: \$? = $ac_status" >&5
6296   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6297   { (eval echo "$as_me:6297: \"$ac_try\"") >&5
6298   (eval $ac_try) 2>&5
6299   ac_status=$?
6300   echo "$as_me:6300: \$? = $ac_status" >&5
6301   (exit $ac_status); }; }; then
6302   with_big_core=yes
6303 else
6304   echo "$as_me: program exited with status $ac_status" >&5
6305 echo "$as_me: failed program was:" >&5
6306 cat conftest.$ac_ext >&5
6307 with_big_core=no
6308 fi
6309 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6310 fi
6311 fi;
6312 echo "$as_me:6312: result: $with_big_core" >&5
6313 echo "${ECHO_T}$with_big_core" >&6
6314 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6315 #define HAVE_BIG_CORE 1
6316 EOF
6317
6318 ### ISO C only guarantees 512-char strings, we have tables which load faster
6319 ### when constructed using "big" strings.  More than the C compiler, the awk
6320 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6321 echo "$as_me:6321: checking if big-strings option selected" >&5
6322 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6323
6324 # Check whether --enable-big-strings or --disable-big-strings was given.
6325 if test "${enable_big_strings+set}" = set; then
6326   enableval="$enable_big_strings"
6327   with_big_strings=$enableval
6328 else
6329
6330         case x$AWK in #(vi
6331         x)
6332                 eval with_big_strings=no
6333                 ;;
6334         *) #(vi
6335                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
6336                         | $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
6337                         eval with_big_strings=yes
6338                 else
6339                         eval with_big_strings=no
6340                 fi
6341                 ;;
6342         esac
6343
6344 fi;
6345 echo "$as_me:6345: result: $with_big_strings" >&5
6346 echo "${ECHO_T}$with_big_strings" >&6
6347
6348 USE_BIG_STRINGS=0
6349 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6350
6351 ###     use option --enable-termcap to compile in the termcap fallback support
6352 echo "$as_me:6352: checking if you want termcap-fallback support" >&5
6353 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6354
6355 # Check whether --enable-termcap or --disable-termcap was given.
6356 if test "${enable_termcap+set}" = set; then
6357   enableval="$enable_termcap"
6358   with_termcap=$enableval
6359 else
6360   with_termcap=no
6361 fi;
6362 echo "$as_me:6362: result: $with_termcap" >&5
6363 echo "${ECHO_T}$with_termcap" >&6
6364
6365 if test "$with_termcap" != "yes" ; then
6366         if test "$use_database" = no ; then
6367                 if test -z "$with_fallback" ; then
6368                         { { echo "$as_me:6368: error: You have disabled the database w/o specifying fallbacks" >&5
6369 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6370    { (exit 1); exit 1; }; }
6371                 fi
6372         fi
6373         cat >>confdefs.h <<\EOF
6374 #define PURE_TERMINFO 1
6375 EOF
6376
6377 else
6378
6379 if test "$with_ticlib" != no ; then
6380         { { echo "$as_me:6380: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6381 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6382    { (exit 1); exit 1; }; }
6383 fi
6384
6385 cat >>confdefs.h <<\EOF
6386 #define USE_TERMCAP 1
6387 EOF
6388
6389 echo "$as_me:6389: checking for list of termcap files" >&5
6390 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6391
6392 # Check whether --with-termpath or --without-termpath was given.
6393 if test "${with_termpath+set}" = set; then
6394   withval="$with_termpath"
6395
6396 else
6397   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
6398 fi;
6399 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6400 cf_dst_path=
6401 for cf_src_path in $withval
6402 do
6403
6404 if test "x$prefix" != xNONE; then
6405   cf_path_syntax="$prefix"
6406 else
6407   cf_path_syntax="$ac_default_prefix"
6408 fi
6409
6410 case ".$cf_src_path" in #(vi
6411 .\$\(*\)*|.\'*\'*) #(vi
6412   ;;
6413 ..|./*|.\\*) #(vi
6414   ;;
6415 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6416   ;;
6417 .\${*prefix}*) #(vi
6418   eval cf_src_path="$cf_src_path"
6419   case ".$cf_src_path" in #(vi
6420   .NONE/*)
6421     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6422     ;;
6423   esac
6424   ;; #(vi
6425 .no|.NONE/*)
6426   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6427   ;;
6428 *)
6429   { { echo "$as_me:6429: error: expected a pathname, not \"$cf_src_path\"" >&5
6430 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6431    { (exit 1); exit 1; }; }
6432   ;;
6433 esac
6434
6435   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6436   cf_dst_path="${cf_dst_path}${cf_src_path}"
6437 done
6438 IFS="$ac_save_ifs"
6439
6440 eval 'TERMPATH="$cf_dst_path"'
6441
6442 echo "$as_me:6442: result: $TERMPATH" >&5
6443 echo "${ECHO_T}$TERMPATH" >&6
6444 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6445 #define TERMPATH "$TERMPATH"
6446 EOF
6447
6448 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6449 echo "$as_me:6449: checking if fast termcap-loader is needed" >&5
6450 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6451
6452 # Check whether --enable-getcap or --disable-getcap was given.
6453 if test "${enable_getcap+set}" = set; then
6454   enableval="$enable_getcap"
6455   with_getcap=$enableval
6456 else
6457   with_getcap=no
6458 fi;
6459 echo "$as_me:6459: result: $with_getcap" >&5
6460 echo "${ECHO_T}$with_getcap" >&6
6461 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6462 #define USE_GETCAP 1
6463 EOF
6464
6465 echo "$as_me:6465: checking if translated termcaps will be cached in ~/.terminfo" >&5
6466 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6467
6468 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6469 if test "${enable_getcap_cache+set}" = set; then
6470   enableval="$enable_getcap_cache"
6471   with_getcap_cache=$enableval
6472 else
6473   with_getcap_cache=no
6474 fi;
6475 echo "$as_me:6475: result: $with_getcap_cache" >&5
6476 echo "${ECHO_T}$with_getcap_cache" >&6
6477 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6478 #define USE_GETCAP_CACHE 1
6479 EOF
6480
6481 fi
6482
6483 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6484 echo "$as_me:6484: checking if ~/.terminfo is wanted" >&5
6485 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6486
6487 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6488 if test "${enable_home_terminfo+set}" = set; then
6489   enableval="$enable_home_terminfo"
6490   with_home_terminfo=$enableval
6491 else
6492   with_home_terminfo=yes
6493 fi;
6494 echo "$as_me:6494: result: $with_home_terminfo" >&5
6495 echo "${ECHO_T}$with_home_terminfo" >&6
6496 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6497 #define USE_HOME_TERMINFO 1
6498 EOF
6499
6500 echo "$as_me:6500: checking if you want to use restricted environment when running as root" >&5
6501 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6502
6503 # Check whether --enable-root-environ or --disable-root-environ was given.
6504 if test "${enable_root_environ+set}" = set; then
6505   enableval="$enable_root_environ"
6506   with_root_environ=$enableval
6507 else
6508   with_root_environ=yes
6509 fi;
6510 echo "$as_me:6510: result: $with_root_environ" >&5
6511 echo "${ECHO_T}$with_root_environ" >&6
6512 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6513 #define USE_ROOT_ENVIRON 1
6514 EOF
6515
6516 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6517 ###   to reduce storage requirements for the terminfo database.
6518
6519 for ac_func in \
6520         remove \
6521         unlink
6522 do
6523 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6524 echo "$as_me:6524: checking for $ac_func" >&5
6525 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6526 if eval "test \"\${$as_ac_var+set}\" = set"; then
6527   echo $ECHO_N "(cached) $ECHO_C" >&6
6528 else
6529   cat >conftest.$ac_ext <<_ACEOF
6530 #line 6530 "configure"
6531 #include "confdefs.h"
6532 /* System header to define __stub macros and hopefully few prototypes,
6533     which can conflict with char $ac_func (); below.  */
6534 #include <assert.h>
6535 /* Override any gcc2 internal prototype to avoid an error.  */
6536 #ifdef __cplusplus
6537 extern "C"
6538 #endif
6539 /* We use char because int might match the return type of a gcc2
6540    builtin and then its argument prototype would still apply.  */
6541 char $ac_func ();
6542 char (*f) ();
6543
6544 int
6545 main ()
6546 {
6547 /* The GNU C library defines this for functions which it implements
6548     to always fail with ENOSYS.  Some functions are actually named
6549     something starting with __ and the normal name is an alias.  */
6550 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6551 choke me
6552 #else
6553 f = $ac_func;
6554 #endif
6555
6556   ;
6557   return 0;
6558 }
6559 _ACEOF
6560 rm -f conftest.$ac_objext conftest$ac_exeext
6561 if { (eval echo "$as_me:6561: \"$ac_link\"") >&5
6562   (eval $ac_link) 2>&5
6563   ac_status=$?
6564   echo "$as_me:6564: \$? = $ac_status" >&5
6565   (exit $ac_status); } &&
6566          { ac_try='test -s conftest$ac_exeext'
6567   { (eval echo "$as_me:6567: \"$ac_try\"") >&5
6568   (eval $ac_try) 2>&5
6569   ac_status=$?
6570   echo "$as_me:6570: \$? = $ac_status" >&5
6571   (exit $ac_status); }; }; then
6572   eval "$as_ac_var=yes"
6573 else
6574   echo "$as_me: failed program was:" >&5
6575 cat conftest.$ac_ext >&5
6576 eval "$as_ac_var=no"
6577 fi
6578 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6579 fi
6580 echo "$as_me:6580: result: `eval echo '${'$as_ac_var'}'`" >&5
6581 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6582 if test `eval echo '${'$as_ac_var'}'` = yes; then
6583   cat >>confdefs.h <<EOF
6584 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6585 EOF
6586
6587 fi
6588 done
6589
6590 if test "$cross_compiling" = yes ; then
6591
6592 for ac_func in \
6593                 link \
6594                 symlink
6595 do
6596 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6597 echo "$as_me:6597: checking for $ac_func" >&5
6598 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6599 if eval "test \"\${$as_ac_var+set}\" = set"; then
6600   echo $ECHO_N "(cached) $ECHO_C" >&6
6601 else
6602   cat >conftest.$ac_ext <<_ACEOF
6603 #line 6603 "configure"
6604 #include "confdefs.h"
6605 /* System header to define __stub macros and hopefully few prototypes,
6606     which can conflict with char $ac_func (); below.  */
6607 #include <assert.h>
6608 /* Override any gcc2 internal prototype to avoid an error.  */
6609 #ifdef __cplusplus
6610 extern "C"
6611 #endif
6612 /* We use char because int might match the return type of a gcc2
6613    builtin and then its argument prototype would still apply.  */
6614 char $ac_func ();
6615 char (*f) ();
6616
6617 int
6618 main ()
6619 {
6620 /* The GNU C library defines this for functions which it implements
6621     to always fail with ENOSYS.  Some functions are actually named
6622     something starting with __ and the normal name is an alias.  */
6623 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6624 choke me
6625 #else
6626 f = $ac_func;
6627 #endif
6628
6629   ;
6630   return 0;
6631 }
6632 _ACEOF
6633 rm -f conftest.$ac_objext conftest$ac_exeext
6634 if { (eval echo "$as_me:6634: \"$ac_link\"") >&5
6635   (eval $ac_link) 2>&5
6636   ac_status=$?
6637   echo "$as_me:6637: \$? = $ac_status" >&5
6638   (exit $ac_status); } &&
6639          { ac_try='test -s conftest$ac_exeext'
6640   { (eval echo "$as_me:6640: \"$ac_try\"") >&5
6641   (eval $ac_try) 2>&5
6642   ac_status=$?
6643   echo "$as_me:6643: \$? = $ac_status" >&5
6644   (exit $ac_status); }; }; then
6645   eval "$as_ac_var=yes"
6646 else
6647   echo "$as_me: failed program was:" >&5
6648 cat conftest.$ac_ext >&5
6649 eval "$as_ac_var=no"
6650 fi
6651 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6652 fi
6653 echo "$as_me:6653: result: `eval echo '${'$as_ac_var'}'`" >&5
6654 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6655 if test `eval echo '${'$as_ac_var'}'` = yes; then
6656   cat >>confdefs.h <<EOF
6657 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6658 EOF
6659
6660 fi
6661 done
6662
6663 else
6664         echo "$as_me:6664: checking if link/symlink functions work" >&5
6665 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6666 if test "${cf_cv_link_funcs+set}" = set; then
6667   echo $ECHO_N "(cached) $ECHO_C" >&6
6668 else
6669
6670                 cf_cv_link_funcs=
6671                 for cf_func in link symlink ; do
6672                         if test "$cross_compiling" = yes; then
6673
6674                         eval 'ac_cv_func_'$cf_func'=error'
6675 else
6676   cat >conftest.$ac_ext <<_ACEOF
6677 #line 6677 "configure"
6678 #include "confdefs.h"
6679
6680 #include <sys/types.h>
6681 #include <sys/stat.h>
6682 #ifdef HAVE_UNISTD_H
6683 #include <unistd.h>
6684 #endif
6685 int main()
6686 {
6687         int fail = 0;
6688         char *src = "config.log";
6689         char *dst = "conftest.chk";
6690         struct stat src_sb;
6691         struct stat dst_sb;
6692
6693         stat(src, &src_sb);
6694         fail = ($cf_func("config.log", "conftest.chk") < 0)
6695             || (stat(dst, &dst_sb) < 0)
6696             || (dst_sb.st_mtime != src_sb.st_mtime);
6697 #ifdef HAVE_UNLINK
6698         unlink(dst);
6699 #else
6700         remove(dst);
6701 #endif
6702         ${cf_cv_main_return:-return} (fail);
6703 }
6704
6705 _ACEOF
6706 rm -f conftest$ac_exeext
6707 if { (eval echo "$as_me:6707: \"$ac_link\"") >&5
6708   (eval $ac_link) 2>&5
6709   ac_status=$?
6710   echo "$as_me:6710: \$? = $ac_status" >&5
6711   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6712   { (eval echo "$as_me:6712: \"$ac_try\"") >&5
6713   (eval $ac_try) 2>&5
6714   ac_status=$?
6715   echo "$as_me:6715: \$? = $ac_status" >&5
6716   (exit $ac_status); }; }; then
6717
6718                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6719                         eval 'ac_cv_func_'$cf_func'=yes'
6720 else
6721   echo "$as_me: program exited with status $ac_status" >&5
6722 echo "$as_me: failed program was:" >&5
6723 cat conftest.$ac_ext >&5
6724
6725                         eval 'ac_cv_func_'$cf_func'=no'
6726 fi
6727 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6728 fi
6729                 done
6730                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6731
6732 fi
6733 echo "$as_me:6733: result: $cf_cv_link_funcs" >&5
6734 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6735         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6736 #define HAVE_LINK 1
6737 EOF
6738
6739         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6740 #define HAVE_SYMLINK 1
6741 EOF
6742
6743 fi
6744
6745 with_links=no
6746 with_symlinks=no
6747
6748 # soft links (symbolic links) are useful for some systems where hard links do
6749 # not work, or to make it simpler to copy terminfo trees around.
6750 if test "$ac_cv_func_symlink" = yes ; then
6751     echo "$as_me:6751: checking if tic should use symbolic links" >&5
6752 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6753
6754 # Check whether --enable-symlinks or --disable-symlinks was given.
6755 if test "${enable_symlinks+set}" = set; then
6756   enableval="$enable_symlinks"
6757   with_symlinks=$enableval
6758 else
6759   with_symlinks=no
6760 fi;
6761     echo "$as_me:6761: result: $with_symlinks" >&5
6762 echo "${ECHO_T}$with_symlinks" >&6
6763 fi
6764
6765 # If we have hard links and did not choose to use soft links instead, there is
6766 # no reason to make this choice optional - use the hard links.
6767 if test "$with_symlinks" = no ; then
6768     echo "$as_me:6768: checking if tic should use hard links" >&5
6769 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6770     if test "$ac_cv_func_link" = yes ; then
6771         with_links=yes
6772     else
6773         with_links=no
6774     fi
6775     echo "$as_me:6775: result: $with_links" >&5
6776 echo "${ECHO_T}$with_links" >&6
6777 fi
6778
6779 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6780 #define USE_LINKS 1
6781 EOF
6782
6783 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6784 #define USE_SYMLINKS 1
6785 EOF
6786
6787 ###   use option --enable-broken-linker to force on use of broken-linker support
6788 echo "$as_me:6788: checking if you want broken-linker support code" >&5
6789 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6790
6791 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6792 if test "${enable_broken_linker+set}" = set; then
6793   enableval="$enable_broken_linker"
6794   with_broken_linker=$enableval
6795 else
6796   with_broken_linker=${BROKEN_LINKER-no}
6797 fi;
6798 echo "$as_me:6798: result: $with_broken_linker" >&5
6799 echo "${ECHO_T}$with_broken_linker" >&6
6800
6801 BROKEN_LINKER=0
6802 if test "$with_broken_linker" = yes ; then
6803         cat >>confdefs.h <<\EOF
6804 #define BROKEN_LINKER 1
6805 EOF
6806
6807         BROKEN_LINKER=1
6808 elif test "$DFT_LWR_MODEL" = shared ; then
6809         case $cf_cv_system_name in #(vi
6810         cygwin*)
6811                 cat >>confdefs.h <<\EOF
6812 #define BROKEN_LINKER 1
6813 EOF
6814
6815                 BROKEN_LINKER=1
6816                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6817
6818 echo "${as_me-configure}:6818: testing cygwin linker is broken anyway ..." 1>&5
6819
6820                 ;;
6821         esac
6822 fi
6823
6824 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6825 echo "$as_me:6825: checking if tputs should process BSD-style prefix padding" >&5
6826 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6827
6828 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6829 if test "${enable_bsdpad+set}" = set; then
6830   enableval="$enable_bsdpad"
6831   with_bsdpad=$enableval
6832 else
6833   with_bsdpad=no
6834 fi;
6835 echo "$as_me:6835: result: $with_bsdpad" >&5
6836 echo "${ECHO_T}$with_bsdpad" >&6
6837 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6838 #define BSD_TPUTS 1
6839 EOF
6840
6841 ###   use option --enable-widec to turn on use of wide-character support
6842 NCURSES_CH_T=chtype
6843 NCURSES_LIBUTF8=0
6844
6845 NEED_WCHAR_H=0
6846 NCURSES_MBSTATE_T=0
6847 NCURSES_WCHAR_T=0
6848 NCURSES_WINT_T=0
6849
6850 # Check to define _XOPEN_SOURCE "automatically"
6851
6852 cf_XOPEN_SOURCE=500
6853 cf_POSIX_C_SOURCE=199506L
6854 cf_xopen_source=
6855
6856 case $host_os in #(vi
6857 aix[456]*) #(vi
6858         cf_xopen_source="-D_ALL_SOURCE"
6859         ;;
6860 darwin[0-8].*) #(vi
6861         cf_xopen_source="-D_APPLE_C_SOURCE"
6862         ;;
6863 darwin*) #(vi
6864         cf_xopen_source="-D_DARWIN_C_SOURCE"
6865         ;;
6866 freebsd*|dragonfly*) #(vi
6867         # 5.x headers associate
6868         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6869         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6870         cf_POSIX_C_SOURCE=200112L
6871         cf_XOPEN_SOURCE=600
6872         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6873         ;;
6874 hpux11*) #(vi
6875         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6876         ;;
6877 hpux*) #(vi
6878         cf_xopen_source="-D_HPUX_SOURCE"
6879         ;;
6880 irix[56].*) #(vi
6881         cf_xopen_source="-D_SGI_SOURCE"
6882         ;;
6883 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6884
6885 echo "$as_me:6885: checking if we must define _GNU_SOURCE" >&5
6886 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6887 if test "${cf_cv_gnu_source+set}" = set; then
6888   echo $ECHO_N "(cached) $ECHO_C" >&6
6889 else
6890
6891 cat >conftest.$ac_ext <<_ACEOF
6892 #line 6892 "configure"
6893 #include "confdefs.h"
6894 #include <sys/types.h>
6895 int
6896 main ()
6897 {
6898
6899 #ifndef _XOPEN_SOURCE
6900 make an error
6901 #endif
6902   ;
6903   return 0;
6904 }
6905 _ACEOF
6906 rm -f conftest.$ac_objext
6907 if { (eval echo "$as_me:6907: \"$ac_compile\"") >&5
6908   (eval $ac_compile) 2>&5
6909   ac_status=$?
6910   echo "$as_me:6910: \$? = $ac_status" >&5
6911   (exit $ac_status); } &&
6912          { ac_try='test -s conftest.$ac_objext'
6913   { (eval echo "$as_me:6913: \"$ac_try\"") >&5
6914   (eval $ac_try) 2>&5
6915   ac_status=$?
6916   echo "$as_me:6916: \$? = $ac_status" >&5
6917   (exit $ac_status); }; }; then
6918   cf_cv_gnu_source=no
6919 else
6920   echo "$as_me: failed program was:" >&5
6921 cat conftest.$ac_ext >&5
6922 cf_save="$CPPFLAGS"
6923          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6924          cat >conftest.$ac_ext <<_ACEOF
6925 #line 6925 "configure"
6926 #include "confdefs.h"
6927 #include <sys/types.h>
6928 int
6929 main ()
6930 {
6931
6932 #ifdef _XOPEN_SOURCE
6933 make an error
6934 #endif
6935   ;
6936   return 0;
6937 }
6938 _ACEOF
6939 rm -f conftest.$ac_objext
6940 if { (eval echo "$as_me:6940: \"$ac_compile\"") >&5
6941   (eval $ac_compile) 2>&5
6942   ac_status=$?
6943   echo "$as_me:6943: \$? = $ac_status" >&5
6944   (exit $ac_status); } &&
6945          { ac_try='test -s conftest.$ac_objext'
6946   { (eval echo "$as_me:6946: \"$ac_try\"") >&5
6947   (eval $ac_try) 2>&5
6948   ac_status=$?
6949   echo "$as_me:6949: \$? = $ac_status" >&5
6950   (exit $ac_status); }; }; then
6951   cf_cv_gnu_source=no
6952 else
6953   echo "$as_me: failed program was:" >&5
6954 cat conftest.$ac_ext >&5
6955 cf_cv_gnu_source=yes
6956 fi
6957 rm -f conftest.$ac_objext conftest.$ac_ext
6958         CPPFLAGS="$cf_save"
6959
6960 fi
6961 rm -f conftest.$ac_objext conftest.$ac_ext
6962
6963 fi
6964 echo "$as_me:6964: result: $cf_cv_gnu_source" >&5
6965 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6966 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6967
6968         ;;
6969 mirbsd*) #(vi
6970         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6971         ;;
6972 netbsd*) #(vi
6973         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6974         ;;
6975 openbsd*) #(vi
6976         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6977         ;;
6978 osf[45]*) #(vi
6979         cf_xopen_source="-D_OSF_SOURCE"
6980         ;;
6981 nto-qnx*) #(vi
6982         cf_xopen_source="-D_QNX_SOURCE"
6983         ;;
6984 sco*) #(vi
6985         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6986         ;;
6987 solaris2.1[0-9]) #(vi
6988         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6989         ;;
6990 solaris2.[1-9]) #(vi
6991         cf_xopen_source="-D__EXTENSIONS__"
6992         ;;
6993 *)
6994         echo "$as_me:6994: checking if we should define _XOPEN_SOURCE" >&5
6995 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6996 if test "${cf_cv_xopen_source+set}" = set; then
6997   echo $ECHO_N "(cached) $ECHO_C" >&6
6998 else
6999
7000         cat >conftest.$ac_ext <<_ACEOF
7001 #line 7001 "configure"
7002 #include "confdefs.h"
7003 #include <sys/types.h>
7004 int
7005 main ()
7006 {
7007
7008 #ifndef _XOPEN_SOURCE
7009 make an error
7010 #endif
7011   ;
7012   return 0;
7013 }
7014 _ACEOF
7015 rm -f conftest.$ac_objext
7016 if { (eval echo "$as_me:7016: \"$ac_compile\"") >&5
7017   (eval $ac_compile) 2>&5
7018   ac_status=$?
7019   echo "$as_me:7019: \$? = $ac_status" >&5
7020   (exit $ac_status); } &&
7021          { ac_try='test -s conftest.$ac_objext'
7022   { (eval echo "$as_me:7022: \"$ac_try\"") >&5
7023   (eval $ac_try) 2>&5
7024   ac_status=$?
7025   echo "$as_me:7025: \$? = $ac_status" >&5
7026   (exit $ac_status); }; }; then
7027   cf_cv_xopen_source=no
7028 else
7029   echo "$as_me: failed program was:" >&5
7030 cat conftest.$ac_ext >&5
7031 cf_save="$CPPFLAGS"
7032          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7033          cat >conftest.$ac_ext <<_ACEOF
7034 #line 7034 "configure"
7035 #include "confdefs.h"
7036 #include <sys/types.h>
7037 int
7038 main ()
7039 {
7040
7041 #ifdef _XOPEN_SOURCE
7042 make an error
7043 #endif
7044   ;
7045   return 0;
7046 }
7047 _ACEOF
7048 rm -f conftest.$ac_objext
7049 if { (eval echo "$as_me:7049: \"$ac_compile\"") >&5
7050   (eval $ac_compile) 2>&5
7051   ac_status=$?
7052   echo "$as_me:7052: \$? = $ac_status" >&5
7053   (exit $ac_status); } &&
7054          { ac_try='test -s conftest.$ac_objext'
7055   { (eval echo "$as_me:7055: \"$ac_try\"") >&5
7056   (eval $ac_try) 2>&5
7057   ac_status=$?
7058   echo "$as_me:7058: \$? = $ac_status" >&5
7059   (exit $ac_status); }; }; then
7060   cf_cv_xopen_source=no
7061 else
7062   echo "$as_me: failed program was:" >&5
7063 cat conftest.$ac_ext >&5
7064 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7065 fi
7066 rm -f conftest.$ac_objext conftest.$ac_ext
7067         CPPFLAGS="$cf_save"
7068
7069 fi
7070 rm -f conftest.$ac_objext conftest.$ac_ext
7071
7072 fi
7073 echo "$as_me:7073: result: $cf_cv_xopen_source" >&5
7074 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7075         if test "$cf_cv_xopen_source" != no ; then
7076
7077 CFLAGS=`echo "$CFLAGS" | \
7078         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7079                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7080
7081 CPPFLAGS=`echo "$CPPFLAGS" | \
7082         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7083                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7084
7085                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7086
7087 cf_fix_cppflags=no
7088 cf_new_cflags=
7089 cf_new_cppflags=
7090 cf_new_extra_cppflags=
7091
7092 for cf_add_cflags in $cf_temp_xopen_source
7093 do
7094 case $cf_fix_cppflags in
7095 no)
7096         case $cf_add_cflags in #(vi
7097         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7098                 case $cf_add_cflags in
7099                 -D*)
7100                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7101
7102                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7103                                 && test -z "${cf_tst_cflags}" \
7104                                 && cf_fix_cppflags=yes
7105
7106                         if test $cf_fix_cppflags = yes ; then
7107                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7108                                 continue
7109                         elif test "${cf_tst_cflags}" = "\"'" ; then
7110                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7111                                 continue
7112                         fi
7113                         ;;
7114                 esac
7115                 case "$CPPFLAGS" in
7116                 *$cf_add_cflags) #(vi
7117                         ;;
7118                 *) #(vi
7119                         case $cf_add_cflags in #(vi
7120                         -D*)
7121                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7122
7123 CPPFLAGS=`echo "$CPPFLAGS" | \
7124         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7125                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7126
7127                                 ;;
7128                         esac
7129                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7130                         ;;
7131                 esac
7132                 ;;
7133         *)
7134                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7135                 ;;
7136         esac
7137         ;;
7138 yes)
7139         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7140
7141         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7142
7143         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7144                 && test -z "${cf_tst_cflags}" \
7145                 && cf_fix_cppflags=no
7146         ;;
7147 esac
7148 done
7149
7150 if test -n "$cf_new_cflags" ; then
7151
7152         CFLAGS="$CFLAGS $cf_new_cflags"
7153 fi
7154
7155 if test -n "$cf_new_cppflags" ; then
7156
7157         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7158 fi
7159
7160 if test -n "$cf_new_extra_cppflags" ; then
7161
7162         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7163 fi
7164
7165         fi
7166
7167 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7168
7169 cf_save_CFLAGS="$CFLAGS"
7170 cf_save_CPPFLAGS="$CPPFLAGS"
7171
7172 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7173         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7174                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7175
7176 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7177         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7178                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7179
7180 echo "$as_me:7180: checking if we should define _POSIX_C_SOURCE" >&5
7181 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7182 if test "${cf_cv_posix_c_source+set}" = set; then
7183   echo $ECHO_N "(cached) $ECHO_C" >&6
7184 else
7185
7186 echo "${as_me-configure}:7186: testing if the symbol is already defined go no further ..." 1>&5
7187
7188         cat >conftest.$ac_ext <<_ACEOF
7189 #line 7189 "configure"
7190 #include "confdefs.h"
7191 #include <sys/types.h>
7192 int
7193 main ()
7194 {
7195
7196 #ifndef _POSIX_C_SOURCE
7197 make an error
7198 #endif
7199   ;
7200   return 0;
7201 }
7202 _ACEOF
7203 rm -f conftest.$ac_objext
7204 if { (eval echo "$as_me:7204: \"$ac_compile\"") >&5
7205   (eval $ac_compile) 2>&5
7206   ac_status=$?
7207   echo "$as_me:7207: \$? = $ac_status" >&5
7208   (exit $ac_status); } &&
7209          { ac_try='test -s conftest.$ac_objext'
7210   { (eval echo "$as_me:7210: \"$ac_try\"") >&5
7211   (eval $ac_try) 2>&5
7212   ac_status=$?
7213   echo "$as_me:7213: \$? = $ac_status" >&5
7214   (exit $ac_status); }; }; then
7215   cf_cv_posix_c_source=no
7216 else
7217   echo "$as_me: failed program was:" >&5
7218 cat conftest.$ac_ext >&5
7219 cf_want_posix_source=no
7220          case .$cf_POSIX_C_SOURCE in #(vi
7221          .[12]??*) #(vi
7222                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7223                 ;;
7224          .2) #(vi
7225                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7226                 cf_want_posix_source=yes
7227                 ;;
7228          .*)
7229                 cf_want_posix_source=yes
7230                 ;;
7231          esac
7232          if test "$cf_want_posix_source" = yes ; then
7233                 cat >conftest.$ac_ext <<_ACEOF
7234 #line 7234 "configure"
7235 #include "confdefs.h"
7236 #include <sys/types.h>
7237 int
7238 main ()
7239 {
7240
7241 #ifdef _POSIX_SOURCE
7242 make an error
7243 #endif
7244   ;
7245   return 0;
7246 }
7247 _ACEOF
7248 rm -f conftest.$ac_objext
7249 if { (eval echo "$as_me:7249: \"$ac_compile\"") >&5
7250   (eval $ac_compile) 2>&5
7251   ac_status=$?
7252   echo "$as_me:7252: \$? = $ac_status" >&5
7253   (exit $ac_status); } &&
7254          { ac_try='test -s conftest.$ac_objext'
7255   { (eval echo "$as_me:7255: \"$ac_try\"") >&5
7256   (eval $ac_try) 2>&5
7257   ac_status=$?
7258   echo "$as_me:7258: \$? = $ac_status" >&5
7259   (exit $ac_status); }; }; then
7260   :
7261 else
7262   echo "$as_me: failed program was:" >&5
7263 cat conftest.$ac_ext >&5
7264 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7265 fi
7266 rm -f conftest.$ac_objext conftest.$ac_ext
7267          fi
7268
7269 echo "${as_me-configure}:7269: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7270
7271          CFLAGS="$cf_trim_CFLAGS"
7272          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7273
7274 echo "${as_me-configure}:7274: testing if the second compile does not leave our definition intact error ..." 1>&5
7275
7276          cat >conftest.$ac_ext <<_ACEOF
7277 #line 7277 "configure"
7278 #include "confdefs.h"
7279 #include <sys/types.h>
7280 int
7281 main ()
7282 {
7283
7284 #ifndef _POSIX_C_SOURCE
7285 make an error
7286 #endif
7287   ;
7288   return 0;
7289 }
7290 _ACEOF
7291 rm -f conftest.$ac_objext
7292 if { (eval echo "$as_me:7292: \"$ac_compile\"") >&5
7293   (eval $ac_compile) 2>&5
7294   ac_status=$?
7295   echo "$as_me:7295: \$? = $ac_status" >&5
7296   (exit $ac_status); } &&
7297          { ac_try='test -s conftest.$ac_objext'
7298   { (eval echo "$as_me:7298: \"$ac_try\"") >&5
7299   (eval $ac_try) 2>&5
7300   ac_status=$?
7301   echo "$as_me:7301: \$? = $ac_status" >&5
7302   (exit $ac_status); }; }; then
7303   :
7304 else
7305   echo "$as_me: failed program was:" >&5
7306 cat conftest.$ac_ext >&5
7307 cf_cv_posix_c_source=no
7308 fi
7309 rm -f conftest.$ac_objext conftest.$ac_ext
7310          CFLAGS="$cf_save_CFLAGS"
7311          CPPFLAGS="$cf_save_CPPFLAGS"
7312
7313 fi
7314 rm -f conftest.$ac_objext conftest.$ac_ext
7315
7316 fi
7317 echo "$as_me:7317: result: $cf_cv_posix_c_source" >&5
7318 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7319
7320 if test "$cf_cv_posix_c_source" != no ; then
7321         CFLAGS="$cf_trim_CFLAGS"
7322         CPPFLAGS="$cf_trim_CPPFLAGS"
7323
7324 cf_fix_cppflags=no
7325 cf_new_cflags=
7326 cf_new_cppflags=
7327 cf_new_extra_cppflags=
7328
7329 for cf_add_cflags in $cf_cv_posix_c_source
7330 do
7331 case $cf_fix_cppflags in
7332 no)
7333         case $cf_add_cflags in #(vi
7334         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7335                 case $cf_add_cflags in
7336                 -D*)
7337                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7338
7339                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7340                                 && test -z "${cf_tst_cflags}" \
7341                                 && cf_fix_cppflags=yes
7342
7343                         if test $cf_fix_cppflags = yes ; then
7344                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7345                                 continue
7346                         elif test "${cf_tst_cflags}" = "\"'" ; then
7347                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7348                                 continue
7349                         fi
7350                         ;;
7351                 esac
7352                 case "$CPPFLAGS" in
7353                 *$cf_add_cflags) #(vi
7354                         ;;
7355                 *) #(vi
7356                         case $cf_add_cflags in #(vi
7357                         -D*)
7358                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7359
7360 CPPFLAGS=`echo "$CPPFLAGS" | \
7361         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7362                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7363
7364                                 ;;
7365                         esac
7366                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7367                         ;;
7368                 esac
7369                 ;;
7370         *)
7371                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7372                 ;;
7373         esac
7374         ;;
7375 yes)
7376         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7377
7378         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7379
7380         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7381                 && test -z "${cf_tst_cflags}" \
7382                 && cf_fix_cppflags=no
7383         ;;
7384 esac
7385 done
7386
7387 if test -n "$cf_new_cflags" ; then
7388
7389         CFLAGS="$CFLAGS $cf_new_cflags"
7390 fi
7391
7392 if test -n "$cf_new_cppflags" ; then
7393
7394         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7395 fi
7396
7397 if test -n "$cf_new_extra_cppflags" ; then
7398
7399         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7400 fi
7401
7402 fi
7403
7404         ;;
7405 esac
7406
7407 if test -n "$cf_xopen_source" ; then
7408
7409 cf_fix_cppflags=no
7410 cf_new_cflags=
7411 cf_new_cppflags=
7412 cf_new_extra_cppflags=
7413
7414 for cf_add_cflags in $cf_xopen_source
7415 do
7416 case $cf_fix_cppflags in
7417 no)
7418         case $cf_add_cflags in #(vi
7419         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7420                 case $cf_add_cflags in
7421                 -D*)
7422                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7423
7424                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7425                                 && test -z "${cf_tst_cflags}" \
7426                                 && cf_fix_cppflags=yes
7427
7428                         if test $cf_fix_cppflags = yes ; then
7429                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7430                                 continue
7431                         elif test "${cf_tst_cflags}" = "\"'" ; then
7432                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7433                                 continue
7434                         fi
7435                         ;;
7436                 esac
7437                 case "$CPPFLAGS" in
7438                 *$cf_add_cflags) #(vi
7439                         ;;
7440                 *) #(vi
7441                         case $cf_add_cflags in #(vi
7442                         -D*)
7443                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7444
7445 CPPFLAGS=`echo "$CPPFLAGS" | \
7446         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7447                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7448
7449                                 ;;
7450                         esac
7451                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7452                         ;;
7453                 esac
7454                 ;;
7455         *)
7456                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7457                 ;;
7458         esac
7459         ;;
7460 yes)
7461         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7462
7463         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7464
7465         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7466                 && test -z "${cf_tst_cflags}" \
7467                 && cf_fix_cppflags=no
7468         ;;
7469 esac
7470 done
7471
7472 if test -n "$cf_new_cflags" ; then
7473
7474         CFLAGS="$CFLAGS $cf_new_cflags"
7475 fi
7476
7477 if test -n "$cf_new_cppflags" ; then
7478
7479         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7480 fi
7481
7482 if test -n "$cf_new_extra_cppflags" ; then
7483
7484         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7485 fi
7486
7487 fi
7488
7489 # Work around breakage on OS X
7490
7491 echo "$as_me:7491: checking if SIGWINCH is defined" >&5
7492 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
7493 if test "${cf_cv_define_sigwinch+set}" = set; then
7494   echo $ECHO_N "(cached) $ECHO_C" >&6
7495 else
7496
7497         cat >conftest.$ac_ext <<_ACEOF
7498 #line 7498 "configure"
7499 #include "confdefs.h"
7500
7501 #include <sys/types.h>
7502 #include <sys/signal.h>
7503
7504 int
7505 main ()
7506 {
7507 int x = SIGWINCH
7508   ;
7509   return 0;
7510 }
7511 _ACEOF
7512 rm -f conftest.$ac_objext
7513 if { (eval echo "$as_me:7513: \"$ac_compile\"") >&5
7514   (eval $ac_compile) 2>&5
7515   ac_status=$?
7516   echo "$as_me:7516: \$? = $ac_status" >&5
7517   (exit $ac_status); } &&
7518          { ac_try='test -s conftest.$ac_objext'
7519   { (eval echo "$as_me:7519: \"$ac_try\"") >&5
7520   (eval $ac_try) 2>&5
7521   ac_status=$?
7522   echo "$as_me:7522: \$? = $ac_status" >&5
7523   (exit $ac_status); }; }; then
7524   cf_cv_define_sigwinch=yes
7525 else
7526   echo "$as_me: failed program was:" >&5
7527 cat conftest.$ac_ext >&5
7528 cat >conftest.$ac_ext <<_ACEOF
7529 #line 7529 "configure"
7530 #include "confdefs.h"
7531
7532 #undef _XOPEN_SOURCE
7533 #undef _POSIX_SOURCE
7534 #undef _POSIX_C_SOURCE
7535 #include <sys/types.h>
7536 #include <sys/signal.h>
7537
7538 int
7539 main ()
7540 {
7541 int x = SIGWINCH
7542   ;
7543   return 0;
7544 }
7545 _ACEOF
7546 rm -f conftest.$ac_objext
7547 if { (eval echo "$as_me:7547: \"$ac_compile\"") >&5
7548   (eval $ac_compile) 2>&5
7549   ac_status=$?
7550   echo "$as_me:7550: \$? = $ac_status" >&5
7551   (exit $ac_status); } &&
7552          { ac_try='test -s conftest.$ac_objext'
7553   { (eval echo "$as_me:7553: \"$ac_try\"") >&5
7554   (eval $ac_try) 2>&5
7555   ac_status=$?
7556   echo "$as_me:7556: \$? = $ac_status" >&5
7557   (exit $ac_status); }; }; then
7558   cf_cv_define_sigwinch=maybe
7559 else
7560   echo "$as_me: failed program was:" >&5
7561 cat conftest.$ac_ext >&5
7562 cf_cv_define_sigwinch=no
7563 fi
7564 rm -f conftest.$ac_objext conftest.$ac_ext
7565
7566 fi
7567 rm -f conftest.$ac_objext conftest.$ac_ext
7568
7569 fi
7570 echo "$as_me:7570: result: $cf_cv_define_sigwinch" >&5
7571 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
7572
7573 if test "$cf_cv_define_sigwinch" = maybe ; then
7574 echo "$as_me:7574: checking for actual SIGWINCH definition" >&5
7575 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
7576 if test "${cf_cv_fixup_sigwinch+set}" = set; then
7577   echo $ECHO_N "(cached) $ECHO_C" >&6
7578 else
7579
7580 cf_cv_fixup_sigwinch=unknown
7581 cf_sigwinch=32
7582 while test $cf_sigwinch != 1
7583 do
7584         cat >conftest.$ac_ext <<_ACEOF
7585 #line 7585 "configure"
7586 #include "confdefs.h"
7587
7588 #undef _XOPEN_SOURCE
7589 #undef _POSIX_SOURCE
7590 #undef _POSIX_C_SOURCE
7591 #include <sys/types.h>
7592 #include <sys/signal.h>
7593
7594 int
7595 main ()
7596 {
7597
7598 #if SIGWINCH != $cf_sigwinch
7599 make an error
7600 #endif
7601 int x = SIGWINCH
7602   ;
7603   return 0;
7604 }
7605 _ACEOF
7606 rm -f conftest.$ac_objext
7607 if { (eval echo "$as_me:7607: \"$ac_compile\"") >&5
7608   (eval $ac_compile) 2>&5
7609   ac_status=$?
7610   echo "$as_me:7610: \$? = $ac_status" >&5
7611   (exit $ac_status); } &&
7612          { ac_try='test -s conftest.$ac_objext'
7613   { (eval echo "$as_me:7613: \"$ac_try\"") >&5
7614   (eval $ac_try) 2>&5
7615   ac_status=$?
7616   echo "$as_me:7616: \$? = $ac_status" >&5
7617   (exit $ac_status); }; }; then
7618   cf_cv_fixup_sigwinch=$cf_sigwinch
7619          break
7620 else
7621   echo "$as_me: failed program was:" >&5
7622 cat conftest.$ac_ext >&5
7623 fi
7624 rm -f conftest.$ac_objext conftest.$ac_ext
7625
7626 cf_sigwinch=`expr $cf_sigwinch - 1`
7627 done
7628
7629 fi
7630 echo "$as_me:7630: result: $cf_cv_fixup_sigwinch" >&5
7631 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7632
7633         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7634                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7635         fi
7636 fi
7637
7638 # Checks for CODESET support.
7639
7640   echo "$as_me:7640: checking for nl_langinfo and CODESET" >&5
7641 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7642 if test "${am_cv_langinfo_codeset+set}" = set; then
7643   echo $ECHO_N "(cached) $ECHO_C" >&6
7644 else
7645   cat >conftest.$ac_ext <<_ACEOF
7646 #line 7646 "configure"
7647 #include "confdefs.h"
7648 #include <langinfo.h>
7649 int
7650 main ()
7651 {
7652 char* cs = nl_langinfo(CODESET);
7653   ;
7654   return 0;
7655 }
7656 _ACEOF
7657 rm -f conftest.$ac_objext conftest$ac_exeext
7658 if { (eval echo "$as_me:7658: \"$ac_link\"") >&5
7659   (eval $ac_link) 2>&5
7660   ac_status=$?
7661   echo "$as_me:7661: \$? = $ac_status" >&5
7662   (exit $ac_status); } &&
7663          { ac_try='test -s conftest$ac_exeext'
7664   { (eval echo "$as_me:7664: \"$ac_try\"") >&5
7665   (eval $ac_try) 2>&5
7666   ac_status=$?
7667   echo "$as_me:7667: \$? = $ac_status" >&5
7668   (exit $ac_status); }; }; then
7669   am_cv_langinfo_codeset=yes
7670 else
7671   echo "$as_me: failed program was:" >&5
7672 cat conftest.$ac_ext >&5
7673 am_cv_langinfo_codeset=no
7674 fi
7675 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7676
7677 fi
7678 echo "$as_me:7678: result: $am_cv_langinfo_codeset" >&5
7679 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7680   if test $am_cv_langinfo_codeset = yes; then
7681
7682 cat >>confdefs.h <<\EOF
7683 #define HAVE_LANGINFO_CODESET 1
7684 EOF
7685
7686   fi
7687
7688 # use these variables to work around a defect in gcc's fixincludes.
7689 NCURSES_OK_WCHAR_T=
7690 NCURSES_OK_WINT_T=
7691
7692 echo "$as_me:7692: checking if you want wide-character code" >&5
7693 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7694
7695 # Check whether --enable-widec or --disable-widec was given.
7696 if test "${enable_widec+set}" = set; then
7697   enableval="$enable_widec"
7698   with_widec=$enableval
7699 else
7700   with_widec=no
7701 fi;
7702 echo "$as_me:7702: result: $with_widec" >&5
7703 echo "${ECHO_T}$with_widec" >&6
7704 if test "$with_widec" = yes ; then
7705         LIB_SUFFIX="w${LIB_SUFFIX}"
7706         cat >>confdefs.h <<\EOF
7707 #define USE_WIDEC_SUPPORT 1
7708 EOF
7709
7710         case "$CFLAGS $CPPFLAGS" in #(vi
7711         *-D_XOPEN_SOURCE=500) #(vi
7712                 ;;
7713         *)
7714
7715 echo "$as_me:7715: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7716 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7717 cat >conftest.$ac_ext <<_ACEOF
7718 #line 7718 "configure"
7719 #include "confdefs.h"
7720 #include <sys/types.h>
7721
7722 int
7723 main ()
7724 {
7725
7726 #ifndef _XOPEN_SOURCE_EXTENDED
7727 make an error
7728 #endif
7729   ;
7730   return 0;
7731 }
7732 _ACEOF
7733 rm -f conftest.$ac_objext
7734 if { (eval echo "$as_me:7734: \"$ac_compile\"") >&5
7735   (eval $ac_compile) 2>&5
7736   ac_status=$?
7737   echo "$as_me:7737: \$? = $ac_status" >&5
7738   (exit $ac_status); } &&
7739          { ac_try='test -s conftest.$ac_objext'
7740   { (eval echo "$as_me:7740: \"$ac_try\"") >&5
7741   (eval $ac_try) 2>&5
7742   ac_status=$?
7743   echo "$as_me:7743: \$? = $ac_status" >&5
7744   (exit $ac_status); }; }; then
7745   cf_result=no
7746 else
7747   echo "$as_me: failed program was:" >&5
7748 cat conftest.$ac_ext >&5
7749 cf_result=yes
7750 fi
7751 rm -f conftest.$ac_objext conftest.$ac_ext
7752 echo "$as_me:7752: result: $cf_result" >&5
7753 echo "${ECHO_T}$cf_result" >&6
7754
7755 if test "$cf_result" = yes ; then
7756         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7757 elif test "x" != "x" ; then
7758         echo "$as_me:7758: checking checking for compatible value versus " >&5
7759 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7760         cat >conftest.$ac_ext <<_ACEOF
7761 #line 7761 "configure"
7762 #include "confdefs.h"
7763 #include <sys/types.h>
7764
7765 int
7766 main ()
7767 {
7768
7769 #if _XOPEN_SOURCE_EXTENDED- < 0
7770 make an error
7771 #endif
7772   ;
7773   return 0;
7774 }
7775 _ACEOF
7776 rm -f conftest.$ac_objext
7777 if { (eval echo "$as_me:7777: \"$ac_compile\"") >&5
7778   (eval $ac_compile) 2>&5
7779   ac_status=$?
7780   echo "$as_me:7780: \$? = $ac_status" >&5
7781   (exit $ac_status); } &&
7782          { ac_try='test -s conftest.$ac_objext'
7783   { (eval echo "$as_me:7783: \"$ac_try\"") >&5
7784   (eval $ac_try) 2>&5
7785   ac_status=$?
7786   echo "$as_me:7786: \$? = $ac_status" >&5
7787   (exit $ac_status); }; }; then
7788   cf_result=yes
7789 else
7790   echo "$as_me: failed program was:" >&5
7791 cat conftest.$ac_ext >&5
7792 cf_result=no
7793 fi
7794 rm -f conftest.$ac_objext conftest.$ac_ext
7795         echo "$as_me:7795: result: $cf_result" >&5
7796 echo "${ECHO_T}$cf_result" >&6
7797         if test "$cf_result" = no ; then
7798                 # perhaps we can override it - try...
7799                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7800         fi
7801 fi
7802
7803                 ;;
7804         esac
7805
7806         # with_overwrite=no
7807         NCURSES_CH_T=cchar_t
7808
7809 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7810 do
7811 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7812 echo "$as_me:7812: checking for $ac_func" >&5
7813 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7814 if eval "test \"\${$as_ac_var+set}\" = set"; then
7815   echo $ECHO_N "(cached) $ECHO_C" >&6
7816 else
7817   cat >conftest.$ac_ext <<_ACEOF
7818 #line 7818 "configure"
7819 #include "confdefs.h"
7820 /* System header to define __stub macros and hopefully few prototypes,
7821     which can conflict with char $ac_func (); below.  */
7822 #include <assert.h>
7823 /* Override any gcc2 internal prototype to avoid an error.  */
7824 #ifdef __cplusplus
7825 extern "C"
7826 #endif
7827 /* We use char because int might match the return type of a gcc2
7828    builtin and then its argument prototype would still apply.  */
7829 char $ac_func ();
7830 char (*f) ();
7831
7832 int
7833 main ()
7834 {
7835 /* The GNU C library defines this for functions which it implements
7836     to always fail with ENOSYS.  Some functions are actually named
7837     something starting with __ and the normal name is an alias.  */
7838 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7839 choke me
7840 #else
7841 f = $ac_func;
7842 #endif
7843
7844   ;
7845   return 0;
7846 }
7847 _ACEOF
7848 rm -f conftest.$ac_objext conftest$ac_exeext
7849 if { (eval echo "$as_me:7849: \"$ac_link\"") >&5
7850   (eval $ac_link) 2>&5
7851   ac_status=$?
7852   echo "$as_me:7852: \$? = $ac_status" >&5
7853   (exit $ac_status); } &&
7854          { ac_try='test -s conftest$ac_exeext'
7855   { (eval echo "$as_me:7855: \"$ac_try\"") >&5
7856   (eval $ac_try) 2>&5
7857   ac_status=$?
7858   echo "$as_me:7858: \$? = $ac_status" >&5
7859   (exit $ac_status); }; }; then
7860   eval "$as_ac_var=yes"
7861 else
7862   echo "$as_me: failed program was:" >&5
7863 cat conftest.$ac_ext >&5
7864 eval "$as_ac_var=no"
7865 fi
7866 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7867 fi
7868 echo "$as_me:7868: result: `eval echo '${'$as_ac_var'}'`" >&5
7869 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7870 if test `eval echo '${'$as_ac_var'}'` = yes; then
7871   cat >>confdefs.h <<EOF
7872 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7873 EOF
7874
7875 fi
7876 done
7877
7878         if test "$ac_cv_func_putwc" != yes ; then
7879
7880 echo "$as_me:7880: checking for multibyte character support" >&5
7881 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7882 if test "${cf_cv_utf8_lib+set}" = set; then
7883   echo $ECHO_N "(cached) $ECHO_C" >&6
7884 else
7885
7886         cf_save_LIBS="$LIBS"
7887         cat >conftest.$ac_ext <<_ACEOF
7888 #line 7888 "configure"
7889 #include "confdefs.h"
7890
7891 #include <stdlib.h>
7892 int
7893 main ()
7894 {
7895 putwc(0,0);
7896   ;
7897   return 0;
7898 }
7899 _ACEOF
7900 rm -f conftest.$ac_objext conftest$ac_exeext
7901 if { (eval echo "$as_me:7901: \"$ac_link\"") >&5
7902   (eval $ac_link) 2>&5
7903   ac_status=$?
7904   echo "$as_me:7904: \$? = $ac_status" >&5
7905   (exit $ac_status); } &&
7906          { ac_try='test -s conftest$ac_exeext'
7907   { (eval echo "$as_me:7907: \"$ac_try\"") >&5
7908   (eval $ac_try) 2>&5
7909   ac_status=$?
7910   echo "$as_me:7910: \$? = $ac_status" >&5
7911   (exit $ac_status); }; }; then
7912   cf_cv_utf8_lib=yes
7913 else
7914   echo "$as_me: failed program was:" >&5
7915 cat conftest.$ac_ext >&5
7916
7917 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7918 # will be set on completion of the AC_TRY_LINK below.
7919 cf_cv_header_path_utf8=
7920 cf_cv_library_path_utf8=
7921
7922 echo "${as_me-configure}:7922: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7923
7924 cf_save_LIBS="$LIBS"
7925
7926 cat >conftest.$ac_ext <<_ACEOF
7927 #line 7927 "configure"
7928 #include "confdefs.h"
7929
7930 #include <libutf8.h>
7931 int
7932 main ()
7933 {
7934 putwc(0,0);
7935   ;
7936   return 0;
7937 }
7938 _ACEOF
7939 rm -f conftest.$ac_objext conftest$ac_exeext
7940 if { (eval echo "$as_me:7940: \"$ac_link\"") >&5
7941   (eval $ac_link) 2>&5
7942   ac_status=$?
7943   echo "$as_me:7943: \$? = $ac_status" >&5
7944   (exit $ac_status); } &&
7945          { ac_try='test -s conftest$ac_exeext'
7946   { (eval echo "$as_me:7946: \"$ac_try\"") >&5
7947   (eval $ac_try) 2>&5
7948   ac_status=$?
7949   echo "$as_me:7949: \$? = $ac_status" >&5
7950   (exit $ac_status); }; }; then
7951
7952         cf_cv_find_linkage_utf8=yes
7953         cf_cv_header_path_utf8=/usr/include
7954         cf_cv_library_path_utf8=/usr/lib
7955
7956 else
7957   echo "$as_me: failed program was:" >&5
7958 cat conftest.$ac_ext >&5
7959
7960 LIBS="-lutf8  $cf_save_LIBS"
7961
7962 cat >conftest.$ac_ext <<_ACEOF
7963 #line 7963 "configure"
7964 #include "confdefs.h"
7965
7966 #include <libutf8.h>
7967 int
7968 main ()
7969 {
7970 putwc(0,0);
7971   ;
7972   return 0;
7973 }
7974 _ACEOF
7975 rm -f conftest.$ac_objext conftest$ac_exeext
7976 if { (eval echo "$as_me:7976: \"$ac_link\"") >&5
7977   (eval $ac_link) 2>&5
7978   ac_status=$?
7979   echo "$as_me:7979: \$? = $ac_status" >&5
7980   (exit $ac_status); } &&
7981          { ac_try='test -s conftest$ac_exeext'
7982   { (eval echo "$as_me:7982: \"$ac_try\"") >&5
7983   (eval $ac_try) 2>&5
7984   ac_status=$?
7985   echo "$as_me:7985: \$? = $ac_status" >&5
7986   (exit $ac_status); }; }; then
7987
7988         cf_cv_find_linkage_utf8=yes
7989         cf_cv_header_path_utf8=/usr/include
7990         cf_cv_library_path_utf8=/usr/lib
7991         cf_cv_library_file_utf8="-lutf8"
7992
7993 else
7994   echo "$as_me: failed program was:" >&5
7995 cat conftest.$ac_ext >&5
7996
7997         cf_cv_find_linkage_utf8=no
7998         LIBS="$cf_save_LIBS"
7999
8000     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8001
8002 echo "${as_me-configure}:8002: testing find linkage for utf8 library ..." 1>&5
8003
8004 echo "${as_me-configure}:8004: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8005
8006     cf_save_CPPFLAGS="$CPPFLAGS"
8007     cf_test_CPPFLAGS="$CPPFLAGS"
8008
8009 cf_search=
8010
8011 # collect the current set of include-directories from compiler flags
8012 cf_header_path_list=""
8013 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8014         for cf_header_path in $CPPFLAGS $CFLAGS
8015         do
8016                 case $cf_header_path in #(vi
8017                 -I*)
8018                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8019
8020 test "$cf_header_path" != "NONE" && \
8021 test -d "$cf_header_path" && \
8022  {
8023         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8024         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8025         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8026         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8027         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8028         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8029 }
8030
8031                         cf_header_path_list="$cf_header_path_list $cf_search"
8032                         ;;
8033                 esac
8034         done
8035 fi
8036
8037 # add the variations for the package we are looking for
8038
8039 cf_search=
8040
8041 test "/usr" != "$prefix" && \
8042 test -d "/usr" && \
8043 (test $prefix = NONE || test -d $prefix) && {
8044         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8045         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8046         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8047         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8048         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8049         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8050 }
8051
8052 test "$prefix" != "NONE" && \
8053 test -d "$prefix" && \
8054  {
8055         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8056         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8057         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8058         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8059         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8060         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8061 }
8062
8063 test "/usr/local" != "$prefix" && \
8064 test -d "/usr/local" && \
8065 (test $prefix = NONE || test -d $prefix) && {
8066         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8067         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8068         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8069         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8070         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8071         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8072 }
8073
8074 test "/opt" != "$prefix" && \
8075 test -d "/opt" && \
8076 (test $prefix = NONE || test -d $prefix) && {
8077         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8078         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8079         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8080         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8081         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8082         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8083 }
8084
8085 test "$HOME" != "$prefix" && \
8086 test -d "$HOME" && \
8087 (test $prefix = NONE || test -d $prefix) && {
8088         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8089         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8090         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8091         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8092         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8093         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8094 }
8095
8096 test "$includedir" != NONE && \
8097 test "$includedir" != "/usr/include" && \
8098 test -d "$includedir" && {
8099         test -d $includedir &&    cf_search="$cf_search $includedir"
8100         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8101 }
8102
8103 test "$oldincludedir" != NONE && \
8104 test "$oldincludedir" != "/usr/include" && \
8105 test -d "$oldincludedir" && {
8106         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8107         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8108 }
8109
8110 cf_search="$cf_search $cf_header_path_list"
8111
8112     for cf_cv_header_path_utf8 in $cf_search
8113     do
8114       if test -d $cf_cv_header_path_utf8 ; then
8115         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8116
8117 echo "${as_me-configure}:8117: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8118
8119         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8120         cat >conftest.$ac_ext <<_ACEOF
8121 #line 8121 "configure"
8122 #include "confdefs.h"
8123
8124 #include <libutf8.h>
8125 int
8126 main ()
8127 {
8128 putwc(0,0);
8129   ;
8130   return 0;
8131 }
8132 _ACEOF
8133 rm -f conftest.$ac_objext
8134 if { (eval echo "$as_me:8134: \"$ac_compile\"") >&5
8135   (eval $ac_compile) 2>&5
8136   ac_status=$?
8137   echo "$as_me:8137: \$? = $ac_status" >&5
8138   (exit $ac_status); } &&
8139          { ac_try='test -s conftest.$ac_objext'
8140   { (eval echo "$as_me:8140: \"$ac_try\"") >&5
8141   (eval $ac_try) 2>&5
8142   ac_status=$?
8143   echo "$as_me:8143: \$? = $ac_status" >&5
8144   (exit $ac_status); }; }; then
8145
8146             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8147
8148 echo "${as_me-configure}:8148: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8149
8150             cf_cv_find_linkage_utf8=maybe
8151             cf_test_CPPFLAGS="$CPPFLAGS"
8152             break
8153 else
8154   echo "$as_me: failed program was:" >&5
8155 cat conftest.$ac_ext >&5
8156
8157             CPPFLAGS="$cf_save_CPPFLAGS"
8158
8159 fi
8160 rm -f conftest.$ac_objext conftest.$ac_ext
8161       fi
8162     done
8163
8164     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8165
8166 echo "${as_me-configure}:8166: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8167
8168       cf_save_LIBS="$LIBS"
8169       cf_save_LDFLAGS="$LDFLAGS"
8170
8171       if test "$cf_cv_find_linkage_utf8" != yes ; then
8172
8173 cf_search=
8174 cf_library_path_list=""
8175 if test -n "${LDFLAGS}${LIBS}" ; then
8176         for cf_library_path in $LDFLAGS $LIBS
8177         do
8178                 case $cf_library_path in #(vi
8179                 -L*)
8180                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8181
8182 test "$cf_library_path" != "NONE" && \
8183 test -d "$cf_library_path" && \
8184  {
8185         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8186         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8187         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8188         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8189         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8190         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8191 }
8192
8193                         cf_library_path_list="$cf_library_path_list $cf_search"
8194                         ;;
8195                 esac
8196         done
8197 fi
8198
8199 cf_search=
8200
8201 test "/usr" != "$prefix" && \
8202 test -d "/usr" && \
8203 (test $prefix = NONE || test -d $prefix) && {
8204         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8205         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8206         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8207         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8208         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8209         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8210 }
8211
8212 test "$prefix" != "NONE" && \
8213 test -d "$prefix" && \
8214  {
8215         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8216         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8217         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8218         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8219         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8220         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8221 }
8222
8223 test "/usr/local" != "$prefix" && \
8224 test -d "/usr/local" && \
8225 (test $prefix = NONE || test -d $prefix) && {
8226         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8227         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8228         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8229         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8230         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8231         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8232 }
8233
8234 test "/opt" != "$prefix" && \
8235 test -d "/opt" && \
8236 (test $prefix = NONE || test -d $prefix) && {
8237         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8238         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8239         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8240         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8241         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8242         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8243 }
8244
8245 test "$HOME" != "$prefix" && \
8246 test -d "$HOME" && \
8247 (test $prefix = NONE || test -d $prefix) && {
8248         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8249         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8250         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8251         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8252         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8253         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8254 }
8255
8256 cf_search="$cf_library_path_list $cf_search"
8257
8258         for cf_cv_library_path_utf8 in $cf_search
8259         do
8260           if test -d $cf_cv_library_path_utf8 ; then
8261             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8262
8263 echo "${as_me-configure}:8263: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8264
8265             CPPFLAGS="$cf_test_CPPFLAGS"
8266             LIBS="-lutf8  $cf_save_LIBS"
8267             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8268             cat >conftest.$ac_ext <<_ACEOF
8269 #line 8269 "configure"
8270 #include "confdefs.h"
8271
8272 #include <libutf8.h>
8273 int
8274 main ()
8275 {
8276 putwc(0,0);
8277   ;
8278   return 0;
8279 }
8280 _ACEOF
8281 rm -f conftest.$ac_objext conftest$ac_exeext
8282 if { (eval echo "$as_me:8282: \"$ac_link\"") >&5
8283   (eval $ac_link) 2>&5
8284   ac_status=$?
8285   echo "$as_me:8285: \$? = $ac_status" >&5
8286   (exit $ac_status); } &&
8287          { ac_try='test -s conftest$ac_exeext'
8288   { (eval echo "$as_me:8288: \"$ac_try\"") >&5
8289   (eval $ac_try) 2>&5
8290   ac_status=$?
8291   echo "$as_me:8291: \$? = $ac_status" >&5
8292   (exit $ac_status); }; }; then
8293
8294                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8295
8296 echo "${as_me-configure}:8296: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8297
8298                 cf_cv_find_linkage_utf8=yes
8299                 cf_cv_library_file_utf8="-lutf8"
8300                 break
8301 else
8302   echo "$as_me: failed program was:" >&5
8303 cat conftest.$ac_ext >&5
8304
8305                 CPPFLAGS="$cf_save_CPPFLAGS"
8306                 LIBS="$cf_save_LIBS"
8307                 LDFLAGS="$cf_save_LDFLAGS"
8308
8309 fi
8310 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8311           fi
8312         done
8313         CPPFLAGS="$cf_save_CPPFLAGS"
8314         LDFLAGS="$cf_save_LDFLAGS"
8315       fi
8316
8317     else
8318       cf_cv_find_linkage_utf8=no
8319     fi
8320
8321 fi
8322 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8323
8324 fi
8325 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8326
8327 LIBS="$cf_save_LIBS"
8328
8329 if test "$cf_cv_find_linkage_utf8" = yes ; then
8330 cf_cv_utf8_lib=add-on
8331 else
8332 cf_cv_utf8_lib=no
8333 fi
8334
8335 fi
8336 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8337 fi
8338 echo "$as_me:8338: result: $cf_cv_utf8_lib" >&5
8339 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8340
8341 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8342 # ncurses/ncursesw:
8343 if test "$cf_cv_utf8_lib" = "add-on" ; then
8344         cat >>confdefs.h <<\EOF
8345 #define HAVE_LIBUTF8_H 1
8346 EOF
8347
8348 if test -n "$cf_cv_header_path_utf8" ; then
8349   for cf_add_incdir in $cf_cv_header_path_utf8
8350   do
8351         while test $cf_add_incdir != /usr/include
8352         do
8353           if test -d $cf_add_incdir
8354           then
8355                 cf_have_incdir=no
8356                 if test -n "$CFLAGS$CPPFLAGS" ; then
8357                   # a loop is needed to ensure we can add subdirs of existing dirs
8358                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8359                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8360                           cf_have_incdir=yes; break
8361                         fi
8362                   done
8363                 fi
8364
8365                 if test "$cf_have_incdir" = no ; then
8366                   if test "$cf_add_incdir" = /usr/local/include ; then
8367                         if test "$GCC" = yes
8368                         then
8369                           cf_save_CPPFLAGS=$CPPFLAGS
8370                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8371                           cat >conftest.$ac_ext <<_ACEOF
8372 #line 8372 "configure"
8373 #include "confdefs.h"
8374 #include <stdio.h>
8375 int
8376 main ()
8377 {
8378 printf("Hello")
8379   ;
8380   return 0;
8381 }
8382 _ACEOF
8383 rm -f conftest.$ac_objext
8384 if { (eval echo "$as_me:8384: \"$ac_compile\"") >&5
8385   (eval $ac_compile) 2>&5
8386   ac_status=$?
8387   echo "$as_me:8387: \$? = $ac_status" >&5
8388   (exit $ac_status); } &&
8389          { ac_try='test -s conftest.$ac_objext'
8390   { (eval echo "$as_me:8390: \"$ac_try\"") >&5
8391   (eval $ac_try) 2>&5
8392   ac_status=$?
8393   echo "$as_me:8393: \$? = $ac_status" >&5
8394   (exit $ac_status); }; }; then
8395   :
8396 else
8397   echo "$as_me: failed program was:" >&5
8398 cat conftest.$ac_ext >&5
8399 cf_have_incdir=yes
8400 fi
8401 rm -f conftest.$ac_objext conftest.$ac_ext
8402                           CPPFLAGS=$cf_save_CPPFLAGS
8403                         fi
8404                   fi
8405                 fi
8406
8407                 if test "$cf_have_incdir" = no ; then
8408                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8409
8410 echo "${as_me-configure}:8410: testing adding $cf_add_incdir to include-path ..." 1>&5
8411
8412                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8413
8414                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8415                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8416                   cf_add_incdir="$cf_top_incdir"
8417                 else
8418                   break
8419                 fi
8420           fi
8421         done
8422   done
8423 fi
8424
8425 if test -n "$cf_cv_library_path_utf8" ; then
8426   for cf_add_libdir in $cf_cv_library_path_utf8
8427   do
8428     if test $cf_add_libdir = /usr/lib ; then
8429       :
8430     elif test -d $cf_add_libdir
8431     then
8432       cf_have_libdir=no
8433       if test -n "$LDFLAGS$LIBS" ; then
8434         # a loop is needed to ensure we can add subdirs of existing dirs
8435         for cf_test_libdir in $LDFLAGS $LIBS ; do
8436           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8437             cf_have_libdir=yes; break
8438           fi
8439         done
8440       fi
8441       if test "$cf_have_libdir" = no ; then
8442         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8443
8444 echo "${as_me-configure}:8444: testing adding $cf_add_libdir to library-path ..." 1>&5
8445
8446         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8447       fi
8448     fi
8449   done
8450 fi
8451
8452         LIBS="$cf_cv_library_file_utf8 $LIBS"
8453 fi
8454
8455                 if test "$cf_cv_utf8_lib" != no ; then
8456                         NCURSES_LIBUTF8=1
8457                 fi
8458         fi
8459
8460 # This is needed on Tru64 5.0 to declare mbstate_t
8461 echo "$as_me:8461: checking if we must include wchar.h to declare mbstate_t" >&5
8462 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
8463 if test "${cf_cv_mbstate_t+set}" = set; then
8464   echo $ECHO_N "(cached) $ECHO_C" >&6
8465 else
8466
8467 cat >conftest.$ac_ext <<_ACEOF
8468 #line 8468 "configure"
8469 #include "confdefs.h"
8470
8471 #include <stdlib.h>
8472 #include <stdarg.h>
8473 #include <stdio.h>
8474 #ifdef HAVE_LIBUTF8_H
8475 #include <libutf8.h>
8476 #endif
8477 int
8478 main ()
8479 {
8480 mbstate_t state
8481   ;
8482   return 0;
8483 }
8484 _ACEOF
8485 rm -f conftest.$ac_objext
8486 if { (eval echo "$as_me:8486: \"$ac_compile\"") >&5
8487   (eval $ac_compile) 2>&5
8488   ac_status=$?
8489   echo "$as_me:8489: \$? = $ac_status" >&5
8490   (exit $ac_status); } &&
8491          { ac_try='test -s conftest.$ac_objext'
8492   { (eval echo "$as_me:8492: \"$ac_try\"") >&5
8493   (eval $ac_try) 2>&5
8494   ac_status=$?
8495   echo "$as_me:8495: \$? = $ac_status" >&5
8496   (exit $ac_status); }; }; then
8497   cf_cv_mbstate_t=no
8498 else
8499   echo "$as_me: failed program was:" >&5
8500 cat conftest.$ac_ext >&5
8501 cat >conftest.$ac_ext <<_ACEOF
8502 #line 8502 "configure"
8503 #include "confdefs.h"
8504
8505 #include <stdlib.h>
8506 #include <stdarg.h>
8507 #include <stdio.h>
8508 #include <wchar.h>
8509 #ifdef HAVE_LIBUTF8_H
8510 #include <libutf8.h>
8511 #endif
8512 int
8513 main ()
8514 {
8515 mbstate_t value
8516   ;
8517   return 0;
8518 }
8519 _ACEOF
8520 rm -f conftest.$ac_objext
8521 if { (eval echo "$as_me:8521: \"$ac_compile\"") >&5
8522   (eval $ac_compile) 2>&5
8523   ac_status=$?
8524   echo "$as_me:8524: \$? = $ac_status" >&5
8525   (exit $ac_status); } &&
8526          { ac_try='test -s conftest.$ac_objext'
8527   { (eval echo "$as_me:8527: \"$ac_try\"") >&5
8528   (eval $ac_try) 2>&5
8529   ac_status=$?
8530   echo "$as_me:8530: \$? = $ac_status" >&5
8531   (exit $ac_status); }; }; then
8532   cf_cv_mbstate_t=yes
8533 else
8534   echo "$as_me: failed program was:" >&5
8535 cat conftest.$ac_ext >&5
8536 cf_cv_mbstate_t=unknown
8537 fi
8538 rm -f conftest.$ac_objext conftest.$ac_ext
8539 fi
8540 rm -f conftest.$ac_objext conftest.$ac_ext
8541 fi
8542 echo "$as_me:8542: result: $cf_cv_mbstate_t" >&5
8543 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
8544
8545 if test "$cf_cv_mbstate_t" = yes ; then
8546         cat >>confdefs.h <<\EOF
8547 #define NEED_WCHAR_H 1
8548 EOF
8549
8550         NEED_WCHAR_H=1
8551 fi
8552
8553 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
8554 if test "$cf_cv_mbstate_t" = unknown ; then
8555         NCURSES_MBSTATE_T=1
8556 fi
8557
8558 # This is needed on Tru64 5.0 to declare wchar_t
8559 echo "$as_me:8559: checking if we must include wchar.h to declare wchar_t" >&5
8560 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
8561 if test "${cf_cv_wchar_t+set}" = set; then
8562   echo $ECHO_N "(cached) $ECHO_C" >&6
8563 else
8564
8565 cat >conftest.$ac_ext <<_ACEOF
8566 #line 8566 "configure"
8567 #include "confdefs.h"
8568
8569 #include <stdlib.h>
8570 #include <stdarg.h>
8571 #include <stdio.h>
8572 #ifdef HAVE_LIBUTF8_H
8573 #include <libutf8.h>
8574 #endif
8575 int
8576 main ()
8577 {
8578 wchar_t state
8579   ;
8580   return 0;
8581 }
8582 _ACEOF
8583 rm -f conftest.$ac_objext
8584 if { (eval echo "$as_me:8584: \"$ac_compile\"") >&5
8585   (eval $ac_compile) 2>&5
8586   ac_status=$?
8587   echo "$as_me:8587: \$? = $ac_status" >&5
8588   (exit $ac_status); } &&
8589          { ac_try='test -s conftest.$ac_objext'
8590   { (eval echo "$as_me:8590: \"$ac_try\"") >&5
8591   (eval $ac_try) 2>&5
8592   ac_status=$?
8593   echo "$as_me:8593: \$? = $ac_status" >&5
8594   (exit $ac_status); }; }; then
8595   cf_cv_wchar_t=no
8596 else
8597   echo "$as_me: failed program was:" >&5
8598 cat conftest.$ac_ext >&5
8599 cat >conftest.$ac_ext <<_ACEOF
8600 #line 8600 "configure"
8601 #include "confdefs.h"
8602
8603 #include <stdlib.h>
8604 #include <stdarg.h>
8605 #include <stdio.h>
8606 #include <wchar.h>
8607 #ifdef HAVE_LIBUTF8_H
8608 #include <libutf8.h>
8609 #endif
8610 int
8611 main ()
8612 {
8613 wchar_t value
8614   ;
8615   return 0;
8616 }
8617 _ACEOF
8618 rm -f conftest.$ac_objext
8619 if { (eval echo "$as_me:8619: \"$ac_compile\"") >&5
8620   (eval $ac_compile) 2>&5
8621   ac_status=$?
8622   echo "$as_me:8622: \$? = $ac_status" >&5
8623   (exit $ac_status); } &&
8624          { ac_try='test -s conftest.$ac_objext'
8625   { (eval echo "$as_me:8625: \"$ac_try\"") >&5
8626   (eval $ac_try) 2>&5
8627   ac_status=$?
8628   echo "$as_me:8628: \$? = $ac_status" >&5
8629   (exit $ac_status); }; }; then
8630   cf_cv_wchar_t=yes
8631 else
8632   echo "$as_me: failed program was:" >&5
8633 cat conftest.$ac_ext >&5
8634 cf_cv_wchar_t=unknown
8635 fi
8636 rm -f conftest.$ac_objext conftest.$ac_ext
8637 fi
8638 rm -f conftest.$ac_objext conftest.$ac_ext
8639 fi
8640 echo "$as_me:8640: result: $cf_cv_wchar_t" >&5
8641 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8642
8643 if test "$cf_cv_wchar_t" = yes ; then
8644         cat >>confdefs.h <<\EOF
8645 #define NEED_WCHAR_H 1
8646 EOF
8647
8648         NEED_WCHAR_H=1
8649 fi
8650
8651 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8652 if test "$cf_cv_wchar_t" = unknown ; then
8653         NCURSES_WCHAR_T=1
8654 fi
8655
8656 # if we find wchar_t in either place, use substitution to provide a fallback.
8657 if test "$cf_cv_wchar_t" != unknown ; then
8658         NCURSES_OK_WCHAR_T=1
8659 fi
8660
8661 # This is needed on Tru64 5.0 to declare wint_t
8662 echo "$as_me:8662: checking if we must include wchar.h to declare wint_t" >&5
8663 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8664 if test "${cf_cv_wint_t+set}" = set; then
8665   echo $ECHO_N "(cached) $ECHO_C" >&6
8666 else
8667
8668 cat >conftest.$ac_ext <<_ACEOF
8669 #line 8669 "configure"
8670 #include "confdefs.h"
8671
8672 #include <stdlib.h>
8673 #include <stdarg.h>
8674 #include <stdio.h>
8675 #ifdef HAVE_LIBUTF8_H
8676 #include <libutf8.h>
8677 #endif
8678 int
8679 main ()
8680 {
8681 wint_t state
8682   ;
8683   return 0;
8684 }
8685 _ACEOF
8686 rm -f conftest.$ac_objext
8687 if { (eval echo "$as_me:8687: \"$ac_compile\"") >&5
8688   (eval $ac_compile) 2>&5
8689   ac_status=$?
8690   echo "$as_me:8690: \$? = $ac_status" >&5
8691   (exit $ac_status); } &&
8692          { ac_try='test -s conftest.$ac_objext'
8693   { (eval echo "$as_me:8693: \"$ac_try\"") >&5
8694   (eval $ac_try) 2>&5
8695   ac_status=$?
8696   echo "$as_me:8696: \$? = $ac_status" >&5
8697   (exit $ac_status); }; }; then
8698   cf_cv_wint_t=no
8699 else
8700   echo "$as_me: failed program was:" >&5
8701 cat conftest.$ac_ext >&5
8702 cat >conftest.$ac_ext <<_ACEOF
8703 #line 8703 "configure"
8704 #include "confdefs.h"
8705
8706 #include <stdlib.h>
8707 #include <stdarg.h>
8708 #include <stdio.h>
8709 #include <wchar.h>
8710 #ifdef HAVE_LIBUTF8_H
8711 #include <libutf8.h>
8712 #endif
8713 int
8714 main ()
8715 {
8716 wint_t value
8717   ;
8718   return 0;
8719 }
8720 _ACEOF
8721 rm -f conftest.$ac_objext
8722 if { (eval echo "$as_me:8722: \"$ac_compile\"") >&5
8723   (eval $ac_compile) 2>&5
8724   ac_status=$?
8725   echo "$as_me:8725: \$? = $ac_status" >&5
8726   (exit $ac_status); } &&
8727          { ac_try='test -s conftest.$ac_objext'
8728   { (eval echo "$as_me:8728: \"$ac_try\"") >&5
8729   (eval $ac_try) 2>&5
8730   ac_status=$?
8731   echo "$as_me:8731: \$? = $ac_status" >&5
8732   (exit $ac_status); }; }; then
8733   cf_cv_wint_t=yes
8734 else
8735   echo "$as_me: failed program was:" >&5
8736 cat conftest.$ac_ext >&5
8737 cf_cv_wint_t=unknown
8738 fi
8739 rm -f conftest.$ac_objext conftest.$ac_ext
8740 fi
8741 rm -f conftest.$ac_objext conftest.$ac_ext
8742 fi
8743 echo "$as_me:8743: result: $cf_cv_wint_t" >&5
8744 echo "${ECHO_T}$cf_cv_wint_t" >&6
8745
8746 if test "$cf_cv_wint_t" = yes ; then
8747         cat >>confdefs.h <<\EOF
8748 #define NEED_WCHAR_H 1
8749 EOF
8750
8751         NEED_WCHAR_H=1
8752 fi
8753
8754 # if we do not find wint_t in either place, use substitution to provide a fallback.
8755 if test "$cf_cv_wint_t" = unknown ; then
8756         NCURSES_WINT_T=1
8757 fi
8758
8759 # if we find wint_t in either place, use substitution to provide a fallback.
8760 if test "$cf_cv_wint_t" != unknown ; then
8761         NCURSES_OK_WINT_T=1
8762 fi
8763
8764         if test "$NCURSES_MBSTATE_T" != 0; then
8765                 cat >>confdefs.h <<\EOF
8766 #define NEED_MBSTATE_T_DEF 1
8767 EOF
8768
8769         fi
8770 fi
8771
8772 ###   use option --disable-lp64 to allow long chtype
8773 case $cf_cv_abi_version in
8774 [345]*)
8775         default_with_lp64=no
8776         ;;
8777 *)
8778         default_with_lp64=yes
8779         ;;
8780 esac
8781
8782 echo "$as_me:8782: checking whether to enable _LP64 definition in curses.h" >&5
8783 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8784
8785 # Check whether --enable-lp64 or --disable-lp64 was given.
8786 if test "${enable_lp64+set}" = set; then
8787   enableval="$enable_lp64"
8788   with_lp64=$enableval
8789 else
8790   with_lp64=$default_with_lp64
8791 fi;
8792 echo "$as_me:8792: result: $with_lp64" >&5
8793 echo "${ECHO_T}$with_lp64" >&6
8794
8795 if test "$with_lp64" = yes ; then
8796         cf_cv_enable_lp64=1
8797 else
8798         cf_cv_enable_lp64=0
8799 fi
8800
8801 # Check whether --enable-largefile or --disable-largefile was given.
8802 if test "${enable_largefile+set}" = set; then
8803   enableval="$enable_largefile"
8804
8805 fi;
8806 if test "$enable_largefile" != no; then
8807
8808   echo "$as_me:8808: checking for special C compiler options needed for large files" >&5
8809 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8810 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8811   echo $ECHO_N "(cached) $ECHO_C" >&6
8812 else
8813   ac_cv_sys_largefile_CC=no
8814      if test "$GCC" != yes; then
8815        ac_save_CC=$CC
8816        while :; do
8817          # IRIX 6.2 and later do not support large files by default,
8818          # so use the C compiler's -n32 option if that helps.
8819          cat >conftest.$ac_ext <<_ACEOF
8820 #line 8820 "configure"
8821 #include "confdefs.h"
8822 #include <sys/types.h>
8823  /* Check that off_t can represent 2**63 - 1 correctly.
8824     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8825     since some C++ compilers masquerading as C compilers
8826     incorrectly reject 9223372036854775807.  */
8827 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8828   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8829                        && LARGE_OFF_T % 2147483647 == 1)
8830                       ? 1 : -1];
8831 int
8832 main ()
8833 {
8834
8835   ;
8836   return 0;
8837 }
8838 _ACEOF
8839          rm -f conftest.$ac_objext
8840 if { (eval echo "$as_me:8840: \"$ac_compile\"") >&5
8841   (eval $ac_compile) 2>&5
8842   ac_status=$?
8843   echo "$as_me:8843: \$? = $ac_status" >&5
8844   (exit $ac_status); } &&
8845          { ac_try='test -s conftest.$ac_objext'
8846   { (eval echo "$as_me:8846: \"$ac_try\"") >&5
8847   (eval $ac_try) 2>&5
8848   ac_status=$?
8849   echo "$as_me:8849: \$? = $ac_status" >&5
8850   (exit $ac_status); }; }; then
8851   break
8852 else
8853   echo "$as_me: failed program was:" >&5
8854 cat conftest.$ac_ext >&5
8855 fi
8856 rm -f conftest.$ac_objext
8857          CC="$CC -n32"
8858          rm -f conftest.$ac_objext
8859 if { (eval echo "$as_me:8859: \"$ac_compile\"") >&5
8860   (eval $ac_compile) 2>&5
8861   ac_status=$?
8862   echo "$as_me:8862: \$? = $ac_status" >&5
8863   (exit $ac_status); } &&
8864          { ac_try='test -s conftest.$ac_objext'
8865   { (eval echo "$as_me:8865: \"$ac_try\"") >&5
8866   (eval $ac_try) 2>&5
8867   ac_status=$?
8868   echo "$as_me:8868: \$? = $ac_status" >&5
8869   (exit $ac_status); }; }; then
8870   ac_cv_sys_largefile_CC=' -n32'; break
8871 else
8872   echo "$as_me: failed program was:" >&5
8873 cat conftest.$ac_ext >&5
8874 fi
8875 rm -f conftest.$ac_objext
8876          break
8877        done
8878        CC=$ac_save_CC
8879        rm -f conftest.$ac_ext
8880     fi
8881 fi
8882 echo "$as_me:8882: result: $ac_cv_sys_largefile_CC" >&5
8883 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8884   if test "$ac_cv_sys_largefile_CC" != no; then
8885     CC=$CC$ac_cv_sys_largefile_CC
8886   fi
8887
8888   echo "$as_me:8888: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8889 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8890 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8891   echo $ECHO_N "(cached) $ECHO_C" >&6
8892 else
8893   while :; do
8894   ac_cv_sys_file_offset_bits=no
8895   cat >conftest.$ac_ext <<_ACEOF
8896 #line 8896 "configure"
8897 #include "confdefs.h"
8898 #include <sys/types.h>
8899  /* Check that off_t can represent 2**63 - 1 correctly.
8900     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8901     since some C++ compilers masquerading as C compilers
8902     incorrectly reject 9223372036854775807.  */
8903 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8904   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8905                        && LARGE_OFF_T % 2147483647 == 1)
8906                       ? 1 : -1];
8907 int
8908 main ()
8909 {
8910
8911   ;
8912   return 0;
8913 }
8914 _ACEOF
8915 rm -f conftest.$ac_objext
8916 if { (eval echo "$as_me:8916: \"$ac_compile\"") >&5
8917   (eval $ac_compile) 2>&5
8918   ac_status=$?
8919   echo "$as_me:8919: \$? = $ac_status" >&5
8920   (exit $ac_status); } &&
8921          { ac_try='test -s conftest.$ac_objext'
8922   { (eval echo "$as_me:8922: \"$ac_try\"") >&5
8923   (eval $ac_try) 2>&5
8924   ac_status=$?
8925   echo "$as_me:8925: \$? = $ac_status" >&5
8926   (exit $ac_status); }; }; then
8927   break
8928 else
8929   echo "$as_me: failed program was:" >&5
8930 cat conftest.$ac_ext >&5
8931 fi
8932 rm -f conftest.$ac_objext conftest.$ac_ext
8933   cat >conftest.$ac_ext <<_ACEOF
8934 #line 8934 "configure"
8935 #include "confdefs.h"
8936 #define _FILE_OFFSET_BITS 64
8937 #include <sys/types.h>
8938  /* Check that off_t can represent 2**63 - 1 correctly.
8939     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8940     since some C++ compilers masquerading as C compilers
8941     incorrectly reject 9223372036854775807.  */
8942 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8943   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8944                        && LARGE_OFF_T % 2147483647 == 1)
8945                       ? 1 : -1];
8946 int
8947 main ()
8948 {
8949
8950   ;
8951   return 0;
8952 }
8953 _ACEOF
8954 rm -f conftest.$ac_objext
8955 if { (eval echo "$as_me:8955: \"$ac_compile\"") >&5
8956   (eval $ac_compile) 2>&5
8957   ac_status=$?
8958   echo "$as_me:8958: \$? = $ac_status" >&5
8959   (exit $ac_status); } &&
8960          { ac_try='test -s conftest.$ac_objext'
8961   { (eval echo "$as_me:8961: \"$ac_try\"") >&5
8962   (eval $ac_try) 2>&5
8963   ac_status=$?
8964   echo "$as_me:8964: \$? = $ac_status" >&5
8965   (exit $ac_status); }; }; then
8966   ac_cv_sys_file_offset_bits=64; break
8967 else
8968   echo "$as_me: failed program was:" >&5
8969 cat conftest.$ac_ext >&5
8970 fi
8971 rm -f conftest.$ac_objext conftest.$ac_ext
8972   break
8973 done
8974 fi
8975 echo "$as_me:8975: result: $ac_cv_sys_file_offset_bits" >&5
8976 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8977 if test "$ac_cv_sys_file_offset_bits" != no; then
8978
8979 cat >>confdefs.h <<EOF
8980 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8981 EOF
8982
8983 fi
8984 rm -f conftest*
8985   echo "$as_me:8985: checking for _LARGE_FILES value needed for large files" >&5
8986 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8987 if test "${ac_cv_sys_large_files+set}" = set; then
8988   echo $ECHO_N "(cached) $ECHO_C" >&6
8989 else
8990   while :; do
8991   ac_cv_sys_large_files=no
8992   cat >conftest.$ac_ext <<_ACEOF
8993 #line 8993 "configure"
8994 #include "confdefs.h"
8995 #include <sys/types.h>
8996  /* Check that off_t can represent 2**63 - 1 correctly.
8997     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8998     since some C++ compilers masquerading as C compilers
8999     incorrectly reject 9223372036854775807.  */
9000 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9001   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9002                        && LARGE_OFF_T % 2147483647 == 1)
9003                       ? 1 : -1];
9004 int
9005 main ()
9006 {
9007
9008   ;
9009   return 0;
9010 }
9011 _ACEOF
9012 rm -f conftest.$ac_objext
9013 if { (eval echo "$as_me:9013: \"$ac_compile\"") >&5
9014   (eval $ac_compile) 2>&5
9015   ac_status=$?
9016   echo "$as_me:9016: \$? = $ac_status" >&5
9017   (exit $ac_status); } &&
9018          { ac_try='test -s conftest.$ac_objext'
9019   { (eval echo "$as_me:9019: \"$ac_try\"") >&5
9020   (eval $ac_try) 2>&5
9021   ac_status=$?
9022   echo "$as_me:9022: \$? = $ac_status" >&5
9023   (exit $ac_status); }; }; then
9024   break
9025 else
9026   echo "$as_me: failed program was:" >&5
9027 cat conftest.$ac_ext >&5
9028 fi
9029 rm -f conftest.$ac_objext conftest.$ac_ext
9030   cat >conftest.$ac_ext <<_ACEOF
9031 #line 9031 "configure"
9032 #include "confdefs.h"
9033 #define _LARGE_FILES 1
9034 #include <sys/types.h>
9035  /* Check that off_t can represent 2**63 - 1 correctly.
9036     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9037     since some C++ compilers masquerading as C compilers
9038     incorrectly reject 9223372036854775807.  */
9039 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9040   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9041                        && LARGE_OFF_T % 2147483647 == 1)
9042                       ? 1 : -1];
9043 int
9044 main ()
9045 {
9046
9047   ;
9048   return 0;
9049 }
9050 _ACEOF
9051 rm -f conftest.$ac_objext
9052 if { (eval echo "$as_me:9052: \"$ac_compile\"") >&5
9053   (eval $ac_compile) 2>&5
9054   ac_status=$?
9055   echo "$as_me:9055: \$? = $ac_status" >&5
9056   (exit $ac_status); } &&
9057          { ac_try='test -s conftest.$ac_objext'
9058   { (eval echo "$as_me:9058: \"$ac_try\"") >&5
9059   (eval $ac_try) 2>&5
9060   ac_status=$?
9061   echo "$as_me:9061: \$? = $ac_status" >&5
9062   (exit $ac_status); }; }; then
9063   ac_cv_sys_large_files=1; break
9064 else
9065   echo "$as_me: failed program was:" >&5
9066 cat conftest.$ac_ext >&5
9067 fi
9068 rm -f conftest.$ac_objext conftest.$ac_ext
9069   break
9070 done
9071 fi
9072 echo "$as_me:9072: result: $ac_cv_sys_large_files" >&5
9073 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9074 if test "$ac_cv_sys_large_files" != no; then
9075
9076 cat >>confdefs.h <<EOF
9077 #define _LARGE_FILES $ac_cv_sys_large_files
9078 EOF
9079
9080 fi
9081 rm -f conftest*
9082 fi
9083
9084     if test "$enable_largefile" != no ; then
9085         echo "$as_me:9085: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9086 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9087 if test "${ac_cv_sys_largefile_source+set}" = set; then
9088   echo $ECHO_N "(cached) $ECHO_C" >&6
9089 else
9090   while :; do
9091   ac_cv_sys_largefile_source=no
9092   cat >conftest.$ac_ext <<_ACEOF
9093 #line 9093 "configure"
9094 #include "confdefs.h"
9095 #include <stdio.h>
9096 int
9097 main ()
9098 {
9099 return !fseeko;
9100   ;
9101   return 0;
9102 }
9103 _ACEOF
9104 rm -f conftest.$ac_objext
9105 if { (eval echo "$as_me:9105: \"$ac_compile\"") >&5
9106   (eval $ac_compile) 2>&5
9107   ac_status=$?
9108   echo "$as_me:9108: \$? = $ac_status" >&5
9109   (exit $ac_status); } &&
9110          { ac_try='test -s conftest.$ac_objext'
9111   { (eval echo "$as_me:9111: \"$ac_try\"") >&5
9112   (eval $ac_try) 2>&5
9113   ac_status=$?
9114   echo "$as_me:9114: \$? = $ac_status" >&5
9115   (exit $ac_status); }; }; then
9116   break
9117 else
9118   echo "$as_me: failed program was:" >&5
9119 cat conftest.$ac_ext >&5
9120 fi
9121 rm -f conftest.$ac_objext conftest.$ac_ext
9122   cat >conftest.$ac_ext <<_ACEOF
9123 #line 9123 "configure"
9124 #include "confdefs.h"
9125 #define _LARGEFILE_SOURCE 1
9126 #include <stdio.h>
9127 int
9128 main ()
9129 {
9130 return !fseeko;
9131   ;
9132   return 0;
9133 }
9134 _ACEOF
9135 rm -f conftest.$ac_objext
9136 if { (eval echo "$as_me:9136: \"$ac_compile\"") >&5
9137   (eval $ac_compile) 2>&5
9138   ac_status=$?
9139   echo "$as_me:9139: \$? = $ac_status" >&5
9140   (exit $ac_status); } &&
9141          { ac_try='test -s conftest.$ac_objext'
9142   { (eval echo "$as_me:9142: \"$ac_try\"") >&5
9143   (eval $ac_try) 2>&5
9144   ac_status=$?
9145   echo "$as_me:9145: \$? = $ac_status" >&5
9146   (exit $ac_status); }; }; then
9147   ac_cv_sys_largefile_source=1; break
9148 else
9149   echo "$as_me: failed program was:" >&5
9150 cat conftest.$ac_ext >&5
9151 fi
9152 rm -f conftest.$ac_objext conftest.$ac_ext
9153   break
9154 done
9155 fi
9156 echo "$as_me:9156: result: $ac_cv_sys_largefile_source" >&5
9157 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9158 if test "$ac_cv_sys_largefile_source" != no; then
9159
9160 cat >>confdefs.h <<EOF
9161 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9162 EOF
9163
9164 fi
9165 rm -f conftest*
9166
9167 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9168 # in glibc 2.1.3, but that breaks too many other things.
9169 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9170 echo "$as_me:9170: checking for fseeko" >&5
9171 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9172 if test "${ac_cv_func_fseeko+set}" = set; then
9173   echo $ECHO_N "(cached) $ECHO_C" >&6
9174 else
9175   cat >conftest.$ac_ext <<_ACEOF
9176 #line 9176 "configure"
9177 #include "confdefs.h"
9178 #include <stdio.h>
9179 int
9180 main ()
9181 {
9182 return fseeko && fseeko (stdin, 0, 0);
9183   ;
9184   return 0;
9185 }
9186 _ACEOF
9187 rm -f conftest.$ac_objext conftest$ac_exeext
9188 if { (eval echo "$as_me:9188: \"$ac_link\"") >&5
9189   (eval $ac_link) 2>&5
9190   ac_status=$?
9191   echo "$as_me:9191: \$? = $ac_status" >&5
9192   (exit $ac_status); } &&
9193          { ac_try='test -s conftest$ac_exeext'
9194   { (eval echo "$as_me:9194: \"$ac_try\"") >&5
9195   (eval $ac_try) 2>&5
9196   ac_status=$?
9197   echo "$as_me:9197: \$? = $ac_status" >&5
9198   (exit $ac_status); }; }; then
9199   ac_cv_func_fseeko=yes
9200 else
9201   echo "$as_me: failed program was:" >&5
9202 cat conftest.$ac_ext >&5
9203 ac_cv_func_fseeko=no
9204 fi
9205 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9206 fi
9207 echo "$as_me:9207: result: $ac_cv_func_fseeko" >&5
9208 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9209 if test $ac_cv_func_fseeko = yes; then
9210
9211 cat >>confdefs.h <<\EOF
9212 #define HAVE_FSEEKO 1
9213 EOF
9214
9215 fi
9216
9217         # Normally we would collect these definitions in the config.h,
9218         # but (like _XOPEN_SOURCE), some environments rely on having these
9219         # defined before any of the system headers are included.  Another
9220         # case comes up with C++, e.g., on AIX the compiler compiles the
9221         # header files by themselves before looking at the body files it is
9222         # told to compile.  For ncurses, those header files do not include
9223         # the config.h
9224         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9225         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9226         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9227
9228         echo "$as_me:9228: checking whether to use struct dirent64" >&5
9229 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9230 if test "${cf_cv_struct_dirent64+set}" = set; then
9231   echo $ECHO_N "(cached) $ECHO_C" >&6
9232 else
9233
9234                 cat >conftest.$ac_ext <<_ACEOF
9235 #line 9235 "configure"
9236 #include "confdefs.h"
9237
9238 #include <sys/types.h>
9239 #include <dirent.h>
9240
9241 int
9242 main ()
9243 {
9244
9245                 /* if transitional largefile support is setup, this is true */
9246                 extern struct dirent64 * readdir(DIR *);
9247                 struct dirent64 *x = readdir((DIR *)0);
9248                 struct dirent *y = readdir((DIR *)0);
9249                 int z = x - y;
9250
9251   ;
9252   return 0;
9253 }
9254 _ACEOF
9255 rm -f conftest.$ac_objext
9256 if { (eval echo "$as_me:9256: \"$ac_compile\"") >&5
9257   (eval $ac_compile) 2>&5
9258   ac_status=$?
9259   echo "$as_me:9259: \$? = $ac_status" >&5
9260   (exit $ac_status); } &&
9261          { ac_try='test -s conftest.$ac_objext'
9262   { (eval echo "$as_me:9262: \"$ac_try\"") >&5
9263   (eval $ac_try) 2>&5
9264   ac_status=$?
9265   echo "$as_me:9265: \$? = $ac_status" >&5
9266   (exit $ac_status); }; }; then
9267   cf_cv_struct_dirent64=yes
9268 else
9269   echo "$as_me: failed program was:" >&5
9270 cat conftest.$ac_ext >&5
9271 cf_cv_struct_dirent64=no
9272 fi
9273 rm -f conftest.$ac_objext conftest.$ac_ext
9274
9275 fi
9276 echo "$as_me:9276: result: $cf_cv_struct_dirent64" >&5
9277 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9278         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
9279 #define HAVE_STRUCT_DIRENT64 1
9280 EOF
9281
9282     fi
9283
9284 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9285 echo "$as_me:9285: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9286 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9287
9288 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9289 if test "${enable_tparm_varargs+set}" = set; then
9290   enableval="$enable_tparm_varargs"
9291   with_tparm_varargs=$enableval
9292 else
9293   with_tparm_varargs=yes
9294 fi;
9295 echo "$as_me:9295: result: $with_tparm_varargs" >&5
9296 echo "${ECHO_T}$with_tparm_varargs" >&6
9297 NCURSES_TPARM_VARARGS=0
9298 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
9299
9300 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9301 if test "$with_ticlib" != no ; then
9302 echo "$as_me:9302: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9303 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9304
9305 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9306 if test "${enable_tic_depends+set}" = set; then
9307   enableval="$enable_tic_depends"
9308   with_tic_depends=$enableval
9309 else
9310   with_tic_depends=yes
9311 fi;
9312 echo "$as_me:9312: result: $with_tic_depends" >&5
9313 echo "${ECHO_T}$with_tic_depends" >&6
9314 else
9315         with_tic_depends=no
9316 fi
9317
9318 ###   use option --with-bool to override bool's type
9319 echo "$as_me:9319: checking for type of bool" >&5
9320 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9321
9322 # Check whether --with-bool or --without-bool was given.
9323 if test "${with_bool+set}" = set; then
9324   withval="$with_bool"
9325   NCURSES_BOOL="$withval"
9326 else
9327   NCURSES_BOOL=auto
9328 fi;
9329 echo "$as_me:9329: result: $NCURSES_BOOL" >&5
9330 echo "${ECHO_T}$NCURSES_BOOL" >&6
9331
9332 echo "$as_me:9332: checking for alternate terminal capabilities file" >&5
9333 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9334
9335 # Check whether --with-caps or --without-caps was given.
9336 if test "${with_caps+set}" = set; then
9337   withval="$with_caps"
9338   TERMINFO_CAPS=Caps.$withval
9339 else
9340   TERMINFO_CAPS=Caps
9341 fi;
9342 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9343 echo "$as_me:9343: result: $TERMINFO_CAPS" >&5
9344 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9345
9346 ###   use option --with-chtype to override chtype's type
9347 echo "$as_me:9347: checking for type of chtype" >&5
9348 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9349
9350 # Check whether --with-chtype or --without-chtype was given.
9351 if test "${with_chtype+set}" = set; then
9352   withval="$with_chtype"
9353   NCURSES_CHTYPE="$withval"
9354 else
9355   NCURSES_CHTYPE=auto
9356 fi;
9357 echo "$as_me:9357: result: $NCURSES_CHTYPE" >&5
9358 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
9359
9360 ###   use option --with-ospeed to override ospeed's type
9361 echo "$as_me:9361: checking for type of ospeed" >&5
9362 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
9363
9364 # Check whether --with-ospeed or --without-ospeed was given.
9365 if test "${with_ospeed+set}" = set; then
9366   withval="$with_ospeed"
9367   NCURSES_OSPEED="$withval"
9368 else
9369   NCURSES_OSPEED=short
9370 fi;
9371 echo "$as_me:9371: result: $NCURSES_OSPEED" >&5
9372 echo "${ECHO_T}$NCURSES_OSPEED" >&6
9373
9374 ###   use option --with-mmask-t to override mmask_t's type
9375 echo "$as_me:9375: checking for type of mmask_t" >&5
9376 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
9377
9378 # Check whether --with-mmask-t or --without-mmask-t was given.
9379 if test "${with_mmask_t+set}" = set; then
9380   withval="$with_mmask_t"
9381   NCURSES_MMASK_T="$withval"
9382 else
9383   NCURSES_MMASK_T=auto
9384 fi;
9385 echo "$as_me:9385: result: $NCURSES_MMASK_T" >&5
9386 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
9387
9388 ###   use option --with-ccharw-max to override CCHARW_MAX size
9389 echo "$as_me:9389: checking for size CCHARW_MAX" >&5
9390 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
9391
9392 # Check whether --with-ccharw-max or --without-ccharw-max was given.
9393 if test "${with_ccharw_max+set}" = set; then
9394   withval="$with_ccharw_max"
9395   NCURSES_CCHARW_MAX="$withval"
9396 else
9397   NCURSES_CCHARW_MAX=5
9398 fi;
9399 echo "$as_me:9399: result: $NCURSES_CCHARW_MAX" >&5
9400 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
9401
9402 ### Enable compiling-in rcs id's
9403 echo "$as_me:9403: checking if RCS identifiers should be compiled-in" >&5
9404 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9405
9406 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9407 if test "${with_rcs_ids+set}" = set; then
9408   withval="$with_rcs_ids"
9409   with_rcs_ids=$withval
9410 else
9411   with_rcs_ids=no
9412 fi;
9413 echo "$as_me:9413: result: $with_rcs_ids" >&5
9414 echo "${ECHO_T}$with_rcs_ids" >&6
9415 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9416 #define USE_RCS_IDS 1
9417 EOF
9418
9419 ###############################################################################
9420
9421 echo "$as_me:9421: checking format of man-pages" >&5
9422 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
9423
9424 # Check whether --with-manpage-format or --without-manpage-format was given.
9425 if test "${with_manpage_format+set}" = set; then
9426   withval="$with_manpage_format"
9427   MANPAGE_FORMAT=$withval
9428 else
9429   MANPAGE_FORMAT=unknown
9430 fi;
9431
9432 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
9433 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
9434
9435 cf_unknown=
9436
9437 case $MANPAGE_FORMAT in
9438 unknown)
9439   if test -z "$MANPATH" ; then
9440     MANPATH="/usr/man:/usr/share/man"
9441   fi
9442
9443   # look for the 'date' man-page (it's most likely to be installed!)
9444   MANPAGE_FORMAT=
9445   cf_preform=no
9446   cf_catonly=yes
9447   cf_example=date
9448
9449   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9450   for cf_dir in $MANPATH; do
9451     test -z "$cf_dir" && cf_dir=/usr/man
9452     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
9453     do
9454       cf_test=`echo $cf_name | sed -e 's/*//'`
9455       if test "x$cf_test" = "x$cf_name" ; then
9456
9457         case "$cf_name" in
9458         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
9459         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
9460         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
9461         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
9462         esac
9463
9464         case "$cf_name" in
9465         $cf_dir/man*)
9466           cf_catonly=no
9467           ;;
9468         $cf_dir/cat*)
9469           cf_preform=yes
9470           ;;
9471         esac
9472         break
9473       fi
9474
9475       # if we found a match in either man* or cat*, stop looking
9476       if test -n "$MANPAGE_FORMAT" ; then
9477         cf_found=no
9478         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
9479         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
9480         case "$cf_name" in
9481         $cf_dir/cat*)
9482           cf_found=yes
9483           ;;
9484         esac
9485         test $cf_found=yes && break
9486       fi
9487     done
9488     # only check the first directory in $MANPATH where we find manpages
9489     if test -n "$MANPAGE_FORMAT" ; then
9490        break
9491     fi
9492   done
9493   # if we did not find the example, just assume it is normal
9494   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
9495   IFS="$ac_save_ifs"
9496   ;;
9497 *)
9498   for cf_option in $MANPAGE_FORMAT; do
9499      case $cf_option in #(vi
9500      gzip|compress|BSDI|normal|formatted|catonly)
9501        ;;
9502      *)
9503        cf_unknown="$cf_unknown $cf_option"
9504        ;;
9505      esac
9506   done
9507   ;;
9508 esac
9509
9510 echo "$as_me:9510: result: $MANPAGE_FORMAT" >&5
9511 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
9512 if test -n "$cf_unknown" ; then
9513   { echo "$as_me:9513: WARNING: Unexpected manpage-format $cf_unknown" >&5
9514 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
9515 fi
9516
9517 echo "$as_me:9517: checking for manpage renaming" >&5
9518 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
9519
9520 # Check whether --with-manpage-renames or --without-manpage-renames was given.
9521 if test "${with_manpage_renames+set}" = set; then
9522   withval="$with_manpage_renames"
9523   MANPAGE_RENAMES=$withval
9524 else
9525   MANPAGE_RENAMES=yes
9526 fi;
9527
9528 case ".$MANPAGE_RENAMES" in #(vi
9529 .no) #(vi
9530   ;;
9531 .|.yes)
9532   # Debian 'man' program?
9533   if test -f /etc/debian_version ; then
9534     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
9535   else
9536     MANPAGE_RENAMES=no
9537   fi
9538   ;;
9539 esac
9540
9541 if test "$MANPAGE_RENAMES" != no ; then
9542   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
9543     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
9544   elif test ! -f $MANPAGE_RENAMES ; then
9545     { { echo "$as_me:9545: error: not a filename: $MANPAGE_RENAMES" >&5
9546 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
9547    { (exit 1); exit 1; }; }
9548   fi
9549
9550   test ! -d man && mkdir man
9551
9552   # Construct a sed-script to perform renaming within man-pages
9553   if test -n "$MANPAGE_RENAMES" ; then
9554     test ! -d man && mkdir man
9555     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
9556   fi
9557 fi
9558
9559 echo "$as_me:9559: result: $MANPAGE_RENAMES" >&5
9560 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
9561
9562 echo "$as_me:9562: checking if manpage aliases will be installed" >&5
9563 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
9564
9565 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
9566 if test "${with_manpage_aliases+set}" = set; then
9567   withval="$with_manpage_aliases"
9568   MANPAGE_ALIASES=$withval
9569 else
9570   MANPAGE_ALIASES=yes
9571 fi;
9572
9573 echo "$as_me:9573: result: $MANPAGE_ALIASES" >&5
9574 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
9575
9576 if test "$LN_S" = "ln -s"; then
9577         cf_use_symlinks=yes
9578 else
9579         cf_use_symlinks=no
9580 fi
9581
9582 MANPAGE_SYMLINKS=no
9583 if test "$MANPAGE_ALIASES" = yes ; then
9584 echo "$as_me:9584: checking if manpage symlinks should be used" >&5
9585 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
9586
9587 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
9588 if test "${with_manpage_symlinks+set}" = set; then
9589   withval="$with_manpage_symlinks"
9590   MANPAGE_SYMLINKS=$withval
9591 else
9592   MANPAGE_SYMLINKS=$cf_use_symlinks
9593 fi;
9594
9595 if test "$$cf_use_symlinks" = no; then
9596 if test "$MANPAGE_SYMLINKS" = yes ; then
9597         { echo "$as_me:9597: WARNING: cannot make symlinks" >&5
9598 echo "$as_me: WARNING: cannot make symlinks" >&2;}
9599         MANPAGE_SYMLINKS=no
9600 fi
9601 fi
9602
9603 echo "$as_me:9603: result: $MANPAGE_SYMLINKS" >&5
9604 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
9605 fi
9606
9607 echo "$as_me:9607: checking for manpage tbl" >&5
9608 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
9609
9610 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
9611 if test "${with_manpage_tbl+set}" = set; then
9612   withval="$with_manpage_tbl"
9613   MANPAGE_TBL=$withval
9614 else
9615   MANPAGE_TBL=no
9616 fi;
9617
9618 echo "$as_me:9618: result: $MANPAGE_TBL" >&5
9619 echo "${ECHO_T}$MANPAGE_TBL" >&6
9620
9621   if test "$prefix" = "NONE" ; then
9622      cf_prefix="$ac_default_prefix"
9623   else
9624      cf_prefix="$prefix"
9625   fi
9626
9627   case "$MANPAGE_FORMAT" in # (vi
9628   *catonly*) # (vi
9629     cf_format=yes
9630     cf_inboth=no
9631     ;;
9632   *formatted*) # (vi
9633     cf_format=yes
9634     cf_inboth=yes
9635     ;;
9636   *)
9637     cf_format=no
9638     cf_inboth=no
9639     ;;
9640   esac
9641
9642 test ! -d man && mkdir man
9643
9644 cf_so_strip=
9645 cf_compress=
9646 case "$MANPAGE_FORMAT" in #(vi
9647 *compress*) #(vi
9648         cf_so_strip="Z"
9649         cf_compress=compress
9650   ;;
9651 *gzip*) #(vi
9652         cf_so_strip="gz"
9653         cf_compress=gzip
9654   ;;
9655 esac
9656
9657 cf_edit_man=./edit_man.sh
9658 cf_man_alias=`pwd`/man_alias.sed
9659
9660 cat >$cf_edit_man <<CF_EOF
9661 #! /bin/sh
9662 # this script is generated by the configure-script CF_MAN_PAGES macro.
9663
9664 prefix="$cf_prefix"
9665 datadir="$datadir"
9666
9667 NCURSES_MAJOR="$NCURSES_MAJOR"
9668 NCURSES_MINOR="$NCURSES_MINOR"
9669 NCURSES_PATCH="$NCURSES_PATCH"
9670
9671 NCURSES_OSPEED="$NCURSES_OSPEED"
9672 TERMINFO="$TERMINFO"
9673
9674 INSTALL="$INSTALL"
9675 INSTALL_DATA="$INSTALL_DATA"
9676
9677 transform="$program_transform_name"
9678
9679 TMP=\${TMPDIR-/tmp}/man\$\$
9680 trap "rm -f \$TMP" 0 1 2 5 15
9681
9682 form=\$1
9683 shift || exit 1
9684
9685 verb=\$1
9686 shift || exit 1
9687
9688 mandir=\$1
9689 shift || exit 1
9690
9691 srcdir=\$1
9692 top_srcdir=\$srcdir/..
9693 shift || exit 1
9694
9695 if test "\$form" = normal ; then
9696         if test "$cf_format" = yes ; then
9697         if test "$cf_inboth" = no ; then
9698                 sh \$0 format \$verb \$mandir \$srcdir \$*
9699                 exit $?
9700         fi
9701         fi
9702         cf_subdir=\$mandir/man
9703         cf_tables=$MANPAGE_TBL
9704 else
9705         cf_subdir=\$mandir/cat
9706         cf_tables=yes
9707 fi
9708
9709 # process the list of source-files
9710 for i in \$* ; do
9711 case \$i in #(vi
9712 *.orig|*.rej) ;; #(vi
9713 *.[0-9]*)
9714         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9715         if test \$verb = installing ; then
9716         if test ! -d \$cf_subdir\${section} ; then
9717                 mkdir -p \$cf_subdir\$section
9718         fi
9719         fi
9720
9721         # replace variables in man page
9722         if test ! -f $cf_man_alias ; then
9723 cat >>$cf_man_alias <<-CF_EOF2
9724                 s,@DATADIR@,\$datadir,g
9725                 s,@TERMINFO@,\$TERMINFO,g
9726                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9727                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9728                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9729                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9730 CF_EOF
9731
9732         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9733         do
9734                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9735                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9736 cat >>$cf_edit_man <<-CF_EOF
9737                 s,@$cf_NAME@,$cf_name,g
9738 CF_EOF
9739         done
9740
9741 cat >>$cf_edit_man <<CF_EOF
9742 CF_EOF2
9743                 echo "...made $cf_man_alias"
9744         fi
9745
9746         aliases=
9747         cf_source=\`basename \$i\`
9748         inalias=\$cf_source
9749         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9750         if test ! -f \$inalias ; then
9751                 echo .. skipped \$cf_source
9752                 continue
9753         fi
9754 CF_EOF
9755
9756 if test "$MANPAGE_ALIASES" != no ; then
9757 cat >>$cf_edit_man <<CF_EOF
9758         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9759 CF_EOF
9760 fi
9761
9762 if test "$MANPAGE_RENAMES" = no ; then
9763 cat >>$cf_edit_man <<CF_EOF
9764         # perform program transformations for section 1 man pages
9765         if test \$section = 1 ; then
9766                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9767         else
9768                 cf_target=\$cf_subdir\${section}/\$cf_source
9769         fi
9770 CF_EOF
9771 else
9772 cat >>$cf_edit_man <<CF_EOF
9773         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9774         if test -z "\$cf_target" ; then
9775                 echo '? missing rename for '\$cf_source
9776                 cf_target="\$cf_source"
9777         fi
9778         cf_target="\$cf_subdir\${section}/\${cf_target}"
9779
9780 CF_EOF
9781 fi
9782
9783 cat >>$cf_edit_man <<CF_EOF
9784         sed     -f $cf_man_alias \\
9785 CF_EOF
9786
9787 if test -f $MANPAGE_RENAMES ; then
9788 cat >>$cf_edit_man <<CF_EOF
9789                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9790 CF_EOF
9791 else
9792 cat >>$cf_edit_man <<CF_EOF
9793                 < \$i >\$TMP
9794 CF_EOF
9795 fi
9796
9797 cat >>$cf_edit_man <<CF_EOF
9798 if test \$cf_tables = yes ; then
9799         tbl \$TMP >\$TMP.out
9800         mv \$TMP.out \$TMP
9801 fi
9802 CF_EOF
9803
9804 if test $with_curses_h != yes ; then
9805 cat >>$cf_edit_man <<CF_EOF
9806         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9807         mv \$TMP.out \$TMP
9808 CF_EOF
9809 fi
9810
9811 cat >>$cf_edit_man <<CF_EOF
9812         if test \$form = format ; then
9813                 nroff -man \$TMP >\$TMP.out
9814                 mv \$TMP.out \$TMP
9815         fi
9816 CF_EOF
9817
9818 if test -n "$cf_compress" ; then
9819 cat >>$cf_edit_man <<CF_EOF
9820         if test \$verb = installing ; then
9821         if ( $cf_compress -f \$TMP )
9822         then
9823                 mv \$TMP.$cf_so_strip \$TMP
9824         fi
9825         fi
9826         cf_target="\$cf_target.$cf_so_strip"
9827 CF_EOF
9828 fi
9829
9830 case "$MANPAGE_FORMAT" in #(vi
9831 *BSDI*)
9832 cat >>$cf_edit_man <<CF_EOF
9833         if test \$form = format ; then
9834                 # BSDI installs only .0 suffixes in the cat directories
9835                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9836         fi
9837 CF_EOF
9838   ;;
9839 esac
9840
9841 cat >>$cf_edit_man <<CF_EOF
9842         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9843         if test \$verb = installing ; then
9844                 echo \$verb \$cf_target
9845                 \$INSTALL_DATA \$TMP \$cf_target
9846                 test -d \$cf_subdir\${section} &&
9847                 test -n "\$aliases" && (
9848                         cd \$cf_subdir\${section} && (
9849                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9850                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9851                                 cf_target=\`basename \$cf_target\`
9852                                 for cf_alias in \$aliases
9853                                 do
9854                                         if test \$section = 1 ; then
9855                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9856                                         fi
9857
9858                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9859                                                 if test -f \$cf_alias\${suffix} ; then
9860                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9861                                                         then
9862                                                                 continue
9863                                                         fi
9864                                                 fi
9865                                                 echo .. \$verb alias \$cf_alias\${suffix}
9866                                                 rm -f \$cf_alias\${suffix}
9867                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9868                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
9869                                                 echo ".so \$cf_source" >\$TMP
9870 CF_EOF
9871 if test -n "$cf_compress" ; then
9872 cat >>$cf_edit_man <<CF_EOF
9873                                                 if test -n "$cf_so_strip" ; then
9874                                                         $cf_compress -f \$TMP
9875                                                         mv \$TMP.$cf_so_strip \$TMP
9876                                                 fi
9877 CF_EOF
9878 fi
9879 cat >>$cf_edit_man <<CF_EOF
9880                                                 echo .. \$verb alias \$cf_alias\${suffix}
9881                                                 rm -f \$cf_alias\${suffix}
9882                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
9883                                         fi
9884                                 done
9885                         )
9886                 )
9887         elif test \$verb = removing ; then
9888                 test -f \$cf_target && (
9889                         echo \$verb \$cf_target
9890                         rm -f \$cf_target
9891                 )
9892                 test -d \$cf_subdir\${section} &&
9893                 test -n "\$aliases" && (
9894                         cd \$cf_subdir\${section} && (
9895                                 for cf_alias in \$aliases
9896                                 do
9897                                         if test \$section = 1 ; then
9898                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9899                                         fi
9900
9901                                         echo .. \$verb alias \$cf_alias\${suffix}
9902                                         rm -f \$cf_alias\${suffix}
9903                                 done
9904                         )
9905                 )
9906         else
9907 #               echo ".hy 0"
9908                 cat \$TMP
9909         fi
9910         ;;
9911 esac
9912 done
9913
9914 if test $cf_inboth = yes ; then
9915 if test \$form != format ; then
9916         sh \$0 format \$verb \$mandir \$srcdir \$*
9917 fi
9918 fi
9919
9920 exit 0
9921 CF_EOF
9922 chmod 755 $cf_edit_man
9923
9924 ###############################################################################
9925
9926 ### Note that some functions (such as const) are normally disabled anyway.
9927 echo "$as_me:9927: checking if you want to build with function extensions" >&5
9928 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9929
9930 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9931 if test "${enable_ext_funcs+set}" = set; then
9932   enableval="$enable_ext_funcs"
9933   with_ext_funcs=$enableval
9934 else
9935   with_ext_funcs=yes
9936 fi;
9937 echo "$as_me:9937: result: $with_ext_funcs" >&5
9938 echo "${ECHO_T}$with_ext_funcs" >&6
9939 if test "$with_ext_funcs" = yes ; then
9940         NCURSES_EXT_FUNCS=1
9941         cat >>confdefs.h <<\EOF
9942 #define HAVE_CURSES_VERSION 1
9943 EOF
9944
9945         cat >>confdefs.h <<\EOF
9946 #define HAVE_HAS_KEY 1
9947 EOF
9948
9949         cat >>confdefs.h <<\EOF
9950 #define HAVE_RESIZETERM 1
9951 EOF
9952
9953         cat >>confdefs.h <<\EOF
9954 #define HAVE_RESIZE_TERM 1
9955 EOF
9956
9957         cat >>confdefs.h <<\EOF
9958 #define HAVE_USE_DEFAULT_COLORS 1
9959 EOF
9960
9961         cat >>confdefs.h <<\EOF
9962 #define HAVE_WRESIZE 1
9963 EOF
9964
9965         cat >>confdefs.h <<\EOF
9966 #define NCURSES_EXT_FUNCS 1
9967 EOF
9968
9969         GENERATED_EXT_FUNCS=generated
9970 else
9971         NCURSES_EXT_FUNCS=0
9972         GENERATED_EXT_FUNCS=
9973 fi
9974
9975 echo "$as_me:9975: checking if you want to build with experimental SCREEN extensions" >&5
9976 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
9977
9978 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
9979 if test "${enable_sp_funcs+set}" = set; then
9980   enableval="$enable_sp_funcs"
9981   with_sp_funcs=$enableval
9982 else
9983   with_sp_funcs=no
9984 fi;
9985 echo "$as_me:9985: result: $with_sp_funcs" >&5
9986 echo "${ECHO_T}$with_sp_funcs" >&6
9987 if test "$with_sp_funcs" = yes ; then
9988         NCURSES_SP_FUNCS=1
9989         cat >>confdefs.h <<\EOF
9990 #define NCURSES_SP_FUNCS 1
9991 EOF
9992
9993         GENERATED_SP_FUNCS=generated
9994 else
9995         NCURSES_SP_FUNCS=0
9996         GENERATED_SP_FUNCS=
9997 fi
9998
9999 echo "$as_me:9999: checking if you want to build with experimental terminal-driver" >&5
10000 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10001
10002 # Check whether --enable-term-driver or --disable-term-driver was given.
10003 if test "${enable_term_driver+set}" = set; then
10004   enableval="$enable_term_driver"
10005   with_term_driver=$enableval
10006 else
10007   with_term_driver=no
10008 fi;
10009 echo "$as_me:10009: result: $with_term_driver" >&5
10010 echo "${ECHO_T}$with_term_driver" >&6
10011 if test "$with_term_driver" = yes ; then
10012         cat >>confdefs.h <<\EOF
10013 #define USE_TERM_DRIVER 1
10014 EOF
10015
10016         if test "$with_sp_funcs" != yes ; then
10017                 { { echo "$as_me:10017: error: The term-driver option relies upon sp-funcs" >&5
10018 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10019    { (exit 1); exit 1; }; }
10020         fi
10021 fi
10022
10023 ###   use option --enable-const to turn on use of const beyond that in XSI.
10024 echo "$as_me:10024: checking for extended use of const keyword" >&5
10025 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10026
10027 # Check whether --enable-const or --disable-const was given.
10028 if test "${enable_const+set}" = set; then
10029   enableval="$enable_const"
10030   with_ext_const=$enableval
10031 else
10032   with_ext_const=no
10033 fi;
10034 echo "$as_me:10034: result: $with_ext_const" >&5
10035 echo "${ECHO_T}$with_ext_const" >&6
10036 NCURSES_CONST='/*nothing*/'
10037 if test "$with_ext_const" = yes ; then
10038         NCURSES_CONST=const
10039 fi
10040
10041 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10042 echo "$as_me:10042: checking if you want to use extended colors" >&5
10043 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10044
10045 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10046 if test "${enable_ext_colors+set}" = set; then
10047   enableval="$enable_ext_colors"
10048   with_ext_colors=$enableval
10049 else
10050   with_ext_colors=no
10051 fi;
10052 echo "$as_me:10052: result: $with_ext_colors" >&5
10053 echo "${ECHO_T}$with_ext_colors" >&6
10054 NCURSES_EXT_COLORS=0
10055 if test "$with_ext_colors" = yes ; then
10056         if test "$with_widec" != yes ; then
10057                 { { echo "$as_me:10057: error: This option applies only to wide-character library" >&5
10058 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10059    { (exit 1); exit 1; }; }
10060         else
10061                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10062
10063 if test "${with_abi_version+set}" != set; then
10064         case $cf_cv_rel_version in
10065         5.*)
10066                 cf_cv_rel_version=6.0
10067                 cf_cv_abi_version=6
10068                 { echo "$as_me:10068: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10069 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10070                 ;;
10071         esac
10072 fi
10073
10074         fi
10075         NCURSES_EXT_COLORS=1
10076         cat >>confdefs.h <<\EOF
10077 #define NCURSES_EXT_COLORS 1
10078 EOF
10079
10080 fi
10081
10082 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10083 echo "$as_me:10083: checking if you want to use extended mouse encoding" >&5
10084 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10085
10086 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10087 if test "${enable_ext_mouse+set}" = set; then
10088   enableval="$enable_ext_mouse"
10089   with_ext_mouse=$enableval
10090 else
10091   with_ext_mouse=no
10092 fi;
10093 echo "$as_me:10093: result: $with_ext_mouse" >&5
10094 echo "${ECHO_T}$with_ext_mouse" >&6
10095 NCURSES_MOUSE_VERSION=1
10096 if test "$with_ext_mouse" = yes ; then
10097         NCURSES_MOUSE_VERSION=2
10098
10099 if test "${with_abi_version+set}" != set; then
10100         case $cf_cv_rel_version in
10101         5.*)
10102                 cf_cv_rel_version=6.0
10103                 cf_cv_abi_version=6
10104                 { echo "$as_me:10104: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10105 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10106                 ;;
10107         esac
10108 fi
10109
10110 fi
10111
10112 echo "$as_me:10112: checking if you want \$NCURSES_NO_PADDING code" >&5
10113 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10114
10115 # Check whether --enable-no-padding or --disable-no-padding was given.
10116 if test "${enable_no_padding+set}" = set; then
10117   enableval="$enable_no_padding"
10118   with_no_padding=$enableval
10119 else
10120   with_no_padding=$with_ext_funcs
10121 fi;
10122 echo "$as_me:10122: result: $with_no_padding" >&5
10123 echo "${ECHO_T}$with_no_padding" >&6
10124 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
10125 #define NCURSES_NO_PADDING 1
10126 EOF
10127
10128 echo "$as_me:10128: checking for ANSI C header files" >&5
10129 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10130 if test "${ac_cv_header_stdc+set}" = set; then
10131   echo $ECHO_N "(cached) $ECHO_C" >&6
10132 else
10133   cat >conftest.$ac_ext <<_ACEOF
10134 #line 10134 "configure"
10135 #include "confdefs.h"
10136 #include <stdlib.h>
10137 #include <stdarg.h>
10138 #include <string.h>
10139 #include <float.h>
10140
10141 _ACEOF
10142 if { (eval echo "$as_me:10142: \"$ac_cpp conftest.$ac_ext\"") >&5
10143   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10144   ac_status=$?
10145   egrep -v '^ *\+' conftest.er1 >conftest.err
10146   rm -f conftest.er1
10147   cat conftest.err >&5
10148   echo "$as_me:10148: \$? = $ac_status" >&5
10149   (exit $ac_status); } >/dev/null; then
10150   if test -s conftest.err; then
10151     ac_cpp_err=$ac_c_preproc_warn_flag
10152   else
10153     ac_cpp_err=
10154   fi
10155 else
10156   ac_cpp_err=yes
10157 fi
10158 if test -z "$ac_cpp_err"; then
10159   ac_cv_header_stdc=yes
10160 else
10161   echo "$as_me: failed program was:" >&5
10162   cat conftest.$ac_ext >&5
10163   ac_cv_header_stdc=no
10164 fi
10165 rm -f conftest.err conftest.$ac_ext
10166
10167 if test $ac_cv_header_stdc = yes; then
10168   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10169   cat >conftest.$ac_ext <<_ACEOF
10170 #line 10170 "configure"
10171 #include "confdefs.h"
10172 #include <string.h>
10173
10174 _ACEOF
10175 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10176   egrep "memchr" >/dev/null 2>&1; then
10177   :
10178 else
10179   ac_cv_header_stdc=no
10180 fi
10181 rm -f conftest*
10182
10183 fi
10184
10185 if test $ac_cv_header_stdc = yes; then
10186   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10187   cat >conftest.$ac_ext <<_ACEOF
10188 #line 10188 "configure"
10189 #include "confdefs.h"
10190 #include <stdlib.h>
10191
10192 _ACEOF
10193 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10194   egrep "free" >/dev/null 2>&1; then
10195   :
10196 else
10197   ac_cv_header_stdc=no
10198 fi
10199 rm -f conftest*
10200
10201 fi
10202
10203 if test $ac_cv_header_stdc = yes; then
10204   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10205   if test "$cross_compiling" = yes; then
10206   :
10207 else
10208   cat >conftest.$ac_ext <<_ACEOF
10209 #line 10209 "configure"
10210 #include "confdefs.h"
10211 #include <ctype.h>
10212 #if ((' ' & 0x0FF) == 0x020)
10213 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10214 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10215 #else
10216 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10217                      || ('j' <= (c) && (c) <= 'r') \
10218                      || ('s' <= (c) && (c) <= 'z'))
10219 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10220 #endif
10221
10222 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10223 int
10224 main ()
10225 {
10226   int i;
10227   for (i = 0; i < 256; i++)
10228     if (XOR (islower (i), ISLOWER (i))
10229         || toupper (i) != TOUPPER (i))
10230       $ac_main_return(2);
10231   $ac_main_return (0);
10232 }
10233 _ACEOF
10234 rm -f conftest$ac_exeext
10235 if { (eval echo "$as_me:10235: \"$ac_link\"") >&5
10236   (eval $ac_link) 2>&5
10237   ac_status=$?
10238   echo "$as_me:10238: \$? = $ac_status" >&5
10239   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10240   { (eval echo "$as_me:10240: \"$ac_try\"") >&5
10241   (eval $ac_try) 2>&5
10242   ac_status=$?
10243   echo "$as_me:10243: \$? = $ac_status" >&5
10244   (exit $ac_status); }; }; then
10245   :
10246 else
10247   echo "$as_me: program exited with status $ac_status" >&5
10248 echo "$as_me: failed program was:" >&5
10249 cat conftest.$ac_ext >&5
10250 ac_cv_header_stdc=no
10251 fi
10252 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10253 fi
10254 fi
10255 fi
10256 echo "$as_me:10256: result: $ac_cv_header_stdc" >&5
10257 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10258 if test $ac_cv_header_stdc = yes; then
10259
10260 cat >>confdefs.h <<\EOF
10261 #define STDC_HEADERS 1
10262 EOF
10263
10264 fi
10265
10266 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10267
10268 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10269                   inttypes.h stdint.h unistd.h
10270 do
10271 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10272 echo "$as_me:10272: checking for $ac_header" >&5
10273 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10274 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10275   echo $ECHO_N "(cached) $ECHO_C" >&6
10276 else
10277   cat >conftest.$ac_ext <<_ACEOF
10278 #line 10278 "configure"
10279 #include "confdefs.h"
10280 $ac_includes_default
10281 #include <$ac_header>
10282 _ACEOF
10283 rm -f conftest.$ac_objext
10284 if { (eval echo "$as_me:10284: \"$ac_compile\"") >&5
10285   (eval $ac_compile) 2>&5
10286   ac_status=$?
10287   echo "$as_me:10287: \$? = $ac_status" >&5
10288   (exit $ac_status); } &&
10289          { ac_try='test -s conftest.$ac_objext'
10290   { (eval echo "$as_me:10290: \"$ac_try\"") >&5
10291   (eval $ac_try) 2>&5
10292   ac_status=$?
10293   echo "$as_me:10293: \$? = $ac_status" >&5
10294   (exit $ac_status); }; }; then
10295   eval "$as_ac_Header=yes"
10296 else
10297   echo "$as_me: failed program was:" >&5
10298 cat conftest.$ac_ext >&5
10299 eval "$as_ac_Header=no"
10300 fi
10301 rm -f conftest.$ac_objext conftest.$ac_ext
10302 fi
10303 echo "$as_me:10303: result: `eval echo '${'$as_ac_Header'}'`" >&5
10304 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10305 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10306   cat >>confdefs.h <<EOF
10307 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10308 EOF
10309
10310 fi
10311 done
10312
10313 echo "$as_me:10313: checking for signed char" >&5
10314 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
10315 if test "${ac_cv_type_signed_char+set}" = set; then
10316   echo $ECHO_N "(cached) $ECHO_C" >&6
10317 else
10318   cat >conftest.$ac_ext <<_ACEOF
10319 #line 10319 "configure"
10320 #include "confdefs.h"
10321 $ac_includes_default
10322 int
10323 main ()
10324 {
10325 if ((signed char *) 0)
10326   return 0;
10327 if (sizeof (signed char))
10328   return 0;
10329   ;
10330   return 0;
10331 }
10332 _ACEOF
10333 rm -f conftest.$ac_objext
10334 if { (eval echo "$as_me:10334: \"$ac_compile\"") >&5
10335   (eval $ac_compile) 2>&5
10336   ac_status=$?
10337   echo "$as_me:10337: \$? = $ac_status" >&5
10338   (exit $ac_status); } &&
10339          { ac_try='test -s conftest.$ac_objext'
10340   { (eval echo "$as_me:10340: \"$ac_try\"") >&5
10341   (eval $ac_try) 2>&5
10342   ac_status=$?
10343   echo "$as_me:10343: \$? = $ac_status" >&5
10344   (exit $ac_status); }; }; then
10345   ac_cv_type_signed_char=yes
10346 else
10347   echo "$as_me: failed program was:" >&5
10348 cat conftest.$ac_ext >&5
10349 ac_cv_type_signed_char=no
10350 fi
10351 rm -f conftest.$ac_objext conftest.$ac_ext
10352 fi
10353 echo "$as_me:10353: result: $ac_cv_type_signed_char" >&5
10354 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
10355
10356 echo "$as_me:10356: checking size of signed char" >&5
10357 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
10358 if test "${ac_cv_sizeof_signed_char+set}" = set; then
10359   echo $ECHO_N "(cached) $ECHO_C" >&6
10360 else
10361   if test "$ac_cv_type_signed_char" = yes; then
10362   if test "$cross_compiling" = yes; then
10363   # Depending upon the size, compute the lo and hi bounds.
10364 cat >conftest.$ac_ext <<_ACEOF
10365 #line 10365 "configure"
10366 #include "confdefs.h"
10367 $ac_includes_default
10368 int
10369 main ()
10370 {
10371 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
10372   ;
10373   return 0;
10374 }
10375 _ACEOF
10376 rm -f conftest.$ac_objext
10377 if { (eval echo "$as_me:10377: \"$ac_compile\"") >&5
10378   (eval $ac_compile) 2>&5
10379   ac_status=$?
10380   echo "$as_me:10380: \$? = $ac_status" >&5
10381   (exit $ac_status); } &&
10382          { ac_try='test -s conftest.$ac_objext'
10383   { (eval echo "$as_me:10383: \"$ac_try\"") >&5
10384   (eval $ac_try) 2>&5
10385   ac_status=$?
10386   echo "$as_me:10386: \$? = $ac_status" >&5
10387   (exit $ac_status); }; }; then
10388   ac_lo=0 ac_mid=0
10389   while :; do
10390     cat >conftest.$ac_ext <<_ACEOF
10391 #line 10391 "configure"
10392 #include "confdefs.h"
10393 $ac_includes_default
10394 int
10395 main ()
10396 {
10397 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10398   ;
10399   return 0;
10400 }
10401 _ACEOF
10402 rm -f conftest.$ac_objext
10403 if { (eval echo "$as_me:10403: \"$ac_compile\"") >&5
10404   (eval $ac_compile) 2>&5
10405   ac_status=$?
10406   echo "$as_me:10406: \$? = $ac_status" >&5
10407   (exit $ac_status); } &&
10408          { ac_try='test -s conftest.$ac_objext'
10409   { (eval echo "$as_me:10409: \"$ac_try\"") >&5
10410   (eval $ac_try) 2>&5
10411   ac_status=$?
10412   echo "$as_me:10412: \$? = $ac_status" >&5
10413   (exit $ac_status); }; }; then
10414   ac_hi=$ac_mid; break
10415 else
10416   echo "$as_me: failed program was:" >&5
10417 cat conftest.$ac_ext >&5
10418 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10419 fi
10420 rm -f conftest.$ac_objext conftest.$ac_ext
10421   done
10422 else
10423   echo "$as_me: failed program was:" >&5
10424 cat conftest.$ac_ext >&5
10425 ac_hi=-1 ac_mid=-1
10426   while :; do
10427     cat >conftest.$ac_ext <<_ACEOF
10428 #line 10428 "configure"
10429 #include "confdefs.h"
10430 $ac_includes_default
10431 int
10432 main ()
10433 {
10434 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
10435   ;
10436   return 0;
10437 }
10438 _ACEOF
10439 rm -f conftest.$ac_objext
10440 if { (eval echo "$as_me:10440: \"$ac_compile\"") >&5
10441   (eval $ac_compile) 2>&5
10442   ac_status=$?
10443   echo "$as_me:10443: \$? = $ac_status" >&5
10444   (exit $ac_status); } &&
10445          { ac_try='test -s conftest.$ac_objext'
10446   { (eval echo "$as_me:10446: \"$ac_try\"") >&5
10447   (eval $ac_try) 2>&5
10448   ac_status=$?
10449   echo "$as_me:10449: \$? = $ac_status" >&5
10450   (exit $ac_status); }; }; then
10451   ac_lo=$ac_mid; break
10452 else
10453   echo "$as_me: failed program was:" >&5
10454 cat conftest.$ac_ext >&5
10455 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10456 fi
10457 rm -f conftest.$ac_objext conftest.$ac_ext
10458   done
10459 fi
10460 rm -f conftest.$ac_objext conftest.$ac_ext
10461 # Binary search between lo and hi bounds.
10462 while test "x$ac_lo" != "x$ac_hi"; do
10463   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10464   cat >conftest.$ac_ext <<_ACEOF
10465 #line 10465 "configure"
10466 #include "confdefs.h"
10467 $ac_includes_default
10468 int
10469 main ()
10470 {
10471 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10472   ;
10473   return 0;
10474 }
10475 _ACEOF
10476 rm -f conftest.$ac_objext
10477 if { (eval echo "$as_me:10477: \"$ac_compile\"") >&5
10478   (eval $ac_compile) 2>&5
10479   ac_status=$?
10480   echo "$as_me:10480: \$? = $ac_status" >&5
10481   (exit $ac_status); } &&
10482          { ac_try='test -s conftest.$ac_objext'
10483   { (eval echo "$as_me:10483: \"$ac_try\"") >&5
10484   (eval $ac_try) 2>&5
10485   ac_status=$?
10486   echo "$as_me:10486: \$? = $ac_status" >&5
10487   (exit $ac_status); }; }; then
10488   ac_hi=$ac_mid
10489 else
10490   echo "$as_me: failed program was:" >&5
10491 cat conftest.$ac_ext >&5
10492 ac_lo=`expr $ac_mid + 1`
10493 fi
10494 rm -f conftest.$ac_objext conftest.$ac_ext
10495 done
10496 ac_cv_sizeof_signed_char=$ac_lo
10497 else
10498   if test "$cross_compiling" = yes; then
10499   { { echo "$as_me:10499: error: cannot run test program while cross compiling" >&5
10500 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10501    { (exit 1); exit 1; }; }
10502 else
10503   cat >conftest.$ac_ext <<_ACEOF
10504 #line 10504 "configure"
10505 #include "confdefs.h"
10506 $ac_includes_default
10507 int
10508 main ()
10509 {
10510 FILE *f = fopen ("conftest.val", "w");
10511 if (!f)
10512   $ac_main_return (1);
10513 fprintf (f, "%d", (sizeof (signed char)));
10514 fclose (f);
10515   ;
10516   return 0;
10517 }
10518 _ACEOF
10519 rm -f conftest$ac_exeext
10520 if { (eval echo "$as_me:10520: \"$ac_link\"") >&5
10521   (eval $ac_link) 2>&5
10522   ac_status=$?
10523   echo "$as_me:10523: \$? = $ac_status" >&5
10524   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10525   { (eval echo "$as_me:10525: \"$ac_try\"") >&5
10526   (eval $ac_try) 2>&5
10527   ac_status=$?
10528   echo "$as_me:10528: \$? = $ac_status" >&5
10529   (exit $ac_status); }; }; then
10530   ac_cv_sizeof_signed_char=`cat conftest.val`
10531 else
10532   echo "$as_me: program exited with status $ac_status" >&5
10533 echo "$as_me: failed program was:" >&5
10534 cat conftest.$ac_ext >&5
10535 fi
10536 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10537 fi
10538 fi
10539 rm -f conftest.val
10540 else
10541   ac_cv_sizeof_signed_char=0
10542 fi
10543 fi
10544 echo "$as_me:10544: result: $ac_cv_sizeof_signed_char" >&5
10545 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
10546 cat >>confdefs.h <<EOF
10547 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10548 EOF
10549
10550 if test "$ac_cv_sizeof_signed_char" = 1 ; then
10551         NCURSES_SBOOL="signed char"
10552 else
10553         NCURSES_SBOOL="char"
10554 fi
10555 echo "$as_me:10555: checking if you want to use signed Boolean array in term.h" >&5
10556 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
10557
10558 # Check whether --enable-signed-char or --disable-signed-char was given.
10559 if test "${enable_signed_char+set}" = set; then
10560   enableval="$enable_signed_char"
10561   with_signed_char=$enableval
10562 else
10563   with_signed_char=no
10564 fi;
10565 echo "$as_me:10565: result: $with_signed_char" >&5
10566 echo "${ECHO_T}$with_signed_char" >&6
10567 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
10568
10569 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
10570 echo "$as_me:10570: checking if you want SIGWINCH handler" >&5
10571 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
10572
10573 # Check whether --enable-sigwinch or --disable-sigwinch was given.
10574 if test "${enable_sigwinch+set}" = set; then
10575   enableval="$enable_sigwinch"
10576   with_sigwinch=$enableval
10577 else
10578   with_sigwinch=$with_ext_funcs
10579 fi;
10580 echo "$as_me:10580: result: $with_sigwinch" >&5
10581 echo "${ECHO_T}$with_sigwinch" >&6
10582 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
10583 #define USE_SIGWINCH 1
10584 EOF
10585
10586 ###   use option --enable-tcap-names to allow user to define new capabilities
10587 echo "$as_me:10587: checking if you want user-definable terminal capabilities like termcap" >&5
10588 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
10589
10590 # Check whether --enable-tcap-names or --disable-tcap-names was given.
10591 if test "${enable_tcap_names+set}" = set; then
10592   enableval="$enable_tcap_names"
10593   with_tcap_names=$enableval
10594 else
10595   with_tcap_names=$with_ext_funcs
10596 fi;
10597 echo "$as_me:10597: result: $with_tcap_names" >&5
10598 echo "${ECHO_T}$with_tcap_names" >&6
10599 NCURSES_XNAMES=0
10600 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
10601
10602 ###############################################################################
10603 # These options are relatively safe to experiment with.
10604
10605 echo "$as_me:10605: checking if you want all development code" >&5
10606 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
10607
10608 # Check whether --with-develop or --without-develop was given.
10609 if test "${with_develop+set}" = set; then
10610   withval="$with_develop"
10611   with_develop=$withval
10612 else
10613   with_develop=no
10614 fi;
10615 echo "$as_me:10615: result: $with_develop" >&5
10616 echo "${ECHO_T}$with_develop" >&6
10617
10618 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
10619 echo "$as_me:10619: checking if you want hard-tabs code" >&5
10620 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
10621
10622 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
10623 if test "${enable_hard_tabs+set}" = set; then
10624   enableval="$enable_hard_tabs"
10625
10626 else
10627   enable_hard_tabs=$with_develop
10628 fi;
10629 echo "$as_me:10629: result: $enable_hard_tabs" >&5
10630 echo "${ECHO_T}$enable_hard_tabs" >&6
10631 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
10632 #define USE_HARD_TABS 1
10633 EOF
10634
10635 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
10636 echo "$as_me:10636: checking if you want limited support for xmc" >&5
10637 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
10638
10639 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
10640 if test "${enable_xmc_glitch+set}" = set; then
10641   enableval="$enable_xmc_glitch"
10642
10643 else
10644   enable_xmc_glitch=$with_develop
10645 fi;
10646 echo "$as_me:10646: result: $enable_xmc_glitch" >&5
10647 echo "${ECHO_T}$enable_xmc_glitch" >&6
10648 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10649 #define USE_XMC_SUPPORT 1
10650 EOF
10651
10652 ###############################################################################
10653 # These are just experimental, probably should not be in a package:
10654
10655 echo "$as_me:10655: checking if you do not want to assume colors are white-on-black" >&5
10656 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10657
10658 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10659 if test "${enable_assumed_color+set}" = set; then
10660   enableval="$enable_assumed_color"
10661   with_assumed_color=$enableval
10662 else
10663   with_assumed_color=yes
10664 fi;
10665 echo "$as_me:10665: result: $with_assumed_color" >&5
10666 echo "${ECHO_T}$with_assumed_color" >&6
10667 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10668 #define USE_ASSUMED_COLOR 1
10669 EOF
10670
10671 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10672 echo "$as_me:10672: checking if you want hashmap scrolling-optimization code" >&5
10673 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10674
10675 # Check whether --enable-hashmap or --disable-hashmap was given.
10676 if test "${enable_hashmap+set}" = set; then
10677   enableval="$enable_hashmap"
10678   with_hashmap=$enableval
10679 else
10680   with_hashmap=yes
10681 fi;
10682 echo "$as_me:10682: result: $with_hashmap" >&5
10683 echo "${ECHO_T}$with_hashmap" >&6
10684 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10685 #define USE_HASHMAP 1
10686 EOF
10687
10688 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10689 echo "$as_me:10689: checking if you want colorfgbg code" >&5
10690 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10691
10692 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10693 if test "${enable_colorfgbg+set}" = set; then
10694   enableval="$enable_colorfgbg"
10695   with_colorfgbg=$enableval
10696 else
10697   with_colorfgbg=no
10698 fi;
10699 echo "$as_me:10699: result: $with_colorfgbg" >&5
10700 echo "${ECHO_T}$with_colorfgbg" >&6
10701 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10702 #define USE_COLORFGBG 1
10703 EOF
10704
10705 ###   use option --enable-interop to turn on use of bindings used for interop
10706 echo "$as_me:10706: checking if you want interop bindings" >&5
10707 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
10708
10709 # Check whether --enable-interop or --disable-interop was given.
10710 if test "${enable_interop+set}" = set; then
10711   enableval="$enable_interop"
10712   with_exp_interop=$enableval
10713 else
10714   with_exp_interop=no
10715 fi;
10716 echo "$as_me:10716: result: $with_exp_interop" >&5
10717 echo "${ECHO_T}$with_exp_interop" >&6
10718
10719 NCURSES_INTEROP_FUNCS=0
10720 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
10721
10722 # This is still experimental (20080329), but should ultimately be moved to
10723 # the script-block --with-normal, etc.
10724
10725 echo "$as_me:10725: checking if you want to link with the pthread library" >&5
10726 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10727
10728 # Check whether --with-pthread or --without-pthread was given.
10729 if test "${with_pthread+set}" = set; then
10730   withval="$with_pthread"
10731   with_pthread=$withval
10732 else
10733   with_pthread=no
10734 fi;
10735 echo "$as_me:10735: result: $with_pthread" >&5
10736 echo "${ECHO_T}$with_pthread" >&6
10737
10738 if test "$with_pthread" != no ; then
10739     echo "$as_me:10739: checking for pthread.h" >&5
10740 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10741 if test "${ac_cv_header_pthread_h+set}" = set; then
10742   echo $ECHO_N "(cached) $ECHO_C" >&6
10743 else
10744   cat >conftest.$ac_ext <<_ACEOF
10745 #line 10745 "configure"
10746 #include "confdefs.h"
10747 #include <pthread.h>
10748 _ACEOF
10749 if { (eval echo "$as_me:10749: \"$ac_cpp conftest.$ac_ext\"") >&5
10750   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10751   ac_status=$?
10752   egrep -v '^ *\+' conftest.er1 >conftest.err
10753   rm -f conftest.er1
10754   cat conftest.err >&5
10755   echo "$as_me:10755: \$? = $ac_status" >&5
10756   (exit $ac_status); } >/dev/null; then
10757   if test -s conftest.err; then
10758     ac_cpp_err=$ac_c_preproc_warn_flag
10759   else
10760     ac_cpp_err=
10761   fi
10762 else
10763   ac_cpp_err=yes
10764 fi
10765 if test -z "$ac_cpp_err"; then
10766   ac_cv_header_pthread_h=yes
10767 else
10768   echo "$as_me: failed program was:" >&5
10769   cat conftest.$ac_ext >&5
10770   ac_cv_header_pthread_h=no
10771 fi
10772 rm -f conftest.err conftest.$ac_ext
10773 fi
10774 echo "$as_me:10774: result: $ac_cv_header_pthread_h" >&5
10775 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10776 if test $ac_cv_header_pthread_h = yes; then
10777
10778         cat >>confdefs.h <<\EOF
10779 #define HAVE_PTHREADS_H 1
10780 EOF
10781
10782         echo "$as_me:10782: checking if we can link with the pthread library" >&5
10783 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10784         cf_save_LIBS="$LIBS"
10785         LIBS="-lpthread $LIBS"
10786         cat >conftest.$ac_ext <<_ACEOF
10787 #line 10787 "configure"
10788 #include "confdefs.h"
10789
10790 #include <pthread.h>
10791
10792 int
10793 main ()
10794 {
10795
10796         int rc = pthread_create(0,0,0,0);
10797
10798   ;
10799   return 0;
10800 }
10801 _ACEOF
10802 rm -f conftest.$ac_objext conftest$ac_exeext
10803 if { (eval echo "$as_me:10803: \"$ac_link\"") >&5
10804   (eval $ac_link) 2>&5
10805   ac_status=$?
10806   echo "$as_me:10806: \$? = $ac_status" >&5
10807   (exit $ac_status); } &&
10808          { ac_try='test -s conftest$ac_exeext'
10809   { (eval echo "$as_me:10809: \"$ac_try\"") >&5
10810   (eval $ac_try) 2>&5
10811   ac_status=$?
10812   echo "$as_me:10812: \$? = $ac_status" >&5
10813   (exit $ac_status); }; }; then
10814   with_pthread=yes
10815 else
10816   echo "$as_me: failed program was:" >&5
10817 cat conftest.$ac_ext >&5
10818 with_pthread=no
10819 fi
10820 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10821         LIBS="$cf_save_LIBS"
10822         echo "$as_me:10822: result: $with_pthread" >&5
10823 echo "${ECHO_T}$with_pthread" >&6
10824
10825         if test "$with_pthread" = yes ; then
10826             LIBS="-lpthread $LIBS"
10827             cat >>confdefs.h <<\EOF
10828 #define HAVE_LIBPTHREADS 1
10829 EOF
10830
10831         else
10832             { { echo "$as_me:10832: error: Cannot link with pthread library" >&5
10833 echo "$as_me: error: Cannot link with pthread library" >&2;}
10834    { (exit 1); exit 1; }; }
10835         fi
10836
10837 fi
10838
10839 fi
10840
10841 echo "$as_me:10841: checking if you want to allow EINTR in wgetch with pthreads" >&5
10842 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
10843
10844 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
10845 if test "${enable_pthreads_eintr+set}" = set; then
10846   enableval="$enable_pthreads_eintr"
10847   use_pthreads_eintr=$enableval
10848 else
10849   use_pthreads_eintr=no
10850 fi;
10851 echo "$as_me:10851: result: $use_pthreads_eintr" >&5
10852 echo "${ECHO_T}$use_pthreads_eintr" >&6
10853 if test $use_pthreads_eintr = yes ; then
10854     cat >>confdefs.h <<\EOF
10855 #define USE_PTHREADS_EINTR 1
10856 EOF
10857
10858 fi
10859
10860 echo "$as_me:10860: checking if you want to use weak-symbols for pthreads" >&5
10861 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
10862
10863 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
10864 if test "${enable_weak_symbols+set}" = set; then
10865   enableval="$enable_weak_symbols"
10866   use_weak_symbols=$enableval
10867 else
10868   use_weak_symbols=no
10869 fi;
10870 echo "$as_me:10870: result: $use_weak_symbols" >&5
10871 echo "${ECHO_T}$use_weak_symbols" >&6
10872 if test "$use_weak_symbols" = yes ; then
10873
10874 echo "$as_me:10874: checking if $CC supports weak symbols" >&5
10875 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
10876 if test "${cf_cv_weak_symbols+set}" = set; then
10877   echo $ECHO_N "(cached) $ECHO_C" >&6
10878 else
10879
10880 cat >conftest.$ac_ext <<_ACEOF
10881 #line 10881 "configure"
10882 #include "confdefs.h"
10883
10884 #include <stdio.h>
10885 int
10886 main ()
10887 {
10888
10889 #if defined(__GNUC__)
10890 #  if defined __USE_ISOC99
10891 #    define _cat_pragma(exp)    _Pragma(#exp)
10892 #    define _weak_pragma(exp)   _cat_pragma(weak name)
10893 #  else
10894 #    define _weak_pragma(exp)
10895 #  endif
10896 #  define _declare(name)        __extension__ extern __typeof__(name) name
10897 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
10898 #endif
10899
10900 weak_symbol(fopen);
10901
10902   ;
10903   return 0;
10904 }
10905 _ACEOF
10906 rm -f conftest.$ac_objext
10907 if { (eval echo "$as_me:10907: \"$ac_compile\"") >&5
10908   (eval $ac_compile) 2>&5
10909   ac_status=$?
10910   echo "$as_me:10910: \$? = $ac_status" >&5
10911   (exit $ac_status); } &&
10912          { ac_try='test -s conftest.$ac_objext'
10913   { (eval echo "$as_me:10913: \"$ac_try\"") >&5
10914   (eval $ac_try) 2>&5
10915   ac_status=$?
10916   echo "$as_me:10916: \$? = $ac_status" >&5
10917   (exit $ac_status); }; }; then
10918   cf_cv_weak_symbols=yes
10919 else
10920   echo "$as_me: failed program was:" >&5
10921 cat conftest.$ac_ext >&5
10922 cf_cv_weak_symbols=no
10923 fi
10924 rm -f conftest.$ac_objext conftest.$ac_ext
10925
10926 fi
10927 echo "$as_me:10927: result: $cf_cv_weak_symbols" >&5
10928 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
10929
10930 else
10931     cf_cv_weak_symbols=no
10932 fi
10933
10934 if test $cf_cv_weak_symbols = yes ; then
10935     cat >>confdefs.h <<\EOF
10936 #define USE_WEAK_SYMBOLS 1
10937 EOF
10938
10939 fi
10940
10941 PTHREAD=
10942 if test "$with_pthread" = "yes" ; then
10943     cat >>confdefs.h <<\EOF
10944 #define USE_PTHREADS 1
10945 EOF
10946
10947     enable_reentrant=yes
10948     if test $cf_cv_weak_symbols = yes ; then
10949         PTHREAD=-lpthread
10950     fi
10951 fi
10952
10953 # Reentrant code has to be opaque; there's little advantage to making ncurses
10954 # opaque outside of that, so there is no --enable-opaque option.  We can use
10955 # this option without --with-pthreads, but this will be always set for
10956 # pthreads.
10957 echo "$as_me:10957: checking if you want experimental reentrant code" >&5
10958 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
10959
10960 # Check whether --enable-reentrant or --disable-reentrant was given.
10961 if test "${enable_reentrant+set}" = set; then
10962   enableval="$enable_reentrant"
10963   with_reentrant=$enableval
10964 else
10965   with_reentrant=no
10966 fi;
10967 echo "$as_me:10967: result: $with_reentrant" >&5
10968 echo "${ECHO_T}$with_reentrant" >&6
10969 if test "$with_reentrant" = yes ; then
10970         cf_cv_enable_reentrant=1
10971         cf_cv_enable_opaque="NCURSES_INTERNALS"
10972         NCURSES_OPAQUE=1
10973         NCURSES_SIZE_T=int
10974         if test $cf_cv_weak_symbols = yes ; then
10975
10976 # remove pthread library from $LIBS
10977 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
10978
10979                 TEST_LIBS="-lpthread $TEST_LIBS"
10980                 TEST_LIBS2="-lpthread $TEST_LIBS2"
10981         fi
10982         LIB_SUFFIX="t${LIB_SUFFIX}"
10983         cat >>confdefs.h <<\EOF
10984 #define USE_REENTRANT 1
10985 EOF
10986
10987 if test "${with_abi_version+set}" != set; then
10988         case $cf_cv_rel_version in
10989         5.*)
10990                 cf_cv_rel_version=6.0
10991                 cf_cv_abi_version=6
10992                 { echo "$as_me:10992: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10993 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10994                 ;;
10995         esac
10996 fi
10997
10998 else
10999         cf_cv_enable_reentrant=0
11000         cf_cv_enable_opaque="NCURSES_OPAQUE"
11001         NCURSES_OPAQUE=0
11002         NCURSES_SIZE_T=short
11003 fi
11004
11005 ### Allow using a different wrap-prefix
11006 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11007         echo "$as_me:11007: checking for prefix used to wrap public variables" >&5
11008 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11009
11010 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11011 if test "${with_wrap_prefix+set}" = set; then
11012   withval="$with_wrap_prefix"
11013   NCURSES_WRAP_PREFIX=$withval
11014 else
11015   NCURSES_WRAP_PREFIX=_nc_
11016 fi;
11017         echo "$as_me:11017: result: $NCURSES_WRAP_PREFIX" >&5
11018 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11019 else
11020         NCURSES_WRAP_PREFIX=_nc_
11021 fi
11022
11023 cat >>confdefs.h <<EOF
11024 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11025 EOF
11026
11027 echo "$as_me:11027: checking if you want experimental safe-sprintf code" >&5
11028 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11029
11030 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11031 if test "${enable_safe_sprintf+set}" = set; then
11032   enableval="$enable_safe_sprintf"
11033   with_safe_sprintf=$enableval
11034 else
11035   with_safe_sprintf=no
11036 fi;
11037 echo "$as_me:11037: result: $with_safe_sprintf" >&5
11038 echo "${ECHO_T}$with_safe_sprintf" >&6
11039 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
11040 #define USE_SAFE_SPRINTF 1
11041 EOF
11042
11043 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11044 # when hashmap is used scroll hints are useless
11045 if test "$with_hashmap" = no ; then
11046 echo "$as_me:11046: checking if you want to experiment without scrolling-hints code" >&5
11047 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11048
11049 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11050 if test "${enable_scroll_hints+set}" = set; then
11051   enableval="$enable_scroll_hints"
11052   with_scroll_hints=$enableval
11053 else
11054   with_scroll_hints=yes
11055 fi;
11056 echo "$as_me:11056: result: $with_scroll_hints" >&5
11057 echo "${ECHO_T}$with_scroll_hints" >&6
11058 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
11059 #define USE_SCROLL_HINTS 1
11060 EOF
11061
11062 fi
11063
11064 echo "$as_me:11064: checking if you want experimental wgetch-events code" >&5
11065 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11066
11067 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11068 if test "${enable_wgetch_events+set}" = set; then
11069   enableval="$enable_wgetch_events"
11070   with_wgetch_events=$enableval
11071 else
11072   with_wgetch_events=no
11073 fi;
11074 echo "$as_me:11074: result: $with_wgetch_events" >&5
11075 echo "${ECHO_T}$with_wgetch_events" >&6
11076 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
11077 #define NCURSES_WGETCH_EVENTS 1
11078 EOF
11079
11080 ###############################################################################
11081
11082 ###     use option --disable-echo to suppress full display compiling commands
11083 echo "$as_me:11083: checking if you want to display full commands during build" >&5
11084 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
11085
11086 # Check whether --enable-echo or --disable-echo was given.
11087 if test "${enable_echo+set}" = set; then
11088   enableval="$enable_echo"
11089   with_echo=$enableval
11090 else
11091   with_echo=yes
11092 fi;
11093 if test "$with_echo" = yes; then
11094         ECHO_LINK=
11095 else
11096         ECHO_LINK='@ echo linking $@ ... ;'
11097         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
11098         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
11099 fi
11100 echo "$as_me:11100: result: $with_echo" >&5
11101 echo "${ECHO_T}$with_echo" >&6
11102
11103 ###     use option --enable-warnings to turn on all gcc warnings
11104 echo "$as_me:11104: checking if you want to see compiler warnings" >&5
11105 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11106
11107 # Check whether --enable-warnings or --disable-warnings was given.
11108 if test "${enable_warnings+set}" = set; then
11109   enableval="$enable_warnings"
11110   with_warnings=$enableval
11111 fi;
11112 echo "$as_me:11112: result: $with_warnings" >&5
11113 echo "${ECHO_T}$with_warnings" >&6
11114
11115 if test "x$with_warnings" = "xyes"; then
11116         ADAFLAGS="$ADAFLAGS -gnatg"
11117
11118 INTEL_COMPILER=no
11119
11120 if test "$GCC" = yes ; then
11121         case $host_os in
11122         linux*|gnu*)
11123                 echo "$as_me:11123: checking if this is really Intel C compiler" >&5
11124 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11125                 cf_save_CFLAGS="$CFLAGS"
11126                 CFLAGS="$CFLAGS -no-gcc"
11127                 cat >conftest.$ac_ext <<_ACEOF
11128 #line 11128 "configure"
11129 #include "confdefs.h"
11130
11131 int
11132 main ()
11133 {
11134
11135 #ifdef __INTEL_COMPILER
11136 #else
11137 make an error
11138 #endif
11139
11140   ;
11141   return 0;
11142 }
11143 _ACEOF
11144 rm -f conftest.$ac_objext
11145 if { (eval echo "$as_me:11145: \"$ac_compile\"") >&5
11146   (eval $ac_compile) 2>&5
11147   ac_status=$?
11148   echo "$as_me:11148: \$? = $ac_status" >&5
11149   (exit $ac_status); } &&
11150          { ac_try='test -s conftest.$ac_objext'
11151   { (eval echo "$as_me:11151: \"$ac_try\"") >&5
11152   (eval $ac_try) 2>&5
11153   ac_status=$?
11154   echo "$as_me:11154: \$? = $ac_status" >&5
11155   (exit $ac_status); }; }; then
11156   INTEL_COMPILER=yes
11157 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11158
11159 else
11160   echo "$as_me: failed program was:" >&5
11161 cat conftest.$ac_ext >&5
11162 fi
11163 rm -f conftest.$ac_objext conftest.$ac_ext
11164                 CFLAGS="$cf_save_CFLAGS"
11165                 echo "$as_me:11165: result: $INTEL_COMPILER" >&5
11166 echo "${ECHO_T}$INTEL_COMPILER" >&6
11167                 ;;
11168         esac
11169 fi
11170
11171 cat > conftest.$ac_ext <<EOF
11172 #line 11172 "${as_me-configure}"
11173 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11174 EOF
11175
11176 if test "$INTEL_COMPILER" = yes
11177 then
11178 # The "-wdXXX" options suppress warnings:
11179 # remark #1419: external declaration in primary source file
11180 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11181 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11182 # remark #193: zero used for undefined preprocessing identifier
11183 # remark #593: variable "curs_sb_left_arrow" was set but never used
11184 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11185 # remark #869: parameter "tw" was never referenced
11186 # remark #981: operands are evaluated in unspecified order
11187 # warning #279: controlling expression is constant
11188
11189         { echo "$as_me:11189: checking for $CC warning options..." >&5
11190 echo "$as_me: checking for $CC warning options..." >&6;}
11191         cf_save_CFLAGS="$CFLAGS"
11192         EXTRA_CFLAGS="-Wall"
11193         for cf_opt in \
11194                 wd1419 \
11195                 wd1683 \
11196                 wd1684 \
11197                 wd193 \
11198                 wd593 \
11199                 wd279 \
11200                 wd810 \
11201                 wd869 \
11202                 wd981
11203         do
11204                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11205                 if { (eval echo "$as_me:11205: \"$ac_compile\"") >&5
11206   (eval $ac_compile) 2>&5
11207   ac_status=$?
11208   echo "$as_me:11208: \$? = $ac_status" >&5
11209   (exit $ac_status); }; then
11210                         test -n "$verbose" && echo "$as_me:11210: result: ... -$cf_opt" >&5
11211 echo "${ECHO_T}... -$cf_opt" >&6
11212                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11213                 fi
11214         done
11215         CFLAGS="$cf_save_CFLAGS"
11216
11217 elif test "$GCC" = yes
11218 then
11219         { echo "$as_me:11219: checking for $CC warning options..." >&5
11220 echo "$as_me: checking for $CC warning options..." >&6;}
11221         cf_save_CFLAGS="$CFLAGS"
11222         EXTRA_CFLAGS=
11223         cf_warn_CONST=""
11224         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
11225         for cf_opt in W Wall \
11226                 Wbad-function-cast \
11227                 Wcast-align \
11228                 Wcast-qual \
11229                 Winline \
11230                 Wmissing-declarations \
11231                 Wmissing-prototypes \
11232                 Wnested-externs \
11233                 Wpointer-arith \
11234                 Wshadow \
11235                 Wstrict-prototypes \
11236                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
11237         do
11238                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11239                 if { (eval echo "$as_me:11239: \"$ac_compile\"") >&5
11240   (eval $ac_compile) 2>&5
11241   ac_status=$?
11242   echo "$as_me:11242: \$? = $ac_status" >&5
11243   (exit $ac_status); }; then
11244                         test -n "$verbose" && echo "$as_me:11244: result: ... -$cf_opt" >&5
11245 echo "${ECHO_T}... -$cf_opt" >&6
11246                         case $cf_opt in #(vi
11247                         Wcast-qual) #(vi
11248                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
11249                                 ;;
11250                         Winline) #(vi
11251                                 case $GCC_VERSION in
11252                                 [34].*)
11253                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
11254
11255 echo "${as_me-configure}:11255: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
11256
11257                                         continue;;
11258                                 esac
11259                                 ;;
11260                         esac
11261                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11262                 fi
11263         done
11264         CFLAGS="$cf_save_CFLAGS"
11265 fi
11266 rm -f conftest*
11267
11268         if test "$cf_with_cxx" = yes ; then
11269
11270 INTEL_CPLUSPLUS=no
11271
11272 if test "$GCC" = yes ; then
11273         case $host_os in
11274         linux*|gnu*)
11275                 echo "$as_me:11275: checking if this is really Intel C++ compiler" >&5
11276 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
11277                 cf_save_CFLAGS="$CXXFLAGS"
11278                 CXXFLAGS="$CXXFLAGS -no-gcc"
11279                 cat >conftest.$ac_ext <<_ACEOF
11280 #line 11280 "configure"
11281 #include "confdefs.h"
11282
11283 int
11284 main ()
11285 {
11286
11287 #ifdef __INTEL_COMPILER
11288 #else
11289 make an error
11290 #endif
11291
11292   ;
11293   return 0;
11294 }
11295 _ACEOF
11296 rm -f conftest.$ac_objext
11297 if { (eval echo "$as_me:11297: \"$ac_compile\"") >&5
11298   (eval $ac_compile) 2>&5
11299   ac_status=$?
11300   echo "$as_me:11300: \$? = $ac_status" >&5
11301   (exit $ac_status); } &&
11302          { ac_try='test -s conftest.$ac_objext'
11303   { (eval echo "$as_me:11303: \"$ac_try\"") >&5
11304   (eval $ac_try) 2>&5
11305   ac_status=$?
11306   echo "$as_me:11306: \$? = $ac_status" >&5
11307   (exit $ac_status); }; }; then
11308   INTEL_CPLUSPLUS=yes
11309 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11310
11311 else
11312   echo "$as_me: failed program was:" >&5
11313 cat conftest.$ac_ext >&5
11314 fi
11315 rm -f conftest.$ac_objext conftest.$ac_ext
11316                 CXXFLAGS="$cf_save_CFLAGS"
11317                 echo "$as_me:11317: result: $INTEL_CPLUSPLUS" >&5
11318 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
11319                 ;;
11320         esac
11321 fi
11322
11323 ac_ext=cc
11324 ac_cpp='$CXXCPP $CPPFLAGS'
11325 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11326 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11327 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11328 ac_main_return=return
11329
11330 cat > conftest.$ac_ext <<EOF
11331 #line 11331 "configure"
11332 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11333 EOF
11334
11335 if test "$INTEL_CPLUSPLUS" = yes
11336 then
11337 # The "-wdXXX" options suppress warnings:
11338 # remark #1419: external declaration in primary source file
11339 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11340 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11341 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11342 # remark #193: zero used for undefined preprocessing identifier
11343 # remark #593: variable "curs_sb_left_arrow" was set but never used
11344 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11345 # remark #869: parameter "tw" was never referenced
11346 # remark #981: operands are evaluated in unspecified order
11347 # warning #269: invalid format string conversion
11348
11349         { echo "$as_me:11349: checking for $CC warning options..." >&5
11350 echo "$as_me: checking for $CC warning options..." >&6;}
11351         cf_save_CXXFLAGS="$CXXFLAGS"
11352         EXTRA_CXXFLAGS="-Wall"
11353         for cf_opt in \
11354                 wd1419 \
11355                 wd1682 \
11356                 wd1683 \
11357                 wd1684 \
11358                 wd193 \
11359                 wd279 \
11360                 wd593 \
11361                 wd810 \
11362                 wd869 \
11363                 wd981
11364         do
11365                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
11366                 if { (eval echo "$as_me:11366: \"$ac_compile\"") >&5
11367   (eval $ac_compile) 2>&5
11368   ac_status=$?
11369   echo "$as_me:11369: \$? = $ac_status" >&5
11370   (exit $ac_status); }; then
11371                         test -n "$verbose" && echo "$as_me:11371: result: ... -$cf_opt" >&5
11372 echo "${ECHO_T}... -$cf_opt" >&6
11373                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11374                 fi
11375         done
11376         CXXFLAGS="$cf_save_CXXFLAGS"
11377
11378 elif test "$GXX" = yes
11379 then
11380         { echo "$as_me:11380: checking for $CXX warning options..." >&5
11381 echo "$as_me: checking for $CXX warning options..." >&6;}
11382         cf_save_CXXFLAGS="$CXXFLAGS"
11383         EXTRA_CXXFLAGS="-W -Wall"
11384         cf_gxx_extra_warnings=""
11385         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
11386         case "$GCC_VERSION" in
11387         [1-2].*)
11388                 ;;
11389         *)
11390                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
11391                 ;;
11392         esac
11393         for cf_opt in \
11394                 Wabi \
11395                 fabi-version=0 \
11396                 Woverloaded-virtual \
11397                 Wsign-promo \
11398                 Wsynth \
11399                 Wold-style-cast \
11400                 Wcast-align \
11401                 Wcast-qual \
11402                 Wmissing-prototypes \
11403                 Wpointer-arith \
11404                 Wshadow \
11405                 Wstrict-prototypes \
11406                 Wundef $cf_gxx_extra_warnings Wno-unused
11407         do
11408                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
11409                 if { (eval echo "$as_me:11409: \"$ac_compile\"") >&5
11410   (eval $ac_compile) 2>&5
11411   ac_status=$?
11412   echo "$as_me:11412: \$? = $ac_status" >&5
11413   (exit $ac_status); }; then
11414                         test -n "$verbose" && echo "$as_me:11414: result: ... -$cf_opt" >&5
11415 echo "${ECHO_T}... -$cf_opt" >&6
11416                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11417                 else
11418                         test -n "$verbose" && echo "$as_me:11418: result: ... no -$cf_opt" >&5
11419 echo "${ECHO_T}... no -$cf_opt" >&6
11420                 fi
11421         done
11422         CXXFLAGS="$cf_save_CXXFLAGS"
11423 fi
11424
11425 rm -f conftest*
11426 ac_ext=c
11427 ac_cpp='$CPP $CPPFLAGS'
11428 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11429 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11430 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11431 ac_main_return=return
11432
11433         fi
11434 fi
11435
11436 if test "$GCC" = yes
11437 then
11438 cat > conftest.i <<EOF
11439 #ifndef GCC_PRINTF
11440 #define GCC_PRINTF 0
11441 #endif
11442 #ifndef GCC_SCANF
11443 #define GCC_SCANF 0
11444 #endif
11445 #ifndef GCC_NORETURN
11446 #define GCC_NORETURN /* nothing */
11447 #endif
11448 #ifndef GCC_UNUSED
11449 #define GCC_UNUSED /* nothing */
11450 #endif
11451 EOF
11452 if test "$GCC" = yes
11453 then
11454         { echo "$as_me:11454: checking for $CC __attribute__ directives..." >&5
11455 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
11456 cat > conftest.$ac_ext <<EOF
11457 #line 11457 "${as_me-configure}"
11458 #include "confdefs.h"
11459 #include "conftest.h"
11460 #include "conftest.i"
11461 #if     GCC_PRINTF
11462 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11463 #else
11464 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
11465 #endif
11466 #if     GCC_SCANF
11467 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11468 #else
11469 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
11470 #endif
11471 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
11472 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
11473 extern void foo(void) GCC_NORETURN;
11474 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
11475 EOF
11476         cf_printf_attribute=no
11477         cf_scanf_attribute=no
11478         for cf_attribute in scanf printf unused noreturn
11479         do
11480
11481 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11482
11483                 cf_directive="__attribute__(($cf_attribute))"
11484                 echo "checking for $CC $cf_directive" 1>&5
11485
11486                 case $cf_attribute in #(vi
11487                 printf) #(vi
11488                         cf_printf_attribute=yes
11489                         cat >conftest.h <<EOF
11490 #define GCC_$cf_ATTRIBUTE 1
11491 EOF
11492                         ;;
11493                 scanf) #(vi
11494                         cf_scanf_attribute=yes
11495                         cat >conftest.h <<EOF
11496 #define GCC_$cf_ATTRIBUTE 1
11497 EOF
11498                         ;;
11499                 *) #(vi
11500                         cat >conftest.h <<EOF
11501 #define GCC_$cf_ATTRIBUTE $cf_directive
11502 EOF
11503                         ;;
11504                 esac
11505
11506                 if { (eval echo "$as_me:11506: \"$ac_compile\"") >&5
11507   (eval $ac_compile) 2>&5
11508   ac_status=$?
11509   echo "$as_me:11509: \$? = $ac_status" >&5
11510   (exit $ac_status); }; then
11511                         test -n "$verbose" && echo "$as_me:11511: result: ... $cf_attribute" >&5
11512 echo "${ECHO_T}... $cf_attribute" >&6
11513                         cat conftest.h >>confdefs.h
11514                         case $cf_attribute in #(vi
11515                         printf) #(vi
11516                                 if test "$cf_printf_attribute" = no ; then
11517                                         cat >>confdefs.h <<EOF
11518 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
11519 EOF
11520                                 else
11521                                         cat >>confdefs.h <<EOF
11522 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11523 EOF
11524                                 fi
11525                                 ;;
11526                         scanf) #(vi
11527                                 if test "$cf_scanf_attribute" = no ; then
11528                                         cat >>confdefs.h <<EOF
11529 #define GCC_SCANFLIKE(fmt,var) /* nothing */
11530 EOF
11531                                 else
11532                                         cat >>confdefs.h <<EOF
11533 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11534 EOF
11535                                 fi
11536                                 ;;
11537                         esac
11538                 fi
11539         done
11540 else
11541         fgrep define conftest.i >>confdefs.h
11542 fi
11543 rm -rf conftest*
11544 fi
11545
11546 ###     use option --enable-assertions to turn on generation of assertion code
11547 echo "$as_me:11547: checking if you want to enable runtime assertions" >&5
11548 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
11549
11550 # Check whether --enable-assertions or --disable-assertions was given.
11551 if test "${enable_assertions+set}" = set; then
11552   enableval="$enable_assertions"
11553   with_assertions=$enableval
11554 else
11555   with_assertions=no
11556 fi;
11557 echo "$as_me:11557: result: $with_assertions" >&5
11558 echo "${ECHO_T}$with_assertions" >&6
11559 if test -n "$GCC"
11560 then
11561         if test "$with_assertions" = no
11562         then
11563                 cat >>confdefs.h <<\EOF
11564 #define NDEBUG 1
11565 EOF
11566
11567                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
11568         else
11569                 ADAFLAGS="$ADAFLAGS -gnata"
11570         fi
11571 fi
11572
11573 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
11574
11575 echo "$as_me:11575: checking if you want to use dmalloc for testing" >&5
11576 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11577
11578 # Check whether --with-dmalloc or --without-dmalloc was given.
11579 if test "${with_dmalloc+set}" = set; then
11580   withval="$with_dmalloc"
11581   cat >>confdefs.h <<\EOF
11582 #define USE_DMALLOC 1
11583 EOF
11584
11585         : ${with_cflags:=-g}
11586         : ${with_no_leaks:=yes}
11587          with_dmalloc=yes
11588 else
11589   with_dmalloc=
11590 fi;
11591 echo "$as_me:11591: result: ${with_dmalloc:-no}" >&5
11592 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11593
11594 case .$with_cflags in #(vi
11595 .*-g*)
11596         case .$CFLAGS in #(vi
11597         .*-g*) #(vi
11598                 ;;
11599         *)
11600
11601 cf_fix_cppflags=no
11602 cf_new_cflags=
11603 cf_new_cppflags=
11604 cf_new_extra_cppflags=
11605
11606 for cf_add_cflags in -g
11607 do
11608 case $cf_fix_cppflags in
11609 no)
11610         case $cf_add_cflags in #(vi
11611         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11612                 case $cf_add_cflags in
11613                 -D*)
11614                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11615
11616                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11617                                 && test -z "${cf_tst_cflags}" \
11618                                 && cf_fix_cppflags=yes
11619
11620                         if test $cf_fix_cppflags = yes ; then
11621                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11622                                 continue
11623                         elif test "${cf_tst_cflags}" = "\"'" ; then
11624                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11625                                 continue
11626                         fi
11627                         ;;
11628                 esac
11629                 case "$CPPFLAGS" in
11630                 *$cf_add_cflags) #(vi
11631                         ;;
11632                 *) #(vi
11633                         case $cf_add_cflags in #(vi
11634                         -D*)
11635                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11636
11637 CPPFLAGS=`echo "$CPPFLAGS" | \
11638         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11639                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11640
11641                                 ;;
11642                         esac
11643                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11644                         ;;
11645                 esac
11646                 ;;
11647         *)
11648                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11649                 ;;
11650         esac
11651         ;;
11652 yes)
11653         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11654
11655         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11656
11657         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11658                 && test -z "${cf_tst_cflags}" \
11659                 && cf_fix_cppflags=no
11660         ;;
11661 esac
11662 done
11663
11664 if test -n "$cf_new_cflags" ; then
11665
11666         CFLAGS="$CFLAGS $cf_new_cflags"
11667 fi
11668
11669 if test -n "$cf_new_cppflags" ; then
11670
11671         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11672 fi
11673
11674 if test -n "$cf_new_extra_cppflags" ; then
11675
11676         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11677 fi
11678
11679                 ;;
11680         esac
11681         ;;
11682 esac
11683
11684 if test "$with_dmalloc" = yes ; then
11685         echo "$as_me:11685: checking for dmalloc.h" >&5
11686 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
11687 if test "${ac_cv_header_dmalloc_h+set}" = set; then
11688   echo $ECHO_N "(cached) $ECHO_C" >&6
11689 else
11690   cat >conftest.$ac_ext <<_ACEOF
11691 #line 11691 "configure"
11692 #include "confdefs.h"
11693 #include <dmalloc.h>
11694 _ACEOF
11695 if { (eval echo "$as_me:11695: \"$ac_cpp conftest.$ac_ext\"") >&5
11696   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11697   ac_status=$?
11698   egrep -v '^ *\+' conftest.er1 >conftest.err
11699   rm -f conftest.er1
11700   cat conftest.err >&5
11701   echo "$as_me:11701: \$? = $ac_status" >&5
11702   (exit $ac_status); } >/dev/null; then
11703   if test -s conftest.err; then
11704     ac_cpp_err=$ac_c_preproc_warn_flag
11705   else
11706     ac_cpp_err=
11707   fi
11708 else
11709   ac_cpp_err=yes
11710 fi
11711 if test -z "$ac_cpp_err"; then
11712   ac_cv_header_dmalloc_h=yes
11713 else
11714   echo "$as_me: failed program was:" >&5
11715   cat conftest.$ac_ext >&5
11716   ac_cv_header_dmalloc_h=no
11717 fi
11718 rm -f conftest.err conftest.$ac_ext
11719 fi
11720 echo "$as_me:11720: result: $ac_cv_header_dmalloc_h" >&5
11721 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
11722 if test $ac_cv_header_dmalloc_h = yes; then
11723
11724 echo "$as_me:11724: checking for dmalloc_debug in -ldmalloc" >&5
11725 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
11726 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
11727   echo $ECHO_N "(cached) $ECHO_C" >&6
11728 else
11729   ac_check_lib_save_LIBS=$LIBS
11730 LIBS="-ldmalloc  $LIBS"
11731 cat >conftest.$ac_ext <<_ACEOF
11732 #line 11732 "configure"
11733 #include "confdefs.h"
11734
11735 /* Override any gcc2 internal prototype to avoid an error.  */
11736 #ifdef __cplusplus
11737 extern "C"
11738 #endif
11739 /* We use char because int might match the return type of a gcc2
11740    builtin and then its argument prototype would still apply.  */
11741 char dmalloc_debug ();
11742 int
11743 main ()
11744 {
11745 dmalloc_debug ();
11746   ;
11747   return 0;
11748 }
11749 _ACEOF
11750 rm -f conftest.$ac_objext conftest$ac_exeext
11751 if { (eval echo "$as_me:11751: \"$ac_link\"") >&5
11752   (eval $ac_link) 2>&5
11753   ac_status=$?
11754   echo "$as_me:11754: \$? = $ac_status" >&5
11755   (exit $ac_status); } &&
11756          { ac_try='test -s conftest$ac_exeext'
11757   { (eval echo "$as_me:11757: \"$ac_try\"") >&5
11758   (eval $ac_try) 2>&5
11759   ac_status=$?
11760   echo "$as_me:11760: \$? = $ac_status" >&5
11761   (exit $ac_status); }; }; then
11762   ac_cv_lib_dmalloc_dmalloc_debug=yes
11763 else
11764   echo "$as_me: failed program was:" >&5
11765 cat conftest.$ac_ext >&5
11766 ac_cv_lib_dmalloc_dmalloc_debug=no
11767 fi
11768 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11769 LIBS=$ac_check_lib_save_LIBS
11770 fi
11771 echo "$as_me:11771: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11772 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11773 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
11774   cat >>confdefs.h <<EOF
11775 #define HAVE_LIBDMALLOC 1
11776 EOF
11777
11778   LIBS="-ldmalloc $LIBS"
11779
11780 fi
11781
11782 fi
11783
11784 fi
11785
11786 echo "$as_me:11786: checking if you want to use dbmalloc for testing" >&5
11787 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11788
11789 # Check whether --with-dbmalloc or --without-dbmalloc was given.
11790 if test "${with_dbmalloc+set}" = set; then
11791   withval="$with_dbmalloc"
11792   cat >>confdefs.h <<\EOF
11793 #define USE_DBMALLOC 1
11794 EOF
11795
11796         : ${with_cflags:=-g}
11797         : ${with_no_leaks:=yes}
11798          with_dbmalloc=yes
11799 else
11800   with_dbmalloc=
11801 fi;
11802 echo "$as_me:11802: result: ${with_dbmalloc:-no}" >&5
11803 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11804
11805 case .$with_cflags in #(vi
11806 .*-g*)
11807         case .$CFLAGS in #(vi
11808         .*-g*) #(vi
11809                 ;;
11810         *)
11811
11812 cf_fix_cppflags=no
11813 cf_new_cflags=
11814 cf_new_cppflags=
11815 cf_new_extra_cppflags=
11816
11817 for cf_add_cflags in -g
11818 do
11819 case $cf_fix_cppflags in
11820 no)
11821         case $cf_add_cflags in #(vi
11822         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11823                 case $cf_add_cflags in
11824                 -D*)
11825                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11826
11827                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11828                                 && test -z "${cf_tst_cflags}" \
11829                                 && cf_fix_cppflags=yes
11830
11831                         if test $cf_fix_cppflags = yes ; then
11832                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11833                                 continue
11834                         elif test "${cf_tst_cflags}" = "\"'" ; then
11835                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11836                                 continue
11837                         fi
11838                         ;;
11839                 esac
11840                 case "$CPPFLAGS" in
11841                 *$cf_add_cflags) #(vi
11842                         ;;
11843                 *) #(vi
11844                         case $cf_add_cflags in #(vi
11845                         -D*)
11846                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11847
11848 CPPFLAGS=`echo "$CPPFLAGS" | \
11849         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11850                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11851
11852                                 ;;
11853                         esac
11854                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11855                         ;;
11856                 esac
11857                 ;;
11858         *)
11859                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11860                 ;;
11861         esac
11862         ;;
11863 yes)
11864         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11865
11866         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11867
11868         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11869                 && test -z "${cf_tst_cflags}" \
11870                 && cf_fix_cppflags=no
11871         ;;
11872 esac
11873 done
11874
11875 if test -n "$cf_new_cflags" ; then
11876
11877         CFLAGS="$CFLAGS $cf_new_cflags"
11878 fi
11879
11880 if test -n "$cf_new_cppflags" ; then
11881
11882         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11883 fi
11884
11885 if test -n "$cf_new_extra_cppflags" ; then
11886
11887         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11888 fi
11889
11890                 ;;
11891         esac
11892         ;;
11893 esac
11894
11895 if test "$with_dbmalloc" = yes ; then
11896         echo "$as_me:11896: checking for dbmalloc.h" >&5
11897 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11898 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11899   echo $ECHO_N "(cached) $ECHO_C" >&6
11900 else
11901   cat >conftest.$ac_ext <<_ACEOF
11902 #line 11902 "configure"
11903 #include "confdefs.h"
11904 #include <dbmalloc.h>
11905 _ACEOF
11906 if { (eval echo "$as_me:11906: \"$ac_cpp conftest.$ac_ext\"") >&5
11907   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11908   ac_status=$?
11909   egrep -v '^ *\+' conftest.er1 >conftest.err
11910   rm -f conftest.er1
11911   cat conftest.err >&5
11912   echo "$as_me:11912: \$? = $ac_status" >&5
11913   (exit $ac_status); } >/dev/null; then
11914   if test -s conftest.err; then
11915     ac_cpp_err=$ac_c_preproc_warn_flag
11916   else
11917     ac_cpp_err=
11918   fi
11919 else
11920   ac_cpp_err=yes
11921 fi
11922 if test -z "$ac_cpp_err"; then
11923   ac_cv_header_dbmalloc_h=yes
11924 else
11925   echo "$as_me: failed program was:" >&5
11926   cat conftest.$ac_ext >&5
11927   ac_cv_header_dbmalloc_h=no
11928 fi
11929 rm -f conftest.err conftest.$ac_ext
11930 fi
11931 echo "$as_me:11931: result: $ac_cv_header_dbmalloc_h" >&5
11932 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11933 if test $ac_cv_header_dbmalloc_h = yes; then
11934
11935 echo "$as_me:11935: checking for debug_malloc in -ldbmalloc" >&5
11936 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11937 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11938   echo $ECHO_N "(cached) $ECHO_C" >&6
11939 else
11940   ac_check_lib_save_LIBS=$LIBS
11941 LIBS="-ldbmalloc  $LIBS"
11942 cat >conftest.$ac_ext <<_ACEOF
11943 #line 11943 "configure"
11944 #include "confdefs.h"
11945
11946 /* Override any gcc2 internal prototype to avoid an error.  */
11947 #ifdef __cplusplus
11948 extern "C"
11949 #endif
11950 /* We use char because int might match the return type of a gcc2
11951    builtin and then its argument prototype would still apply.  */
11952 char debug_malloc ();
11953 int
11954 main ()
11955 {
11956 debug_malloc ();
11957   ;
11958   return 0;
11959 }
11960 _ACEOF
11961 rm -f conftest.$ac_objext conftest$ac_exeext
11962 if { (eval echo "$as_me:11962: \"$ac_link\"") >&5
11963   (eval $ac_link) 2>&5
11964   ac_status=$?
11965   echo "$as_me:11965: \$? = $ac_status" >&5
11966   (exit $ac_status); } &&
11967          { ac_try='test -s conftest$ac_exeext'
11968   { (eval echo "$as_me:11968: \"$ac_try\"") >&5
11969   (eval $ac_try) 2>&5
11970   ac_status=$?
11971   echo "$as_me:11971: \$? = $ac_status" >&5
11972   (exit $ac_status); }; }; then
11973   ac_cv_lib_dbmalloc_debug_malloc=yes
11974 else
11975   echo "$as_me: failed program was:" >&5
11976 cat conftest.$ac_ext >&5
11977 ac_cv_lib_dbmalloc_debug_malloc=no
11978 fi
11979 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11980 LIBS=$ac_check_lib_save_LIBS
11981 fi
11982 echo "$as_me:11982: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
11983 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
11984 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
11985   cat >>confdefs.h <<EOF
11986 #define HAVE_LIBDBMALLOC 1
11987 EOF
11988
11989   LIBS="-ldbmalloc $LIBS"
11990
11991 fi
11992
11993 fi
11994
11995 fi
11996
11997 echo "$as_me:11997: checking if you want to use valgrind for testing" >&5
11998 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
11999
12000 # Check whether --with-valgrind or --without-valgrind was given.
12001 if test "${with_valgrind+set}" = set; then
12002   withval="$with_valgrind"
12003   cat >>confdefs.h <<\EOF
12004 #define USE_VALGRIND 1
12005 EOF
12006
12007         : ${with_cflags:=-g}
12008         : ${with_no_leaks:=yes}
12009          with_valgrind=yes
12010 else
12011   with_valgrind=
12012 fi;
12013 echo "$as_me:12013: result: ${with_valgrind:-no}" >&5
12014 echo "${ECHO_T}${with_valgrind:-no}" >&6
12015
12016 case .$with_cflags in #(vi
12017 .*-g*)
12018         case .$CFLAGS in #(vi
12019         .*-g*) #(vi
12020                 ;;
12021         *)
12022
12023 cf_fix_cppflags=no
12024 cf_new_cflags=
12025 cf_new_cppflags=
12026 cf_new_extra_cppflags=
12027
12028 for cf_add_cflags in -g
12029 do
12030 case $cf_fix_cppflags in
12031 no)
12032         case $cf_add_cflags in #(vi
12033         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12034                 case $cf_add_cflags in
12035                 -D*)
12036                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12037
12038                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12039                                 && test -z "${cf_tst_cflags}" \
12040                                 && cf_fix_cppflags=yes
12041
12042                         if test $cf_fix_cppflags = yes ; then
12043                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12044                                 continue
12045                         elif test "${cf_tst_cflags}" = "\"'" ; then
12046                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12047                                 continue
12048                         fi
12049                         ;;
12050                 esac
12051                 case "$CPPFLAGS" in
12052                 *$cf_add_cflags) #(vi
12053                         ;;
12054                 *) #(vi
12055                         case $cf_add_cflags in #(vi
12056                         -D*)
12057                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12058
12059 CPPFLAGS=`echo "$CPPFLAGS" | \
12060         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12061                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12062
12063                                 ;;
12064                         esac
12065                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12066                         ;;
12067                 esac
12068                 ;;
12069         *)
12070                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12071                 ;;
12072         esac
12073         ;;
12074 yes)
12075         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12076
12077         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12078
12079         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12080                 && test -z "${cf_tst_cflags}" \
12081                 && cf_fix_cppflags=no
12082         ;;
12083 esac
12084 done
12085
12086 if test -n "$cf_new_cflags" ; then
12087
12088         CFLAGS="$CFLAGS $cf_new_cflags"
12089 fi
12090
12091 if test -n "$cf_new_cppflags" ; then
12092
12093         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12094 fi
12095
12096 if test -n "$cf_new_extra_cppflags" ; then
12097
12098         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12099 fi
12100
12101                 ;;
12102         esac
12103         ;;
12104 esac
12105
12106 echo "$as_me:12106: checking if you want to perform memory-leak testing" >&5
12107 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
12108
12109 # Check whether --enable-leaks or --disable-leaks was given.
12110 if test "${enable_leaks+set}" = set; then
12111   enableval="$enable_leaks"
12112   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
12113 else
12114   : ${with_no_leaks:=no}
12115 fi;
12116 echo "$as_me:12116: result: $with_no_leaks" >&5
12117 echo "${ECHO_T}$with_no_leaks" >&6
12118
12119 if test "$with_no_leaks" = yes ; then
12120         cat >>confdefs.h <<\EOF
12121 #define NO_LEAKS 1
12122 EOF
12123
12124 fi
12125
12126 cat >>confdefs.h <<\EOF
12127 #define HAVE_NC_ALLOC_H 1
12128 EOF
12129
12130 ###     use option --enable-expanded to generate certain macros as functions
12131
12132 # Check whether --enable-expanded or --disable-expanded was given.
12133 if test "${enable_expanded+set}" = set; then
12134   enableval="$enable_expanded"
12135   test "$enableval" = yes && cat >>confdefs.h <<\EOF
12136 #define NCURSES_EXPANDED 1
12137 EOF
12138
12139 fi;
12140
12141 ###     use option --disable-macros to suppress macros in favor of functions
12142
12143 # Check whether --enable-macros or --disable-macros was given.
12144 if test "${enable_macros+set}" = set; then
12145   enableval="$enable_macros"
12146   test "$enableval" = no && cat >>confdefs.h <<\EOF
12147 #define NCURSES_NOMACROS 1
12148 EOF
12149
12150 fi;
12151
12152 # Normally we only add trace() to the debug-library.  Allow this to be
12153 # extended to all models of the ncurses library:
12154 cf_all_traces=no
12155 case "$CFLAGS $CPPFLAGS" in
12156 *-DTRACE*)
12157         cf_all_traces=yes
12158         ;;
12159 esac
12160
12161 echo "$as_me:12161: checking whether to add trace feature to all models" >&5
12162 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12163
12164 # Check whether --with-trace or --without-trace was given.
12165 if test "${with_trace+set}" = set; then
12166   withval="$with_trace"
12167   cf_with_trace=$withval
12168 else
12169   cf_with_trace=$cf_all_traces
12170 fi;
12171 echo "$as_me:12171: result: $cf_with_trace" >&5
12172 echo "${ECHO_T}$cf_with_trace" >&6
12173
12174 if test "$cf_with_trace" = yes ; then
12175         LIB_TRACING=all
12176         ADA_TRACE=TRUE
12177
12178 cf_fix_cppflags=no
12179 cf_new_cflags=
12180 cf_new_cppflags=
12181 cf_new_extra_cppflags=
12182
12183 for cf_add_cflags in -DTRACE
12184 do
12185 case $cf_fix_cppflags in
12186 no)
12187         case $cf_add_cflags in #(vi
12188         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12189                 case $cf_add_cflags in
12190                 -D*)
12191                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12192
12193                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12194                                 && test -z "${cf_tst_cflags}" \
12195                                 && cf_fix_cppflags=yes
12196
12197                         if test $cf_fix_cppflags = yes ; then
12198                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12199                                 continue
12200                         elif test "${cf_tst_cflags}" = "\"'" ; then
12201                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12202                                 continue
12203                         fi
12204                         ;;
12205                 esac
12206                 case "$CPPFLAGS" in
12207                 *$cf_add_cflags) #(vi
12208                         ;;
12209                 *) #(vi
12210                         case $cf_add_cflags in #(vi
12211                         -D*)
12212                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12213
12214 CPPFLAGS=`echo "$CPPFLAGS" | \
12215         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12216                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12217
12218                                 ;;
12219                         esac
12220                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12221                         ;;
12222                 esac
12223                 ;;
12224         *)
12225                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12226                 ;;
12227         esac
12228         ;;
12229 yes)
12230         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12231
12232         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12233
12234         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12235                 && test -z "${cf_tst_cflags}" \
12236                 && cf_fix_cppflags=no
12237         ;;
12238 esac
12239 done
12240
12241 if test -n "$cf_new_cflags" ; then
12242
12243         CFLAGS="$CFLAGS $cf_new_cflags"
12244 fi
12245
12246 if test -n "$cf_new_cppflags" ; then
12247
12248         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12249 fi
12250
12251 if test -n "$cf_new_extra_cppflags" ; then
12252
12253         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12254 fi
12255
12256 else
12257         LIB_TRACING=DEBUG
12258         ADA_TRACE=FALSE
12259 fi
12260
12261 ###     Checks for libraries.
12262 case $cf_cv_system_name in #(vi
12263 *mingw32*) #(vi
12264         ;;
12265 *)
12266 echo "$as_me:12266: checking for gettimeofday" >&5
12267 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12268 if test "${ac_cv_func_gettimeofday+set}" = set; then
12269   echo $ECHO_N "(cached) $ECHO_C" >&6
12270 else
12271   cat >conftest.$ac_ext <<_ACEOF
12272 #line 12272 "configure"
12273 #include "confdefs.h"
12274 /* System header to define __stub macros and hopefully few prototypes,
12275     which can conflict with char gettimeofday (); below.  */
12276 #include <assert.h>
12277 /* Override any gcc2 internal prototype to avoid an error.  */
12278 #ifdef __cplusplus
12279 extern "C"
12280 #endif
12281 /* We use char because int might match the return type of a gcc2
12282    builtin and then its argument prototype would still apply.  */
12283 char gettimeofday ();
12284 char (*f) ();
12285
12286 int
12287 main ()
12288 {
12289 /* The GNU C library defines this for functions which it implements
12290     to always fail with ENOSYS.  Some functions are actually named
12291     something starting with __ and the normal name is an alias.  */
12292 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12293 choke me
12294 #else
12295 f = gettimeofday;
12296 #endif
12297
12298   ;
12299   return 0;
12300 }
12301 _ACEOF
12302 rm -f conftest.$ac_objext conftest$ac_exeext
12303 if { (eval echo "$as_me:12303: \"$ac_link\"") >&5
12304   (eval $ac_link) 2>&5
12305   ac_status=$?
12306   echo "$as_me:12306: \$? = $ac_status" >&5
12307   (exit $ac_status); } &&
12308          { ac_try='test -s conftest$ac_exeext'
12309   { (eval echo "$as_me:12309: \"$ac_try\"") >&5
12310   (eval $ac_try) 2>&5
12311   ac_status=$?
12312   echo "$as_me:12312: \$? = $ac_status" >&5
12313   (exit $ac_status); }; }; then
12314   ac_cv_func_gettimeofday=yes
12315 else
12316   echo "$as_me: failed program was:" >&5
12317 cat conftest.$ac_ext >&5
12318 ac_cv_func_gettimeofday=no
12319 fi
12320 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12321 fi
12322 echo "$as_me:12322: result: $ac_cv_func_gettimeofday" >&5
12323 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12324 if test $ac_cv_func_gettimeofday = yes; then
12325   cat >>confdefs.h <<\EOF
12326 #define HAVE_GETTIMEOFDAY 1
12327 EOF
12328
12329 else
12330
12331 echo "$as_me:12331: checking for gettimeofday in -lbsd" >&5
12332 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12333 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12334   echo $ECHO_N "(cached) $ECHO_C" >&6
12335 else
12336   ac_check_lib_save_LIBS=$LIBS
12337 LIBS="-lbsd  $LIBS"
12338 cat >conftest.$ac_ext <<_ACEOF
12339 #line 12339 "configure"
12340 #include "confdefs.h"
12341
12342 /* Override any gcc2 internal prototype to avoid an error.  */
12343 #ifdef __cplusplus
12344 extern "C"
12345 #endif
12346 /* We use char because int might match the return type of a gcc2
12347    builtin and then its argument prototype would still apply.  */
12348 char gettimeofday ();
12349 int
12350 main ()
12351 {
12352 gettimeofday ();
12353   ;
12354   return 0;
12355 }
12356 _ACEOF
12357 rm -f conftest.$ac_objext conftest$ac_exeext
12358 if { (eval echo "$as_me:12358: \"$ac_link\"") >&5
12359   (eval $ac_link) 2>&5
12360   ac_status=$?
12361   echo "$as_me:12361: \$? = $ac_status" >&5
12362   (exit $ac_status); } &&
12363          { ac_try='test -s conftest$ac_exeext'
12364   { (eval echo "$as_me:12364: \"$ac_try\"") >&5
12365   (eval $ac_try) 2>&5
12366   ac_status=$?
12367   echo "$as_me:12367: \$? = $ac_status" >&5
12368   (exit $ac_status); }; }; then
12369   ac_cv_lib_bsd_gettimeofday=yes
12370 else
12371   echo "$as_me: failed program was:" >&5
12372 cat conftest.$ac_ext >&5
12373 ac_cv_lib_bsd_gettimeofday=no
12374 fi
12375 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12376 LIBS=$ac_check_lib_save_LIBS
12377 fi
12378 echo "$as_me:12378: result: $ac_cv_lib_bsd_gettimeofday" >&5
12379 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12380 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12381   cat >>confdefs.h <<\EOF
12382 #define HAVE_GETTIMEOFDAY 1
12383 EOF
12384
12385         LIBS="-lbsd $LIBS"
12386 fi
12387
12388 fi
12389         ;;
12390 esac
12391
12392 echo "$as_me:12392: checking if -lm needed for math functions" >&5
12393 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
12394 if test "${cf_cv_need_libm+set}" = set; then
12395   echo $ECHO_N "(cached) $ECHO_C" >&6
12396 else
12397
12398         cat >conftest.$ac_ext <<_ACEOF
12399 #line 12399 "configure"
12400 #include "confdefs.h"
12401
12402         #include <stdio.h>
12403         #include <math.h>
12404
12405 int
12406 main ()
12407 {
12408 double x = rand(); printf("result = %g\n", sin(x))
12409   ;
12410   return 0;
12411 }
12412 _ACEOF
12413 rm -f conftest.$ac_objext conftest$ac_exeext
12414 if { (eval echo "$as_me:12414: \"$ac_link\"") >&5
12415   (eval $ac_link) 2>&5
12416   ac_status=$?
12417   echo "$as_me:12417: \$? = $ac_status" >&5
12418   (exit $ac_status); } &&
12419          { ac_try='test -s conftest$ac_exeext'
12420   { (eval echo "$as_me:12420: \"$ac_try\"") >&5
12421   (eval $ac_try) 2>&5
12422   ac_status=$?
12423   echo "$as_me:12423: \$? = $ac_status" >&5
12424   (exit $ac_status); }; }; then
12425   cf_cv_need_libm=no
12426 else
12427   echo "$as_me: failed program was:" >&5
12428 cat conftest.$ac_ext >&5
12429 cf_cv_need_libm=yes
12430 fi
12431 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12432 fi
12433 echo "$as_me:12433: result: $cf_cv_need_libm" >&5
12434 echo "${ECHO_T}$cf_cv_need_libm" >&6
12435 if test "$cf_cv_need_libm" = yes
12436 then
12437 MATH_LIB=-lm
12438 fi
12439
12440 ###     Checks for header files.
12441 echo "$as_me:12441: checking for ANSI C header files" >&5
12442 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12443 if test "${ac_cv_header_stdc+set}" = set; then
12444   echo $ECHO_N "(cached) $ECHO_C" >&6
12445 else
12446   cat >conftest.$ac_ext <<_ACEOF
12447 #line 12447 "configure"
12448 #include "confdefs.h"
12449 #include <stdlib.h>
12450 #include <stdarg.h>
12451 #include <string.h>
12452 #include <float.h>
12453
12454 _ACEOF
12455 if { (eval echo "$as_me:12455: \"$ac_cpp conftest.$ac_ext\"") >&5
12456   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12457   ac_status=$?
12458   egrep -v '^ *\+' conftest.er1 >conftest.err
12459   rm -f conftest.er1
12460   cat conftest.err >&5
12461   echo "$as_me:12461: \$? = $ac_status" >&5
12462   (exit $ac_status); } >/dev/null; then
12463   if test -s conftest.err; then
12464     ac_cpp_err=$ac_c_preproc_warn_flag
12465   else
12466     ac_cpp_err=
12467   fi
12468 else
12469   ac_cpp_err=yes
12470 fi
12471 if test -z "$ac_cpp_err"; then
12472   ac_cv_header_stdc=yes
12473 else
12474   echo "$as_me: failed program was:" >&5
12475   cat conftest.$ac_ext >&5
12476   ac_cv_header_stdc=no
12477 fi
12478 rm -f conftest.err conftest.$ac_ext
12479
12480 if test $ac_cv_header_stdc = yes; then
12481   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12482   cat >conftest.$ac_ext <<_ACEOF
12483 #line 12483 "configure"
12484 #include "confdefs.h"
12485 #include <string.h>
12486
12487 _ACEOF
12488 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12489   egrep "memchr" >/dev/null 2>&1; then
12490   :
12491 else
12492   ac_cv_header_stdc=no
12493 fi
12494 rm -f conftest*
12495
12496 fi
12497
12498 if test $ac_cv_header_stdc = yes; then
12499   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12500   cat >conftest.$ac_ext <<_ACEOF
12501 #line 12501 "configure"
12502 #include "confdefs.h"
12503 #include <stdlib.h>
12504
12505 _ACEOF
12506 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12507   egrep "free" >/dev/null 2>&1; then
12508   :
12509 else
12510   ac_cv_header_stdc=no
12511 fi
12512 rm -f conftest*
12513
12514 fi
12515
12516 if test $ac_cv_header_stdc = yes; then
12517   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12518   if test "$cross_compiling" = yes; then
12519   :
12520 else
12521   cat >conftest.$ac_ext <<_ACEOF
12522 #line 12522 "configure"
12523 #include "confdefs.h"
12524 #include <ctype.h>
12525 #if ((' ' & 0x0FF) == 0x020)
12526 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12527 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12528 #else
12529 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12530                      || ('j' <= (c) && (c) <= 'r') \
12531                      || ('s' <= (c) && (c) <= 'z'))
12532 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12533 #endif
12534
12535 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12536 int
12537 main ()
12538 {
12539   int i;
12540   for (i = 0; i < 256; i++)
12541     if (XOR (islower (i), ISLOWER (i))
12542         || toupper (i) != TOUPPER (i))
12543       $ac_main_return(2);
12544   $ac_main_return (0);
12545 }
12546 _ACEOF
12547 rm -f conftest$ac_exeext
12548 if { (eval echo "$as_me:12548: \"$ac_link\"") >&5
12549   (eval $ac_link) 2>&5
12550   ac_status=$?
12551   echo "$as_me:12551: \$? = $ac_status" >&5
12552   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12553   { (eval echo "$as_me:12553: \"$ac_try\"") >&5
12554   (eval $ac_try) 2>&5
12555   ac_status=$?
12556   echo "$as_me:12556: \$? = $ac_status" >&5
12557   (exit $ac_status); }; }; then
12558   :
12559 else
12560   echo "$as_me: program exited with status $ac_status" >&5
12561 echo "$as_me: failed program was:" >&5
12562 cat conftest.$ac_ext >&5
12563 ac_cv_header_stdc=no
12564 fi
12565 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12566 fi
12567 fi
12568 fi
12569 echo "$as_me:12569: result: $ac_cv_header_stdc" >&5
12570 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12571 if test $ac_cv_header_stdc = yes; then
12572
12573 cat >>confdefs.h <<\EOF
12574 #define STDC_HEADERS 1
12575 EOF
12576
12577 fi
12578
12579 ac_header_dirent=no
12580 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12581   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12582 echo "$as_me:12582: checking for $ac_hdr that defines DIR" >&5
12583 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12584 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12585   echo $ECHO_N "(cached) $ECHO_C" >&6
12586 else
12587   cat >conftest.$ac_ext <<_ACEOF
12588 #line 12588 "configure"
12589 #include "confdefs.h"
12590 #include <sys/types.h>
12591 #include <$ac_hdr>
12592
12593 int
12594 main ()
12595 {
12596 if ((DIR *) 0)
12597 return 0;
12598   ;
12599   return 0;
12600 }
12601 _ACEOF
12602 rm -f conftest.$ac_objext
12603 if { (eval echo "$as_me:12603: \"$ac_compile\"") >&5
12604   (eval $ac_compile) 2>&5
12605   ac_status=$?
12606   echo "$as_me:12606: \$? = $ac_status" >&5
12607   (exit $ac_status); } &&
12608          { ac_try='test -s conftest.$ac_objext'
12609   { (eval echo "$as_me:12609: \"$ac_try\"") >&5
12610   (eval $ac_try) 2>&5
12611   ac_status=$?
12612   echo "$as_me:12612: \$? = $ac_status" >&5
12613   (exit $ac_status); }; }; then
12614   eval "$as_ac_Header=yes"
12615 else
12616   echo "$as_me: failed program was:" >&5
12617 cat conftest.$ac_ext >&5
12618 eval "$as_ac_Header=no"
12619 fi
12620 rm -f conftest.$ac_objext conftest.$ac_ext
12621 fi
12622 echo "$as_me:12622: result: `eval echo '${'$as_ac_Header'}'`" >&5
12623 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12624 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12625   cat >>confdefs.h <<EOF
12626 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12627 EOF
12628
12629 ac_header_dirent=$ac_hdr; break
12630 fi
12631
12632 done
12633 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12634 if test $ac_header_dirent = dirent.h; then
12635   echo "$as_me:12635: checking for opendir in -ldir" >&5
12636 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12637 if test "${ac_cv_lib_dir_opendir+set}" = set; then
12638   echo $ECHO_N "(cached) $ECHO_C" >&6
12639 else
12640   ac_check_lib_save_LIBS=$LIBS
12641 LIBS="-ldir  $LIBS"
12642 cat >conftest.$ac_ext <<_ACEOF
12643 #line 12643 "configure"
12644 #include "confdefs.h"
12645
12646 /* Override any gcc2 internal prototype to avoid an error.  */
12647 #ifdef __cplusplus
12648 extern "C"
12649 #endif
12650 /* We use char because int might match the return type of a gcc2
12651    builtin and then its argument prototype would still apply.  */
12652 char opendir ();
12653 int
12654 main ()
12655 {
12656 opendir ();
12657   ;
12658   return 0;
12659 }
12660 _ACEOF
12661 rm -f conftest.$ac_objext conftest$ac_exeext
12662 if { (eval echo "$as_me:12662: \"$ac_link\"") >&5
12663   (eval $ac_link) 2>&5
12664   ac_status=$?
12665   echo "$as_me:12665: \$? = $ac_status" >&5
12666   (exit $ac_status); } &&
12667          { ac_try='test -s conftest$ac_exeext'
12668   { (eval echo "$as_me:12668: \"$ac_try\"") >&5
12669   (eval $ac_try) 2>&5
12670   ac_status=$?
12671   echo "$as_me:12671: \$? = $ac_status" >&5
12672   (exit $ac_status); }; }; then
12673   ac_cv_lib_dir_opendir=yes
12674 else
12675   echo "$as_me: failed program was:" >&5
12676 cat conftest.$ac_ext >&5
12677 ac_cv_lib_dir_opendir=no
12678 fi
12679 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12680 LIBS=$ac_check_lib_save_LIBS
12681 fi
12682 echo "$as_me:12682: result: $ac_cv_lib_dir_opendir" >&5
12683 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12684 if test $ac_cv_lib_dir_opendir = yes; then
12685   LIBS="$LIBS -ldir"
12686 fi
12687
12688 else
12689   echo "$as_me:12689: checking for opendir in -lx" >&5
12690 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12691 if test "${ac_cv_lib_x_opendir+set}" = set; then
12692   echo $ECHO_N "(cached) $ECHO_C" >&6
12693 else
12694   ac_check_lib_save_LIBS=$LIBS
12695 LIBS="-lx  $LIBS"
12696 cat >conftest.$ac_ext <<_ACEOF
12697 #line 12697 "configure"
12698 #include "confdefs.h"
12699
12700 /* Override any gcc2 internal prototype to avoid an error.  */
12701 #ifdef __cplusplus
12702 extern "C"
12703 #endif
12704 /* We use char because int might match the return type of a gcc2
12705    builtin and then its argument prototype would still apply.  */
12706 char opendir ();
12707 int
12708 main ()
12709 {
12710 opendir ();
12711   ;
12712   return 0;
12713 }
12714 _ACEOF
12715 rm -f conftest.$ac_objext conftest$ac_exeext
12716 if { (eval echo "$as_me:12716: \"$ac_link\"") >&5
12717   (eval $ac_link) 2>&5
12718   ac_status=$?
12719   echo "$as_me:12719: \$? = $ac_status" >&5
12720   (exit $ac_status); } &&
12721          { ac_try='test -s conftest$ac_exeext'
12722   { (eval echo "$as_me:12722: \"$ac_try\"") >&5
12723   (eval $ac_try) 2>&5
12724   ac_status=$?
12725   echo "$as_me:12725: \$? = $ac_status" >&5
12726   (exit $ac_status); }; }; then
12727   ac_cv_lib_x_opendir=yes
12728 else
12729   echo "$as_me: failed program was:" >&5
12730 cat conftest.$ac_ext >&5
12731 ac_cv_lib_x_opendir=no
12732 fi
12733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12734 LIBS=$ac_check_lib_save_LIBS
12735 fi
12736 echo "$as_me:12736: result: $ac_cv_lib_x_opendir" >&5
12737 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12738 if test $ac_cv_lib_x_opendir = yes; then
12739   LIBS="$LIBS -lx"
12740 fi
12741
12742 fi
12743
12744 echo "$as_me:12744: checking whether time.h and sys/time.h may both be included" >&5
12745 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12746 if test "${ac_cv_header_time+set}" = set; then
12747   echo $ECHO_N "(cached) $ECHO_C" >&6
12748 else
12749   cat >conftest.$ac_ext <<_ACEOF
12750 #line 12750 "configure"
12751 #include "confdefs.h"
12752 #include <sys/types.h>
12753 #include <sys/time.h>
12754 #include <time.h>
12755
12756 int
12757 main ()
12758 {
12759 if ((struct tm *) 0)
12760 return 0;
12761   ;
12762   return 0;
12763 }
12764 _ACEOF
12765 rm -f conftest.$ac_objext
12766 if { (eval echo "$as_me:12766: \"$ac_compile\"") >&5
12767   (eval $ac_compile) 2>&5
12768   ac_status=$?
12769   echo "$as_me:12769: \$? = $ac_status" >&5
12770   (exit $ac_status); } &&
12771          { ac_try='test -s conftest.$ac_objext'
12772   { (eval echo "$as_me:12772: \"$ac_try\"") >&5
12773   (eval $ac_try) 2>&5
12774   ac_status=$?
12775   echo "$as_me:12775: \$? = $ac_status" >&5
12776   (exit $ac_status); }; }; then
12777   ac_cv_header_time=yes
12778 else
12779   echo "$as_me: failed program was:" >&5
12780 cat conftest.$ac_ext >&5
12781 ac_cv_header_time=no
12782 fi
12783 rm -f conftest.$ac_objext conftest.$ac_ext
12784 fi
12785 echo "$as_me:12785: result: $ac_cv_header_time" >&5
12786 echo "${ECHO_T}$ac_cv_header_time" >&6
12787 if test $ac_cv_header_time = yes; then
12788
12789 cat >>confdefs.h <<\EOF
12790 #define TIME_WITH_SYS_TIME 1
12791 EOF
12792
12793 fi
12794
12795 cf_regex_func=no
12796
12797 echo "$as_me:12797: checking for regcomp" >&5
12798 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
12799 if test "${ac_cv_func_regcomp+set}" = set; then
12800   echo $ECHO_N "(cached) $ECHO_C" >&6
12801 else
12802   cat >conftest.$ac_ext <<_ACEOF
12803 #line 12803 "configure"
12804 #include "confdefs.h"
12805 /* System header to define __stub macros and hopefully few prototypes,
12806     which can conflict with char regcomp (); below.  */
12807 #include <assert.h>
12808 /* Override any gcc2 internal prototype to avoid an error.  */
12809 #ifdef __cplusplus
12810 extern "C"
12811 #endif
12812 /* We use char because int might match the return type of a gcc2
12813    builtin and then its argument prototype would still apply.  */
12814 char regcomp ();
12815 char (*f) ();
12816
12817 int
12818 main ()
12819 {
12820 /* The GNU C library defines this for functions which it implements
12821     to always fail with ENOSYS.  Some functions are actually named
12822     something starting with __ and the normal name is an alias.  */
12823 #if defined (__stub_regcomp) || defined (__stub___regcomp)
12824 choke me
12825 #else
12826 f = regcomp;
12827 #endif
12828
12829   ;
12830   return 0;
12831 }
12832 _ACEOF
12833 rm -f conftest.$ac_objext conftest$ac_exeext
12834 if { (eval echo "$as_me:12834: \"$ac_link\"") >&5
12835   (eval $ac_link) 2>&5
12836   ac_status=$?
12837   echo "$as_me:12837: \$? = $ac_status" >&5
12838   (exit $ac_status); } &&
12839          { ac_try='test -s conftest$ac_exeext'
12840   { (eval echo "$as_me:12840: \"$ac_try\"") >&5
12841   (eval $ac_try) 2>&5
12842   ac_status=$?
12843   echo "$as_me:12843: \$? = $ac_status" >&5
12844   (exit $ac_status); }; }; then
12845   ac_cv_func_regcomp=yes
12846 else
12847   echo "$as_me: failed program was:" >&5
12848 cat conftest.$ac_ext >&5
12849 ac_cv_func_regcomp=no
12850 fi
12851 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12852 fi
12853 echo "$as_me:12853: result: $ac_cv_func_regcomp" >&5
12854 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
12855 if test $ac_cv_func_regcomp = yes; then
12856   cf_regex_func=regcomp
12857 else
12858
12859         for cf_regex_lib in regex re
12860         do
12861                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
12862 echo "$as_me:12862: checking for regcomp in -l$cf_regex_lib" >&5
12863 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
12864 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12865   echo $ECHO_N "(cached) $ECHO_C" >&6
12866 else
12867   ac_check_lib_save_LIBS=$LIBS
12868 LIBS="-l$cf_regex_lib  $LIBS"
12869 cat >conftest.$ac_ext <<_ACEOF
12870 #line 12870 "configure"
12871 #include "confdefs.h"
12872
12873 /* Override any gcc2 internal prototype to avoid an error.  */
12874 #ifdef __cplusplus
12875 extern "C"
12876 #endif
12877 /* We use char because int might match the return type of a gcc2
12878    builtin and then its argument prototype would still apply.  */
12879 char regcomp ();
12880 int
12881 main ()
12882 {
12883 regcomp ();
12884   ;
12885   return 0;
12886 }
12887 _ACEOF
12888 rm -f conftest.$ac_objext conftest$ac_exeext
12889 if { (eval echo "$as_me:12889: \"$ac_link\"") >&5
12890   (eval $ac_link) 2>&5
12891   ac_status=$?
12892   echo "$as_me:12892: \$? = $ac_status" >&5
12893   (exit $ac_status); } &&
12894          { ac_try='test -s conftest$ac_exeext'
12895   { (eval echo "$as_me:12895: \"$ac_try\"") >&5
12896   (eval $ac_try) 2>&5
12897   ac_status=$?
12898   echo "$as_me:12898: \$? = $ac_status" >&5
12899   (exit $ac_status); }; }; then
12900   eval "$as_ac_Lib=yes"
12901 else
12902   echo "$as_me: failed program was:" >&5
12903 cat conftest.$ac_ext >&5
12904 eval "$as_ac_Lib=no"
12905 fi
12906 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12907 LIBS=$ac_check_lib_save_LIBS
12908 fi
12909 echo "$as_me:12909: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12910 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12911 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12912
12913                                 LIBS="-l$cf_regex_lib $LIBS"
12914                                 cf_regex_func=regcomp
12915                                 break
12916 fi
12917
12918         done
12919
12920 fi
12921
12922 if test "$cf_regex_func" = no ; then
12923         echo "$as_me:12923: checking for compile" >&5
12924 echo $ECHO_N "checking for compile... $ECHO_C" >&6
12925 if test "${ac_cv_func_compile+set}" = set; then
12926   echo $ECHO_N "(cached) $ECHO_C" >&6
12927 else
12928   cat >conftest.$ac_ext <<_ACEOF
12929 #line 12929 "configure"
12930 #include "confdefs.h"
12931 /* System header to define __stub macros and hopefully few prototypes,
12932     which can conflict with char compile (); below.  */
12933 #include <assert.h>
12934 /* Override any gcc2 internal prototype to avoid an error.  */
12935 #ifdef __cplusplus
12936 extern "C"
12937 #endif
12938 /* We use char because int might match the return type of a gcc2
12939    builtin and then its argument prototype would still apply.  */
12940 char compile ();
12941 char (*f) ();
12942
12943 int
12944 main ()
12945 {
12946 /* The GNU C library defines this for functions which it implements
12947     to always fail with ENOSYS.  Some functions are actually named
12948     something starting with __ and the normal name is an alias.  */
12949 #if defined (__stub_compile) || defined (__stub___compile)
12950 choke me
12951 #else
12952 f = compile;
12953 #endif
12954
12955   ;
12956   return 0;
12957 }
12958 _ACEOF
12959 rm -f conftest.$ac_objext conftest$ac_exeext
12960 if { (eval echo "$as_me:12960: \"$ac_link\"") >&5
12961   (eval $ac_link) 2>&5
12962   ac_status=$?
12963   echo "$as_me:12963: \$? = $ac_status" >&5
12964   (exit $ac_status); } &&
12965          { ac_try='test -s conftest$ac_exeext'
12966   { (eval echo "$as_me:12966: \"$ac_try\"") >&5
12967   (eval $ac_try) 2>&5
12968   ac_status=$?
12969   echo "$as_me:12969: \$? = $ac_status" >&5
12970   (exit $ac_status); }; }; then
12971   ac_cv_func_compile=yes
12972 else
12973   echo "$as_me: failed program was:" >&5
12974 cat conftest.$ac_ext >&5
12975 ac_cv_func_compile=no
12976 fi
12977 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12978 fi
12979 echo "$as_me:12979: result: $ac_cv_func_compile" >&5
12980 echo "${ECHO_T}$ac_cv_func_compile" >&6
12981 if test $ac_cv_func_compile = yes; then
12982   cf_regex_func=compile
12983 else
12984
12985                 echo "$as_me:12985: checking for compile in -lgen" >&5
12986 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
12987 if test "${ac_cv_lib_gen_compile+set}" = set; then
12988   echo $ECHO_N "(cached) $ECHO_C" >&6
12989 else
12990   ac_check_lib_save_LIBS=$LIBS
12991 LIBS="-lgen  $LIBS"
12992 cat >conftest.$ac_ext <<_ACEOF
12993 #line 12993 "configure"
12994 #include "confdefs.h"
12995
12996 /* Override any gcc2 internal prototype to avoid an error.  */
12997 #ifdef __cplusplus
12998 extern "C"
12999 #endif
13000 /* We use char because int might match the return type of a gcc2
13001    builtin and then its argument prototype would still apply.  */
13002 char compile ();
13003 int
13004 main ()
13005 {
13006 compile ();
13007   ;
13008   return 0;
13009 }
13010 _ACEOF
13011 rm -f conftest.$ac_objext conftest$ac_exeext
13012 if { (eval echo "$as_me:13012: \"$ac_link\"") >&5
13013   (eval $ac_link) 2>&5
13014   ac_status=$?
13015   echo "$as_me:13015: \$? = $ac_status" >&5
13016   (exit $ac_status); } &&
13017          { ac_try='test -s conftest$ac_exeext'
13018   { (eval echo "$as_me:13018: \"$ac_try\"") >&5
13019   (eval $ac_try) 2>&5
13020   ac_status=$?
13021   echo "$as_me:13021: \$? = $ac_status" >&5
13022   (exit $ac_status); }; }; then
13023   ac_cv_lib_gen_compile=yes
13024 else
13025   echo "$as_me: failed program was:" >&5
13026 cat conftest.$ac_ext >&5
13027 ac_cv_lib_gen_compile=no
13028 fi
13029 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13030 LIBS=$ac_check_lib_save_LIBS
13031 fi
13032 echo "$as_me:13032: result: $ac_cv_lib_gen_compile" >&5
13033 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
13034 if test $ac_cv_lib_gen_compile = yes; then
13035
13036                                 LIBS="-lgen $LIBS"
13037                                 cf_regex_func=compile
13038 fi
13039
13040 fi
13041
13042 fi
13043
13044 if test "$cf_regex_func" = no ; then
13045         { echo "$as_me:13045: WARNING: cannot find regular expression library" >&5
13046 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
13047 fi
13048
13049 echo "$as_me:13049: checking for regular-expression headers" >&5
13050 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
13051 if test "${cf_cv_regex_hdrs+set}" = set; then
13052   echo $ECHO_N "(cached) $ECHO_C" >&6
13053 else
13054
13055 cf_cv_regex_hdrs=no
13056 case $cf_regex_func in #(vi
13057 compile) #(vi
13058         for cf_regex_hdr in regexp.h regexpr.h
13059         do
13060                 cat >conftest.$ac_ext <<_ACEOF
13061 #line 13061 "configure"
13062 #include "confdefs.h"
13063 #include <$cf_regex_hdr>
13064 int
13065 main ()
13066 {
13067
13068                         char *p = compile("", "", "", 0);
13069                         int x = step("", "");
13070
13071   ;
13072   return 0;
13073 }
13074 _ACEOF
13075 rm -f conftest.$ac_objext conftest$ac_exeext
13076 if { (eval echo "$as_me:13076: \"$ac_link\"") >&5
13077   (eval $ac_link) 2>&5
13078   ac_status=$?
13079   echo "$as_me:13079: \$? = $ac_status" >&5
13080   (exit $ac_status); } &&
13081          { ac_try='test -s conftest$ac_exeext'
13082   { (eval echo "$as_me:13082: \"$ac_try\"") >&5
13083   (eval $ac_try) 2>&5
13084   ac_status=$?
13085   echo "$as_me:13085: \$? = $ac_status" >&5
13086   (exit $ac_status); }; }; then
13087
13088                         cf_cv_regex_hdrs=$cf_regex_hdr
13089                         break
13090
13091 else
13092   echo "$as_me: failed program was:" >&5
13093 cat conftest.$ac_ext >&5
13094 fi
13095 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13096         done
13097         ;;
13098 *)
13099         for cf_regex_hdr in regex.h
13100         do
13101                 cat >conftest.$ac_ext <<_ACEOF
13102 #line 13102 "configure"
13103 #include "confdefs.h"
13104 #include <sys/types.h>
13105 #include <$cf_regex_hdr>
13106 int
13107 main ()
13108 {
13109
13110                         regex_t *p;
13111                         int x = regcomp(p, "", 0);
13112                         int y = regexec(p, "", 0, 0, 0);
13113                         regfree(p);
13114
13115   ;
13116   return 0;
13117 }
13118 _ACEOF
13119 rm -f conftest.$ac_objext conftest$ac_exeext
13120 if { (eval echo "$as_me:13120: \"$ac_link\"") >&5
13121   (eval $ac_link) 2>&5
13122   ac_status=$?
13123   echo "$as_me:13123: \$? = $ac_status" >&5
13124   (exit $ac_status); } &&
13125          { ac_try='test -s conftest$ac_exeext'
13126   { (eval echo "$as_me:13126: \"$ac_try\"") >&5
13127   (eval $ac_try) 2>&5
13128   ac_status=$?
13129   echo "$as_me:13129: \$? = $ac_status" >&5
13130   (exit $ac_status); }; }; then
13131
13132                         cf_cv_regex_hdrs=$cf_regex_hdr
13133                         break
13134
13135 else
13136   echo "$as_me: failed program was:" >&5
13137 cat conftest.$ac_ext >&5
13138 fi
13139 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13140         done
13141         ;;
13142 esac
13143
13144 fi
13145 echo "$as_me:13145: result: $cf_cv_regex_hdrs" >&5
13146 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
13147
13148 case $cf_cv_regex_hdrs in #(vi
13149     no)        { echo "$as_me:13149: WARNING: no regular expression header found" >&5
13150 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
13151     regex.h)   cat >>confdefs.h <<\EOF
13152 #define HAVE_REGEX_H_FUNCS 1
13153 EOF
13154  ;; #(vi
13155     regexp.h)  cat >>confdefs.h <<\EOF
13156 #define HAVE_REGEXP_H_FUNCS 1
13157 EOF
13158  ;; #(vi
13159     regexpr.h) cat >>confdefs.h <<\EOF
13160 #define HAVE_REGEXPR_H_FUNCS 1
13161 EOF
13162  ;;
13163 esac
13164
13165 for ac_header in \
13166 fcntl.h \
13167 getopt.h \
13168 limits.h \
13169 locale.h \
13170 poll.h \
13171 sys/bsdtypes.h \
13172 sys/ioctl.h \
13173 sys/param.h \
13174 sys/poll.h \
13175 sys/select.h \
13176 sys/time.h \
13177 sys/times.h \
13178 ttyent.h \
13179 unistd.h \
13180 wctype.h \
13181
13182 do
13183 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13184 echo "$as_me:13184: checking for $ac_header" >&5
13185 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13186 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13187   echo $ECHO_N "(cached) $ECHO_C" >&6
13188 else
13189   cat >conftest.$ac_ext <<_ACEOF
13190 #line 13190 "configure"
13191 #include "confdefs.h"
13192 #include <$ac_header>
13193 _ACEOF
13194 if { (eval echo "$as_me:13194: \"$ac_cpp conftest.$ac_ext\"") >&5
13195   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13196   ac_status=$?
13197   egrep -v '^ *\+' conftest.er1 >conftest.err
13198   rm -f conftest.er1
13199   cat conftest.err >&5
13200   echo "$as_me:13200: \$? = $ac_status" >&5
13201   (exit $ac_status); } >/dev/null; then
13202   if test -s conftest.err; then
13203     ac_cpp_err=$ac_c_preproc_warn_flag
13204   else
13205     ac_cpp_err=
13206   fi
13207 else
13208   ac_cpp_err=yes
13209 fi
13210 if test -z "$ac_cpp_err"; then
13211   eval "$as_ac_Header=yes"
13212 else
13213   echo "$as_me: failed program was:" >&5
13214   cat conftest.$ac_ext >&5
13215   eval "$as_ac_Header=no"
13216 fi
13217 rm -f conftest.err conftest.$ac_ext
13218 fi
13219 echo "$as_me:13219: result: `eval echo '${'$as_ac_Header'}'`" >&5
13220 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13221 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13222   cat >>confdefs.h <<EOF
13223 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13224 EOF
13225
13226 fi
13227 done
13228
13229 # check for ISC (this may also define _POSIX_SOURCE)
13230 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
13231 if test "$ISC" = yes ; then
13232
13233 echo "$as_me:13233: checking for main in -lcposix" >&5
13234 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
13235 if test "${ac_cv_lib_cposix_main+set}" = set; then
13236   echo $ECHO_N "(cached) $ECHO_C" >&6
13237 else
13238   ac_check_lib_save_LIBS=$LIBS
13239 LIBS="-lcposix  $LIBS"
13240 cat >conftest.$ac_ext <<_ACEOF
13241 #line 13241 "configure"
13242 #include "confdefs.h"
13243
13244 int
13245 main ()
13246 {
13247 main ();
13248   ;
13249   return 0;
13250 }
13251 _ACEOF
13252 rm -f conftest.$ac_objext conftest$ac_exeext
13253 if { (eval echo "$as_me:13253: \"$ac_link\"") >&5
13254   (eval $ac_link) 2>&5
13255   ac_status=$?
13256   echo "$as_me:13256: \$? = $ac_status" >&5
13257   (exit $ac_status); } &&
13258          { ac_try='test -s conftest$ac_exeext'
13259   { (eval echo "$as_me:13259: \"$ac_try\"") >&5
13260   (eval $ac_try) 2>&5
13261   ac_status=$?
13262   echo "$as_me:13262: \$? = $ac_status" >&5
13263   (exit $ac_status); }; }; then
13264   ac_cv_lib_cposix_main=yes
13265 else
13266   echo "$as_me: failed program was:" >&5
13267 cat conftest.$ac_ext >&5
13268 ac_cv_lib_cposix_main=no
13269 fi
13270 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13271 LIBS=$ac_check_lib_save_LIBS
13272 fi
13273 echo "$as_me:13273: result: $ac_cv_lib_cposix_main" >&5
13274 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
13275 if test $ac_cv_lib_cposix_main = yes; then
13276   cat >>confdefs.h <<EOF
13277 #define HAVE_LIBCPOSIX 1
13278 EOF
13279
13280   LIBS="-lcposix $LIBS"
13281
13282 fi
13283
13284         echo "$as_me:13284: checking for bzero in -linet" >&5
13285 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
13286 if test "${ac_cv_lib_inet_bzero+set}" = set; then
13287   echo $ECHO_N "(cached) $ECHO_C" >&6
13288 else
13289   ac_check_lib_save_LIBS=$LIBS
13290 LIBS="-linet  $LIBS"
13291 cat >conftest.$ac_ext <<_ACEOF
13292 #line 13292 "configure"
13293 #include "confdefs.h"
13294
13295 /* Override any gcc2 internal prototype to avoid an error.  */
13296 #ifdef __cplusplus
13297 extern "C"
13298 #endif
13299 /* We use char because int might match the return type of a gcc2
13300    builtin and then its argument prototype would still apply.  */
13301 char bzero ();
13302 int
13303 main ()
13304 {
13305 bzero ();
13306   ;
13307   return 0;
13308 }
13309 _ACEOF
13310 rm -f conftest.$ac_objext conftest$ac_exeext
13311 if { (eval echo "$as_me:13311: \"$ac_link\"") >&5
13312   (eval $ac_link) 2>&5
13313   ac_status=$?
13314   echo "$as_me:13314: \$? = $ac_status" >&5
13315   (exit $ac_status); } &&
13316          { ac_try='test -s conftest$ac_exeext'
13317   { (eval echo "$as_me:13317: \"$ac_try\"") >&5
13318   (eval $ac_try) 2>&5
13319   ac_status=$?
13320   echo "$as_me:13320: \$? = $ac_status" >&5
13321   (exit $ac_status); }; }; then
13322   ac_cv_lib_inet_bzero=yes
13323 else
13324   echo "$as_me: failed program was:" >&5
13325 cat conftest.$ac_ext >&5
13326 ac_cv_lib_inet_bzero=no
13327 fi
13328 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13329 LIBS=$ac_check_lib_save_LIBS
13330 fi
13331 echo "$as_me:13331: result: $ac_cv_lib_inet_bzero" >&5
13332 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
13333 if test $ac_cv_lib_inet_bzero = yes; then
13334   LIBS="-linet $LIBS"
13335 fi
13336 fi
13337
13338 echo "$as_me:13338: checking if sys/time.h works with sys/select.h" >&5
13339 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
13340 if test "${cf_cv_sys_time_select+set}" = set; then
13341   echo $ECHO_N "(cached) $ECHO_C" >&6
13342 else
13343
13344 cat >conftest.$ac_ext <<_ACEOF
13345 #line 13345 "configure"
13346 #include "confdefs.h"
13347
13348 #include <sys/types.h>
13349 #ifdef HAVE_SYS_TIME_H
13350 #include <sys/time.h>
13351 #endif
13352 #ifdef HAVE_SYS_SELECT_H
13353 #include <sys/select.h>
13354 #endif
13355
13356 int
13357 main ()
13358 {
13359
13360   ;
13361   return 0;
13362 }
13363 _ACEOF
13364 rm -f conftest.$ac_objext
13365 if { (eval echo "$as_me:13365: \"$ac_compile\"") >&5
13366   (eval $ac_compile) 2>&5
13367   ac_status=$?
13368   echo "$as_me:13368: \$? = $ac_status" >&5
13369   (exit $ac_status); } &&
13370          { ac_try='test -s conftest.$ac_objext'
13371   { (eval echo "$as_me:13371: \"$ac_try\"") >&5
13372   (eval $ac_try) 2>&5
13373   ac_status=$?
13374   echo "$as_me:13374: \$? = $ac_status" >&5
13375   (exit $ac_status); }; }; then
13376   cf_cv_sys_time_select=yes
13377 else
13378   echo "$as_me: failed program was:" >&5
13379 cat conftest.$ac_ext >&5
13380 cf_cv_sys_time_select=no
13381 fi
13382 rm -f conftest.$ac_objext conftest.$ac_ext
13383
13384 fi
13385
13386 echo "$as_me:13386: result: $cf_cv_sys_time_select" >&5
13387 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
13388 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
13389 #define HAVE_SYS_TIME_SELECT 1
13390 EOF
13391
13392 ###     checks for compiler characteristics
13393 ac_ext=c
13394 ac_cpp='$CPP $CPPFLAGS'
13395 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13396 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13397 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13398 ac_main_return=return
13399
13400 echo "$as_me:13400: checking for $CC option to accept ANSI C" >&5
13401 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13402 if test "${ac_cv_prog_cc_stdc+set}" = set; then
13403   echo $ECHO_N "(cached) $ECHO_C" >&6
13404 else
13405   ac_cv_prog_cc_stdc=no
13406 ac_save_CC=$CC
13407 cat >conftest.$ac_ext <<_ACEOF
13408 #line 13408 "configure"
13409 #include "confdefs.h"
13410 #include <stdarg.h>
13411 #include <stdio.h>
13412 #include <sys/types.h>
13413 #include <sys/stat.h>
13414 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
13415 struct buf { int x; };
13416 FILE * (*rcsopen) (struct buf *, struct stat *, int);
13417 static char *e (p, i)
13418      char **p;
13419      int i;
13420 {
13421   return p[i];
13422 }
13423 static char *f (char * (*g) (char **, int), char **p, ...)
13424 {
13425   char *s;
13426   va_list v;
13427   va_start (v,p);
13428   s = g (p, va_arg (v,int));
13429   va_end (v);
13430   return s;
13431 }
13432 int test (int i, double x);
13433 struct s1 {int (*f) (int a);};
13434 struct s2 {int (*f) (double a);};
13435 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13436 int argc;
13437 char **argv;
13438 int
13439 main ()
13440 {
13441 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
13442   ;
13443   return 0;
13444 }
13445 _ACEOF
13446 # Don't try gcc -ansi; that turns off useful extensions and
13447 # breaks some systems' header files.
13448 # AIX                   -qlanglvl=ansi
13449 # Ultrix and OSF/1      -std1
13450 # HP-UX 10.20 and later -Ae
13451 # HP-UX older versions  -Aa -D_HPUX_SOURCE
13452 # SVR4                  -Xc -D__EXTENSIONS__
13453 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13454 do
13455   CC="$ac_save_CC $ac_arg"
13456   rm -f conftest.$ac_objext
13457 if { (eval echo "$as_me:13457: \"$ac_compile\"") >&5
13458   (eval $ac_compile) 2>&5
13459   ac_status=$?
13460   echo "$as_me:13460: \$? = $ac_status" >&5
13461   (exit $ac_status); } &&
13462          { ac_try='test -s conftest.$ac_objext'
13463   { (eval echo "$as_me:13463: \"$ac_try\"") >&5
13464   (eval $ac_try) 2>&5
13465   ac_status=$?
13466   echo "$as_me:13466: \$? = $ac_status" >&5
13467   (exit $ac_status); }; }; then
13468   ac_cv_prog_cc_stdc=$ac_arg
13469 break
13470 else
13471   echo "$as_me: failed program was:" >&5
13472 cat conftest.$ac_ext >&5
13473 fi
13474 rm -f conftest.$ac_objext
13475 done
13476 rm -f conftest.$ac_ext conftest.$ac_objext
13477 CC=$ac_save_CC
13478
13479 fi
13480
13481 case "x$ac_cv_prog_cc_stdc" in
13482   x|xno)
13483     echo "$as_me:13483: result: none needed" >&5
13484 echo "${ECHO_T}none needed" >&6 ;;
13485   *)
13486     echo "$as_me:13486: result: $ac_cv_prog_cc_stdc" >&5
13487 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13488     CC="$CC $ac_cv_prog_cc_stdc" ;;
13489 esac
13490
13491 echo "$as_me:13491: checking for an ANSI C-conforming const" >&5
13492 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13493 if test "${ac_cv_c_const+set}" = set; then
13494   echo $ECHO_N "(cached) $ECHO_C" >&6
13495 else
13496   cat >conftest.$ac_ext <<_ACEOF
13497 #line 13497 "configure"
13498 #include "confdefs.h"
13499
13500 int
13501 main ()
13502 {
13503 /* FIXME: Include the comments suggested by Paul. */
13504 #ifndef __cplusplus
13505   /* Ultrix mips cc rejects this.  */
13506   typedef int charset[2];
13507   const charset x;
13508   /* SunOS 4.1.1 cc rejects this.  */
13509   char const *const *ccp;
13510   char **p;
13511   /* NEC SVR4.0.2 mips cc rejects this.  */
13512   struct point {int x, y;};
13513   static struct point const zero = {0,0};
13514   /* AIX XL C 1.02.0.0 rejects this.
13515      It does not let you subtract one const X* pointer from another in
13516      an arm of an if-expression whose if-part is not a constant
13517      expression */
13518   const char *g = "string";
13519   ccp = &g + (g ? g-g : 0);
13520   /* HPUX 7.0 cc rejects these. */
13521   ++ccp;
13522   p = (char**) ccp;
13523   ccp = (char const *const *) p;
13524   { /* SCO 3.2v4 cc rejects this.  */
13525     char *t;
13526     char const *s = 0 ? (char *) 0 : (char const *) 0;
13527
13528     *t++ = 0;
13529   }
13530   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13531     int x[] = {25, 17};
13532     const int *foo = &x[0];
13533     ++foo;
13534   }
13535   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13536     typedef const int *iptr;
13537     iptr p = 0;
13538     ++p;
13539   }
13540   { /* AIX XL C 1.02.0.0 rejects this saying
13541        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13542     struct s { int j; const int *ap[3]; };
13543     struct s *b; b->j = 5;
13544   }
13545   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13546     const int foo = 10;
13547   }
13548 #endif
13549
13550   ;
13551   return 0;
13552 }
13553 _ACEOF
13554 rm -f conftest.$ac_objext
13555 if { (eval echo "$as_me:13555: \"$ac_compile\"") >&5
13556   (eval $ac_compile) 2>&5
13557   ac_status=$?
13558   echo "$as_me:13558: \$? = $ac_status" >&5
13559   (exit $ac_status); } &&
13560          { ac_try='test -s conftest.$ac_objext'
13561   { (eval echo "$as_me:13561: \"$ac_try\"") >&5
13562   (eval $ac_try) 2>&5
13563   ac_status=$?
13564   echo "$as_me:13564: \$? = $ac_status" >&5
13565   (exit $ac_status); }; }; then
13566   ac_cv_c_const=yes
13567 else
13568   echo "$as_me: failed program was:" >&5
13569 cat conftest.$ac_ext >&5
13570 ac_cv_c_const=no
13571 fi
13572 rm -f conftest.$ac_objext conftest.$ac_ext
13573 fi
13574 echo "$as_me:13574: result: $ac_cv_c_const" >&5
13575 echo "${ECHO_T}$ac_cv_c_const" >&6
13576 if test $ac_cv_c_const = no; then
13577
13578 cat >>confdefs.h <<\EOF
13579 #define const
13580 EOF
13581
13582 fi
13583
13584 echo "$as_me:13584: checking for inline" >&5
13585 echo $ECHO_N "checking for inline... $ECHO_C" >&6
13586 if test "${ac_cv_c_inline+set}" = set; then
13587   echo $ECHO_N "(cached) $ECHO_C" >&6
13588 else
13589   ac_cv_c_inline=no
13590 for ac_kw in inline __inline__ __inline; do
13591   cat >conftest.$ac_ext <<_ACEOF
13592 #line 13592 "configure"
13593 #include "confdefs.h"
13594 #ifndef __cplusplus
13595 static $ac_kw int static_foo () {return 0; }
13596 $ac_kw int foo () {return 0; }
13597 #endif
13598
13599 _ACEOF
13600 rm -f conftest.$ac_objext
13601 if { (eval echo "$as_me:13601: \"$ac_compile\"") >&5
13602   (eval $ac_compile) 2>&5
13603   ac_status=$?
13604   echo "$as_me:13604: \$? = $ac_status" >&5
13605   (exit $ac_status); } &&
13606          { ac_try='test -s conftest.$ac_objext'
13607   { (eval echo "$as_me:13607: \"$ac_try\"") >&5
13608   (eval $ac_try) 2>&5
13609   ac_status=$?
13610   echo "$as_me:13610: \$? = $ac_status" >&5
13611   (exit $ac_status); }; }; then
13612   ac_cv_c_inline=$ac_kw; break
13613 else
13614   echo "$as_me: failed program was:" >&5
13615 cat conftest.$ac_ext >&5
13616 fi
13617 rm -f conftest.$ac_objext conftest.$ac_ext
13618 done
13619
13620 fi
13621 echo "$as_me:13621: result: $ac_cv_c_inline" >&5
13622 echo "${ECHO_T}$ac_cv_c_inline" >&6
13623 case $ac_cv_c_inline in
13624   inline | yes) ;;
13625   no)
13626 cat >>confdefs.h <<\EOF
13627 #define inline
13628 EOF
13629  ;;
13630   *)  cat >>confdefs.h <<EOF
13631 #define inline $ac_cv_c_inline
13632 EOF
13633  ;;
13634 esac
13635
13636 NCURSES_INLINE=
13637 if test "$ac_cv_c_inline" != no ; then
13638   NCURSES_INLINE=inline
13639   if test "$INTEL_COMPILER" = yes
13640   then
13641     :
13642   elif test "$GCC" = yes
13643   then
13644     echo "$as_me:13644: checking if $CC supports options to tune inlining" >&5
13645 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
13646 if test "${cf_cv_gcc_inline+set}" = set; then
13647   echo $ECHO_N "(cached) $ECHO_C" >&6
13648 else
13649
13650       cf_save_CFLAGS=$CFLAGS
13651       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
13652       cat >conftest.$ac_ext <<_ACEOF
13653 #line 13653 "configure"
13654 #include "confdefs.h"
13655 inline int foo(void) { return 1; }
13656 int
13657 main ()
13658 {
13659 ${cf_cv_main_return:-return} foo()
13660   ;
13661   return 0;
13662 }
13663 _ACEOF
13664 rm -f conftest.$ac_objext
13665 if { (eval echo "$as_me:13665: \"$ac_compile\"") >&5
13666   (eval $ac_compile) 2>&5
13667   ac_status=$?
13668   echo "$as_me:13668: \$? = $ac_status" >&5
13669   (exit $ac_status); } &&
13670          { ac_try='test -s conftest.$ac_objext'
13671   { (eval echo "$as_me:13671: \"$ac_try\"") >&5
13672   (eval $ac_try) 2>&5
13673   ac_status=$?
13674   echo "$as_me:13674: \$? = $ac_status" >&5
13675   (exit $ac_status); }; }; then
13676   cf_cv_gcc_inline=yes
13677 else
13678   echo "$as_me: failed program was:" >&5
13679 cat conftest.$ac_ext >&5
13680 cf_cv_gcc_inline=no
13681 fi
13682 rm -f conftest.$ac_objext conftest.$ac_ext
13683       CFLAGS=$cf_save_CFLAGS
13684
13685 fi
13686 echo "$as_me:13686: result: $cf_cv_gcc_inline" >&5
13687 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
13688     if test "$cf_cv_gcc_inline" = yes ; then
13689
13690 cf_fix_cppflags=no
13691 cf_new_cflags=
13692 cf_new_cppflags=
13693 cf_new_extra_cppflags=
13694
13695 for cf_add_cflags in --param max-inline-insns-single=1200
13696 do
13697 case $cf_fix_cppflags in
13698 no)
13699         case $cf_add_cflags in #(vi
13700         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13701                 case $cf_add_cflags in
13702                 -D*)
13703                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13704
13705                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13706                                 && test -z "${cf_tst_cflags}" \
13707                                 && cf_fix_cppflags=yes
13708
13709                         if test $cf_fix_cppflags = yes ; then
13710                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13711                                 continue
13712                         elif test "${cf_tst_cflags}" = "\"'" ; then
13713                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13714                                 continue
13715                         fi
13716                         ;;
13717                 esac
13718                 case "$CPPFLAGS" in
13719                 *$cf_add_cflags) #(vi
13720                         ;;
13721                 *) #(vi
13722                         case $cf_add_cflags in #(vi
13723                         -D*)
13724                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13725
13726 CPPFLAGS=`echo "$CPPFLAGS" | \
13727         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13728                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13729
13730                                 ;;
13731                         esac
13732                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13733                         ;;
13734                 esac
13735                 ;;
13736         *)
13737                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13738                 ;;
13739         esac
13740         ;;
13741 yes)
13742         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13743
13744         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13745
13746         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13747                 && test -z "${cf_tst_cflags}" \
13748                 && cf_fix_cppflags=no
13749         ;;
13750 esac
13751 done
13752
13753 if test -n "$cf_new_cflags" ; then
13754
13755         CFLAGS="$CFLAGS $cf_new_cflags"
13756 fi
13757
13758 if test -n "$cf_new_cppflags" ; then
13759
13760         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13761 fi
13762
13763 if test -n "$cf_new_extra_cppflags" ; then
13764
13765         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13766 fi
13767
13768     fi
13769   fi
13770 fi
13771
13772 echo "$as_me:13772: checking for signal global datatype" >&5
13773 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
13774 if test "${cf_cv_sig_atomic_t+set}" = set; then
13775   echo $ECHO_N "(cached) $ECHO_C" >&6
13776 else
13777
13778         for cf_type in \
13779                 "volatile sig_atomic_t" \
13780                 "sig_atomic_t" \
13781                 "int"
13782         do
13783         cat >conftest.$ac_ext <<_ACEOF
13784 #line 13784 "configure"
13785 #include "confdefs.h"
13786
13787 #include <sys/types.h>
13788 #include <signal.h>
13789 #include <stdio.h>
13790
13791 extern $cf_type x;
13792 $cf_type x;
13793 static void handler(int sig)
13794 {
13795         x = 5;
13796 }
13797 int
13798 main ()
13799 {
13800 signal(SIGINT, handler);
13801                  x = 1
13802   ;
13803   return 0;
13804 }
13805 _ACEOF
13806 rm -f conftest.$ac_objext
13807 if { (eval echo "$as_me:13807: \"$ac_compile\"") >&5
13808   (eval $ac_compile) 2>&5
13809   ac_status=$?
13810   echo "$as_me:13810: \$? = $ac_status" >&5
13811   (exit $ac_status); } &&
13812          { ac_try='test -s conftest.$ac_objext'
13813   { (eval echo "$as_me:13813: \"$ac_try\"") >&5
13814   (eval $ac_try) 2>&5
13815   ac_status=$?
13816   echo "$as_me:13816: \$? = $ac_status" >&5
13817   (exit $ac_status); }; }; then
13818   cf_cv_sig_atomic_t=$cf_type
13819 else
13820   echo "$as_me: failed program was:" >&5
13821 cat conftest.$ac_ext >&5
13822 cf_cv_sig_atomic_t=no
13823 fi
13824 rm -f conftest.$ac_objext conftest.$ac_ext
13825                 test "$cf_cv_sig_atomic_t" != no && break
13826         done
13827
13828 fi
13829
13830 echo "$as_me:13830: result: $cf_cv_sig_atomic_t" >&5
13831 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
13832 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
13833 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
13834 EOF
13835
13836 if test $NCURSES_CHTYPE = auto ; then
13837
13838 echo "$as_me:13838: checking for type of chtype" >&5
13839 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13840 if test "${cf_cv_typeof_chtype+set}" = set; then
13841   echo $ECHO_N "(cached) $ECHO_C" >&6
13842 else
13843
13844                 if test "$cross_compiling" = yes; then
13845   cf_cv_typeof_chtype=long
13846 else
13847   cat >conftest.$ac_ext <<_ACEOF
13848 #line 13848 "configure"
13849 #include "confdefs.h"
13850
13851 #define WANT_BITS 31
13852 #include <stdio.h>
13853 int main()
13854 {
13855         FILE *fp = fopen("cf_test.out", "w");
13856         if (fp != 0) {
13857                 char *result = "long";
13858                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
13859                         int n;
13860                         unsigned int x, y;
13861                         for (n = 0; n < WANT_BITS; n++) {
13862                                 x = (1 << n);
13863                                 y = (x >> n);
13864                                 if (y != 1 || x == 0) {
13865                                         x = 0;
13866                                         break;
13867                                 }
13868                         }
13869                         /*
13870                          * If x is nonzero, an int is big enough for the bits
13871                          * that we want.
13872                          */
13873                         result = (x != 0) ? "int" : "long";
13874                 }
13875                 fputs(result, fp);
13876                 fclose(fp);
13877         }
13878         ${cf_cv_main_return:-return}(0);
13879 }
13880
13881 _ACEOF
13882 rm -f conftest$ac_exeext
13883 if { (eval echo "$as_me:13883: \"$ac_link\"") >&5
13884   (eval $ac_link) 2>&5
13885   ac_status=$?
13886   echo "$as_me:13886: \$? = $ac_status" >&5
13887   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13888   { (eval echo "$as_me:13888: \"$ac_try\"") >&5
13889   (eval $ac_try) 2>&5
13890   ac_status=$?
13891   echo "$as_me:13891: \$? = $ac_status" >&5
13892   (exit $ac_status); }; }; then
13893   cf_cv_typeof_chtype=`cat cf_test.out`
13894 else
13895   echo "$as_me: program exited with status $ac_status" >&5
13896 echo "$as_me: failed program was:" >&5
13897 cat conftest.$ac_ext >&5
13898 cf_cv_typeof_chtype=long
13899 fi
13900 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13901 fi
13902                 rm -f cf_test.out
13903
13904 fi
13905
13906 echo "$as_me:13906: result: $cf_cv_typeof_chtype" >&5
13907 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
13908
13909 cat >>confdefs.h <<EOF
13910 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
13911 EOF
13912
13913 else
13914         cf_cv_typeof_chtype=$NCURSES_CHTYPE
13915 fi
13916 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
13917
13918 echo "$as_me:13918: checking if unsigned literals are legal" >&5
13919 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
13920 if test "${cf_cv_unsigned_literals+set}" = set; then
13921   echo $ECHO_N "(cached) $ECHO_C" >&6
13922 else
13923
13924         cat >conftest.$ac_ext <<_ACEOF
13925 #line 13925 "configure"
13926 #include "confdefs.h"
13927
13928 int
13929 main ()
13930 {
13931 long x = 1L + 1UL + 1U + 1
13932   ;
13933   return 0;
13934 }
13935 _ACEOF
13936 rm -f conftest.$ac_objext
13937 if { (eval echo "$as_me:13937: \"$ac_compile\"") >&5
13938   (eval $ac_compile) 2>&5
13939   ac_status=$?
13940   echo "$as_me:13940: \$? = $ac_status" >&5
13941   (exit $ac_status); } &&
13942          { ac_try='test -s conftest.$ac_objext'
13943   { (eval echo "$as_me:13943: \"$ac_try\"") >&5
13944   (eval $ac_try) 2>&5
13945   ac_status=$?
13946   echo "$as_me:13946: \$? = $ac_status" >&5
13947   (exit $ac_status); }; }; then
13948   cf_cv_unsigned_literals=yes
13949 else
13950   echo "$as_me: failed program was:" >&5
13951 cat conftest.$ac_ext >&5
13952 cf_cv_unsigned_literals=no
13953 fi
13954 rm -f conftest.$ac_objext conftest.$ac_ext
13955
13956 fi
13957
13958 echo "$as_me:13958: result: $cf_cv_unsigned_literals" >&5
13959 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
13960
13961 cf_cv_1UL="1"
13962 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
13963 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
13964
13965 if test $NCURSES_MMASK_T = auto ; then
13966         cf_cv_typeof_mmask_t=long
13967 else
13968         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
13969 fi
13970 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
13971
13972 ###     Checks for external-data
13973
13974 echo "$as_me:13974: checking if external errno is declared" >&5
13975 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
13976 if test "${cf_cv_dcl_errno+set}" = set; then
13977   echo $ECHO_N "(cached) $ECHO_C" >&6
13978 else
13979
13980     cat >conftest.$ac_ext <<_ACEOF
13981 #line 13981 "configure"
13982 #include "confdefs.h"
13983
13984 #ifdef HAVE_STDLIB_H
13985 #include <stdlib.h>
13986 #endif
13987 #include <stdio.h>
13988 #include <sys/types.h>
13989 #include <errno.h>
13990 int
13991 main ()
13992 {
13993 int x = (int) errno
13994   ;
13995   return 0;
13996 }
13997 _ACEOF
13998 rm -f conftest.$ac_objext
13999 if { (eval echo "$as_me:13999: \"$ac_compile\"") >&5
14000   (eval $ac_compile) 2>&5
14001   ac_status=$?
14002   echo "$as_me:14002: \$? = $ac_status" >&5
14003   (exit $ac_status); } &&
14004          { ac_try='test -s conftest.$ac_objext'
14005   { (eval echo "$as_me:14005: \"$ac_try\"") >&5
14006   (eval $ac_try) 2>&5
14007   ac_status=$?
14008   echo "$as_me:14008: \$? = $ac_status" >&5
14009   (exit $ac_status); }; }; then
14010   cf_cv_dcl_errno=yes
14011 else
14012   echo "$as_me: failed program was:" >&5
14013 cat conftest.$ac_ext >&5
14014 cf_cv_dcl_errno=no
14015 fi
14016 rm -f conftest.$ac_objext conftest.$ac_ext
14017
14018 fi
14019 echo "$as_me:14019: result: $cf_cv_dcl_errno" >&5
14020 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
14021
14022 if test "$cf_cv_dcl_errno" = no ; then
14023
14024 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14025
14026     cat >>confdefs.h <<EOF
14027 #define $cf_result 1
14028 EOF
14029
14030 fi
14031
14032 # It's possible (for near-UNIX clones) that the data doesn't exist
14033
14034 echo "$as_me:14034: checking if external errno exists" >&5
14035 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
14036 if test "${cf_cv_have_errno+set}" = set; then
14037   echo $ECHO_N "(cached) $ECHO_C" >&6
14038 else
14039
14040     cat >conftest.$ac_ext <<_ACEOF
14041 #line 14041 "configure"
14042 #include "confdefs.h"
14043
14044 #undef errno
14045 extern int errno;
14046
14047 int
14048 main ()
14049 {
14050 errno = 2
14051   ;
14052   return 0;
14053 }
14054 _ACEOF
14055 rm -f conftest.$ac_objext conftest$ac_exeext
14056 if { (eval echo "$as_me:14056: \"$ac_link\"") >&5
14057   (eval $ac_link) 2>&5
14058   ac_status=$?
14059   echo "$as_me:14059: \$? = $ac_status" >&5
14060   (exit $ac_status); } &&
14061          { ac_try='test -s conftest$ac_exeext'
14062   { (eval echo "$as_me:14062: \"$ac_try\"") >&5
14063   (eval $ac_try) 2>&5
14064   ac_status=$?
14065   echo "$as_me:14065: \$? = $ac_status" >&5
14066   (exit $ac_status); }; }; then
14067   cf_cv_have_errno=yes
14068 else
14069   echo "$as_me: failed program was:" >&5
14070 cat conftest.$ac_ext >&5
14071 cf_cv_have_errno=no
14072 fi
14073 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14074
14075 fi
14076 echo "$as_me:14076: result: $cf_cv_have_errno" >&5
14077 echo "${ECHO_T}$cf_cv_have_errno" >&6
14078
14079 if test "$cf_cv_have_errno" = yes ; then
14080
14081 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14082
14083     cat >>confdefs.h <<EOF
14084 #define $cf_result 1
14085 EOF
14086
14087 fi
14088
14089 echo "$as_me:14089: checking if data-only library module links" >&5
14090 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
14091 if test "${cf_cv_link_dataonly+set}" = set; then
14092   echo $ECHO_N "(cached) $ECHO_C" >&6
14093 else
14094
14095         rm -f conftest.a
14096         cat >conftest.$ac_ext <<EOF
14097 #line 14097 "configure"
14098 int     testdata[3] = { 123, 456, 789 };
14099 EOF
14100         if { (eval echo "$as_me:14100: \"$ac_compile\"") >&5
14101   (eval $ac_compile) 2>&5
14102   ac_status=$?
14103   echo "$as_me:14103: \$? = $ac_status" >&5
14104   (exit $ac_status); } ; then
14105                 mv conftest.o data.o && \
14106                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
14107         fi
14108         rm -f conftest.$ac_ext data.o
14109         cat >conftest.$ac_ext <<EOF
14110 #line 14110 "configure"
14111 int     testfunc()
14112 {
14113 #if defined(NeXT)
14114         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
14115 #else
14116         extern int testdata[3];
14117         return testdata[0] == 123
14118            &&  testdata[1] == 456
14119            &&  testdata[2] == 789;
14120 #endif
14121 }
14122 EOF
14123         if { (eval echo "$as_me:14123: \"$ac_compile\"") >&5
14124   (eval $ac_compile) 2>&5
14125   ac_status=$?
14126   echo "$as_me:14126: \$? = $ac_status" >&5
14127   (exit $ac_status); }; then
14128                 mv conftest.o func.o && \
14129                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
14130         fi
14131         rm -f conftest.$ac_ext func.o
14132         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
14133         cf_saveLIBS="$LIBS"
14134         LIBS="conftest.a $LIBS"
14135         if test "$cross_compiling" = yes; then
14136   cf_cv_link_dataonly=unknown
14137 else
14138   cat >conftest.$ac_ext <<_ACEOF
14139 #line 14139 "configure"
14140 #include "confdefs.h"
14141
14142         int main()
14143         {
14144                 extern int testfunc();
14145                 ${cf_cv_main_return:-return} (!testfunc());
14146         }
14147
14148 _ACEOF
14149 rm -f conftest$ac_exeext
14150 if { (eval echo "$as_me:14150: \"$ac_link\"") >&5
14151   (eval $ac_link) 2>&5
14152   ac_status=$?
14153   echo "$as_me:14153: \$? = $ac_status" >&5
14154   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14155   { (eval echo "$as_me:14155: \"$ac_try\"") >&5
14156   (eval $ac_try) 2>&5
14157   ac_status=$?
14158   echo "$as_me:14158: \$? = $ac_status" >&5
14159   (exit $ac_status); }; }; then
14160   cf_cv_link_dataonly=yes
14161 else
14162   echo "$as_me: program exited with status $ac_status" >&5
14163 echo "$as_me: failed program was:" >&5
14164 cat conftest.$ac_ext >&5
14165 cf_cv_link_dataonly=no
14166 fi
14167 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14168 fi
14169         LIBS="$cf_saveLIBS"
14170
14171 fi
14172
14173 echo "$as_me:14173: result: $cf_cv_link_dataonly" >&5
14174 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
14175
14176 if test "$cf_cv_link_dataonly" = no ; then
14177         cat >>confdefs.h <<\EOF
14178 #define BROKEN_LINKER 1
14179 EOF
14180
14181         BROKEN_LINKER=1
14182 fi
14183
14184 ###     Checks for library functions.
14185
14186 for ac_func in \
14187 getcwd \
14188 getegid \
14189 geteuid \
14190 getttynam \
14191 issetugid \
14192 poll \
14193 remove \
14194 select \
14195 setbuf \
14196 setbuffer \
14197 setvbuf \
14198 sigaction \
14199 sigvec \
14200 strdup \
14201 strstr \
14202 tcgetpgrp \
14203 times \
14204 vsnprintf \
14205
14206 do
14207 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14208 echo "$as_me:14208: checking for $ac_func" >&5
14209 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14210 if eval "test \"\${$as_ac_var+set}\" = set"; then
14211   echo $ECHO_N "(cached) $ECHO_C" >&6
14212 else
14213   cat >conftest.$ac_ext <<_ACEOF
14214 #line 14214 "configure"
14215 #include "confdefs.h"
14216 /* System header to define __stub macros and hopefully few prototypes,
14217     which can conflict with char $ac_func (); below.  */
14218 #include <assert.h>
14219 /* Override any gcc2 internal prototype to avoid an error.  */
14220 #ifdef __cplusplus
14221 extern "C"
14222 #endif
14223 /* We use char because int might match the return type of a gcc2
14224    builtin and then its argument prototype would still apply.  */
14225 char $ac_func ();
14226 char (*f) ();
14227
14228 int
14229 main ()
14230 {
14231 /* The GNU C library defines this for functions which it implements
14232     to always fail with ENOSYS.  Some functions are actually named
14233     something starting with __ and the normal name is an alias.  */
14234 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14235 choke me
14236 #else
14237 f = $ac_func;
14238 #endif
14239
14240   ;
14241   return 0;
14242 }
14243 _ACEOF
14244 rm -f conftest.$ac_objext conftest$ac_exeext
14245 if { (eval echo "$as_me:14245: \"$ac_link\"") >&5
14246   (eval $ac_link) 2>&5
14247   ac_status=$?
14248   echo "$as_me:14248: \$? = $ac_status" >&5
14249   (exit $ac_status); } &&
14250          { ac_try='test -s conftest$ac_exeext'
14251   { (eval echo "$as_me:14251: \"$ac_try\"") >&5
14252   (eval $ac_try) 2>&5
14253   ac_status=$?
14254   echo "$as_me:14254: \$? = $ac_status" >&5
14255   (exit $ac_status); }; }; then
14256   eval "$as_ac_var=yes"
14257 else
14258   echo "$as_me: failed program was:" >&5
14259 cat conftest.$ac_ext >&5
14260 eval "$as_ac_var=no"
14261 fi
14262 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14263 fi
14264 echo "$as_me:14264: result: `eval echo '${'$as_ac_var'}'`" >&5
14265 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14266 if test `eval echo '${'$as_ac_var'}'` = yes; then
14267   cat >>confdefs.h <<EOF
14268 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14269 EOF
14270
14271 fi
14272 done
14273
14274 if test "$with_getcap" = "yes" ; then
14275
14276 echo "$as_me:14276: checking for terminal-capability database functions" >&5
14277 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
14278 if test "${cf_cv_cgetent+set}" = set; then
14279   echo $ECHO_N "(cached) $ECHO_C" >&6
14280 else
14281
14282 cat >conftest.$ac_ext <<_ACEOF
14283 #line 14283 "configure"
14284 #include "confdefs.h"
14285
14286 #include <stdlib.h>
14287 int
14288 main ()
14289 {
14290
14291         char temp[128];
14292         char *buf = temp;
14293         char *db_array = temp;
14294         cgetent(&buf, /* int *, */ &db_array, "vt100");
14295         cgetcap(buf, "tc", '=');
14296         cgetmatch(buf, "tc");
14297
14298   ;
14299   return 0;
14300 }
14301 _ACEOF
14302 rm -f conftest.$ac_objext conftest$ac_exeext
14303 if { (eval echo "$as_me:14303: \"$ac_link\"") >&5
14304   (eval $ac_link) 2>&5
14305   ac_status=$?
14306   echo "$as_me:14306: \$? = $ac_status" >&5
14307   (exit $ac_status); } &&
14308          { ac_try='test -s conftest$ac_exeext'
14309   { (eval echo "$as_me:14309: \"$ac_try\"") >&5
14310   (eval $ac_try) 2>&5
14311   ac_status=$?
14312   echo "$as_me:14312: \$? = $ac_status" >&5
14313   (exit $ac_status); }; }; then
14314   cf_cv_cgetent=yes
14315 else
14316   echo "$as_me: failed program was:" >&5
14317 cat conftest.$ac_ext >&5
14318 cf_cv_cgetent=no
14319 fi
14320 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14321
14322 fi
14323
14324 echo "$as_me:14324: result: $cf_cv_cgetent" >&5
14325 echo "${ECHO_T}$cf_cv_cgetent" >&6
14326 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
14327 #define HAVE_BSD_CGETENT 1
14328 EOF
14329
14330 fi
14331
14332 echo "$as_me:14332: checking for isascii" >&5
14333 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
14334 if test "${cf_cv_have_isascii+set}" = set; then
14335   echo $ECHO_N "(cached) $ECHO_C" >&6
14336 else
14337
14338         cat >conftest.$ac_ext <<_ACEOF
14339 #line 14339 "configure"
14340 #include "confdefs.h"
14341 #include <ctype.h>
14342 int
14343 main ()
14344 {
14345 int x = isascii(' ')
14346   ;
14347   return 0;
14348 }
14349 _ACEOF
14350 rm -f conftest.$ac_objext conftest$ac_exeext
14351 if { (eval echo "$as_me:14351: \"$ac_link\"") >&5
14352   (eval $ac_link) 2>&5
14353   ac_status=$?
14354   echo "$as_me:14354: \$? = $ac_status" >&5
14355   (exit $ac_status); } &&
14356          { ac_try='test -s conftest$ac_exeext'
14357   { (eval echo "$as_me:14357: \"$ac_try\"") >&5
14358   (eval $ac_try) 2>&5
14359   ac_status=$?
14360   echo "$as_me:14360: \$? = $ac_status" >&5
14361   (exit $ac_status); }; }; then
14362   cf_cv_have_isascii=yes
14363 else
14364   echo "$as_me: failed program was:" >&5
14365 cat conftest.$ac_ext >&5
14366 cf_cv_have_isascii=no
14367 fi
14368 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14369
14370 fi
14371 echo "$as_me:14371: result: $cf_cv_have_isascii" >&5
14372 echo "${ECHO_T}$cf_cv_have_isascii" >&6
14373 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
14374 #define HAVE_ISASCII 1
14375 EOF
14376
14377 if test "$ac_cv_func_sigaction" = yes; then
14378 echo "$as_me:14378: checking whether sigaction needs _POSIX_SOURCE" >&5
14379 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
14380 cat >conftest.$ac_ext <<_ACEOF
14381 #line 14381 "configure"
14382 #include "confdefs.h"
14383
14384 #include <sys/types.h>
14385 #include <signal.h>
14386 int
14387 main ()
14388 {
14389 struct sigaction act
14390   ;
14391   return 0;
14392 }
14393 _ACEOF
14394 rm -f conftest.$ac_objext
14395 if { (eval echo "$as_me:14395: \"$ac_compile\"") >&5
14396   (eval $ac_compile) 2>&5
14397   ac_status=$?
14398   echo "$as_me:14398: \$? = $ac_status" >&5
14399   (exit $ac_status); } &&
14400          { ac_try='test -s conftest.$ac_objext'
14401   { (eval echo "$as_me:14401: \"$ac_try\"") >&5
14402   (eval $ac_try) 2>&5
14403   ac_status=$?
14404   echo "$as_me:14404: \$? = $ac_status" >&5
14405   (exit $ac_status); }; }; then
14406   sigact_bad=no
14407 else
14408   echo "$as_me: failed program was:" >&5
14409 cat conftest.$ac_ext >&5
14410
14411 cat >conftest.$ac_ext <<_ACEOF
14412 #line 14412 "configure"
14413 #include "confdefs.h"
14414
14415 #define _POSIX_SOURCE
14416 #include <sys/types.h>
14417 #include <signal.h>
14418 int
14419 main ()
14420 {
14421 struct sigaction act
14422   ;
14423   return 0;
14424 }
14425 _ACEOF
14426 rm -f conftest.$ac_objext
14427 if { (eval echo "$as_me:14427: \"$ac_compile\"") >&5
14428   (eval $ac_compile) 2>&5
14429   ac_status=$?
14430   echo "$as_me:14430: \$? = $ac_status" >&5
14431   (exit $ac_status); } &&
14432          { ac_try='test -s conftest.$ac_objext'
14433   { (eval echo "$as_me:14433: \"$ac_try\"") >&5
14434   (eval $ac_try) 2>&5
14435   ac_status=$?
14436   echo "$as_me:14436: \$? = $ac_status" >&5
14437   (exit $ac_status); }; }; then
14438   sigact_bad=yes
14439          cat >>confdefs.h <<\EOF
14440 #define SVR4_ACTION 1
14441 EOF
14442
14443 else
14444   echo "$as_me: failed program was:" >&5
14445 cat conftest.$ac_ext >&5
14446 sigact_bad=unknown
14447 fi
14448 rm -f conftest.$ac_objext conftest.$ac_ext
14449 fi
14450 rm -f conftest.$ac_objext conftest.$ac_ext
14451 echo "$as_me:14451: result: $sigact_bad" >&5
14452 echo "${ECHO_T}$sigact_bad" >&6
14453 fi
14454
14455 echo "$as_me:14455: checking if nanosleep really works" >&5
14456 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
14457 if test "${cf_cv_func_nanosleep+set}" = set; then
14458   echo $ECHO_N "(cached) $ECHO_C" >&6
14459 else
14460
14461 if test "$cross_compiling" = yes; then
14462   cf_cv_func_nanosleep=unknown
14463 else
14464   cat >conftest.$ac_ext <<_ACEOF
14465 #line 14465 "configure"
14466 #include "confdefs.h"
14467
14468 #include <stdio.h>
14469 #include <errno.h>
14470 #include <time.h>
14471
14472 #ifdef HAVE_SYS_TIME_H
14473 #include <sys/time.h>
14474 #endif
14475
14476 int main() {
14477         struct timespec ts1, ts2;
14478         int code;
14479         ts1.tv_sec  = 0;
14480         ts1.tv_nsec = 750000000;
14481         ts2.tv_sec  = 0;
14482         ts2.tv_nsec = 0;
14483         errno = 0;
14484         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
14485         ${cf_cv_main_return:-return}(code != 0);
14486 }
14487
14488 _ACEOF
14489 rm -f conftest$ac_exeext
14490 if { (eval echo "$as_me:14490: \"$ac_link\"") >&5
14491   (eval $ac_link) 2>&5
14492   ac_status=$?
14493   echo "$as_me:14493: \$? = $ac_status" >&5
14494   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14495   { (eval echo "$as_me:14495: \"$ac_try\"") >&5
14496   (eval $ac_try) 2>&5
14497   ac_status=$?
14498   echo "$as_me:14498: \$? = $ac_status" >&5
14499   (exit $ac_status); }; }; then
14500   cf_cv_func_nanosleep=yes
14501 else
14502   echo "$as_me: program exited with status $ac_status" >&5
14503 echo "$as_me: failed program was:" >&5
14504 cat conftest.$ac_ext >&5
14505 cf_cv_func_nanosleep=no
14506 fi
14507 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14508 fi
14509 fi
14510 echo "$as_me:14510: result: $cf_cv_func_nanosleep" >&5
14511 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
14512
14513 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
14514 #define HAVE_NANOSLEEP 1
14515 EOF
14516
14517 for ac_header in \
14518 termio.h \
14519 termios.h \
14520 unistd.h \
14521
14522 do
14523 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14524 echo "$as_me:14524: checking for $ac_header" >&5
14525 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14526 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14527   echo $ECHO_N "(cached) $ECHO_C" >&6
14528 else
14529   cat >conftest.$ac_ext <<_ACEOF
14530 #line 14530 "configure"
14531 #include "confdefs.h"
14532 #include <$ac_header>
14533 _ACEOF
14534 if { (eval echo "$as_me:14534: \"$ac_cpp conftest.$ac_ext\"") >&5
14535   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14536   ac_status=$?
14537   egrep -v '^ *\+' conftest.er1 >conftest.err
14538   rm -f conftest.er1
14539   cat conftest.err >&5
14540   echo "$as_me:14540: \$? = $ac_status" >&5
14541   (exit $ac_status); } >/dev/null; then
14542   if test -s conftest.err; then
14543     ac_cpp_err=$ac_c_preproc_warn_flag
14544   else
14545     ac_cpp_err=
14546   fi
14547 else
14548   ac_cpp_err=yes
14549 fi
14550 if test -z "$ac_cpp_err"; then
14551   eval "$as_ac_Header=yes"
14552 else
14553   echo "$as_me: failed program was:" >&5
14554   cat conftest.$ac_ext >&5
14555   eval "$as_ac_Header=no"
14556 fi
14557 rm -f conftest.err conftest.$ac_ext
14558 fi
14559 echo "$as_me:14559: result: `eval echo '${'$as_ac_Header'}'`" >&5
14560 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14561 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14562   cat >>confdefs.h <<EOF
14563 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14564 EOF
14565
14566 fi
14567 done
14568
14569 if test "$ISC" = yes ; then
14570
14571 for ac_header in sys/termio.h
14572 do
14573 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14574 echo "$as_me:14574: checking for $ac_header" >&5
14575 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14576 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14577   echo $ECHO_N "(cached) $ECHO_C" >&6
14578 else
14579   cat >conftest.$ac_ext <<_ACEOF
14580 #line 14580 "configure"
14581 #include "confdefs.h"
14582 #include <$ac_header>
14583 _ACEOF
14584 if { (eval echo "$as_me:14584: \"$ac_cpp conftest.$ac_ext\"") >&5
14585   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14586   ac_status=$?
14587   egrep -v '^ *\+' conftest.er1 >conftest.err
14588   rm -f conftest.er1
14589   cat conftest.err >&5
14590   echo "$as_me:14590: \$? = $ac_status" >&5
14591   (exit $ac_status); } >/dev/null; then
14592   if test -s conftest.err; then
14593     ac_cpp_err=$ac_c_preproc_warn_flag
14594   else
14595     ac_cpp_err=
14596   fi
14597 else
14598   ac_cpp_err=yes
14599 fi
14600 if test -z "$ac_cpp_err"; then
14601   eval "$as_ac_Header=yes"
14602 else
14603   echo "$as_me: failed program was:" >&5
14604   cat conftest.$ac_ext >&5
14605   eval "$as_ac_Header=no"
14606 fi
14607 rm -f conftest.err conftest.$ac_ext
14608 fi
14609 echo "$as_me:14609: result: `eval echo '${'$as_ac_Header'}'`" >&5
14610 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14611 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14612   cat >>confdefs.h <<EOF
14613 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14614 EOF
14615
14616 fi
14617 done
14618
14619 fi
14620 if test "$ac_cv_header_termios_h" = yes ; then
14621         case "$CFLAGS $CPPFLAGS" in
14622         *-D_POSIX_SOURCE*)
14623                 termios_bad=dunno ;;
14624         *)      termios_bad=maybe ;;
14625         esac
14626         if test "$termios_bad" = maybe ; then
14627         echo "$as_me:14627: checking whether termios.h needs _POSIX_SOURCE" >&5
14628 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
14629         cat >conftest.$ac_ext <<_ACEOF
14630 #line 14630 "configure"
14631 #include "confdefs.h"
14632 #include <termios.h>
14633 int
14634 main ()
14635 {
14636 struct termios foo; int x = foo.c_iflag
14637   ;
14638   return 0;
14639 }
14640 _ACEOF
14641 rm -f conftest.$ac_objext
14642 if { (eval echo "$as_me:14642: \"$ac_compile\"") >&5
14643   (eval $ac_compile) 2>&5
14644   ac_status=$?
14645   echo "$as_me:14645: \$? = $ac_status" >&5
14646   (exit $ac_status); } &&
14647          { ac_try='test -s conftest.$ac_objext'
14648   { (eval echo "$as_me:14648: \"$ac_try\"") >&5
14649   (eval $ac_try) 2>&5
14650   ac_status=$?
14651   echo "$as_me:14651: \$? = $ac_status" >&5
14652   (exit $ac_status); }; }; then
14653   termios_bad=no
14654 else
14655   echo "$as_me: failed program was:" >&5
14656 cat conftest.$ac_ext >&5
14657
14658                 cat >conftest.$ac_ext <<_ACEOF
14659 #line 14659 "configure"
14660 #include "confdefs.h"
14661
14662 #define _POSIX_SOURCE
14663 #include <termios.h>
14664 int
14665 main ()
14666 {
14667 struct termios foo; int x = foo.c_iflag
14668   ;
14669   return 0;
14670 }
14671 _ACEOF
14672 rm -f conftest.$ac_objext
14673 if { (eval echo "$as_me:14673: \"$ac_compile\"") >&5
14674   (eval $ac_compile) 2>&5
14675   ac_status=$?
14676   echo "$as_me:14676: \$? = $ac_status" >&5
14677   (exit $ac_status); } &&
14678          { ac_try='test -s conftest.$ac_objext'
14679   { (eval echo "$as_me:14679: \"$ac_try\"") >&5
14680   (eval $ac_try) 2>&5
14681   ac_status=$?
14682   echo "$as_me:14682: \$? = $ac_status" >&5
14683   (exit $ac_status); }; }; then
14684   termios_bad=unknown
14685 else
14686   echo "$as_me: failed program was:" >&5
14687 cat conftest.$ac_ext >&5
14688 termios_bad=yes cat >>confdefs.h <<\EOF
14689 #define SVR4_TERMIO 1
14690 EOF
14691
14692 fi
14693 rm -f conftest.$ac_objext conftest.$ac_ext
14694
14695 fi
14696 rm -f conftest.$ac_objext conftest.$ac_ext
14697         echo "$as_me:14697: result: $termios_bad" >&5
14698 echo "${ECHO_T}$termios_bad" >&6
14699         fi
14700 fi
14701
14702 echo "$as_me:14702: checking for tcgetattr" >&5
14703 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
14704 if test "${cf_cv_have_tcgetattr+set}" = set; then
14705   echo $ECHO_N "(cached) $ECHO_C" >&6
14706 else
14707
14708 cat >conftest.$ac_ext <<_ACEOF
14709 #line 14709 "configure"
14710 #include "confdefs.h"
14711
14712 #include <sys/types.h>
14713 #ifdef HAVE_UNISTD_H
14714 #include <unistd.h>
14715 #endif
14716 #ifdef HAVE_TERMIOS_H
14717 #include <termios.h>
14718 #define TTY struct termios
14719 #else
14720 #ifdef HAVE_TERMIO_H
14721 #include <termio.h>
14722 #define TTY struct termio
14723 #endif
14724 #endif
14725
14726 int
14727 main ()
14728 {
14729
14730 TTY foo;
14731 tcgetattr(1, &foo);
14732   ;
14733   return 0;
14734 }
14735 _ACEOF
14736 rm -f conftest.$ac_objext conftest$ac_exeext
14737 if { (eval echo "$as_me:14737: \"$ac_link\"") >&5
14738   (eval $ac_link) 2>&5
14739   ac_status=$?
14740   echo "$as_me:14740: \$? = $ac_status" >&5
14741   (exit $ac_status); } &&
14742          { ac_try='test -s conftest$ac_exeext'
14743   { (eval echo "$as_me:14743: \"$ac_try\"") >&5
14744   (eval $ac_try) 2>&5
14745   ac_status=$?
14746   echo "$as_me:14746: \$? = $ac_status" >&5
14747   (exit $ac_status); }; }; then
14748   cf_cv_have_tcgetattr=yes
14749 else
14750   echo "$as_me: failed program was:" >&5
14751 cat conftest.$ac_ext >&5
14752 cf_cv_have_tcgetattr=no
14753 fi
14754 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14755 fi
14756 echo "$as_me:14756: result: $cf_cv_have_tcgetattr" >&5
14757 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
14758 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
14759 #define HAVE_TCGETATTR 1
14760 EOF
14761
14762 echo "$as_me:14762: checking for vsscanf function or workaround" >&5
14763 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
14764 if test "${cf_cv_func_vsscanf+set}" = set; then
14765   echo $ECHO_N "(cached) $ECHO_C" >&6
14766 else
14767
14768 cat >conftest.$ac_ext <<_ACEOF
14769 #line 14769 "configure"
14770 #include "confdefs.h"
14771
14772 #include <stdarg.h>
14773 #include <stdio.h>
14774 int
14775 main ()
14776 {
14777
14778         va_list ap;
14779         vsscanf("from", "%d", ap)
14780   ;
14781   return 0;
14782 }
14783 _ACEOF
14784 rm -f conftest.$ac_objext conftest$ac_exeext
14785 if { (eval echo "$as_me:14785: \"$ac_link\"") >&5
14786   (eval $ac_link) 2>&5
14787   ac_status=$?
14788   echo "$as_me:14788: \$? = $ac_status" >&5
14789   (exit $ac_status); } &&
14790          { ac_try='test -s conftest$ac_exeext'
14791   { (eval echo "$as_me:14791: \"$ac_try\"") >&5
14792   (eval $ac_try) 2>&5
14793   ac_status=$?
14794   echo "$as_me:14794: \$? = $ac_status" >&5
14795   (exit $ac_status); }; }; then
14796   cf_cv_func_vsscanf=vsscanf
14797 else
14798   echo "$as_me: failed program was:" >&5
14799 cat conftest.$ac_ext >&5
14800
14801 cat >conftest.$ac_ext <<_ACEOF
14802 #line 14802 "configure"
14803 #include "confdefs.h"
14804
14805 #include <stdarg.h>
14806 #include <stdio.h>
14807 int
14808 main ()
14809 {
14810
14811     FILE strbuf;
14812     char *str = "from";
14813
14814     strbuf._flag = _IOREAD;
14815     strbuf._ptr = strbuf._base = (unsigned char *) str;
14816     strbuf._cnt = strlen(str);
14817     strbuf._file = _NFILE;
14818     return (vfscanf(&strbuf, "%d", ap))
14819   ;
14820   return 0;
14821 }
14822 _ACEOF
14823 rm -f conftest.$ac_objext conftest$ac_exeext
14824 if { (eval echo "$as_me:14824: \"$ac_link\"") >&5
14825   (eval $ac_link) 2>&5
14826   ac_status=$?
14827   echo "$as_me:14827: \$? = $ac_status" >&5
14828   (exit $ac_status); } &&
14829          { ac_try='test -s conftest$ac_exeext'
14830   { (eval echo "$as_me:14830: \"$ac_try\"") >&5
14831   (eval $ac_try) 2>&5
14832   ac_status=$?
14833   echo "$as_me:14833: \$? = $ac_status" >&5
14834   (exit $ac_status); }; }; then
14835   cf_cv_func_vsscanf=vfscanf
14836 else
14837   echo "$as_me: failed program was:" >&5
14838 cat conftest.$ac_ext >&5
14839
14840 cat >conftest.$ac_ext <<_ACEOF
14841 #line 14841 "configure"
14842 #include "confdefs.h"
14843
14844 #include <stdarg.h>
14845 #include <stdio.h>
14846 int
14847 main ()
14848 {
14849
14850     FILE strbuf;
14851     char *str = "from";
14852
14853     strbuf._flag = _IOREAD;
14854     strbuf._ptr = strbuf._base = (unsigned char *) str;
14855     strbuf._cnt = strlen(str);
14856     strbuf._file = _NFILE;
14857     return (_doscan(&strbuf, "%d", ap))
14858   ;
14859   return 0;
14860 }
14861 _ACEOF
14862 rm -f conftest.$ac_objext conftest$ac_exeext
14863 if { (eval echo "$as_me:14863: \"$ac_link\"") >&5
14864   (eval $ac_link) 2>&5
14865   ac_status=$?
14866   echo "$as_me:14866: \$? = $ac_status" >&5
14867   (exit $ac_status); } &&
14868          { ac_try='test -s conftest$ac_exeext'
14869   { (eval echo "$as_me:14869: \"$ac_try\"") >&5
14870   (eval $ac_try) 2>&5
14871   ac_status=$?
14872   echo "$as_me:14872: \$? = $ac_status" >&5
14873   (exit $ac_status); }; }; then
14874   cf_cv_func_vsscanf=_doscan
14875 else
14876   echo "$as_me: failed program was:" >&5
14877 cat conftest.$ac_ext >&5
14878
14879 cf_cv_func_vsscanf=no
14880 fi
14881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14882 fi
14883 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14884 fi
14885 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14886 fi
14887 echo "$as_me:14887: result: $cf_cv_func_vsscanf" >&5
14888 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
14889
14890 case $cf_cv_func_vsscanf in #(vi
14891 vsscanf) cat >>confdefs.h <<\EOF
14892 #define HAVE_VSSCANF 1
14893 EOF
14894 ;; #(vi
14895 vfscanf) cat >>confdefs.h <<\EOF
14896 #define HAVE_VFSCANF 1
14897 EOF
14898 ;; #(vi
14899 _doscan) cat >>confdefs.h <<\EOF
14900 #define HAVE__DOSCAN 1
14901 EOF
14902 ;;
14903 esac
14904
14905 echo "$as_me:14905: checking for working mkstemp" >&5
14906 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
14907 if test "${cf_cv_func_mkstemp+set}" = set; then
14908   echo $ECHO_N "(cached) $ECHO_C" >&6
14909 else
14910
14911 rm -f conftest*
14912 if test "$cross_compiling" = yes; then
14913   echo "$as_me:14913: checking for mkstemp" >&5
14914 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
14915 if test "${ac_cv_func_mkstemp+set}" = set; then
14916   echo $ECHO_N "(cached) $ECHO_C" >&6
14917 else
14918   cat >conftest.$ac_ext <<_ACEOF
14919 #line 14919 "configure"
14920 #include "confdefs.h"
14921 /* System header to define __stub macros and hopefully few prototypes,
14922     which can conflict with char mkstemp (); below.  */
14923 #include <assert.h>
14924 /* Override any gcc2 internal prototype to avoid an error.  */
14925 #ifdef __cplusplus
14926 extern "C"
14927 #endif
14928 /* We use char because int might match the return type of a gcc2
14929    builtin and then its argument prototype would still apply.  */
14930 char mkstemp ();
14931 char (*f) ();
14932
14933 int
14934 main ()
14935 {
14936 /* The GNU C library defines this for functions which it implements
14937     to always fail with ENOSYS.  Some functions are actually named
14938     something starting with __ and the normal name is an alias.  */
14939 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
14940 choke me
14941 #else
14942 f = mkstemp;
14943 #endif
14944
14945   ;
14946   return 0;
14947 }
14948 _ACEOF
14949 rm -f conftest.$ac_objext conftest$ac_exeext
14950 if { (eval echo "$as_me:14950: \"$ac_link\"") >&5
14951   (eval $ac_link) 2>&5
14952   ac_status=$?
14953   echo "$as_me:14953: \$? = $ac_status" >&5
14954   (exit $ac_status); } &&
14955          { ac_try='test -s conftest$ac_exeext'
14956   { (eval echo "$as_me:14956: \"$ac_try\"") >&5
14957   (eval $ac_try) 2>&5
14958   ac_status=$?
14959   echo "$as_me:14959: \$? = $ac_status" >&5
14960   (exit $ac_status); }; }; then
14961   ac_cv_func_mkstemp=yes
14962 else
14963   echo "$as_me: failed program was:" >&5
14964 cat conftest.$ac_ext >&5
14965 ac_cv_func_mkstemp=no
14966 fi
14967 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14968 fi
14969 echo "$as_me:14969: result: $ac_cv_func_mkstemp" >&5
14970 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
14971
14972 else
14973   cat >conftest.$ac_ext <<_ACEOF
14974 #line 14974 "configure"
14975 #include "confdefs.h"
14976
14977 #include <sys/types.h>
14978 #include <stdlib.h>
14979 #include <stdio.h>
14980 #include <string.h>
14981 #include <sys/stat.h>
14982 int main()
14983 {
14984         char *tmpl = "conftestXXXXXX";
14985         char name[2][80];
14986         int n;
14987         int result = 0;
14988         int fd;
14989         struct stat sb;
14990
14991         umask(077);
14992         for (n = 0; n < 2; ++n) {
14993                 strcpy(name[n], tmpl);
14994                 if ((fd = mkstemp(name[n])) >= 0) {
14995                         if (!strcmp(name[n], tmpl)
14996                          || stat(name[n], &sb) != 0
14997                          || (sb.st_mode & S_IFMT) != S_IFREG
14998                          || (sb.st_mode & 077) != 0) {
14999                                 result = 1;
15000                         }
15001                         close(fd);
15002                 }
15003         }
15004         if (result == 0
15005          && !strcmp(name[0], name[1]))
15006                 result = 1;
15007         ${cf_cv_main_return:-return}(result);
15008 }
15009
15010 _ACEOF
15011 rm -f conftest$ac_exeext
15012 if { (eval echo "$as_me:15012: \"$ac_link\"") >&5
15013   (eval $ac_link) 2>&5
15014   ac_status=$?
15015   echo "$as_me:15015: \$? = $ac_status" >&5
15016   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15017   { (eval echo "$as_me:15017: \"$ac_try\"") >&5
15018   (eval $ac_try) 2>&5
15019   ac_status=$?
15020   echo "$as_me:15020: \$? = $ac_status" >&5
15021   (exit $ac_status); }; }; then
15022   cf_cv_func_mkstemp=yes
15023
15024 else
15025   echo "$as_me: program exited with status $ac_status" >&5
15026 echo "$as_me: failed program was:" >&5
15027 cat conftest.$ac_ext >&5
15028 cf_cv_func_mkstemp=no
15029
15030 fi
15031 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15032 fi
15033
15034 fi
15035 echo "$as_me:15035: result: $cf_cv_func_mkstemp" >&5
15036 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
15037 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
15038         cat >>confdefs.h <<\EOF
15039 #define HAVE_MKSTEMP 1
15040 EOF
15041
15042 fi
15043
15044 # setup for prototype of fallback for vsscanf()
15045
15046 if test "$cf_cv_func_vsscanf" = vsscanf ; then
15047         HAVE_VSSCANF=1
15048 else
15049         HAVE_VSSCANF=0
15050 fi
15051
15052 if test "$cross_compiling" = yes ; then
15053         { echo "$as_me:15053: WARNING: cross compiling: assume setvbuf params not reversed" >&5
15054 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
15055 else
15056         echo "$as_me:15056: checking whether setvbuf arguments are reversed" >&5
15057 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
15058 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
15059   echo $ECHO_N "(cached) $ECHO_C" >&6
15060 else
15061   if test "$cross_compiling" = yes; then
15062   { { echo "$as_me:15062: error: cannot run test program while cross compiling" >&5
15063 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15064    { (exit 1); exit 1; }; }
15065 else
15066   cat >conftest.$ac_ext <<_ACEOF
15067 #line 15067 "configure"
15068 #include "confdefs.h"
15069 #include <stdio.h>
15070 /* If setvbuf has the reversed format, exit 0. */
15071 int
15072 main ()
15073 {
15074   /* This call has the arguments reversed.
15075      A reversed system may check and see that the address of main
15076      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
15077   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
15078     $ac_main_return(1);
15079   putc('\r', stdout);
15080   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
15081 }
15082 _ACEOF
15083 rm -f conftest$ac_exeext
15084 if { (eval echo "$as_me:15084: \"$ac_link\"") >&5
15085   (eval $ac_link) 2>&5
15086   ac_status=$?
15087   echo "$as_me:15087: \$? = $ac_status" >&5
15088   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15089   { (eval echo "$as_me:15089: \"$ac_try\"") >&5
15090   (eval $ac_try) 2>&5
15091   ac_status=$?
15092   echo "$as_me:15092: \$? = $ac_status" >&5
15093   (exit $ac_status); }; }; then
15094   ac_cv_func_setvbuf_reversed=yes
15095 else
15096   echo "$as_me: program exited with status $ac_status" >&5
15097 echo "$as_me: failed program was:" >&5
15098 cat conftest.$ac_ext >&5
15099 ac_cv_func_setvbuf_reversed=no
15100 fi
15101 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15102 fi
15103 rm -f core core.* *.core
15104 fi
15105 echo "$as_me:15105: result: $ac_cv_func_setvbuf_reversed" >&5
15106 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
15107 if test $ac_cv_func_setvbuf_reversed = yes; then
15108
15109 cat >>confdefs.h <<\EOF
15110 #define SETVBUF_REVERSED 1
15111 EOF
15112
15113 fi
15114
15115 fi
15116 echo "$as_me:15116: checking return type of signal handlers" >&5
15117 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
15118 if test "${ac_cv_type_signal+set}" = set; then
15119   echo $ECHO_N "(cached) $ECHO_C" >&6
15120 else
15121   cat >conftest.$ac_ext <<_ACEOF
15122 #line 15122 "configure"
15123 #include "confdefs.h"
15124 #include <sys/types.h>
15125 #include <signal.h>
15126 #ifdef signal
15127 # undef signal
15128 #endif
15129 #ifdef __cplusplus
15130 extern "C" void (*signal (int, void (*)(int)))(int);
15131 #else
15132 void (*signal ()) ();
15133 #endif
15134
15135 int
15136 main ()
15137 {
15138 int i;
15139   ;
15140   return 0;
15141 }
15142 _ACEOF
15143 rm -f conftest.$ac_objext
15144 if { (eval echo "$as_me:15144: \"$ac_compile\"") >&5
15145   (eval $ac_compile) 2>&5
15146   ac_status=$?
15147   echo "$as_me:15147: \$? = $ac_status" >&5
15148   (exit $ac_status); } &&
15149          { ac_try='test -s conftest.$ac_objext'
15150   { (eval echo "$as_me:15150: \"$ac_try\"") >&5
15151   (eval $ac_try) 2>&5
15152   ac_status=$?
15153   echo "$as_me:15153: \$? = $ac_status" >&5
15154   (exit $ac_status); }; }; then
15155   ac_cv_type_signal=void
15156 else
15157   echo "$as_me: failed program was:" >&5
15158 cat conftest.$ac_ext >&5
15159 ac_cv_type_signal=int
15160 fi
15161 rm -f conftest.$ac_objext conftest.$ac_ext
15162 fi
15163 echo "$as_me:15163: result: $ac_cv_type_signal" >&5
15164 echo "${ECHO_T}$ac_cv_type_signal" >&6
15165
15166 cat >>confdefs.h <<EOF
15167 #define RETSIGTYPE $ac_cv_type_signal
15168 EOF
15169
15170 echo "$as_me:15170: checking for type sigaction_t" >&5
15171 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
15172 if test "${cf_cv_type_sigaction+set}" = set; then
15173   echo $ECHO_N "(cached) $ECHO_C" >&6
15174 else
15175
15176         cat >conftest.$ac_ext <<_ACEOF
15177 #line 15177 "configure"
15178 #include "confdefs.h"
15179
15180 #include <signal.h>
15181 int
15182 main ()
15183 {
15184 sigaction_t x
15185   ;
15186   return 0;
15187 }
15188 _ACEOF
15189 rm -f conftest.$ac_objext
15190 if { (eval echo "$as_me:15190: \"$ac_compile\"") >&5
15191   (eval $ac_compile) 2>&5
15192   ac_status=$?
15193   echo "$as_me:15193: \$? = $ac_status" >&5
15194   (exit $ac_status); } &&
15195          { ac_try='test -s conftest.$ac_objext'
15196   { (eval echo "$as_me:15196: \"$ac_try\"") >&5
15197   (eval $ac_try) 2>&5
15198   ac_status=$?
15199   echo "$as_me:15199: \$? = $ac_status" >&5
15200   (exit $ac_status); }; }; then
15201   cf_cv_type_sigaction=yes
15202 else
15203   echo "$as_me: failed program was:" >&5
15204 cat conftest.$ac_ext >&5
15205 cf_cv_type_sigaction=no
15206 fi
15207 rm -f conftest.$ac_objext conftest.$ac_ext
15208 fi
15209
15210 echo "$as_me:15210: result: $cf_cv_type_sigaction" >&5
15211 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
15212 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
15213 #define HAVE_TYPE_SIGACTION 1
15214 EOF
15215
15216 echo "$as_me:15216: checking declaration of size-change" >&5
15217 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
15218 if test "${cf_cv_sizechange+set}" = set; then
15219   echo $ECHO_N "(cached) $ECHO_C" >&6
15220 else
15221
15222     cf_cv_sizechange=unknown
15223     cf_save_CPPFLAGS="$CPPFLAGS"
15224
15225 for cf_opts in "" "NEED_PTEM_H"
15226 do
15227
15228     CPPFLAGS="$cf_save_CPPFLAGS"
15229     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
15230     cat >conftest.$ac_ext <<_ACEOF
15231 #line 15231 "configure"
15232 #include "confdefs.h"
15233 #include <sys/types.h>
15234 #ifdef HAVE_TERMIOS_H
15235 #include <termios.h>
15236 #else
15237 #ifdef HAVE_TERMIO_H
15238 #include <termio.h>
15239 #endif
15240 #endif
15241 #ifdef NEED_PTEM_H
15242 /* This is a workaround for SCO:  they neglected to define struct winsize in
15243  * termios.h -- it's only in termio.h and ptem.h
15244  */
15245 #include        <sys/stream.h>
15246 #include        <sys/ptem.h>
15247 #endif
15248 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
15249 #include <sys/ioctl.h>
15250 #endif
15251
15252 int
15253 main ()
15254 {
15255
15256 #ifdef TIOCGSIZE
15257         struct ttysize win;     /* FIXME: what system is this? */
15258         int y = win.ts_lines;
15259         int x = win.ts_cols;
15260 #else
15261 #ifdef TIOCGWINSZ
15262         struct winsize win;
15263         int y = win.ws_row;
15264         int x = win.ws_col;
15265 #else
15266         no TIOCGSIZE or TIOCGWINSZ
15267 #endif /* TIOCGWINSZ */
15268 #endif /* TIOCGSIZE */
15269
15270   ;
15271   return 0;
15272 }
15273 _ACEOF
15274 rm -f conftest.$ac_objext
15275 if { (eval echo "$as_me:15275: \"$ac_compile\"") >&5
15276   (eval $ac_compile) 2>&5
15277   ac_status=$?
15278   echo "$as_me:15278: \$? = $ac_status" >&5
15279   (exit $ac_status); } &&
15280          { ac_try='test -s conftest.$ac_objext'
15281   { (eval echo "$as_me:15281: \"$ac_try\"") >&5
15282   (eval $ac_try) 2>&5
15283   ac_status=$?
15284   echo "$as_me:15284: \$? = $ac_status" >&5
15285   (exit $ac_status); }; }; then
15286   cf_cv_sizechange=yes
15287 else
15288   echo "$as_me: failed program was:" >&5
15289 cat conftest.$ac_ext >&5
15290 cf_cv_sizechange=no
15291 fi
15292 rm -f conftest.$ac_objext conftest.$ac_ext
15293
15294         CPPFLAGS="$cf_save_CPPFLAGS"
15295         if test "$cf_cv_sizechange" = yes ; then
15296                 echo "size-change succeeded ($cf_opts)" >&5
15297                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
15298                 break
15299         fi
15300 done
15301
15302 fi
15303 echo "$as_me:15303: result: $cf_cv_sizechange" >&5
15304 echo "${ECHO_T}$cf_cv_sizechange" >&6
15305 if test "$cf_cv_sizechange" != no ; then
15306         cat >>confdefs.h <<\EOF
15307 #define HAVE_SIZECHANGE 1
15308 EOF
15309
15310         case $cf_cv_sizechange in #(vi
15311         NEED*)
15312                 cat >>confdefs.h <<EOF
15313 #define $cf_cv_sizechange  1
15314 EOF
15315
15316                 ;;
15317         esac
15318 fi
15319
15320 echo "$as_me:15320: checking for memmove" >&5
15321 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
15322 if test "${ac_cv_func_memmove+set}" = set; then
15323   echo $ECHO_N "(cached) $ECHO_C" >&6
15324 else
15325   cat >conftest.$ac_ext <<_ACEOF
15326 #line 15326 "configure"
15327 #include "confdefs.h"
15328 /* System header to define __stub macros and hopefully few prototypes,
15329     which can conflict with char memmove (); below.  */
15330 #include <assert.h>
15331 /* Override any gcc2 internal prototype to avoid an error.  */
15332 #ifdef __cplusplus
15333 extern "C"
15334 #endif
15335 /* We use char because int might match the return type of a gcc2
15336    builtin and then its argument prototype would still apply.  */
15337 char memmove ();
15338 char (*f) ();
15339
15340 int
15341 main ()
15342 {
15343 /* The GNU C library defines this for functions which it implements
15344     to always fail with ENOSYS.  Some functions are actually named
15345     something starting with __ and the normal name is an alias.  */
15346 #if defined (__stub_memmove) || defined (__stub___memmove)
15347 choke me
15348 #else
15349 f = memmove;
15350 #endif
15351
15352   ;
15353   return 0;
15354 }
15355 _ACEOF
15356 rm -f conftest.$ac_objext conftest$ac_exeext
15357 if { (eval echo "$as_me:15357: \"$ac_link\"") >&5
15358   (eval $ac_link) 2>&5
15359   ac_status=$?
15360   echo "$as_me:15360: \$? = $ac_status" >&5
15361   (exit $ac_status); } &&
15362          { ac_try='test -s conftest$ac_exeext'
15363   { (eval echo "$as_me:15363: \"$ac_try\"") >&5
15364   (eval $ac_try) 2>&5
15365   ac_status=$?
15366   echo "$as_me:15366: \$? = $ac_status" >&5
15367   (exit $ac_status); }; }; then
15368   ac_cv_func_memmove=yes
15369 else
15370   echo "$as_me: failed program was:" >&5
15371 cat conftest.$ac_ext >&5
15372 ac_cv_func_memmove=no
15373 fi
15374 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15375 fi
15376 echo "$as_me:15376: result: $ac_cv_func_memmove" >&5
15377 echo "${ECHO_T}$ac_cv_func_memmove" >&6
15378 if test $ac_cv_func_memmove = yes; then
15379   :
15380 else
15381
15382 echo "$as_me:15382: checking for bcopy" >&5
15383 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
15384 if test "${ac_cv_func_bcopy+set}" = set; then
15385   echo $ECHO_N "(cached) $ECHO_C" >&6
15386 else
15387   cat >conftest.$ac_ext <<_ACEOF
15388 #line 15388 "configure"
15389 #include "confdefs.h"
15390 /* System header to define __stub macros and hopefully few prototypes,
15391     which can conflict with char bcopy (); below.  */
15392 #include <assert.h>
15393 /* Override any gcc2 internal prototype to avoid an error.  */
15394 #ifdef __cplusplus
15395 extern "C"
15396 #endif
15397 /* We use char because int might match the return type of a gcc2
15398    builtin and then its argument prototype would still apply.  */
15399 char bcopy ();
15400 char (*f) ();
15401
15402 int
15403 main ()
15404 {
15405 /* The GNU C library defines this for functions which it implements
15406     to always fail with ENOSYS.  Some functions are actually named
15407     something starting with __ and the normal name is an alias.  */
15408 #if defined (__stub_bcopy) || defined (__stub___bcopy)
15409 choke me
15410 #else
15411 f = bcopy;
15412 #endif
15413
15414   ;
15415   return 0;
15416 }
15417 _ACEOF
15418 rm -f conftest.$ac_objext conftest$ac_exeext
15419 if { (eval echo "$as_me:15419: \"$ac_link\"") >&5
15420   (eval $ac_link) 2>&5
15421   ac_status=$?
15422   echo "$as_me:15422: \$? = $ac_status" >&5
15423   (exit $ac_status); } &&
15424          { ac_try='test -s conftest$ac_exeext'
15425   { (eval echo "$as_me:15425: \"$ac_try\"") >&5
15426   (eval $ac_try) 2>&5
15427   ac_status=$?
15428   echo "$as_me:15428: \$? = $ac_status" >&5
15429   (exit $ac_status); }; }; then
15430   ac_cv_func_bcopy=yes
15431 else
15432   echo "$as_me: failed program was:" >&5
15433 cat conftest.$ac_ext >&5
15434 ac_cv_func_bcopy=no
15435 fi
15436 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15437 fi
15438 echo "$as_me:15438: result: $ac_cv_func_bcopy" >&5
15439 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
15440 if test $ac_cv_func_bcopy = yes; then
15441
15442         echo "$as_me:15442: checking if bcopy does overlapping moves" >&5
15443 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
15444 if test "${cf_cv_good_bcopy+set}" = set; then
15445   echo $ECHO_N "(cached) $ECHO_C" >&6
15446 else
15447
15448                 if test "$cross_compiling" = yes; then
15449   cf_cv_good_bcopy=unknown
15450 else
15451   cat >conftest.$ac_ext <<_ACEOF
15452 #line 15452 "configure"
15453 #include "confdefs.h"
15454
15455 int main() {
15456         static char data[] = "abcdefghijklmnopqrstuwwxyz";
15457         char temp[40];
15458         bcopy(data, temp, sizeof(data));
15459         bcopy(temp+10, temp, 15);
15460         bcopy(temp+5, temp+15, 10);
15461         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
15462 }
15463
15464 _ACEOF
15465 rm -f conftest$ac_exeext
15466 if { (eval echo "$as_me:15466: \"$ac_link\"") >&5
15467   (eval $ac_link) 2>&5
15468   ac_status=$?
15469   echo "$as_me:15469: \$? = $ac_status" >&5
15470   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15471   { (eval echo "$as_me:15471: \"$ac_try\"") >&5
15472   (eval $ac_try) 2>&5
15473   ac_status=$?
15474   echo "$as_me:15474: \$? = $ac_status" >&5
15475   (exit $ac_status); }; }; then
15476   cf_cv_good_bcopy=yes
15477 else
15478   echo "$as_me: program exited with status $ac_status" >&5
15479 echo "$as_me: failed program was:" >&5
15480 cat conftest.$ac_ext >&5
15481 cf_cv_good_bcopy=no
15482 fi
15483 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15484 fi
15485
15486 fi
15487 echo "$as_me:15487: result: $cf_cv_good_bcopy" >&5
15488 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
15489
15490 else
15491   cf_cv_good_bcopy=no
15492 fi
15493
15494         if test "$cf_cv_good_bcopy" = yes ; then
15495                 cat >>confdefs.h <<\EOF
15496 #define USE_OK_BCOPY 1
15497 EOF
15498
15499         else
15500                 cat >>confdefs.h <<\EOF
15501 #define USE_MY_MEMMOVE 1
15502 EOF
15503
15504         fi
15505
15506 fi
15507
15508 echo "$as_me:15508: checking if poll really works" >&5
15509 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
15510 if test "${cf_cv_working_poll+set}" = set; then
15511   echo $ECHO_N "(cached) $ECHO_C" >&6
15512 else
15513
15514 if test "$cross_compiling" = yes; then
15515   cf_cv_working_poll=unknown
15516 else
15517   cat >conftest.$ac_ext <<_ACEOF
15518 #line 15518 "configure"
15519 #include "confdefs.h"
15520
15521 #include <stdio.h>
15522 #ifdef HAVE_POLL_H
15523 #include <poll.h>
15524 #else
15525 #include <sys/poll.h>
15526 #endif
15527 int main() {
15528         struct pollfd myfds;
15529         int ret;
15530
15531         myfds.fd = 0;
15532         myfds.events = POLLIN;
15533
15534         ret = poll(&myfds, 1, 100);
15535         ${cf_cv_main_return:-return}(ret != 0);
15536 }
15537 _ACEOF
15538 rm -f conftest$ac_exeext
15539 if { (eval echo "$as_me:15539: \"$ac_link\"") >&5
15540   (eval $ac_link) 2>&5
15541   ac_status=$?
15542   echo "$as_me:15542: \$? = $ac_status" >&5
15543   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15544   { (eval echo "$as_me:15544: \"$ac_try\"") >&5
15545   (eval $ac_try) 2>&5
15546   ac_status=$?
15547   echo "$as_me:15547: \$? = $ac_status" >&5
15548   (exit $ac_status); }; }; then
15549   cf_cv_working_poll=yes
15550 else
15551   echo "$as_me: program exited with status $ac_status" >&5
15552 echo "$as_me: failed program was:" >&5
15553 cat conftest.$ac_ext >&5
15554 cf_cv_working_poll=no
15555 fi
15556 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15557 fi
15558 fi
15559 echo "$as_me:15559: result: $cf_cv_working_poll" >&5
15560 echo "${ECHO_T}$cf_cv_working_poll" >&6
15561 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
15562 #define HAVE_WORKING_POLL 1
15563 EOF
15564
15565 echo "$as_me:15565: checking for va_copy" >&5
15566 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
15567 if test "${cf_cv_have_va_copy+set}" = set; then
15568   echo $ECHO_N "(cached) $ECHO_C" >&6
15569 else
15570
15571 cat >conftest.$ac_ext <<_ACEOF
15572 #line 15572 "configure"
15573 #include "confdefs.h"
15574
15575 #include <stdarg.h>
15576
15577 int
15578 main ()
15579 {
15580
15581         static va_list dst;
15582         static va_list src;
15583         va_copy(dst, src)
15584   ;
15585   return 0;
15586 }
15587 _ACEOF
15588 rm -f conftest.$ac_objext conftest$ac_exeext
15589 if { (eval echo "$as_me:15589: \"$ac_link\"") >&5
15590   (eval $ac_link) 2>&5
15591   ac_status=$?
15592   echo "$as_me:15592: \$? = $ac_status" >&5
15593   (exit $ac_status); } &&
15594          { ac_try='test -s conftest$ac_exeext'
15595   { (eval echo "$as_me:15595: \"$ac_try\"") >&5
15596   (eval $ac_try) 2>&5
15597   ac_status=$?
15598   echo "$as_me:15598: \$? = $ac_status" >&5
15599   (exit $ac_status); }; }; then
15600   cf_cv_have_va_copy=yes
15601 else
15602   echo "$as_me: failed program was:" >&5
15603 cat conftest.$ac_ext >&5
15604 cf_cv_have_va_copy=no
15605 fi
15606 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15607 fi
15608 echo "$as_me:15608: result: $cf_cv_have_va_copy" >&5
15609 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
15610
15611 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
15612 #define HAVE_VA_COPY 1
15613 EOF
15614
15615 echo "$as_me:15615: checking for __va_copy" >&5
15616 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
15617 if test "${cf_cv_have___va_copy+set}" = set; then
15618   echo $ECHO_N "(cached) $ECHO_C" >&6
15619 else
15620
15621 cat >conftest.$ac_ext <<_ACEOF
15622 #line 15622 "configure"
15623 #include "confdefs.h"
15624
15625 #include <stdarg.h>
15626
15627 int
15628 main ()
15629 {
15630
15631         static va_list dst;
15632         static va_list src;
15633         __va_copy(dst, src)
15634   ;
15635   return 0;
15636 }
15637 _ACEOF
15638 rm -f conftest.$ac_objext conftest$ac_exeext
15639 if { (eval echo "$as_me:15639: \"$ac_link\"") >&5
15640   (eval $ac_link) 2>&5
15641   ac_status=$?
15642   echo "$as_me:15642: \$? = $ac_status" >&5
15643   (exit $ac_status); } &&
15644          { ac_try='test -s conftest$ac_exeext'
15645   { (eval echo "$as_me:15645: \"$ac_try\"") >&5
15646   (eval $ac_try) 2>&5
15647   ac_status=$?
15648   echo "$as_me:15648: \$? = $ac_status" >&5
15649   (exit $ac_status); }; }; then
15650   cf_cv_have___va_copy=yes
15651 else
15652   echo "$as_me: failed program was:" >&5
15653 cat conftest.$ac_ext >&5
15654 cf_cv_have___va_copy=no
15655 fi
15656 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15657 fi
15658 echo "$as_me:15658: result: $cf_cv_have___va_copy" >&5
15659 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
15660
15661 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
15662 #define HAVE___VA_COPY 1
15663 EOF
15664
15665 echo "$as_me:15665: checking for pid_t" >&5
15666 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
15667 if test "${ac_cv_type_pid_t+set}" = set; then
15668   echo $ECHO_N "(cached) $ECHO_C" >&6
15669 else
15670   cat >conftest.$ac_ext <<_ACEOF
15671 #line 15671 "configure"
15672 #include "confdefs.h"
15673 $ac_includes_default
15674 int
15675 main ()
15676 {
15677 if ((pid_t *) 0)
15678   return 0;
15679 if (sizeof (pid_t))
15680   return 0;
15681   ;
15682   return 0;
15683 }
15684 _ACEOF
15685 rm -f conftest.$ac_objext
15686 if { (eval echo "$as_me:15686: \"$ac_compile\"") >&5
15687   (eval $ac_compile) 2>&5
15688   ac_status=$?
15689   echo "$as_me:15689: \$? = $ac_status" >&5
15690   (exit $ac_status); } &&
15691          { ac_try='test -s conftest.$ac_objext'
15692   { (eval echo "$as_me:15692: \"$ac_try\"") >&5
15693   (eval $ac_try) 2>&5
15694   ac_status=$?
15695   echo "$as_me:15695: \$? = $ac_status" >&5
15696   (exit $ac_status); }; }; then
15697   ac_cv_type_pid_t=yes
15698 else
15699   echo "$as_me: failed program was:" >&5
15700 cat conftest.$ac_ext >&5
15701 ac_cv_type_pid_t=no
15702 fi
15703 rm -f conftest.$ac_objext conftest.$ac_ext
15704 fi
15705 echo "$as_me:15705: result: $ac_cv_type_pid_t" >&5
15706 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
15707 if test $ac_cv_type_pid_t = yes; then
15708   :
15709 else
15710
15711 cat >>confdefs.h <<EOF
15712 #define pid_t int
15713 EOF
15714
15715 fi
15716
15717 for ac_header in unistd.h vfork.h
15718 do
15719 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15720 echo "$as_me:15720: checking for $ac_header" >&5
15721 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15722 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15723   echo $ECHO_N "(cached) $ECHO_C" >&6
15724 else
15725   cat >conftest.$ac_ext <<_ACEOF
15726 #line 15726 "configure"
15727 #include "confdefs.h"
15728 #include <$ac_header>
15729 _ACEOF
15730 if { (eval echo "$as_me:15730: \"$ac_cpp conftest.$ac_ext\"") >&5
15731   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15732   ac_status=$?
15733   egrep -v '^ *\+' conftest.er1 >conftest.err
15734   rm -f conftest.er1
15735   cat conftest.err >&5
15736   echo "$as_me:15736: \$? = $ac_status" >&5
15737   (exit $ac_status); } >/dev/null; then
15738   if test -s conftest.err; then
15739     ac_cpp_err=$ac_c_preproc_warn_flag
15740   else
15741     ac_cpp_err=
15742   fi
15743 else
15744   ac_cpp_err=yes
15745 fi
15746 if test -z "$ac_cpp_err"; then
15747   eval "$as_ac_Header=yes"
15748 else
15749   echo "$as_me: failed program was:" >&5
15750   cat conftest.$ac_ext >&5
15751   eval "$as_ac_Header=no"
15752 fi
15753 rm -f conftest.err conftest.$ac_ext
15754 fi
15755 echo "$as_me:15755: result: `eval echo '${'$as_ac_Header'}'`" >&5
15756 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15757 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15758   cat >>confdefs.h <<EOF
15759 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15760 EOF
15761
15762 fi
15763 done
15764
15765 for ac_func in fork vfork
15766 do
15767 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15768 echo "$as_me:15768: checking for $ac_func" >&5
15769 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15770 if eval "test \"\${$as_ac_var+set}\" = set"; then
15771   echo $ECHO_N "(cached) $ECHO_C" >&6
15772 else
15773   cat >conftest.$ac_ext <<_ACEOF
15774 #line 15774 "configure"
15775 #include "confdefs.h"
15776 /* System header to define __stub macros and hopefully few prototypes,
15777     which can conflict with char $ac_func (); below.  */
15778 #include <assert.h>
15779 /* Override any gcc2 internal prototype to avoid an error.  */
15780 #ifdef __cplusplus
15781 extern "C"
15782 #endif
15783 /* We use char because int might match the return type of a gcc2
15784    builtin and then its argument prototype would still apply.  */
15785 char $ac_func ();
15786 char (*f) ();
15787
15788 int
15789 main ()
15790 {
15791 /* The GNU C library defines this for functions which it implements
15792     to always fail with ENOSYS.  Some functions are actually named
15793     something starting with __ and the normal name is an alias.  */
15794 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15795 choke me
15796 #else
15797 f = $ac_func;
15798 #endif
15799
15800   ;
15801   return 0;
15802 }
15803 _ACEOF
15804 rm -f conftest.$ac_objext conftest$ac_exeext
15805 if { (eval echo "$as_me:15805: \"$ac_link\"") >&5
15806   (eval $ac_link) 2>&5
15807   ac_status=$?
15808   echo "$as_me:15808: \$? = $ac_status" >&5
15809   (exit $ac_status); } &&
15810          { ac_try='test -s conftest$ac_exeext'
15811   { (eval echo "$as_me:15811: \"$ac_try\"") >&5
15812   (eval $ac_try) 2>&5
15813   ac_status=$?
15814   echo "$as_me:15814: \$? = $ac_status" >&5
15815   (exit $ac_status); }; }; then
15816   eval "$as_ac_var=yes"
15817 else
15818   echo "$as_me: failed program was:" >&5
15819 cat conftest.$ac_ext >&5
15820 eval "$as_ac_var=no"
15821 fi
15822 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15823 fi
15824 echo "$as_me:15824: result: `eval echo '${'$as_ac_var'}'`" >&5
15825 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15826 if test `eval echo '${'$as_ac_var'}'` = yes; then
15827   cat >>confdefs.h <<EOF
15828 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15829 EOF
15830
15831 fi
15832 done
15833
15834 ac_cv_func_fork_works=$ac_cv_func_fork
15835 if test "x$ac_cv_func_fork" = xyes; then
15836   echo "$as_me:15836: checking for working fork" >&5
15837 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
15838 if test "${ac_cv_func_fork_works+set}" = set; then
15839   echo $ECHO_N "(cached) $ECHO_C" >&6
15840 else
15841   if test "$cross_compiling" = yes; then
15842   ac_cv_func_fork_works=cross
15843 else
15844   cat >conftest.$ac_ext <<_ACEOF
15845 /* By Rüdiger Kuhlmann. */
15846       #include <sys/types.h>
15847       #if HAVE_UNISTD_H
15848       # include <unistd.h>
15849       #endif
15850       /* Some systems only have a dummy stub for fork() */
15851       int main ()
15852       {
15853         if (fork() < 0)
15854           $ac_main_return (1);
15855         $ac_main_return (0);
15856       }
15857 _ACEOF
15858 rm -f conftest$ac_exeext
15859 if { (eval echo "$as_me:15859: \"$ac_link\"") >&5
15860   (eval $ac_link) 2>&5
15861   ac_status=$?
15862   echo "$as_me:15862: \$? = $ac_status" >&5
15863   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15864   { (eval echo "$as_me:15864: \"$ac_try\"") >&5
15865   (eval $ac_try) 2>&5
15866   ac_status=$?
15867   echo "$as_me:15867: \$? = $ac_status" >&5
15868   (exit $ac_status); }; }; then
15869   ac_cv_func_fork_works=yes
15870 else
15871   echo "$as_me: program exited with status $ac_status" >&5
15872 echo "$as_me: failed program was:" >&5
15873 cat conftest.$ac_ext >&5
15874 ac_cv_func_fork_works=no
15875 fi
15876 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15877 fi
15878 fi
15879 echo "$as_me:15879: result: $ac_cv_func_fork_works" >&5
15880 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
15881
15882 fi
15883 if test "x$ac_cv_func_fork_works" = xcross; then
15884   case $host in
15885     *-*-amigaos* | *-*-msdosdjgpp*)
15886       # Override, as these systems have only a dummy fork() stub
15887       ac_cv_func_fork_works=no
15888       ;;
15889     *)
15890       ac_cv_func_fork_works=yes
15891       ;;
15892   esac
15893   { echo "$as_me:15893: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
15894 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
15895 fi
15896 ac_cv_func_vfork_works=$ac_cv_func_vfork
15897 if test "x$ac_cv_func_vfork" = xyes; then
15898   echo "$as_me:15898: checking for working vfork" >&5
15899 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
15900 if test "${ac_cv_func_vfork_works+set}" = set; then
15901   echo $ECHO_N "(cached) $ECHO_C" >&6
15902 else
15903   if test "$cross_compiling" = yes; then
15904   ac_cv_func_vfork_works=cross
15905 else
15906   cat >conftest.$ac_ext <<_ACEOF
15907 #line 15907 "configure"
15908 #include "confdefs.h"
15909 /* Thanks to Paul Eggert for this test.  */
15910 #include <stdio.h>
15911 #include <sys/types.h>
15912 #include <sys/stat.h>
15913 #if HAVE_UNISTD_H
15914 # include <unistd.h>
15915 #endif
15916 #if HAVE_VFORK_H
15917 # include <vfork.h>
15918 #endif
15919 /* On some sparc systems, changes by the child to local and incoming
15920    argument registers are propagated back to the parent.  The compiler
15921    is told about this with #include <vfork.h>, but some compilers
15922    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15923    static variable whose address is put into a register that is
15924    clobbered by the vfork.  */
15925 static
15926 #ifdef __cplusplus
15927 sparc_address_test (int arg)
15928 # else
15929 sparc_address_test (arg) int arg;
15930 #endif
15931 {
15932   static pid_t child;
15933   if (!child) {
15934     child = vfork ();
15935     if (child < 0) {
15936       perror ("vfork");
15937       _exit(2);
15938     }
15939     if (!child) {
15940       arg = getpid();
15941       write(-1, "", 0);
15942       _exit (arg);
15943     }
15944   }
15945 }
15946
15947 int
15948 main ()
15949 {
15950   pid_t parent = getpid ();
15951   pid_t child;
15952
15953   sparc_address_test ();
15954
15955   child = vfork ();
15956
15957   if (child == 0) {
15958     /* Here is another test for sparc vfork register problems.  This
15959        test uses lots of local variables, at least as many local
15960        variables as main has allocated so far including compiler
15961        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15962        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15963        reuse the register of parent for one of the local variables,
15964        since it will think that parent can't possibly be used any more
15965        in this routine.  Assigning to the local variable will thus
15966        munge parent in the parent process.  */
15967     pid_t
15968       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15969       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15970     /* Convince the compiler that p..p7 are live; otherwise, it might
15971        use the same hardware register for all 8 local variables.  */
15972     if (p != p1 || p != p2 || p != p3 || p != p4
15973         || p != p5 || p != p6 || p != p7)
15974       _exit(1);
15975
15976     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15977        from child file descriptors.  If the child closes a descriptor
15978        before it execs or exits, this munges the parent's descriptor
15979        as well.  Test for this by closing stdout in the child.  */
15980     _exit(close(fileno(stdout)) != 0);
15981   } else {
15982     int status;
15983     struct stat st;
15984
15985     while (wait(&status) != child)
15986       ;
15987     $ac_main_return(
15988          /* Was there some problem with vforking?  */
15989          child < 0
15990
15991          /* Did the child fail?  (This shouldn't happen.)  */
15992          || status
15993
15994          /* Did the vfork/compiler bug occur?  */
15995          || parent != getpid()
15996
15997          /* Did the file descriptor bug occur?  */
15998          || fstat(fileno(stdout), &st) != 0
15999          );
16000   }
16001 }
16002 _ACEOF
16003 rm -f conftest$ac_exeext
16004 if { (eval echo "$as_me:16004: \"$ac_link\"") >&5
16005   (eval $ac_link) 2>&5
16006   ac_status=$?
16007   echo "$as_me:16007: \$? = $ac_status" >&5
16008   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16009   { (eval echo "$as_me:16009: \"$ac_try\"") >&5
16010   (eval $ac_try) 2>&5
16011   ac_status=$?
16012   echo "$as_me:16012: \$? = $ac_status" >&5
16013   (exit $ac_status); }; }; then
16014   ac_cv_func_vfork_works=yes
16015 else
16016   echo "$as_me: program exited with status $ac_status" >&5
16017 echo "$as_me: failed program was:" >&5
16018 cat conftest.$ac_ext >&5
16019 ac_cv_func_vfork_works=no
16020 fi
16021 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16022 fi
16023 fi
16024 echo "$as_me:16024: result: $ac_cv_func_vfork_works" >&5
16025 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
16026
16027 fi;
16028 if test "x$ac_cv_func_fork_works" = xcross; then
16029   ac_cv_func_vfork_works=ac_cv_func_vfork
16030   { echo "$as_me:16030: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
16031 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
16032 fi
16033
16034 if test "x$ac_cv_func_vfork_works" = xyes; then
16035
16036 cat >>confdefs.h <<\EOF
16037 #define HAVE_WORKING_VFORK 1
16038 EOF
16039
16040 else
16041
16042 cat >>confdefs.h <<\EOF
16043 #define vfork fork
16044 EOF
16045
16046 fi
16047 if test "x$ac_cv_func_fork_works" = xyes; then
16048
16049 cat >>confdefs.h <<\EOF
16050 #define HAVE_WORKING_FORK 1
16051 EOF
16052
16053 fi
16054
16055 # special check for test/ditto.c
16056
16057 echo "$as_me:16057: checking for openpty in -lutil" >&5
16058 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
16059 if test "${ac_cv_lib_util_openpty+set}" = set; then
16060   echo $ECHO_N "(cached) $ECHO_C" >&6
16061 else
16062   ac_check_lib_save_LIBS=$LIBS
16063 LIBS="-lutil  $LIBS"
16064 cat >conftest.$ac_ext <<_ACEOF
16065 #line 16065 "configure"
16066 #include "confdefs.h"
16067
16068 /* Override any gcc2 internal prototype to avoid an error.  */
16069 #ifdef __cplusplus
16070 extern "C"
16071 #endif
16072 /* We use char because int might match the return type of a gcc2
16073    builtin and then its argument prototype would still apply.  */
16074 char openpty ();
16075 int
16076 main ()
16077 {
16078 openpty ();
16079   ;
16080   return 0;
16081 }
16082 _ACEOF
16083 rm -f conftest.$ac_objext conftest$ac_exeext
16084 if { (eval echo "$as_me:16084: \"$ac_link\"") >&5
16085   (eval $ac_link) 2>&5
16086   ac_status=$?
16087   echo "$as_me:16087: \$? = $ac_status" >&5
16088   (exit $ac_status); } &&
16089          { ac_try='test -s conftest$ac_exeext'
16090   { (eval echo "$as_me:16090: \"$ac_try\"") >&5
16091   (eval $ac_try) 2>&5
16092   ac_status=$?
16093   echo "$as_me:16093: \$? = $ac_status" >&5
16094   (exit $ac_status); }; }; then
16095   ac_cv_lib_util_openpty=yes
16096 else
16097   echo "$as_me: failed program was:" >&5
16098 cat conftest.$ac_ext >&5
16099 ac_cv_lib_util_openpty=no
16100 fi
16101 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16102 LIBS=$ac_check_lib_save_LIBS
16103 fi
16104 echo "$as_me:16104: result: $ac_cv_lib_util_openpty" >&5
16105 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
16106 if test $ac_cv_lib_util_openpty = yes; then
16107   cf_cv_lib_util=yes
16108 else
16109   cf_cv_lib_util=no
16110 fi
16111
16112 echo "$as_me:16112: checking for openpty header" >&5
16113 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
16114 if test "${cf_cv_func_openpty+set}" = set; then
16115   echo $ECHO_N "(cached) $ECHO_C" >&6
16116 else
16117
16118     cf_save_LIBS="$LIBS"
16119     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
16120     for cf_header in pty.h libutil.h util.h
16121     do
16122     cat >conftest.$ac_ext <<_ACEOF
16123 #line 16123 "configure"
16124 #include "confdefs.h"
16125
16126 #include <$cf_header>
16127
16128 int
16129 main ()
16130 {
16131
16132     int x = openpty((int *)0, (int *)0, (char *)0,
16133                    (struct termios *)0, (struct winsize *)0);
16134
16135   ;
16136   return 0;
16137 }
16138 _ACEOF
16139 rm -f conftest.$ac_objext conftest$ac_exeext
16140 if { (eval echo "$as_me:16140: \"$ac_link\"") >&5
16141   (eval $ac_link) 2>&5
16142   ac_status=$?
16143   echo "$as_me:16143: \$? = $ac_status" >&5
16144   (exit $ac_status); } &&
16145          { ac_try='test -s conftest$ac_exeext'
16146   { (eval echo "$as_me:16146: \"$ac_try\"") >&5
16147   (eval $ac_try) 2>&5
16148   ac_status=$?
16149   echo "$as_me:16149: \$? = $ac_status" >&5
16150   (exit $ac_status); }; }; then
16151
16152         cf_cv_func_openpty=$cf_header
16153         break
16154
16155 else
16156   echo "$as_me: failed program was:" >&5
16157 cat conftest.$ac_ext >&5
16158
16159         cf_cv_func_openpty=no
16160
16161 fi
16162 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16163     done
16164     LIBS="$cf_save_LIBS"
16165
16166 fi
16167 echo "$as_me:16167: result: $cf_cv_func_openpty" >&5
16168 echo "${ECHO_T}$cf_cv_func_openpty" >&6
16169
16170 if test "$cf_cv_func_openpty" != no ; then
16171     cat >>confdefs.h <<EOF
16172 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
16173 EOF
16174
16175     cat >>confdefs.h <<\EOF
16176 #define USE_XTERM_PTY 1
16177 EOF
16178
16179     if test "$cf_cv_lib_util" = yes ; then
16180         TEST_LIBS="-lutil $TEST_LIBS"
16181     fi
16182 fi
16183
16184 if test "$with_hashed_db" != no ; then
16185         cat >>confdefs.h <<\EOF
16186 #define USE_HASHED_DB 1
16187 EOF
16188
16189 case $with_hashed_db in #(vi
16190 yes|*able*) #(vi
16191     ;;
16192 *)
16193     if test -d "$with_hashed_db" ; then
16194
16195 if test -n "$with_hashed_db/include" ; then
16196   for cf_add_incdir in $with_hashed_db/include
16197   do
16198         while test $cf_add_incdir != /usr/include
16199         do
16200           if test -d $cf_add_incdir
16201           then
16202                 cf_have_incdir=no
16203                 if test -n "$CFLAGS$CPPFLAGS" ; then
16204                   # a loop is needed to ensure we can add subdirs of existing dirs
16205                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16206                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16207                           cf_have_incdir=yes; break
16208                         fi
16209                   done
16210                 fi
16211
16212                 if test "$cf_have_incdir" = no ; then
16213                   if test "$cf_add_incdir" = /usr/local/include ; then
16214                         if test "$GCC" = yes
16215                         then
16216                           cf_save_CPPFLAGS=$CPPFLAGS
16217                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16218                           cat >conftest.$ac_ext <<_ACEOF
16219 #line 16219 "configure"
16220 #include "confdefs.h"
16221 #include <stdio.h>
16222 int
16223 main ()
16224 {
16225 printf("Hello")
16226   ;
16227   return 0;
16228 }
16229 _ACEOF
16230 rm -f conftest.$ac_objext
16231 if { (eval echo "$as_me:16231: \"$ac_compile\"") >&5
16232   (eval $ac_compile) 2>&5
16233   ac_status=$?
16234   echo "$as_me:16234: \$? = $ac_status" >&5
16235   (exit $ac_status); } &&
16236          { ac_try='test -s conftest.$ac_objext'
16237   { (eval echo "$as_me:16237: \"$ac_try\"") >&5
16238   (eval $ac_try) 2>&5
16239   ac_status=$?
16240   echo "$as_me:16240: \$? = $ac_status" >&5
16241   (exit $ac_status); }; }; then
16242   :
16243 else
16244   echo "$as_me: failed program was:" >&5
16245 cat conftest.$ac_ext >&5
16246 cf_have_incdir=yes
16247 fi
16248 rm -f conftest.$ac_objext conftest.$ac_ext
16249                           CPPFLAGS=$cf_save_CPPFLAGS
16250                         fi
16251                   fi
16252                 fi
16253
16254                 if test "$cf_have_incdir" = no ; then
16255                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
16256
16257 echo "${as_me-configure}:16257: testing adding $cf_add_incdir to include-path ..." 1>&5
16258
16259                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16260
16261                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
16262                   test "$cf_top_incdir" = "$cf_add_incdir" && break
16263                   cf_add_incdir="$cf_top_incdir"
16264                 else
16265                   break
16266                 fi
16267           fi
16268         done
16269   done
16270 fi
16271
16272 if test -n "$with_hashed_db/lib" ; then
16273   for cf_add_libdir in $with_hashed_db/lib
16274   do
16275     if test $cf_add_libdir = /usr/lib ; then
16276       :
16277     elif test -d $cf_add_libdir
16278     then
16279       cf_have_libdir=no
16280       if test -n "$LDFLAGS$LIBS" ; then
16281         # a loop is needed to ensure we can add subdirs of existing dirs
16282         for cf_test_libdir in $LDFLAGS $LIBS ; do
16283           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16284             cf_have_libdir=yes; break
16285           fi
16286         done
16287       fi
16288       if test "$cf_have_libdir" = no ; then
16289         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
16290
16291 echo "${as_me-configure}:16291: testing adding $cf_add_libdir to library-path ..." 1>&5
16292
16293         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16294       fi
16295     fi
16296   done
16297 fi
16298
16299     fi
16300 esac
16301
16302 echo "$as_me:16302: checking for db.h" >&5
16303 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
16304 if test "${ac_cv_header_db_h+set}" = set; then
16305   echo $ECHO_N "(cached) $ECHO_C" >&6
16306 else
16307   cat >conftest.$ac_ext <<_ACEOF
16308 #line 16308 "configure"
16309 #include "confdefs.h"
16310 #include <db.h>
16311 _ACEOF
16312 if { (eval echo "$as_me:16312: \"$ac_cpp conftest.$ac_ext\"") >&5
16313   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16314   ac_status=$?
16315   egrep -v '^ *\+' conftest.er1 >conftest.err
16316   rm -f conftest.er1
16317   cat conftest.err >&5
16318   echo "$as_me:16318: \$? = $ac_status" >&5
16319   (exit $ac_status); } >/dev/null; then
16320   if test -s conftest.err; then
16321     ac_cpp_err=$ac_c_preproc_warn_flag
16322   else
16323     ac_cpp_err=
16324   fi
16325 else
16326   ac_cpp_err=yes
16327 fi
16328 if test -z "$ac_cpp_err"; then
16329   ac_cv_header_db_h=yes
16330 else
16331   echo "$as_me: failed program was:" >&5
16332   cat conftest.$ac_ext >&5
16333   ac_cv_header_db_h=no
16334 fi
16335 rm -f conftest.err conftest.$ac_ext
16336 fi
16337 echo "$as_me:16337: result: $ac_cv_header_db_h" >&5
16338 echo "${ECHO_T}$ac_cv_header_db_h" >&6
16339 if test $ac_cv_header_db_h = yes; then
16340
16341 echo "$as_me:16341: checking for version of db" >&5
16342 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
16343 if test "${cf_cv_hashed_db_version+set}" = set; then
16344   echo $ECHO_N "(cached) $ECHO_C" >&6
16345 else
16346
16347 cf_cv_hashed_db_version=unknown
16348
16349 for cf_db_version in 1 2 3 4 5
16350 do
16351
16352 echo "${as_me-configure}:16352: testing checking for db version $cf_db_version ..." 1>&5
16353
16354         cat >conftest.$ac_ext <<_ACEOF
16355 #line 16355 "configure"
16356 #include "confdefs.h"
16357
16358 $ac_includes_default
16359 #include <db.h>
16360
16361 #ifdef DB_VERSION_MAJOR
16362         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
16363 #if $cf_db_version == DB_VERSION_MAJOR
16364         /* ok */
16365 #else
16366         make an error
16367 #endif
16368 #else
16369 #if $cf_db_version == 1
16370         /* ok: assuming this is DB 1.8.5 */
16371 #else
16372         make an error
16373 #endif
16374 #endif
16375
16376 int
16377 main ()
16378 {
16379 DBT *foo = 0
16380   ;
16381   return 0;
16382 }
16383 _ACEOF
16384 rm -f conftest.$ac_objext
16385 if { (eval echo "$as_me:16385: \"$ac_compile\"") >&5
16386   (eval $ac_compile) 2>&5
16387   ac_status=$?
16388   echo "$as_me:16388: \$? = $ac_status" >&5
16389   (exit $ac_status); } &&
16390          { ac_try='test -s conftest.$ac_objext'
16391   { (eval echo "$as_me:16391: \"$ac_try\"") >&5
16392   (eval $ac_try) 2>&5
16393   ac_status=$?
16394   echo "$as_me:16394: \$? = $ac_status" >&5
16395   (exit $ac_status); }; }; then
16396
16397         cf_cv_hashed_db_version=$cf_db_version
16398         break
16399
16400 else
16401   echo "$as_me: failed program was:" >&5
16402 cat conftest.$ac_ext >&5
16403 fi
16404 rm -f conftest.$ac_objext conftest.$ac_ext
16405 done
16406
16407 fi
16408 echo "$as_me:16408: result: $cf_cv_hashed_db_version" >&5
16409 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
16410
16411 if test "$cf_cv_hashed_db_version" = unknown ; then
16412         { { echo "$as_me:16412: error: Cannot determine version of db" >&5
16413 echo "$as_me: error: Cannot determine version of db" >&2;}
16414    { (exit 1); exit 1; }; }
16415 else
16416
16417 echo "$as_me:16417: checking for db libraries" >&5
16418 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
16419 if test "${cf_cv_hashed_db_libs+set}" = set; then
16420   echo $ECHO_N "(cached) $ECHO_C" >&6
16421 else
16422
16423 cf_cv_hashed_db_libs=unknown
16424 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
16425 do
16426         cf_save_libs="$LIBS"
16427         if test -n "$cf_db_libs"; then
16428                 LIBS="-l$cf_db_libs $LIBS"
16429         fi
16430
16431 echo "${as_me-configure}:16431: testing checking for library "$cf_db_libs" ..." 1>&5
16432
16433         cat >conftest.$ac_ext <<_ACEOF
16434 #line 16434 "configure"
16435 #include "confdefs.h"
16436
16437 $ac_includes_default
16438 #include <db.h>
16439
16440 int
16441 main ()
16442 {
16443
16444         char *path = "/tmp/foo";
16445 #ifdef DB_VERSION_MAJOR
16446 #if DB_VERSION_MAJOR >= 4
16447         DB *result = 0;
16448         db_create(&result, NULL, 0);
16449         result->open(result,
16450                 NULL,
16451                 path,
16452                 path,
16453                 DB_HASH,
16454                 DB_CREATE,
16455                 0644);
16456 #elif DB_VERSION_MAJOR >= 3
16457         DB *result = 0;
16458         db_create(&result, NULL, 0);
16459         result->open(result,
16460                 path,
16461                 path,
16462                 DB_HASH,
16463                 DB_CREATE,
16464                 0644);
16465 #elif DB_VERSION_MAJOR >= 2
16466         DB *result = 0;
16467         db_open(path,
16468                 DB_HASH,
16469                 DB_CREATE,
16470                 0644,
16471                 (DB_ENV *) 0,
16472                 (DB_INFO *) 0,
16473                 &result);
16474 #endif /* DB_VERSION_MAJOR */
16475 #else
16476         DB *result = dbopen(path,
16477                      2,
16478                      0644,
16479                      DB_HASH,
16480                      0);
16481 #endif
16482         ${cf_cv_main_return:-return}(result != 0)
16483
16484   ;
16485   return 0;
16486 }
16487 _ACEOF
16488 rm -f conftest.$ac_objext conftest$ac_exeext
16489 if { (eval echo "$as_me:16489: \"$ac_link\"") >&5
16490   (eval $ac_link) 2>&5
16491   ac_status=$?
16492   echo "$as_me:16492: \$? = $ac_status" >&5
16493   (exit $ac_status); } &&
16494          { ac_try='test -s conftest$ac_exeext'
16495   { (eval echo "$as_me:16495: \"$ac_try\"") >&5
16496   (eval $ac_try) 2>&5
16497   ac_status=$?
16498   echo "$as_me:16498: \$? = $ac_status" >&5
16499   (exit $ac_status); }; }; then
16500
16501         if test -n "$cf_db_libs" ; then
16502                 cf_cv_hashed_db_libs=$cf_db_libs
16503         else
16504                 cf_cv_hashed_db_libs=default
16505         fi
16506         LIBS="$cf_save_libs"
16507         break
16508
16509 else
16510   echo "$as_me: failed program was:" >&5
16511 cat conftest.$ac_ext >&5
16512 fi
16513 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16514         LIBS="$cf_save_libs"
16515 done
16516
16517 fi
16518 echo "$as_me:16518: result: $cf_cv_hashed_db_libs" >&5
16519 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
16520
16521         if test "$cf_cv_hashed_db_libs" = unknown ; then
16522                 { { echo "$as_me:16522: error: Cannot determine library for db" >&5
16523 echo "$as_me: error: Cannot determine library for db" >&2;}
16524    { (exit 1); exit 1; }; }
16525         elif test "$cf_cv_hashed_db_libs" != default ; then
16526                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
16527         fi
16528 fi
16529
16530 else
16531
16532         { { echo "$as_me:16532: error: Cannot find db.h" >&5
16533 echo "$as_me: error: Cannot find db.h" >&2;}
16534    { (exit 1); exit 1; }; }
16535
16536 fi
16537
16538 fi
16539
16540 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16541         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16542         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16543 fi
16544
16545 # Just in case, check if the C compiler has a bool type.
16546
16547 echo "$as_me:16547: checking if we should include stdbool.h" >&5
16548 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16549
16550 if test "${cf_cv_header_stdbool_h+set}" = set; then
16551   echo $ECHO_N "(cached) $ECHO_C" >&6
16552 else
16553
16554         cat >conftest.$ac_ext <<_ACEOF
16555 #line 16555 "configure"
16556 #include "confdefs.h"
16557
16558 int
16559 main ()
16560 {
16561 bool foo = false
16562   ;
16563   return 0;
16564 }
16565 _ACEOF
16566 rm -f conftest.$ac_objext
16567 if { (eval echo "$as_me:16567: \"$ac_compile\"") >&5
16568   (eval $ac_compile) 2>&5
16569   ac_status=$?
16570   echo "$as_me:16570: \$? = $ac_status" >&5
16571   (exit $ac_status); } &&
16572          { ac_try='test -s conftest.$ac_objext'
16573   { (eval echo "$as_me:16573: \"$ac_try\"") >&5
16574   (eval $ac_try) 2>&5
16575   ac_status=$?
16576   echo "$as_me:16576: \$? = $ac_status" >&5
16577   (exit $ac_status); }; }; then
16578   cf_cv_header_stdbool_h=0
16579 else
16580   echo "$as_me: failed program was:" >&5
16581 cat conftest.$ac_ext >&5
16582 cat >conftest.$ac_ext <<_ACEOF
16583 #line 16583 "configure"
16584 #include "confdefs.h"
16585
16586 #ifndef __BEOS__
16587 #include <stdbool.h>
16588 #endif
16589
16590 int
16591 main ()
16592 {
16593 bool foo = false
16594   ;
16595   return 0;
16596 }
16597 _ACEOF
16598 rm -f conftest.$ac_objext
16599 if { (eval echo "$as_me:16599: \"$ac_compile\"") >&5
16600   (eval $ac_compile) 2>&5
16601   ac_status=$?
16602   echo "$as_me:16602: \$? = $ac_status" >&5
16603   (exit $ac_status); } &&
16604          { ac_try='test -s conftest.$ac_objext'
16605   { (eval echo "$as_me:16605: \"$ac_try\"") >&5
16606   (eval $ac_try) 2>&5
16607   ac_status=$?
16608   echo "$as_me:16608: \$? = $ac_status" >&5
16609   (exit $ac_status); }; }; then
16610   cf_cv_header_stdbool_h=1
16611 else
16612   echo "$as_me: failed program was:" >&5
16613 cat conftest.$ac_ext >&5
16614 cf_cv_header_stdbool_h=0
16615 fi
16616 rm -f conftest.$ac_objext conftest.$ac_ext
16617 fi
16618 rm -f conftest.$ac_objext conftest.$ac_ext
16619 fi
16620
16621 if test "$cf_cv_header_stdbool_h" = 1
16622 then    echo "$as_me:16622: result: yes" >&5
16623 echo "${ECHO_T}yes" >&6
16624 else    echo "$as_me:16624: result: no" >&5
16625 echo "${ECHO_T}no" >&6
16626 fi
16627
16628 echo "$as_me:16628: checking for builtin bool type" >&5
16629 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
16630
16631 if test "${cf_cv_cc_bool_type+set}" = set; then
16632   echo $ECHO_N "(cached) $ECHO_C" >&6
16633 else
16634
16635         cat >conftest.$ac_ext <<_ACEOF
16636 #line 16636 "configure"
16637 #include "confdefs.h"
16638
16639 #include <stdio.h>
16640 #include <sys/types.h>
16641
16642 int
16643 main ()
16644 {
16645 bool x = false
16646   ;
16647   return 0;
16648 }
16649 _ACEOF
16650 rm -f conftest.$ac_objext
16651 if { (eval echo "$as_me:16651: \"$ac_compile\"") >&5
16652   (eval $ac_compile) 2>&5
16653   ac_status=$?
16654   echo "$as_me:16654: \$? = $ac_status" >&5
16655   (exit $ac_status); } &&
16656          { ac_try='test -s conftest.$ac_objext'
16657   { (eval echo "$as_me:16657: \"$ac_try\"") >&5
16658   (eval $ac_try) 2>&5
16659   ac_status=$?
16660   echo "$as_me:16660: \$? = $ac_status" >&5
16661   (exit $ac_status); }; }; then
16662   cf_cv_cc_bool_type=1
16663 else
16664   echo "$as_me: failed program was:" >&5
16665 cat conftest.$ac_ext >&5
16666 cf_cv_cc_bool_type=0
16667 fi
16668 rm -f conftest.$ac_objext conftest.$ac_ext
16669
16670 fi
16671
16672 if test "$cf_cv_cc_bool_type" = 1
16673 then    echo "$as_me:16673: result: yes" >&5
16674 echo "${ECHO_T}yes" >&6
16675 else    echo "$as_me:16675: result: no" >&5
16676 echo "${ECHO_T}no" >&6
16677 fi
16678
16679 # Check for C++ compiler characteristics (and ensure that it's there!)
16680 if test -n "$CXX" ; then
16681         ac_ext=cc
16682 ac_cpp='$CXXCPP $CPPFLAGS'
16683 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16684 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16685 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16686 ac_main_return=return
16687
16688 if test -n "$GXX" ; then
16689 case $cf_cv_system_name in #(vi
16690 os2*) #(vi
16691         cf_stdcpp_libname=stdcpp
16692         ;;
16693 *)
16694         cf_stdcpp_libname=stdc++
16695         ;;
16696 esac
16697 echo "$as_me:16697: checking for library $cf_stdcpp_libname" >&5
16698 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
16699 if test "${cf_cv_libstdcpp+set}" = set; then
16700   echo $ECHO_N "(cached) $ECHO_C" >&6
16701 else
16702
16703         cf_save="$LIBS"
16704         LIBS="-l$cf_stdcpp_libname $LIBS"
16705 cat >conftest.$ac_ext <<_ACEOF
16706 #line 16706 "configure"
16707 #include "confdefs.h"
16708
16709 #include <strstream.h>
16710 int
16711 main ()
16712 {
16713
16714 char buf[80];
16715 strstreambuf foo(buf, sizeof(buf))
16716
16717   ;
16718   return 0;
16719 }
16720 _ACEOF
16721 rm -f conftest.$ac_objext conftest$ac_exeext
16722 if { (eval echo "$as_me:16722: \"$ac_link\"") >&5
16723   (eval $ac_link) 2>&5
16724   ac_status=$?
16725   echo "$as_me:16725: \$? = $ac_status" >&5
16726   (exit $ac_status); } &&
16727          { ac_try='test -s conftest$ac_exeext'
16728   { (eval echo "$as_me:16728: \"$ac_try\"") >&5
16729   (eval $ac_try) 2>&5
16730   ac_status=$?
16731   echo "$as_me:16731: \$? = $ac_status" >&5
16732   (exit $ac_status); }; }; then
16733   cf_cv_libstdcpp=yes
16734 else
16735   echo "$as_me: failed program was:" >&5
16736 cat conftest.$ac_ext >&5
16737 cf_cv_libstdcpp=no
16738 fi
16739 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16740         LIBS="$cf_save"
16741
16742 fi
16743 echo "$as_me:16743: result: $cf_cv_libstdcpp" >&5
16744 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
16745 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
16746 fi
16747
16748         echo "$as_me:16748: checking whether $CXX understands -c and -o together" >&5
16749 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
16750 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
16751   echo $ECHO_N "(cached) $ECHO_C" >&6
16752 else
16753
16754 cat > conftest.$ac_ext <<CF_EOF
16755 #include <stdio.h>
16756 int main()
16757 {
16758         ${cf_cv_main_return:-return}(0);
16759 }
16760 CF_EOF
16761 # We do the test twice because some compilers refuse to overwrite an
16762 # existing .o file with -o, though they will create one.
16763 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
16764 if { (eval echo "$as_me:16764: \"$ac_try\"") >&5
16765   (eval $ac_try) 2>&5
16766   ac_status=$?
16767   echo "$as_me:16767: \$? = $ac_status" >&5
16768   (exit $ac_status); } &&
16769   test -f conftest2.$ac_objext && { (eval echo "$as_me:16769: \"$ac_try\"") >&5
16770   (eval $ac_try) 2>&5
16771   ac_status=$?
16772   echo "$as_me:16772: \$? = $ac_status" >&5
16773   (exit $ac_status); };
16774 then
16775   eval cf_cv_prog_CXX_c_o=yes
16776 else
16777   eval cf_cv_prog_CXX_c_o=no
16778 fi
16779 rm -f conftest*
16780
16781 fi
16782 if test $cf_cv_prog_CXX_c_o = yes; then
16783   echo "$as_me:16783: result: yes" >&5
16784 echo "${ECHO_T}yes" >&6
16785 else
16786   echo "$as_me:16786: result: no" >&5
16787 echo "${ECHO_T}no" >&6
16788 fi
16789
16790         case $GXX_VERSION in
16791         1*|2.0-6*)
16792                 cf_cxx_library=yes
16793                 ;;
16794         *-2.7*|2.7*)
16795
16796 cf_cxx_library=unknown
16797 case $cf_cv_system_name in #(vi
16798 os2*) #(vi
16799         cf_gpp_libname=gpp
16800         ;;
16801 *)
16802         cf_gpp_libname=g++
16803         ;;
16804 esac
16805 if test "$GXX" = yes; then
16806         echo "$as_me:16806: checking for lib$cf_gpp_libname" >&5
16807 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
16808         cf_save="$LIBS"
16809         LIBS="-l$cf_gpp_libname $LIBS"
16810         cat >conftest.$ac_ext <<_ACEOF
16811 #line 16811 "configure"
16812 #include "confdefs.h"
16813
16814 #include <$cf_gpp_libname/builtin.h>
16815
16816 int
16817 main ()
16818 {
16819 two_arg_error_handler_t foo2 = lib_error_handler
16820   ;
16821   return 0;
16822 }
16823 _ACEOF
16824 rm -f conftest.$ac_objext conftest$ac_exeext
16825 if { (eval echo "$as_me:16825: \"$ac_link\"") >&5
16826   (eval $ac_link) 2>&5
16827   ac_status=$?
16828   echo "$as_me:16828: \$? = $ac_status" >&5
16829   (exit $ac_status); } &&
16830          { ac_try='test -s conftest$ac_exeext'
16831   { (eval echo "$as_me:16831: \"$ac_try\"") >&5
16832   (eval $ac_try) 2>&5
16833   ac_status=$?
16834   echo "$as_me:16834: \$? = $ac_status" >&5
16835   (exit $ac_status); }; }; then
16836   cf_cxx_library=yes
16837          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
16838          if test "$cf_gpp_libname" = cpp ; then
16839             cat >>confdefs.h <<\EOF
16840 #define HAVE_GPP_BUILTIN_H 1
16841 EOF
16842
16843          else
16844             cat >>confdefs.h <<\EOF
16845 #define HAVE_GXX_BUILTIN_H 1
16846 EOF
16847
16848          fi
16849 else
16850   echo "$as_me: failed program was:" >&5
16851 cat conftest.$ac_ext >&5
16852 cat >conftest.$ac_ext <<_ACEOF
16853 #line 16853 "configure"
16854 #include "confdefs.h"
16855
16856 #include <builtin.h>
16857
16858 int
16859 main ()
16860 {
16861 two_arg_error_handler_t foo2 = lib_error_handler
16862   ;
16863   return 0;
16864 }
16865 _ACEOF
16866 rm -f conftest.$ac_objext conftest$ac_exeext
16867 if { (eval echo "$as_me:16867: \"$ac_link\"") >&5
16868   (eval $ac_link) 2>&5
16869   ac_status=$?
16870   echo "$as_me:16870: \$? = $ac_status" >&5
16871   (exit $ac_status); } &&
16872          { ac_try='test -s conftest$ac_exeext'
16873   { (eval echo "$as_me:16873: \"$ac_try\"") >&5
16874   (eval $ac_try) 2>&5
16875   ac_status=$?
16876   echo "$as_me:16876: \$? = $ac_status" >&5
16877   (exit $ac_status); }; }; then
16878   cf_cxx_library=yes
16879          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
16880          cat >>confdefs.h <<\EOF
16881 #define HAVE_BUILTIN_H 1
16882 EOF
16883
16884 else
16885   echo "$as_me: failed program was:" >&5
16886 cat conftest.$ac_ext >&5
16887 cf_cxx_library=no
16888 fi
16889 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16890 fi
16891 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16892         LIBS="$cf_save"
16893         echo "$as_me:16893: result: $cf_cxx_library" >&5
16894 echo "${ECHO_T}$cf_cxx_library" >&6
16895 fi
16896
16897                 ;;
16898         *)
16899                 cf_cxx_library=no
16900                 ;;
16901         esac
16902
16903         ac_ext=cc
16904 ac_cpp='$CXXCPP $CPPFLAGS'
16905 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16906 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16907 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16908 ac_main_return=return
16909 echo "$as_me:16909: checking how to run the C++ preprocessor" >&5
16910 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
16911 if test -z "$CXXCPP"; then
16912   if test "${ac_cv_prog_CXXCPP+set}" = set; then
16913   echo $ECHO_N "(cached) $ECHO_C" >&6
16914 else
16915       # Double quotes because CXXCPP needs to be expanded
16916     for CXXCPP in "$CXX -E" "/lib/cpp"
16917     do
16918       ac_preproc_ok=false
16919 for ac_cxx_preproc_warn_flag in '' yes
16920 do
16921   # Use a header file that comes with gcc, so configuring glibc
16922   # with a fresh cross-compiler works.
16923   # On the NeXT, cc -E runs the code through the compiler's parser,
16924   # not just through cpp. "Syntax error" is here to catch this case.
16925   cat >conftest.$ac_ext <<_ACEOF
16926 #line 16926 "configure"
16927 #include "confdefs.h"
16928 #include <assert.h>
16929                      Syntax error
16930 _ACEOF
16931 if { (eval echo "$as_me:16931: \"$ac_cpp conftest.$ac_ext\"") >&5
16932   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16933   ac_status=$?
16934   egrep -v '^ *\+' conftest.er1 >conftest.err
16935   rm -f conftest.er1
16936   cat conftest.err >&5
16937   echo "$as_me:16937: \$? = $ac_status" >&5
16938   (exit $ac_status); } >/dev/null; then
16939   if test -s conftest.err; then
16940     ac_cpp_err=$ac_cxx_preproc_warn_flag
16941   else
16942     ac_cpp_err=
16943   fi
16944 else
16945   ac_cpp_err=yes
16946 fi
16947 if test -z "$ac_cpp_err"; then
16948   :
16949 else
16950   echo "$as_me: failed program was:" >&5
16951   cat conftest.$ac_ext >&5
16952   # Broken: fails on valid input.
16953 continue
16954 fi
16955 rm -f conftest.err conftest.$ac_ext
16956
16957   # OK, works on sane cases.  Now check whether non-existent headers
16958   # can be detected and how.
16959   cat >conftest.$ac_ext <<_ACEOF
16960 #line 16960 "configure"
16961 #include "confdefs.h"
16962 #include <ac_nonexistent.h>
16963 _ACEOF
16964 if { (eval echo "$as_me:16964: \"$ac_cpp conftest.$ac_ext\"") >&5
16965   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16966   ac_status=$?
16967   egrep -v '^ *\+' conftest.er1 >conftest.err
16968   rm -f conftest.er1
16969   cat conftest.err >&5
16970   echo "$as_me:16970: \$? = $ac_status" >&5
16971   (exit $ac_status); } >/dev/null; then
16972   if test -s conftest.err; then
16973     ac_cpp_err=$ac_cxx_preproc_warn_flag
16974   else
16975     ac_cpp_err=
16976   fi
16977 else
16978   ac_cpp_err=yes
16979 fi
16980 if test -z "$ac_cpp_err"; then
16981   # Broken: success on invalid input.
16982 continue
16983 else
16984   echo "$as_me: failed program was:" >&5
16985   cat conftest.$ac_ext >&5
16986   # Passes both tests.
16987 ac_preproc_ok=:
16988 break
16989 fi
16990 rm -f conftest.err conftest.$ac_ext
16991
16992 done
16993 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16994 rm -f conftest.err conftest.$ac_ext
16995 if $ac_preproc_ok; then
16996   break
16997 fi
16998
16999     done
17000     ac_cv_prog_CXXCPP=$CXXCPP
17001
17002 fi
17003   CXXCPP=$ac_cv_prog_CXXCPP
17004 else
17005   ac_cv_prog_CXXCPP=$CXXCPP
17006 fi
17007 echo "$as_me:17007: result: $CXXCPP" >&5
17008 echo "${ECHO_T}$CXXCPP" >&6
17009 ac_preproc_ok=false
17010 for ac_cxx_preproc_warn_flag in '' yes
17011 do
17012   # Use a header file that comes with gcc, so configuring glibc
17013   # with a fresh cross-compiler works.
17014   # On the NeXT, cc -E runs the code through the compiler's parser,
17015   # not just through cpp. "Syntax error" is here to catch this case.
17016   cat >conftest.$ac_ext <<_ACEOF
17017 #line 17017 "configure"
17018 #include "confdefs.h"
17019 #include <assert.h>
17020                      Syntax error
17021 _ACEOF
17022 if { (eval echo "$as_me:17022: \"$ac_cpp conftest.$ac_ext\"") >&5
17023   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17024   ac_status=$?
17025   egrep -v '^ *\+' conftest.er1 >conftest.err
17026   rm -f conftest.er1
17027   cat conftest.err >&5
17028   echo "$as_me:17028: \$? = $ac_status" >&5
17029   (exit $ac_status); } >/dev/null; then
17030   if test -s conftest.err; then
17031     ac_cpp_err=$ac_cxx_preproc_warn_flag
17032   else
17033     ac_cpp_err=
17034   fi
17035 else
17036   ac_cpp_err=yes
17037 fi
17038 if test -z "$ac_cpp_err"; then
17039   :
17040 else
17041   echo "$as_me: failed program was:" >&5
17042   cat conftest.$ac_ext >&5
17043   # Broken: fails on valid input.
17044 continue
17045 fi
17046 rm -f conftest.err conftest.$ac_ext
17047
17048   # OK, works on sane cases.  Now check whether non-existent headers
17049   # can be detected and how.
17050   cat >conftest.$ac_ext <<_ACEOF
17051 #line 17051 "configure"
17052 #include "confdefs.h"
17053 #include <ac_nonexistent.h>
17054 _ACEOF
17055 if { (eval echo "$as_me:17055: \"$ac_cpp conftest.$ac_ext\"") >&5
17056   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17057   ac_status=$?
17058   egrep -v '^ *\+' conftest.er1 >conftest.err
17059   rm -f conftest.er1
17060   cat conftest.err >&5
17061   echo "$as_me:17061: \$? = $ac_status" >&5
17062   (exit $ac_status); } >/dev/null; then
17063   if test -s conftest.err; then
17064     ac_cpp_err=$ac_cxx_preproc_warn_flag
17065   else
17066     ac_cpp_err=
17067   fi
17068 else
17069   ac_cpp_err=yes
17070 fi
17071 if test -z "$ac_cpp_err"; then
17072   # Broken: success on invalid input.
17073 continue
17074 else
17075   echo "$as_me: failed program was:" >&5
17076   cat conftest.$ac_ext >&5
17077   # Passes both tests.
17078 ac_preproc_ok=:
17079 break
17080 fi
17081 rm -f conftest.err conftest.$ac_ext
17082
17083 done
17084 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17085 rm -f conftest.err conftest.$ac_ext
17086 if $ac_preproc_ok; then
17087   :
17088 else
17089   { { echo "$as_me:17089: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
17090 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
17091    { (exit 1); exit 1; }; }
17092 fi
17093
17094 ac_ext=cc
17095 ac_cpp='$CXXCPP $CPPFLAGS'
17096 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17097 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17098 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17099 ac_main_return=return
17100
17101 for ac_header in iostream typeinfo
17102 do
17103 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17104 echo "$as_me:17104: checking for $ac_header" >&5
17105 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17106 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17107   echo $ECHO_N "(cached) $ECHO_C" >&6
17108 else
17109   cat >conftest.$ac_ext <<_ACEOF
17110 #line 17110 "configure"
17111 #include "confdefs.h"
17112 #include <$ac_header>
17113 _ACEOF
17114 if { (eval echo "$as_me:17114: \"$ac_cpp conftest.$ac_ext\"") >&5
17115   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17116   ac_status=$?
17117   egrep -v '^ *\+' conftest.er1 >conftest.err
17118   rm -f conftest.er1
17119   cat conftest.err >&5
17120   echo "$as_me:17120: \$? = $ac_status" >&5
17121   (exit $ac_status); } >/dev/null; then
17122   if test -s conftest.err; then
17123     ac_cpp_err=$ac_cxx_preproc_warn_flag
17124   else
17125     ac_cpp_err=
17126   fi
17127 else
17128   ac_cpp_err=yes
17129 fi
17130 if test -z "$ac_cpp_err"; then
17131   eval "$as_ac_Header=yes"
17132 else
17133   echo "$as_me: failed program was:" >&5
17134   cat conftest.$ac_ext >&5
17135   eval "$as_ac_Header=no"
17136 fi
17137 rm -f conftest.err conftest.$ac_ext
17138 fi
17139 echo "$as_me:17139: result: `eval echo '${'$as_ac_Header'}'`" >&5
17140 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17141 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17142   cat >>confdefs.h <<EOF
17143 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17144 EOF
17145
17146 fi
17147 done
17148
17149     if test x"$ac_cv_header_iostream" = xyes ; then
17150         echo "$as_me:17150: checking if iostream uses std-namespace" >&5
17151 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
17152         cat >conftest.$ac_ext <<_ACEOF
17153 #line 17153 "configure"
17154 #include "confdefs.h"
17155
17156 #include <iostream>
17157 using std::endl;
17158 using std::cerr;
17159 int
17160 main ()
17161 {
17162
17163 cerr << "testing" << endl;
17164
17165   ;
17166   return 0;
17167 }
17168 _ACEOF
17169 rm -f conftest.$ac_objext
17170 if { (eval echo "$as_me:17170: \"$ac_compile\"") >&5
17171   (eval $ac_compile) 2>&5
17172   ac_status=$?
17173   echo "$as_me:17173: \$? = $ac_status" >&5
17174   (exit $ac_status); } &&
17175          { ac_try='test -s conftest.$ac_objext'
17176   { (eval echo "$as_me:17176: \"$ac_try\"") >&5
17177   (eval $ac_try) 2>&5
17178   ac_status=$?
17179   echo "$as_me:17179: \$? = $ac_status" >&5
17180   (exit $ac_status); }; }; then
17181   cf_iostream_namespace=yes
17182 else
17183   echo "$as_me: failed program was:" >&5
17184 cat conftest.$ac_ext >&5
17185 cf_iostream_namespace=no
17186 fi
17187 rm -f conftest.$ac_objext conftest.$ac_ext
17188         echo "$as_me:17188: result: $cf_iostream_namespace" >&5
17189 echo "${ECHO_T}$cf_iostream_namespace" >&6
17190         if test "$cf_iostream_namespace" = yes ; then
17191             cat >>confdefs.h <<\EOF
17192 #define IOSTREAM_NAMESPACE 1
17193 EOF
17194
17195         fi
17196     fi
17197
17198 echo "$as_me:17198: checking if we should include stdbool.h" >&5
17199 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17200
17201 if test "${cf_cv_header_stdbool_h+set}" = set; then
17202   echo $ECHO_N "(cached) $ECHO_C" >&6
17203 else
17204
17205         cat >conftest.$ac_ext <<_ACEOF
17206 #line 17206 "configure"
17207 #include "confdefs.h"
17208
17209 int
17210 main ()
17211 {
17212 bool foo = false
17213   ;
17214   return 0;
17215 }
17216 _ACEOF
17217 rm -f conftest.$ac_objext
17218 if { (eval echo "$as_me:17218: \"$ac_compile\"") >&5
17219   (eval $ac_compile) 2>&5
17220   ac_status=$?
17221   echo "$as_me:17221: \$? = $ac_status" >&5
17222   (exit $ac_status); } &&
17223          { ac_try='test -s conftest.$ac_objext'
17224   { (eval echo "$as_me:17224: \"$ac_try\"") >&5
17225   (eval $ac_try) 2>&5
17226   ac_status=$?
17227   echo "$as_me:17227: \$? = $ac_status" >&5
17228   (exit $ac_status); }; }; then
17229   cf_cv_header_stdbool_h=0
17230 else
17231   echo "$as_me: failed program was:" >&5
17232 cat conftest.$ac_ext >&5
17233 cat >conftest.$ac_ext <<_ACEOF
17234 #line 17234 "configure"
17235 #include "confdefs.h"
17236
17237 #ifndef __BEOS__
17238 #include <stdbool.h>
17239 #endif
17240
17241 int
17242 main ()
17243 {
17244 bool foo = false
17245   ;
17246   return 0;
17247 }
17248 _ACEOF
17249 rm -f conftest.$ac_objext
17250 if { (eval echo "$as_me:17250: \"$ac_compile\"") >&5
17251   (eval $ac_compile) 2>&5
17252   ac_status=$?
17253   echo "$as_me:17253: \$? = $ac_status" >&5
17254   (exit $ac_status); } &&
17255          { ac_try='test -s conftest.$ac_objext'
17256   { (eval echo "$as_me:17256: \"$ac_try\"") >&5
17257   (eval $ac_try) 2>&5
17258   ac_status=$?
17259   echo "$as_me:17259: \$? = $ac_status" >&5
17260   (exit $ac_status); }; }; then
17261   cf_cv_header_stdbool_h=1
17262 else
17263   echo "$as_me: failed program was:" >&5
17264 cat conftest.$ac_ext >&5
17265 cf_cv_header_stdbool_h=0
17266 fi
17267 rm -f conftest.$ac_objext conftest.$ac_ext
17268 fi
17269 rm -f conftest.$ac_objext conftest.$ac_ext
17270 fi
17271
17272 if test "$cf_cv_header_stdbool_h" = 1
17273 then    echo "$as_me:17273: result: yes" >&5
17274 echo "${ECHO_T}yes" >&6
17275 else    echo "$as_me:17275: result: no" >&5
17276 echo "${ECHO_T}no" >&6
17277 fi
17278
17279 echo "$as_me:17279: checking for builtin bool type" >&5
17280 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17281
17282 if test "${cf_cv_builtin_bool+set}" = set; then
17283   echo $ECHO_N "(cached) $ECHO_C" >&6
17284 else
17285
17286         cat >conftest.$ac_ext <<_ACEOF
17287 #line 17287 "configure"
17288 #include "confdefs.h"
17289
17290 #include <stdio.h>
17291 #include <sys/types.h>
17292
17293 int
17294 main ()
17295 {
17296 bool x = false
17297   ;
17298   return 0;
17299 }
17300 _ACEOF
17301 rm -f conftest.$ac_objext
17302 if { (eval echo "$as_me:17302: \"$ac_compile\"") >&5
17303   (eval $ac_compile) 2>&5
17304   ac_status=$?
17305   echo "$as_me:17305: \$? = $ac_status" >&5
17306   (exit $ac_status); } &&
17307          { ac_try='test -s conftest.$ac_objext'
17308   { (eval echo "$as_me:17308: \"$ac_try\"") >&5
17309   (eval $ac_try) 2>&5
17310   ac_status=$?
17311   echo "$as_me:17311: \$? = $ac_status" >&5
17312   (exit $ac_status); }; }; then
17313   cf_cv_builtin_bool=1
17314 else
17315   echo "$as_me: failed program was:" >&5
17316 cat conftest.$ac_ext >&5
17317 cf_cv_builtin_bool=0
17318 fi
17319 rm -f conftest.$ac_objext conftest.$ac_ext
17320
17321 fi
17322
17323 if test "$cf_cv_builtin_bool" = 1
17324 then    echo "$as_me:17324: result: yes" >&5
17325 echo "${ECHO_T}yes" >&6
17326 else    echo "$as_me:17326: result: no" >&5
17327 echo "${ECHO_T}no" >&6
17328 fi
17329
17330 echo "$as_me:17330: checking for size of bool" >&5
17331 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17332 if test "${cf_cv_type_of_bool+set}" = set; then
17333   echo $ECHO_N "(cached) $ECHO_C" >&6
17334 else
17335
17336         rm -f cf_test.out
17337         if test "$cross_compiling" = yes; then
17338   cf_cv_type_of_bool=unknown
17339 else
17340   cat >conftest.$ac_ext <<_ACEOF
17341 #line 17341 "configure"
17342 #include "confdefs.h"
17343
17344 #include <stdlib.h>
17345 #include <stdio.h>
17346
17347 #if defined(__cplusplus)
17348
17349 #ifdef HAVE_GXX_BUILTIN_H
17350 #include <g++/builtin.h>
17351 #elif HAVE_GPP_BUILTIN_H
17352 #include <gpp/builtin.h>
17353 #elif HAVE_BUILTIN_H
17354 #include <builtin.h>
17355 #endif
17356
17357 #else
17358
17359 #if $cf_cv_header_stdbool_h
17360 #include <stdbool.h>
17361 #endif
17362
17363 #endif
17364
17365 main()
17366 {
17367         FILE *fp = fopen("cf_test.out", "w");
17368         if (fp != 0) {
17369                 bool x = true;
17370                 if ((bool)(-x) >= 0)
17371                         fputs("unsigned ", fp);
17372                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17373                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17374                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17375                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17376                 fclose(fp);
17377         }
17378         ${cf_cv_main_return:-return}(0);
17379 }
17380
17381 _ACEOF
17382 rm -f conftest$ac_exeext
17383 if { (eval echo "$as_me:17383: \"$ac_link\"") >&5
17384   (eval $ac_link) 2>&5
17385   ac_status=$?
17386   echo "$as_me:17386: \$? = $ac_status" >&5
17387   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17388   { (eval echo "$as_me:17388: \"$ac_try\"") >&5
17389   (eval $ac_try) 2>&5
17390   ac_status=$?
17391   echo "$as_me:17391: \$? = $ac_status" >&5
17392   (exit $ac_status); }; }; then
17393   cf_cv_type_of_bool=`cat cf_test.out`
17394                  if test -z "$cf_cv_type_of_bool"; then
17395                    cf_cv_type_of_bool=unknown
17396                  fi
17397 else
17398   echo "$as_me: program exited with status $ac_status" >&5
17399 echo "$as_me: failed program was:" >&5
17400 cat conftest.$ac_ext >&5
17401 cf_cv_type_of_bool=unknown
17402 fi
17403 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17404 fi
17405
17406 fi
17407
17408         rm -f cf_test.out
17409 echo "$as_me:17409: result: $cf_cv_type_of_bool" >&5
17410 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17411 if test "$cf_cv_type_of_bool" = unknown ; then
17412         case .$NCURSES_BOOL in #(vi
17413         .auto|.) NCURSES_BOOL=unsigned;;
17414         esac
17415         { echo "$as_me:17415: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17416 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17417         cf_cv_type_of_bool=$NCURSES_BOOL
17418 fi
17419
17420 echo "$as_me:17420: checking for special defines needed for etip.h" >&5
17421 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
17422 cf_save_CXXFLAGS="$CXXFLAGS"
17423 cf_result="none"
17424 for cf_math in "" MATH_H
17425 do
17426 for cf_excp in "" MATH_EXCEPTION
17427 do
17428         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
17429         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
17430         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
17431 cat >conftest.$ac_ext <<_ACEOF
17432 #line 17432 "configure"
17433 #include "confdefs.h"
17434
17435 #include <etip.h.in>
17436
17437 int
17438 main ()
17439 {
17440
17441   ;
17442   return 0;
17443 }
17444 _ACEOF
17445 rm -f conftest.$ac_objext
17446 if { (eval echo "$as_me:17446: \"$ac_compile\"") >&5
17447   (eval $ac_compile) 2>&5
17448   ac_status=$?
17449   echo "$as_me:17449: \$? = $ac_status" >&5
17450   (exit $ac_status); } &&
17451          { ac_try='test -s conftest.$ac_objext'
17452   { (eval echo "$as_me:17452: \"$ac_try\"") >&5
17453   (eval $ac_try) 2>&5
17454   ac_status=$?
17455   echo "$as_me:17455: \$? = $ac_status" >&5
17456   (exit $ac_status); }; }; then
17457
17458         test -n "$cf_math" && cat >>confdefs.h <<EOF
17459 #define ETIP_NEEDS_${cf_math} 1
17460 EOF
17461
17462         test -n "$cf_excp" && cat >>confdefs.h <<EOF
17463 #define ETIP_NEEDS_${cf_excp} 1
17464 EOF
17465
17466         cf_result="$cf_math $cf_excp"
17467         break
17468
17469 else
17470   echo "$as_me: failed program was:" >&5
17471 cat conftest.$ac_ext >&5
17472 fi
17473 rm -f conftest.$ac_objext conftest.$ac_ext
17474 done
17475 done
17476 echo "$as_me:17476: result: $cf_result" >&5
17477 echo "${ECHO_T}$cf_result" >&6
17478 CXXFLAGS="$cf_save_CXXFLAGS"
17479
17480 if test -n "$CXX"; then
17481 echo "$as_me:17481: checking if $CXX accepts parameter initialization" >&5
17482 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
17483 if test "${cf_cv_cpp_param_init+set}" = set; then
17484   echo $ECHO_N "(cached) $ECHO_C" >&6
17485 else
17486
17487         ac_ext=cc
17488 ac_cpp='$CXXCPP $CPPFLAGS'
17489 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17490 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17491 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17492 ac_main_return=return
17493
17494         if test "$cross_compiling" = yes; then
17495   cf_cv_cpp_param_init=unknown
17496 else
17497   cat >conftest.$ac_ext <<_ACEOF
17498 #line 17498 "configure"
17499 #include "confdefs.h"
17500
17501 class TEST {
17502 private:
17503         int value;
17504 public:
17505         TEST(int x = 1);
17506         ~TEST();
17507 };
17508
17509 TEST::TEST(int x = 1)   // some compilers do not like second initializer
17510 {
17511         value = x;
17512 }
17513 void main() { }
17514
17515 _ACEOF
17516 rm -f conftest$ac_exeext
17517 if { (eval echo "$as_me:17517: \"$ac_link\"") >&5
17518   (eval $ac_link) 2>&5
17519   ac_status=$?
17520   echo "$as_me:17520: \$? = $ac_status" >&5
17521   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17522   { (eval echo "$as_me:17522: \"$ac_try\"") >&5
17523   (eval $ac_try) 2>&5
17524   ac_status=$?
17525   echo "$as_me:17525: \$? = $ac_status" >&5
17526   (exit $ac_status); }; }; then
17527   cf_cv_cpp_param_init=yes
17528 else
17529   echo "$as_me: program exited with status $ac_status" >&5
17530 echo "$as_me: failed program was:" >&5
17531 cat conftest.$ac_ext >&5
17532 cf_cv_cpp_param_init=no
17533 fi
17534 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17535 fi
17536         ac_ext=cc
17537 ac_cpp='$CXXCPP $CPPFLAGS'
17538 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17539 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17540 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17541 ac_main_return=return
17542
17543 fi
17544 echo "$as_me:17544: result: $cf_cv_cpp_param_init" >&5
17545 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
17546 fi
17547 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
17548 #define CPP_HAS_PARAM_INIT 1
17549 EOF
17550
17551 if test -n "$CXX"; then
17552
17553 echo "$as_me:17553: checking if $CXX accepts static_cast" >&5
17554 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
17555 if test "${cf_cv_cpp_static_cast+set}" = set; then
17556   echo $ECHO_N "(cached) $ECHO_C" >&6
17557 else
17558
17559         ac_ext=cc
17560 ac_cpp='$CXXCPP $CPPFLAGS'
17561 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17562 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17563 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17564 ac_main_return=return
17565
17566         cat >conftest.$ac_ext <<_ACEOF
17567 #line 17567 "configure"
17568 #include "confdefs.h"
17569
17570 class NCursesPanel
17571 {
17572 public:
17573   NCursesPanel(int nlines,
17574                int ncols,
17575                int begin_y = 0,
17576                int begin_x = 0)
17577   {
17578   }
17579
17580   ~NCursesPanel();
17581 };
17582
17583 template<class T> class NCursesUserPanel : public NCursesPanel
17584 {
17585 public:
17586   NCursesUserPanel (int nlines,
17587                     int ncols,
17588                     int begin_y = 0,
17589                     int begin_x = 0,
17590                     const T* p_UserData = static_cast<T*>(0))
17591     : NCursesPanel (nlines, ncols, begin_y, begin_x)
17592   {
17593   };
17594   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
17595   {
17596   };
17597
17598   virtual ~NCursesUserPanel() {};
17599 };
17600
17601 int
17602 main ()
17603 {
17604
17605         const char* p_UserData = static_cast<char*>(0)
17606   ;
17607   return 0;
17608 }
17609 _ACEOF
17610 rm -f conftest.$ac_objext
17611 if { (eval echo "$as_me:17611: \"$ac_compile\"") >&5
17612   (eval $ac_compile) 2>&5
17613   ac_status=$?
17614   echo "$as_me:17614: \$? = $ac_status" >&5
17615   (exit $ac_status); } &&
17616          { ac_try='test -s conftest.$ac_objext'
17617   { (eval echo "$as_me:17617: \"$ac_try\"") >&5
17618   (eval $ac_try) 2>&5
17619   ac_status=$?
17620   echo "$as_me:17620: \$? = $ac_status" >&5
17621   (exit $ac_status); }; }; then
17622   cf_cv_cpp_static_cast=yes
17623 else
17624   echo "$as_me: failed program was:" >&5
17625 cat conftest.$ac_ext >&5
17626 cf_cv_cpp_static_cast=no
17627 fi
17628 rm -f conftest.$ac_objext conftest.$ac_ext
17629
17630         ac_ext=cc
17631 ac_cpp='$CXXCPP $CPPFLAGS'
17632 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17633 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17634 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17635 ac_main_return=return
17636
17637 fi
17638 echo "$as_me:17638: result: $cf_cv_cpp_static_cast" >&5
17639 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
17640
17641 fi
17642
17643 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
17644 #define CPP_HAS_STATIC_CAST 1
17645 EOF
17646
17647         CXX_AR='$(AR)'
17648         CXX_ARFLAGS='$(ARFLAGS)'
17649         case $cf_cv_system_name in #(vi
17650         irix*) #(vi
17651             if test "$GXX" != yes ; then
17652                 CXX_AR='$(CXX)'
17653                 CXX_ARFLAGS='-ar -o'
17654             fi
17655             ;;
17656         sco3.2v5*) #(vi
17657             CXXLDFLAGS="-u main"
17658             ;;
17659         solaris2*)
17660             if test "$GXX" != yes ; then
17661                 CXX_AR='$(CXX)'
17662                 CXX_ARFLAGS='-xar -o'
17663             fi
17664             ;;
17665         esac
17666
17667 else
17668         cf_cxx_library=no
17669         cf_cv_builtin_bool=1
17670
17671         # Just because we are not configuring against C++ right now does not
17672         # mean that a user will not want to use C++.  Some distributors disable
17673         # the C++ portion of this configuration as a shortcut (or just to avoid
17674         # compiling the demo in the c++ directory).  So we need a reasonable
17675         # default for the 'bool' type.
17676         #
17677         # Caveat: since the storage of the bool type is not standardized, it
17678         # may change.
17679
17680         if test "$NCURSES_BOOL" != auto ; then
17681                 cf_cv_type_of_bool=$NCURSES_BOOL
17682                 cf_cv_header_stdbool_h=0
17683         else
17684                 if test "$cf_cv_header_stdbool_h" = 1 ; then
17685
17686 echo "$as_me:17686: checking for size of bool" >&5
17687 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17688 if test "${cf_cv_type_of_bool+set}" = set; then
17689   echo $ECHO_N "(cached) $ECHO_C" >&6
17690 else
17691
17692         rm -f cf_test.out
17693         if test "$cross_compiling" = yes; then
17694   cf_cv_type_of_bool=unknown
17695 else
17696   cat >conftest.$ac_ext <<_ACEOF
17697 #line 17697 "configure"
17698 #include "confdefs.h"
17699
17700 #include <stdlib.h>
17701 #include <stdio.h>
17702
17703 #if defined(__cplusplus)
17704
17705 #ifdef HAVE_GXX_BUILTIN_H
17706 #include <g++/builtin.h>
17707 #elif HAVE_GPP_BUILTIN_H
17708 #include <gpp/builtin.h>
17709 #elif HAVE_BUILTIN_H
17710 #include <builtin.h>
17711 #endif
17712
17713 #else
17714
17715 #if $cf_cv_header_stdbool_h
17716 #include <stdbool.h>
17717 #endif
17718
17719 #endif
17720
17721 main()
17722 {
17723         FILE *fp = fopen("cf_test.out", "w");
17724         if (fp != 0) {
17725                 bool x = true;
17726                 if ((bool)(-x) >= 0)
17727                         fputs("unsigned ", fp);
17728                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17729                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17730                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17731                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17732                 fclose(fp);
17733         }
17734         ${cf_cv_main_return:-return}(0);
17735 }
17736
17737 _ACEOF
17738 rm -f conftest$ac_exeext
17739 if { (eval echo "$as_me:17739: \"$ac_link\"") >&5
17740   (eval $ac_link) 2>&5
17741   ac_status=$?
17742   echo "$as_me:17742: \$? = $ac_status" >&5
17743   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17744   { (eval echo "$as_me:17744: \"$ac_try\"") >&5
17745   (eval $ac_try) 2>&5
17746   ac_status=$?
17747   echo "$as_me:17747: \$? = $ac_status" >&5
17748   (exit $ac_status); }; }; then
17749   cf_cv_type_of_bool=`cat cf_test.out`
17750                  if test -z "$cf_cv_type_of_bool"; then
17751                    cf_cv_type_of_bool=unknown
17752                  fi
17753 else
17754   echo "$as_me: program exited with status $ac_status" >&5
17755 echo "$as_me: failed program was:" >&5
17756 cat conftest.$ac_ext >&5
17757 cf_cv_type_of_bool=unknown
17758 fi
17759 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17760 fi
17761
17762 fi
17763
17764         rm -f cf_test.out
17765 echo "$as_me:17765: result: $cf_cv_type_of_bool" >&5
17766 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17767 if test "$cf_cv_type_of_bool" = unknown ; then
17768         case .$NCURSES_BOOL in #(vi
17769         .auto|.) NCURSES_BOOL=unsigned;;
17770         esac
17771         { echo "$as_me:17771: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17772 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17773         cf_cv_type_of_bool=$NCURSES_BOOL
17774 fi
17775
17776                 else
17777                         echo "$as_me:17777: checking for fallback type of bool" >&5
17778 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
17779                         case "$host_cpu" in #(vi
17780                         i?86)   cf_cv_type_of_bool=char ;; #(vi
17781                         *)      cf_cv_type_of_bool=int  ;;
17782                         esac
17783                         echo "$as_me:17783: result: $cf_cv_type_of_bool" >&5
17784 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17785                 fi
17786         fi
17787 fi
17788
17789 # If the C compiler did not declare bool, and we did not determine that the C++
17790 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
17791 # ncurses library use the same type as C++ bool.  Note that this allows one to
17792 # specify the type of bool in a configure-script option and postpone
17793 # integration with the C++ compiler provided that the types are compatible.
17794 USE_CXX_BOOL=1
17795 if test $cf_cv_cc_bool_type = 1
17796 then
17797         # oops: C has a bool.  Unlikely, but C++ could differ.
17798         USE_CXX_BOOL=0
17799 elif test $cf_cv_builtin_bool = 0
17800 then
17801         # C++ has no bool
17802         USE_CXX_BOOL=0
17803 else
17804         # this is the normal case
17805         USE_CXX_BOOL='defined(__cplusplus)'
17806 fi
17807
17808 if test -f "${srcdir}/Ada95/Makefile.in" ; then
17809
17810 if test "$cf_with_ada" != "no" ; then
17811     if test "$with_libtool" != "no"; then
17812         { echo "$as_me:17812: WARNING: libtool does not support Ada - disabling feature" >&5
17813 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
17814         cf_with_ada=no
17815     fi
17816 fi
17817
17818 if test "$cf_with_ada" != "no" ; then
17819 cf_ada_make=gnatmake
17820 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
17821 set dummy $cf_ada_make; ac_word=$2
17822 echo "$as_me:17822: checking for $ac_word" >&5
17823 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17824 if test "${ac_cv_prog_gnat_exists+set}" = set; then
17825   echo $ECHO_N "(cached) $ECHO_C" >&6
17826 else
17827   if test -n "$gnat_exists"; then
17828   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
17829 else
17830   ac_save_IFS=$IFS; IFS=$ac_path_separator
17831 ac_dummy="$PATH"
17832 for ac_dir in $ac_dummy; do
17833   IFS=$ac_save_IFS
17834   test -z "$ac_dir" && ac_dir=.
17835   $as_executable_p "$ac_dir/$ac_word" || continue
17836 ac_cv_prog_gnat_exists="yes"
17837 echo "$as_me:17837: found $ac_dir/$ac_word" >&5
17838 break
17839 done
17840
17841   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
17842 fi
17843 fi
17844 gnat_exists=$ac_cv_prog_gnat_exists
17845 if test -n "$gnat_exists"; then
17846   echo "$as_me:17846: result: $gnat_exists" >&5
17847 echo "${ECHO_T}$gnat_exists" >&6
17848 else
17849   echo "$as_me:17849: result: no" >&5
17850 echo "${ECHO_T}no" >&6
17851 fi
17852
17853 if test "$ac_cv_prog_gnat_exists" = no; then
17854    cf_ada_make=
17855 else
17856
17857 echo "$as_me:17857: checking for gnat version" >&5
17858 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17859 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
17860   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17861 echo "$as_me:17861: result: $cf_gnat_version" >&5
17862 echo "${ECHO_T}$cf_gnat_version" >&6
17863
17864 case $cf_gnat_version in
17865   3.1[1-9]*|3.[2-9]*|[4-9].*)
17866     cf_cv_prog_gnat_correct=yes
17867     ;;
17868   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
17869      cf_cv_prog_gnat_correct=no
17870      ;;
17871 esac
17872 case $cf_gnat_version in
17873   3.[1-9]*|[4-9].*)
17874       cf_compile_generics=generics
17875       cf_generic_objects="\${GENOBJS}"
17876       ;;
17877   *)  cf_compile_generics=
17878       cf_generic_objects=
17879       ;;
17880 esac
17881
17882    # Extract the first word of "m4", so it can be a program name with args.
17883 set dummy m4; ac_word=$2
17884 echo "$as_me:17884: checking for $ac_word" >&5
17885 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17886 if test "${ac_cv_prog_M4_exists+set}" = set; then
17887   echo $ECHO_N "(cached) $ECHO_C" >&6
17888 else
17889   if test -n "$M4_exists"; then
17890   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17891 else
17892   ac_save_IFS=$IFS; IFS=$ac_path_separator
17893 ac_dummy="$PATH"
17894 for ac_dir in $ac_dummy; do
17895   IFS=$ac_save_IFS
17896   test -z "$ac_dir" && ac_dir=.
17897   $as_executable_p "$ac_dir/$ac_word" || continue
17898 ac_cv_prog_M4_exists="yes"
17899 echo "$as_me:17899: found $ac_dir/$ac_word" >&5
17900 break
17901 done
17902
17903   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17904 fi
17905 fi
17906 M4_exists=$ac_cv_prog_M4_exists
17907 if test -n "$M4_exists"; then
17908   echo "$as_me:17908: result: $M4_exists" >&5
17909 echo "${ECHO_T}$M4_exists" >&6
17910 else
17911   echo "$as_me:17911: result: no" >&5
17912 echo "${ECHO_T}no" >&6
17913 fi
17914
17915    if test "$ac_cv_prog_M4_exists" = no; then
17916       cf_cv_prog_gnat_correct=no
17917       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
17918    fi
17919    if test "$cf_cv_prog_gnat_correct" = yes; then
17920       echo "$as_me:17920: checking if GNAT works" >&5
17921 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17922
17923 rm -f conftest*
17924 cat >>conftest.ads <<CF_EOF
17925 procedure conftest;
17926 CF_EOF
17927 cat >>conftest.adb <<CF_EOF
17928 with Text_IO;
17929 with GNAT.OS_Lib;
17930 procedure conftest is
17931 begin
17932    Text_IO.Put ("Hello World");
17933    Text_IO.New_Line;
17934    GNAT.OS_Lib.OS_Exit (0);
17935 end conftest;
17936 CF_EOF
17937 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17938    if ( ./conftest 1>&5 2>&1 ) ; then
17939       cf_cv_prog_gnat_correct=yes
17940    else
17941       cf_cv_prog_gnat_correct=no
17942    fi
17943 else
17944    cf_cv_prog_gnat_correct=no
17945 fi
17946 rm -f conftest*
17947
17948       echo "$as_me:17948: result: $cf_cv_prog_gnat_correct" >&5
17949 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17950    fi
17951 fi
17952 if test "$cf_cv_prog_gnat_correct" = yes; then
17953    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
17954
17955    echo "$as_me:17955: checking if GNAT pragma Unreferenced works" >&5
17956 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
17957
17958 rm -f conftest*
17959 cat >>conftest.ads <<CF_EOF
17960 procedure conftest;
17961 CF_EOF
17962 cat >>conftest.adb <<CF_EOF
17963 with Text_IO;
17964 with GNAT.OS_Lib;
17965 procedure conftest is
17966    test : Integer;
17967    pragma Unreferenced (test);
17968 begin
17969    test := 1;
17970    Text_IO.Put ("Hello World");
17971    Text_IO.New_Line;
17972    GNAT.OS_Lib.OS_Exit (0);
17973 end conftest;
17974 CF_EOF
17975 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17976       cf_cv_pragma_unreferenced=yes
17977 else
17978    cf_cv_pragma_unreferenced=no
17979 fi
17980 rm -f conftest*
17981
17982    echo "$as_me:17982: result: $cf_cv_pragma_unreferenced" >&5
17983 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
17984
17985    # if the pragma is supported, use it (needed in the Trace code).
17986    if test $cf_cv_pragma_unreferenced = yes ; then
17987       PRAGMA_UNREF=TRUE
17988    else
17989       PRAGMA_UNREF=FALSE
17990    fi
17991
17992 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17993 if test "${with_ada_compiler+set}" = set; then
17994   withval="$with_ada_compiler"
17995   cf_ada_compiler=$withval
17996 else
17997   cf_ada_compiler=gnatmake
17998 fi;
17999
18000    cf_ada_package=terminal_interface
18001
18002 # Check whether --with-ada-include or --without-ada-include was given.
18003 if test "${with_ada_include+set}" = set; then
18004   withval="$with_ada_include"
18005
18006 else
18007   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
18008 fi; if test -n "$prefix/lib/ada/adainclude" ; then
18009
18010 if test "x$prefix" != xNONE; then
18011   cf_path_syntax="$prefix"
18012 else
18013   cf_path_syntax="$ac_default_prefix"
18014 fi
18015
18016 case ".$withval" in #(vi
18017 .\$\(*\)*|.\'*\'*) #(vi
18018   ;;
18019 ..|./*|.\\*) #(vi
18020   ;;
18021 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18022   ;;
18023 .\${*prefix}*) #(vi
18024   eval withval="$withval"
18025   case ".$withval" in #(vi
18026   .NONE/*)
18027     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18028     ;;
18029   esac
18030   ;; #(vi
18031 .no|.NONE/*)
18032   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18033   ;;
18034 *)
18035   { { echo "$as_me:18035: error: expected a pathname, not \"$withval\"" >&5
18036 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18037    { (exit 1); exit 1; }; }
18038   ;;
18039 esac
18040
18041 fi
18042 ADA_INCLUDE="$withval"
18043
18044 # Check whether --with-ada-objects or --without-ada-objects was given.
18045 if test "${with_ada_objects+set}" = set; then
18046   withval="$with_ada_objects"
18047
18048 else
18049   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
18050 fi; if test -n "$prefix/lib/ada/adalib" ; then
18051
18052 if test "x$prefix" != xNONE; then
18053   cf_path_syntax="$prefix"
18054 else
18055   cf_path_syntax="$ac_default_prefix"
18056 fi
18057
18058 case ".$withval" in #(vi
18059 .\$\(*\)*|.\'*\'*) #(vi
18060   ;;
18061 ..|./*|.\\*) #(vi
18062   ;;
18063 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18064   ;;
18065 .\${*prefix}*) #(vi
18066   eval withval="$withval"
18067   case ".$withval" in #(vi
18068   .NONE/*)
18069     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18070     ;;
18071   esac
18072   ;; #(vi
18073 .no|.NONE/*)
18074   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18075   ;;
18076 *)
18077   { { echo "$as_me:18077: error: expected a pathname, not \"$withval\"" >&5
18078 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18079    { (exit 1); exit 1; }; }
18080   ;;
18081 esac
18082
18083 fi
18084 ADA_OBJECTS="$withval"
18085
18086 fi
18087 fi
18088 else
18089    cf_with_ada=no
18090 fi
18091
18092 ### Construct the ncurses library-subsets, if any, from this set of keywords:
18093 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
18094 ###
18095 ### ticlib modules may be a separate library, otherwise contained in termlib.
18096 ### termlib modules may be a separate library, otherwise contained in ncurses.
18097 ###
18098 ### The of "+" or " " between the tokens controls the way the script
18099 ### chooses to split module lists into libraries.
18100 ###
18101 ### (see CF_LIB_RULES).
18102 echo "$as_me:18102: checking for library subsets" >&5
18103 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
18104 LIB_SUBSETS=
18105
18106 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
18107         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
18108         if test "$with_ticlib" != no ; then
18109                 LIB_SUBSETS="${LIB_SUBSETS} "
18110         else
18111                 LIB_SUBSETS="${LIB_SUBSETS}+"
18112         fi
18113 fi
18114
18115 LIB_SUBSETS="${LIB_SUBSETS}termlib"
18116 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
18117
18118 if test "$with_termlib" != no ; then
18119         LIB_SUBSETS="${LIB_SUBSETS} "
18120 else
18121         LIB_SUBSETS="${LIB_SUBSETS}+"
18122 fi
18123
18124 LIB_SUBSETS="${LIB_SUBSETS}base"
18125
18126 # Most term-driver calls are to tinfo, but some like init_pair are to the
18127 # base library (so it resides in base).
18128 if test "$with_term_driver" != no ; then
18129         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
18130         case $cf_cv_system_name in #(vi
18131         *mingw32*) #(vi
18132                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
18133                 ;;
18134         *) #(vi
18135                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
18136                 ;;
18137         esac
18138 fi
18139
18140 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
18141 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
18142
18143 echo "$as_me:18143: result: $LIB_SUBSETS" >&5
18144 echo "${ECHO_T}$LIB_SUBSETS" >&6
18145
18146 ### Construct the list of include-directories to be generated
18147
18148 CPPFLAGS="$CPPFLAGS -I. -I../include"
18149 if test "$srcdir" != "."; then
18150         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
18151 fi
18152 if test "$GCC" != yes; then
18153         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18154 elif test "$includedir" != "/usr/include"; then
18155         if test "$includedir" = '${prefix}/include' ; then
18156                 if test $prefix != /usr ; then
18157                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18158                 fi
18159         else
18160                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
18161         fi
18162 fi
18163
18164 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18165 if test "$srcdir" != "."; then
18166         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18167 fi
18168 if test "$GCC" != yes; then
18169         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18170 elif test "$includedir" != "/usr/include"; then
18171         if test "$includedir" = '${prefix}/include' ; then
18172                 if test $prefix != /usr ; then
18173                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18174                 fi
18175         else
18176                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18177         fi
18178 fi
18179
18180 ### Build up pieces for makefile rules
18181 echo "$as_me:18181: checking default library suffix" >&5
18182 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18183
18184         case $DFT_LWR_MODEL in
18185         libtool) DFT_ARG_SUFFIX=''   ;;
18186         normal)  DFT_ARG_SUFFIX=''   ;;
18187         debug)   DFT_ARG_SUFFIX='_g' ;;
18188         profile) DFT_ARG_SUFFIX='_p' ;;
18189         shared)  DFT_ARG_SUFFIX=''   ;;
18190         esac
18191         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18192 echo "$as_me:18192: result: $DFT_ARG_SUFFIX" >&5
18193 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18194
18195 echo "$as_me:18195: checking default library-dependency suffix" >&5
18196 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18197
18198         case $DFT_LWR_MODEL in #(vi
18199         libtool) #(vi
18200                 DFT_LIB_SUFFIX='.la'
18201                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18202                 ;;
18203         normal) #(vi
18204                 DFT_LIB_SUFFIX='.a'
18205                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18206                 ;;
18207         debug) #(vi
18208                 DFT_LIB_SUFFIX='_g.a'
18209                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18210                 ;;
18211         profile) #(vi
18212                 DFT_LIB_SUFFIX='_p.a'
18213                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18214                 ;;
18215         shared) #(vi
18216                 case $cf_cv_system_name in
18217                 aix[56]*) #(vi
18218                         DFT_LIB_SUFFIX='.a'
18219                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18220                         ;;
18221                 cygwin*) #(vi
18222                         DFT_LIB_SUFFIX='.dll'
18223                         DFT_DEP_SUFFIX='.dll.a'
18224                         ;;
18225                 darwin*) #(vi
18226                         DFT_LIB_SUFFIX='.dylib'
18227                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18228                         ;;
18229                 hpux*) #(vi
18230                         case $target in
18231                         ia64*) #(vi
18232                                 DFT_LIB_SUFFIX='.so'
18233                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18234                                 ;;
18235                         *) #(vi
18236                                 DFT_LIB_SUFFIX='.sl'
18237                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18238                                 ;;
18239                         esac
18240                         ;;
18241                 *)      DFT_LIB_SUFFIX='.so'
18242                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18243                         ;;
18244                 esac
18245         esac
18246         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
18247         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
18248 echo "$as_me:18248: result: $DFT_DEP_SUFFIX" >&5
18249 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18250
18251 echo "$as_me:18251: checking default object directory" >&5
18252 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18253
18254         case $DFT_LWR_MODEL in
18255         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
18256         normal)  DFT_OBJ_SUBDIR='objects' ;;
18257         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
18258         profile) DFT_OBJ_SUBDIR='obj_p' ;;
18259         shared)
18260                 case $cf_cv_system_name in #(vi
18261                 cygwin) #(vi
18262                         DFT_OBJ_SUBDIR='objects' ;;
18263                 *)
18264                         DFT_OBJ_SUBDIR='obj_s' ;;
18265                 esac
18266         esac
18267 echo "$as_me:18267: result: $DFT_OBJ_SUBDIR" >&5
18268 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18269
18270 # libtool thinks it can make c++ shared libraries (perhaps only g++)
18271 if test "$cf_with_cxx" = yes ; then
18272 echo "$as_me:18272: checking c++ library-dependency suffix" >&5
18273 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
18274 if test "$with_libtool" != "no"; then
18275         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
18276 else
18277
18278         case normal in #(vi
18279         libtool) #(vi
18280                 CXX_LIB_SUFFIX='.la'
18281                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18282                 ;;
18283         normal) #(vi
18284                 CXX_LIB_SUFFIX='.a'
18285                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18286                 ;;
18287         debug) #(vi
18288                 CXX_LIB_SUFFIX='_g.a'
18289                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18290                 ;;
18291         profile) #(vi
18292                 CXX_LIB_SUFFIX='_p.a'
18293                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18294                 ;;
18295         shared) #(vi
18296                 case $cf_cv_system_name in
18297                 aix[56]*) #(vi
18298                         CXX_LIB_SUFFIX='.a'
18299                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18300                         ;;
18301                 cygwin*) #(vi
18302                         CXX_LIB_SUFFIX='.dll'
18303                         CXX_DEP_SUFFIX='.dll.a'
18304                         ;;
18305                 darwin*) #(vi
18306                         CXX_LIB_SUFFIX='.dylib'
18307                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18308                         ;;
18309                 hpux*) #(vi
18310                         case $target in
18311                         ia64*) #(vi
18312                                 CXX_LIB_SUFFIX='.so'
18313                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18314                                 ;;
18315                         *) #(vi
18316                                 CXX_LIB_SUFFIX='.sl'
18317                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18318                                 ;;
18319                         esac
18320                         ;;
18321                 *)      CXX_LIB_SUFFIX='.so'
18322                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18323                         ;;
18324                 esac
18325         esac
18326         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
18327         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
18328 fi
18329 echo "$as_me:18329: result: $CXX_LIB_SUFFIX" >&5
18330 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
18331
18332 fi
18333
18334 # do not want -ldl in build except as needed for -lncurses dependency
18335 if test "$with_dlsym" = yes ; then
18336 if test $DFT_LWR_MODEL = shared || \
18337    test $DFT_LWR_MODEL = libtool ; then
18338
18339 # remove dl library from $LIBS
18340 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
18341
18342 fi
18343 fi
18344 ### Set up low-level terminfo dependencies for makefiles.
18345
18346 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
18347 # do not need libdl
18348 TICS_LIST=
18349 if test "$with_dlsym" = yes ; then
18350
18351 # remove dl library from $SHLIB_LIST
18352 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
18353
18354 fi
18355
18356 if test "$with_ticlib" != no ; then
18357
18358         if test "$with_ticlib" != yes ; then
18359                 TICS_NAME=$with_ticlib
18360                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18361                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18362                 TICS_LIB_SUFFIX="${with_ticlib}"
18363         else
18364                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
18365                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
18366                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
18367         fi
18368         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
18369 else
18370         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18371 fi
18372
18373 if test "$with_termlib" != no ; then
18374
18375         if test "$with_termlib" != yes ; then
18376                 TINFO_NAME=$with_termlib
18377                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18378                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18379                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18380                 TINFO_LIB_SUFFIX="${with_termlib}"
18381         else
18382                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18383                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
18384                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
18385                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
18386         fi
18387
18388         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18389         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18390         if test "$DFT_LWR_MODEL" = "libtool"; then
18391                 TEST_ARGS="${TEST_DEPS}"
18392                 TEST_ARG2="${TEST_DEP2}"
18393                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18394                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
18395                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
18396         else
18397                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
18398                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
18399                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18400                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18401                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18402         fi
18403 else
18404         # the next lines are needed for linking libtic over libncurses
18405         TINFO_NAME=${LIB_NAME}
18406         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18407         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
18408         if test "$with_tic_depends" = yes ; then
18409                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18410         else
18411                 TICS_LIST="$SHLIB_LIST"
18412         fi
18413
18414         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18415 fi
18416
18417 if test "$DFT_LWR_MODEL" = shared ; then
18418         case $cf_cv_system_name in #(vi
18419         cygwin*)
18420                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18421                 TINFO_SUFFIX=.dll
18422                 ;;
18423         esac
18424 fi
18425
18426 if test "$with_dlsym" = yes ; then
18427
18428 # remove dl library from $TICS_LIST
18429 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
18430
18431 fi
18432
18433 if test "$DFT_LWR_MODEL" = "libtool"; then
18434     OBJEXT=lo
18435 fi
18436
18437 # needed for Ada95
18438 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
18439
18440 case $DFT_LWR_MODEL in
18441 normal|debug|profile)
18442
18443 if test "$GCC" = yes ; then
18444         case $cf_cv_system_name in #(
18445         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
18446                 LDFLAGS_STATIC=
18447                 LDFLAGS_SHARED=
18448                 ;;
18449     *)  #( normally, except when broken
18450         LDFLAGS_STATIC=-static
18451         LDFLAGS_SHARED=-dynamic
18452         ;;
18453     esac
18454 else
18455         case $cf_cv_system_name in #(
18456         aix[456]*)      #( from ld manpage
18457                 LDFLAGS_STATIC=-bstatic
18458                 LDFLAGS_SHARED=-bdynamic
18459                 ;;
18460         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
18461                 # We could also use just "archive" and "shared".
18462                 LDFLAGS_STATIC=-Wl,-a,archive_shared
18463                 LDFLAGS_SHARED=-Wl,-a,shared_archive
18464                 ;;
18465         irix*)          #( from ld manpage IRIX64
18466                 LDFLAGS_STATIC=-Bstatic
18467                 LDFLAGS_SHARED=-Bdynamic
18468                 ;;
18469         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
18470                 # alternative "-oldstyle_liblookup" (not in cc manpage)
18471                 LDFLAGS_STATIC=-noso
18472                 LDFLAGS_SHARED=-so_archive
18473                 ;;
18474         solaris2*)
18475                 LDFLAGS_STATIC=-Bstatic
18476                 LDFLAGS_SHARED=-Bdynamic
18477                 ;;
18478         esac
18479 fi
18480
18481         ;;
18482 esac
18483
18484 echo "$as_me:18484: checking where we will install curses.h" >&5
18485 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
18486 test "$with_overwrite" = no && \
18487 test "x$includedir" = 'x${prefix}/include' && \
18488         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
18489 echo "$as_me:18489: result: $includedir" >&5
18490 echo "${ECHO_T}$includedir" >&6
18491
18492 ### Resolve a conflict between normal and wide-curses by forcing applications
18493 ### that will need libutf8 to add it to their configure script.
18494 if test "$with_overwrite" != no ; then
18495 if test "$NCURSES_LIBUTF8" = 1 ; then
18496         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
18497         { echo "$as_me:18497: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
18498 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
18499 fi
18500 fi
18501 WITH_OVERWRITE=$with_overwrite
18502
18503 # used to separate tack out of the tree
18504 NCURSES_TREE=
18505
18506 ### predefined stuff for the test programs
18507 cat >>confdefs.h <<\EOF
18508 #define HAVE_SLK_COLOR 1
18509 EOF
18510
18511 ### Construct the list of subdirectories for which we'll customize makefiles
18512 ### with the appropriate compile-rules.
18513
18514 echo "$as_me:18514: checking for src modules" >&5
18515 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
18516
18517 # dependencies and linker-arguments for test-programs
18518 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
18519 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
18520 if test "$DFT_LWR_MODEL" = "libtool"; then
18521         TEST_ARGS="${TEST_DEPS}"
18522         TEST_ARG2="${TEST_DEP2}"
18523 else
18524         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
18525         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
18526 fi
18527
18528 cf_cv_src_modules=
18529 for cf_dir in $modules_to_build
18530 do
18531         if test -f $srcdir/$cf_dir/modules; then
18532
18533                 # We may/may not have tack in the distribution, though the
18534                 # makefile is.
18535                 if test $cf_dir = tack ; then
18536                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
18537                                 continue
18538                         fi
18539                 fi
18540
18541                 if test -z "$cf_cv_src_modules"; then
18542                         cf_cv_src_modules=$cf_dir
18543                 else
18544                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
18545                 fi
18546
18547                 # Make the ncurses_cfg.h file record the library interface files as
18548                 # well.  These are header files that are the same name as their
18549                 # directory.  Ncurses is the only library that does not follow
18550                 # that pattern.
18551                 if test $cf_dir = tack ; then
18552                         continue
18553                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
18554
18555 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18556
18557                         cat >>confdefs.h <<EOF
18558 #define HAVE_${cf_have_include}_H 1
18559 EOF
18560
18561                         cat >>confdefs.h <<EOF
18562 #define HAVE_LIB${cf_have_include} 1
18563 EOF
18564
18565                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
18566                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
18567                         if test "$DFT_LWR_MODEL" = "libtool"; then
18568                                 TEST_ARGS="${TEST_DEPS}"
18569                                 TEST_ARG2="${TEST_DEP2}"
18570                         else
18571                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
18572                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
18573                         fi
18574                 fi
18575         fi
18576 done
18577 echo "$as_me:18577: result: $cf_cv_src_modules" >&5
18578 echo "${ECHO_T}$cf_cv_src_modules" >&6
18579
18580 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
18581 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
18582
18583 SRC_SUBDIRS=
18584 if test "x$cf_with_manpages" != xno ; then
18585         SRC_SUBDIRS="$SRC_SUBDIRS man"
18586 fi
18587 SRC_SUBDIRS="$SRC_SUBDIRS include"
18588 for cf_dir in $cf_cv_src_modules
18589 do
18590         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
18591 done
18592 SRC_SUBDIRS="$SRC_SUBDIRS test"
18593 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
18594 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
18595
18596 ADA_SUBDIRS=
18597 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
18598         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
18599         ADA_SUBDIRS="gen src samples"
18600 fi
18601
18602 SUB_MAKEFILES=
18603 for cf_dir in $SRC_SUBDIRS
18604 do
18605         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18606 done
18607
18608 if test -n "$ADA_SUBDIRS"; then
18609         for cf_dir in $ADA_SUBDIRS
18610         do
18611                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
18612         done
18613
18614 fi
18615
18616 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
18617    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
18618    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
18619 fi
18620
18621 DIRS_TO_MAKE="lib"
18622 for cf_item in $cf_list_models
18623 do
18624
18625         case $cf_item in
18626         libtool) cf_subdir='obj_lo'  ;;
18627         normal)  cf_subdir='objects' ;;
18628         debug)   cf_subdir='obj_g' ;;
18629         profile) cf_subdir='obj_p' ;;
18630         shared)
18631                 case $cf_cv_system_name in #(vi
18632                 cygwin) #(vi
18633                         cf_subdir='objects' ;;
18634                 *)
18635                         cf_subdir='obj_s' ;;
18636                 esac
18637         esac
18638
18639         for cf_item2 in $DIRS_TO_MAKE
18640         do
18641                 test $cf_item2 = $cf_subdir && break
18642         done
18643         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
18644 done
18645 for cf_dir in $DIRS_TO_MAKE
18646 do
18647         test ! -d $cf_dir && mkdir $cf_dir
18648 done
18649
18650 # symbols that differ when compiling Ada95 by itself.
18651 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
18652
18653 NCURSES_COPY2='sh $(top_srcdir)/tar-copy.sh'
18654
18655 # values to use as strings
18656 cat >>confdefs.h <<EOF
18657 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18658 EOF
18659
18660 cat >>confdefs.h <<EOF
18661 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
18662 EOF
18663
18664 ### Now that we're done running tests, add the compiler-warnings, if any
18665
18666 cf_fix_cppflags=no
18667 cf_new_cflags=
18668 cf_new_cppflags=
18669 cf_new_extra_cppflags=
18670
18671 for cf_add_cflags in $EXTRA_CFLAGS
18672 do
18673 case $cf_fix_cppflags in
18674 no)
18675         case $cf_add_cflags in #(vi
18676         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
18677                 case $cf_add_cflags in
18678                 -D*)
18679                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18680
18681                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
18682                                 && test -z "${cf_tst_cflags}" \
18683                                 && cf_fix_cppflags=yes
18684
18685                         if test $cf_fix_cppflags = yes ; then
18686                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18687                                 continue
18688                         elif test "${cf_tst_cflags}" = "\"'" ; then
18689                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18690                                 continue
18691                         fi
18692                         ;;
18693                 esac
18694                 case "$CPPFLAGS" in
18695                 *$cf_add_cflags) #(vi
18696                         ;;
18697                 *) #(vi
18698                         case $cf_add_cflags in #(vi
18699                         -D*)
18700                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18701
18702 CPPFLAGS=`echo "$CPPFLAGS" | \
18703         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18704                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18705
18706                                 ;;
18707                         esac
18708                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
18709                         ;;
18710                 esac
18711                 ;;
18712         *)
18713                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
18714                 ;;
18715         esac
18716         ;;
18717 yes)
18718         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18719
18720         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18721
18722         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
18723                 && test -z "${cf_tst_cflags}" \
18724                 && cf_fix_cppflags=no
18725         ;;
18726 esac
18727 done
18728
18729 if test -n "$cf_new_cflags" ; then
18730
18731         CFLAGS="$CFLAGS $cf_new_cflags"
18732 fi
18733
18734 if test -n "$cf_new_cppflags" ; then
18735
18736         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
18737 fi
18738
18739 if test -n "$cf_new_extra_cppflags" ; then
18740
18741         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
18742 fi
18743
18744 ### Define substitutions for header files to avoid name-pollution
18745
18746 if test "$cf_cv_have_tcgetattr" = yes ; then
18747         HAVE_TCGETATTR=1
18748 else
18749         HAVE_TCGETATTR=0
18750 fi
18751
18752 if test "$ac_cv_header_termio_h" = yes ; then
18753         HAVE_TERMIO_H=1
18754 else
18755         HAVE_TERMIO_H=0
18756 fi
18757
18758 if test "$ac_cv_header_termios_h" = yes ; then
18759         HAVE_TERMIOS_H=1
18760 else
18761         HAVE_TERMIOS_H=0
18762 fi
18763
18764 ################################################################################
18765 test "$use_database" = yes && \
18766 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
18767
18768 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
18769 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
18770
18771 if test x"$enable_pc_files" = xyes ; then \
18772 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
18773 MAKE_PC_FILES=
18774 else
18775 MAKE_PC_FILES="#"
18776 fi
18777
18778 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"
18779 ac_config_commands="$ac_config_commands default"
18780 cat >confcache <<\_ACEOF
18781 # This file is a shell script that caches the results of configure
18782 # tests run on this system so they can be shared between configure
18783 # scripts and configure runs, see configure's option --config-cache.
18784 # It is not useful on other systems.  If it contains results you don't
18785 # want to keep, you may remove or edit it.
18786 #
18787 # config.status only pays attention to the cache file if you give it
18788 # the --recheck option to rerun configure.
18789 #
18790 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18791 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18792 # following values.
18793
18794 _ACEOF
18795
18796 # The following way of writing the cache mishandles newlines in values,
18797 # but we know of no workaround that is simple, portable, and efficient.
18798 # So, don't put newlines in cache variables' values.
18799 # Ultrix sh set writes to stderr and can't be redirected directly,
18800 # and sets the high bit in the cache file unless we assign to the vars.
18801 {
18802   (set) 2>&1 |
18803     case `(ac_space=' '; set | grep ac_space) 2>&1` in
18804     *ac_space=\ *)
18805       # `set' does not quote correctly, so add quotes (double-quote
18806       # substitution turns \\\\ into \\, and sed turns \\ into \).
18807       sed -n \
18808         "s/'/'\\\\''/g;
18809           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18810       ;;
18811     *)
18812       # `set' quotes correctly as required by POSIX, so do not add quotes.
18813       sed -n \
18814         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18815       ;;
18816     esac;
18817 } |
18818   sed '
18819      t clear
18820      : clear
18821      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18822      t end
18823      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18824      : end' >>confcache
18825 if cmp -s $cache_file confcache; then :; else
18826   if test -w $cache_file; then
18827     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18828     cat confcache >$cache_file
18829   else
18830     echo "not updating unwritable cache $cache_file"
18831   fi
18832 fi
18833 rm -f confcache
18834
18835 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18836 # Let make expand exec_prefix.
18837 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18838
18839 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18840 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18841 # trailing colons and then remove the whole line if VPATH becomes empty
18842 # (actually we leave an empty line to preserve line numbers).
18843 if test "x$srcdir" = x.; then
18844   ac_vpsub='/^[         ]*VPATH[        ]*=/{
18845 s/:*\$(srcdir):*/:/;
18846 s/:*\${srcdir}:*/:/;
18847 s/:*@srcdir@:*/:/;
18848 s/^\([^=]*=[    ]*\):*/\1/;
18849 s/:*$//;
18850 s/^[^=]*=[      ]*$//;
18851 }'
18852 fi
18853
18854 DEFS=-DHAVE_CONFIG_H
18855
18856 : ${CONFIG_STATUS=./config.status}
18857 ac_clean_files_save=$ac_clean_files
18858 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18859 { echo "$as_me:18859: creating $CONFIG_STATUS" >&5
18860 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18861 cat >$CONFIG_STATUS <<_ACEOF
18862 #! $SHELL
18863 # Generated automatically by configure.
18864 # Run this file to recreate the current configuration.
18865 # Compiler output produced by configure, useful for debugging
18866 # configure, is in config.log if it exists.
18867
18868 debug=false
18869 SHELL=\${CONFIG_SHELL-$SHELL}
18870 ac_cs_invocation="\$0 \$@"
18871
18872 _ACEOF
18873
18874 cat >>$CONFIG_STATUS <<\_ACEOF
18875 # Be Bourne compatible
18876 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18877   emulate sh
18878   NULLCMD=:
18879 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18880   set -o posix
18881 fi
18882
18883 # Name of the executable.
18884 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18885
18886 if expr a : '\(a\)' >/dev/null 2>&1; then
18887   as_expr=expr
18888 else
18889   as_expr=false
18890 fi
18891
18892 rm -f conf$$ conf$$.exe conf$$.file
18893 echo >conf$$.file
18894 if ln -s conf$$.file conf$$ 2>/dev/null; then
18895   # We could just check for DJGPP; but this test a) works b) is more generic
18896   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18897   if test -f conf$$.exe; then
18898     # Don't use ln at all; we don't have any links
18899     as_ln_s='cp -p'
18900   else
18901     as_ln_s='ln -s'
18902   fi
18903 elif ln conf$$.file conf$$ 2>/dev/null; then
18904   as_ln_s=ln
18905 else
18906   as_ln_s='cp -p'
18907 fi
18908 rm -f conf$$ conf$$.exe conf$$.file
18909
18910 as_executable_p="test -f"
18911
18912 # Support unset when possible.
18913 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18914   as_unset=unset
18915 else
18916   as_unset=false
18917 fi
18918
18919 # NLS nuisances.
18920 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18921 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18922 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18923 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18924 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18925 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18926 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18927 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18928
18929 # IFS
18930 # We need space, tab and new line, in precisely that order.
18931 as_nl='
18932 '
18933 IFS="   $as_nl"
18934
18935 # CDPATH.
18936 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18937
18938 exec 6>&1
18939
18940 _ACEOF
18941
18942 # Files that config.status was made for.
18943 if test -n "$ac_config_files"; then
18944   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18945 fi
18946
18947 if test -n "$ac_config_headers"; then
18948   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18949 fi
18950
18951 if test -n "$ac_config_links"; then
18952   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18953 fi
18954
18955 if test -n "$ac_config_commands"; then
18956   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18957 fi
18958
18959 cat >>$CONFIG_STATUS <<\EOF
18960
18961 ac_cs_usage="\
18962 \`$as_me' instantiates files from templates according to the
18963 current configuration.
18964
18965 Usage: $0 [OPTIONS] [FILE]...
18966
18967   -h, --help       print this help, then exit
18968   -V, --version    print version number, then exit
18969   -d, --debug      don't remove temporary files
18970       --recheck    update $as_me by reconfiguring in the same conditions
18971   --file=FILE[:TEMPLATE]
18972                    instantiate the configuration file FILE
18973   --header=FILE[:TEMPLATE]
18974                    instantiate the configuration header FILE
18975
18976 Configuration files:
18977 $config_files
18978
18979 Configuration headers:
18980 $config_headers
18981
18982 Configuration commands:
18983 $config_commands
18984
18985 Report bugs to <bug-autoconf@gnu.org>."
18986 EOF
18987
18988 cat >>$CONFIG_STATUS <<EOF
18989 ac_cs_version="\\
18990 config.status
18991 configured by $0, generated by GNU Autoconf 2.52.20100530,
18992   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18993
18994 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18995 Free Software Foundation, Inc.
18996 This config.status script is free software; the Free Software Foundation
18997 gives unlimited permission to copy, distribute and modify it."
18998 srcdir=$srcdir
18999 INSTALL="$INSTALL"
19000 EOF
19001
19002 cat >>$CONFIG_STATUS <<\EOF
19003 # If no file are specified by the user, then we need to provide default
19004 # value.  By we need to know if files were specified by the user.
19005 ac_need_defaults=:
19006 while test $# != 0
19007 do
19008   case $1 in
19009   --*=*)
19010     ac_option=`expr "x$1" : 'x\([^=]*\)='`
19011     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19012     shift
19013     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
19014     shift
19015     ;;
19016   -*);;
19017   *) # This is not an option, so the user has probably given explicit
19018      # arguments.
19019      ac_need_defaults=false;;
19020   esac
19021
19022   case $1 in
19023   # Handling of the options.
19024 EOF
19025 cat >>$CONFIG_STATUS <<EOF
19026   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19027     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
19028     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
19029 EOF
19030 cat >>$CONFIG_STATUS <<\EOF
19031   --version | --vers* | -V )
19032     echo "$ac_cs_version"; exit 0 ;;
19033   --he | --h)
19034     # Conflict between --help and --header
19035     { { echo "$as_me:19035: error: ambiguous option: $1
19036 Try \`$0 --help' for more information." >&5
19037 echo "$as_me: error: ambiguous option: $1
19038 Try \`$0 --help' for more information." >&2;}
19039    { (exit 1); exit 1; }; };;
19040   --help | --hel | -h )
19041     echo "$ac_cs_usage"; exit 0 ;;
19042   --debug | --d* | -d )
19043     debug=: ;;
19044   --file | --fil | --fi | --f )
19045     shift
19046     CONFIG_FILES="$CONFIG_FILES $1"
19047     ac_need_defaults=false;;
19048   --header | --heade | --head | --hea )
19049     shift
19050     CONFIG_HEADERS="$CONFIG_HEADERS $1"
19051     ac_need_defaults=false;;
19052
19053   # This is an error.
19054   -*) { { echo "$as_me:19054: error: unrecognized option: $1
19055 Try \`$0 --help' for more information." >&5
19056 echo "$as_me: error: unrecognized option: $1
19057 Try \`$0 --help' for more information." >&2;}
19058    { (exit 1); exit 1; }; } ;;
19059
19060   *) ac_config_targets="$ac_config_targets $1" ;;
19061
19062   esac
19063   shift
19064 done
19065
19066 exec 5>>config.log
19067 cat >&5 << _ACEOF
19068
19069 ## ----------------------- ##
19070 ## Running config.status.  ##
19071 ## ----------------------- ##
19072
19073 This file was extended by $as_me 2.52.20100530, executed with
19074   CONFIG_FILES    = $CONFIG_FILES
19075   CONFIG_HEADERS  = $CONFIG_HEADERS
19076   CONFIG_LINKS    = $CONFIG_LINKS
19077   CONFIG_COMMANDS = $CONFIG_COMMANDS
19078   > $ac_cs_invocation
19079 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19080
19081 _ACEOF
19082 EOF
19083
19084 cat >>$CONFIG_STATUS <<EOF
19085 #
19086 # INIT-COMMANDS section.
19087 #
19088
19089 ### Special initialization commands, used to pass information from the
19090 ### configuration-run into config.status
19091
19092 AWK="$AWK"
19093 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
19094 DFT_LWR_MODEL="$DFT_LWR_MODEL"
19095 ECHO_LINK="$ECHO_LINK"
19096 LDCONFIG="$LDCONFIG"
19097 LIBTOOL_VERSION="$LIBTOOL_VERSION"
19098 LIB_NAME="$LIB_NAME"
19099 LIB_SUBSETS="$LIB_SUBSETS"
19100 LIB_SUFFIX="$LIB_SUFFIX"
19101 LIB_TRACING="$LIB_TRACING"
19102 MAKE_TERMINFO="$MAKE_TERMINFO"
19103 NCURSES_MAJOR="$NCURSES_MAJOR"
19104 NCURSES_MINOR="$NCURSES_MINOR"
19105 NCURSES_OSPEED="$NCURSES_OSPEED"
19106 NCURSES_PATCH="$NCURSES_PATCH"
19107 SRC_SUBDIRS="$SRC_SUBDIRS"
19108 TERMINFO="$TERMINFO"
19109 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
19110 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
19111 TICS_NAME="$TICS_NAME"
19112 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
19113 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
19114 TINFO_NAME="$TINFO_NAME"
19115 TINFO_SUFFIX="$TINFO_SUFFIX"
19116 WITH_CURSES_H="$with_curses_h"
19117 WITH_ECHO="$with_echo"
19118 WITH_OVERWRITE="$with_overwrite"
19119 cf_LIST_MODELS="$cf_list_models"
19120 cf_cv_abi_version="$cf_cv_abi_version"
19121 cf_cv_do_relink="$cf_cv_do_relink"
19122 cf_cv_do_symlinks="$cf_cv_do_symlinks"
19123 cf_cv_enable_lp64="$cf_cv_enable_lp64"
19124 cf_cv_enable_opaque="$cf_cv_enable_opaque"
19125 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
19126 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
19127 cf_cv_rel_version="$cf_cv_rel_version"
19128 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
19129 cf_cv_shared_soname='$cf_cv_shared_soname'
19130 cf_cv_shlib_version="$cf_cv_shlib_version"
19131 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
19132 cf_cv_system_name="$cf_cv_system_name"
19133 cf_with_cxx_binding="$cf_with_cxx_binding"
19134 cf_with_manpages="$cf_with_manpages"
19135 host="$host"
19136 target="$target"
19137
19138 EOF
19139
19140 cat >>$CONFIG_STATUS <<\EOF
19141 for ac_config_target in $ac_config_targets
19142 do
19143   case "$ac_config_target" in
19144   # Handling of arguments.
19145   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
19146   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
19147   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
19148   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
19149   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
19150   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
19151   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19152   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
19153   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
19154   *) { { echo "$as_me:19154: error: invalid argument: $ac_config_target" >&5
19155 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19156    { (exit 1); exit 1; }; };;
19157   esac
19158 done
19159
19160 # If the user did not use the arguments to specify the items to instantiate,
19161 # then the envvar interface is used.  Set only those that are not.
19162 # We use the long form for the default assignment because of an extremely
19163 # bizarre bug on SunOS 4.1.3.
19164 if $ac_need_defaults; then
19165   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19166   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19167   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19168 fi
19169
19170 # Create a temporary directory, and hook for its removal unless debugging.
19171 $debug ||
19172 {
19173   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19174   trap '{ (exit 1); exit 1; }' 1 2 13 15
19175 }
19176
19177 # Create a (secure) tmp directory for tmp files.
19178 : ${TMPDIR=/tmp}
19179 {
19180   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
19181   test -n "$tmp" && test -d "$tmp"
19182 }  ||
19183 {
19184   tmp=$TMPDIR/cs$$-$RANDOM
19185   (umask 077 && mkdir $tmp)
19186 } ||
19187 {
19188    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
19189    { (exit 1); exit 1; }
19190 }
19191
19192 EOF
19193
19194 cat >>$CONFIG_STATUS <<EOF
19195
19196 #
19197 # CONFIG_FILES section.
19198 #
19199
19200 # No need to generate the scripts if there are no CONFIG_FILES.
19201 # This happens for instance when ./config.status config.h
19202 if test -n "\$CONFIG_FILES"; then
19203   # Protect against being on the right side of a sed subst in config.status.
19204   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19205    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19206 s,@SHELL@,$SHELL,;t t
19207 s,@exec_prefix@,$exec_prefix,;t t
19208 s,@prefix@,$prefix,;t t
19209 s,@program_transform_name@,$program_transform_name,;t t
19210 s,@bindir@,$bindir,;t t
19211 s,@sbindir@,$sbindir,;t t
19212 s,@libexecdir@,$libexecdir,;t t
19213 s,@datadir@,$datadir,;t t
19214 s,@sysconfdir@,$sysconfdir,;t t
19215 s,@sharedstatedir@,$sharedstatedir,;t t
19216 s,@localstatedir@,$localstatedir,;t t
19217 s,@libdir@,$libdir,;t t
19218 s,@includedir@,$includedir,;t t
19219 s,@oldincludedir@,$oldincludedir,;t t
19220 s,@infodir@,$infodir,;t t
19221 s,@mandir@,$mandir,;t t
19222 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19223 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19224 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19225 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19226 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19227 s,@build_alias@,$build_alias,;t t
19228 s,@host_alias@,$host_alias,;t t
19229 s,@target_alias@,$target_alias,;t t
19230 s,@ECHO_C@,$ECHO_C,;t t
19231 s,@ECHO_N@,$ECHO_N,;t t
19232 s,@ECHO_T@,$ECHO_T,;t t
19233 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19234 s,@DEFS@,$DEFS,;t t
19235 s,@LIBS@,$LIBS,;t t
19236 s,@top_builddir@,$top_builddir,;t t
19237 s,@EGREP@,$EGREP,;t t
19238 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
19239 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
19240 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
19241 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
19242 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
19243 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
19244 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
19245 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
19246 s,@build@,$build,;t t
19247 s,@build_cpu@,$build_cpu,;t t
19248 s,@build_vendor@,$build_vendor,;t t
19249 s,@build_os@,$build_os,;t t
19250 s,@host@,$host,;t t
19251 s,@host_cpu@,$host_cpu,;t t
19252 s,@host_vendor@,$host_vendor,;t t
19253 s,@host_os@,$host_os,;t t
19254 s,@target@,$target,;t t
19255 s,@target_cpu@,$target_cpu,;t t
19256 s,@target_vendor@,$target_vendor,;t t
19257 s,@target_os@,$target_os,;t t
19258 s,@CC@,$CC,;t t
19259 s,@CFLAGS@,$CFLAGS,;t t
19260 s,@LDFLAGS@,$LDFLAGS,;t t
19261 s,@CPPFLAGS@,$CPPFLAGS,;t t
19262 s,@ac_ct_CC@,$ac_ct_CC,;t t
19263 s,@EXEEXT@,$EXEEXT,;t t
19264 s,@OBJEXT@,$OBJEXT,;t t
19265 s,@CPP@,$CPP,;t t
19266 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
19267 s,@PROG_EXT@,$PROG_EXT,;t t
19268 s,@LDCONFIG@,$LDCONFIG,;t t
19269 s,@CXX@,$CXX,;t t
19270 s,@CXXFLAGS@,$CXXFLAGS,;t t
19271 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
19272 s,@AWK@,$AWK,;t t
19273 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19274 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19275 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19276 s,@LINT@,$LINT,;t t
19277 s,@LINT_OPTS@,$LINT_OPTS,;t t
19278 s,@LN_S@,$LN_S,;t t
19279 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
19280 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
19281 s,@SET_MAKE@,$SET_MAKE,;t t
19282 s,@CTAGS@,$CTAGS,;t t
19283 s,@ETAGS@,$ETAGS,;t t
19284 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
19285 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
19286 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
19287 s,@RANLIB@,$RANLIB,;t t
19288 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19289 s,@LD@,$LD,;t t
19290 s,@ac_ct_LD@,$ac_ct_LD,;t t
19291 s,@AR@,$AR,;t t
19292 s,@ac_ct_AR@,$ac_ct_AR,;t t
19293 s,@ARFLAGS@,$ARFLAGS,;t t
19294 s,@DESTDIR@,$DESTDIR,;t t
19295 s,@BUILD_CC@,$BUILD_CC,;t t
19296 s,@BUILD_CPP@,$BUILD_CPP,;t t
19297 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
19298 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
19299 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
19300 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
19301 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
19302 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
19303 s,@cf_list_models@,$cf_list_models,;t t
19304 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
19305 s,@LIBTOOL@,$LIBTOOL,;t t
19306 s,@LT_UNDEF@,$LT_UNDEF,;t t
19307 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
19308 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
19309 s,@LIB_CREATE@,$LIB_CREATE,;t t
19310 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
19311 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
19312 s,@LIB_PREP@,$LIB_PREP,;t t
19313 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
19314 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
19315 s,@LIB_LINK@,$LIB_LINK,;t t
19316 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
19317 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
19318 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
19319 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
19320 s,@TICS_NAME@,$TICS_NAME,;t t
19321 s,@TINFO_NAME@,$TINFO_NAME,;t t
19322 s,@LIB_NAME@,$LIB_NAME,;t t
19323 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
19324 s,@CC_G_OPT@,$CC_G_OPT,;t t
19325 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
19326 s,@LD_MODEL@,$LD_MODEL,;t t
19327 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
19328 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
19329 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
19330 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
19331 s,@LINK_PROGS@,$LINK_PROGS,;t t
19332 s,@LINK_TESTS@,$LINK_TESTS,;t t
19333 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
19334 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
19335 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
19336 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
19337 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
19338 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
19339 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
19340 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
19341 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
19342 s,@TERMINFO@,$TERMINFO,;t t
19343 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
19344 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
19345 s,@TERMPATH@,$TERMPATH,;t t
19346 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
19347 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
19348 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
19349 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
19350 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
19351 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
19352 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
19353 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
19354 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
19355 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
19356 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
19357 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
19358 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
19359 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
19360 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
19361 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
19362 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
19363 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
19364 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
19365 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
19366 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
19367 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
19368 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
19369 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
19370 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
19371 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
19372 s,@PTHREAD@,$PTHREAD,;t t
19373 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
19374 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
19375 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
19376 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
19377 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
19378 s,@ECHO_LINK@,$ECHO_LINK,;t t
19379 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
19380 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
19381 s,@ADA_TRACE@,$ADA_TRACE,;t t
19382 s,@MATH_LIB@,$MATH_LIB,;t t
19383 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
19384 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
19385 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
19386 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
19387 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
19388 s,@TEST_LIBS@,$TEST_LIBS,;t t
19389 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
19390 s,@CXXCPP@,$CXXCPP,;t t
19391 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
19392 s,@CXX_AR@,$CXX_AR,;t t
19393 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
19394 s,@CXXLIBS@,$CXXLIBS,;t t
19395 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
19396 s,@gnat_exists@,$gnat_exists,;t t
19397 s,@M4_exists@,$M4_exists,;t t
19398 s,@cf_ada_make@,$cf_ada_make,;t t
19399 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
19400 s,@cf_ada_package@,$cf_ada_package,;t t
19401 s,@ADAFLAGS@,$ADAFLAGS,;t t
19402 s,@cf_compile_generics@,$cf_compile_generics,;t t
19403 s,@cf_generic_objects@,$cf_generic_objects,;t t
19404 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
19405 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
19406 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
19407 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
19408 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
19409 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
19410 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
19411 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
19412 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
19413 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
19414 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
19415 s,@TICS_ARGS@,$TICS_ARGS,;t t
19416 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
19417 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
19418 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
19419 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
19420 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
19421 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
19422 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
19423 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
19424 s,@TICS_LIST@,$TICS_LIST,;t t
19425 s,@TINFO_LIST@,$TINFO_LIST,;t t
19426 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
19427 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
19428 s,@TEST_ARGS@,$TEST_ARGS,;t t
19429 s,@TEST_DEPS@,$TEST_DEPS,;t t
19430 s,@TEST_ARG2@,$TEST_ARG2,;t t
19431 s,@TEST_DEP2@,$TEST_DEP2,;t t
19432 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
19433 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
19434 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
19435 s,@NCURSES_COPY2@,$NCURSES_COPY2,;t t
19436 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
19437 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
19438 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
19439 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
19440 s,@cross_compiling@,$cross_compiling,;t t
19441 CEOF
19442
19443 EOF
19444
19445   cat >>$CONFIG_STATUS <<\EOF
19446   # Split the substitutions into bite-sized pieces for seds with
19447   # small command number limits, like on Digital OSF/1 and HP-UX.
19448   ac_max_sed_lines=48
19449   ac_sed_frag=1 # Number of current file.
19450   ac_beg=1 # First line for current file.
19451   ac_end=$ac_max_sed_lines # Line after last line for current file.
19452   ac_more_lines=:
19453   ac_sed_cmds=
19454   while $ac_more_lines; do
19455     if test $ac_beg -gt 1; then
19456       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19457     else
19458       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19459     fi
19460     if test ! -s $tmp/subs.frag; then
19461       ac_more_lines=false
19462     else
19463       # The purpose of the label and of the branching condition is to
19464       # speed up the sed processing (if there are no `@' at all, there
19465       # is no need to browse any of the substitutions).
19466       # These are the two extra sed commands mentioned above.
19467       (echo ':t
19468   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19469       if test -z "$ac_sed_cmds"; then
19470         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19471       else
19472         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19473       fi
19474       ac_sed_frag=`expr $ac_sed_frag + 1`
19475       ac_beg=$ac_end
19476       ac_end=`expr $ac_end + $ac_max_sed_lines`
19477     fi
19478   done
19479   if test -z "$ac_sed_cmds"; then
19480     ac_sed_cmds=cat
19481   fi
19482 fi # test -n "$CONFIG_FILES"
19483
19484 EOF
19485 cat >>$CONFIG_STATUS <<\EOF
19486 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19487   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19488   case $ac_file in
19489   - | *:- | *:-:* ) # input from stdin
19490         cat >$tmp/stdin
19491         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19492         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19493   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19494         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19495   * )   ac_file_in=$ac_file.in ;;
19496   esac
19497
19498   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19499   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19500          X"$ac_file" : 'X\(//\)[^/]' \| \
19501          X"$ac_file" : 'X\(//\)$' \| \
19502          X"$ac_file" : 'X\(/\)' \| \
19503          .     : '\(.\)' 2>/dev/null ||
19504 echo X"$ac_file" |
19505     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19506           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19507           /^X\(\/\/\)$/{ s//\1/; q; }
19508           /^X\(\/\).*/{ s//\1/; q; }
19509           s/.*/./; q'`
19510   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19511     { case "$ac_dir" in
19512   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19513   *)                      as_incr_dir=.;;
19514 esac
19515 as_dummy="$ac_dir"
19516 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19517   case $as_mkdir_dir in
19518     # Skip DOS drivespec
19519     ?:) as_incr_dir=$as_mkdir_dir ;;
19520     *)
19521       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19522       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19523     ;;
19524   esac
19525 done; }
19526
19527     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
19528     # A "../" for each directory in $ac_dir_suffix.
19529     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19530   else
19531     ac_dir_suffix= ac_dots=
19532   fi
19533
19534   case $srcdir in
19535   .)  ac_srcdir=.
19536       if test -z "$ac_dots"; then
19537          ac_top_srcdir=.
19538       else
19539          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
19540       fi ;;
19541   [\\/]* | ?:[\\/]* )
19542       ac_srcdir=$srcdir$ac_dir_suffix;
19543       ac_top_srcdir=$srcdir ;;
19544   *) # Relative path.
19545     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
19546     ac_top_srcdir=$ac_dots$srcdir ;;
19547   esac
19548
19549   case $INSTALL in
19550   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19551   *) ac_INSTALL=$ac_dots$INSTALL ;;
19552   esac
19553
19554   if test x"$ac_file" != x-; then
19555     { echo "$as_me:19555: creating $ac_file" >&5
19556 echo "$as_me: creating $ac_file" >&6;}
19557     rm -f "$ac_file"
19558   fi
19559   # Let's still pretend it is `configure' which instantiates (i.e., don't
19560   # use $as_me), people would be surprised to read:
19561   #    /* config.h.  Generated automatically by config.status.  */
19562   configure_input="Generated automatically from `echo $ac_file_in |
19563                                                  sed 's,.*/,,'` by configure."
19564
19565   # First look for the input files in the build tree, otherwise in the
19566   # src tree.
19567   ac_file_inputs=`IFS=:
19568     for f in $ac_file_in; do
19569       case $f in
19570       -) echo $tmp/stdin ;;
19571       [\\/$]*)
19572          # Absolute (can't be DOS-style, as IFS=:)
19573          test -f "$f" || { { echo "$as_me:19573: error: cannot find input file: $f" >&5
19574 echo "$as_me: error: cannot find input file: $f" >&2;}
19575    { (exit 1); exit 1; }; }
19576          echo $f;;
19577       *) # Relative
19578          if test -f "$f"; then
19579            # Build tree
19580            echo $f
19581          elif test -f "$srcdir/$f"; then
19582            # Source tree
19583            echo $srcdir/$f
19584          else
19585            # /dev/null tree
19586            { { echo "$as_me:19586: error: cannot find input file: $f" >&5
19587 echo "$as_me: error: cannot find input file: $f" >&2;}
19588    { (exit 1); exit 1; }; }
19589          fi;;
19590       esac
19591     done` || { (exit 1); exit 1; }
19592 EOF
19593 cat >>$CONFIG_STATUS <<EOF
19594   sed "$ac_vpsub
19595 $extrasub
19596 EOF
19597 cat >>$CONFIG_STATUS <<\EOF
19598 :t
19599 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19600 s,@configure_input@,$configure_input,;t t
19601 s,@srcdir@,$ac_srcdir,;t t
19602 s,@top_srcdir@,$ac_top_srcdir,;t t
19603 s,@INSTALL@,$ac_INSTALL,;t t
19604 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19605   rm -f $tmp/stdin
19606   if test x"$ac_file" != x-; then
19607     mv $tmp/out $ac_file
19608   else
19609     cat $tmp/out
19610     rm -f $tmp/out
19611   fi
19612
19613 done
19614 EOF
19615 cat >>$CONFIG_STATUS <<\EOF
19616
19617 #
19618 # CONFIG_HEADER section.
19619 #
19620
19621 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19622 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19623 #
19624 # ac_d sets the value in "#define NAME VALUE" lines.
19625 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
19626 ac_dB='[        ].*$,\1#\2'
19627 ac_dC=' '
19628 ac_dD=',;t'
19629 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19630 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19631 ac_iB='\([      ]\),\1#\2define\3'
19632 ac_iC=' '
19633 ac_iD='\4,;t'
19634 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19635 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19636 ac_uB='$,\1#\2define\3'
19637 ac_uC=' '
19638 ac_uD=',;t'
19639
19640 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19641   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19642   case $ac_file in
19643   - | *:- | *:-:* ) # input from stdin
19644         cat >$tmp/stdin
19645         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19646         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19647   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19648         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19649   * )   ac_file_in=$ac_file.in ;;
19650   esac
19651
19652   test x"$ac_file" != x- && { echo "$as_me:19652: creating $ac_file" >&5
19653 echo "$as_me: creating $ac_file" >&6;}
19654
19655   # First look for the input files in the build tree, otherwise in the
19656   # src tree.
19657   ac_file_inputs=`IFS=:
19658     for f in $ac_file_in; do
19659       case $f in
19660       -) echo $tmp/stdin ;;
19661       [\\/$]*)
19662          # Absolute (can't be DOS-style, as IFS=:)
19663          test -f "$f" || { { echo "$as_me:19663: error: cannot find input file: $f" >&5
19664 echo "$as_me: error: cannot find input file: $f" >&2;}
19665    { (exit 1); exit 1; }; }
19666          echo $f;;
19667       *) # Relative
19668          if test -f "$f"; then
19669            # Build tree
19670            echo $f
19671          elif test -f "$srcdir/$f"; then
19672            # Source tree
19673            echo $srcdir/$f
19674          else
19675            # /dev/null tree
19676            { { echo "$as_me:19676: error: cannot find input file: $f" >&5
19677 echo "$as_me: error: cannot find input file: $f" >&2;}
19678    { (exit 1); exit 1; }; }
19679          fi;;
19680       esac
19681     done` || { (exit 1); exit 1; }
19682   # Remove the trailing spaces.
19683   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
19684
19685 EOF
19686
19687 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
19688 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
19689 # be either 'cat' or 'sort'.
19690 cat confdefs.h | uniq >conftest.vals
19691
19692 # Break up conftest.vals because some shells have a limit on
19693 # the size of here documents, and old seds have small limits too.
19694
19695 rm -f conftest.tail
19696 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
19697 while grep . conftest.vals >/dev/null
19698 do
19699   # Write chunks of a limited-size here document to conftest.frag.
19700   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
19701   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
19702   echo 'CEOF' >> $CONFIG_STATUS
19703   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
19704   rm -f conftest.vals
19705   mv conftest.tail conftest.vals
19706 done
19707 rm -f conftest.vals
19708
19709 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19710 # marker @DEFS@.
19711 echo '  cat >> conftest.edit <<CEOF
19712 /@DEFS@/r conftest.frag
19713 /@DEFS@/d
19714 CEOF
19715 sed -f conftest.edit $tmp/in > $tmp/out
19716 rm -f $tmp/in
19717 mv $tmp/out $tmp/in
19718 rm -f conftest.edit conftest.frag
19719 ' >> $CONFIG_STATUS
19720
19721 cat >>$CONFIG_STATUS <<\EOF
19722   # Let's still pretend it is `configure' which instantiates (i.e., don't
19723   # use $as_me), people would be surprised to read:
19724   #    /* config.h.  Generated automatically by config.status.  */
19725   if test x"$ac_file" = x-; then
19726     echo "/* Generated automatically by configure.  */" >$tmp/config.h
19727   else
19728     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
19729   fi
19730   cat $tmp/in >>$tmp/config.h
19731   rm -f $tmp/in
19732   if test x"$ac_file" != x-; then
19733     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
19734       { echo "$as_me:19734: $ac_file is unchanged" >&5
19735 echo "$as_me: $ac_file is unchanged" >&6;}
19736     else
19737       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19738          X"$ac_file" : 'X\(//\)[^/]' \| \
19739          X"$ac_file" : 'X\(//\)$' \| \
19740          X"$ac_file" : 'X\(/\)' \| \
19741          .     : '\(.\)' 2>/dev/null ||
19742 echo X"$ac_file" |
19743     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19744           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19745           /^X\(\/\/\)$/{ s//\1/; q; }
19746           /^X\(\/\).*/{ s//\1/; q; }
19747           s/.*/./; q'`
19748       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19749         { case "$ac_dir" in
19750   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19751   *)                      as_incr_dir=.;;
19752 esac
19753 as_dummy="$ac_dir"
19754 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19755   case $as_mkdir_dir in
19756     # Skip DOS drivespec
19757     ?:) as_incr_dir=$as_mkdir_dir ;;
19758     *)
19759       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19760       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19761     ;;
19762   esac
19763 done; }
19764
19765       fi
19766       rm -f $ac_file
19767       mv $tmp/config.h $ac_file
19768     fi
19769   else
19770     cat $tmp/config.h
19771     rm -f $tmp/config.h
19772   fi
19773 done
19774 EOF
19775 cat >>$CONFIG_STATUS <<\EOF
19776 #
19777 # CONFIG_COMMANDS section.
19778 #
19779 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19780   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19781   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19782
19783   case $ac_dest in
19784     default )
19785
19786 for cf_dir in test
19787 do
19788         if test ! -d $srcdir/$cf_dir; then
19789                 continue
19790         elif test -f $srcdir/$cf_dir/programs; then
19791                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
19792         fi
19793 done
19794
19795         case $cf_cv_system_name in #(vi
19796         OS/2*|os2*) #(vi
19797         LIB_PREFIX=''
19798         ;;
19799         *)      LIB_PREFIX='lib'
19800         ;;
19801         esac
19802 cf_prefix=$LIB_PREFIX
19803
19804 if test $cf_cv_shlib_version = cygdll ; then
19805         TINFO_NAME=$TINFO_ARG_SUFFIX
19806         TINFO_SUFFIX=.dll
19807 fi
19808
19809 for cf_dir in $SRC_SUBDIRS
19810 do
19811         if test ! -d $srcdir/$cf_dir ; then
19812                 continue
19813         elif test -f $srcdir/$cf_dir/modules; then
19814
19815                 SHARED_LIB=
19816                 LIBS_TO_MAKE=
19817                 for cf_item in $cf_LIST_MODELS
19818                 do
19819
19820         case $cf_item in #(vi
19821         libtool) #(vi
19822                 cf_suffix='.la'
19823                 cf_depsuf=$cf_suffix
19824                 ;;
19825         normal) #(vi
19826                 cf_suffix='.a'
19827                 cf_depsuf=$cf_suffix
19828                 ;;
19829         debug) #(vi
19830                 cf_suffix='_g.a'
19831                 cf_depsuf=$cf_suffix
19832                 ;;
19833         profile) #(vi
19834                 cf_suffix='_p.a'
19835                 cf_depsuf=$cf_suffix
19836                 ;;
19837         shared) #(vi
19838                 case $cf_cv_system_name in
19839                 aix[56]*) #(vi
19840                         cf_suffix='.a'
19841                         cf_depsuf=$cf_suffix
19842                         ;;
19843                 cygwin*) #(vi
19844                         cf_suffix='.dll'
19845                         cf_depsuf='.dll.a'
19846                         ;;
19847                 darwin*) #(vi
19848                         cf_suffix='.dylib'
19849                         cf_depsuf=$cf_suffix
19850                         ;;
19851                 hpux*) #(vi
19852                         case $target in
19853                         ia64*) #(vi
19854                                 cf_suffix='.so'
19855                                 cf_depsuf=$cf_suffix
19856                                 ;;
19857                         *) #(vi
19858                                 cf_suffix='.sl'
19859                                 cf_depsuf=$cf_suffix
19860                                 ;;
19861                         esac
19862                         ;;
19863                 *)      cf_suffix='.so'
19864                         cf_depsuf=$cf_suffix
19865                         ;;
19866                 esac
19867         esac
19868         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
19869         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
19870
19871                         if test $cf_item = shared ; then
19872                         if test "$cf_cv_do_symlinks" = yes ; then
19873                                 case "$cf_cv_shlib_version" in #(vi
19874                                 rel) #(vi
19875                                         case "$cf_cv_system_name" in #(vi
19876                                         darwin*)
19877                                         case .${LIB_SUFFIX} in
19878                                         .w*)
19879                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19880                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
19881                                                 ;;
19882                                         *)
19883                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
19884                                                 ;;
19885                                         esac
19886                                         ;; #(vi
19887                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
19888                                         esac
19889                                         ;;
19890                                 abi)
19891                                         case "$cf_cv_system_name" in #(vi
19892                                         darwin*)
19893                                         case .${LIB_SUFFIX} in
19894                                         .w*)
19895                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19896                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
19897                                                 ;;
19898                                         *)
19899                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
19900                                                 ;;
19901                                         esac
19902                                         ;; #(vi
19903                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
19904                                         esac
19905                                         ;;
19906                                 esac
19907                         fi
19908                         # cygwin needs import library, and has unique naming convention
19909                         # use autodetected ${cf_prefix} for import lib and static lib, but
19910                         # use 'cyg' prefix for shared lib.
19911                         if test $cf_cv_shlib_version = cygdll ; then
19912                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
19913                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
19914                                 continue
19915                         fi
19916                         fi
19917                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
19918                 done
19919
19920                 if test $cf_dir = ncurses ; then
19921                         cf_subsets="$LIB_SUBSETS"
19922                         cf_r_parts="$cf_subsets"
19923                         cf_liblist="$LIBS_TO_MAKE"
19924
19925                         while test -n "$cf_r_parts"
19926                         do
19927                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
19928                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
19929                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
19930                                         cf_item=
19931                                         case $cf_l_parts in #(vi
19932                                         *termlib*) #(vi
19933                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
19934                                                 ;;
19935                                         *ticlib*)
19936                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
19937                                                 ;;
19938                                         *)
19939                                                 break
19940                                                 ;;
19941                                         esac
19942                                         if test -n "$cf_item"; then
19943                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
19944                                         fi
19945                                 else
19946                                         break
19947                                 fi
19948                         done
19949                 else
19950                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
19951                 fi
19952
19953                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
19954                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
19955                         $cf_dir/Makefile >$cf_dir/Makefile.out
19956                 mv $cf_dir/Makefile.out $cf_dir/Makefile
19957
19958                 $AWK -f $srcdir/mk-0th.awk \
19959                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
19960                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
19961
19962                 for cf_subset in $cf_subsets
19963                 do
19964                         cf_subdirs=
19965                         for cf_item in $cf_LIST_MODELS
19966                         do
19967                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
19968
19969 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19970
19971         case $cf_item in #(vi
19972         libtool) #(vi
19973                 cf_suffix='.la'
19974                 cf_depsuf=$cf_suffix
19975                 ;;
19976         normal) #(vi
19977                 cf_suffix='.a'
19978                 cf_depsuf=$cf_suffix
19979                 ;;
19980         debug) #(vi
19981                 cf_suffix='_g.a'
19982                 cf_depsuf=$cf_suffix
19983                 ;;
19984         profile) #(vi
19985                 cf_suffix='_p.a'
19986                 cf_depsuf=$cf_suffix
19987                 ;;
19988         shared) #(vi
19989                 case $cf_cv_system_name in
19990                 aix[56]*) #(vi
19991                         cf_suffix='.a'
19992                         cf_depsuf=$cf_suffix
19993                         ;;
19994                 cygwin*) #(vi
19995                         cf_suffix='.dll'
19996                         cf_depsuf='.dll.a'
19997                         ;;
19998                 darwin*) #(vi
19999                         cf_suffix='.dylib'
20000                         cf_depsuf=$cf_suffix
20001                         ;;
20002                 hpux*) #(vi
20003                         case $target in
20004                         ia64*) #(vi
20005                                 cf_suffix='.so'
20006                                 cf_depsuf=$cf_suffix
20007                                 ;;
20008                         *) #(vi
20009                                 cf_suffix='.sl'
20010                                 cf_depsuf=$cf_suffix
20011                                 ;;
20012                         esac
20013                         ;;
20014                 *)      cf_suffix='.so'
20015                         cf_depsuf=$cf_suffix
20016                         ;;
20017                 esac
20018         esac
20019         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20020         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20021
20022         case $cf_item in
20023         libtool) cf_subdir='obj_lo'  ;;
20024         normal)  cf_subdir='objects' ;;
20025         debug)   cf_subdir='obj_g' ;;
20026         profile) cf_subdir='obj_p' ;;
20027         shared)
20028                 case $cf_cv_system_name in #(vi
20029                 cygwin) #(vi
20030                         cf_subdir='objects' ;;
20031                 *)
20032                         cf_subdir='obj_s' ;;
20033                 esac
20034         esac
20035
20036                         # Test for case where we build libtinfo with a different name.
20037                         cf_libname=$cf_dir
20038                         if test $cf_dir = ncurses ; then
20039                                 case $cf_subset in
20040                                 *base*)
20041                                         cf_libname=${cf_libname}$LIB_SUFFIX
20042                                         ;;
20043                                 *termlib*)
20044                                         cf_libname=$TINFO_LIB_SUFFIX
20045                                         ;;
20046                                 ticlib*)
20047                                         cf_libname=$TICS_LIB_SUFFIX
20048                                         ;;
20049                                 esac
20050                         else
20051                                 cf_libname=${cf_libname}$LIB_SUFFIX
20052                         fi
20053                         if test -n "${DFT_ARG_SUFFIX}" ; then
20054                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
20055                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
20056                         fi
20057
20058                         # These dependencies really are for development, not
20059                         # builds, but they are useful in porting, too.
20060                         cf_depend="../include/ncurses_cfg.h"
20061                         if test "$srcdir" = "."; then
20062                                 cf_reldir="."
20063                         else
20064                                 cf_reldir="\${srcdir}"
20065                         fi
20066
20067                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
20068                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
20069                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
20070                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
20071                         fi
20072
20073                         cf_dir_suffix=
20074                         old_cf_suffix="$cf_suffix"
20075                         if test "$cf_cv_shlib_version_infix" = yes ; then
20076                         if test -n "$LIB_SUFFIX" ; then
20077                                 case $LIB_SUFFIX in
20078                                 w*)
20079                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
20080                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20081                                         cf_dir_suffix=w
20082                                         ;;
20083                                 esac
20084                         fi
20085                         fi
20086
20087                         $AWK -f $srcdir/mk-1st.awk \
20088                                 name=${cf_libname}${cf_dir_suffix} \
20089                                 traces=$LIB_TRACING \
20090                                 MODEL=$cf_ITEM \
20091                                 model=$cf_subdir \
20092                                 prefix=$cf_prefix \
20093                                 suffix=$cf_suffix \
20094                                 subset=$cf_subset \
20095                                 TermlibRoot=$TINFO_NAME \
20096                                 TermlibSuffix=$TINFO_SUFFIX \
20097                                 ShlibVer=$cf_cv_shlib_version \
20098                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
20099                                 ReLink=${cf_cv_do_relink-no} \
20100                                 DoLinks=$cf_cv_do_symlinks \
20101                                 rmSoLocs=$cf_cv_rm_so_locs \
20102                                 ldconfig="$LDCONFIG" \
20103                                 overwrite=$WITH_OVERWRITE \
20104                                 depend="$cf_depend" \
20105                                 host="$host" \
20106                                 libtool_version="$LIBTOOL_VERSION" \
20107                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20108
20109                         cf_suffix="$old_cf_suffix"
20110
20111                         for cf_subdir2 in $cf_subdirs lib
20112                         do
20113                                 test $cf_subdir = $cf_subdir2 && break
20114                         done
20115                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
20116                         $AWK -f $srcdir/mk-2nd.awk \
20117                                 name=$cf_dir \
20118                                 traces=$LIB_TRACING \
20119                                 MODEL=$cf_ITEM \
20120                                 model=$cf_subdir \
20121                                 subset=$cf_subset \
20122                                 srcdir=$srcdir \
20123                                 echo=$WITH_ECHO \
20124                                 crenames=$cf_cv_prog_CC_c_o \
20125                                 cxxrenames=$cf_cv_prog_CXX_c_o \
20126                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20127                         cf_subdirs="$cf_subdirs $cf_subdir"
20128                         done
20129                 done
20130         fi
20131
20132         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
20133 done
20134
20135 for cf_dir in $SRC_SUBDIRS
20136 do
20137         if test ! -d $srcdir/$cf_dir ; then
20138                 continue
20139         fi
20140
20141         if test -f $cf_dir/Makefile ; then
20142                 case "$cf_dir" in
20143                 Ada95) #(vi
20144                         echo 'libs \' >> Makefile
20145                         echo 'install.libs \' >> Makefile
20146                         echo 'uninstall.libs ::' >> Makefile
20147                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
20148                         ;;
20149                 esac
20150         fi
20151
20152         if test -f $srcdir/$cf_dir/modules; then
20153                 echo >> Makefile
20154                 if test -f $srcdir/$cf_dir/headers; then
20155 cat >> Makefile <<CF_EOF
20156 install.includes \\
20157 uninstall.includes \\
20158 CF_EOF
20159                 fi
20160 if test "$cf_dir" != "c++" ; then
20161 echo 'lint \' >> Makefile
20162 fi
20163 cat >> Makefile <<CF_EOF
20164 libs \\
20165 lintlib \\
20166 install.libs \\
20167 uninstall.libs \\
20168 install.$cf_dir \\
20169 uninstall.$cf_dir ::
20170         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20171 CF_EOF
20172         elif test -f $srcdir/$cf_dir/headers; then
20173 cat >> Makefile <<CF_EOF
20174
20175 libs \\
20176 install.libs \\
20177 uninstall.libs \\
20178 install.includes \\
20179 uninstall.includes ::
20180         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20181 CF_EOF
20182 fi
20183 done
20184
20185 cat >> Makefile <<CF_EOF
20186
20187 install.libs uninstall.libs \\
20188 install.data uninstall.data ::
20189 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
20190 CF_EOF
20191
20192 if test "x$cf_with_manpages" = xyes; then
20193 cat >> Makefile <<CF_EOF
20194
20195 install.man \\
20196 uninstall.man ::
20197         cd man && \${MAKE} \${CF_MFLAGS} \$@
20198 CF_EOF
20199 fi
20200
20201 cat >> Makefile <<CF_EOF
20202
20203 distclean ::
20204         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
20205         rm -f headers.sh headers.sed mk_shared_lib.sh
20206         rm -f edit_man.* man_alias.*
20207         rm -rf \${DIRS_TO_MAKE}
20208 CF_EOF
20209
20210 # Special case: tack's manpage lives in its own directory.
20211 if test "x$cf_with_manpages" = xyes; then
20212 if test -d tack ; then
20213 if test -f $srcdir/$tack.h; then
20214 cat >> Makefile <<CF_EOF
20215
20216 install.man \\
20217 uninstall.man ::
20218         cd tack && \${MAKE} \${CF_MFLAGS} \$@
20219 CF_EOF
20220 fi
20221 fi
20222 fi
20223
20224 rm -f headers.sed headers.sh
20225
20226 echo creating headers.sh
20227 cat >headers.sh <<CF_EOF
20228 #! /bin/sh
20229 # This shell script is generated by the 'configure' script.  It is invoked in a
20230 # subdirectory of the build tree.  It generates a sed-script in the parent
20231 # directory that is used to adjust includes for header files that reside in a
20232 # subdirectory of /usr/include, etc.
20233 PRG=""
20234 while test \$# != 3
20235 do
20236 PRG="\$PRG \$1"; shift
20237 done
20238 DST=\$1
20239 REF=\$2
20240 SRC=\$3
20241 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
20242 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
20243 echo installing \$SRC in \$DST
20244 CF_EOF
20245
20246 if test $WITH_CURSES_H = yes; then
20247         cat >>headers.sh <<CF_EOF
20248 case \$DST in
20249 /*/include/*)
20250         END=\`basename \$DST\`
20251         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20252         do
20253                 NAME=\`basename \$i\`
20254                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20255         done
20256         ;;
20257 *)
20258         echo "" >> \$TMPSED
20259         ;;
20260 esac
20261 CF_EOF
20262
20263 else
20264         cat >>headers.sh <<CF_EOF
20265 case \$DST in
20266 /*/include/*)
20267         END=\`basename \$DST\`
20268         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20269         do
20270                 NAME=\`basename \$i\`
20271                 if test "\$NAME" = "curses.h"
20272                 then
20273                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20274                         NAME=ncurses.h
20275                 fi
20276                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20277         done
20278         ;;
20279 *)
20280         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20281         ;;
20282 esac
20283 CF_EOF
20284 fi
20285 cat >>headers.sh <<CF_EOF
20286 rm -f \$TMPSRC
20287 sed -f \$TMPSED \$SRC > \$TMPSRC
20288 NAME=\`basename \$SRC\`
20289 CF_EOF
20290 if test $WITH_CURSES_H != yes; then
20291         cat >>headers.sh <<CF_EOF
20292 test "\$NAME" = "curses.h" && NAME=ncurses.h
20293 CF_EOF
20294 fi
20295 cat >>headers.sh <<CF_EOF
20296 # Just in case someone gzip'd manpages, remove the conflicting copy.
20297 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
20298
20299 eval \$PRG \$TMPSRC \$DST/\$NAME
20300 rm -f \$TMPSRC \$TMPSED
20301 CF_EOF
20302
20303 chmod 0755 headers.sh
20304
20305 for cf_dir in $SRC_SUBDIRS
20306 do
20307         if test ! -d $srcdir/$cf_dir ; then
20308                 continue
20309         fi
20310
20311         if test -f $srcdir/$cf_dir/headers; then
20312                 $AWK -f $srcdir/mk-hdr.awk \
20313                         subset="$LIB_SUBSETS" \
20314                         compat="$WITH_CURSES_H" \
20315                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
20316         fi
20317
20318         if test -f $srcdir/$cf_dir/modules; then
20319                 if test "$cf_dir" != "c++" ; then
20320                         cat >>$cf_dir/Makefile <<"CF_EOF"
20321 depend : ${AUTO_SRC}
20322         makedepend -- ${CPPFLAGS} -- ${C_SRC}
20323
20324 # DO NOT DELETE THIS LINE -- make depend depends on it.
20325 CF_EOF
20326                 fi
20327         fi
20328 done
20329
20330  ;;
20331   esac
20332 done
20333 EOF
20334
20335 cat >>$CONFIG_STATUS <<\EOF
20336
20337 { (exit 0); exit 0; }
20338 EOF
20339 chmod +x $CONFIG_STATUS
20340 ac_clean_files=$ac_clean_files_save
20341
20342 # configure is writing to config.log, and then calls config.status.
20343 # config.status does its own redirection, appending to config.log.
20344 # Unfortunately, on DOS this fails, as config.log is still kept open
20345 # by configure, so config.status won't be able to write to it; its
20346 # output is simply discarded.  So we exec the FD to /dev/null,
20347 # effectively closing config.log, so it can be properly (re)opened and
20348 # appended to by config.status.  When coming back to configure, we
20349 # need to make the FD available again.
20350 if test "$no_create" != yes; then
20351   ac_cs_success=:
20352   exec 5>/dev/null
20353   $SHELL $CONFIG_STATUS || ac_cs_success=false
20354   exec 5>>config.log
20355   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20356   # would make configure fail if this is the last instruction.
20357   $ac_cs_success || { (exit 1); exit 1; }
20358 fi
20359 ${MAKE-make} preinstall