]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20120317
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.547 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20120310.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-manpages      suppress install of manpages
701   --without-progs         suppress build with programs (e.g., tic)
702   --without-tests         suppress build with test-programs
703   --without-curses-h      install curses.h as ncurses.h only
704   --with-pkg-config{=path} enable/disable use of pkg-config
705   --with-pkg-config-libdir=XXX use given directory for installing pc-files
706   --enable-pc-files       generate and install .pc files for pkg-config
707   --enable-mixed-case     tic should assume mixed-case filenames
708   --with-install-prefix   prefixes actual install-location ($DESTDIR)
709 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
710   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
711   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
712   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
713   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
714   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
715   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
716 Options to Specify the Libraries Built/Used:
717   --disable-libtool-version  enable to use libtool's incompatible naming scheme
718   --with-libtool          generate libraries with libtool
719   --with-shared           generate shared-libraries
720   --with-normal           generate normal-libraries (default)
721   --with-debug            generate debug-libraries (default)
722   --with-profile          generate profile-libraries
723   --with-lib-prefix       override library-prefix
724   --with-termlib          generate separate terminfo library
725   --with-ticlib           generate separate tic library
726   --with-gpm              use Alessandro Rubini's GPM library
727   --without-dlsym         do not use dlsym() to load GPM dynamically
728   --with-sysmouse         use sysmouse (FreeBSD console)
729   --enable-rpath          use rpath option when generating shared libraries
730   --disable-relink        relink shared libraries during install
731   --with-shlib-version=X  Specify rel or abi version for shared libs
732   --disable-rpath-hack    don't add rpath options for additional libraries
733 Fine-Tuning Your Configuration:
734   --disable-overwrite     leave out the link to -lcurses
735   --disable-database      do not use terminfo, only fallbacks/termcap
736   --with-database=XXX     specify terminfo source to install
737   --with-hashed-db        specify hashed-database library
738   --with-fallbacks=XXX    specify list of fallback terminal descriptions
739   --without-xterm-new     specify if xterm terminfo should be old version
740   --with-xterm-kbs=XXX     specify if xterm backspace sends BS or DEL
741   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
742   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
743   --disable-big-core      assume machine has little memory
744   --disable-big-strings   assume compiler has only standard-size strings
745   --enable-termcap        compile in termcap fallback support
746   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
747   --enable-getcap         fast termcap load, no xrefs to terminfo
748   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
749   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
750   --disable-root-environ  restrict environment when running as root
751   --enable-symlinks       make tic use symbolic links not hard links
752   --enable-broken_linker  compile with broken-linker support code
753   --enable-bsdpad         recognize BSD-style prefix padding
754   --enable-widec          compile with wide-char/UTF-8 code
755   --disable-lp64          allow chtype to be long (ignore _LP64)
756   --disable-largefile     omit support for large files
757   --disable-tparm-varargs compile tparm() without varargs interface
758   --disable-tic-depends   link tic library without explicit dependency on ncurses library
759   --with-bool=TYPE        override fallback type of bool variable
760   --with-caps=alt         compile with alternate Caps file
761   --with-chtype=TYPE      override type of chtype
762   --with-ospeed=TYPE      override type of ospeed variable
763   --with-mmask-t=TYPE     override type of mmask_t
764   --with-ccharw-max=XXX   override size CCHARW_MAX
765   --with-tparm-arg=TYPE   override parameter type of tparm
766   --with-rcs-ids          compile-in RCS identifiers
767 Options to Specify How Manpages are Installed:
768   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
769                           optionally formatted/catonly, e.g., gzip,formatted
770   --with-manpage-renames  specify manpage-renaming
771   --with-manpage-aliases  specify manpage-aliases using .so
772   --with-manpage-symlinks specify manpage-aliases using symlinks
773   --with-manpage-tbl      specify manpage processing with tbl
774 Extensions:
775   --disable-ext-funcs     disable function-extensions
776   --enable-sp-funcs       enable experimental SCREEN-extensions
777   --enable-term-driver    enable experimental terminal-driver
778   --enable-const          compile with extra/non-standard const
779   --enable-ext-colors     compile for 256-color support
780   --enable-ext-mouse      compile for extended mouse-encoding
781   --enable-no-padding     compile with $NCURSES_NO_PADDING code
782   --enable-signed-char    compile using signed Boolean's in term.h
783   --enable-sigwinch       compile with SIGWINCH handler
784   --enable-tcap-names     compile with user-definable terminal capabilities
785 Development Code:
786   --without-develop       disable development options
787   --enable-hard-tabs      compile with hard-tabs code
788   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
789 Experimental Code:
790   --disable-assumed-color do not assume anything about default-colors
791   --disable-hashmap       compile without hashmap scrolling-optimization
792   --enable-colorfgbg      compile-in experimental $COLORFGBG code
793   --enable-interop        compile-in experimental interop bindings
794   --with-pthread          use POSIX thread library
795   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
796   --enable-weak-symbols   enable weak-symbols for pthreads
797   --enable-reentrant      compile with experimental reentrant code
798   --with-wrap-prefix=XXX  override prefix used for public variables
799   --enable-safe-sprintf   compile with experimental safe-sprintf code
800   --disable-scroll-hints  compile without scroll-hints code
801   --enable-wgetch-events  compile with experimental wgetch-events code
802 Testing/development Options:
803   --disable-echo          display "compiling" commands
804   --enable-warnings       build: turn on GCC compiler warnings
805   --enable-string-hacks  work around bogus compiler/loader warnings
806   --enable-assertions     test: turn on generation of assertion code
807   --with-dmalloc          test: use Gray Watson's dmalloc library
808   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
809   --with-valgrind         test: use valgrind
810   --disable-leaks         test: free permanent memory, analyze leaks
811   --enable-expanded       test: generate functions for certain macros
812   --disable-macros        test: use functions rather than macros
813   --with-trace            test: add trace() function to all models of ncurses
814 Ada95 Binding Options:
815   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
816   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
817   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
818   --with-ada-sharedlib=XX build Ada95 shared-library
819
820 Some influential environment variables:
821   CC          C compiler command
822   CFLAGS      C compiler flags
823   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
824               nonstandard directory <lib dir>
825   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
826               headers in a nonstandard directory <include dir>
827   CPP         C preprocessor
828   CXX         C++ compiler command
829   CXXFLAGS    C++ compiler flags
830   CXXCPP      C++ preprocessor
831
832 Use these variables to override the choices made by `configure' or to help
833 it to find libraries and programs with nonstandard names/locations.
834
835 EOF
836 fi
837
838 if test "$ac_init_help" = "recursive"; then
839   # If there are subdirs, report their specific --help.
840   ac_popdir=`pwd`
841   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
842     cd $ac_subdir
843     # A "../" for each directory in /$ac_subdir.
844     ac_dots=`echo $ac_subdir |
845              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
846
847     case $srcdir in
848     .) # No --srcdir option.  We are building in place.
849       ac_sub_srcdir=$srcdir ;;
850     [\\/]* | ?:[\\/]* ) # Absolute path.
851       ac_sub_srcdir=$srcdir/$ac_subdir ;;
852     *) # Relative path.
853       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
854     esac
855
856     # Check for guested configure; otherwise get Cygnus style configure.
857     if test -f $ac_sub_srcdir/configure.gnu; then
858       echo
859       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
860     elif test -f $ac_sub_srcdir/configure; then
861       echo
862       $SHELL $ac_sub_srcdir/configure  --help=recursive
863     elif test -f $ac_sub_srcdir/configure.ac ||
864            test -f $ac_sub_srcdir/configure.in; then
865       echo
866       $ac_configure --help
867     else
868       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
869     fi
870     cd $ac_popdir
871   done
872 fi
873
874 test -n "$ac_init_help" && exit 0
875 if $ac_init_version; then
876   cat <<\EOF
877
878 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
879 Free Software Foundation, Inc.
880 This configure script is free software; the Free Software Foundation
881 gives unlimited permission to copy, distribute and modify it.
882 EOF
883   exit 0
884 fi
885 exec 5>config.log
886 cat >&5 <<EOF
887 This file contains any messages produced by compilers while
888 running configure, to aid debugging if configure makes a mistake.
889
890 It was created by $as_me, which was
891 generated by GNU Autoconf 2.52.20120310.  Invocation command line was
892
893   $ $0 $@
894
895 EOF
896 {
897 cat <<_ASUNAME
898 ## ---------- ##
899 ## Platform.  ##
900 ## ---------- ##
901
902 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
903 uname -m = `(uname -m) 2>/dev/null || echo unknown`
904 uname -r = `(uname -r) 2>/dev/null || echo unknown`
905 uname -s = `(uname -s) 2>/dev/null || echo unknown`
906 uname -v = `(uname -v) 2>/dev/null || echo unknown`
907
908 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
909 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
910
911 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
912 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
913 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
914 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
915 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
916 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
917 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
918
919 PATH = $PATH
920
921 _ASUNAME
922 } >&5
923
924 cat >&5 <<EOF
925 ## ------------ ##
926 ## Core tests.  ##
927 ## ------------ ##
928
929 EOF
930
931 # Keep a trace of the command line.
932 # Strip out --no-create and --no-recursion so they do not pile up.
933 # Also quote any args containing shell meta-characters.
934 ac_configure_args=
935 ac_sep=
936 for ac_arg
937 do
938   case $ac_arg in
939   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
940   | --no-cr | --no-c) ;;
941   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
942   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
943   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
944     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
945     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
946     ac_sep=" " ;;
947   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
948      ac_sep=" " ;;
949   esac
950   # Get rid of the leading space.
951 done
952
953 # When interrupted or exit'd, cleanup temporary files, and complete
954 # config.log.  We remove comments because anyway the quotes in there
955 # would cause problems or look ugly.
956 trap 'exit_status=$?
957   # Save into config.log some information that might help in debugging.
958   echo >&5
959   echo "## ----------------- ##" >&5
960   echo "## Cache variables.  ##" >&5
961   echo "## ----------------- ##" >&5
962   echo >&5
963   # The following way of writing the cache mishandles newlines in values,
964 {
965   (set) 2>&1 |
966     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
967     *ac_space=\ *)
968       sed -n \
969         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
970           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
971       ;;
972     *)
973       sed -n \
974         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
975       ;;
976     esac;
977 } >&5
978   sed "/^$/d" confdefs.h >conftest.log
979   if test -s conftest.log; then
980     echo >&5
981     echo "## ------------ ##" >&5
982     echo "## confdefs.h.  ##" >&5
983     echo "## ------------ ##" >&5
984     echo >&5
985     cat conftest.log >&5
986   fi
987   (echo; echo) >&5
988   test "$ac_signal" != 0 &&
989     echo "$as_me: caught signal $ac_signal" >&5
990   echo "$as_me: exit $exit_status" >&5
991   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
992     exit $exit_status
993      ' 0
994 for ac_signal in 1 2 13 15; do
995   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
996 done
997 ac_signal=0
998
999 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1000 rm -rf conftest* confdefs.h
1001 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1002 echo >confdefs.h
1003
1004 # Let the site file select an alternate cache file if it wants to.
1005 # Prefer explicitly selected file to automatically selected ones.
1006 if test -z "$CONFIG_SITE"; then
1007   if test "x$prefix" != xNONE; then
1008     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1009   else
1010     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1011   fi
1012 fi
1013 for ac_site_file in $CONFIG_SITE; do
1014   if test -r "$ac_site_file"; then
1015     { echo "$as_me:1015: loading site script $ac_site_file" >&5
1016 echo "$as_me: loading site script $ac_site_file" >&6;}
1017     cat "$ac_site_file" >&5
1018     . "$ac_site_file"
1019   fi
1020 done
1021
1022 if test -r "$cache_file"; then
1023   # Some versions of bash will fail to source /dev/null (special
1024   # files actually), so we avoid doing that.
1025   if test -f "$cache_file"; then
1026     { echo "$as_me:1026: loading cache $cache_file" >&5
1027 echo "$as_me: loading cache $cache_file" >&6;}
1028     case $cache_file in
1029       [\\/]* | ?:[\\/]* ) . $cache_file;;
1030       *)                      . ./$cache_file;;
1031     esac
1032   fi
1033 else
1034   { echo "$as_me:1034: creating cache $cache_file" >&5
1035 echo "$as_me: creating cache $cache_file" >&6;}
1036   >$cache_file
1037 fi
1038
1039 # Check that the precious variables saved in the cache have kept the same
1040 # value.
1041 ac_cache_corrupted=false
1042 for ac_var in `(set) 2>&1 |
1043                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1044   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1045   eval ac_new_set=\$ac_env_${ac_var}_set
1046   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1047   eval ac_new_val="\$ac_env_${ac_var}_value"
1048   case $ac_old_set,$ac_new_set in
1049     set,)
1050       { echo "$as_me:1050: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1051 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1052       ac_cache_corrupted=: ;;
1053     ,set)
1054       { echo "$as_me:1054: error: \`$ac_var' was not set in the previous run" >&5
1055 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1056       ac_cache_corrupted=: ;;
1057     ,);;
1058     *)
1059       if test "x$ac_old_val" != "x$ac_new_val"; then
1060         { echo "$as_me:1060: error: \`$ac_var' has changed since the previous run:" >&5
1061 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1062         { echo "$as_me:1062:   former value:  $ac_old_val" >&5
1063 echo "$as_me:   former value:  $ac_old_val" >&2;}
1064         { echo "$as_me:1064:   current value: $ac_new_val" >&5
1065 echo "$as_me:   current value: $ac_new_val" >&2;}
1066         ac_cache_corrupted=:
1067       fi;;
1068   esac
1069   # Pass precious variables to config.status.  It doesn't matter if
1070   # we pass some twice (in addition to the command line arguments).
1071   if test "$ac_new_set" = set; then
1072     case $ac_new_val in
1073     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1074       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1075       ac_configure_args="$ac_configure_args '$ac_arg'"
1076       ;;
1077     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1078        ;;
1079     esac
1080   fi
1081 done
1082 if $ac_cache_corrupted; then
1083   { echo "$as_me:1083: error: changes in the environment can compromise the build" >&5
1084 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1085   { { echo "$as_me:1085: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1086 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1087    { (exit 1); exit 1; }; }
1088 fi
1089
1090 ac_ext=c
1091 ac_cpp='$CPP $CPPFLAGS'
1092 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1093 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1094 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1095 ac_main_return=return
1096
1097 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1098   *c*,-n*) ECHO_N= ECHO_C='
1099 ' ECHO_T='      ' ;;
1100   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1101   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1102 esac
1103 echo "#! $SHELL" >conftest.sh
1104 echo  "exit 0"   >>conftest.sh
1105 chmod +x conftest.sh
1106 if { (echo "$as_me:1106: PATH=\".;.\"; conftest.sh") >&5
1107   (PATH=".;."; conftest.sh) 2>&5
1108   ac_status=$?
1109   echo "$as_me:1109: \$? = $ac_status" >&5
1110   (exit $ac_status); }; then
1111   ac_path_separator=';'
1112 else
1113   ac_path_separator=:
1114 fi
1115 PATH_SEPARATOR="$ac_path_separator"
1116 rm -f conftest.sh
1117
1118 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1119
1120 top_builddir=`pwd`
1121
1122 echo "$as_me:1122: checking for egrep" >&5
1123 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1124 if test "${ac_cv_prog_egrep+set}" = set; then
1125   echo $ECHO_N "(cached) $ECHO_C" >&6
1126 else
1127   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1128     then ac_cv_prog_egrep='grep -E'
1129     else ac_cv_prog_egrep='egrep'
1130     fi
1131 fi
1132 echo "$as_me:1132: result: $ac_cv_prog_egrep" >&5
1133 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1134  EGREP=$ac_cv_prog_egrep
1135
1136 test -z "$EGREP" && { { echo "$as_me:1136: error: No egrep program found" >&5
1137 echo "$as_me: error: No egrep program found" >&2;}
1138    { (exit 1); exit 1; }; }
1139
1140 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1141 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1142 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1143 cf_cv_abi_version=${NCURSES_MAJOR}
1144 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1145 cf_cv_timestamp=`date`
1146 echo "$as_me:1146: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1147 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1148
1149 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1150
1151 # Check whether --with-rel-version or --without-rel-version was given.
1152 if test "${with_rel_version+set}" = set; then
1153   withval="$with_rel_version"
1154   { echo "$as_me:1154: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1155 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1156  cf_cv_rel_version=$withval
1157 fi;
1158
1159  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1160  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1161
1162 if test -n "$NCURSES_MAJOR" ; then
1163   case $NCURSES_MAJOR in #(vi
1164   [0-9]*) #(vi
1165         ;;
1166   *)
1167         { { echo "$as_me:1167: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1168 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1169    { (exit 1); exit 1; }; }
1170         ;;
1171   esac
1172 else
1173   { { echo "$as_me:1173: error: Release major-version value is empty" >&5
1174 echo "$as_me: error: Release major-version value is empty" >&2;}
1175    { (exit 1); exit 1; }; }
1176 fi
1177
1178 if test -n "$NCURSES_MINOR" ; then
1179   case $NCURSES_MINOR in #(vi
1180   [0-9]*) #(vi
1181         ;;
1182   *)
1183         { { echo "$as_me:1183: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1184 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1185    { (exit 1); exit 1; }; }
1186         ;;
1187   esac
1188 else
1189   { { echo "$as_me:1189: error: Release minor-version value is empty" >&5
1190 echo "$as_me: error: Release minor-version value is empty" >&2;}
1191    { (exit 1); exit 1; }; }
1192 fi
1193
1194 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1195
1196 # Check whether --with-abi-version or --without-abi-version was given.
1197 if test "${with_abi_version+set}" = set; then
1198   withval="$with_abi_version"
1199   { echo "$as_me:1199: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1200 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1201  cf_cv_abi_version=$withval
1202 fi;
1203
1204 if test -n "$cf_cv_abi_version" ; then
1205   case $cf_cv_abi_version in #(vi
1206   [0-9]*) #(vi
1207         ;;
1208   *)
1209         { { echo "$as_me:1209: error: ABI version is not a number: $cf_cv_abi_version" >&5
1210 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1211    { (exit 1); exit 1; }; }
1212         ;;
1213   esac
1214 else
1215   { { echo "$as_me:1215: error: ABI version value is empty" >&5
1216 echo "$as_me: error: ABI version value is empty" >&2;}
1217    { (exit 1); exit 1; }; }
1218 fi
1219
1220 ac_aux_dir=
1221 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1222   if test -f $ac_dir/install-sh; then
1223     ac_aux_dir=$ac_dir
1224     ac_install_sh="$ac_aux_dir/install-sh -c"
1225     break
1226   elif test -f $ac_dir/install.sh; then
1227     ac_aux_dir=$ac_dir
1228     ac_install_sh="$ac_aux_dir/install.sh -c"
1229     break
1230   elif test -f $ac_dir/shtool; then
1231     ac_aux_dir=$ac_dir
1232     ac_install_sh="$ac_aux_dir/shtool install -c"
1233     break
1234   fi
1235 done
1236 if test -z "$ac_aux_dir"; then
1237   { { echo "$as_me:1237: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1238 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1239    { (exit 1); exit 1; }; }
1240 fi
1241 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1242 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1243 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1244
1245 # Make sure we can run config.sub.
1246 $ac_config_sub sun4 >/dev/null 2>&1 ||
1247   { { echo "$as_me:1247: error: cannot run $ac_config_sub" >&5
1248 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1249    { (exit 1); exit 1; }; }
1250
1251 echo "$as_me:1251: checking build system type" >&5
1252 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1253 if test "${ac_cv_build+set}" = set; then
1254   echo $ECHO_N "(cached) $ECHO_C" >&6
1255 else
1256   ac_cv_build_alias=$build_alias
1257 test -z "$ac_cv_build_alias" &&
1258   ac_cv_build_alias=`$ac_config_guess`
1259 test -z "$ac_cv_build_alias" &&
1260   { { echo "$as_me:1260: error: cannot guess build type; you must specify one" >&5
1261 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1262    { (exit 1); exit 1; }; }
1263 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1264   { { echo "$as_me:1264: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1265 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1266    { (exit 1); exit 1; }; }
1267
1268 fi
1269 echo "$as_me:1269: result: $ac_cv_build" >&5
1270 echo "${ECHO_T}$ac_cv_build" >&6
1271 build=$ac_cv_build
1272 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1273 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1274 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1275
1276 echo "$as_me:1276: checking host system type" >&5
1277 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1278 if test "${ac_cv_host+set}" = set; then
1279   echo $ECHO_N "(cached) $ECHO_C" >&6
1280 else
1281   ac_cv_host_alias=$host_alias
1282 test -z "$ac_cv_host_alias" &&
1283   ac_cv_host_alias=$ac_cv_build_alias
1284 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1285   { { echo "$as_me:1285: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1286 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1287    { (exit 1); exit 1; }; }
1288
1289 fi
1290 echo "$as_me:1290: result: $ac_cv_host" >&5
1291 echo "${ECHO_T}$ac_cv_host" >&6
1292 host=$ac_cv_host
1293 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1294 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1295 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1296
1297 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1298         echo "$as_me:1298: checking target system type" >&5
1299 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1300 if test "${ac_cv_target+set}" = set; then
1301   echo $ECHO_N "(cached) $ECHO_C" >&6
1302 else
1303   ac_cv_target_alias=$target_alias
1304 test "x$ac_cv_target_alias" = "x" &&
1305   ac_cv_target_alias=$ac_cv_host_alias
1306 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1307   { { echo "$as_me:1307: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1308 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1309    { (exit 1); exit 1; }; }
1310
1311 fi
1312 echo "$as_me:1312: result: $ac_cv_target" >&5
1313 echo "${ECHO_T}$ac_cv_target" >&6
1314 target=$ac_cv_target
1315 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1316 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1317 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1318
1319 # The aliases save the names the user supplied, while $host etc.
1320 # will get canonicalized.
1321 test -n "$target_alias" &&
1322   test "$program_prefix$program_suffix$program_transform_name" = \
1323     NONENONEs,x,x, &&
1324   program_prefix=${target_alias}-
1325         system_name="$host_os"
1326 else
1327         system_name="`(uname -s -r) 2>/dev/null`"
1328         if test -z "$system_name" ; then
1329                 system_name="`(hostname) 2>/dev/null`"
1330         fi
1331 fi
1332 test -n "$system_name" && cat >>confdefs.h <<EOF
1333 #define SYSTEM_NAME "$system_name"
1334 EOF
1335
1336 if test "${cf_cv_system_name+set}" = set; then
1337   echo $ECHO_N "(cached) $ECHO_C" >&6
1338 else
1339   cf_cv_system_name="$system_name"
1340 fi
1341
1342 test -z "$system_name" && system_name="$cf_cv_system_name"
1343 test -n "$cf_cv_system_name" && echo "$as_me:1343: result: Configuring for $cf_cv_system_name" >&5
1344 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1345
1346 if test ".$system_name" != ".$cf_cv_system_name" ; then
1347         echo "$as_me:1347: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1348 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1349         { { echo "$as_me:1349: error: \"Please remove config.cache and try again.\"" >&5
1350 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1351    { (exit 1); exit 1; }; }
1352 fi
1353
1354 # Check whether --with-system-type or --without-system-type was given.
1355 if test "${with_system_type+set}" = set; then
1356   withval="$with_system_type"
1357   { echo "$as_me:1357: WARNING: overriding system type to $withval" >&5
1358 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1359  cf_cv_system_name=$withval
1360 fi;
1361
1362 ###     Save the given $CFLAGS to allow user-override.
1363 cf_user_CFLAGS="$CFLAGS"
1364
1365 ###     Default install-location
1366
1367 echo "$as_me:1367: checking for prefix" >&5
1368 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1369 if test "x$prefix" = "xNONE" ; then
1370         case "$cf_cv_system_name" in
1371                 # non-vendor systems don't have a conflict
1372         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1373                 prefix=/usr
1374                 ;;
1375         *)      prefix=$ac_default_prefix
1376                 ;;
1377         esac
1378 fi
1379 echo "$as_me:1379: result: $prefix" >&5
1380 echo "${ECHO_T}$prefix" >&6
1381
1382 if test "x$prefix" = "xNONE" ; then
1383 echo "$as_me:1383: checking for default include-directory" >&5
1384 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1385 test -n "$verbose" && echo 1>&6
1386 for cf_symbol in \
1387         $includedir \
1388         $includedir/ncurses \
1389         $prefix/include \
1390         $prefix/include/ncurses \
1391         /usr/local/include \
1392         /usr/local/include/ncurses \
1393         /usr/include \
1394         /usr/include/ncurses
1395 do
1396         cf_dir=`eval echo $cf_symbol`
1397         if test -f $cf_dir/curses.h ; then
1398         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1399                 includedir="$cf_symbol"
1400                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1401                 break
1402         fi
1403         fi
1404         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1405 done
1406 echo "$as_me:1406: result: $includedir" >&5
1407 echo "${ECHO_T}$includedir" >&6
1408 fi
1409
1410 ###     Checks for programs.
1411 ac_ext=c
1412 ac_cpp='$CPP $CPPFLAGS'
1413 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1414 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1415 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1416 ac_main_return=return
1417 if test -n "$ac_tool_prefix"; then
1418   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1419 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1420 echo "$as_me:1420: checking for $ac_word" >&5
1421 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1422 if test "${ac_cv_prog_CC+set}" = set; then
1423   echo $ECHO_N "(cached) $ECHO_C" >&6
1424 else
1425   if test -n "$CC"; then
1426   ac_cv_prog_CC="$CC" # Let the user override the test.
1427 else
1428   ac_save_IFS=$IFS; IFS=$ac_path_separator
1429 ac_dummy="$PATH"
1430 for ac_dir in $ac_dummy; do
1431   IFS=$ac_save_IFS
1432   test -z "$ac_dir" && ac_dir=.
1433   $as_executable_p "$ac_dir/$ac_word" || continue
1434 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1435 echo "$as_me:1435: found $ac_dir/$ac_word" >&5
1436 break
1437 done
1438
1439 fi
1440 fi
1441 CC=$ac_cv_prog_CC
1442 if test -n "$CC"; then
1443   echo "$as_me:1443: result: $CC" >&5
1444 echo "${ECHO_T}$CC" >&6
1445 else
1446   echo "$as_me:1446: result: no" >&5
1447 echo "${ECHO_T}no" >&6
1448 fi
1449
1450 fi
1451 if test -z "$ac_cv_prog_CC"; then
1452   ac_ct_CC=$CC
1453   # Extract the first word of "gcc", so it can be a program name with args.
1454 set dummy gcc; ac_word=$2
1455 echo "$as_me:1455: checking for $ac_word" >&5
1456 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1457 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1458   echo $ECHO_N "(cached) $ECHO_C" >&6
1459 else
1460   if test -n "$ac_ct_CC"; then
1461   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1462 else
1463   ac_save_IFS=$IFS; IFS=$ac_path_separator
1464 ac_dummy="$PATH"
1465 for ac_dir in $ac_dummy; do
1466   IFS=$ac_save_IFS
1467   test -z "$ac_dir" && ac_dir=.
1468   $as_executable_p "$ac_dir/$ac_word" || continue
1469 ac_cv_prog_ac_ct_CC="gcc"
1470 echo "$as_me:1470: found $ac_dir/$ac_word" >&5
1471 break
1472 done
1473
1474 fi
1475 fi
1476 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1477 if test -n "$ac_ct_CC"; then
1478   echo "$as_me:1478: result: $ac_ct_CC" >&5
1479 echo "${ECHO_T}$ac_ct_CC" >&6
1480 else
1481   echo "$as_me:1481: result: no" >&5
1482 echo "${ECHO_T}no" >&6
1483 fi
1484
1485   CC=$ac_ct_CC
1486 else
1487   CC="$ac_cv_prog_CC"
1488 fi
1489
1490 if test -z "$CC"; then
1491   if test -n "$ac_tool_prefix"; then
1492   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1493 set dummy ${ac_tool_prefix}cc; ac_word=$2
1494 echo "$as_me:1494: checking for $ac_word" >&5
1495 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1496 if test "${ac_cv_prog_CC+set}" = set; then
1497   echo $ECHO_N "(cached) $ECHO_C" >&6
1498 else
1499   if test -n "$CC"; then
1500   ac_cv_prog_CC="$CC" # Let the user override the test.
1501 else
1502   ac_save_IFS=$IFS; IFS=$ac_path_separator
1503 ac_dummy="$PATH"
1504 for ac_dir in $ac_dummy; do
1505   IFS=$ac_save_IFS
1506   test -z "$ac_dir" && ac_dir=.
1507   $as_executable_p "$ac_dir/$ac_word" || continue
1508 ac_cv_prog_CC="${ac_tool_prefix}cc"
1509 echo "$as_me:1509: found $ac_dir/$ac_word" >&5
1510 break
1511 done
1512
1513 fi
1514 fi
1515 CC=$ac_cv_prog_CC
1516 if test -n "$CC"; then
1517   echo "$as_me:1517: result: $CC" >&5
1518 echo "${ECHO_T}$CC" >&6
1519 else
1520   echo "$as_me:1520: result: no" >&5
1521 echo "${ECHO_T}no" >&6
1522 fi
1523
1524 fi
1525 if test -z "$ac_cv_prog_CC"; then
1526   ac_ct_CC=$CC
1527   # Extract the first word of "cc", so it can be a program name with args.
1528 set dummy cc; ac_word=$2
1529 echo "$as_me:1529: checking for $ac_word" >&5
1530 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1531 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1532   echo $ECHO_N "(cached) $ECHO_C" >&6
1533 else
1534   if test -n "$ac_ct_CC"; then
1535   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1536 else
1537   ac_save_IFS=$IFS; IFS=$ac_path_separator
1538 ac_dummy="$PATH"
1539 for ac_dir in $ac_dummy; do
1540   IFS=$ac_save_IFS
1541   test -z "$ac_dir" && ac_dir=.
1542   $as_executable_p "$ac_dir/$ac_word" || continue
1543 ac_cv_prog_ac_ct_CC="cc"
1544 echo "$as_me:1544: found $ac_dir/$ac_word" >&5
1545 break
1546 done
1547
1548 fi
1549 fi
1550 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1551 if test -n "$ac_ct_CC"; then
1552   echo "$as_me:1552: result: $ac_ct_CC" >&5
1553 echo "${ECHO_T}$ac_ct_CC" >&6
1554 else
1555   echo "$as_me:1555: result: no" >&5
1556 echo "${ECHO_T}no" >&6
1557 fi
1558
1559   CC=$ac_ct_CC
1560 else
1561   CC="$ac_cv_prog_CC"
1562 fi
1563
1564 fi
1565 if test -z "$CC"; then
1566   # Extract the first word of "cc", so it can be a program name with args.
1567 set dummy cc; ac_word=$2
1568 echo "$as_me:1568: checking for $ac_word" >&5
1569 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1570 if test "${ac_cv_prog_CC+set}" = set; then
1571   echo $ECHO_N "(cached) $ECHO_C" >&6
1572 else
1573   if test -n "$CC"; then
1574   ac_cv_prog_CC="$CC" # Let the user override the test.
1575 else
1576   ac_prog_rejected=no
1577   ac_save_IFS=$IFS; IFS=$ac_path_separator
1578 ac_dummy="$PATH"
1579 for ac_dir in $ac_dummy; do
1580   IFS=$ac_save_IFS
1581   test -z "$ac_dir" && ac_dir=.
1582   $as_executable_p "$ac_dir/$ac_word" || continue
1583 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1584   ac_prog_rejected=yes
1585   continue
1586 fi
1587 ac_cv_prog_CC="cc"
1588 echo "$as_me:1588: found $ac_dir/$ac_word" >&5
1589 break
1590 done
1591
1592 if test $ac_prog_rejected = yes; then
1593   # We found a bogon in the path, so make sure we never use it.
1594   set dummy $ac_cv_prog_CC
1595   shift
1596   if test $# != 0; then
1597     # We chose a different compiler from the bogus one.
1598     # However, it has the same basename, so the bogon will be chosen
1599     # first if we set CC to just the basename; use the full file name.
1600     shift
1601     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1602     shift
1603     ac_cv_prog_CC="$@"
1604   fi
1605 fi
1606 fi
1607 fi
1608 CC=$ac_cv_prog_CC
1609 if test -n "$CC"; then
1610   echo "$as_me:1610: result: $CC" >&5
1611 echo "${ECHO_T}$CC" >&6
1612 else
1613   echo "$as_me:1613: result: no" >&5
1614 echo "${ECHO_T}no" >&6
1615 fi
1616
1617 fi
1618 if test -z "$CC"; then
1619   if test -n "$ac_tool_prefix"; then
1620   for ac_prog in cl
1621   do
1622     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1623 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1624 echo "$as_me:1624: checking for $ac_word" >&5
1625 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1626 if test "${ac_cv_prog_CC+set}" = set; then
1627   echo $ECHO_N "(cached) $ECHO_C" >&6
1628 else
1629   if test -n "$CC"; then
1630   ac_cv_prog_CC="$CC" # Let the user override the test.
1631 else
1632   ac_save_IFS=$IFS; IFS=$ac_path_separator
1633 ac_dummy="$PATH"
1634 for ac_dir in $ac_dummy; do
1635   IFS=$ac_save_IFS
1636   test -z "$ac_dir" && ac_dir=.
1637   $as_executable_p "$ac_dir/$ac_word" || continue
1638 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1639 echo "$as_me:1639: found $ac_dir/$ac_word" >&5
1640 break
1641 done
1642
1643 fi
1644 fi
1645 CC=$ac_cv_prog_CC
1646 if test -n "$CC"; then
1647   echo "$as_me:1647: result: $CC" >&5
1648 echo "${ECHO_T}$CC" >&6
1649 else
1650   echo "$as_me:1650: result: no" >&5
1651 echo "${ECHO_T}no" >&6
1652 fi
1653
1654     test -n "$CC" && break
1655   done
1656 fi
1657 if test -z "$CC"; then
1658   ac_ct_CC=$CC
1659   for ac_prog in cl
1660 do
1661   # Extract the first word of "$ac_prog", so it can be a program name with args.
1662 set dummy $ac_prog; ac_word=$2
1663 echo "$as_me:1663: checking for $ac_word" >&5
1664 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1665 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1666   echo $ECHO_N "(cached) $ECHO_C" >&6
1667 else
1668   if test -n "$ac_ct_CC"; then
1669   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1670 else
1671   ac_save_IFS=$IFS; IFS=$ac_path_separator
1672 ac_dummy="$PATH"
1673 for ac_dir in $ac_dummy; do
1674   IFS=$ac_save_IFS
1675   test -z "$ac_dir" && ac_dir=.
1676   $as_executable_p "$ac_dir/$ac_word" || continue
1677 ac_cv_prog_ac_ct_CC="$ac_prog"
1678 echo "$as_me:1678: found $ac_dir/$ac_word" >&5
1679 break
1680 done
1681
1682 fi
1683 fi
1684 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1685 if test -n "$ac_ct_CC"; then
1686   echo "$as_me:1686: result: $ac_ct_CC" >&5
1687 echo "${ECHO_T}$ac_ct_CC" >&6
1688 else
1689   echo "$as_me:1689: result: no" >&5
1690 echo "${ECHO_T}no" >&6
1691 fi
1692
1693   test -n "$ac_ct_CC" && break
1694 done
1695
1696   CC=$ac_ct_CC
1697 fi
1698
1699 fi
1700
1701 test -z "$CC" && { { echo "$as_me:1701: error: no acceptable cc found in \$PATH" >&5
1702 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1703    { (exit 1); exit 1; }; }
1704
1705 # Provide some information about the compiler.
1706 echo "$as_me:1706:" \
1707      "checking for C compiler version" >&5
1708 ac_compiler=`set X $ac_compile; echo $2`
1709 { (eval echo "$as_me:1709: \"$ac_compiler --version </dev/null >&5\"") >&5
1710   (eval $ac_compiler --version </dev/null >&5) 2>&5
1711   ac_status=$?
1712   echo "$as_me:1712: \$? = $ac_status" >&5
1713   (exit $ac_status); }
1714 { (eval echo "$as_me:1714: \"$ac_compiler -v </dev/null >&5\"") >&5
1715   (eval $ac_compiler -v </dev/null >&5) 2>&5
1716   ac_status=$?
1717   echo "$as_me:1717: \$? = $ac_status" >&5
1718   (exit $ac_status); }
1719 { (eval echo "$as_me:1719: \"$ac_compiler -V </dev/null >&5\"") >&5
1720   (eval $ac_compiler -V </dev/null >&5) 2>&5
1721   ac_status=$?
1722   echo "$as_me:1722: \$? = $ac_status" >&5
1723   (exit $ac_status); }
1724
1725 cat >conftest.$ac_ext <<_ACEOF
1726 #line 1726 "configure"
1727 #include "confdefs.h"
1728
1729 int
1730 main ()
1731 {
1732
1733   ;
1734   return 0;
1735 }
1736 _ACEOF
1737 ac_clean_files_save=$ac_clean_files
1738 ac_clean_files="$ac_clean_files a.out a.exe"
1739 # Try to create an executable without -o first, disregard a.out.
1740 # It will help us diagnose broken compilers, and finding out an intuition
1741 # of exeext.
1742 echo "$as_me:1742: checking for C compiler default output" >&5
1743 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1744 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1745 if { (eval echo "$as_me:1745: \"$ac_link_default\"") >&5
1746   (eval $ac_link_default) 2>&5
1747   ac_status=$?
1748   echo "$as_me:1748: \$? = $ac_status" >&5
1749   (exit $ac_status); }; then
1750   # Find the output, starting from the most likely.  This scheme is
1751 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1752 # resort.
1753 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1754                 ls a.out conftest 2>/dev/null;
1755                 ls a.* conftest.* 2>/dev/null`; do
1756   case $ac_file in
1757     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1758     a.out ) # We found the default executable, but exeext='' is most
1759             # certainly right.
1760             break;;
1761     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1762           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1763           export ac_cv_exeext
1764           break;;
1765     * ) break;;
1766   esac
1767 done
1768 else
1769   echo "$as_me: failed program was:" >&5
1770 cat conftest.$ac_ext >&5
1771 { { echo "$as_me:1771: error: C compiler cannot create executables" >&5
1772 echo "$as_me: error: C compiler cannot create executables" >&2;}
1773    { (exit 77); exit 77; }; }
1774 fi
1775
1776 ac_exeext=$ac_cv_exeext
1777 echo "$as_me:1777: result: $ac_file" >&5
1778 echo "${ECHO_T}$ac_file" >&6
1779
1780 # Check the compiler produces executables we can run.  If not, either
1781 # the compiler is broken, or we cross compile.
1782 echo "$as_me:1782: checking whether the C compiler works" >&5
1783 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1784 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1785 # If not cross compiling, check that we can run a simple program.
1786 if test "$cross_compiling" != yes; then
1787   if { ac_try='./$ac_file'
1788   { (eval echo "$as_me:1788: \"$ac_try\"") >&5
1789   (eval $ac_try) 2>&5
1790   ac_status=$?
1791   echo "$as_me:1791: \$? = $ac_status" >&5
1792   (exit $ac_status); }; }; then
1793     cross_compiling=no
1794   else
1795     if test "$cross_compiling" = maybe; then
1796         cross_compiling=yes
1797     else
1798         { { echo "$as_me:1798: error: cannot run C compiled programs.
1799 If you meant to cross compile, use \`--host'." >&5
1800 echo "$as_me: error: cannot run C compiled programs.
1801 If you meant to cross compile, use \`--host'." >&2;}
1802    { (exit 1); exit 1; }; }
1803     fi
1804   fi
1805 fi
1806 echo "$as_me:1806: result: yes" >&5
1807 echo "${ECHO_T}yes" >&6
1808
1809 rm -f a.out a.exe conftest$ac_cv_exeext
1810 ac_clean_files=$ac_clean_files_save
1811 # Check the compiler produces executables we can run.  If not, either
1812 # the compiler is broken, or we cross compile.
1813 echo "$as_me:1813: checking whether we are cross compiling" >&5
1814 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1815 echo "$as_me:1815: result: $cross_compiling" >&5
1816 echo "${ECHO_T}$cross_compiling" >&6
1817
1818 echo "$as_me:1818: checking for executable suffix" >&5
1819 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1820 if { (eval echo "$as_me:1820: \"$ac_link\"") >&5
1821   (eval $ac_link) 2>&5
1822   ac_status=$?
1823   echo "$as_me:1823: \$? = $ac_status" >&5
1824   (exit $ac_status); }; then
1825   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1826 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1827 # work properly (i.e., refer to `conftest.exe'), while it won't with
1828 # `rm'.
1829 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1830   case $ac_file in
1831     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1832     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1833           export ac_cv_exeext
1834           break;;
1835     * ) break;;
1836   esac
1837 done
1838 else
1839   { { echo "$as_me:1839: error: cannot compute EXEEXT: cannot compile and link" >&5
1840 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1841    { (exit 1); exit 1; }; }
1842 fi
1843
1844 rm -f conftest$ac_cv_exeext
1845 echo "$as_me:1845: result: $ac_cv_exeext" >&5
1846 echo "${ECHO_T}$ac_cv_exeext" >&6
1847
1848 rm -f conftest.$ac_ext
1849 EXEEXT=$ac_cv_exeext
1850 ac_exeext=$EXEEXT
1851 echo "$as_me:1851: checking for object suffix" >&5
1852 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1853 if test "${ac_cv_objext+set}" = set; then
1854   echo $ECHO_N "(cached) $ECHO_C" >&6
1855 else
1856   cat >conftest.$ac_ext <<_ACEOF
1857 #line 1857 "configure"
1858 #include "confdefs.h"
1859
1860 int
1861 main ()
1862 {
1863
1864   ;
1865   return 0;
1866 }
1867 _ACEOF
1868 rm -f conftest.o conftest.obj
1869 if { (eval echo "$as_me:1869: \"$ac_compile\"") >&5
1870   (eval $ac_compile) 2>&5
1871   ac_status=$?
1872   echo "$as_me:1872: \$? = $ac_status" >&5
1873   (exit $ac_status); }; then
1874   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1875   case $ac_file in
1876     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1877     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1878        break;;
1879   esac
1880 done
1881 else
1882   echo "$as_me: failed program was:" >&5
1883 cat conftest.$ac_ext >&5
1884 { { echo "$as_me:1884: error: cannot compute OBJEXT: cannot compile" >&5
1885 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1886    { (exit 1); exit 1; }; }
1887 fi
1888
1889 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1890 fi
1891 echo "$as_me:1891: result: $ac_cv_objext" >&5
1892 echo "${ECHO_T}$ac_cv_objext" >&6
1893 OBJEXT=$ac_cv_objext
1894 ac_objext=$OBJEXT
1895 echo "$as_me:1895: checking whether we are using the GNU C compiler" >&5
1896 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1897 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1898   echo $ECHO_N "(cached) $ECHO_C" >&6
1899 else
1900   cat >conftest.$ac_ext <<_ACEOF
1901 #line 1901 "configure"
1902 #include "confdefs.h"
1903
1904 int
1905 main ()
1906 {
1907 #ifndef __GNUC__
1908        choke me
1909 #endif
1910
1911   ;
1912   return 0;
1913 }
1914 _ACEOF
1915 rm -f conftest.$ac_objext
1916 if { (eval echo "$as_me:1916: \"$ac_compile\"") >&5
1917   (eval $ac_compile) 2>&5
1918   ac_status=$?
1919   echo "$as_me:1919: \$? = $ac_status" >&5
1920   (exit $ac_status); } &&
1921          { ac_try='test -s conftest.$ac_objext'
1922   { (eval echo "$as_me:1922: \"$ac_try\"") >&5
1923   (eval $ac_try) 2>&5
1924   ac_status=$?
1925   echo "$as_me:1925: \$? = $ac_status" >&5
1926   (exit $ac_status); }; }; then
1927   ac_compiler_gnu=yes
1928 else
1929   echo "$as_me: failed program was:" >&5
1930 cat conftest.$ac_ext >&5
1931 ac_compiler_gnu=no
1932 fi
1933 rm -f conftest.$ac_objext conftest.$ac_ext
1934 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1935
1936 fi
1937 echo "$as_me:1937: result: $ac_cv_c_compiler_gnu" >&5
1938 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1939 GCC=`test $ac_compiler_gnu = yes && echo yes`
1940 ac_test_CFLAGS=${CFLAGS+set}
1941 ac_save_CFLAGS=$CFLAGS
1942 CFLAGS="-g"
1943 echo "$as_me:1943: checking whether $CC accepts -g" >&5
1944 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1945 if test "${ac_cv_prog_cc_g+set}" = set; then
1946   echo $ECHO_N "(cached) $ECHO_C" >&6
1947 else
1948   cat >conftest.$ac_ext <<_ACEOF
1949 #line 1949 "configure"
1950 #include "confdefs.h"
1951
1952 int
1953 main ()
1954 {
1955
1956   ;
1957   return 0;
1958 }
1959 _ACEOF
1960 rm -f conftest.$ac_objext
1961 if { (eval echo "$as_me:1961: \"$ac_compile\"") >&5
1962   (eval $ac_compile) 2>&5
1963   ac_status=$?
1964   echo "$as_me:1964: \$? = $ac_status" >&5
1965   (exit $ac_status); } &&
1966          { ac_try='test -s conftest.$ac_objext'
1967   { (eval echo "$as_me:1967: \"$ac_try\"") >&5
1968   (eval $ac_try) 2>&5
1969   ac_status=$?
1970   echo "$as_me:1970: \$? = $ac_status" >&5
1971   (exit $ac_status); }; }; then
1972   ac_cv_prog_cc_g=yes
1973 else
1974   echo "$as_me: failed program was:" >&5
1975 cat conftest.$ac_ext >&5
1976 ac_cv_prog_cc_g=no
1977 fi
1978 rm -f conftest.$ac_objext conftest.$ac_ext
1979 fi
1980 echo "$as_me:1980: result: $ac_cv_prog_cc_g" >&5
1981 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1982 if test "$ac_test_CFLAGS" = set; then
1983   CFLAGS=$ac_save_CFLAGS
1984 elif test $ac_cv_prog_cc_g = yes; then
1985   if test "$GCC" = yes; then
1986     CFLAGS="-g -O2"
1987   else
1988     CFLAGS="-g"
1989   fi
1990 else
1991   if test "$GCC" = yes; then
1992     CFLAGS="-O2"
1993   else
1994     CFLAGS=
1995   fi
1996 fi
1997 # Some people use a C++ compiler to compile C.  Since we use `exit',
1998 # in C++ we need to declare it.  In case someone uses the same compiler
1999 # for both compiling C and C++ we need to have the C++ compiler decide
2000 # the declaration of exit, since it's the most demanding environment.
2001 cat >conftest.$ac_ext <<_ACEOF
2002 #ifndef __cplusplus
2003   choke me
2004 #endif
2005 _ACEOF
2006 rm -f conftest.$ac_objext
2007 if { (eval echo "$as_me:2007: \"$ac_compile\"") >&5
2008   (eval $ac_compile) 2>&5
2009   ac_status=$?
2010   echo "$as_me:2010: \$? = $ac_status" >&5
2011   (exit $ac_status); } &&
2012          { ac_try='test -s conftest.$ac_objext'
2013   { (eval echo "$as_me:2013: \"$ac_try\"") >&5
2014   (eval $ac_try) 2>&5
2015   ac_status=$?
2016   echo "$as_me:2016: \$? = $ac_status" >&5
2017   (exit $ac_status); }; }; then
2018   for ac_declaration in \
2019    ''\
2020    '#include <stdlib.h>' \
2021    'extern "C" void std::exit (int) throw (); using std::exit;' \
2022    'extern "C" void std::exit (int); using std::exit;' \
2023    'extern "C" void exit (int) throw ();' \
2024    'extern "C" void exit (int);' \
2025    'void exit (int);'
2026 do
2027   cat >conftest.$ac_ext <<_ACEOF
2028 #line 2028 "configure"
2029 #include "confdefs.h"
2030 #include <stdlib.h>
2031 $ac_declaration
2032 int
2033 main ()
2034 {
2035 exit (42);
2036   ;
2037   return 0;
2038 }
2039 _ACEOF
2040 rm -f conftest.$ac_objext
2041 if { (eval echo "$as_me:2041: \"$ac_compile\"") >&5
2042   (eval $ac_compile) 2>&5
2043   ac_status=$?
2044   echo "$as_me:2044: \$? = $ac_status" >&5
2045   (exit $ac_status); } &&
2046          { ac_try='test -s conftest.$ac_objext'
2047   { (eval echo "$as_me:2047: \"$ac_try\"") >&5
2048   (eval $ac_try) 2>&5
2049   ac_status=$?
2050   echo "$as_me:2050: \$? = $ac_status" >&5
2051   (exit $ac_status); }; }; then
2052   :
2053 else
2054   echo "$as_me: failed program was:" >&5
2055 cat conftest.$ac_ext >&5
2056 continue
2057 fi
2058 rm -f conftest.$ac_objext conftest.$ac_ext
2059   cat >conftest.$ac_ext <<_ACEOF
2060 #line 2060 "configure"
2061 #include "confdefs.h"
2062 $ac_declaration
2063 int
2064 main ()
2065 {
2066 exit (42);
2067   ;
2068   return 0;
2069 }
2070 _ACEOF
2071 rm -f conftest.$ac_objext
2072 if { (eval echo "$as_me:2072: \"$ac_compile\"") >&5
2073   (eval $ac_compile) 2>&5
2074   ac_status=$?
2075   echo "$as_me:2075: \$? = $ac_status" >&5
2076   (exit $ac_status); } &&
2077          { ac_try='test -s conftest.$ac_objext'
2078   { (eval echo "$as_me:2078: \"$ac_try\"") >&5
2079   (eval $ac_try) 2>&5
2080   ac_status=$?
2081   echo "$as_me:2081: \$? = $ac_status" >&5
2082   (exit $ac_status); }; }; then
2083   break
2084 else
2085   echo "$as_me: failed program was:" >&5
2086 cat conftest.$ac_ext >&5
2087 fi
2088 rm -f conftest.$ac_objext conftest.$ac_ext
2089 done
2090 rm -rf conftest*
2091 if test -n "$ac_declaration"; then
2092   echo '#ifdef __cplusplus' >>confdefs.h
2093   echo $ac_declaration      >>confdefs.h
2094   echo '#endif'             >>confdefs.h
2095 fi
2096
2097 else
2098   echo "$as_me: failed program was:" >&5
2099 cat conftest.$ac_ext >&5
2100 fi
2101 rm -f conftest.$ac_objext conftest.$ac_ext
2102 ac_ext=c
2103 ac_cpp='$CPP $CPPFLAGS'
2104 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2105 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2106 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2107 ac_main_return=return
2108
2109 GCC_VERSION=none
2110 if test "$GCC" = yes ; then
2111         echo "$as_me:2111: checking version of $CC" >&5
2112 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2113         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2114         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2115         echo "$as_me:2115: result: $GCC_VERSION" >&5
2116 echo "${ECHO_T}$GCC_VERSION" >&6
2117 fi
2118
2119 ac_ext=c
2120 ac_cpp='$CPP $CPPFLAGS'
2121 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2122 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2123 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2124 ac_main_return=return
2125 echo "$as_me:2125: checking how to run the C preprocessor" >&5
2126 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2127 # On Suns, sometimes $CPP names a directory.
2128 if test -n "$CPP" && test -d "$CPP"; then
2129   CPP=
2130 fi
2131 if test -z "$CPP"; then
2132   if test "${ac_cv_prog_CPP+set}" = set; then
2133   echo $ECHO_N "(cached) $ECHO_C" >&6
2134 else
2135       # Double quotes because CPP needs to be expanded
2136     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2137     do
2138       ac_preproc_ok=false
2139 for ac_c_preproc_warn_flag in '' yes
2140 do
2141   # Use a header file that comes with gcc, so configuring glibc
2142   # with a fresh cross-compiler works.
2143   # On the NeXT, cc -E runs the code through the compiler's parser,
2144   # not just through cpp. "Syntax error" is here to catch this case.
2145   cat >conftest.$ac_ext <<_ACEOF
2146 #line 2146 "configure"
2147 #include "confdefs.h"
2148 #include <assert.h>
2149                      Syntax error
2150 _ACEOF
2151 if { (eval echo "$as_me:2151: \"$ac_cpp conftest.$ac_ext\"") >&5
2152   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2153   ac_status=$?
2154   egrep -v '^ *\+' conftest.er1 >conftest.err
2155   rm -f conftest.er1
2156   cat conftest.err >&5
2157   echo "$as_me:2157: \$? = $ac_status" >&5
2158   (exit $ac_status); } >/dev/null; then
2159   if test -s conftest.err; then
2160     ac_cpp_err=$ac_c_preproc_warn_flag
2161   else
2162     ac_cpp_err=
2163   fi
2164 else
2165   ac_cpp_err=yes
2166 fi
2167 if test -z "$ac_cpp_err"; then
2168   :
2169 else
2170   echo "$as_me: failed program was:" >&5
2171   cat conftest.$ac_ext >&5
2172   # Broken: fails on valid input.
2173 continue
2174 fi
2175 rm -f conftest.err conftest.$ac_ext
2176
2177   # OK, works on sane cases.  Now check whether non-existent headers
2178   # can be detected and how.
2179   cat >conftest.$ac_ext <<_ACEOF
2180 #line 2180 "configure"
2181 #include "confdefs.h"
2182 #include <ac_nonexistent.h>
2183 _ACEOF
2184 if { (eval echo "$as_me:2184: \"$ac_cpp conftest.$ac_ext\"") >&5
2185   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2186   ac_status=$?
2187   egrep -v '^ *\+' conftest.er1 >conftest.err
2188   rm -f conftest.er1
2189   cat conftest.err >&5
2190   echo "$as_me:2190: \$? = $ac_status" >&5
2191   (exit $ac_status); } >/dev/null; then
2192   if test -s conftest.err; then
2193     ac_cpp_err=$ac_c_preproc_warn_flag
2194   else
2195     ac_cpp_err=
2196   fi
2197 else
2198   ac_cpp_err=yes
2199 fi
2200 if test -z "$ac_cpp_err"; then
2201   # Broken: success on invalid input.
2202 continue
2203 else
2204   echo "$as_me: failed program was:" >&5
2205   cat conftest.$ac_ext >&5
2206   # Passes both tests.
2207 ac_preproc_ok=:
2208 break
2209 fi
2210 rm -f conftest.err conftest.$ac_ext
2211
2212 done
2213 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2214 rm -f conftest.err conftest.$ac_ext
2215 if $ac_preproc_ok; then
2216   break
2217 fi
2218
2219     done
2220     ac_cv_prog_CPP=$CPP
2221
2222 fi
2223   CPP=$ac_cv_prog_CPP
2224 else
2225   ac_cv_prog_CPP=$CPP
2226 fi
2227 echo "$as_me:2227: result: $CPP" >&5
2228 echo "${ECHO_T}$CPP" >&6
2229 ac_preproc_ok=false
2230 for ac_c_preproc_warn_flag in '' yes
2231 do
2232   # Use a header file that comes with gcc, so configuring glibc
2233   # with a fresh cross-compiler works.
2234   # On the NeXT, cc -E runs the code through the compiler's parser,
2235   # not just through cpp. "Syntax error" is here to catch this case.
2236   cat >conftest.$ac_ext <<_ACEOF
2237 #line 2237 "configure"
2238 #include "confdefs.h"
2239 #include <assert.h>
2240                      Syntax error
2241 _ACEOF
2242 if { (eval echo "$as_me:2242: \"$ac_cpp conftest.$ac_ext\"") >&5
2243   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2244   ac_status=$?
2245   egrep -v '^ *\+' conftest.er1 >conftest.err
2246   rm -f conftest.er1
2247   cat conftest.err >&5
2248   echo "$as_me:2248: \$? = $ac_status" >&5
2249   (exit $ac_status); } >/dev/null; then
2250   if test -s conftest.err; then
2251     ac_cpp_err=$ac_c_preproc_warn_flag
2252   else
2253     ac_cpp_err=
2254   fi
2255 else
2256   ac_cpp_err=yes
2257 fi
2258 if test -z "$ac_cpp_err"; then
2259   :
2260 else
2261   echo "$as_me: failed program was:" >&5
2262   cat conftest.$ac_ext >&5
2263   # Broken: fails on valid input.
2264 continue
2265 fi
2266 rm -f conftest.err conftest.$ac_ext
2267
2268   # OK, works on sane cases.  Now check whether non-existent headers
2269   # can be detected and how.
2270   cat >conftest.$ac_ext <<_ACEOF
2271 #line 2271 "configure"
2272 #include "confdefs.h"
2273 #include <ac_nonexistent.h>
2274 _ACEOF
2275 if { (eval echo "$as_me:2275: \"$ac_cpp conftest.$ac_ext\"") >&5
2276   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2277   ac_status=$?
2278   egrep -v '^ *\+' conftest.er1 >conftest.err
2279   rm -f conftest.er1
2280   cat conftest.err >&5
2281   echo "$as_me:2281: \$? = $ac_status" >&5
2282   (exit $ac_status); } >/dev/null; then
2283   if test -s conftest.err; then
2284     ac_cpp_err=$ac_c_preproc_warn_flag
2285   else
2286     ac_cpp_err=
2287   fi
2288 else
2289   ac_cpp_err=yes
2290 fi
2291 if test -z "$ac_cpp_err"; then
2292   # Broken: success on invalid input.
2293 continue
2294 else
2295   echo "$as_me: failed program was:" >&5
2296   cat conftest.$ac_ext >&5
2297   # Passes both tests.
2298 ac_preproc_ok=:
2299 break
2300 fi
2301 rm -f conftest.err conftest.$ac_ext
2302
2303 done
2304 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2305 rm -f conftest.err conftest.$ac_ext
2306 if $ac_preproc_ok; then
2307   :
2308 else
2309   { { echo "$as_me:2309: error: C preprocessor \"$CPP\" fails sanity check" >&5
2310 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2311    { (exit 1); exit 1; }; }
2312 fi
2313
2314 ac_ext=c
2315 ac_cpp='$CPP $CPPFLAGS'
2316 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2317 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2318 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2319 ac_main_return=return
2320
2321 if test $ac_cv_c_compiler_gnu = yes; then
2322     echo "$as_me:2322: checking whether $CC needs -traditional" >&5
2323 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2324 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2325   echo $ECHO_N "(cached) $ECHO_C" >&6
2326 else
2327     ac_pattern="Autoconf.*'x'"
2328   cat >conftest.$ac_ext <<_ACEOF
2329 #line 2329 "configure"
2330 #include "confdefs.h"
2331 #include <sgtty.h>
2332 int Autoconf = TIOCGETP;
2333 _ACEOF
2334 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2335   egrep "$ac_pattern" >/dev/null 2>&1; then
2336   ac_cv_prog_gcc_traditional=yes
2337 else
2338   ac_cv_prog_gcc_traditional=no
2339 fi
2340 rm -rf conftest*
2341
2342   if test $ac_cv_prog_gcc_traditional = no; then
2343     cat >conftest.$ac_ext <<_ACEOF
2344 #line 2344 "configure"
2345 #include "confdefs.h"
2346 #include <termio.h>
2347 int Autoconf = TCGETA;
2348 _ACEOF
2349 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2350   egrep "$ac_pattern" >/dev/null 2>&1; then
2351   ac_cv_prog_gcc_traditional=yes
2352 fi
2353 rm -rf conftest*
2354
2355   fi
2356 fi
2357 echo "$as_me:2357: result: $ac_cv_prog_gcc_traditional" >&5
2358 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2359   if test $ac_cv_prog_gcc_traditional = yes; then
2360     CC="$CC -traditional"
2361   fi
2362 fi
2363
2364 echo "$as_me:2364: checking whether $CC understands -c and -o together" >&5
2365 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2366 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2367   echo $ECHO_N "(cached) $ECHO_C" >&6
2368 else
2369
2370 cat > conftest.$ac_ext <<CF_EOF
2371 #include <stdio.h>
2372 int main()
2373 {
2374         ${cf_cv_main_return:-return}(0);
2375 }
2376 CF_EOF
2377 # We do the test twice because some compilers refuse to overwrite an
2378 # existing .o file with -o, though they will create one.
2379 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2380 if { (eval echo "$as_me:2380: \"$ac_try\"") >&5
2381   (eval $ac_try) 2>&5
2382   ac_status=$?
2383   echo "$as_me:2383: \$? = $ac_status" >&5
2384   (exit $ac_status); } &&
2385   test -f conftest2.$ac_objext && { (eval echo "$as_me:2385: \"$ac_try\"") >&5
2386   (eval $ac_try) 2>&5
2387   ac_status=$?
2388   echo "$as_me:2388: \$? = $ac_status" >&5
2389   (exit $ac_status); };
2390 then
2391   eval cf_cv_prog_CC_c_o=yes
2392 else
2393   eval cf_cv_prog_CC_c_o=no
2394 fi
2395 rm -rf conftest*
2396
2397 fi
2398 if test $cf_cv_prog_CC_c_o = yes; then
2399   echo "$as_me:2399: result: yes" >&5
2400 echo "${ECHO_T}yes" >&6
2401 else
2402   echo "$as_me:2402: result: no" >&5
2403 echo "${ECHO_T}no" >&6
2404 fi
2405
2406 echo "$as_me:2406: checking for POSIXized ISC" >&5
2407 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2408 if test -d /etc/conf/kconfig.d &&
2409    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2410 then
2411   echo "$as_me:2411: result: yes" >&5
2412 echo "${ECHO_T}yes" >&6
2413   ISC=yes # If later tests want to check for ISC.
2414
2415 cat >>confdefs.h <<\EOF
2416 #define _POSIX_SOURCE 1
2417 EOF
2418
2419   if test "$GCC" = yes; then
2420     CC="$CC -posix"
2421   else
2422     CC="$CC -Xp"
2423   fi
2424 else
2425   echo "$as_me:2425: result: no" >&5
2426 echo "${ECHO_T}no" >&6
2427   ISC=
2428 fi
2429
2430 # This should have been defined by AC_PROG_CC
2431 : ${CC:=cc}
2432
2433 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2434 # into CC.  This will not help with broken scripts that wrap the compiler with
2435 # options, but eliminates a more common category of user confusion.
2436 echo "$as_me:2436: checking \$CC variable" >&5
2437 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2438 case "$CC" in #(vi
2439 *[\ \   ]-[IUD]*)
2440         echo "$as_me:2440: result: broken" >&5
2441 echo "${ECHO_T}broken" >&6
2442         { echo "$as_me:2442: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2443 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2444         # humor him...
2445         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2446         CC=`echo "$CC" | sed -e 's/[    ].*//'`
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_flags
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         ;;
2527 *)
2528         echo "$as_me:2528: result: ok" >&5
2529 echo "${ECHO_T}ok" >&6
2530         ;;
2531 esac
2532
2533 echo "$as_me:2533: checking for ${CC:-cc} option to accept ANSI C" >&5
2534 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2535 if test "${cf_cv_ansi_cc+set}" = set; then
2536   echo $ECHO_N "(cached) $ECHO_C" >&6
2537 else
2538
2539 cf_cv_ansi_cc=no
2540 cf_save_CFLAGS="$CFLAGS"
2541 cf_save_CPPFLAGS="$CPPFLAGS"
2542 # Don't try gcc -ansi; that turns off useful extensions and
2543 # breaks some systems' header files.
2544 # AIX                   -qlanglvl=ansi
2545 # Ultrix and OSF/1      -std1
2546 # HP-UX                 -Aa -D_HPUX_SOURCE
2547 # SVR4                  -Xc
2548 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2549 for cf_arg in "-DCC_HAS_PROTOS" \
2550         "" \
2551         -qlanglvl=ansi \
2552         -std1 \
2553         -Ae \
2554         "-Aa -D_HPUX_SOURCE" \
2555         -Xc
2556 do
2557
2558 cf_fix_cppflags=no
2559 cf_new_cflags=
2560 cf_new_cppflags=
2561 cf_new_extra_cppflags=
2562
2563 for cf_add_cflags in $cf_arg
2564 do
2565 case $cf_fix_cppflags in
2566 no)
2567         case $cf_add_cflags in #(vi
2568         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2569                 case $cf_add_cflags in
2570                 -D*)
2571                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2572
2573                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2574                                 && test -z "${cf_tst_cflags}" \
2575                                 && cf_fix_cppflags=yes
2576
2577                         if test $cf_fix_cppflags = yes ; then
2578                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2579                                 continue
2580                         elif test "${cf_tst_cflags}" = "\"'" ; then
2581                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2582                                 continue
2583                         fi
2584                         ;;
2585                 esac
2586                 case "$CPPFLAGS" in
2587                 *$cf_add_cflags) #(vi
2588                         ;;
2589                 *) #(vi
2590                         case $cf_add_cflags in #(vi
2591                         -D*)
2592                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2593
2594 CPPFLAGS=`echo "$CPPFLAGS" | \
2595         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2596                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2597
2598                                 ;;
2599                         esac
2600                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2601                         ;;
2602                 esac
2603                 ;;
2604         *)
2605                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2606                 ;;
2607         esac
2608         ;;
2609 yes)
2610         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2611
2612         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2613
2614         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2615                 && test -z "${cf_tst_cflags}" \
2616                 && cf_fix_cppflags=no
2617         ;;
2618 esac
2619 done
2620
2621 if test -n "$cf_new_cflags" ; then
2622
2623         CFLAGS="$CFLAGS $cf_new_cflags"
2624 fi
2625
2626 if test -n "$cf_new_cppflags" ; then
2627
2628         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2629 fi
2630
2631 if test -n "$cf_new_extra_cppflags" ; then
2632
2633         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2634 fi
2635
2636         cat >conftest.$ac_ext <<_ACEOF
2637 #line 2637 "configure"
2638 #include "confdefs.h"
2639
2640 #ifndef CC_HAS_PROTOS
2641 #if !defined(__STDC__) || (__STDC__ != 1)
2642 choke me
2643 #endif
2644 #endif
2645
2646 int
2647 main ()
2648 {
2649
2650         int test (int i, double x);
2651         struct s1 {int (*f) (int a);};
2652         struct s2 {int (*f) (double a);};
2653   ;
2654   return 0;
2655 }
2656 _ACEOF
2657 rm -f conftest.$ac_objext
2658 if { (eval echo "$as_me:2658: \"$ac_compile\"") >&5
2659   (eval $ac_compile) 2>&5
2660   ac_status=$?
2661   echo "$as_me:2661: \$? = $ac_status" >&5
2662   (exit $ac_status); } &&
2663          { ac_try='test -s conftest.$ac_objext'
2664   { (eval echo "$as_me:2664: \"$ac_try\"") >&5
2665   (eval $ac_try) 2>&5
2666   ac_status=$?
2667   echo "$as_me:2667: \$? = $ac_status" >&5
2668   (exit $ac_status); }; }; then
2669   cf_cv_ansi_cc="$cf_arg"; break
2670 else
2671   echo "$as_me: failed program was:" >&5
2672 cat conftest.$ac_ext >&5
2673 fi
2674 rm -f conftest.$ac_objext conftest.$ac_ext
2675 done
2676 CFLAGS="$cf_save_CFLAGS"
2677 CPPFLAGS="$cf_save_CPPFLAGS"
2678
2679 fi
2680 echo "$as_me:2680: result: $cf_cv_ansi_cc" >&5
2681 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2682
2683 if test "$cf_cv_ansi_cc" != "no"; then
2684 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2685
2686 cf_fix_cppflags=no
2687 cf_new_cflags=
2688 cf_new_cppflags=
2689 cf_new_extra_cppflags=
2690
2691 for cf_add_cflags in $cf_cv_ansi_cc
2692 do
2693 case $cf_fix_cppflags in
2694 no)
2695         case $cf_add_cflags in #(vi
2696         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2697                 case $cf_add_cflags in
2698                 -D*)
2699                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2700
2701                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2702                                 && test -z "${cf_tst_cflags}" \
2703                                 && cf_fix_cppflags=yes
2704
2705                         if test $cf_fix_cppflags = yes ; then
2706                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2707                                 continue
2708                         elif test "${cf_tst_cflags}" = "\"'" ; then
2709                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2710                                 continue
2711                         fi
2712                         ;;
2713                 esac
2714                 case "$CPPFLAGS" in
2715                 *$cf_add_cflags) #(vi
2716                         ;;
2717                 *) #(vi
2718                         case $cf_add_cflags in #(vi
2719                         -D*)
2720                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2721
2722 CPPFLAGS=`echo "$CPPFLAGS" | \
2723         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2724                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2725
2726                                 ;;
2727                         esac
2728                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2729                         ;;
2730                 esac
2731                 ;;
2732         *)
2733                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2734                 ;;
2735         esac
2736         ;;
2737 yes)
2738         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2739
2740         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2741
2742         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2743                 && test -z "${cf_tst_cflags}" \
2744                 && cf_fix_cppflags=no
2745         ;;
2746 esac
2747 done
2748
2749 if test -n "$cf_new_cflags" ; then
2750
2751         CFLAGS="$CFLAGS $cf_new_cflags"
2752 fi
2753
2754 if test -n "$cf_new_cppflags" ; then
2755
2756         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2757 fi
2758
2759 if test -n "$cf_new_extra_cppflags" ; then
2760
2761         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2762 fi
2763
2764 else
2765         cat >>confdefs.h <<\EOF
2766 #define CC_HAS_PROTOS 1
2767 EOF
2768
2769 fi
2770 fi
2771
2772 if test "$cf_cv_ansi_cc" = "no"; then
2773         { { echo "$as_me:2773: error: Your compiler does not appear to recognize prototypes.
2774 You have the following choices:
2775         a. adjust your compiler options
2776         b. get an up-to-date compiler
2777         c. use a wrapper such as unproto" >&5
2778 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2779 You have the following choices:
2780         a. adjust your compiler options
2781         b. get an up-to-date compiler
2782         c. use a wrapper such as unproto" >&2;}
2783    { (exit 1); exit 1; }; }
2784 fi
2785
2786 case $cf_cv_system_name in
2787 os2*)
2788     CFLAGS="$CFLAGS -Zmt"
2789     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2790     CXXFLAGS="$CXXFLAGS -Zmt"
2791     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2792     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2793     ac_cv_exeext=.exe
2794     ;;
2795 esac
2796
2797 PROG_EXT="$EXEEXT"
2798
2799 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2800 #define PROG_EXT "$PROG_EXT"
2801 EOF
2802
2803 if test "$cross_compiling" = yes ; then
2804   LDCONFIG=:
2805 else
2806 case "$cf_cv_system_name" in #(vi
2807 dragonfly*|mirbsd*|freebsd*) #(vi
2808   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2809   ;;
2810 *) LDPATH=$PATH:/sbin:/usr/sbin
2811   # Extract the first word of "ldconfig", so it can be a program name with args.
2812 set dummy ldconfig; ac_word=$2
2813 echo "$as_me:2813: checking for $ac_word" >&5
2814 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2815 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2816   echo $ECHO_N "(cached) $ECHO_C" >&6
2817 else
2818   case $LDCONFIG in
2819   [\\/]* | ?:[\\/]*)
2820   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2821   ;;
2822   *)
2823   ac_save_IFS=$IFS; IFS=$ac_path_separator
2824 ac_dummy="$LDPATH"
2825 for ac_dir in $ac_dummy; do
2826   IFS=$ac_save_IFS
2827   test -z "$ac_dir" && ac_dir=.
2828   if $as_executable_p "$ac_dir/$ac_word"; then
2829    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2830    echo "$as_me:2830: found $ac_dir/$ac_word" >&5
2831    break
2832 fi
2833 done
2834
2835   ;;
2836 esac
2837 fi
2838 LDCONFIG=$ac_cv_path_LDCONFIG
2839
2840 if test -n "$LDCONFIG"; then
2841   echo "$as_me:2841: result: $LDCONFIG" >&5
2842 echo "${ECHO_T}$LDCONFIG" >&6
2843 else
2844   echo "$as_me:2844: result: no" >&5
2845 echo "${ECHO_T}no" >&6
2846 fi
2847
2848   ;;
2849 esac
2850 fi
2851
2852 echo "$as_me:2852: checking if you want to ensure bool is consistent with C++" >&5
2853 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2854
2855 # Check whether --with-cxx or --without-cxx was given.
2856 if test "${with_cxx+set}" = set; then
2857   withval="$with_cxx"
2858   cf_with_cxx=$withval
2859 else
2860   cf_with_cxx=yes
2861 fi;
2862 echo "$as_me:2862: result: $cf_with_cxx" >&5
2863 echo "${ECHO_T}$cf_with_cxx" >&6
2864 if test "X$cf_with_cxx" = Xno ; then
2865         CXX=""
2866         GXX=""
2867 else
2868         # with autoconf 2.13, we can change the error to a warning:
2869                 ac_ext=cc
2870 ac_cpp='$CXXCPP $CPPFLAGS'
2871 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2872 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2873 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2874 ac_main_return=return
2875 if test -n "$ac_tool_prefix"; then
2876   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2877   do
2878     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2879 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2880 echo "$as_me:2880: checking for $ac_word" >&5
2881 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2882 if test "${ac_cv_prog_CXX+set}" = set; then
2883   echo $ECHO_N "(cached) $ECHO_C" >&6
2884 else
2885   if test -n "$CXX"; then
2886   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2887 else
2888   ac_save_IFS=$IFS; IFS=$ac_path_separator
2889 ac_dummy="$PATH"
2890 for ac_dir in $ac_dummy; do
2891   IFS=$ac_save_IFS
2892   test -z "$ac_dir" && ac_dir=.
2893   $as_executable_p "$ac_dir/$ac_word" || continue
2894 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2895 echo "$as_me:2895: found $ac_dir/$ac_word" >&5
2896 break
2897 done
2898
2899 fi
2900 fi
2901 CXX=$ac_cv_prog_CXX
2902 if test -n "$CXX"; then
2903   echo "$as_me:2903: result: $CXX" >&5
2904 echo "${ECHO_T}$CXX" >&6
2905 else
2906   echo "$as_me:2906: result: no" >&5
2907 echo "${ECHO_T}no" >&6
2908 fi
2909
2910     test -n "$CXX" && break
2911   done
2912 fi
2913 if test -z "$CXX"; then
2914   ac_ct_CXX=$CXX
2915   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2916 do
2917   # Extract the first word of "$ac_prog", so it can be a program name with args.
2918 set dummy $ac_prog; ac_word=$2
2919 echo "$as_me:2919: checking for $ac_word" >&5
2920 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2921 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2922   echo $ECHO_N "(cached) $ECHO_C" >&6
2923 else
2924   if test -n "$ac_ct_CXX"; then
2925   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2926 else
2927   ac_save_IFS=$IFS; IFS=$ac_path_separator
2928 ac_dummy="$PATH"
2929 for ac_dir in $ac_dummy; do
2930   IFS=$ac_save_IFS
2931   test -z "$ac_dir" && ac_dir=.
2932   $as_executable_p "$ac_dir/$ac_word" || continue
2933 ac_cv_prog_ac_ct_CXX="$ac_prog"
2934 echo "$as_me:2934: found $ac_dir/$ac_word" >&5
2935 break
2936 done
2937
2938 fi
2939 fi
2940 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2941 if test -n "$ac_ct_CXX"; then
2942   echo "$as_me:2942: result: $ac_ct_CXX" >&5
2943 echo "${ECHO_T}$ac_ct_CXX" >&6
2944 else
2945   echo "$as_me:2945: result: no" >&5
2946 echo "${ECHO_T}no" >&6
2947 fi
2948
2949   test -n "$ac_ct_CXX" && break
2950 done
2951 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2952
2953   CXX=$ac_ct_CXX
2954 fi
2955
2956 # Provide some information about the compiler.
2957 echo "$as_me:2957:" \
2958      "checking for C++ compiler version" >&5
2959 ac_compiler=`set X $ac_compile; echo $2`
2960 { (eval echo "$as_me:2960: \"$ac_compiler --version </dev/null >&5\"") >&5
2961   (eval $ac_compiler --version </dev/null >&5) 2>&5
2962   ac_status=$?
2963   echo "$as_me:2963: \$? = $ac_status" >&5
2964   (exit $ac_status); }
2965 { (eval echo "$as_me:2965: \"$ac_compiler -v </dev/null >&5\"") >&5
2966   (eval $ac_compiler -v </dev/null >&5) 2>&5
2967   ac_status=$?
2968   echo "$as_me:2968: \$? = $ac_status" >&5
2969   (exit $ac_status); }
2970 { (eval echo "$as_me:2970: \"$ac_compiler -V </dev/null >&5\"") >&5
2971   (eval $ac_compiler -V </dev/null >&5) 2>&5
2972   ac_status=$?
2973   echo "$as_me:2973: \$? = $ac_status" >&5
2974   (exit $ac_status); }
2975
2976 echo "$as_me:2976: checking whether we are using the GNU C++ compiler" >&5
2977 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2978 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2979   echo $ECHO_N "(cached) $ECHO_C" >&6
2980 else
2981   cat >conftest.$ac_ext <<_ACEOF
2982 #line 2982 "configure"
2983 #include "confdefs.h"
2984
2985 int
2986 main ()
2987 {
2988 #ifndef __GNUC__
2989        choke me
2990 #endif
2991
2992   ;
2993   return 0;
2994 }
2995 _ACEOF
2996 rm -f conftest.$ac_objext
2997 if { (eval echo "$as_me:2997: \"$ac_compile\"") >&5
2998   (eval $ac_compile) 2>&5
2999   ac_status=$?
3000   echo "$as_me:3000: \$? = $ac_status" >&5
3001   (exit $ac_status); } &&
3002          { ac_try='test -s conftest.$ac_objext'
3003   { (eval echo "$as_me:3003: \"$ac_try\"") >&5
3004   (eval $ac_try) 2>&5
3005   ac_status=$?
3006   echo "$as_me:3006: \$? = $ac_status" >&5
3007   (exit $ac_status); }; }; then
3008   ac_compiler_gnu=yes
3009 else
3010   echo "$as_me: failed program was:" >&5
3011 cat conftest.$ac_ext >&5
3012 ac_compiler_gnu=no
3013 fi
3014 rm -f conftest.$ac_objext conftest.$ac_ext
3015 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3016
3017 fi
3018 echo "$as_me:3018: result: $ac_cv_cxx_compiler_gnu" >&5
3019 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3020 GXX=`test $ac_compiler_gnu = yes && echo yes`
3021 ac_test_CXXFLAGS=${CXXFLAGS+set}
3022 ac_save_CXXFLAGS=$CXXFLAGS
3023 CXXFLAGS="-g"
3024 echo "$as_me:3024: checking whether $CXX accepts -g" >&5
3025 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3026 if test "${ac_cv_prog_cxx_g+set}" = set; then
3027   echo $ECHO_N "(cached) $ECHO_C" >&6
3028 else
3029   cat >conftest.$ac_ext <<_ACEOF
3030 #line 3030 "configure"
3031 #include "confdefs.h"
3032
3033 int
3034 main ()
3035 {
3036
3037   ;
3038   return 0;
3039 }
3040 _ACEOF
3041 rm -f conftest.$ac_objext
3042 if { (eval echo "$as_me:3042: \"$ac_compile\"") >&5
3043   (eval $ac_compile) 2>&5
3044   ac_status=$?
3045   echo "$as_me:3045: \$? = $ac_status" >&5
3046   (exit $ac_status); } &&
3047          { ac_try='test -s conftest.$ac_objext'
3048   { (eval echo "$as_me:3048: \"$ac_try\"") >&5
3049   (eval $ac_try) 2>&5
3050   ac_status=$?
3051   echo "$as_me:3051: \$? = $ac_status" >&5
3052   (exit $ac_status); }; }; then
3053   ac_cv_prog_cxx_g=yes
3054 else
3055   echo "$as_me: failed program was:" >&5
3056 cat conftest.$ac_ext >&5
3057 ac_cv_prog_cxx_g=no
3058 fi
3059 rm -f conftest.$ac_objext conftest.$ac_ext
3060 fi
3061 echo "$as_me:3061: result: $ac_cv_prog_cxx_g" >&5
3062 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3063 if test "$ac_test_CXXFLAGS" = set; then
3064   CXXFLAGS=$ac_save_CXXFLAGS
3065 elif test $ac_cv_prog_cxx_g = yes; then
3066   if test "$GXX" = yes; then
3067     CXXFLAGS="-g -O2"
3068   else
3069     CXXFLAGS="-g"
3070   fi
3071 else
3072   if test "$GXX" = yes; then
3073     CXXFLAGS="-O2"
3074   else
3075     CXXFLAGS=
3076   fi
3077 fi
3078 for ac_declaration in \
3079    ''\
3080    '#include <stdlib.h>' \
3081    'extern "C" void std::exit (int) throw (); using std::exit;' \
3082    'extern "C" void std::exit (int); using std::exit;' \
3083    'extern "C" void exit (int) throw ();' \
3084    'extern "C" void exit (int);' \
3085    'void exit (int);'
3086 do
3087   cat >conftest.$ac_ext <<_ACEOF
3088 #line 3088 "configure"
3089 #include "confdefs.h"
3090 #include <stdlib.h>
3091 $ac_declaration
3092 int
3093 main ()
3094 {
3095 exit (42);
3096   ;
3097   return 0;
3098 }
3099 _ACEOF
3100 rm -f conftest.$ac_objext
3101 if { (eval echo "$as_me:3101: \"$ac_compile\"") >&5
3102   (eval $ac_compile) 2>&5
3103   ac_status=$?
3104   echo "$as_me:3104: \$? = $ac_status" >&5
3105   (exit $ac_status); } &&
3106          { ac_try='test -s conftest.$ac_objext'
3107   { (eval echo "$as_me:3107: \"$ac_try\"") >&5
3108   (eval $ac_try) 2>&5
3109   ac_status=$?
3110   echo "$as_me:3110: \$? = $ac_status" >&5
3111   (exit $ac_status); }; }; then
3112   :
3113 else
3114   echo "$as_me: failed program was:" >&5
3115 cat conftest.$ac_ext >&5
3116 continue
3117 fi
3118 rm -f conftest.$ac_objext conftest.$ac_ext
3119   cat >conftest.$ac_ext <<_ACEOF
3120 #line 3120 "configure"
3121 #include "confdefs.h"
3122 $ac_declaration
3123 int
3124 main ()
3125 {
3126 exit (42);
3127   ;
3128   return 0;
3129 }
3130 _ACEOF
3131 rm -f conftest.$ac_objext
3132 if { (eval echo "$as_me:3132: \"$ac_compile\"") >&5
3133   (eval $ac_compile) 2>&5
3134   ac_status=$?
3135   echo "$as_me:3135: \$? = $ac_status" >&5
3136   (exit $ac_status); } &&
3137          { ac_try='test -s conftest.$ac_objext'
3138   { (eval echo "$as_me:3138: \"$ac_try\"") >&5
3139   (eval $ac_try) 2>&5
3140   ac_status=$?
3141   echo "$as_me:3141: \$? = $ac_status" >&5
3142   (exit $ac_status); }; }; then
3143   break
3144 else
3145   echo "$as_me: failed program was:" >&5
3146 cat conftest.$ac_ext >&5
3147 fi
3148 rm -f conftest.$ac_objext conftest.$ac_ext
3149 done
3150 rm -rf conftest*
3151 if test -n "$ac_declaration"; then
3152   echo '#ifdef __cplusplus' >>confdefs.h
3153   echo $ac_declaration      >>confdefs.h
3154   echo '#endif'             >>confdefs.h
3155 fi
3156
3157 ac_ext=c
3158 ac_cpp='$CPP $CPPFLAGS'
3159 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3160 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3161 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3162 ac_main_return=return
3163
3164                 # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3165         if test "$CXX" = "g++" ; then
3166                 # Extract the first word of "g++", so it can be a program name with args.
3167 set dummy g++; ac_word=$2
3168 echo "$as_me:3168: checking for $ac_word" >&5
3169 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3170 if test "${ac_cv_path_CXX+set}" = set; then
3171   echo $ECHO_N "(cached) $ECHO_C" >&6
3172 else
3173   case $CXX in
3174   [\\/]* | ?:[\\/]*)
3175   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3176   ;;
3177   *)
3178   ac_save_IFS=$IFS; IFS=$ac_path_separator
3179 ac_dummy="$PATH"
3180 for ac_dir in $ac_dummy; do
3181   IFS=$ac_save_IFS
3182   test -z "$ac_dir" && ac_dir=.
3183   if $as_executable_p "$ac_dir/$ac_word"; then
3184    ac_cv_path_CXX="$ac_dir/$ac_word"
3185    echo "$as_me:3185: found $ac_dir/$ac_word" >&5
3186    break
3187 fi
3188 done
3189
3190   ;;
3191 esac
3192 fi
3193 CXX=$ac_cv_path_CXX
3194
3195 if test -n "$CXX"; then
3196   echo "$as_me:3196: result: $CXX" >&5
3197 echo "${ECHO_T}$CXX" >&6
3198 else
3199   echo "$as_me:3199: result: no" >&5
3200 echo "${ECHO_T}no" >&6
3201 fi
3202
3203         fi
3204         case "x$CXX" in #(vi
3205         x|xg++)
3206                 { echo "$as_me:3206: WARNING: You don't have any C++ compiler, too bad" >&5
3207 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3208                 cf_with_cxx=no; CXX=""; GXX="";
3209                 ;;
3210         esac
3211 fi
3212
3213 GXX_VERSION=none
3214 if test "$GXX" = yes; then
3215         echo "$as_me:3215: checking version of g++" >&5
3216 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3217         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3218         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3219         echo "$as_me:3219: result: $GXX_VERSION" >&5
3220 echo "${ECHO_T}$GXX_VERSION" >&6
3221 fi
3222
3223 case $GXX_VERSION in
3224 1*|2.[0-6]*)
3225         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3226         # cf_cxx_library=no
3227         { echo "$as_me:3227: WARNING: templates do not work" >&5
3228 echo "$as_me: WARNING: templates do not work" >&2;}
3229         ;;
3230 esac
3231
3232 echo "$as_me:3232: checking if you want to build C++ binding and demo" >&5
3233 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3234
3235 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3236 if test "${with_cxx_binding+set}" = set; then
3237   withval="$with_cxx_binding"
3238   cf_with_cxx_binding=$withval
3239 else
3240   cf_with_cxx_binding=$cf_with_cxx
3241 fi;
3242 echo "$as_me:3242: result: $cf_with_cxx_binding" >&5
3243 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3244
3245 echo "$as_me:3245: checking if you want to build with Ada95" >&5
3246 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3247
3248 # Check whether --with-ada or --without-ada was given.
3249 if test "${with_ada+set}" = set; then
3250   withval="$with_ada"
3251   cf_with_ada=$withval
3252 else
3253   cf_with_ada=yes
3254 fi;
3255 echo "$as_me:3255: result: $cf_with_ada" >&5
3256 echo "${ECHO_T}$cf_with_ada" >&6
3257
3258 echo "$as_me:3258: checking if you want to install manpages" >&5
3259 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3260
3261 # Check whether --with-manpages or --without-manpages was given.
3262 if test "${with_manpages+set}" = set; then
3263   withval="$with_manpages"
3264   cf_with_manpages=$withval
3265 else
3266   cf_with_manpages=yes
3267 fi;
3268 echo "$as_me:3268: result: $cf_with_manpages" >&5
3269 echo "${ECHO_T}$cf_with_manpages" >&6
3270
3271 echo "$as_me:3271: checking if you want to build programs such as tic" >&5
3272 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3273
3274 # Check whether --with-progs or --without-progs was given.
3275 if test "${with_progs+set}" = set; then
3276   withval="$with_progs"
3277   cf_with_progs=$withval
3278 else
3279   cf_with_progs=yes
3280 fi;
3281 echo "$as_me:3281: result: $cf_with_progs" >&5
3282 echo "${ECHO_T}$cf_with_progs" >&6
3283
3284 echo "$as_me:3284: checking if you want to build test-programs" >&5
3285 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3286
3287 # Check whether --with-tests or --without-tests was given.
3288 if test "${with_tests+set}" = set; then
3289   withval="$with_tests"
3290   cf_with_tests=$withval
3291 else
3292   cf_with_tests=yes
3293 fi;
3294 echo "$as_me:3294: result: $cf_with_tests" >&5
3295 echo "${ECHO_T}$cf_with_tests" >&6
3296
3297 echo "$as_me:3297: checking if you wish to install curses.h" >&5
3298 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3299
3300 # Check whether --with-curses-h or --without-curses-h was given.
3301 if test "${with_curses_h+set}" = set; then
3302   withval="$with_curses_h"
3303   with_curses_h=$withval
3304 else
3305   with_curses_h=yes
3306 fi;
3307 echo "$as_me:3307: result: $with_curses_h" >&5
3308 echo "${ECHO_T}$with_curses_h" >&6
3309
3310 modules_to_build="ncurses"
3311 if test "X$cf_with_progs" != Xno ; then
3312 modules_to_build="$modules_to_build progs tack"
3313 fi
3314 modules_to_build="$modules_to_build panel menu form"
3315
3316 test "$program_prefix" != NONE &&
3317   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3318 # Use a double $ so make ignores it.
3319 test "$program_suffix" != NONE &&
3320   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3321 # Double any \ or $.  echo might interpret backslashes.
3322 # By default was `s,x,x', remove it if useless.
3323 cat <<\_ACEOF >conftest.sed
3324 s/[\\$]/&&/g;s/;s,x,x,$//
3325 _ACEOF
3326 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3327 rm conftest.sed
3328
3329 for ac_prog in mawk gawk nawk awk
3330 do
3331   # Extract the first word of "$ac_prog", so it can be a program name with args.
3332 set dummy $ac_prog; ac_word=$2
3333 echo "$as_me:3333: checking for $ac_word" >&5
3334 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3335 if test "${ac_cv_prog_AWK+set}" = set; then
3336   echo $ECHO_N "(cached) $ECHO_C" >&6
3337 else
3338   if test -n "$AWK"; then
3339   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3340 else
3341   ac_save_IFS=$IFS; IFS=$ac_path_separator
3342 ac_dummy="$PATH"
3343 for ac_dir in $ac_dummy; do
3344   IFS=$ac_save_IFS
3345   test -z "$ac_dir" && ac_dir=.
3346   $as_executable_p "$ac_dir/$ac_word" || continue
3347 ac_cv_prog_AWK="$ac_prog"
3348 echo "$as_me:3348: found $ac_dir/$ac_word" >&5
3349 break
3350 done
3351
3352 fi
3353 fi
3354 AWK=$ac_cv_prog_AWK
3355 if test -n "$AWK"; then
3356   echo "$as_me:3356: result: $AWK" >&5
3357 echo "${ECHO_T}$AWK" >&6
3358 else
3359   echo "$as_me:3359: result: no" >&5
3360 echo "${ECHO_T}no" >&6
3361 fi
3362
3363   test -n "$AWK" && break
3364 done
3365
3366 test -z "$AWK" && { { echo "$as_me:3366: error: No awk program found" >&5
3367 echo "$as_me: error: No awk program found" >&2;}
3368    { (exit 1); exit 1; }; }
3369
3370 echo "$as_me:3370: checking for egrep" >&5
3371 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3372 if test "${ac_cv_prog_egrep+set}" = set; then
3373   echo $ECHO_N "(cached) $ECHO_C" >&6
3374 else
3375   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3376     then ac_cv_prog_egrep='grep -E'
3377     else ac_cv_prog_egrep='egrep'
3378     fi
3379 fi
3380 echo "$as_me:3380: result: $ac_cv_prog_egrep" >&5
3381 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3382  EGREP=$ac_cv_prog_egrep
3383
3384 test -z "$EGREP" && { { echo "$as_me:3384: error: No egrep program found" >&5
3385 echo "$as_me: error: No egrep program found" >&2;}
3386    { (exit 1); exit 1; }; }
3387
3388 # Find a good install program.  We prefer a C program (faster),
3389 # so one script is as good as another.  But avoid the broken or
3390 # incompatible versions:
3391 # SysV /etc/install, /usr/sbin/install
3392 # SunOS /usr/etc/install
3393 # IRIX /sbin/install
3394 # AIX /bin/install
3395 # AmigaOS /C/install, which installs bootblocks on floppy discs
3396 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3397 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3398 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3399 # ./install, which can be erroneously created by make from ./install.sh.
3400 echo "$as_me:3400: checking for a BSD compatible install" >&5
3401 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3402 if test -z "$INSTALL"; then
3403 if test "${ac_cv_path_install+set}" = set; then
3404   echo $ECHO_N "(cached) $ECHO_C" >&6
3405 else
3406     ac_save_IFS=$IFS; IFS=$ac_path_separator
3407   for ac_dir in $PATH; do
3408     IFS=$ac_save_IFS
3409     # Account for people who put trailing slashes in PATH elements.
3410     case $ac_dir/ in
3411     / | ./ | .// | /cC/* \
3412     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3413     | /usr/ucb/* ) ;;
3414     *)
3415       # OSF1 and SCO ODT 3.0 have their own names for install.
3416       # Don't use installbsd from OSF since it installs stuff as root
3417       # by default.
3418       for ac_prog in ginstall scoinst install; do
3419         if $as_executable_p "$ac_dir/$ac_prog"; then
3420           if test $ac_prog = install &&
3421             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3422             # AIX install.  It has an incompatible calling convention.
3423             :
3424           elif test $ac_prog = install &&
3425             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3426             # program-specific install script used by HP pwplus--don't use.
3427             :
3428           else
3429             ac_cv_path_install="$ac_dir/$ac_prog -c"
3430             break 2
3431           fi
3432         fi
3433       done
3434       ;;
3435     esac
3436   done
3437
3438 fi
3439   if test "${ac_cv_path_install+set}" = set; then
3440     INSTALL=$ac_cv_path_install
3441   else
3442     # As a last resort, use the slow shell script.  We don't cache a
3443     # path for INSTALL within a source directory, because that will
3444     # break other packages using the cache if that directory is
3445     # removed, or if the path is relative.
3446     INSTALL=$ac_install_sh
3447   fi
3448 fi
3449 echo "$as_me:3449: result: $INSTALL" >&5
3450 echo "${ECHO_T}$INSTALL" >&6
3451
3452 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3453 # It thinks the first close brace ends the variable substitution.
3454 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3455
3456 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3457
3458 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3459
3460 case $INSTALL in
3461 /*)
3462   ;;
3463 *)
3464   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3465   test -z "$cf_dir" && cf_dir=.
3466   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3467   ;;
3468 esac
3469
3470 for ac_prog in tdlint lint alint splint lclint
3471 do
3472   # Extract the first word of "$ac_prog", so it can be a program name with args.
3473 set dummy $ac_prog; ac_word=$2
3474 echo "$as_me:3474: checking for $ac_word" >&5
3475 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3476 if test "${ac_cv_prog_LINT+set}" = set; then
3477   echo $ECHO_N "(cached) $ECHO_C" >&6
3478 else
3479   if test -n "$LINT"; then
3480   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3481 else
3482   ac_save_IFS=$IFS; IFS=$ac_path_separator
3483 ac_dummy="$PATH"
3484 for ac_dir in $ac_dummy; do
3485   IFS=$ac_save_IFS
3486   test -z "$ac_dir" && ac_dir=.
3487   $as_executable_p "$ac_dir/$ac_word" || continue
3488 ac_cv_prog_LINT="$ac_prog"
3489 echo "$as_me:3489: found $ac_dir/$ac_word" >&5
3490 break
3491 done
3492
3493 fi
3494 fi
3495 LINT=$ac_cv_prog_LINT
3496 if test -n "$LINT"; then
3497   echo "$as_me:3497: result: $LINT" >&5
3498 echo "${ECHO_T}$LINT" >&6
3499 else
3500   echo "$as_me:3500: result: no" >&5
3501 echo "${ECHO_T}no" >&6
3502 fi
3503
3504   test -n "$LINT" && break
3505 done
3506
3507 echo "$as_me:3507: checking whether ln -s works" >&5
3508 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3509 LN_S=$as_ln_s
3510 if test "$LN_S" = "ln -s"; then
3511   echo "$as_me:3511: result: yes" >&5
3512 echo "${ECHO_T}yes" >&6
3513 else
3514   echo "$as_me:3514: result: no, using $LN_S" >&5
3515 echo "${ECHO_T}no, using $LN_S" >&6
3516 fi
3517
3518 echo "$as_me:3518: checking if $LN_S -f options work" >&5
3519 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3520
3521 rm -f conf$$.src conf$$dst
3522 echo >conf$$.dst
3523 echo first >conf$$.src
3524 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3525         cf_prog_ln_sf=yes
3526 else
3527         cf_prog_ln_sf=no
3528 fi
3529 rm -f conf$$.dst conf$$src
3530 echo "$as_me:3530: result: $cf_prog_ln_sf" >&5
3531 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3532
3533 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3534
3535 echo "$as_me:3535: checking for long file names" >&5
3536 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3537 if test "${ac_cv_sys_long_file_names+set}" = set; then
3538   echo $ECHO_N "(cached) $ECHO_C" >&6
3539 else
3540   ac_cv_sys_long_file_names=yes
3541 # Test for long file names in all the places we know might matter:
3542 #      .                the current directory, where building will happen
3543 #      $prefix/lib      where we will be installing things
3544 #      $exec_prefix/lib likewise
3545 # eval it to expand exec_prefix.
3546 #      $TMPDIR          if set, where it might want to write temporary files
3547 # if $TMPDIR is not set:
3548 #      /tmp             where it might want to write temporary files
3549 #      /var/tmp         likewise
3550 #      /usr/tmp         likewise
3551 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3552   ac_tmpdirs=$TMPDIR
3553 else
3554   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3555 fi
3556 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3557   test -d $ac_dir || continue
3558   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3559   ac_xdir=$ac_dir/cf$$
3560   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3561   ac_tf1=$ac_xdir/conftest9012345
3562   ac_tf2=$ac_xdir/conftest9012346
3563   (echo 1 >$ac_tf1) 2>/dev/null
3564   (echo 2 >$ac_tf2) 2>/dev/null
3565   ac_val=`cat $ac_tf1 2>/dev/null`
3566   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3567     ac_cv_sys_long_file_names=no
3568     rm -rf $ac_xdir 2>/dev/null
3569     break
3570   fi
3571   rm -rf $ac_xdir 2>/dev/null
3572 done
3573 fi
3574 echo "$as_me:3574: result: $ac_cv_sys_long_file_names" >&5
3575 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3576 if test $ac_cv_sys_long_file_names = yes; then
3577
3578 cat >>confdefs.h <<\EOF
3579 #define HAVE_LONG_FILE_NAMES 1
3580 EOF
3581
3582 fi
3583
3584 # if we find pkg-config, check if we should install the ".pc" files.
3585
3586 echo "$as_me:3586: checking if you want to use pkg-config" >&5
3587 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3588
3589 # Check whether --with-pkg-config or --without-pkg-config was given.
3590 if test "${with_pkg_config+set}" = set; then
3591   withval="$with_pkg_config"
3592   cf_pkg_config=$withval
3593 else
3594   cf_pkg_config=yes
3595 fi;
3596 echo "$as_me:3596: result: $cf_pkg_config" >&5
3597 echo "${ECHO_T}$cf_pkg_config" >&6
3598
3599 case $cf_pkg_config in #(vi
3600 no) #(vi
3601         PKG_CONFIG=none
3602         ;;
3603 yes) #(vi
3604
3605 if test -n "$ac_tool_prefix"; then
3606   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3607 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3608 echo "$as_me:3608: checking for $ac_word" >&5
3609 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3610 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3611   echo $ECHO_N "(cached) $ECHO_C" >&6
3612 else
3613   case $PKG_CONFIG in
3614   [\\/]* | ?:[\\/]*)
3615   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3616   ;;
3617   *)
3618   ac_save_IFS=$IFS; IFS=$ac_path_separator
3619 ac_dummy="$PATH"
3620 for ac_dir in $ac_dummy; do
3621   IFS=$ac_save_IFS
3622   test -z "$ac_dir" && ac_dir=.
3623   if $as_executable_p "$ac_dir/$ac_word"; then
3624    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3625    echo "$as_me:3625: found $ac_dir/$ac_word" >&5
3626    break
3627 fi
3628 done
3629
3630   ;;
3631 esac
3632 fi
3633 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3634
3635 if test -n "$PKG_CONFIG"; then
3636   echo "$as_me:3636: result: $PKG_CONFIG" >&5
3637 echo "${ECHO_T}$PKG_CONFIG" >&6
3638 else
3639   echo "$as_me:3639: result: no" >&5
3640 echo "${ECHO_T}no" >&6
3641 fi
3642
3643 fi
3644 if test -z "$ac_cv_path_PKG_CONFIG"; then
3645   ac_pt_PKG_CONFIG=$PKG_CONFIG
3646   # Extract the first word of "pkg-config", so it can be a program name with args.
3647 set dummy pkg-config; ac_word=$2
3648 echo "$as_me:3648: checking for $ac_word" >&5
3649 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3650 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3651   echo $ECHO_N "(cached) $ECHO_C" >&6
3652 else
3653   case $ac_pt_PKG_CONFIG in
3654   [\\/]* | ?:[\\/]*)
3655   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3656   ;;
3657   *)
3658   ac_save_IFS=$IFS; IFS=$ac_path_separator
3659 ac_dummy="$PATH"
3660 for ac_dir in $ac_dummy; do
3661   IFS=$ac_save_IFS
3662   test -z "$ac_dir" && ac_dir=.
3663   if $as_executable_p "$ac_dir/$ac_word"; then
3664    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3665    echo "$as_me:3665: found $ac_dir/$ac_word" >&5
3666    break
3667 fi
3668 done
3669
3670   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3671   ;;
3672 esac
3673 fi
3674 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3675
3676 if test -n "$ac_pt_PKG_CONFIG"; then
3677   echo "$as_me:3677: result: $ac_pt_PKG_CONFIG" >&5
3678 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3679 else
3680   echo "$as_me:3680: result: no" >&5
3681 echo "${ECHO_T}no" >&6
3682 fi
3683
3684   PKG_CONFIG=$ac_pt_PKG_CONFIG
3685 else
3686   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3687 fi
3688
3689         ;;
3690 *)
3691         PKG_CONFIG=$withval
3692         ;;
3693 esac
3694
3695 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3696 if test "$PKG_CONFIG" != none ; then
3697
3698 if test "x$prefix" != xNONE; then
3699   cf_path_syntax="$prefix"
3700 else
3701   cf_path_syntax="$ac_default_prefix"
3702 fi
3703
3704 case ".$PKG_CONFIG" in #(vi
3705 .\$\(*\)*|.\'*\'*) #(vi
3706   ;;
3707 ..|./*|.\\*) #(vi
3708   ;;
3709 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3710   ;;
3711 .\${*prefix}*) #(vi
3712   eval PKG_CONFIG="$PKG_CONFIG"
3713   case ".$PKG_CONFIG" in #(vi
3714   .NONE/*)
3715     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3716     ;;
3717   esac
3718   ;; #(vi
3719 .no|.NONE/*)
3720   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3721   ;;
3722 *)
3723   { { echo "$as_me:3723: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3724 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3725    { (exit 1); exit 1; }; }
3726   ;;
3727 esac
3728
3729 fi
3730
3731 if test "$PKG_CONFIG" != none ; then
3732         echo "$as_me:3732: checking for $PKG_CONFIG library directory" >&5
3733 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3734
3735 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3736 if test "${with_pkg_config_libdir+set}" = set; then
3737   withval="$with_pkg_config_libdir"
3738   PKG_CONFIG_LIBDIR=$withval
3739 else
3740   PKG_CONFIG_LIBDIR=yes
3741 fi;
3742
3743         case x$PKG_CONFIG_LIBDIR in #(vi
3744         x/*) #(vi
3745                 ;;
3746         xyes) #(vi
3747                 # look for the library directory using the same prefix as the executable
3748                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3749                 case x`(arch) 2>/dev/null` in #(vi
3750                 *64) #(vi
3751                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3752                         do
3753                                 if test -d $cf_config/pkgconfig
3754                                 then
3755                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3756                                         break
3757                                 fi
3758                         done
3759                         ;;
3760                 *)
3761                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3762                         ;;
3763                 esac
3764                 ;;
3765         *)
3766                 ;;
3767         esac
3768
3769         echo "$as_me:3769: result: $PKG_CONFIG_LIBDIR" >&5
3770 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3771 fi
3772
3773 if test "$PKG_CONFIG" != none ; then
3774         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3775                 echo "$as_me:3775: checking if we should install .pc files for $PKG_CONFIG" >&5
3776 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3777
3778 # Check whether --enable-pc-files or --disable-pc-files was given.
3779 if test "${enable_pc_files+set}" = set; then
3780   enableval="$enable_pc_files"
3781   enable_pc_files=$enableval
3782 else
3783   enable_pc_files=no
3784 fi;
3785                 echo "$as_me:3785: result: $enable_pc_files" >&5
3786 echo "${ECHO_T}$enable_pc_files" >&6
3787         elif test -z "$PKG_CONFIG_LIBDIR" || test "$PKG_CONFIG_LIBDIR" != no; then
3788                 enable_pc_files=no
3789                 { echo "$as_me:3789: WARNING: did not find $PKG_CONFIG library" >&5
3790 echo "$as_me: WARNING: did not find $PKG_CONFIG library" >&2;}
3791         fi
3792 else
3793         enable_pc_files=no
3794 fi
3795
3796 echo "$as_me:3796: checking if we should assume mixed-case filenames" >&5
3797 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3798
3799 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3800 if test "${enable_mixed_case+set}" = set; then
3801   enableval="$enable_mixed_case"
3802   enable_mixedcase=$enableval
3803 else
3804   enable_mixedcase=auto
3805 fi;
3806 echo "$as_me:3806: result: $enable_mixedcase" >&5
3807 echo "${ECHO_T}$enable_mixedcase" >&6
3808 if test "$enable_mixedcase" = "auto" ; then
3809
3810 echo "$as_me:3810: checking if filesystem supports mixed-case filenames" >&5
3811 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3812 if test "${cf_cv_mixedcase+set}" = set; then
3813   echo $ECHO_N "(cached) $ECHO_C" >&6
3814 else
3815
3816 if test "$cross_compiling" = yes ; then
3817         case $target_alias in #(vi
3818         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3819                 cf_cv_mixedcase=no
3820                 ;;
3821         *)
3822                 cf_cv_mixedcase=yes
3823                 ;;
3824         esac
3825 else
3826         rm -f conftest CONFTEST
3827         echo test >conftest
3828         if test -f CONFTEST ; then
3829                 cf_cv_mixedcase=no
3830         else
3831                 cf_cv_mixedcase=yes
3832         fi
3833         rm -f conftest CONFTEST
3834 fi
3835
3836 fi
3837 echo "$as_me:3837: result: $cf_cv_mixedcase" >&5
3838 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3839 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3840 #define MIXEDCASE_FILENAMES 1
3841 EOF
3842
3843 else
3844     cf_cv_mixedcase=$enable_mixedcase
3845     if test "$enable_mixedcase" = "yes" ; then
3846         cat >>confdefs.h <<\EOF
3847 #define MIXEDCASE_FILENAMES 1
3848 EOF
3849
3850     fi
3851 fi
3852
3853 # do this after mixed-case option (tags/TAGS is not as important as tic).
3854 echo "$as_me:3854: checking whether ${MAKE-make} sets \${MAKE}" >&5
3855 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3856 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3857 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3858   echo $ECHO_N "(cached) $ECHO_C" >&6
3859 else
3860   cat >conftest.make <<\EOF
3861 all:
3862         @echo 'ac_maketemp="${MAKE}"'
3863 EOF
3864 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3865 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3866 if test -n "$ac_maketemp"; then
3867   eval ac_cv_prog_make_${ac_make}_set=yes
3868 else
3869   eval ac_cv_prog_make_${ac_make}_set=no
3870 fi
3871 rm -f conftest.make
3872 fi
3873 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3874   echo "$as_me:3874: result: yes" >&5
3875 echo "${ECHO_T}yes" >&6
3876   SET_MAKE=
3877 else
3878   echo "$as_me:3878: result: no" >&5
3879 echo "${ECHO_T}no" >&6
3880   SET_MAKE="MAKE=${MAKE-make}"
3881 fi
3882
3883 for ac_prog in exctags ctags
3884 do
3885   # Extract the first word of "$ac_prog", so it can be a program name with args.
3886 set dummy $ac_prog; ac_word=$2
3887 echo "$as_me:3887: checking for $ac_word" >&5
3888 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3889 if test "${ac_cv_prog_CTAGS+set}" = set; then
3890   echo $ECHO_N "(cached) $ECHO_C" >&6
3891 else
3892   if test -n "$CTAGS"; then
3893   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3894 else
3895   ac_save_IFS=$IFS; IFS=$ac_path_separator
3896 ac_dummy="$PATH"
3897 for ac_dir in $ac_dummy; do
3898   IFS=$ac_save_IFS
3899   test -z "$ac_dir" && ac_dir=.
3900   $as_executable_p "$ac_dir/$ac_word" || continue
3901 ac_cv_prog_CTAGS="$ac_prog"
3902 echo "$as_me:3902: found $ac_dir/$ac_word" >&5
3903 break
3904 done
3905
3906 fi
3907 fi
3908 CTAGS=$ac_cv_prog_CTAGS
3909 if test -n "$CTAGS"; then
3910   echo "$as_me:3910: result: $CTAGS" >&5
3911 echo "${ECHO_T}$CTAGS" >&6
3912 else
3913   echo "$as_me:3913: result: no" >&5
3914 echo "${ECHO_T}no" >&6
3915 fi
3916
3917   test -n "$CTAGS" && break
3918 done
3919
3920 for ac_prog in exetags etags
3921 do
3922   # Extract the first word of "$ac_prog", so it can be a program name with args.
3923 set dummy $ac_prog; ac_word=$2
3924 echo "$as_me:3924: checking for $ac_word" >&5
3925 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3926 if test "${ac_cv_prog_ETAGS+set}" = set; then
3927   echo $ECHO_N "(cached) $ECHO_C" >&6
3928 else
3929   if test -n "$ETAGS"; then
3930   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3931 else
3932   ac_save_IFS=$IFS; IFS=$ac_path_separator
3933 ac_dummy="$PATH"
3934 for ac_dir in $ac_dummy; do
3935   IFS=$ac_save_IFS
3936   test -z "$ac_dir" && ac_dir=.
3937   $as_executable_p "$ac_dir/$ac_word" || continue
3938 ac_cv_prog_ETAGS="$ac_prog"
3939 echo "$as_me:3939: found $ac_dir/$ac_word" >&5
3940 break
3941 done
3942
3943 fi
3944 fi
3945 ETAGS=$ac_cv_prog_ETAGS
3946 if test -n "$ETAGS"; then
3947   echo "$as_me:3947: result: $ETAGS" >&5
3948 echo "${ECHO_T}$ETAGS" >&6
3949 else
3950   echo "$as_me:3950: result: no" >&5
3951 echo "${ECHO_T}no" >&6
3952 fi
3953
3954   test -n "$ETAGS" && break
3955 done
3956
3957 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3958 set dummy ${CTAGS:-ctags}; ac_word=$2
3959 echo "$as_me:3959: checking for $ac_word" >&5
3960 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3961 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3962   echo $ECHO_N "(cached) $ECHO_C" >&6
3963 else
3964   if test -n "$MAKE_LOWER_TAGS"; then
3965   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3966 else
3967   ac_save_IFS=$IFS; IFS=$ac_path_separator
3968 ac_dummy="$PATH"
3969 for ac_dir in $ac_dummy; do
3970   IFS=$ac_save_IFS
3971   test -z "$ac_dir" && ac_dir=.
3972   $as_executable_p "$ac_dir/$ac_word" || continue
3973 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3974 echo "$as_me:3974: found $ac_dir/$ac_word" >&5
3975 break
3976 done
3977
3978   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3979 fi
3980 fi
3981 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3982 if test -n "$MAKE_LOWER_TAGS"; then
3983   echo "$as_me:3983: result: $MAKE_LOWER_TAGS" >&5
3984 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3985 else
3986   echo "$as_me:3986: result: no" >&5
3987 echo "${ECHO_T}no" >&6
3988 fi
3989
3990 if test "$cf_cv_mixedcase" = yes ; then
3991         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3992 set dummy ${ETAGS:-etags}; ac_word=$2
3993 echo "$as_me:3993: checking for $ac_word" >&5
3994 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3995 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3996   echo $ECHO_N "(cached) $ECHO_C" >&6
3997 else
3998   if test -n "$MAKE_UPPER_TAGS"; then
3999   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4000 else
4001   ac_save_IFS=$IFS; IFS=$ac_path_separator
4002 ac_dummy="$PATH"
4003 for ac_dir in $ac_dummy; do
4004   IFS=$ac_save_IFS
4005   test -z "$ac_dir" && ac_dir=.
4006   $as_executable_p "$ac_dir/$ac_word" || continue
4007 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4008 echo "$as_me:4008: found $ac_dir/$ac_word" >&5
4009 break
4010 done
4011
4012   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4013 fi
4014 fi
4015 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4016 if test -n "$MAKE_UPPER_TAGS"; then
4017   echo "$as_me:4017: result: $MAKE_UPPER_TAGS" >&5
4018 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4019 else
4020   echo "$as_me:4020: result: no" >&5
4021 echo "${ECHO_T}no" >&6
4022 fi
4023
4024 else
4025         MAKE_UPPER_TAGS=no
4026 fi
4027
4028 if test "$MAKE_UPPER_TAGS" = yes ; then
4029         MAKE_UPPER_TAGS=
4030 else
4031         MAKE_UPPER_TAGS="#"
4032 fi
4033
4034 if test "$MAKE_LOWER_TAGS" = yes ; then
4035         MAKE_LOWER_TAGS=
4036 else
4037         MAKE_LOWER_TAGS="#"
4038 fi
4039
4040 echo "$as_me:4040: checking for makeflags variable" >&5
4041 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4042 if test "${cf_cv_makeflags+set}" = set; then
4043   echo $ECHO_N "(cached) $ECHO_C" >&6
4044 else
4045
4046         cf_cv_makeflags=''
4047         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4048         do
4049                 cat >cf_makeflags.tmp <<CF_EOF
4050 SHELL = /bin/sh
4051 all :
4052         @ echo '.$cf_option'
4053 CF_EOF
4054                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4055                 case "$cf_result" in
4056                 .*k)
4057                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4058                         case "$cf_result" in
4059                         .*CC=*) cf_cv_makeflags=
4060                                 ;;
4061                         *)      cf_cv_makeflags=$cf_option
4062                                 ;;
4063                         esac
4064                         break
4065                         ;;
4066                 .-)     ;;
4067                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
4068                         ;;
4069                 esac
4070         done
4071         rm -f cf_makeflags.tmp
4072
4073 fi
4074 echo "$as_me:4074: result: $cf_cv_makeflags" >&5
4075 echo "${ECHO_T}$cf_cv_makeflags" >&6
4076
4077 if test -n "$ac_tool_prefix"; then
4078   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4079 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4080 echo "$as_me:4080: checking for $ac_word" >&5
4081 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4082 if test "${ac_cv_prog_RANLIB+set}" = set; then
4083   echo $ECHO_N "(cached) $ECHO_C" >&6
4084 else
4085   if test -n "$RANLIB"; then
4086   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4087 else
4088   ac_save_IFS=$IFS; IFS=$ac_path_separator
4089 ac_dummy="$PATH"
4090 for ac_dir in $ac_dummy; do
4091   IFS=$ac_save_IFS
4092   test -z "$ac_dir" && ac_dir=.
4093   $as_executable_p "$ac_dir/$ac_word" || continue
4094 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4095 echo "$as_me:4095: found $ac_dir/$ac_word" >&5
4096 break
4097 done
4098
4099 fi
4100 fi
4101 RANLIB=$ac_cv_prog_RANLIB
4102 if test -n "$RANLIB"; then
4103   echo "$as_me:4103: result: $RANLIB" >&5
4104 echo "${ECHO_T}$RANLIB" >&6
4105 else
4106   echo "$as_me:4106: result: no" >&5
4107 echo "${ECHO_T}no" >&6
4108 fi
4109
4110 fi
4111 if test -z "$ac_cv_prog_RANLIB"; then
4112   ac_ct_RANLIB=$RANLIB
4113   # Extract the first word of "ranlib", so it can be a program name with args.
4114 set dummy ranlib; ac_word=$2
4115 echo "$as_me:4115: checking for $ac_word" >&5
4116 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4117 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4118   echo $ECHO_N "(cached) $ECHO_C" >&6
4119 else
4120   if test -n "$ac_ct_RANLIB"; then
4121   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4122 else
4123   ac_save_IFS=$IFS; IFS=$ac_path_separator
4124 ac_dummy="$PATH"
4125 for ac_dir in $ac_dummy; do
4126   IFS=$ac_save_IFS
4127   test -z "$ac_dir" && ac_dir=.
4128   $as_executable_p "$ac_dir/$ac_word" || continue
4129 ac_cv_prog_ac_ct_RANLIB="ranlib"
4130 echo "$as_me:4130: found $ac_dir/$ac_word" >&5
4131 break
4132 done
4133
4134   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4135 fi
4136 fi
4137 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4138 if test -n "$ac_ct_RANLIB"; then
4139   echo "$as_me:4139: result: $ac_ct_RANLIB" >&5
4140 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4141 else
4142   echo "$as_me:4142: result: no" >&5
4143 echo "${ECHO_T}no" >&6
4144 fi
4145
4146   RANLIB=$ac_ct_RANLIB
4147 else
4148   RANLIB="$ac_cv_prog_RANLIB"
4149 fi
4150
4151 if test -n "$ac_tool_prefix"; then
4152   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4153 set dummy ${ac_tool_prefix}ld; ac_word=$2
4154 echo "$as_me:4154: checking for $ac_word" >&5
4155 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4156 if test "${ac_cv_prog_LD+set}" = set; then
4157   echo $ECHO_N "(cached) $ECHO_C" >&6
4158 else
4159   if test -n "$LD"; then
4160   ac_cv_prog_LD="$LD" # Let the user override the test.
4161 else
4162   ac_save_IFS=$IFS; IFS=$ac_path_separator
4163 ac_dummy="$PATH"
4164 for ac_dir in $ac_dummy; do
4165   IFS=$ac_save_IFS
4166   test -z "$ac_dir" && ac_dir=.
4167   $as_executable_p "$ac_dir/$ac_word" || continue
4168 ac_cv_prog_LD="${ac_tool_prefix}ld"
4169 echo "$as_me:4169: found $ac_dir/$ac_word" >&5
4170 break
4171 done
4172
4173 fi
4174 fi
4175 LD=$ac_cv_prog_LD
4176 if test -n "$LD"; then
4177   echo "$as_me:4177: result: $LD" >&5
4178 echo "${ECHO_T}$LD" >&6
4179 else
4180   echo "$as_me:4180: result: no" >&5
4181 echo "${ECHO_T}no" >&6
4182 fi
4183
4184 fi
4185 if test -z "$ac_cv_prog_LD"; then
4186   ac_ct_LD=$LD
4187   # Extract the first word of "ld", so it can be a program name with args.
4188 set dummy ld; ac_word=$2
4189 echo "$as_me:4189: checking for $ac_word" >&5
4190 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4191 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4192   echo $ECHO_N "(cached) $ECHO_C" >&6
4193 else
4194   if test -n "$ac_ct_LD"; then
4195   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4196 else
4197   ac_save_IFS=$IFS; IFS=$ac_path_separator
4198 ac_dummy="$PATH"
4199 for ac_dir in $ac_dummy; do
4200   IFS=$ac_save_IFS
4201   test -z "$ac_dir" && ac_dir=.
4202   $as_executable_p "$ac_dir/$ac_word" || continue
4203 ac_cv_prog_ac_ct_LD="ld"
4204 echo "$as_me:4204: found $ac_dir/$ac_word" >&5
4205 break
4206 done
4207
4208   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4209 fi
4210 fi
4211 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4212 if test -n "$ac_ct_LD"; then
4213   echo "$as_me:4213: result: $ac_ct_LD" >&5
4214 echo "${ECHO_T}$ac_ct_LD" >&6
4215 else
4216   echo "$as_me:4216: result: no" >&5
4217 echo "${ECHO_T}no" >&6
4218 fi
4219
4220   LD=$ac_ct_LD
4221 else
4222   LD="$ac_cv_prog_LD"
4223 fi
4224
4225 if test -n "$ac_tool_prefix"; then
4226   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4227 set dummy ${ac_tool_prefix}ar; ac_word=$2
4228 echo "$as_me:4228: checking for $ac_word" >&5
4229 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4230 if test "${ac_cv_prog_AR+set}" = set; then
4231   echo $ECHO_N "(cached) $ECHO_C" >&6
4232 else
4233   if test -n "$AR"; then
4234   ac_cv_prog_AR="$AR" # Let the user override the test.
4235 else
4236   ac_save_IFS=$IFS; IFS=$ac_path_separator
4237 ac_dummy="$PATH"
4238 for ac_dir in $ac_dummy; do
4239   IFS=$ac_save_IFS
4240   test -z "$ac_dir" && ac_dir=.
4241   $as_executable_p "$ac_dir/$ac_word" || continue
4242 ac_cv_prog_AR="${ac_tool_prefix}ar"
4243 echo "$as_me:4243: found $ac_dir/$ac_word" >&5
4244 break
4245 done
4246
4247 fi
4248 fi
4249 AR=$ac_cv_prog_AR
4250 if test -n "$AR"; then
4251   echo "$as_me:4251: result: $AR" >&5
4252 echo "${ECHO_T}$AR" >&6
4253 else
4254   echo "$as_me:4254: result: no" >&5
4255 echo "${ECHO_T}no" >&6
4256 fi
4257
4258 fi
4259 if test -z "$ac_cv_prog_AR"; then
4260   ac_ct_AR=$AR
4261   # Extract the first word of "ar", so it can be a program name with args.
4262 set dummy ar; ac_word=$2
4263 echo "$as_me:4263: checking for $ac_word" >&5
4264 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4265 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4266   echo $ECHO_N "(cached) $ECHO_C" >&6
4267 else
4268   if test -n "$ac_ct_AR"; then
4269   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4270 else
4271   ac_save_IFS=$IFS; IFS=$ac_path_separator
4272 ac_dummy="$PATH"
4273 for ac_dir in $ac_dummy; do
4274   IFS=$ac_save_IFS
4275   test -z "$ac_dir" && ac_dir=.
4276   $as_executable_p "$ac_dir/$ac_word" || continue
4277 ac_cv_prog_ac_ct_AR="ar"
4278 echo "$as_me:4278: found $ac_dir/$ac_word" >&5
4279 break
4280 done
4281
4282   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4283 fi
4284 fi
4285 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4286 if test -n "$ac_ct_AR"; then
4287   echo "$as_me:4287: result: $ac_ct_AR" >&5
4288 echo "${ECHO_T}$ac_ct_AR" >&6
4289 else
4290   echo "$as_me:4290: result: no" >&5
4291 echo "${ECHO_T}no" >&6
4292 fi
4293
4294   AR=$ac_ct_AR
4295 else
4296   AR="$ac_cv_prog_AR"
4297 fi
4298
4299 if test -n "$ac_tool_prefix"; then
4300   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4301 set dummy ${ac_tool_prefix}ar; ac_word=$2
4302 echo "$as_me:4302: checking for $ac_word" >&5
4303 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4304 if test "${ac_cv_prog_AR+set}" = set; then
4305   echo $ECHO_N "(cached) $ECHO_C" >&6
4306 else
4307   if test -n "$AR"; then
4308   ac_cv_prog_AR="$AR" # Let the user override the test.
4309 else
4310   ac_save_IFS=$IFS; IFS=$ac_path_separator
4311 ac_dummy="$PATH"
4312 for ac_dir in $ac_dummy; do
4313   IFS=$ac_save_IFS
4314   test -z "$ac_dir" && ac_dir=.
4315   $as_executable_p "$ac_dir/$ac_word" || continue
4316 ac_cv_prog_AR="${ac_tool_prefix}ar"
4317 echo "$as_me:4317: found $ac_dir/$ac_word" >&5
4318 break
4319 done
4320
4321 fi
4322 fi
4323 AR=$ac_cv_prog_AR
4324 if test -n "$AR"; then
4325   echo "$as_me:4325: result: $AR" >&5
4326 echo "${ECHO_T}$AR" >&6
4327 else
4328   echo "$as_me:4328: result: no" >&5
4329 echo "${ECHO_T}no" >&6
4330 fi
4331
4332 fi
4333 if test -z "$ac_cv_prog_AR"; then
4334   ac_ct_AR=$AR
4335   # Extract the first word of "ar", so it can be a program name with args.
4336 set dummy ar; ac_word=$2
4337 echo "$as_me:4337: checking for $ac_word" >&5
4338 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4339 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4340   echo $ECHO_N "(cached) $ECHO_C" >&6
4341 else
4342   if test -n "$ac_ct_AR"; then
4343   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4344 else
4345   ac_save_IFS=$IFS; IFS=$ac_path_separator
4346 ac_dummy="$PATH"
4347 for ac_dir in $ac_dummy; do
4348   IFS=$ac_save_IFS
4349   test -z "$ac_dir" && ac_dir=.
4350   $as_executable_p "$ac_dir/$ac_word" || continue
4351 ac_cv_prog_ac_ct_AR="ar"
4352 echo "$as_me:4352: found $ac_dir/$ac_word" >&5
4353 break
4354 done
4355
4356   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4357 fi
4358 fi
4359 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4360 if test -n "$ac_ct_AR"; then
4361   echo "$as_me:4361: result: $ac_ct_AR" >&5
4362 echo "${ECHO_T}$ac_ct_AR" >&6
4363 else
4364   echo "$as_me:4364: result: no" >&5
4365 echo "${ECHO_T}no" >&6
4366 fi
4367
4368   AR=$ac_ct_AR
4369 else
4370   AR="$ac_cv_prog_AR"
4371 fi
4372
4373 echo "$as_me:4373: checking for options to update archives" >&5
4374 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4375 if test "${cf_cv_ar_flags+set}" = set; then
4376   echo $ECHO_N "(cached) $ECHO_C" >&6
4377 else
4378
4379         cf_cv_ar_flags=unknown
4380         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4381         do
4382
4383                 # check if $ARFLAGS already contains this choice
4384                 if test "x$ARFLAGS" != "x" ; then
4385                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4386                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4387                                 cf_cv_ar_flags=
4388                                 break
4389                         fi
4390                 fi
4391
4392                 rm -f conftest.$ac_cv_objext
4393                 rm -f conftest.a
4394
4395                 cat >conftest.$ac_ext <<EOF
4396 #line 4396 "configure"
4397 int     testdata[3] = { 123, 456, 789 };
4398 EOF
4399                 if { (eval echo "$as_me:4399: \"$ac_compile\"") >&5
4400   (eval $ac_compile) 2>&5
4401   ac_status=$?
4402   echo "$as_me:4402: \$? = $ac_status" >&5
4403   (exit $ac_status); } ; then
4404                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4405                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4406                         if test -f conftest.a ; then
4407                                 cf_cv_ar_flags=$cf_ar_flags
4408                                 break
4409                         fi
4410                 else
4411                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4412
4413 echo "${as_me:-configure}:4413: testing cannot compile test-program ..." 1>&5
4414
4415                         break
4416                 fi
4417         done
4418         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4419
4420 fi
4421 echo "$as_me:4421: result: $cf_cv_ar_flags" >&5
4422 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4423
4424 if test -n "$ARFLAGS" ; then
4425         if test -n "$cf_cv_ar_flags" ; then
4426                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4427         fi
4428 else
4429         ARFLAGS=$cf_cv_ar_flags
4430 fi
4431
4432 echo "$as_me:4432: checking if you have specified an install-prefix" >&5
4433 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4434
4435 # Check whether --with-install-prefix or --without-install-prefix was given.
4436 if test "${with_install_prefix+set}" = set; then
4437   withval="$with_install_prefix"
4438   case "$withval" in #(vi
4439         yes|no) #(vi
4440                 ;;
4441         *)      DESTDIR="$withval"
4442                 ;;
4443         esac
4444 fi;
4445 echo "$as_me:4445: result: $DESTDIR" >&5
4446 echo "${ECHO_T}$DESTDIR" >&6
4447
4448 ###############################################################################
4449
4450 # If we're cross-compiling, allow the user to override the tools and their
4451 # options.  The configure script is oriented toward identifying the host
4452 # compiler, etc., but we need a build compiler to generate parts of the source.
4453
4454 if test "$cross_compiling" = yes ; then
4455
4456         # defaults that we might want to override
4457         : ${BUILD_CFLAGS:=''}
4458         : ${BUILD_CPPFLAGS:=''}
4459         : ${BUILD_LDFLAGS:=''}
4460         : ${BUILD_LIBS:=''}
4461         : ${BUILD_EXEEXT:='$x'}
4462         : ${BUILD_OBJEXT:='o'}
4463
4464 # Check whether --with-build-cc or --without-build-cc was given.
4465 if test "${with_build_cc+set}" = set; then
4466   withval="$with_build_cc"
4467   BUILD_CC="$withval"
4468 else
4469   for ac_prog in gcc cc cl
4470 do
4471   # Extract the first word of "$ac_prog", so it can be a program name with args.
4472 set dummy $ac_prog; ac_word=$2
4473 echo "$as_me:4473: checking for $ac_word" >&5
4474 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4475 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4476   echo $ECHO_N "(cached) $ECHO_C" >&6
4477 else
4478   if test -n "$BUILD_CC"; then
4479   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4480 else
4481   ac_save_IFS=$IFS; IFS=$ac_path_separator
4482 ac_dummy="$PATH"
4483 for ac_dir in $ac_dummy; do
4484   IFS=$ac_save_IFS
4485   test -z "$ac_dir" && ac_dir=.
4486   $as_executable_p "$ac_dir/$ac_word" || continue
4487 ac_cv_prog_BUILD_CC="$ac_prog"
4488 echo "$as_me:4488: found $ac_dir/$ac_word" >&5
4489 break
4490 done
4491
4492 fi
4493 fi
4494 BUILD_CC=$ac_cv_prog_BUILD_CC
4495 if test -n "$BUILD_CC"; then
4496   echo "$as_me:4496: result: $BUILD_CC" >&5
4497 echo "${ECHO_T}$BUILD_CC" >&6
4498 else
4499   echo "$as_me:4499: result: no" >&5
4500 echo "${ECHO_T}no" >&6
4501 fi
4502
4503   test -n "$BUILD_CC" && break
4504 done
4505
4506 fi;
4507         echo "$as_me:4507: checking for native build C compiler" >&5
4508 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4509         echo "$as_me:4509: result: $BUILD_CC" >&5
4510 echo "${ECHO_T}$BUILD_CC" >&6
4511
4512         echo "$as_me:4512: checking for native build C preprocessor" >&5
4513 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4514
4515 # Check whether --with-build-cpp or --without-build-cpp was given.
4516 if test "${with_build_cpp+set}" = set; then
4517   withval="$with_build_cpp"
4518   BUILD_CPP="$withval"
4519 else
4520   BUILD_CPP='${BUILD_CC} -E'
4521 fi;
4522         echo "$as_me:4522: result: $BUILD_CPP" >&5
4523 echo "${ECHO_T}$BUILD_CPP" >&6
4524
4525         echo "$as_me:4525: checking for native build C flags" >&5
4526 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4527
4528 # Check whether --with-build-cflags or --without-build-cflags was given.
4529 if test "${with_build_cflags+set}" = set; then
4530   withval="$with_build_cflags"
4531   BUILD_CFLAGS="$withval"
4532 fi;
4533         echo "$as_me:4533: result: $BUILD_CFLAGS" >&5
4534 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4535
4536         echo "$as_me:4536: checking for native build C preprocessor-flags" >&5
4537 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4538
4539 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4540 if test "${with_build_cppflags+set}" = set; then
4541   withval="$with_build_cppflags"
4542   BUILD_CPPFLAGS="$withval"
4543 fi;
4544         echo "$as_me:4544: result: $BUILD_CPPFLAGS" >&5
4545 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4546
4547         echo "$as_me:4547: checking for native build linker-flags" >&5
4548 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4549
4550 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4551 if test "${with_build_ldflags+set}" = set; then
4552   withval="$with_build_ldflags"
4553   BUILD_LDFLAGS="$withval"
4554 fi;
4555         echo "$as_me:4555: result: $BUILD_LDFLAGS" >&5
4556 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4557
4558         echo "$as_me:4558: checking for native build linker-libraries" >&5
4559 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4560
4561 # Check whether --with-build-libs or --without-build-libs was given.
4562 if test "${with_build_libs+set}" = set; then
4563   withval="$with_build_libs"
4564   BUILD_LIBS="$withval"
4565 fi;
4566         echo "$as_me:4566: result: $BUILD_LIBS" >&5
4567 echo "${ECHO_T}$BUILD_LIBS" >&6
4568
4569         # this assumes we're on Unix.
4570         BUILD_EXEEXT=
4571         BUILD_OBJEXT=o
4572
4573         : ${BUILD_CC:='${CC}'}
4574
4575         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4576                 { { echo "$as_me:4576: error: Cross-build requires two compilers.
4577 Use --with-build-cc to specify the native compiler." >&5
4578 echo "$as_me: error: Cross-build requires two compilers.
4579 Use --with-build-cc to specify the native compiler." >&2;}
4580    { (exit 1); exit 1; }; }
4581         fi
4582
4583 else
4584         : ${BUILD_CC:='${CC}'}
4585         : ${BUILD_CPP:='${CPP}'}
4586         : ${BUILD_CFLAGS:='${CFLAGS}'}
4587         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4588         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4589         : ${BUILD_LIBS:='${LIBS}'}
4590         : ${BUILD_EXEEXT:='$x'}
4591         : ${BUILD_OBJEXT:='o'}
4592 fi
4593
4594 ###############################################################################
4595
4596 ### Options to allow the user to specify the set of libraries which are used.
4597 ### Use "--without-normal --with-shared" to allow the default model to be
4598 ### shared, for example.
4599 cf_list_models=""
4600
4601 echo "$as_me:4601: checking if libtool -version-number should be used" >&5
4602 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4603
4604 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4605 if test "${enable_libtool_version+set}" = set; then
4606   enableval="$enable_libtool_version"
4607   test "$enableval" != no && enableval=yes
4608   if test "$enableval" != "yes" ; then
4609     cf_libtool_version=no
4610   else
4611     cf_libtool_version=yes
4612   fi
4613 else
4614   enableval=yes
4615   cf_libtool_version=yes
4616
4617 fi;
4618 echo "$as_me:4618: result: $cf_libtool_version" >&5
4619 echo "${ECHO_T}$cf_libtool_version" >&6
4620
4621 if test "$cf_libtool_version" = yes ; then
4622         LIBTOOL_VERSION="-version-number"
4623 else
4624         LIBTOOL_VERSION="-version-info"
4625 fi
4626
4627 LIBTOOL=
4628
4629 # common library maintenance symbols that are convenient for libtool scripts:
4630 LIB_CREATE='${AR} -cr'
4631 LIB_OBJECT='${OBJECTS}'
4632 LIB_SUFFIX=.a
4633 LIB_PREP="$RANLIB"
4634
4635 # symbols used to prop libtool up to enable it to determine what it should be
4636 # doing:
4637 LIB_CLEAN=
4638 LIB_COMPILE=
4639 LIB_LINK='${CC}'
4640 LIB_INSTALL=
4641 LIB_UNINSTALL=
4642
4643 echo "$as_me:4643: checking if you want to build libraries with libtool" >&5
4644 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4645
4646 # Check whether --with-libtool or --without-libtool was given.
4647 if test "${with_libtool+set}" = set; then
4648   withval="$with_libtool"
4649   with_libtool=$withval
4650 else
4651   with_libtool=no
4652 fi;
4653 echo "$as_me:4653: result: $with_libtool" >&5
4654 echo "${ECHO_T}$with_libtool" >&6
4655 if test "$with_libtool" != "no"; then
4656
4657         if test "$with_libtool" != "yes" ; then
4658
4659 if test "x$prefix" != xNONE; then
4660   cf_path_syntax="$prefix"
4661 else
4662   cf_path_syntax="$ac_default_prefix"
4663 fi
4664
4665 case ".$with_libtool" in #(vi
4666 .\$\(*\)*|.\'*\'*) #(vi
4667   ;;
4668 ..|./*|.\\*) #(vi
4669   ;;
4670 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4671   ;;
4672 .\${*prefix}*) #(vi
4673   eval with_libtool="$with_libtool"
4674   case ".$with_libtool" in #(vi
4675   .NONE/*)
4676     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4677     ;;
4678   esac
4679   ;; #(vi
4680 .no|.NONE/*)
4681   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4682   ;;
4683 *)
4684   { { echo "$as_me:4684: error: expected a pathname, not \"$with_libtool\"" >&5
4685 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4686    { (exit 1); exit 1; }; }
4687   ;;
4688 esac
4689
4690                 LIBTOOL=$with_libtool
4691         else
4692                 # Extract the first word of "libtool", so it can be a program name with args.
4693 set dummy libtool; ac_word=$2
4694 echo "$as_me:4694: checking for $ac_word" >&5
4695 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4696 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4697   echo $ECHO_N "(cached) $ECHO_C" >&6
4698 else
4699   case $LIBTOOL in
4700   [\\/]* | ?:[\\/]*)
4701   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4702   ;;
4703   *)
4704   ac_save_IFS=$IFS; IFS=$ac_path_separator
4705 ac_dummy="$PATH"
4706 for ac_dir in $ac_dummy; do
4707   IFS=$ac_save_IFS
4708   test -z "$ac_dir" && ac_dir=.
4709   if $as_executable_p "$ac_dir/$ac_word"; then
4710    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4711    echo "$as_me:4711: found $ac_dir/$ac_word" >&5
4712    break
4713 fi
4714 done
4715
4716   ;;
4717 esac
4718 fi
4719 LIBTOOL=$ac_cv_path_LIBTOOL
4720
4721 if test -n "$LIBTOOL"; then
4722   echo "$as_me:4722: result: $LIBTOOL" >&5
4723 echo "${ECHO_T}$LIBTOOL" >&6
4724 else
4725   echo "$as_me:4725: result: no" >&5
4726 echo "${ECHO_T}no" >&6
4727 fi
4728
4729         fi
4730         if test -z "$LIBTOOL" ; then
4731                 { { echo "$as_me:4731: error: Cannot find libtool" >&5
4732 echo "$as_me: error: Cannot find libtool" >&2;}
4733    { (exit 1); exit 1; }; }
4734         fi
4735         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4736         LIB_OBJECT='${OBJECTS:.o=.lo}'
4737         LIB_SUFFIX=.la
4738         LIB_CLEAN='${LIBTOOL} --mode=clean'
4739         LIB_COMPILE='${LIBTOOL} --mode=compile'
4740         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4741         LIB_INSTALL='${LIBTOOL} --mode=install'
4742         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4743         LIB_PREP=:
4744
4745         # Show the version of libtool
4746         echo "$as_me:4746: checking version of libtool" >&5
4747 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4748
4749         # Save the version in a cache variable - this is not entirely a good
4750         # thing, but the version string from libtool is very ugly, and for
4751         # bug reports it might be useful to have the original string. "("
4752         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.].*//'`
4753         echo "$as_me:4753: result: $cf_cv_libtool_version" >&5
4754 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4755         if test -z "$cf_cv_libtool_version" ; then
4756                 { { echo "$as_me:4756: error: This is not GNU libtool" >&5
4757 echo "$as_me: error: This is not GNU libtool" >&2;}
4758    { (exit 1); exit 1; }; }
4759         fi
4760
4761         # special hack to add -no-undefined (which libtool should do for itself)
4762         LT_UNDEF=
4763         case "$cf_cv_system_name" in #(vi
4764         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4765                 LT_UNDEF=-no-undefined
4766                 ;;
4767         esac
4768
4769         # special hack to add --tag option for C++ compiler
4770         case $cf_cv_libtool_version in #(vi
4771         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4772                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4773                 LIBTOOL="$LIBTOOL --tag=CC"
4774                 ;;
4775         *)
4776                 LIBTOOL_CXX="$LIBTOOL"
4777                 ;;
4778         esac
4779 else
4780         LIBTOOL=""
4781         LIBTOOL_CXX=""
4782 fi
4783
4784 test -z "$LIBTOOL" && ECHO_LT=
4785
4786 if test "$with_libtool" != "no" ; then
4787
4788 cf_list_models="$cf_list_models libtool"
4789
4790 else
4791
4792 echo "$as_me:4792: checking if you want to build shared libraries" >&5
4793 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4794
4795 # Check whether --with-shared or --without-shared was given.
4796 if test "${with_shared+set}" = set; then
4797   withval="$with_shared"
4798   with_shared=$withval
4799 else
4800   with_shared=no
4801 fi;
4802 echo "$as_me:4802: result: $with_shared" >&5
4803 echo "${ECHO_T}$with_shared" >&6
4804 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4805
4806 echo "$as_me:4806: checking if you want to build static libraries" >&5
4807 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4808
4809 # Check whether --with-normal or --without-normal was given.
4810 if test "${with_normal+set}" = set; then
4811   withval="$with_normal"
4812   with_normal=$withval
4813 else
4814   with_normal=yes
4815 fi;
4816 echo "$as_me:4816: result: $with_normal" >&5
4817 echo "${ECHO_T}$with_normal" >&6
4818 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4819
4820 echo "$as_me:4820: checking if you want to build debug libraries" >&5
4821 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4822
4823 # Check whether --with-debug or --without-debug was given.
4824 if test "${with_debug+set}" = set; then
4825   withval="$with_debug"
4826   with_debug=$withval
4827 else
4828   with_debug=yes
4829 fi;
4830 echo "$as_me:4830: result: $with_debug" >&5
4831 echo "${ECHO_T}$with_debug" >&6
4832 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4833
4834 echo "$as_me:4834: checking if you want to build profiling libraries" >&5
4835 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4836
4837 # Check whether --with-profile or --without-profile was given.
4838 if test "${with_profile+set}" = set; then
4839   withval="$with_profile"
4840   with_profile=$withval
4841 else
4842   with_profile=no
4843 fi;
4844 echo "$as_me:4844: result: $with_profile" >&5
4845 echo "${ECHO_T}$with_profile" >&6
4846 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4847
4848 fi
4849
4850 ###############################################################################
4851
4852 echo "$as_me:4852: checking for specified models" >&5
4853 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4854 test -z "$cf_list_models" && cf_list_models=normal
4855 test "$with_libtool" != "no" && cf_list_models=libtool
4856 echo "$as_me:4856: result: $cf_list_models" >&5
4857 echo "${ECHO_T}$cf_list_models" >&6
4858
4859 ### Use the first model as the default, and save its suffix for use in building
4860 ### up test-applications.
4861 echo "$as_me:4861: checking for default model" >&5
4862 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4863 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4864 echo "$as_me:4864: result: $DFT_LWR_MODEL" >&5
4865 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4866
4867 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4868
4869 TICS_NAME=tic
4870
4871 TINFO_NAME=tinfo
4872
4873 LIB_NAME=ncurses
4874
4875 LIB_DIR=../lib
4876 LIB_2ND=../../lib
4877
4878 echo "$as_me:4878: checking if you want to have a library-prefix" >&5
4879 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4880
4881 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4882 if test "${with_lib_prefix+set}" = set; then
4883   withval="$with_lib_prefix"
4884   with_lib_prefix=$withval
4885 else
4886   with_lib_prefix=auto
4887 fi;
4888 echo "$as_me:4888: result: $with_lib_prefix" >&5
4889 echo "${ECHO_T}$with_lib_prefix" >&6
4890
4891 if test $with_lib_prefix = auto
4892 then
4893
4894         case $cf_cv_system_name in #(vi
4895         OS/2*|os2*) #(vi
4896         LIB_PREFIX=''
4897         ;;
4898         *)      LIB_PREFIX='lib'
4899         ;;
4900         esac
4901 cf_prefix=$LIB_PREFIX
4902
4903 elif test $with_lib_prefix = no
4904 then
4905         LIB_PREFIX=
4906 else
4907         LIB_PREFIX=$with_lib_prefix
4908 fi
4909
4910 LIB_SUFFIX=
4911
4912 ###############################################################################
4913
4914 echo "$as_me:4914: checking if you want to build a separate terminfo library" >&5
4915 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4916
4917 # Check whether --with-termlib or --without-termlib was given.
4918 if test "${with_termlib+set}" = set; then
4919   withval="$with_termlib"
4920   with_termlib=$withval
4921 else
4922   with_termlib=no
4923 fi;
4924 echo "$as_me:4924: result: $with_termlib" >&5
4925 echo "${ECHO_T}$with_termlib" >&6
4926
4927 echo "$as_me:4927: checking if you want to build a separate tic library" >&5
4928 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4929
4930 # Check whether --with-ticlib or --without-ticlib was given.
4931 if test "${with_ticlib+set}" = set; then
4932   withval="$with_ticlib"
4933   with_ticlib=$withval
4934 else
4935   with_ticlib=no
4936 fi;
4937 echo "$as_me:4937: result: $with_ticlib" >&5
4938 echo "${ECHO_T}$with_ticlib" >&6
4939
4940 ### Checks for special libraries, must be done up-front.
4941 SHLIB_LIST=""
4942
4943 echo "$as_me:4943: checking if you want to link with the GPM mouse library" >&5
4944 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4945
4946 # Check whether --with-gpm or --without-gpm was given.
4947 if test "${with_gpm+set}" = set; then
4948   withval="$with_gpm"
4949   with_gpm=$withval
4950 else
4951   with_gpm=maybe
4952 fi;
4953 echo "$as_me:4953: result: $with_gpm" >&5
4954 echo "${ECHO_T}$with_gpm" >&6
4955
4956 if test "$with_gpm" != no ; then
4957         echo "$as_me:4957: checking for gpm.h" >&5
4958 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4959 if test "${ac_cv_header_gpm_h+set}" = set; then
4960   echo $ECHO_N "(cached) $ECHO_C" >&6
4961 else
4962   cat >conftest.$ac_ext <<_ACEOF
4963 #line 4963 "configure"
4964 #include "confdefs.h"
4965 #include <gpm.h>
4966 _ACEOF
4967 if { (eval echo "$as_me:4967: \"$ac_cpp conftest.$ac_ext\"") >&5
4968   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4969   ac_status=$?
4970   egrep -v '^ *\+' conftest.er1 >conftest.err
4971   rm -f conftest.er1
4972   cat conftest.err >&5
4973   echo "$as_me:4973: \$? = $ac_status" >&5
4974   (exit $ac_status); } >/dev/null; then
4975   if test -s conftest.err; then
4976     ac_cpp_err=$ac_c_preproc_warn_flag
4977   else
4978     ac_cpp_err=
4979   fi
4980 else
4981   ac_cpp_err=yes
4982 fi
4983 if test -z "$ac_cpp_err"; then
4984   ac_cv_header_gpm_h=yes
4985 else
4986   echo "$as_me: failed program was:" >&5
4987   cat conftest.$ac_ext >&5
4988   ac_cv_header_gpm_h=no
4989 fi
4990 rm -f conftest.err conftest.$ac_ext
4991 fi
4992 echo "$as_me:4992: result: $ac_cv_header_gpm_h" >&5
4993 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4994 if test $ac_cv_header_gpm_h = yes; then
4995
4996                 cat >>confdefs.h <<\EOF
4997 #define HAVE_GPM_H 1
4998 EOF
4999
5000                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5001                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5002
5003 echo "${as_me:-configure}:5003: testing assuming we really have GPM library ..." 1>&5
5004
5005                         cat >>confdefs.h <<\EOF
5006 #define HAVE_LIBGPM 1
5007 EOF
5008
5009                 else
5010                         echo "$as_me:5010: checking for Gpm_Open in -lgpm" >&5
5011 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5012 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5013   echo $ECHO_N "(cached) $ECHO_C" >&6
5014 else
5015   ac_check_lib_save_LIBS=$LIBS
5016 LIBS="-lgpm  $LIBS"
5017 cat >conftest.$ac_ext <<_ACEOF
5018 #line 5018 "configure"
5019 #include "confdefs.h"
5020
5021 /* Override any gcc2 internal prototype to avoid an error.  */
5022 #ifdef __cplusplus
5023 extern "C"
5024 #endif
5025 /* We use char because int might match the return type of a gcc2
5026    builtin and then its argument prototype would still apply.  */
5027 char Gpm_Open ();
5028 int
5029 main ()
5030 {
5031 Gpm_Open ();
5032   ;
5033   return 0;
5034 }
5035 _ACEOF
5036 rm -f conftest.$ac_objext conftest$ac_exeext
5037 if { (eval echo "$as_me:5037: \"$ac_link\"") >&5
5038   (eval $ac_link) 2>&5
5039   ac_status=$?
5040   echo "$as_me:5040: \$? = $ac_status" >&5
5041   (exit $ac_status); } &&
5042          { ac_try='test -s conftest$ac_exeext'
5043   { (eval echo "$as_me:5043: \"$ac_try\"") >&5
5044   (eval $ac_try) 2>&5
5045   ac_status=$?
5046   echo "$as_me:5046: \$? = $ac_status" >&5
5047   (exit $ac_status); }; }; then
5048   ac_cv_lib_gpm_Gpm_Open=yes
5049 else
5050   echo "$as_me: failed program was:" >&5
5051 cat conftest.$ac_ext >&5
5052 ac_cv_lib_gpm_Gpm_Open=no
5053 fi
5054 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5055 LIBS=$ac_check_lib_save_LIBS
5056 fi
5057 echo "$as_me:5057: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5058 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5059 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5060   :
5061 else
5062
5063                                 { { echo "$as_me:5063: error: Cannot link with GPM library" >&5
5064 echo "$as_me: error: Cannot link with GPM library" >&2;}
5065    { (exit 1); exit 1; }; }
5066                 fi
5067                 with_gpm=yes
5068
5069 fi
5070
5071 else
5072
5073                 test "$with_gpm" != maybe && { echo "$as_me:5073: WARNING: Cannot find GPM header" >&5
5074 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5075                 with_gpm=no
5076
5077 fi
5078
5079 fi
5080
5081 if test "$with_gpm" != no ; then
5082         echo "$as_me:5082: checking if you want to load GPM dynamically" >&5
5083 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5084
5085 # Check whether --with-dlsym or --without-dlsym was given.
5086 if test "${with_dlsym+set}" = set; then
5087   withval="$with_dlsym"
5088   with_dlsym=$withval
5089 else
5090   with_dlsym=yes
5091 fi;
5092         echo "$as_me:5092: result: $with_dlsym" >&5
5093 echo "${ECHO_T}$with_dlsym" >&6
5094         if test "$with_dlsym" = yes ; then
5095
5096 cf_have_dlsym=no
5097 echo "$as_me:5097: checking for dlsym" >&5
5098 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5099 if test "${ac_cv_func_dlsym+set}" = set; then
5100   echo $ECHO_N "(cached) $ECHO_C" >&6
5101 else
5102   cat >conftest.$ac_ext <<_ACEOF
5103 #line 5103 "configure"
5104 #include "confdefs.h"
5105 /* System header to define __stub macros and hopefully few prototypes,
5106     which can conflict with char dlsym (); below.  */
5107 #include <assert.h>
5108 /* Override any gcc2 internal prototype to avoid an error.  */
5109 #ifdef __cplusplus
5110 extern "C"
5111 #endif
5112 /* We use char because int might match the return type of a gcc2
5113    builtin and then its argument prototype would still apply.  */
5114 char dlsym ();
5115 char (*f) ();
5116
5117 int
5118 main ()
5119 {
5120 /* The GNU C library defines this for functions which it implements
5121     to always fail with ENOSYS.  Some functions are actually named
5122     something starting with __ and the normal name is an alias.  */
5123 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5124 choke me
5125 #else
5126 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5127 #endif
5128
5129   ;
5130   return 0;
5131 }
5132 _ACEOF
5133 rm -f conftest.$ac_objext conftest$ac_exeext
5134 if { (eval echo "$as_me:5134: \"$ac_link\"") >&5
5135   (eval $ac_link) 2>&5
5136   ac_status=$?
5137   echo "$as_me:5137: \$? = $ac_status" >&5
5138   (exit $ac_status); } &&
5139          { ac_try='test -s conftest$ac_exeext'
5140   { (eval echo "$as_me:5140: \"$ac_try\"") >&5
5141   (eval $ac_try) 2>&5
5142   ac_status=$?
5143   echo "$as_me:5143: \$? = $ac_status" >&5
5144   (exit $ac_status); }; }; then
5145   ac_cv_func_dlsym=yes
5146 else
5147   echo "$as_me: failed program was:" >&5
5148 cat conftest.$ac_ext >&5
5149 ac_cv_func_dlsym=no
5150 fi
5151 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5152 fi
5153 echo "$as_me:5153: result: $ac_cv_func_dlsym" >&5
5154 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5155 if test $ac_cv_func_dlsym = yes; then
5156   cf_have_dlsym=yes
5157 else
5158
5159 cf_have_libdl=no
5160 echo "$as_me:5160: checking for dlsym in -ldl" >&5
5161 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5162 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5163   echo $ECHO_N "(cached) $ECHO_C" >&6
5164 else
5165   ac_check_lib_save_LIBS=$LIBS
5166 LIBS="-ldl  $LIBS"
5167 cat >conftest.$ac_ext <<_ACEOF
5168 #line 5168 "configure"
5169 #include "confdefs.h"
5170
5171 /* Override any gcc2 internal prototype to avoid an error.  */
5172 #ifdef __cplusplus
5173 extern "C"
5174 #endif
5175 /* We use char because int might match the return type of a gcc2
5176    builtin and then its argument prototype would still apply.  */
5177 char dlsym ();
5178 int
5179 main ()
5180 {
5181 dlsym ();
5182   ;
5183   return 0;
5184 }
5185 _ACEOF
5186 rm -f conftest.$ac_objext conftest$ac_exeext
5187 if { (eval echo "$as_me:5187: \"$ac_link\"") >&5
5188   (eval $ac_link) 2>&5
5189   ac_status=$?
5190   echo "$as_me:5190: \$? = $ac_status" >&5
5191   (exit $ac_status); } &&
5192          { ac_try='test -s conftest$ac_exeext'
5193   { (eval echo "$as_me:5193: \"$ac_try\"") >&5
5194   (eval $ac_try) 2>&5
5195   ac_status=$?
5196   echo "$as_me:5196: \$? = $ac_status" >&5
5197   (exit $ac_status); }; }; then
5198   ac_cv_lib_dl_dlsym=yes
5199 else
5200   echo "$as_me: failed program was:" >&5
5201 cat conftest.$ac_ext >&5
5202 ac_cv_lib_dl_dlsym=no
5203 fi
5204 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5205 LIBS=$ac_check_lib_save_LIBS
5206 fi
5207 echo "$as_me:5207: result: $ac_cv_lib_dl_dlsym" >&5
5208 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5209 if test $ac_cv_lib_dl_dlsym = yes; then
5210
5211         cf_have_dlsym=yes
5212         cf_have_libdl=yes
5213 fi
5214
5215 fi
5216
5217 if test "$cf_have_dlsym" = yes ; then
5218         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5219
5220         echo "$as_me:5220: checking whether able to link to dl*() functions" >&5
5221 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5222         cat >conftest.$ac_ext <<_ACEOF
5223 #line 5223 "configure"
5224 #include "confdefs.h"
5225 #include <dlfcn.h>
5226 int
5227 main ()
5228 {
5229
5230                 void *obj;
5231                 if ((obj = dlopen("filename", 0)) != 0) {
5232                         if (dlsym(obj, "symbolname") == 0) {
5233                         dlclose(obj);
5234                         }
5235                 }
5236   ;
5237   return 0;
5238 }
5239 _ACEOF
5240 rm -f conftest.$ac_objext conftest$ac_exeext
5241 if { (eval echo "$as_me:5241: \"$ac_link\"") >&5
5242   (eval $ac_link) 2>&5
5243   ac_status=$?
5244   echo "$as_me:5244: \$? = $ac_status" >&5
5245   (exit $ac_status); } &&
5246          { ac_try='test -s conftest$ac_exeext'
5247   { (eval echo "$as_me:5247: \"$ac_try\"") >&5
5248   (eval $ac_try) 2>&5
5249   ac_status=$?
5250   echo "$as_me:5250: \$? = $ac_status" >&5
5251   (exit $ac_status); }; }; then
5252
5253                 cat >>confdefs.h <<\EOF
5254 #define HAVE_LIBDL 1
5255 EOF
5256
5257 else
5258   echo "$as_me: failed program was:" >&5
5259 cat conftest.$ac_ext >&5
5260
5261                 { { echo "$as_me:5261: error: Cannot link test program for libdl" >&5
5262 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5263    { (exit 1); exit 1; }; }
5264 fi
5265 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5266         echo "$as_me:5266: result: ok" >&5
5267 echo "${ECHO_T}ok" >&6
5268 else
5269         { { echo "$as_me:5269: error: Cannot find dlsym function" >&5
5270 echo "$as_me: error: Cannot find dlsym function" >&2;}
5271    { (exit 1); exit 1; }; }
5272 fi
5273
5274                 if test "$with_gpm" != yes ; then
5275                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5276
5277 echo "${as_me:-configure}:5277: testing assuming soname for gpm is $with_gpm ..." 1>&5
5278
5279                         cf_cv_gpm_soname="$with_gpm"
5280                 else
5281
5282 echo "$as_me:5282: checking for soname of gpm library" >&5
5283 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5284 if test "${cf_cv_gpm_soname+set}" = set; then
5285   echo $ECHO_N "(cached) $ECHO_C" >&6
5286 else
5287
5288 cf_cv_gpm_soname=unknown
5289 if test "$cross_compiling" != yes ; then
5290 cat >conftest.$ac_ext <<CF_EOF
5291 #include <gpm.h>
5292 int main()
5293 {
5294 if (Gpm_Open(0,0)) Gpm_Close();
5295         ${cf_cv_main_return:-return}(0);
5296 }
5297 CF_EOF
5298 cf_save_LIBS="$LIBS"
5299         LIBS="-lgpm $LIBS"
5300         if { (eval echo "$as_me:5300: \"$ac_compile\"") >&5
5301   (eval $ac_compile) 2>&5
5302   ac_status=$?
5303   echo "$as_me:5303: \$? = $ac_status" >&5
5304   (exit $ac_status); } ; then
5305                 if { (eval echo "$as_me:5305: \"$ac_link\"") >&5
5306   (eval $ac_link) 2>&5
5307   ac_status=$?
5308   echo "$as_me:5308: \$? = $ac_status" >&5
5309   (exit $ac_status); } ; then
5310                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5311                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5312                 fi
5313         fi
5314 rm -rf conftest*
5315 LIBS="$cf_save_LIBS"
5316 fi
5317
5318 fi
5319 echo "$as_me:5319: result: $cf_cv_gpm_soname" >&5
5320 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5321
5322                 fi
5323                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5324 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5325 EOF
5326
5327                 SHLIB_LIST="-ldl $SHLIB_LIST"
5328         else
5329                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5330                 TEST_LIBS="-lgpm $TEST_LIBS"
5331         fi
5332         cat >>confdefs.h <<\EOF
5333 #define HAVE_LIBGPM 1
5334 EOF
5335
5336 echo "$as_me:5336: checking for Gpm_Wgetch in -lgpm" >&5
5337 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5338 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5339   echo $ECHO_N "(cached) $ECHO_C" >&6
5340 else
5341   ac_check_lib_save_LIBS=$LIBS
5342 LIBS="-lgpm  $LIBS"
5343 cat >conftest.$ac_ext <<_ACEOF
5344 #line 5344 "configure"
5345 #include "confdefs.h"
5346
5347 /* Override any gcc2 internal prototype to avoid an error.  */
5348 #ifdef __cplusplus
5349 extern "C"
5350 #endif
5351 /* We use char because int might match the return type of a gcc2
5352    builtin and then its argument prototype would still apply.  */
5353 char Gpm_Wgetch ();
5354 int
5355 main ()
5356 {
5357 Gpm_Wgetch ();
5358   ;
5359   return 0;
5360 }
5361 _ACEOF
5362 rm -f conftest.$ac_objext conftest$ac_exeext
5363 if { (eval echo "$as_me:5363: \"$ac_link\"") >&5
5364   (eval $ac_link) 2>&5
5365   ac_status=$?
5366   echo "$as_me:5366: \$? = $ac_status" >&5
5367   (exit $ac_status); } &&
5368          { ac_try='test -s conftest$ac_exeext'
5369   { (eval echo "$as_me:5369: \"$ac_try\"") >&5
5370   (eval $ac_try) 2>&5
5371   ac_status=$?
5372   echo "$as_me:5372: \$? = $ac_status" >&5
5373   (exit $ac_status); }; }; then
5374   ac_cv_lib_gpm_Gpm_Wgetch=yes
5375 else
5376   echo "$as_me: failed program was:" >&5
5377 cat conftest.$ac_ext >&5
5378 ac_cv_lib_gpm_Gpm_Wgetch=no
5379 fi
5380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5381 LIBS=$ac_check_lib_save_LIBS
5382 fi
5383 echo "$as_me:5383: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5384 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5385 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5386
5387 echo "$as_me:5387: checking if GPM is weakly bound to curses library" >&5
5388 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5389 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5390   echo $ECHO_N "(cached) $ECHO_C" >&6
5391 else
5392
5393 cf_cv_check_gpm_wgetch=unknown
5394 if test "$cross_compiling" != yes ; then
5395
5396 cat >conftest.$ac_ext <<CF_EOF
5397 #include <gpm.h>
5398 int main()
5399 {
5400         Gpm_Wgetch();
5401         ${cf_cv_main_return:-return}(0);
5402 }
5403 CF_EOF
5404
5405         cf_save_LIBS="$LIBS"
5406         # This only works if we can look at the symbol table.  If a shared
5407         # library is stripped for install, we cannot use that.  So we're forced
5408         # to rely on the static library, noting that some packagers may not
5409         # include it.
5410         LIBS="-static -lgpm -dynamic $LIBS"
5411         if { (eval echo "$as_me:5411: \"$ac_compile\"") >&5
5412   (eval $ac_compile) 2>&5
5413   ac_status=$?
5414   echo "$as_me:5414: \$? = $ac_status" >&5
5415   (exit $ac_status); } ; then
5416                 if { (eval echo "$as_me:5416: \"$ac_link\"") >&5
5417   (eval $ac_link) 2>&5
5418   ac_status=$?
5419   echo "$as_me:5419: \$? = $ac_status" >&5
5420   (exit $ac_status); } ; then
5421                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5422                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5423                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5424                 fi
5425         fi
5426         rm -rf conftest*
5427         LIBS="$cf_save_LIBS"
5428 fi
5429
5430 fi
5431 echo "$as_me:5431: result: $cf_cv_check_gpm_wgetch" >&5
5432 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5433
5434 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5435         { echo "$as_me:5435: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5436 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5437 fi
5438
5439 fi
5440
5441 fi
5442
5443 # not everyone has "test -c"
5444 if test -c /dev/sysmouse 2>/dev/null ; then
5445 echo "$as_me:5445: checking if you want to use sysmouse" >&5
5446 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5447
5448 # Check whether --with-sysmouse or --without-sysmouse was given.
5449 if test "${with_sysmouse+set}" = set; then
5450   withval="$with_sysmouse"
5451   cf_with_sysmouse=$withval
5452 else
5453   cf_with_sysmouse=maybe
5454 fi;
5455         if test "$cf_with_sysmouse" != no ; then
5456         cat >conftest.$ac_ext <<_ACEOF
5457 #line 5457 "configure"
5458 #include "confdefs.h"
5459
5460 #include <osreldate.h>
5461 #if (__FreeBSD_version >= 400017)
5462 #include <sys/consio.h>
5463 #include <sys/fbio.h>
5464 #else
5465 #include <machine/console.h>
5466 #endif
5467
5468 int
5469 main ()
5470 {
5471
5472         struct mouse_info the_mouse;
5473         ioctl(0, CONS_MOUSECTL, &the_mouse);
5474
5475   ;
5476   return 0;
5477 }
5478 _ACEOF
5479 rm -f conftest.$ac_objext
5480 if { (eval echo "$as_me:5480: \"$ac_compile\"") >&5
5481   (eval $ac_compile) 2>&5
5482   ac_status=$?
5483   echo "$as_me:5483: \$? = $ac_status" >&5
5484   (exit $ac_status); } &&
5485          { ac_try='test -s conftest.$ac_objext'
5486   { (eval echo "$as_me:5486: \"$ac_try\"") >&5
5487   (eval $ac_try) 2>&5
5488   ac_status=$?
5489   echo "$as_me:5489: \$? = $ac_status" >&5
5490   (exit $ac_status); }; }; then
5491   cf_with_sysmouse=yes
5492 else
5493   echo "$as_me: failed program was:" >&5
5494 cat conftest.$ac_ext >&5
5495 cf_with_sysmouse=no
5496 fi
5497 rm -f conftest.$ac_objext conftest.$ac_ext
5498         fi
5499 echo "$as_me:5499: result: $cf_with_sysmouse" >&5
5500 echo "${ECHO_T}$cf_with_sysmouse" >&6
5501 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5502 #define USE_SYSMOUSE 1
5503 EOF
5504
5505 fi
5506
5507 if test X"$CC_G_OPT" = X"" ; then
5508         CC_G_OPT='-g'
5509         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5510 fi
5511
5512 if test X"$CXX_G_OPT" = X"" ; then
5513         CXX_G_OPT='-g'
5514         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5515 fi
5516
5517 echo "$as_me:5517: checking for default loader flags" >&5
5518 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5519 case $DFT_LWR_MODEL in
5520 libtool) LD_MODEL=''   ;;
5521 normal)  LD_MODEL=''   ;;
5522 debug)   LD_MODEL=$CC_G_OPT ;;
5523 profile) LD_MODEL='-pg';;
5524 shared)  LD_MODEL=''   ;;
5525 esac
5526 echo "$as_me:5526: result: $LD_MODEL" >&5
5527 echo "${ECHO_T}$LD_MODEL" >&6
5528
5529 case $DFT_LWR_MODEL in
5530 shared)
5531
5532 echo "$as_me:5532: checking if rpath option should be used" >&5
5533 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5534
5535 # Check whether --enable-rpath or --disable-rpath was given.
5536 if test "${enable_rpath+set}" = set; then
5537   enableval="$enable_rpath"
5538   cf_cv_enable_rpath=$enableval
5539 else
5540   cf_cv_enable_rpath=no
5541 fi;
5542 echo "$as_me:5542: result: $cf_cv_enable_rpath" >&5
5543 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5544
5545 echo "$as_me:5545: checking if shared libraries should be relinked during install" >&5
5546 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5547
5548 # Check whether --enable-relink or --disable-relink was given.
5549 if test "${enable_relink+set}" = set; then
5550   enableval="$enable_relink"
5551   cf_cv_do_relink=$enableval
5552 else
5553   cf_cv_do_relink=yes
5554 fi;
5555 echo "$as_me:5555: result: $cf_cv_do_relink" >&5
5556 echo "${ECHO_T}$cf_cv_do_relink" >&6
5557         ;;
5558 esac
5559
5560 LD_RPATH_OPT=
5561 echo "$as_me:5561: checking for an rpath option" >&5
5562 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5563 case $cf_cv_system_name in #(vi
5564 irix*) #(vi
5565         if test "$GCC" = yes; then
5566                 LD_RPATH_OPT="-Wl,-rpath,"
5567         else
5568                 LD_RPATH_OPT="-rpath "
5569         fi
5570         ;;
5571 linux*|gnu*|k*bsd*-gnu) #(vi
5572         LD_RPATH_OPT="-Wl,-rpath,"
5573         ;;
5574 openbsd[2-9].*|mirbsd*) #(vi
5575         LD_RPATH_OPT="-Wl,-rpath,"
5576         ;;
5577 dragonfly*|freebsd*) #(vi
5578         LD_RPATH_OPT="-rpath "
5579         ;;
5580 netbsd*) #(vi
5581         LD_RPATH_OPT="-Wl,-rpath,"
5582         ;;
5583 osf*|mls+*) #(vi
5584         LD_RPATH_OPT="-rpath "
5585         ;;
5586 solaris2*) #(vi
5587         LD_RPATH_OPT="-R"
5588         ;;
5589 *)
5590         ;;
5591 esac
5592 echo "$as_me:5592: result: $LD_RPATH_OPT" >&5
5593 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5594
5595 case "x$LD_RPATH_OPT" in #(vi
5596 x-R*)
5597         echo "$as_me:5597: checking if we need a space after rpath option" >&5
5598 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5599         cf_save_LIBS="$LIBS"
5600         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5601         cat >conftest.$ac_ext <<_ACEOF
5602 #line 5602 "configure"
5603 #include "confdefs.h"
5604
5605 int
5606 main ()
5607 {
5608
5609   ;
5610   return 0;
5611 }
5612 _ACEOF
5613 rm -f conftest.$ac_objext conftest$ac_exeext
5614 if { (eval echo "$as_me:5614: \"$ac_link\"") >&5
5615   (eval $ac_link) 2>&5
5616   ac_status=$?
5617   echo "$as_me:5617: \$? = $ac_status" >&5
5618   (exit $ac_status); } &&
5619          { ac_try='test -s conftest$ac_exeext'
5620   { (eval echo "$as_me:5620: \"$ac_try\"") >&5
5621   (eval $ac_try) 2>&5
5622   ac_status=$?
5623   echo "$as_me:5623: \$? = $ac_status" >&5
5624   (exit $ac_status); }; }; then
5625   cf_rpath_space=no
5626 else
5627   echo "$as_me: failed program was:" >&5
5628 cat conftest.$ac_ext >&5
5629 cf_rpath_space=yes
5630 fi
5631 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5632         LIBS="$cf_save_LIBS"
5633         echo "$as_me:5633: result: $cf_rpath_space" >&5
5634 echo "${ECHO_T}$cf_rpath_space" >&6
5635         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5636         ;;
5637 esac
5638
5639         LOCAL_LDFLAGS=
5640         LOCAL_LDFLAGS2=
5641         LD_SHARED_OPTS=
5642         INSTALL_LIB="-m 644"
5643
5644         cf_cv_do_symlinks=no
5645         cf_ld_rpath_opt=
5646         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5647
5648         echo "$as_me:5648: checking if release/abi version should be used for shared libs" >&5
5649 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5650
5651 # Check whether --with-shlib-version or --without-shlib-version was given.
5652 if test "${with_shlib_version+set}" = set; then
5653   withval="$with_shlib_version"
5654   test -z "$withval" && withval=auto
5655         case $withval in #(vi
5656         yes) #(vi
5657                 cf_cv_shlib_version=auto
5658                 ;;
5659         rel|abi|auto|no) #(vi
5660                 cf_cv_shlib_version=$withval
5661                 ;;
5662         *)
5663                 { { echo "$as_me:5663: error: option value must be one of: rel, abi, auto or no" >&5
5664 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5665    { (exit 1); exit 1; }; }
5666                 ;;
5667         esac
5668
5669 else
5670   cf_cv_shlib_version=auto
5671 fi;
5672         echo "$as_me:5672: result: $cf_cv_shlib_version" >&5
5673 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5674
5675         cf_cv_rm_so_locs=no
5676
5677         # Some less-capable ports of gcc support only -fpic
5678         CC_SHARED_OPTS=
5679         if test "$GCC" = yes
5680         then
5681                 echo "$as_me:5681: checking which $CC option to use" >&5
5682 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5683                 cf_save_CFLAGS="$CFLAGS"
5684                 for CC_SHARED_OPTS in -fPIC -fpic ''
5685                 do
5686                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5687                         cat >conftest.$ac_ext <<_ACEOF
5688 #line 5688 "configure"
5689 #include "confdefs.h"
5690 #include <stdio.h>
5691 int
5692 main ()
5693 {
5694 int x = 1
5695   ;
5696   return 0;
5697 }
5698 _ACEOF
5699 rm -f conftest.$ac_objext
5700 if { (eval echo "$as_me:5700: \"$ac_compile\"") >&5
5701   (eval $ac_compile) 2>&5
5702   ac_status=$?
5703   echo "$as_me:5703: \$? = $ac_status" >&5
5704   (exit $ac_status); } &&
5705          { ac_try='test -s conftest.$ac_objext'
5706   { (eval echo "$as_me:5706: \"$ac_try\"") >&5
5707   (eval $ac_try) 2>&5
5708   ac_status=$?
5709   echo "$as_me:5709: \$? = $ac_status" >&5
5710   (exit $ac_status); }; }; then
5711   break
5712 else
5713   echo "$as_me: failed program was:" >&5
5714 cat conftest.$ac_ext >&5
5715 fi
5716 rm -f conftest.$ac_objext conftest.$ac_ext
5717                 done
5718                 echo "$as_me:5718: result: $CC_SHARED_OPTS" >&5
5719 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5720                 CFLAGS="$cf_save_CFLAGS"
5721         fi
5722
5723         cf_cv_shlib_version_infix=no
5724
5725         case $cf_cv_system_name in #(vi
5726         aix4.3-9*|aix[5-7]*) #(vi
5727                 if test "$GCC" = yes; then
5728                         CC_SHARED_OPTS=
5729                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5730                 else
5731                         # CC_SHARED_OPTS='-qpic=large -G'
5732                         # perhaps "-bM:SRE -bnoentry -bexpall"
5733                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5734                 fi
5735                 ;;
5736         beos*) #(vi
5737                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5738                 ;;
5739         cygwin*) #(vi
5740                 CC_SHARED_OPTS=
5741                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5742                 cf_cv_shlib_version=cygdll
5743                 cf_cv_shlib_version_infix=cygdll
5744                 cat >mk_shared_lib.sh <<-CF_EOF
5745                 #!/bin/sh
5746                 SHARED_LIB=\$1
5747                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5748                 shift
5749                 cat <<-EOF
5750                 Linking shared library
5751                 ** SHARED_LIB \$SHARED_LIB
5752                 ** IMPORT_LIB \$IMPORT_LIB
5753 EOF
5754                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5755 CF_EOF
5756                 chmod +x mk_shared_lib.sh
5757                 ;;
5758         darwin*) #(vi
5759                 EXTRA_CFLAGS="-no-cpp-precomp"
5760                 CC_SHARED_OPTS="-dynamic"
5761                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5762                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5763                 cf_cv_shlib_version_infix=yes
5764                 echo "$as_me:5764: checking if ld -search_paths_first works" >&5
5765 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5766 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5767   echo $ECHO_N "(cached) $ECHO_C" >&6
5768 else
5769
5770                         cf_save_LDFLAGS=$LDFLAGS
5771                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5772                         cat >conftest.$ac_ext <<_ACEOF
5773 #line 5773 "configure"
5774 #include "confdefs.h"
5775
5776 int
5777 main ()
5778 {
5779 int i;
5780   ;
5781   return 0;
5782 }
5783 _ACEOF
5784 rm -f conftest.$ac_objext conftest$ac_exeext
5785 if { (eval echo "$as_me:5785: \"$ac_link\"") >&5
5786   (eval $ac_link) 2>&5
5787   ac_status=$?
5788   echo "$as_me:5788: \$? = $ac_status" >&5
5789   (exit $ac_status); } &&
5790          { ac_try='test -s conftest$ac_exeext'
5791   { (eval echo "$as_me:5791: \"$ac_try\"") >&5
5792   (eval $ac_try) 2>&5
5793   ac_status=$?
5794   echo "$as_me:5794: \$? = $ac_status" >&5
5795   (exit $ac_status); }; }; then
5796   cf_cv_ldflags_search_paths_first=yes
5797 else
5798   echo "$as_me: failed program was:" >&5
5799 cat conftest.$ac_ext >&5
5800 cf_cv_ldflags_search_paths_first=no
5801 fi
5802 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5803                                 LDFLAGS=$cf_save_LDFLAGS
5804 fi
5805 echo "$as_me:5805: result: $cf_cv_ldflags_search_paths_first" >&5
5806 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5807                 if test $cf_cv_ldflags_search_paths_first = yes; then
5808                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5809                 fi
5810                 ;;
5811         hpux*) #(vi
5812                 # (tested with gcc 2.7.2 -- I don't have c89)
5813                 if test "$GCC" = yes; then
5814                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5815                 else
5816                         CC_SHARED_OPTS='+Z'
5817                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5818                 fi
5819                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5820                 # HP-UX shared libraries must be executable, and should be
5821                 # readonly to exploit a quirk in the memory manager.
5822                 INSTALL_LIB="-m 555"
5823                 ;;
5824         interix*)
5825                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5826                 if test "$cf_cv_shlib_version" = rel; then
5827                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5828                 else
5829                         cf_shared_soname='`basename `'
5830                 fi
5831                 CC_SHARED_OPTS=
5832                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5833                 ;;
5834         irix*) #(vi
5835                 if test "$cf_cv_enable_rpath" = yes ; then
5836                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5837                 fi
5838                 # tested with IRIX 5.2 and 'cc'.
5839                 if test "$GCC" != yes; then
5840                         CC_SHARED_OPTS='-KPIC'
5841                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5842                 else
5843                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5844                 fi
5845                 cf_cv_rm_so_locs=yes
5846                 ;;
5847         linux*|gnu*|k*bsd*-gnu) #(vi
5848                 if test "$DFT_LWR_MODEL" = "shared" ; then
5849                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5850                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5851                 fi
5852                 if test "$cf_cv_enable_rpath" = yes ; then
5853                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5854                 fi
5855
5856         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5857         if test "$cf_cv_shlib_version" = rel; then
5858                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5859         else
5860                 cf_cv_shared_soname='`basename $@`'
5861         fi
5862
5863                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5864                 ;;
5865         mingw*) #(vi
5866                 cf_cv_shlib_version=mingw
5867                 cf_cv_shlib_version_infix=mingw
5868                 CC_SHARED_OPTS=
5869                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5870                 #MK_SHARED_LIB='${CC} ${CFLAGS} -mdll -Wl,-soname,'$cf_cv_shared_soname',-stats -o $[@]'
5871                 #MK_SHARED_LIB='${DLLTOOL} --export-all-symbols --output-exp --output-lib $[@]'
5872                 cat >mk_shared_lib.sh <<-CF_EOF
5873                 #!/bin/sh
5874                 SHARED_LIB=\$1
5875                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5876                 shift
5877                 cat <<-EOF
5878                 Linking shared library
5879                 ** SHARED_LIB \$SHARED_LIB
5880                 ** IMPORT_LIB \$IMPORT_LIB
5881 EOF
5882                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5883 CF_EOF
5884                 chmod +x mk_shared_lib.sh
5885                 ;;
5886         openbsd[2-9].*|mirbsd*) #(vi
5887                 if test "$DFT_LWR_MODEL" = "shared" ; then
5888                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5889                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5890                 fi
5891                 if test "$cf_cv_enable_rpath" = yes ; then
5892                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5893                 fi
5894                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5895
5896         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5897         if test "$cf_cv_shlib_version" = rel; then
5898                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5899         else
5900                 cf_cv_shared_soname='`basename $@`'
5901         fi
5902
5903                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5904                 ;;
5905         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5906                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5907                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5908                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5909                 ;;
5910         dragonfly*|freebsd*) #(vi
5911                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5912                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5913                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5914                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5915                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5916                 fi
5917
5918         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5919         if test "$cf_cv_shlib_version" = rel; then
5920                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5921         else
5922                 cf_cv_shared_soname='`basename $@`'
5923         fi
5924
5925                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5926                 ;;
5927         netbsd*) #(vi
5928                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5929                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5930                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5931                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5932                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5933                         if test "$cf_cv_shlib_version" = auto; then
5934                         if test -f /usr/libexec/ld.elf_so; then
5935                                 cf_cv_shlib_version=abi
5936                         else
5937                                 cf_cv_shlib_version=rel
5938                         fi
5939                         fi
5940
5941         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5942         if test "$cf_cv_shlib_version" = rel; then
5943                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5944         else
5945                 cf_cv_shared_soname='`basename $@`'
5946         fi
5947
5948                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5949                 else
5950                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5951                 fi
5952                 ;;
5953         osf*|mls+*) #(vi
5954                 # tested with OSF/1 V3.2 and 'cc'
5955                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5956                 # link with shared libs).
5957                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5958                 case $host_os in #(vi
5959                 osf4*)
5960                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5961                         ;;
5962                 esac
5963                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5964                 if test "$DFT_LWR_MODEL" = "shared" ; then
5965                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5966                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5967                 fi
5968                 cf_cv_rm_so_locs=yes
5969                 ;;
5970         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5971                 # tested with osr5.0.5
5972                 if test "$GCC" != yes; then
5973                         CC_SHARED_OPTS='-belf -KPIC'
5974                 fi
5975                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5976                 if test "$cf_cv_enable_rpath" = yes ; then
5977                         # only way is to set LD_RUN_PATH but no switch for it
5978                         RUN_PATH=$libdir
5979                 fi
5980                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5981                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5982                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5983                 ;;
5984         sunos4*) #(vi
5985                 # tested with SunOS 4.1.1 and gcc 2.7.0
5986                 if test "$GCC" != yes; then
5987                         CC_SHARED_OPTS='-KPIC'
5988                 fi
5989                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5990                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5991                 ;;
5992         solaris2*) #(vi
5993                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5994                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5995                 if test "$DFT_LWR_MODEL" = "shared" ; then
5996                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5997                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5998                 fi
5999                 if test "$cf_cv_enable_rpath" = yes ; then
6000                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6001                 fi
6002
6003         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6004         if test "$cf_cv_shlib_version" = rel; then
6005                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6006         else
6007                 cf_cv_shared_soname='`basename $@`'
6008         fi
6009
6010                 if test "$GCC" != yes; then
6011                         cf_save_CFLAGS="$CFLAGS"
6012                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6013                         do
6014                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6015                                 cat >conftest.$ac_ext <<_ACEOF
6016 #line 6016 "configure"
6017 #include "confdefs.h"
6018 #include <stdio.h>
6019 int
6020 main ()
6021 {
6022 printf("Hello\n");
6023   ;
6024   return 0;
6025 }
6026 _ACEOF
6027 rm -f conftest.$ac_objext
6028 if { (eval echo "$as_me:6028: \"$ac_compile\"") >&5
6029   (eval $ac_compile) 2>&5
6030   ac_status=$?
6031   echo "$as_me:6031: \$? = $ac_status" >&5
6032   (exit $ac_status); } &&
6033          { ac_try='test -s conftest.$ac_objext'
6034   { (eval echo "$as_me:6034: \"$ac_try\"") >&5
6035   (eval $ac_try) 2>&5
6036   ac_status=$?
6037   echo "$as_me:6037: \$? = $ac_status" >&5
6038   (exit $ac_status); }; }; then
6039   break
6040 else
6041   echo "$as_me: failed program was:" >&5
6042 cat conftest.$ac_ext >&5
6043 fi
6044 rm -f conftest.$ac_objext conftest.$ac_ext
6045                         done
6046                         CFLAGS="$cf_save_CFLAGS"
6047                         CC_SHARED_OPTS=$cf_shared_opts
6048                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6049                 else
6050                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6051                 fi
6052                 ;;
6053         sysv5uw7*|unix_sv*) #(vi
6054                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6055                 if test "$GCC" != yes; then
6056                         CC_SHARED_OPTS='-KPIC'
6057                 fi
6058                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6059                 ;;
6060         *)
6061                 CC_SHARED_OPTS='unknown'
6062                 MK_SHARED_LIB='echo unknown'
6063                 ;;
6064         esac
6065
6066         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6067         case "$cf_cv_shlib_version" in #(vi
6068         rel|abi)
6069                 case "$MK_SHARED_LIB" in #(vi
6070                 *'-o $@') #(vi
6071                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6072                         ;;
6073                 *)
6074                         { echo "$as_me:6074: WARNING: ignored --with-shlib-version" >&5
6075 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6076                         ;;
6077                 esac
6078                 ;;
6079         esac
6080
6081         # RPATH_LIST is a colon-separated list of directories
6082         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6083         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6084
6085         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6086
6087 echo "${as_me:-configure}:6087: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6088
6089         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6090
6091 echo "${as_me:-configure}:6091: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6092
6093 if test "$CC_SHARED_OPTS" = "unknown"; then
6094         for model in $cf_list_models; do
6095                 if test "$model" = "shared"; then
6096                         { { echo "$as_me:6096: error: Shared libraries are not supported in this version" >&5
6097 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6098    { (exit 1); exit 1; }; }
6099                 fi
6100         done
6101 fi
6102
6103 ### If we're building with rpath, try to link non-standard libs that way too.
6104 if test "$DFT_LWR_MODEL" = "shared"; then
6105
6106 echo "$as_me:6106: checking if rpath-hack should be disabled" >&5
6107 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6108
6109 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6110 if test "${enable_rpath_hack+set}" = set; then
6111   enableval="$enable_rpath_hack"
6112   test "$enableval" != no && enableval=yes
6113   if test "$enableval" != "yes" ; then
6114     cf_disable_rpath_hack=yes
6115   else
6116     cf_disable_rpath_hack=no
6117   fi
6118 else
6119   enableval=yes
6120   cf_disable_rpath_hack=no
6121
6122 fi;
6123 echo "$as_me:6123: result: $cf_disable_rpath_hack" >&5
6124 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6125 if test "$cf_disable_rpath_hack" = no ; then
6126
6127 echo "$as_me:6127: checking for updated LDFLAGS" >&5
6128 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6129 if test -n "$LD_RPATH_OPT" ; then
6130         echo "$as_me:6130: result: maybe" >&5
6131 echo "${ECHO_T}maybe" >&6
6132
6133         for ac_prog in ldd
6134 do
6135   # Extract the first word of "$ac_prog", so it can be a program name with args.
6136 set dummy $ac_prog; ac_word=$2
6137 echo "$as_me:6137: checking for $ac_word" >&5
6138 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6139 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6140   echo $ECHO_N "(cached) $ECHO_C" >&6
6141 else
6142   if test -n "$cf_ldd_prog"; then
6143   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6144 else
6145   ac_save_IFS=$IFS; IFS=$ac_path_separator
6146 ac_dummy="$PATH"
6147 for ac_dir in $ac_dummy; do
6148   IFS=$ac_save_IFS
6149   test -z "$ac_dir" && ac_dir=.
6150   $as_executable_p "$ac_dir/$ac_word" || continue
6151 ac_cv_prog_cf_ldd_prog="$ac_prog"
6152 echo "$as_me:6152: found $ac_dir/$ac_word" >&5
6153 break
6154 done
6155
6156 fi
6157 fi
6158 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6159 if test -n "$cf_ldd_prog"; then
6160   echo "$as_me:6160: result: $cf_ldd_prog" >&5
6161 echo "${ECHO_T}$cf_ldd_prog" >&6
6162 else
6163   echo "$as_me:6163: result: no" >&5
6164 echo "${ECHO_T}no" >&6
6165 fi
6166
6167   test -n "$cf_ldd_prog" && break
6168 done
6169 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6170
6171         cf_rpath_list="/usr/lib /lib"
6172         if test "$cf_ldd_prog" != no
6173         then
6174                 cf_rpath_oops=
6175
6176 cat >conftest.$ac_ext <<_ACEOF
6177 #line 6177 "configure"
6178 #include "confdefs.h"
6179 #include <stdio.h>
6180 int
6181 main ()
6182 {
6183 printf("Hello");
6184   ;
6185   return 0;
6186 }
6187 _ACEOF
6188 rm -f conftest.$ac_objext conftest$ac_exeext
6189 if { (eval echo "$as_me:6189: \"$ac_link\"") >&5
6190   (eval $ac_link) 2>&5
6191   ac_status=$?
6192   echo "$as_me:6192: \$? = $ac_status" >&5
6193   (exit $ac_status); } &&
6194          { ac_try='test -s conftest$ac_exeext'
6195   { (eval echo "$as_me:6195: \"$ac_try\"") >&5
6196   (eval $ac_try) 2>&5
6197   ac_status=$?
6198   echo "$as_me:6198: \$? = $ac_status" >&5
6199   (exit $ac_status); }; }; then
6200   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
6201                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
6202 else
6203   echo "$as_me: failed program was:" >&5
6204 cat conftest.$ac_ext >&5
6205 fi
6206 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6207
6208                 # If we passed the link-test, but get a "not found" on a given library,
6209                 # this could be due to inept reconfiguration of gcc to make it only
6210                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6211                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6212                 # /usr/local libraries.
6213                 if test -n "$cf_rpath_oops"
6214                 then
6215                         for cf_rpath_src in $cf_rpath_oops
6216                         do
6217                                 for cf_rpath_dir in \
6218                                         /usr/local \
6219                                         /usr/pkg \
6220                                         /opt/sfw
6221                                 do
6222                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6223                                         then
6224                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6225
6226 echo "${as_me:-configure}:6226: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6227
6228                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6229                                                 break
6230                                         fi
6231                                 done
6232                         done
6233                 fi
6234         fi
6235
6236         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6237
6238 echo "${as_me:-configure}:6238: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6239
6240 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6241
6242 echo "${as_me:-configure}:6242: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6243
6244 cf_rpath_dst=
6245 for cf_rpath_src in $LDFLAGS
6246 do
6247         case $cf_rpath_src in #(vi
6248         -L*) #(vi
6249
6250                 # check if this refers to a directory which we will ignore
6251                 cf_rpath_skip=no
6252                 if test -n "$cf_rpath_list"
6253                 then
6254                         for cf_rpath_item in $cf_rpath_list
6255                         do
6256                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6257                                 then
6258                                         cf_rpath_skip=yes
6259                                         break
6260                                 fi
6261                         done
6262                 fi
6263
6264                 if test "$cf_rpath_skip" = no
6265                 then
6266                         # transform the option
6267                         if test "$LD_RPATH_OPT" = "-R " ; then
6268                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6269                         else
6270                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6271                         fi
6272
6273                         # if we have not already added this, add it now
6274                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6275                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6276                         then
6277                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6278
6279 echo "${as_me:-configure}:6279: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6280
6281                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6282                         fi
6283                 fi
6284                 ;;
6285         esac
6286         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6287 done
6288 LDFLAGS=$cf_rpath_dst
6289
6290 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6291
6292 echo "${as_me:-configure}:6292: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6293
6294 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6295
6296 echo "${as_me:-configure}:6296: testing ...checking LIBS $LIBS ..." 1>&5
6297
6298 cf_rpath_dst=
6299 for cf_rpath_src in $LIBS
6300 do
6301         case $cf_rpath_src in #(vi
6302         -L*) #(vi
6303
6304                 # check if this refers to a directory which we will ignore
6305                 cf_rpath_skip=no
6306                 if test -n "$cf_rpath_list"
6307                 then
6308                         for cf_rpath_item in $cf_rpath_list
6309                         do
6310                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6311                                 then
6312                                         cf_rpath_skip=yes
6313                                         break
6314                                 fi
6315                         done
6316                 fi
6317
6318                 if test "$cf_rpath_skip" = no
6319                 then
6320                         # transform the option
6321                         if test "$LD_RPATH_OPT" = "-R " ; then
6322                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6323                         else
6324                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6325                         fi
6326
6327                         # if we have not already added this, add it now
6328                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6329                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6330                         then
6331                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6332
6333 echo "${as_me:-configure}:6333: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6334
6335                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6336                         fi
6337                 fi
6338                 ;;
6339         esac
6340         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6341 done
6342 LIBS=$cf_rpath_dst
6343
6344 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6345
6346 echo "${as_me:-configure}:6346: testing ...checked LIBS $LIBS ..." 1>&5
6347
6348         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6349
6350 echo "${as_me:-configure}:6350: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6351
6352 fi
6353
6354 fi
6355
6356 fi
6357
6358 ###############################################################################
6359
6360 ###     use option --disable-overwrite to leave out the link to -lcurses
6361 echo "$as_me:6361: checking if you wish to install ncurses overwriting curses" >&5
6362 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6363
6364 # Check whether --enable-overwrite or --disable-overwrite was given.
6365 if test "${enable_overwrite+set}" = set; then
6366   enableval="$enable_overwrite"
6367   with_overwrite=$enableval
6368 else
6369   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6370 fi;
6371 echo "$as_me:6371: result: $with_overwrite" >&5
6372 echo "${ECHO_T}$with_overwrite" >&6
6373
6374 echo "$as_me:6374: checking if external terminfo-database is used" >&5
6375 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6376
6377 # Check whether --enable-database or --disable-database was given.
6378 if test "${enable_database+set}" = set; then
6379   enableval="$enable_database"
6380   use_database=$enableval
6381 else
6382   use_database=yes
6383 fi;
6384 echo "$as_me:6384: result: $use_database" >&5
6385 echo "${ECHO_T}$use_database" >&6
6386
6387 case $host_os in #(vi
6388 os2*) #(vi
6389         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6390         ;;
6391 *) #(vi
6392         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6393         ;;
6394 esac
6395
6396 if test "$use_database" != no ; then
6397         cat >>confdefs.h <<\EOF
6398 #define USE_DATABASE 1
6399 EOF
6400
6401         echo "$as_me:6401: checking which terminfo source-file will be installed" >&5
6402 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6403
6404 # Check whether --with-database or --without-database was given.
6405 if test "${with_database+set}" = set; then
6406   withval="$with_database"
6407   TERMINFO_SRC=$withval
6408 fi;
6409         echo "$as_me:6409: result: $TERMINFO_SRC" >&5
6410 echo "${ECHO_T}$TERMINFO_SRC" >&6
6411
6412         echo "$as_me:6412: checking whether to use hashed database instead of directory/tree" >&5
6413 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6414
6415 # Check whether --with-hashed-db or --without-hashed-db was given.
6416 if test "${with_hashed_db+set}" = set; then
6417   withval="$with_hashed_db"
6418
6419 else
6420   with_hashed_db=no
6421 fi;
6422         echo "$as_me:6422: result: $with_hashed_db" >&5
6423 echo "${ECHO_T}$with_hashed_db" >&6
6424 else
6425         with_hashed_db=no
6426 fi
6427
6428 echo "$as_me:6428: checking for list of fallback descriptions" >&5
6429 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6430
6431 # Check whether --with-fallbacks or --without-fallbacks was given.
6432 if test "${with_fallbacks+set}" = set; then
6433   withval="$with_fallbacks"
6434   with_fallback=$withval
6435 else
6436   with_fallback=
6437 fi;
6438 echo "$as_me:6438: result: $with_fallback" >&5
6439 echo "${ECHO_T}$with_fallback" >&6
6440 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6441
6442 echo "$as_me:6442: checking if you want modern xterm or antique" >&5
6443 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6444
6445 # Check whether --with-xterm-new or --without-xterm-new was given.
6446 if test "${with_xterm_new+set}" = set; then
6447   withval="$with_xterm_new"
6448   with_xterm_new=$withval
6449 else
6450   with_xterm_new=yes
6451 fi;
6452 case $with_xterm_new in
6453 no)     with_xterm_new=xterm-old;;
6454 *)      with_xterm_new=xterm-new;;
6455 esac
6456 echo "$as_me:6456: result: $with_xterm_new" >&5
6457 echo "${ECHO_T}$with_xterm_new" >&6
6458 WHICH_XTERM=$with_xterm_new
6459
6460 echo "$as_me:6460: checking if xterm backspace sends BS or DEL" >&5
6461 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6462
6463 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6464 if test "${with_xterm_kbs+set}" = set; then
6465   withval="$with_xterm_kbs"
6466   with_xterm_kbs=$withval
6467 else
6468   with_xterm_kbs=BS
6469 fi;
6470 case x$with_xterm_kbs in
6471 xyes|xno|xBS|xbs|x8)
6472         with_xterm_kbs=BS
6473         ;;
6474 xDEL|xdel|x127)
6475         with_xterm_kbs=DEL
6476         ;;
6477 *)
6478         with_xterm_kbs=$withval
6479         ;;
6480 esac
6481 echo "$as_me:6481: result: $with_xterm_kbs" >&5
6482 echo "${ECHO_T}$with_xterm_kbs" >&6
6483 XTERM_KBS=$with_xterm_kbs
6484
6485 MAKE_TERMINFO=
6486 if test "$use_database" = no ; then
6487         TERMINFO="${datadir}/terminfo"
6488         MAKE_TERMINFO="#"
6489 else
6490
6491 echo "$as_me:6491: checking for list of terminfo directories" >&5
6492 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6493
6494         case $cf_cv_system_name in
6495         os2*)   PATH_SEPARATOR=';'  ;;
6496         *)      PATH_SEPARATOR=':'  ;;
6497         esac
6498
6499 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6500 if test "${with_terminfo_dirs+set}" = set; then
6501   withval="$with_terminfo_dirs"
6502
6503 else
6504   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6505 fi;
6506 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6507 cf_dst_path=
6508 for cf_src_path in $withval
6509 do
6510
6511 if test "x$prefix" != xNONE; then
6512   cf_path_syntax="$prefix"
6513 else
6514   cf_path_syntax="$ac_default_prefix"
6515 fi
6516
6517 case ".$cf_src_path" in #(vi
6518 .\$\(*\)*|.\'*\'*) #(vi
6519   ;;
6520 ..|./*|.\\*) #(vi
6521   ;;
6522 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6523   ;;
6524 .\${*prefix}*) #(vi
6525   eval cf_src_path="$cf_src_path"
6526   case ".$cf_src_path" in #(vi
6527   .NONE/*)
6528     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6529     ;;
6530   esac
6531   ;; #(vi
6532 .no|.NONE/*)
6533   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6534   ;;
6535 *)
6536   { { echo "$as_me:6536: error: expected a pathname, not \"$cf_src_path\"" >&5
6537 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6538    { (exit 1); exit 1; }; }
6539   ;;
6540 esac
6541
6542   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6543   cf_dst_path="${cf_dst_path}${cf_src_path}"
6544 done
6545 IFS="$ac_save_ifs"
6546
6547 eval 'TERMINFO_DIRS="$cf_dst_path"'
6548
6549 echo "$as_me:6549: result: $TERMINFO_DIRS" >&5
6550 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6551 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
6552 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6553 EOF
6554
6555 echo "$as_me:6555: checking for default terminfo directory" >&5
6556 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6557
6558 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6559 if test "${with_default_terminfo_dir+set}" = set; then
6560   withval="$with_default_terminfo_dir"
6561
6562 else
6563   withval="${TERMINFO:-${datadir}/terminfo}"
6564 fi; if test -n "${datadir}/terminfo" ; then
6565
6566 if test "x$prefix" != xNONE; then
6567   cf_path_syntax="$prefix"
6568 else
6569   cf_path_syntax="$ac_default_prefix"
6570 fi
6571
6572 case ".$withval" in #(vi
6573 .\$\(*\)*|.\'*\'*) #(vi
6574   ;;
6575 ..|./*|.\\*) #(vi
6576   ;;
6577 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6578   ;;
6579 .\${*prefix}*) #(vi
6580   eval withval="$withval"
6581   case ".$withval" in #(vi
6582   .NONE/*)
6583     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6584     ;;
6585   esac
6586   ;; #(vi
6587 .no|.NONE/*)
6588   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6589   ;;
6590 *)
6591   { { echo "$as_me:6591: error: expected a pathname, not \"$withval\"" >&5
6592 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6593    { (exit 1); exit 1; }; }
6594   ;;
6595 esac
6596
6597 fi
6598 TERMINFO="$withval"
6599
6600 echo "$as_me:6600: result: $TERMINFO" >&5
6601 echo "${ECHO_T}$TERMINFO" >&6
6602 cat >>confdefs.h <<EOF
6603 #define TERMINFO "$TERMINFO"
6604 EOF
6605
6606 fi
6607
6608 ###     use option --disable-big-core to make tic run on small machines
6609 ###     We need 4Mb, check if we can allocate 50% more than that.
6610 echo "$as_me:6610: checking if big-core option selected" >&5
6611 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6612
6613 # Check whether --enable-big-core or --disable-big-core was given.
6614 if test "${enable_big_core+set}" = set; then
6615   enableval="$enable_big_core"
6616   with_big_core=$enableval
6617 else
6618   if test "$cross_compiling" = yes; then
6619   with_big_core=no
6620 else
6621   cat >conftest.$ac_ext <<_ACEOF
6622 #line 6622 "configure"
6623 #include "confdefs.h"
6624
6625 #include <stdlib.h>
6626 #include <string.h>
6627 int main() {
6628         unsigned long n = 6000000L;
6629         char *s = malloc(n);
6630         if (s != 0)
6631                 s[0] = s[n-1] = 0;
6632         ${cf_cv_main_return:-return}(s == 0);
6633 }
6634 _ACEOF
6635 rm -f conftest$ac_exeext
6636 if { (eval echo "$as_me:6636: \"$ac_link\"") >&5
6637   (eval $ac_link) 2>&5
6638   ac_status=$?
6639   echo "$as_me:6639: \$? = $ac_status" >&5
6640   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6641   { (eval echo "$as_me:6641: \"$ac_try\"") >&5
6642   (eval $ac_try) 2>&5
6643   ac_status=$?
6644   echo "$as_me:6644: \$? = $ac_status" >&5
6645   (exit $ac_status); }; }; then
6646   with_big_core=yes
6647 else
6648   echo "$as_me: program exited with status $ac_status" >&5
6649 echo "$as_me: failed program was:" >&5
6650 cat conftest.$ac_ext >&5
6651 with_big_core=no
6652 fi
6653 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6654 fi
6655 fi;
6656 echo "$as_me:6656: result: $with_big_core" >&5
6657 echo "${ECHO_T}$with_big_core" >&6
6658 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6659 #define HAVE_BIG_CORE 1
6660 EOF
6661
6662 ### ISO C only guarantees 512-char strings, we have tables which load faster
6663 ### when constructed using "big" strings.  More than the C compiler, the awk
6664 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6665 echo "$as_me:6665: checking if big-strings option selected" >&5
6666 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6667
6668 # Check whether --enable-big-strings or --disable-big-strings was given.
6669 if test "${enable_big_strings+set}" = set; then
6670   enableval="$enable_big_strings"
6671   with_big_strings=$enableval
6672 else
6673
6674         case x$AWK in #(vi
6675         x)
6676                 eval with_big_strings=no
6677                 ;;
6678         *) #(vi
6679                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6680                         | $AWK '{ printf "%d\n", length($0); }' 2>/dev/null | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
6681                         eval with_big_strings=yes
6682                 else
6683                         eval with_big_strings=no
6684                 fi
6685                 ;;
6686         esac
6687
6688 fi;
6689 echo "$as_me:6689: result: $with_big_strings" >&5
6690 echo "${ECHO_T}$with_big_strings" >&6
6691
6692 USE_BIG_STRINGS=0
6693 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6694
6695 ###     use option --enable-termcap to compile in the termcap fallback support
6696 echo "$as_me:6696: checking if you want termcap-fallback support" >&5
6697 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6698
6699 # Check whether --enable-termcap or --disable-termcap was given.
6700 if test "${enable_termcap+set}" = set; then
6701   enableval="$enable_termcap"
6702   with_termcap=$enableval
6703 else
6704   with_termcap=no
6705 fi;
6706 echo "$as_me:6706: result: $with_termcap" >&5
6707 echo "${ECHO_T}$with_termcap" >&6
6708
6709 if test "$with_termcap" != "yes" ; then
6710         if test "$use_database" = no ; then
6711                 if test -z "$with_fallback" ; then
6712                         { { echo "$as_me:6712: error: You have disabled the database w/o specifying fallbacks" >&5
6713 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6714    { (exit 1); exit 1; }; }
6715                 fi
6716         fi
6717         cat >>confdefs.h <<\EOF
6718 #define PURE_TERMINFO 1
6719 EOF
6720
6721 else
6722
6723 if test "$with_ticlib" != no ; then
6724         { { echo "$as_me:6724: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6725 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6726    { (exit 1); exit 1; }; }
6727 fi
6728
6729 cat >>confdefs.h <<\EOF
6730 #define USE_TERMCAP 1
6731 EOF
6732
6733 echo "$as_me:6733: checking for list of termcap files" >&5
6734 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6735
6736 # Check whether --with-termpath or --without-termpath was given.
6737 if test "${with_termpath+set}" = set; then
6738   withval="$with_termpath"
6739
6740 else
6741   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6742 fi;
6743 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6744 cf_dst_path=
6745 for cf_src_path in $withval
6746 do
6747
6748 if test "x$prefix" != xNONE; then
6749   cf_path_syntax="$prefix"
6750 else
6751   cf_path_syntax="$ac_default_prefix"
6752 fi
6753
6754 case ".$cf_src_path" in #(vi
6755 .\$\(*\)*|.\'*\'*) #(vi
6756   ;;
6757 ..|./*|.\\*) #(vi
6758   ;;
6759 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6760   ;;
6761 .\${*prefix}*) #(vi
6762   eval cf_src_path="$cf_src_path"
6763   case ".$cf_src_path" in #(vi
6764   .NONE/*)
6765     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6766     ;;
6767   esac
6768   ;; #(vi
6769 .no|.NONE/*)
6770   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6771   ;;
6772 *)
6773   { { echo "$as_me:6773: error: expected a pathname, not \"$cf_src_path\"" >&5
6774 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6775    { (exit 1); exit 1; }; }
6776   ;;
6777 esac
6778
6779   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6780   cf_dst_path="${cf_dst_path}${cf_src_path}"
6781 done
6782 IFS="$ac_save_ifs"
6783
6784 eval 'TERMPATH="$cf_dst_path"'
6785
6786 echo "$as_me:6786: result: $TERMPATH" >&5
6787 echo "${ECHO_T}$TERMPATH" >&6
6788 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6789 #define TERMPATH "$TERMPATH"
6790 EOF
6791
6792 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6793 echo "$as_me:6793: checking if fast termcap-loader is needed" >&5
6794 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6795
6796 # Check whether --enable-getcap or --disable-getcap was given.
6797 if test "${enable_getcap+set}" = set; then
6798   enableval="$enable_getcap"
6799   with_getcap=$enableval
6800 else
6801   with_getcap=no
6802 fi;
6803 echo "$as_me:6803: result: $with_getcap" >&5
6804 echo "${ECHO_T}$with_getcap" >&6
6805 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6806 #define USE_GETCAP 1
6807 EOF
6808
6809 echo "$as_me:6809: checking if translated termcaps will be cached in ~/.terminfo" >&5
6810 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6811
6812 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6813 if test "${enable_getcap_cache+set}" = set; then
6814   enableval="$enable_getcap_cache"
6815   with_getcap_cache=$enableval
6816 else
6817   with_getcap_cache=no
6818 fi;
6819 echo "$as_me:6819: result: $with_getcap_cache" >&5
6820 echo "${ECHO_T}$with_getcap_cache" >&6
6821 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6822 #define USE_GETCAP_CACHE 1
6823 EOF
6824
6825 fi
6826
6827 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6828 echo "$as_me:6828: checking if ~/.terminfo is wanted" >&5
6829 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6830
6831 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6832 if test "${enable_home_terminfo+set}" = set; then
6833   enableval="$enable_home_terminfo"
6834   with_home_terminfo=$enableval
6835 else
6836   with_home_terminfo=yes
6837 fi;
6838 echo "$as_me:6838: result: $with_home_terminfo" >&5
6839 echo "${ECHO_T}$with_home_terminfo" >&6
6840 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6841 #define USE_HOME_TERMINFO 1
6842 EOF
6843
6844 echo "$as_me:6844: checking if you want to use restricted environment when running as root" >&5
6845 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6846
6847 # Check whether --enable-root-environ or --disable-root-environ was given.
6848 if test "${enable_root_environ+set}" = set; then
6849   enableval="$enable_root_environ"
6850   with_root_environ=$enableval
6851 else
6852   with_root_environ=yes
6853 fi;
6854 echo "$as_me:6854: result: $with_root_environ" >&5
6855 echo "${ECHO_T}$with_root_environ" >&6
6856 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6857 #define USE_ROOT_ENVIRON 1
6858 EOF
6859
6860 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6861 ###   to reduce storage requirements for the terminfo database.
6862
6863 for ac_func in \
6864         remove \
6865         unlink
6866 do
6867 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6868 echo "$as_me:6868: checking for $ac_func" >&5
6869 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6870 if eval "test \"\${$as_ac_var+set}\" = set"; then
6871   echo $ECHO_N "(cached) $ECHO_C" >&6
6872 else
6873   cat >conftest.$ac_ext <<_ACEOF
6874 #line 6874 "configure"
6875 #include "confdefs.h"
6876 /* System header to define __stub macros and hopefully few prototypes,
6877     which can conflict with char $ac_func (); below.  */
6878 #include <assert.h>
6879 /* Override any gcc2 internal prototype to avoid an error.  */
6880 #ifdef __cplusplus
6881 extern "C"
6882 #endif
6883 /* We use char because int might match the return type of a gcc2
6884    builtin and then its argument prototype would still apply.  */
6885 char $ac_func ();
6886 char (*f) ();
6887
6888 int
6889 main ()
6890 {
6891 /* The GNU C library defines this for functions which it implements
6892     to always fail with ENOSYS.  Some functions are actually named
6893     something starting with __ and the normal name is an alias.  */
6894 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6895 choke me
6896 #else
6897 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6898 #endif
6899
6900   ;
6901   return 0;
6902 }
6903 _ACEOF
6904 rm -f conftest.$ac_objext conftest$ac_exeext
6905 if { (eval echo "$as_me:6905: \"$ac_link\"") >&5
6906   (eval $ac_link) 2>&5
6907   ac_status=$?
6908   echo "$as_me:6908: \$? = $ac_status" >&5
6909   (exit $ac_status); } &&
6910          { ac_try='test -s conftest$ac_exeext'
6911   { (eval echo "$as_me:6911: \"$ac_try\"") >&5
6912   (eval $ac_try) 2>&5
6913   ac_status=$?
6914   echo "$as_me:6914: \$? = $ac_status" >&5
6915   (exit $ac_status); }; }; then
6916   eval "$as_ac_var=yes"
6917 else
6918   echo "$as_me: failed program was:" >&5
6919 cat conftest.$ac_ext >&5
6920 eval "$as_ac_var=no"
6921 fi
6922 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6923 fi
6924 echo "$as_me:6924: result: `eval echo '${'$as_ac_var'}'`" >&5
6925 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6926 if test `eval echo '${'$as_ac_var'}'` = yes; then
6927   cat >>confdefs.h <<EOF
6928 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6929 EOF
6930
6931 fi
6932 done
6933
6934 if test "$cross_compiling" = yes ; then
6935
6936 for ac_func in \
6937                 link \
6938                 symlink
6939 do
6940 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6941 echo "$as_me:6941: checking for $ac_func" >&5
6942 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6943 if eval "test \"\${$as_ac_var+set}\" = set"; then
6944   echo $ECHO_N "(cached) $ECHO_C" >&6
6945 else
6946   cat >conftest.$ac_ext <<_ACEOF
6947 #line 6947 "configure"
6948 #include "confdefs.h"
6949 /* System header to define __stub macros and hopefully few prototypes,
6950     which can conflict with char $ac_func (); below.  */
6951 #include <assert.h>
6952 /* Override any gcc2 internal prototype to avoid an error.  */
6953 #ifdef __cplusplus
6954 extern "C"
6955 #endif
6956 /* We use char because int might match the return type of a gcc2
6957    builtin and then its argument prototype would still apply.  */
6958 char $ac_func ();
6959 char (*f) ();
6960
6961 int
6962 main ()
6963 {
6964 /* The GNU C library defines this for functions which it implements
6965     to always fail with ENOSYS.  Some functions are actually named
6966     something starting with __ and the normal name is an alias.  */
6967 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6968 choke me
6969 #else
6970 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6971 #endif
6972
6973   ;
6974   return 0;
6975 }
6976 _ACEOF
6977 rm -f conftest.$ac_objext conftest$ac_exeext
6978 if { (eval echo "$as_me:6978: \"$ac_link\"") >&5
6979   (eval $ac_link) 2>&5
6980   ac_status=$?
6981   echo "$as_me:6981: \$? = $ac_status" >&5
6982   (exit $ac_status); } &&
6983          { ac_try='test -s conftest$ac_exeext'
6984   { (eval echo "$as_me:6984: \"$ac_try\"") >&5
6985   (eval $ac_try) 2>&5
6986   ac_status=$?
6987   echo "$as_me:6987: \$? = $ac_status" >&5
6988   (exit $ac_status); }; }; then
6989   eval "$as_ac_var=yes"
6990 else
6991   echo "$as_me: failed program was:" >&5
6992 cat conftest.$ac_ext >&5
6993 eval "$as_ac_var=no"
6994 fi
6995 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6996 fi
6997 echo "$as_me:6997: result: `eval echo '${'$as_ac_var'}'`" >&5
6998 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6999 if test `eval echo '${'$as_ac_var'}'` = yes; then
7000   cat >>confdefs.h <<EOF
7001 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7002 EOF
7003
7004 fi
7005 done
7006
7007 else
7008         echo "$as_me:7008: checking if link/symlink functions work" >&5
7009 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7010 if test "${cf_cv_link_funcs+set}" = set; then
7011   echo $ECHO_N "(cached) $ECHO_C" >&6
7012 else
7013
7014                 cf_cv_link_funcs=
7015                 for cf_func in link symlink ; do
7016                         if test "$cross_compiling" = yes; then
7017
7018                         eval 'ac_cv_func_'$cf_func'=error'
7019 else
7020   cat >conftest.$ac_ext <<_ACEOF
7021 #line 7021 "configure"
7022 #include "confdefs.h"
7023
7024 #include <sys/types.h>
7025 #include <sys/stat.h>
7026 #ifdef HAVE_UNISTD_H
7027 #include <unistd.h>
7028 #endif
7029 int main()
7030 {
7031         int fail = 0;
7032         char *src = "config.log";
7033         char *dst = "conftest.chk";
7034         struct stat src_sb;
7035         struct stat dst_sb;
7036
7037         stat(src, &src_sb);
7038         fail = ($cf_func("config.log", "conftest.chk") < 0)
7039             || (stat(dst, &dst_sb) < 0)
7040             || (dst_sb.st_mtime != src_sb.st_mtime);
7041 #ifdef HAVE_UNLINK
7042         unlink(dst);
7043 #else
7044         remove(dst);
7045 #endif
7046         ${cf_cv_main_return:-return} (fail);
7047 }
7048
7049 _ACEOF
7050 rm -f conftest$ac_exeext
7051 if { (eval echo "$as_me:7051: \"$ac_link\"") >&5
7052   (eval $ac_link) 2>&5
7053   ac_status=$?
7054   echo "$as_me:7054: \$? = $ac_status" >&5
7055   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7056   { (eval echo "$as_me:7056: \"$ac_try\"") >&5
7057   (eval $ac_try) 2>&5
7058   ac_status=$?
7059   echo "$as_me:7059: \$? = $ac_status" >&5
7060   (exit $ac_status); }; }; then
7061
7062                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7063                         eval 'ac_cv_func_'$cf_func'=yes'
7064 else
7065   echo "$as_me: program exited with status $ac_status" >&5
7066 echo "$as_me: failed program was:" >&5
7067 cat conftest.$ac_ext >&5
7068
7069                         eval 'ac_cv_func_'$cf_func'=no'
7070 fi
7071 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7072 fi
7073                 done
7074                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7075
7076 fi
7077 echo "$as_me:7077: result: $cf_cv_link_funcs" >&5
7078 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7079         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
7080 #define HAVE_LINK 1
7081 EOF
7082
7083         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
7084 #define HAVE_SYMLINK 1
7085 EOF
7086
7087 fi
7088
7089 with_links=no
7090 with_symlinks=no
7091
7092 # soft links (symbolic links) are useful for some systems where hard links do
7093 # not work, or to make it simpler to copy terminfo trees around.
7094 if test "$ac_cv_func_symlink" = yes ; then
7095     echo "$as_me:7095: checking if tic should use symbolic links" >&5
7096 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7097
7098 # Check whether --enable-symlinks or --disable-symlinks was given.
7099 if test "${enable_symlinks+set}" = set; then
7100   enableval="$enable_symlinks"
7101   with_symlinks=$enableval
7102 else
7103   with_symlinks=no
7104 fi;
7105     echo "$as_me:7105: result: $with_symlinks" >&5
7106 echo "${ECHO_T}$with_symlinks" >&6
7107 fi
7108
7109 # If we have hard links and did not choose to use soft links instead, there is
7110 # no reason to make this choice optional - use the hard links.
7111 if test "$with_symlinks" = no ; then
7112     echo "$as_me:7112: checking if tic should use hard links" >&5
7113 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7114     if test "$ac_cv_func_link" = yes ; then
7115         with_links=yes
7116     else
7117         with_links=no
7118     fi
7119     echo "$as_me:7119: result: $with_links" >&5
7120 echo "${ECHO_T}$with_links" >&6
7121 fi
7122
7123 test "$with_links" = yes && cat >>confdefs.h <<\EOF
7124 #define USE_LINKS 1
7125 EOF
7126
7127 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
7128 #define USE_SYMLINKS 1
7129 EOF
7130
7131 ###   use option --enable-broken-linker to force on use of broken-linker support
7132 echo "$as_me:7132: checking if you want broken-linker support code" >&5
7133 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7134
7135 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7136 if test "${enable_broken_linker+set}" = set; then
7137   enableval="$enable_broken_linker"
7138   with_broken_linker=$enableval
7139 else
7140   with_broken_linker=${BROKEN_LINKER:-no}
7141 fi;
7142 echo "$as_me:7142: result: $with_broken_linker" >&5
7143 echo "${ECHO_T}$with_broken_linker" >&6
7144
7145 BROKEN_LINKER=0
7146 if test "$with_broken_linker" = yes ; then
7147         cat >>confdefs.h <<\EOF
7148 #define BROKEN_LINKER 1
7149 EOF
7150
7151         BROKEN_LINKER=1
7152 elif test "$DFT_LWR_MODEL" = shared ; then
7153         case $cf_cv_system_name in #(vi
7154         cygwin*)
7155                 cat >>confdefs.h <<\EOF
7156 #define BROKEN_LINKER 1
7157 EOF
7158
7159                 BROKEN_LINKER=1
7160                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7161
7162 echo "${as_me:-configure}:7162: testing cygwin linker is broken anyway ..." 1>&5
7163
7164                 ;;
7165         esac
7166 fi
7167
7168 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7169 echo "$as_me:7169: checking if tputs should process BSD-style prefix padding" >&5
7170 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7171
7172 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7173 if test "${enable_bsdpad+set}" = set; then
7174   enableval="$enable_bsdpad"
7175   with_bsdpad=$enableval
7176 else
7177   with_bsdpad=no
7178 fi;
7179 echo "$as_me:7179: result: $with_bsdpad" >&5
7180 echo "${ECHO_T}$with_bsdpad" >&6
7181 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
7182 #define BSD_TPUTS 1
7183 EOF
7184
7185 ###   use option --enable-widec to turn on use of wide-character support
7186 NCURSES_CH_T=chtype
7187 NCURSES_LIBUTF8=0
7188
7189 NEED_WCHAR_H=0
7190 NCURSES_MBSTATE_T=0
7191 NCURSES_WCHAR_T=0
7192 NCURSES_WINT_T=0
7193
7194 # Check to define _XOPEN_SOURCE "automatically"
7195
7196 cf_XOPEN_SOURCE=500
7197 cf_POSIX_C_SOURCE=199506L
7198 cf_xopen_source=
7199
7200 case $host_os in #(vi
7201 aix[4-7]*) #(vi
7202         cf_xopen_source="-D_ALL_SOURCE"
7203         ;;
7204 cygwin) #(vi
7205         cf_XOPEN_SOURCE=600
7206         ;;
7207 darwin[0-8].*) #(vi
7208         cf_xopen_source="-D_APPLE_C_SOURCE"
7209         ;;
7210 darwin*) #(vi
7211         cf_xopen_source="-D_DARWIN_C_SOURCE"
7212         cf_XOPEN_SOURCE=
7213         ;;
7214 freebsd*|dragonfly*) #(vi
7215         # 5.x headers associate
7216         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7217         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7218         cf_POSIX_C_SOURCE=200112L
7219         cf_XOPEN_SOURCE=600
7220         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7221         ;;
7222 hpux11*) #(vi
7223         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7224         ;;
7225 hpux*) #(vi
7226         cf_xopen_source="-D_HPUX_SOURCE"
7227         ;;
7228 irix[56].*) #(vi
7229         cf_xopen_source="-D_SGI_SOURCE"
7230         cf_XOPEN_SOURCE=
7231         ;;
7232 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7233
7234 echo "$as_me:7234: checking if we must define _GNU_SOURCE" >&5
7235 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7236 if test "${cf_cv_gnu_source+set}" = set; then
7237   echo $ECHO_N "(cached) $ECHO_C" >&6
7238 else
7239
7240 cat >conftest.$ac_ext <<_ACEOF
7241 #line 7241 "configure"
7242 #include "confdefs.h"
7243 #include <sys/types.h>
7244 int
7245 main ()
7246 {
7247
7248 #ifndef _XOPEN_SOURCE
7249 make an error
7250 #endif
7251   ;
7252   return 0;
7253 }
7254 _ACEOF
7255 rm -f conftest.$ac_objext
7256 if { (eval echo "$as_me:7256: \"$ac_compile\"") >&5
7257   (eval $ac_compile) 2>&5
7258   ac_status=$?
7259   echo "$as_me:7259: \$? = $ac_status" >&5
7260   (exit $ac_status); } &&
7261          { ac_try='test -s conftest.$ac_objext'
7262   { (eval echo "$as_me:7262: \"$ac_try\"") >&5
7263   (eval $ac_try) 2>&5
7264   ac_status=$?
7265   echo "$as_me:7265: \$? = $ac_status" >&5
7266   (exit $ac_status); }; }; then
7267   cf_cv_gnu_source=no
7268 else
7269   echo "$as_me: failed program was:" >&5
7270 cat conftest.$ac_ext >&5
7271 cf_save="$CPPFLAGS"
7272          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7273          cat >conftest.$ac_ext <<_ACEOF
7274 #line 7274 "configure"
7275 #include "confdefs.h"
7276 #include <sys/types.h>
7277 int
7278 main ()
7279 {
7280
7281 #ifdef _XOPEN_SOURCE
7282 make an error
7283 #endif
7284   ;
7285   return 0;
7286 }
7287 _ACEOF
7288 rm -f conftest.$ac_objext
7289 if { (eval echo "$as_me:7289: \"$ac_compile\"") >&5
7290   (eval $ac_compile) 2>&5
7291   ac_status=$?
7292   echo "$as_me:7292: \$? = $ac_status" >&5
7293   (exit $ac_status); } &&
7294          { ac_try='test -s conftest.$ac_objext'
7295   { (eval echo "$as_me:7295: \"$ac_try\"") >&5
7296   (eval $ac_try) 2>&5
7297   ac_status=$?
7298   echo "$as_me:7298: \$? = $ac_status" >&5
7299   (exit $ac_status); }; }; then
7300   cf_cv_gnu_source=no
7301 else
7302   echo "$as_me: failed program was:" >&5
7303 cat conftest.$ac_ext >&5
7304 cf_cv_gnu_source=yes
7305 fi
7306 rm -f conftest.$ac_objext conftest.$ac_ext
7307         CPPFLAGS="$cf_save"
7308
7309 fi
7310 rm -f conftest.$ac_objext conftest.$ac_ext
7311
7312 fi
7313 echo "$as_me:7313: result: $cf_cv_gnu_source" >&5
7314 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7315 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7316
7317         ;;
7318 mirbsd*) #(vi
7319         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7320         cf_XOPEN_SOURCE=
7321
7322 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7323
7324 cf_save_CFLAGS="$CFLAGS"
7325 cf_save_CPPFLAGS="$CPPFLAGS"
7326
7327 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7328         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7329                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7330
7331 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7332         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7333                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7334
7335 echo "$as_me:7335: checking if we should define _POSIX_C_SOURCE" >&5
7336 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7337 if test "${cf_cv_posix_c_source+set}" = set; then
7338   echo $ECHO_N "(cached) $ECHO_C" >&6
7339 else
7340
7341 echo "${as_me:-configure}:7341: testing if the symbol is already defined go no further ..." 1>&5
7342
7343         cat >conftest.$ac_ext <<_ACEOF
7344 #line 7344 "configure"
7345 #include "confdefs.h"
7346 #include <sys/types.h>
7347 int
7348 main ()
7349 {
7350
7351 #ifndef _POSIX_C_SOURCE
7352 make an error
7353 #endif
7354   ;
7355   return 0;
7356 }
7357 _ACEOF
7358 rm -f conftest.$ac_objext
7359 if { (eval echo "$as_me:7359: \"$ac_compile\"") >&5
7360   (eval $ac_compile) 2>&5
7361   ac_status=$?
7362   echo "$as_me:7362: \$? = $ac_status" >&5
7363   (exit $ac_status); } &&
7364          { ac_try='test -s conftest.$ac_objext'
7365   { (eval echo "$as_me:7365: \"$ac_try\"") >&5
7366   (eval $ac_try) 2>&5
7367   ac_status=$?
7368   echo "$as_me:7368: \$? = $ac_status" >&5
7369   (exit $ac_status); }; }; then
7370   cf_cv_posix_c_source=no
7371 else
7372   echo "$as_me: failed program was:" >&5
7373 cat conftest.$ac_ext >&5
7374 cf_want_posix_source=no
7375          case .$cf_POSIX_C_SOURCE in #(vi
7376          .[12]??*) #(vi
7377                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7378                 ;;
7379          .2) #(vi
7380                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7381                 cf_want_posix_source=yes
7382                 ;;
7383          .*)
7384                 cf_want_posix_source=yes
7385                 ;;
7386          esac
7387          if test "$cf_want_posix_source" = yes ; then
7388                 cat >conftest.$ac_ext <<_ACEOF
7389 #line 7389 "configure"
7390 #include "confdefs.h"
7391 #include <sys/types.h>
7392 int
7393 main ()
7394 {
7395
7396 #ifdef _POSIX_SOURCE
7397 make an error
7398 #endif
7399   ;
7400   return 0;
7401 }
7402 _ACEOF
7403 rm -f conftest.$ac_objext
7404 if { (eval echo "$as_me:7404: \"$ac_compile\"") >&5
7405   (eval $ac_compile) 2>&5
7406   ac_status=$?
7407   echo "$as_me:7407: \$? = $ac_status" >&5
7408   (exit $ac_status); } &&
7409          { ac_try='test -s conftest.$ac_objext'
7410   { (eval echo "$as_me:7410: \"$ac_try\"") >&5
7411   (eval $ac_try) 2>&5
7412   ac_status=$?
7413   echo "$as_me:7413: \$? = $ac_status" >&5
7414   (exit $ac_status); }; }; then
7415   :
7416 else
7417   echo "$as_me: failed program was:" >&5
7418 cat conftest.$ac_ext >&5
7419 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7420 fi
7421 rm -f conftest.$ac_objext conftest.$ac_ext
7422          fi
7423
7424 echo "${as_me:-configure}:7424: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7425
7426          CFLAGS="$cf_trim_CFLAGS"
7427          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7428
7429 echo "${as_me:-configure}:7429: testing if the second compile does not leave our definition intact error ..." 1>&5
7430
7431          cat >conftest.$ac_ext <<_ACEOF
7432 #line 7432 "configure"
7433 #include "confdefs.h"
7434 #include <sys/types.h>
7435 int
7436 main ()
7437 {
7438
7439 #ifndef _POSIX_C_SOURCE
7440 make an error
7441 #endif
7442   ;
7443   return 0;
7444 }
7445 _ACEOF
7446 rm -f conftest.$ac_objext
7447 if { (eval echo "$as_me:7447: \"$ac_compile\"") >&5
7448   (eval $ac_compile) 2>&5
7449   ac_status=$?
7450   echo "$as_me:7450: \$? = $ac_status" >&5
7451   (exit $ac_status); } &&
7452          { ac_try='test -s conftest.$ac_objext'
7453   { (eval echo "$as_me:7453: \"$ac_try\"") >&5
7454   (eval $ac_try) 2>&5
7455   ac_status=$?
7456   echo "$as_me:7456: \$? = $ac_status" >&5
7457   (exit $ac_status); }; }; then
7458   :
7459 else
7460   echo "$as_me: failed program was:" >&5
7461 cat conftest.$ac_ext >&5
7462 cf_cv_posix_c_source=no
7463 fi
7464 rm -f conftest.$ac_objext conftest.$ac_ext
7465          CFLAGS="$cf_save_CFLAGS"
7466          CPPFLAGS="$cf_save_CPPFLAGS"
7467
7468 fi
7469 rm -f conftest.$ac_objext conftest.$ac_ext
7470
7471 fi
7472 echo "$as_me:7472: result: $cf_cv_posix_c_source" >&5
7473 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7474
7475 if test "$cf_cv_posix_c_source" != no ; then
7476         CFLAGS="$cf_trim_CFLAGS"
7477         CPPFLAGS="$cf_trim_CPPFLAGS"
7478
7479 cf_fix_cppflags=no
7480 cf_new_cflags=
7481 cf_new_cppflags=
7482 cf_new_extra_cppflags=
7483
7484 for cf_add_cflags in $cf_cv_posix_c_source
7485 do
7486 case $cf_fix_cppflags in
7487 no)
7488         case $cf_add_cflags in #(vi
7489         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7490                 case $cf_add_cflags in
7491                 -D*)
7492                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7493
7494                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7495                                 && test -z "${cf_tst_cflags}" \
7496                                 && cf_fix_cppflags=yes
7497
7498                         if test $cf_fix_cppflags = yes ; then
7499                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7500                                 continue
7501                         elif test "${cf_tst_cflags}" = "\"'" ; then
7502                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7503                                 continue
7504                         fi
7505                         ;;
7506                 esac
7507                 case "$CPPFLAGS" in
7508                 *$cf_add_cflags) #(vi
7509                         ;;
7510                 *) #(vi
7511                         case $cf_add_cflags in #(vi
7512                         -D*)
7513                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7514
7515 CPPFLAGS=`echo "$CPPFLAGS" | \
7516         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7517                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7518
7519                                 ;;
7520                         esac
7521                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7522                         ;;
7523                 esac
7524                 ;;
7525         *)
7526                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7527                 ;;
7528         esac
7529         ;;
7530 yes)
7531         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7532
7533         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7534
7535         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7536                 && test -z "${cf_tst_cflags}" \
7537                 && cf_fix_cppflags=no
7538         ;;
7539 esac
7540 done
7541
7542 if test -n "$cf_new_cflags" ; then
7543
7544         CFLAGS="$CFLAGS $cf_new_cflags"
7545 fi
7546
7547 if test -n "$cf_new_cppflags" ; then
7548
7549         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7550 fi
7551
7552 if test -n "$cf_new_extra_cppflags" ; then
7553
7554         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7555 fi
7556
7557 fi
7558
7559         ;;
7560 netbsd*) #(vi
7561         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7562         ;;
7563 openbsd[4-9]*) #(vi
7564         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7565         cf_xopen_source="-D_BSD_SOURCE"
7566         cf_XOPEN_SOURCE=600
7567         ;;
7568 openbsd*) #(vi
7569         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7570         ;;
7571 osf[45]*) #(vi
7572         cf_xopen_source="-D_OSF_SOURCE"
7573         ;;
7574 nto-qnx*) #(vi
7575         cf_xopen_source="-D_QNX_SOURCE"
7576         ;;
7577 sco*) #(vi
7578         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7579         ;;
7580 solaris2.*) #(vi
7581         cf_xopen_source="-D__EXTENSIONS__"
7582         ;;
7583 *)
7584
7585 echo "$as_me:7585: checking if we should define _XOPEN_SOURCE" >&5
7586 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7587 if test "${cf_cv_xopen_source+set}" = set; then
7588   echo $ECHO_N "(cached) $ECHO_C" >&6
7589 else
7590
7591         cat >conftest.$ac_ext <<_ACEOF
7592 #line 7592 "configure"
7593 #include "confdefs.h"
7594
7595 #include <stdlib.h>
7596 #include <string.h>
7597 #include <sys/types.h>
7598
7599 int
7600 main ()
7601 {
7602
7603 #ifndef _XOPEN_SOURCE
7604 make an error
7605 #endif
7606   ;
7607   return 0;
7608 }
7609 _ACEOF
7610 rm -f conftest.$ac_objext
7611 if { (eval echo "$as_me:7611: \"$ac_compile\"") >&5
7612   (eval $ac_compile) 2>&5
7613   ac_status=$?
7614   echo "$as_me:7614: \$? = $ac_status" >&5
7615   (exit $ac_status); } &&
7616          { ac_try='test -s conftest.$ac_objext'
7617   { (eval echo "$as_me:7617: \"$ac_try\"") >&5
7618   (eval $ac_try) 2>&5
7619   ac_status=$?
7620   echo "$as_me:7620: \$? = $ac_status" >&5
7621   (exit $ac_status); }; }; then
7622   cf_cv_xopen_source=no
7623 else
7624   echo "$as_me: failed program was:" >&5
7625 cat conftest.$ac_ext >&5
7626 cf_save="$CPPFLAGS"
7627          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7628          cat >conftest.$ac_ext <<_ACEOF
7629 #line 7629 "configure"
7630 #include "confdefs.h"
7631
7632 #include <stdlib.h>
7633 #include <string.h>
7634 #include <sys/types.h>
7635
7636 int
7637 main ()
7638 {
7639
7640 #ifdef _XOPEN_SOURCE
7641 make an error
7642 #endif
7643   ;
7644   return 0;
7645 }
7646 _ACEOF
7647 rm -f conftest.$ac_objext
7648 if { (eval echo "$as_me:7648: \"$ac_compile\"") >&5
7649   (eval $ac_compile) 2>&5
7650   ac_status=$?
7651   echo "$as_me:7651: \$? = $ac_status" >&5
7652   (exit $ac_status); } &&
7653          { ac_try='test -s conftest.$ac_objext'
7654   { (eval echo "$as_me:7654: \"$ac_try\"") >&5
7655   (eval $ac_try) 2>&5
7656   ac_status=$?
7657   echo "$as_me:7657: \$? = $ac_status" >&5
7658   (exit $ac_status); }; }; then
7659   cf_cv_xopen_source=no
7660 else
7661   echo "$as_me: failed program was:" >&5
7662 cat conftest.$ac_ext >&5
7663 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7664 fi
7665 rm -f conftest.$ac_objext conftest.$ac_ext
7666         CPPFLAGS="$cf_save"
7667
7668 fi
7669 rm -f conftest.$ac_objext conftest.$ac_ext
7670
7671 fi
7672 echo "$as_me:7672: result: $cf_cv_xopen_source" >&5
7673 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7674
7675 if test "$cf_cv_xopen_source" != no ; then
7676
7677 CFLAGS=`echo "$CFLAGS" | \
7678         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7679                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7680
7681 CPPFLAGS=`echo "$CPPFLAGS" | \
7682         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7683                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7684
7685         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7686
7687 cf_fix_cppflags=no
7688 cf_new_cflags=
7689 cf_new_cppflags=
7690 cf_new_extra_cppflags=
7691
7692 for cf_add_cflags in $cf_temp_xopen_source
7693 do
7694 case $cf_fix_cppflags in
7695 no)
7696         case $cf_add_cflags in #(vi
7697         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7698                 case $cf_add_cflags in
7699                 -D*)
7700                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7701
7702                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7703                                 && test -z "${cf_tst_cflags}" \
7704                                 && cf_fix_cppflags=yes
7705
7706                         if test $cf_fix_cppflags = yes ; then
7707                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7708                                 continue
7709                         elif test "${cf_tst_cflags}" = "\"'" ; then
7710                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7711                                 continue
7712                         fi
7713                         ;;
7714                 esac
7715                 case "$CPPFLAGS" in
7716                 *$cf_add_cflags) #(vi
7717                         ;;
7718                 *) #(vi
7719                         case $cf_add_cflags in #(vi
7720                         -D*)
7721                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7722
7723 CPPFLAGS=`echo "$CPPFLAGS" | \
7724         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7725                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7726
7727                                 ;;
7728                         esac
7729                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7730                         ;;
7731                 esac
7732                 ;;
7733         *)
7734                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7735                 ;;
7736         esac
7737         ;;
7738 yes)
7739         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7740
7741         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7742
7743         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7744                 && test -z "${cf_tst_cflags}" \
7745                 && cf_fix_cppflags=no
7746         ;;
7747 esac
7748 done
7749
7750 if test -n "$cf_new_cflags" ; then
7751
7752         CFLAGS="$CFLAGS $cf_new_cflags"
7753 fi
7754
7755 if test -n "$cf_new_cppflags" ; then
7756
7757         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7758 fi
7759
7760 if test -n "$cf_new_extra_cppflags" ; then
7761
7762         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7763 fi
7764
7765 fi
7766
7767 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7768
7769 cf_save_CFLAGS="$CFLAGS"
7770 cf_save_CPPFLAGS="$CPPFLAGS"
7771
7772 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7773         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7774                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7775
7776 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7777         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7778                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7779
7780 echo "$as_me:7780: checking if we should define _POSIX_C_SOURCE" >&5
7781 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7782 if test "${cf_cv_posix_c_source+set}" = set; then
7783   echo $ECHO_N "(cached) $ECHO_C" >&6
7784 else
7785
7786 echo "${as_me:-configure}:7786: testing if the symbol is already defined go no further ..." 1>&5
7787
7788         cat >conftest.$ac_ext <<_ACEOF
7789 #line 7789 "configure"
7790 #include "confdefs.h"
7791 #include <sys/types.h>
7792 int
7793 main ()
7794 {
7795
7796 #ifndef _POSIX_C_SOURCE
7797 make an error
7798 #endif
7799   ;
7800   return 0;
7801 }
7802 _ACEOF
7803 rm -f conftest.$ac_objext
7804 if { (eval echo "$as_me:7804: \"$ac_compile\"") >&5
7805   (eval $ac_compile) 2>&5
7806   ac_status=$?
7807   echo "$as_me:7807: \$? = $ac_status" >&5
7808   (exit $ac_status); } &&
7809          { ac_try='test -s conftest.$ac_objext'
7810   { (eval echo "$as_me:7810: \"$ac_try\"") >&5
7811   (eval $ac_try) 2>&5
7812   ac_status=$?
7813   echo "$as_me:7813: \$? = $ac_status" >&5
7814   (exit $ac_status); }; }; then
7815   cf_cv_posix_c_source=no
7816 else
7817   echo "$as_me: failed program was:" >&5
7818 cat conftest.$ac_ext >&5
7819 cf_want_posix_source=no
7820          case .$cf_POSIX_C_SOURCE in #(vi
7821          .[12]??*) #(vi
7822                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7823                 ;;
7824          .2) #(vi
7825                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7826                 cf_want_posix_source=yes
7827                 ;;
7828          .*)
7829                 cf_want_posix_source=yes
7830                 ;;
7831          esac
7832          if test "$cf_want_posix_source" = yes ; then
7833                 cat >conftest.$ac_ext <<_ACEOF
7834 #line 7834 "configure"
7835 #include "confdefs.h"
7836 #include <sys/types.h>
7837 int
7838 main ()
7839 {
7840
7841 #ifdef _POSIX_SOURCE
7842 make an error
7843 #endif
7844   ;
7845   return 0;
7846 }
7847 _ACEOF
7848 rm -f conftest.$ac_objext
7849 if { (eval echo "$as_me:7849: \"$ac_compile\"") >&5
7850   (eval $ac_compile) 2>&5
7851   ac_status=$?
7852   echo "$as_me:7852: \$? = $ac_status" >&5
7853   (exit $ac_status); } &&
7854          { ac_try='test -s conftest.$ac_objext'
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   :
7861 else
7862   echo "$as_me: failed program was:" >&5
7863 cat conftest.$ac_ext >&5
7864 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7865 fi
7866 rm -f conftest.$ac_objext conftest.$ac_ext
7867          fi
7868
7869 echo "${as_me:-configure}:7869: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7870
7871          CFLAGS="$cf_trim_CFLAGS"
7872          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7873
7874 echo "${as_me:-configure}:7874: testing if the second compile does not leave our definition intact error ..." 1>&5
7875
7876          cat >conftest.$ac_ext <<_ACEOF
7877 #line 7877 "configure"
7878 #include "confdefs.h"
7879 #include <sys/types.h>
7880 int
7881 main ()
7882 {
7883
7884 #ifndef _POSIX_C_SOURCE
7885 make an error
7886 #endif
7887   ;
7888   return 0;
7889 }
7890 _ACEOF
7891 rm -f conftest.$ac_objext
7892 if { (eval echo "$as_me:7892: \"$ac_compile\"") >&5
7893   (eval $ac_compile) 2>&5
7894   ac_status=$?
7895   echo "$as_me:7895: \$? = $ac_status" >&5
7896   (exit $ac_status); } &&
7897          { ac_try='test -s conftest.$ac_objext'
7898   { (eval echo "$as_me:7898: \"$ac_try\"") >&5
7899   (eval $ac_try) 2>&5
7900   ac_status=$?
7901   echo "$as_me:7901: \$? = $ac_status" >&5
7902   (exit $ac_status); }; }; then
7903   :
7904 else
7905   echo "$as_me: failed program was:" >&5
7906 cat conftest.$ac_ext >&5
7907 cf_cv_posix_c_source=no
7908 fi
7909 rm -f conftest.$ac_objext conftest.$ac_ext
7910          CFLAGS="$cf_save_CFLAGS"
7911          CPPFLAGS="$cf_save_CPPFLAGS"
7912
7913 fi
7914 rm -f conftest.$ac_objext conftest.$ac_ext
7915
7916 fi
7917 echo "$as_me:7917: result: $cf_cv_posix_c_source" >&5
7918 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7919
7920 if test "$cf_cv_posix_c_source" != no ; then
7921         CFLAGS="$cf_trim_CFLAGS"
7922         CPPFLAGS="$cf_trim_CPPFLAGS"
7923
7924 cf_fix_cppflags=no
7925 cf_new_cflags=
7926 cf_new_cppflags=
7927 cf_new_extra_cppflags=
7928
7929 for cf_add_cflags in $cf_cv_posix_c_source
7930 do
7931 case $cf_fix_cppflags in
7932 no)
7933         case $cf_add_cflags in #(vi
7934         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7935                 case $cf_add_cflags in
7936                 -D*)
7937                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7938
7939                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7940                                 && test -z "${cf_tst_cflags}" \
7941                                 && cf_fix_cppflags=yes
7942
7943                         if test $cf_fix_cppflags = yes ; then
7944                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7945                                 continue
7946                         elif test "${cf_tst_cflags}" = "\"'" ; then
7947                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7948                                 continue
7949                         fi
7950                         ;;
7951                 esac
7952                 case "$CPPFLAGS" in
7953                 *$cf_add_cflags) #(vi
7954                         ;;
7955                 *) #(vi
7956                         case $cf_add_cflags in #(vi
7957                         -D*)
7958                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7959
7960 CPPFLAGS=`echo "$CPPFLAGS" | \
7961         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7962                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7963
7964                                 ;;
7965                         esac
7966                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7967                         ;;
7968                 esac
7969                 ;;
7970         *)
7971                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7972                 ;;
7973         esac
7974         ;;
7975 yes)
7976         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7977
7978         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7979
7980         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7981                 && test -z "${cf_tst_cflags}" \
7982                 && cf_fix_cppflags=no
7983         ;;
7984 esac
7985 done
7986
7987 if test -n "$cf_new_cflags" ; then
7988
7989         CFLAGS="$CFLAGS $cf_new_cflags"
7990 fi
7991
7992 if test -n "$cf_new_cppflags" ; then
7993
7994         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7995 fi
7996
7997 if test -n "$cf_new_extra_cppflags" ; then
7998
7999         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8000 fi
8001
8002 fi
8003
8004         ;;
8005 esac
8006
8007 if test -n "$cf_xopen_source" ; then
8008
8009 cf_fix_cppflags=no
8010 cf_new_cflags=
8011 cf_new_cppflags=
8012 cf_new_extra_cppflags=
8013
8014 for cf_add_cflags in $cf_xopen_source
8015 do
8016 case $cf_fix_cppflags in
8017 no)
8018         case $cf_add_cflags in #(vi
8019         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8020                 case $cf_add_cflags in
8021                 -D*)
8022                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8023
8024                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8025                                 && test -z "${cf_tst_cflags}" \
8026                                 && cf_fix_cppflags=yes
8027
8028                         if test $cf_fix_cppflags = yes ; then
8029                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8030                                 continue
8031                         elif test "${cf_tst_cflags}" = "\"'" ; then
8032                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8033                                 continue
8034                         fi
8035                         ;;
8036                 esac
8037                 case "$CPPFLAGS" in
8038                 *$cf_add_cflags) #(vi
8039                         ;;
8040                 *) #(vi
8041                         case $cf_add_cflags in #(vi
8042                         -D*)
8043                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8044
8045 CPPFLAGS=`echo "$CPPFLAGS" | \
8046         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8047                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8048
8049                                 ;;
8050                         esac
8051                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8052                         ;;
8053                 esac
8054                 ;;
8055         *)
8056                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8057                 ;;
8058         esac
8059         ;;
8060 yes)
8061         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8062
8063         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8064
8065         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8066                 && test -z "${cf_tst_cflags}" \
8067                 && cf_fix_cppflags=no
8068         ;;
8069 esac
8070 done
8071
8072 if test -n "$cf_new_cflags" ; then
8073
8074         CFLAGS="$CFLAGS $cf_new_cflags"
8075 fi
8076
8077 if test -n "$cf_new_cppflags" ; then
8078
8079         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8080 fi
8081
8082 if test -n "$cf_new_extra_cppflags" ; then
8083
8084         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8085 fi
8086
8087 fi
8088
8089 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8090         echo "$as_me:8090: checking if _XOPEN_SOURCE really is set" >&5
8091 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8092         cat >conftest.$ac_ext <<_ACEOF
8093 #line 8093 "configure"
8094 #include "confdefs.h"
8095 #include <stdlib.h>
8096 int
8097 main ()
8098 {
8099
8100 #ifndef _XOPEN_SOURCE
8101 make an error
8102 #endif
8103   ;
8104   return 0;
8105 }
8106 _ACEOF
8107 rm -f conftest.$ac_objext
8108 if { (eval echo "$as_me:8108: \"$ac_compile\"") >&5
8109   (eval $ac_compile) 2>&5
8110   ac_status=$?
8111   echo "$as_me:8111: \$? = $ac_status" >&5
8112   (exit $ac_status); } &&
8113          { ac_try='test -s conftest.$ac_objext'
8114   { (eval echo "$as_me:8114: \"$ac_try\"") >&5
8115   (eval $ac_try) 2>&5
8116   ac_status=$?
8117   echo "$as_me:8117: \$? = $ac_status" >&5
8118   (exit $ac_status); }; }; then
8119   cf_XOPEN_SOURCE_set=yes
8120 else
8121   echo "$as_me: failed program was:" >&5
8122 cat conftest.$ac_ext >&5
8123 cf_XOPEN_SOURCE_set=no
8124 fi
8125 rm -f conftest.$ac_objext conftest.$ac_ext
8126         echo "$as_me:8126: result: $cf_XOPEN_SOURCE_set" >&5
8127 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8128         if test $cf_XOPEN_SOURCE_set = yes
8129         then
8130                 cat >conftest.$ac_ext <<_ACEOF
8131 #line 8131 "configure"
8132 #include "confdefs.h"
8133 #include <stdlib.h>
8134 int
8135 main ()
8136 {
8137
8138 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8139 make an error
8140 #endif
8141   ;
8142   return 0;
8143 }
8144 _ACEOF
8145 rm -f conftest.$ac_objext
8146 if { (eval echo "$as_me:8146: \"$ac_compile\"") >&5
8147   (eval $ac_compile) 2>&5
8148   ac_status=$?
8149   echo "$as_me:8149: \$? = $ac_status" >&5
8150   (exit $ac_status); } &&
8151          { ac_try='test -s conftest.$ac_objext'
8152   { (eval echo "$as_me:8152: \"$ac_try\"") >&5
8153   (eval $ac_try) 2>&5
8154   ac_status=$?
8155   echo "$as_me:8155: \$? = $ac_status" >&5
8156   (exit $ac_status); }; }; then
8157   cf_XOPEN_SOURCE_set_ok=yes
8158 else
8159   echo "$as_me: failed program was:" >&5
8160 cat conftest.$ac_ext >&5
8161 cf_XOPEN_SOURCE_set_ok=no
8162 fi
8163 rm -f conftest.$ac_objext conftest.$ac_ext
8164                 if test $cf_XOPEN_SOURCE_set_ok = no
8165                 then
8166                         { echo "$as_me:8166: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8167 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8168                 fi
8169         else
8170
8171 echo "$as_me:8171: checking if we should define _XOPEN_SOURCE" >&5
8172 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8173 if test "${cf_cv_xopen_source+set}" = set; then
8174   echo $ECHO_N "(cached) $ECHO_C" >&6
8175 else
8176
8177         cat >conftest.$ac_ext <<_ACEOF
8178 #line 8178 "configure"
8179 #include "confdefs.h"
8180
8181 #include <stdlib.h>
8182 #include <string.h>
8183 #include <sys/types.h>
8184
8185 int
8186 main ()
8187 {
8188
8189 #ifndef _XOPEN_SOURCE
8190 make an error
8191 #endif
8192   ;
8193   return 0;
8194 }
8195 _ACEOF
8196 rm -f conftest.$ac_objext
8197 if { (eval echo "$as_me:8197: \"$ac_compile\"") >&5
8198   (eval $ac_compile) 2>&5
8199   ac_status=$?
8200   echo "$as_me:8200: \$? = $ac_status" >&5
8201   (exit $ac_status); } &&
8202          { ac_try='test -s conftest.$ac_objext'
8203   { (eval echo "$as_me:8203: \"$ac_try\"") >&5
8204   (eval $ac_try) 2>&5
8205   ac_status=$?
8206   echo "$as_me:8206: \$? = $ac_status" >&5
8207   (exit $ac_status); }; }; then
8208   cf_cv_xopen_source=no
8209 else
8210   echo "$as_me: failed program was:" >&5
8211 cat conftest.$ac_ext >&5
8212 cf_save="$CPPFLAGS"
8213          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8214          cat >conftest.$ac_ext <<_ACEOF
8215 #line 8215 "configure"
8216 #include "confdefs.h"
8217
8218 #include <stdlib.h>
8219 #include <string.h>
8220 #include <sys/types.h>
8221
8222 int
8223 main ()
8224 {
8225
8226 #ifdef _XOPEN_SOURCE
8227 make an error
8228 #endif
8229   ;
8230   return 0;
8231 }
8232 _ACEOF
8233 rm -f conftest.$ac_objext
8234 if { (eval echo "$as_me:8234: \"$ac_compile\"") >&5
8235   (eval $ac_compile) 2>&5
8236   ac_status=$?
8237   echo "$as_me:8237: \$? = $ac_status" >&5
8238   (exit $ac_status); } &&
8239          { ac_try='test -s conftest.$ac_objext'
8240   { (eval echo "$as_me:8240: \"$ac_try\"") >&5
8241   (eval $ac_try) 2>&5
8242   ac_status=$?
8243   echo "$as_me:8243: \$? = $ac_status" >&5
8244   (exit $ac_status); }; }; then
8245   cf_cv_xopen_source=no
8246 else
8247   echo "$as_me: failed program was:" >&5
8248 cat conftest.$ac_ext >&5
8249 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8250 fi
8251 rm -f conftest.$ac_objext conftest.$ac_ext
8252         CPPFLAGS="$cf_save"
8253
8254 fi
8255 rm -f conftest.$ac_objext conftest.$ac_ext
8256
8257 fi
8258 echo "$as_me:8258: result: $cf_cv_xopen_source" >&5
8259 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8260
8261 if test "$cf_cv_xopen_source" != no ; then
8262
8263 CFLAGS=`echo "$CFLAGS" | \
8264         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8265                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8266
8267 CPPFLAGS=`echo "$CPPFLAGS" | \
8268         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8269                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8270
8271         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8272
8273 cf_fix_cppflags=no
8274 cf_new_cflags=
8275 cf_new_cppflags=
8276 cf_new_extra_cppflags=
8277
8278 for cf_add_cflags in $cf_temp_xopen_source
8279 do
8280 case $cf_fix_cppflags in
8281 no)
8282         case $cf_add_cflags in #(vi
8283         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8284                 case $cf_add_cflags in
8285                 -D*)
8286                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8287
8288                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8289                                 && test -z "${cf_tst_cflags}" \
8290                                 && cf_fix_cppflags=yes
8291
8292                         if test $cf_fix_cppflags = yes ; then
8293                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8294                                 continue
8295                         elif test "${cf_tst_cflags}" = "\"'" ; then
8296                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8297                                 continue
8298                         fi
8299                         ;;
8300                 esac
8301                 case "$CPPFLAGS" in
8302                 *$cf_add_cflags) #(vi
8303                         ;;
8304                 *) #(vi
8305                         case $cf_add_cflags in #(vi
8306                         -D*)
8307                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8308
8309 CPPFLAGS=`echo "$CPPFLAGS" | \
8310         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8311                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8312
8313                                 ;;
8314                         esac
8315                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8316                         ;;
8317                 esac
8318                 ;;
8319         *)
8320                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8321                 ;;
8322         esac
8323         ;;
8324 yes)
8325         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8326
8327         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8328
8329         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8330                 && test -z "${cf_tst_cflags}" \
8331                 && cf_fix_cppflags=no
8332         ;;
8333 esac
8334 done
8335
8336 if test -n "$cf_new_cflags" ; then
8337
8338         CFLAGS="$CFLAGS $cf_new_cflags"
8339 fi
8340
8341 if test -n "$cf_new_cppflags" ; then
8342
8343         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8344 fi
8345
8346 if test -n "$cf_new_extra_cppflags" ; then
8347
8348         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8349 fi
8350
8351 fi
8352
8353         fi
8354 fi
8355
8356 # Work around breakage on OS X
8357
8358 echo "$as_me:8358: checking if SIGWINCH is defined" >&5
8359 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8360 if test "${cf_cv_define_sigwinch+set}" = set; then
8361   echo $ECHO_N "(cached) $ECHO_C" >&6
8362 else
8363
8364         cat >conftest.$ac_ext <<_ACEOF
8365 #line 8365 "configure"
8366 #include "confdefs.h"
8367
8368 #include <sys/types.h>
8369 #include <sys/signal.h>
8370
8371 int
8372 main ()
8373 {
8374 int x = SIGWINCH
8375   ;
8376   return 0;
8377 }
8378 _ACEOF
8379 rm -f conftest.$ac_objext
8380 if { (eval echo "$as_me:8380: \"$ac_compile\"") >&5
8381   (eval $ac_compile) 2>&5
8382   ac_status=$?
8383   echo "$as_me:8383: \$? = $ac_status" >&5
8384   (exit $ac_status); } &&
8385          { ac_try='test -s conftest.$ac_objext'
8386   { (eval echo "$as_me:8386: \"$ac_try\"") >&5
8387   (eval $ac_try) 2>&5
8388   ac_status=$?
8389   echo "$as_me:8389: \$? = $ac_status" >&5
8390   (exit $ac_status); }; }; then
8391   cf_cv_define_sigwinch=yes
8392 else
8393   echo "$as_me: failed program was:" >&5
8394 cat conftest.$ac_ext >&5
8395 cat >conftest.$ac_ext <<_ACEOF
8396 #line 8396 "configure"
8397 #include "confdefs.h"
8398
8399 #undef _XOPEN_SOURCE
8400 #undef _POSIX_SOURCE
8401 #undef _POSIX_C_SOURCE
8402 #include <sys/types.h>
8403 #include <sys/signal.h>
8404
8405 int
8406 main ()
8407 {
8408 int x = SIGWINCH
8409   ;
8410   return 0;
8411 }
8412 _ACEOF
8413 rm -f conftest.$ac_objext
8414 if { (eval echo "$as_me:8414: \"$ac_compile\"") >&5
8415   (eval $ac_compile) 2>&5
8416   ac_status=$?
8417   echo "$as_me:8417: \$? = $ac_status" >&5
8418   (exit $ac_status); } &&
8419          { ac_try='test -s conftest.$ac_objext'
8420   { (eval echo "$as_me:8420: \"$ac_try\"") >&5
8421   (eval $ac_try) 2>&5
8422   ac_status=$?
8423   echo "$as_me:8423: \$? = $ac_status" >&5
8424   (exit $ac_status); }; }; then
8425   cf_cv_define_sigwinch=maybe
8426 else
8427   echo "$as_me: failed program was:" >&5
8428 cat conftest.$ac_ext >&5
8429 cf_cv_define_sigwinch=no
8430 fi
8431 rm -f conftest.$ac_objext conftest.$ac_ext
8432
8433 fi
8434 rm -f conftest.$ac_objext conftest.$ac_ext
8435
8436 fi
8437 echo "$as_me:8437: result: $cf_cv_define_sigwinch" >&5
8438 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8439
8440 if test "$cf_cv_define_sigwinch" = maybe ; then
8441 echo "$as_me:8441: checking for actual SIGWINCH definition" >&5
8442 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8443 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8444   echo $ECHO_N "(cached) $ECHO_C" >&6
8445 else
8446
8447 cf_cv_fixup_sigwinch=unknown
8448 cf_sigwinch=32
8449 while test $cf_sigwinch != 1
8450 do
8451         cat >conftest.$ac_ext <<_ACEOF
8452 #line 8452 "configure"
8453 #include "confdefs.h"
8454
8455 #undef _XOPEN_SOURCE
8456 #undef _POSIX_SOURCE
8457 #undef _POSIX_C_SOURCE
8458 #include <sys/types.h>
8459 #include <sys/signal.h>
8460
8461 int
8462 main ()
8463 {
8464
8465 #if SIGWINCH != $cf_sigwinch
8466 make an error
8467 #endif
8468 int x = SIGWINCH
8469   ;
8470   return 0;
8471 }
8472 _ACEOF
8473 rm -f conftest.$ac_objext
8474 if { (eval echo "$as_me:8474: \"$ac_compile\"") >&5
8475   (eval $ac_compile) 2>&5
8476   ac_status=$?
8477   echo "$as_me:8477: \$? = $ac_status" >&5
8478   (exit $ac_status); } &&
8479          { ac_try='test -s conftest.$ac_objext'
8480   { (eval echo "$as_me:8480: \"$ac_try\"") >&5
8481   (eval $ac_try) 2>&5
8482   ac_status=$?
8483   echo "$as_me:8483: \$? = $ac_status" >&5
8484   (exit $ac_status); }; }; then
8485   cf_cv_fixup_sigwinch=$cf_sigwinch
8486          break
8487 else
8488   echo "$as_me: failed program was:" >&5
8489 cat conftest.$ac_ext >&5
8490 fi
8491 rm -f conftest.$ac_objext conftest.$ac_ext
8492
8493 cf_sigwinch=`expr $cf_sigwinch - 1`
8494 done
8495
8496 fi
8497 echo "$as_me:8497: result: $cf_cv_fixup_sigwinch" >&5
8498 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8499
8500         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8501                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8502         fi
8503 fi
8504
8505 # Checks for CODESET support.
8506
8507   echo "$as_me:8507: checking for nl_langinfo and CODESET" >&5
8508 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8509 if test "${am_cv_langinfo_codeset+set}" = set; then
8510   echo $ECHO_N "(cached) $ECHO_C" >&6
8511 else
8512   cat >conftest.$ac_ext <<_ACEOF
8513 #line 8513 "configure"
8514 #include "confdefs.h"
8515 #include <langinfo.h>
8516 int
8517 main ()
8518 {
8519 char* cs = nl_langinfo(CODESET);
8520   ;
8521   return 0;
8522 }
8523 _ACEOF
8524 rm -f conftest.$ac_objext conftest$ac_exeext
8525 if { (eval echo "$as_me:8525: \"$ac_link\"") >&5
8526   (eval $ac_link) 2>&5
8527   ac_status=$?
8528   echo "$as_me:8528: \$? = $ac_status" >&5
8529   (exit $ac_status); } &&
8530          { ac_try='test -s conftest$ac_exeext'
8531   { (eval echo "$as_me:8531: \"$ac_try\"") >&5
8532   (eval $ac_try) 2>&5
8533   ac_status=$?
8534   echo "$as_me:8534: \$? = $ac_status" >&5
8535   (exit $ac_status); }; }; then
8536   am_cv_langinfo_codeset=yes
8537 else
8538   echo "$as_me: failed program was:" >&5
8539 cat conftest.$ac_ext >&5
8540 am_cv_langinfo_codeset=no
8541 fi
8542 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8543
8544 fi
8545 echo "$as_me:8545: result: $am_cv_langinfo_codeset" >&5
8546 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8547   if test $am_cv_langinfo_codeset = yes; then
8548
8549 cat >>confdefs.h <<\EOF
8550 #define HAVE_LANGINFO_CODESET 1
8551 EOF
8552
8553   fi
8554
8555 # use these variables to work around a defect in gcc's fixincludes.
8556 NCURSES_OK_WCHAR_T=
8557 NCURSES_OK_WINT_T=
8558
8559 echo "$as_me:8559: checking if you want wide-character code" >&5
8560 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8561
8562 # Check whether --enable-widec or --disable-widec was given.
8563 if test "${enable_widec+set}" = set; then
8564   enableval="$enable_widec"
8565   with_widec=$enableval
8566 else
8567   with_widec=no
8568 fi;
8569 echo "$as_me:8569: result: $with_widec" >&5
8570 echo "${ECHO_T}$with_widec" >&6
8571 if test "$with_widec" = yes ; then
8572         LIB_SUFFIX="w${LIB_SUFFIX}"
8573         cat >>confdefs.h <<\EOF
8574 #define USE_WIDEC_SUPPORT 1
8575 EOF
8576
8577         cat >>confdefs.h <<\EOF
8578 #define NCURSES_WIDECHAR 1
8579 EOF
8580
8581 echo "$as_me:8581: checking if wchar.h can be used as is" >&5
8582 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8583 if test "${cf_cv_wchar_h_okay+set}" = set; then
8584   echo $ECHO_N "(cached) $ECHO_C" >&6
8585 else
8586
8587 cat >conftest.$ac_ext <<_ACEOF
8588 #line 8588 "configure"
8589 #include "confdefs.h"
8590
8591 #include <stdlib.h>
8592 #include <wchar.h>
8593
8594 int
8595 main ()
8596 {
8597
8598         wint_t foo = 0;
8599         int bar = iswpunct(foo)
8600   ;
8601   return 0;
8602 }
8603 _ACEOF
8604 rm -f conftest.$ac_objext
8605 if { (eval echo "$as_me:8605: \"$ac_compile\"") >&5
8606   (eval $ac_compile) 2>&5
8607   ac_status=$?
8608   echo "$as_me:8608: \$? = $ac_status" >&5
8609   (exit $ac_status); } &&
8610          { ac_try='test -s conftest.$ac_objext'
8611   { (eval echo "$as_me:8611: \"$ac_try\"") >&5
8612   (eval $ac_try) 2>&5
8613   ac_status=$?
8614   echo "$as_me:8614: \$? = $ac_status" >&5
8615   (exit $ac_status); }; }; then
8616   cf_cv_wchar_h_okay=yes
8617 else
8618   echo "$as_me: failed program was:" >&5
8619 cat conftest.$ac_ext >&5
8620 cf_cv_wchar_h_okay=no
8621 fi
8622 rm -f conftest.$ac_objext conftest.$ac_ext
8623 fi
8624 echo "$as_me:8624: result: $cf_cv_wchar_h_okay" >&5
8625 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8626
8627 if test $cf_cv_wchar_h_okay = no
8628 then
8629
8630 echo "$as_me:8630: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8631 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8632 cat >conftest.$ac_ext <<_ACEOF
8633 #line 8633 "configure"
8634 #include "confdefs.h"
8635 #include <sys/types.h>
8636
8637 int
8638 main ()
8639 {
8640
8641 #ifndef _XOPEN_SOURCE_EXTENDED
8642 make an error
8643 #endif
8644   ;
8645   return 0;
8646 }
8647 _ACEOF
8648 rm -f conftest.$ac_objext
8649 if { (eval echo "$as_me:8649: \"$ac_compile\"") >&5
8650   (eval $ac_compile) 2>&5
8651   ac_status=$?
8652   echo "$as_me:8652: \$? = $ac_status" >&5
8653   (exit $ac_status); } &&
8654          { ac_try='test -s conftest.$ac_objext'
8655   { (eval echo "$as_me:8655: \"$ac_try\"") >&5
8656   (eval $ac_try) 2>&5
8657   ac_status=$?
8658   echo "$as_me:8658: \$? = $ac_status" >&5
8659   (exit $ac_status); }; }; then
8660   cf_result=no
8661 else
8662   echo "$as_me: failed program was:" >&5
8663 cat conftest.$ac_ext >&5
8664 cf_result=yes
8665 fi
8666 rm -f conftest.$ac_objext conftest.$ac_ext
8667 echo "$as_me:8667: result: $cf_result" >&5
8668 echo "${ECHO_T}$cf_result" >&6
8669
8670 if test "$cf_result" = yes ; then
8671         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8672 elif test "x" != "x" ; then
8673         echo "$as_me:8673: checking checking for compatible value versus " >&5
8674 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8675         cat >conftest.$ac_ext <<_ACEOF
8676 #line 8676 "configure"
8677 #include "confdefs.h"
8678 #include <sys/types.h>
8679
8680 int
8681 main ()
8682 {
8683
8684 #if _XOPEN_SOURCE_EXTENDED- < 0
8685 make an error
8686 #endif
8687   ;
8688   return 0;
8689 }
8690 _ACEOF
8691 rm -f conftest.$ac_objext
8692 if { (eval echo "$as_me:8692: \"$ac_compile\"") >&5
8693   (eval $ac_compile) 2>&5
8694   ac_status=$?
8695   echo "$as_me:8695: \$? = $ac_status" >&5
8696   (exit $ac_status); } &&
8697          { ac_try='test -s conftest.$ac_objext'
8698   { (eval echo "$as_me:8698: \"$ac_try\"") >&5
8699   (eval $ac_try) 2>&5
8700   ac_status=$?
8701   echo "$as_me:8701: \$? = $ac_status" >&5
8702   (exit $ac_status); }; }; then
8703   cf_result=yes
8704 else
8705   echo "$as_me: failed program was:" >&5
8706 cat conftest.$ac_ext >&5
8707 cf_result=no
8708 fi
8709 rm -f conftest.$ac_objext conftest.$ac_ext
8710         echo "$as_me:8710: result: $cf_result" >&5
8711 echo "${ECHO_T}$cf_result" >&6
8712         if test "$cf_result" = no ; then
8713                 # perhaps we can override it - try...
8714                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8715         fi
8716 fi
8717
8718 fi
8719
8720         # with_overwrite=no
8721         NCURSES_CH_T=cchar_t
8722
8723 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8724 do
8725 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8726 echo "$as_me:8726: checking for $ac_func" >&5
8727 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8728 if eval "test \"\${$as_ac_var+set}\" = set"; then
8729   echo $ECHO_N "(cached) $ECHO_C" >&6
8730 else
8731   cat >conftest.$ac_ext <<_ACEOF
8732 #line 8732 "configure"
8733 #include "confdefs.h"
8734 /* System header to define __stub macros and hopefully few prototypes,
8735     which can conflict with char $ac_func (); below.  */
8736 #include <assert.h>
8737 /* Override any gcc2 internal prototype to avoid an error.  */
8738 #ifdef __cplusplus
8739 extern "C"
8740 #endif
8741 /* We use char because int might match the return type of a gcc2
8742    builtin and then its argument prototype would still apply.  */
8743 char $ac_func ();
8744 char (*f) ();
8745
8746 int
8747 main ()
8748 {
8749 /* The GNU C library defines this for functions which it implements
8750     to always fail with ENOSYS.  Some functions are actually named
8751     something starting with __ and the normal name is an alias.  */
8752 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8753 choke me
8754 #else
8755 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8756 #endif
8757
8758   ;
8759   return 0;
8760 }
8761 _ACEOF
8762 rm -f conftest.$ac_objext conftest$ac_exeext
8763 if { (eval echo "$as_me:8763: \"$ac_link\"") >&5
8764   (eval $ac_link) 2>&5
8765   ac_status=$?
8766   echo "$as_me:8766: \$? = $ac_status" >&5
8767   (exit $ac_status); } &&
8768          { ac_try='test -s conftest$ac_exeext'
8769   { (eval echo "$as_me:8769: \"$ac_try\"") >&5
8770   (eval $ac_try) 2>&5
8771   ac_status=$?
8772   echo "$as_me:8772: \$? = $ac_status" >&5
8773   (exit $ac_status); }; }; then
8774   eval "$as_ac_var=yes"
8775 else
8776   echo "$as_me: failed program was:" >&5
8777 cat conftest.$ac_ext >&5
8778 eval "$as_ac_var=no"
8779 fi
8780 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8781 fi
8782 echo "$as_me:8782: result: `eval echo '${'$as_ac_var'}'`" >&5
8783 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8784 if test `eval echo '${'$as_ac_var'}'` = yes; then
8785   cat >>confdefs.h <<EOF
8786 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8787 EOF
8788
8789 fi
8790 done
8791
8792         if test "$ac_cv_func_putwc" != yes ; then
8793
8794 echo "$as_me:8794: checking for multibyte character support" >&5
8795 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8796 if test "${cf_cv_utf8_lib+set}" = set; then
8797   echo $ECHO_N "(cached) $ECHO_C" >&6
8798 else
8799
8800         cf_save_LIBS="$LIBS"
8801         cat >conftest.$ac_ext <<_ACEOF
8802 #line 8802 "configure"
8803 #include "confdefs.h"
8804
8805 #include <stdlib.h>
8806 int
8807 main ()
8808 {
8809 putwc(0,0);
8810   ;
8811   return 0;
8812 }
8813 _ACEOF
8814 rm -f conftest.$ac_objext conftest$ac_exeext
8815 if { (eval echo "$as_me:8815: \"$ac_link\"") >&5
8816   (eval $ac_link) 2>&5
8817   ac_status=$?
8818   echo "$as_me:8818: \$? = $ac_status" >&5
8819   (exit $ac_status); } &&
8820          { ac_try='test -s conftest$ac_exeext'
8821   { (eval echo "$as_me:8821: \"$ac_try\"") >&5
8822   (eval $ac_try) 2>&5
8823   ac_status=$?
8824   echo "$as_me:8824: \$? = $ac_status" >&5
8825   (exit $ac_status); }; }; then
8826   cf_cv_utf8_lib=yes
8827 else
8828   echo "$as_me: failed program was:" >&5
8829 cat conftest.$ac_ext >&5
8830
8831 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8832 # will be set on completion of the AC_TRY_LINK below.
8833 cf_cv_header_path_utf8=
8834 cf_cv_library_path_utf8=
8835
8836 echo "${as_me:-configure}:8836: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8837
8838 cf_save_LIBS="$LIBS"
8839
8840 cat >conftest.$ac_ext <<_ACEOF
8841 #line 8841 "configure"
8842 #include "confdefs.h"
8843
8844 #include <libutf8.h>
8845 int
8846 main ()
8847 {
8848 putwc(0,0);
8849   ;
8850   return 0;
8851 }
8852 _ACEOF
8853 rm -f conftest.$ac_objext conftest$ac_exeext
8854 if { (eval echo "$as_me:8854: \"$ac_link\"") >&5
8855   (eval $ac_link) 2>&5
8856   ac_status=$?
8857   echo "$as_me:8857: \$? = $ac_status" >&5
8858   (exit $ac_status); } &&
8859          { ac_try='test -s conftest$ac_exeext'
8860   { (eval echo "$as_me:8860: \"$ac_try\"") >&5
8861   (eval $ac_try) 2>&5
8862   ac_status=$?
8863   echo "$as_me:8863: \$? = $ac_status" >&5
8864   (exit $ac_status); }; }; then
8865
8866         cf_cv_find_linkage_utf8=yes
8867         cf_cv_header_path_utf8=/usr/include
8868         cf_cv_library_path_utf8=/usr/lib
8869
8870 else
8871   echo "$as_me: failed program was:" >&5
8872 cat conftest.$ac_ext >&5
8873
8874 LIBS="-lutf8  $cf_save_LIBS"
8875
8876 cat >conftest.$ac_ext <<_ACEOF
8877 #line 8877 "configure"
8878 #include "confdefs.h"
8879
8880 #include <libutf8.h>
8881 int
8882 main ()
8883 {
8884 putwc(0,0);
8885   ;
8886   return 0;
8887 }
8888 _ACEOF
8889 rm -f conftest.$ac_objext conftest$ac_exeext
8890 if { (eval echo "$as_me:8890: \"$ac_link\"") >&5
8891   (eval $ac_link) 2>&5
8892   ac_status=$?
8893   echo "$as_me:8893: \$? = $ac_status" >&5
8894   (exit $ac_status); } &&
8895          { ac_try='test -s conftest$ac_exeext'
8896   { (eval echo "$as_me:8896: \"$ac_try\"") >&5
8897   (eval $ac_try) 2>&5
8898   ac_status=$?
8899   echo "$as_me:8899: \$? = $ac_status" >&5
8900   (exit $ac_status); }; }; then
8901
8902         cf_cv_find_linkage_utf8=yes
8903         cf_cv_header_path_utf8=/usr/include
8904         cf_cv_library_path_utf8=/usr/lib
8905         cf_cv_library_file_utf8="-lutf8"
8906
8907 else
8908   echo "$as_me: failed program was:" >&5
8909 cat conftest.$ac_ext >&5
8910
8911         cf_cv_find_linkage_utf8=no
8912         LIBS="$cf_save_LIBS"
8913
8914     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8915
8916 echo "${as_me:-configure}:8916: testing find linkage for utf8 library ..." 1>&5
8917
8918 echo "${as_me:-configure}:8918: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8919
8920     cf_save_CPPFLAGS="$CPPFLAGS"
8921     cf_test_CPPFLAGS="$CPPFLAGS"
8922
8923 cf_search=
8924
8925 # collect the current set of include-directories from compiler flags
8926 cf_header_path_list=""
8927 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8928         for cf_header_path in $CPPFLAGS $CFLAGS
8929         do
8930                 case $cf_header_path in #(vi
8931                 -I*)
8932                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8933
8934 test "$cf_header_path" != "NONE" && \
8935 test -d "$cf_header_path" && \
8936  {
8937         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8938         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8939         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8940         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8941         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8942         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8943 }
8944
8945                         cf_header_path_list="$cf_header_path_list $cf_search"
8946                         ;;
8947                 esac
8948         done
8949 fi
8950
8951 # add the variations for the package we are looking for
8952
8953 cf_search=
8954
8955 test "/usr" != "$prefix" && \
8956 test -d "/usr" && \
8957 (test $prefix = NONE || test "/usr" != "$prefix") && {
8958         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8959         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8960         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8961         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8962         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8963         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8964 }
8965
8966 test "$prefix" != "NONE" && \
8967 test -d "$prefix" && \
8968  {
8969         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8970         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8971         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8972         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8973         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8974         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8975 }
8976
8977 test "/usr/local" != "$prefix" && \
8978 test -d "/usr/local" && \
8979 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8980         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8981         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8982         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8983         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8984         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8985         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8986 }
8987
8988 test "/opt" != "$prefix" && \
8989 test -d "/opt" && \
8990 (test $prefix = NONE || test "/opt" != "$prefix") && {
8991         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8992         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8993         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8994         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8995         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8996         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8997 }
8998
8999 test "$HOME" != "$prefix" && \
9000 test -d "$HOME" && \
9001 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9002         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
9003         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
9004         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
9005         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
9006         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
9007         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
9008 }
9009
9010 test "$includedir" != NONE && \
9011 test "$includedir" != "/usr/include" && \
9012 test -d "$includedir" && {
9013         test -d $includedir &&    cf_search="$cf_search $includedir"
9014         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9015 }
9016
9017 test "$oldincludedir" != NONE && \
9018 test "$oldincludedir" != "/usr/include" && \
9019 test -d "$oldincludedir" && {
9020         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9021         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9022 }
9023
9024 cf_search="$cf_search $cf_header_path_list"
9025
9026     for cf_cv_header_path_utf8 in $cf_search
9027     do
9028       if test -d $cf_cv_header_path_utf8 ; then
9029         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9030
9031 echo "${as_me:-configure}:9031: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9032
9033         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9034         cat >conftest.$ac_ext <<_ACEOF
9035 #line 9035 "configure"
9036 #include "confdefs.h"
9037
9038 #include <libutf8.h>
9039 int
9040 main ()
9041 {
9042 putwc(0,0);
9043   ;
9044   return 0;
9045 }
9046 _ACEOF
9047 rm -f conftest.$ac_objext
9048 if { (eval echo "$as_me:9048: \"$ac_compile\"") >&5
9049   (eval $ac_compile) 2>&5
9050   ac_status=$?
9051   echo "$as_me:9051: \$? = $ac_status" >&5
9052   (exit $ac_status); } &&
9053          { ac_try='test -s conftest.$ac_objext'
9054   { (eval echo "$as_me:9054: \"$ac_try\"") >&5
9055   (eval $ac_try) 2>&5
9056   ac_status=$?
9057   echo "$as_me:9057: \$? = $ac_status" >&5
9058   (exit $ac_status); }; }; then
9059
9060             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9061
9062 echo "${as_me:-configure}:9062: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9063
9064             cf_cv_find_linkage_utf8=maybe
9065             cf_test_CPPFLAGS="$CPPFLAGS"
9066             break
9067 else
9068   echo "$as_me: failed program was:" >&5
9069 cat conftest.$ac_ext >&5
9070
9071             CPPFLAGS="$cf_save_CPPFLAGS"
9072
9073 fi
9074 rm -f conftest.$ac_objext conftest.$ac_ext
9075       fi
9076     done
9077
9078     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9079
9080 echo "${as_me:-configure}:9080: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9081
9082       cf_save_LIBS="$LIBS"
9083       cf_save_LDFLAGS="$LDFLAGS"
9084
9085       if test "$cf_cv_find_linkage_utf8" != yes ; then
9086
9087 cf_search=
9088 cf_library_path_list=""
9089 if test -n "${LDFLAGS}${LIBS}" ; then
9090         for cf_library_path in $LDFLAGS $LIBS
9091         do
9092                 case $cf_library_path in #(vi
9093                 -L*)
9094                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9095
9096 test "$cf_library_path" != "NONE" && \
9097 test -d "$cf_library_path" && \
9098  {
9099         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9100         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9101         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9102         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9103         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9104         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9105 }
9106
9107                         cf_library_path_list="$cf_library_path_list $cf_search"
9108                         ;;
9109                 esac
9110         done
9111 fi
9112
9113 cf_search=
9114
9115 test "/usr" != "$prefix" && \
9116 test -d "/usr" && \
9117 (test $prefix = NONE || test "/usr" != "$prefix") && {
9118         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9119         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9120         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9121         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9122         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9123         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9124 }
9125
9126 test "$prefix" != "NONE" && \
9127 test -d "$prefix" && \
9128  {
9129         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9130         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9131         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9132         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9133         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9134         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9135 }
9136
9137 test "/usr/local" != "$prefix" && \
9138 test -d "/usr/local" && \
9139 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9140         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9141         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9142         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9143         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9144         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9145         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9146 }
9147
9148 test "/opt" != "$prefix" && \
9149 test -d "/opt" && \
9150 (test $prefix = NONE || test "/opt" != "$prefix") && {
9151         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9152         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9153         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9154         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9155         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9156         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9157 }
9158
9159 test "$HOME" != "$prefix" && \
9160 test -d "$HOME" && \
9161 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9162         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9163         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9164         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9165         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9166         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9167         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9168 }
9169
9170 cf_search="$cf_library_path_list $cf_search"
9171
9172         for cf_cv_library_path_utf8 in $cf_search
9173         do
9174           if test -d $cf_cv_library_path_utf8 ; then
9175             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9176
9177 echo "${as_me:-configure}:9177: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9178
9179             CPPFLAGS="$cf_test_CPPFLAGS"
9180             LIBS="-lutf8  $cf_save_LIBS"
9181             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9182             cat >conftest.$ac_ext <<_ACEOF
9183 #line 9183 "configure"
9184 #include "confdefs.h"
9185
9186 #include <libutf8.h>
9187 int
9188 main ()
9189 {
9190 putwc(0,0);
9191   ;
9192   return 0;
9193 }
9194 _ACEOF
9195 rm -f conftest.$ac_objext conftest$ac_exeext
9196 if { (eval echo "$as_me:9196: \"$ac_link\"") >&5
9197   (eval $ac_link) 2>&5
9198   ac_status=$?
9199   echo "$as_me:9199: \$? = $ac_status" >&5
9200   (exit $ac_status); } &&
9201          { ac_try='test -s conftest$ac_exeext'
9202   { (eval echo "$as_me:9202: \"$ac_try\"") >&5
9203   (eval $ac_try) 2>&5
9204   ac_status=$?
9205   echo "$as_me:9205: \$? = $ac_status" >&5
9206   (exit $ac_status); }; }; then
9207
9208                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9209
9210 echo "${as_me:-configure}:9210: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9211
9212                 cf_cv_find_linkage_utf8=yes
9213                 cf_cv_library_file_utf8="-lutf8"
9214                 break
9215 else
9216   echo "$as_me: failed program was:" >&5
9217 cat conftest.$ac_ext >&5
9218
9219                 CPPFLAGS="$cf_save_CPPFLAGS"
9220                 LIBS="$cf_save_LIBS"
9221                 LDFLAGS="$cf_save_LDFLAGS"
9222
9223 fi
9224 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9225           fi
9226         done
9227         CPPFLAGS="$cf_save_CPPFLAGS"
9228         LDFLAGS="$cf_save_LDFLAGS"
9229       fi
9230
9231     else
9232       cf_cv_find_linkage_utf8=no
9233     fi
9234
9235 fi
9236 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9237
9238 fi
9239 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9240
9241 LIBS="$cf_save_LIBS"
9242
9243 if test "$cf_cv_find_linkage_utf8" = yes ; then
9244 cf_cv_utf8_lib=add-on
9245 else
9246 cf_cv_utf8_lib=no
9247 fi
9248
9249 fi
9250 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9251 fi
9252 echo "$as_me:9252: result: $cf_cv_utf8_lib" >&5
9253 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9254
9255 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9256 # ncurses/ncursesw:
9257 if test "$cf_cv_utf8_lib" = "add-on" ; then
9258         cat >>confdefs.h <<\EOF
9259 #define HAVE_LIBUTF8_H 1
9260 EOF
9261
9262 if test -n "$cf_cv_header_path_utf8" ; then
9263   for cf_add_incdir in $cf_cv_header_path_utf8
9264   do
9265         while test $cf_add_incdir != /usr/include
9266         do
9267           if test -d $cf_add_incdir
9268           then
9269                 cf_have_incdir=no
9270                 if test -n "$CFLAGS$CPPFLAGS" ; then
9271                   # a loop is needed to ensure we can add subdirs of existing dirs
9272                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9273                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9274                           cf_have_incdir=yes; break
9275                         fi
9276                   done
9277                 fi
9278
9279                 if test "$cf_have_incdir" = no ; then
9280                   if test "$cf_add_incdir" = /usr/local/include ; then
9281                         if test "$GCC" = yes
9282                         then
9283                           cf_save_CPPFLAGS=$CPPFLAGS
9284                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9285                           cat >conftest.$ac_ext <<_ACEOF
9286 #line 9286 "configure"
9287 #include "confdefs.h"
9288 #include <stdio.h>
9289 int
9290 main ()
9291 {
9292 printf("Hello")
9293   ;
9294   return 0;
9295 }
9296 _ACEOF
9297 rm -f conftest.$ac_objext
9298 if { (eval echo "$as_me:9298: \"$ac_compile\"") >&5
9299   (eval $ac_compile) 2>&5
9300   ac_status=$?
9301   echo "$as_me:9301: \$? = $ac_status" >&5
9302   (exit $ac_status); } &&
9303          { ac_try='test -s conftest.$ac_objext'
9304   { (eval echo "$as_me:9304: \"$ac_try\"") >&5
9305   (eval $ac_try) 2>&5
9306   ac_status=$?
9307   echo "$as_me:9307: \$? = $ac_status" >&5
9308   (exit $ac_status); }; }; then
9309   :
9310 else
9311   echo "$as_me: failed program was:" >&5
9312 cat conftest.$ac_ext >&5
9313 cf_have_incdir=yes
9314 fi
9315 rm -f conftest.$ac_objext conftest.$ac_ext
9316                           CPPFLAGS=$cf_save_CPPFLAGS
9317                         fi
9318                   fi
9319                 fi
9320
9321                 if test "$cf_have_incdir" = no ; then
9322                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9323
9324 echo "${as_me:-configure}:9324: testing adding $cf_add_incdir to include-path ..." 1>&5
9325
9326                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9327
9328                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9329                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9330                   cf_add_incdir="$cf_top_incdir"
9331                 else
9332                   break
9333                 fi
9334           fi
9335         done
9336   done
9337 fi
9338
9339 if test -n "$cf_cv_library_path_utf8" ; then
9340   for cf_add_libdir in $cf_cv_library_path_utf8
9341   do
9342     if test $cf_add_libdir = /usr/lib ; then
9343       :
9344     elif test -d $cf_add_libdir
9345     then
9346       cf_have_libdir=no
9347       if test -n "$LDFLAGS$LIBS" ; then
9348         # a loop is needed to ensure we can add subdirs of existing dirs
9349         for cf_test_libdir in $LDFLAGS $LIBS ; do
9350           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9351             cf_have_libdir=yes; break
9352           fi
9353         done
9354       fi
9355       if test "$cf_have_libdir" = no ; then
9356         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9357
9358 echo "${as_me:-configure}:9358: testing adding $cf_add_libdir to library-path ..." 1>&5
9359
9360         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9361       fi
9362     fi
9363   done
9364 fi
9365
9366         LIBS="$cf_cv_library_file_utf8 $LIBS"
9367 fi
9368
9369                 if test "$cf_cv_utf8_lib" != no ; then
9370                         NCURSES_LIBUTF8=1
9371                 fi
9372         fi
9373
9374 # This is needed on Tru64 5.0 to declare mbstate_t
9375 echo "$as_me:9375: checking if we must include wchar.h to declare mbstate_t" >&5
9376 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9377 if test "${cf_cv_mbstate_t+set}" = set; then
9378   echo $ECHO_N "(cached) $ECHO_C" >&6
9379 else
9380
9381 cat >conftest.$ac_ext <<_ACEOF
9382 #line 9382 "configure"
9383 #include "confdefs.h"
9384
9385 #include <stdlib.h>
9386 #include <stdarg.h>
9387 #include <stdio.h>
9388 #ifdef HAVE_LIBUTF8_H
9389 #include <libutf8.h>
9390 #endif
9391 int
9392 main ()
9393 {
9394 mbstate_t state
9395   ;
9396   return 0;
9397 }
9398 _ACEOF
9399 rm -f conftest.$ac_objext
9400 if { (eval echo "$as_me:9400: \"$ac_compile\"") >&5
9401   (eval $ac_compile) 2>&5
9402   ac_status=$?
9403   echo "$as_me:9403: \$? = $ac_status" >&5
9404   (exit $ac_status); } &&
9405          { ac_try='test -s conftest.$ac_objext'
9406   { (eval echo "$as_me:9406: \"$ac_try\"") >&5
9407   (eval $ac_try) 2>&5
9408   ac_status=$?
9409   echo "$as_me:9409: \$? = $ac_status" >&5
9410   (exit $ac_status); }; }; then
9411   cf_cv_mbstate_t=no
9412 else
9413   echo "$as_me: failed program was:" >&5
9414 cat conftest.$ac_ext >&5
9415 cat >conftest.$ac_ext <<_ACEOF
9416 #line 9416 "configure"
9417 #include "confdefs.h"
9418
9419 #include <stdlib.h>
9420 #include <stdarg.h>
9421 #include <stdio.h>
9422 #include <wchar.h>
9423 #ifdef HAVE_LIBUTF8_H
9424 #include <libutf8.h>
9425 #endif
9426 int
9427 main ()
9428 {
9429 mbstate_t value
9430   ;
9431   return 0;
9432 }
9433 _ACEOF
9434 rm -f conftest.$ac_objext
9435 if { (eval echo "$as_me:9435: \"$ac_compile\"") >&5
9436   (eval $ac_compile) 2>&5
9437   ac_status=$?
9438   echo "$as_me:9438: \$? = $ac_status" >&5
9439   (exit $ac_status); } &&
9440          { ac_try='test -s conftest.$ac_objext'
9441   { (eval echo "$as_me:9441: \"$ac_try\"") >&5
9442   (eval $ac_try) 2>&5
9443   ac_status=$?
9444   echo "$as_me:9444: \$? = $ac_status" >&5
9445   (exit $ac_status); }; }; then
9446   cf_cv_mbstate_t=yes
9447 else
9448   echo "$as_me: failed program was:" >&5
9449 cat conftest.$ac_ext >&5
9450 cf_cv_mbstate_t=unknown
9451 fi
9452 rm -f conftest.$ac_objext conftest.$ac_ext
9453 fi
9454 rm -f conftest.$ac_objext conftest.$ac_ext
9455 fi
9456 echo "$as_me:9456: result: $cf_cv_mbstate_t" >&5
9457 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9458
9459 if test "$cf_cv_mbstate_t" = yes ; then
9460         cat >>confdefs.h <<\EOF
9461 #define NEED_WCHAR_H 1
9462 EOF
9463
9464         NEED_WCHAR_H=1
9465 fi
9466
9467 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9468 if test "$cf_cv_mbstate_t" = unknown ; then
9469         NCURSES_MBSTATE_T=1
9470 fi
9471
9472 # This is needed on Tru64 5.0 to declare wchar_t
9473 echo "$as_me:9473: checking if we must include wchar.h to declare wchar_t" >&5
9474 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9475 if test "${cf_cv_wchar_t+set}" = set; then
9476   echo $ECHO_N "(cached) $ECHO_C" >&6
9477 else
9478
9479 cat >conftest.$ac_ext <<_ACEOF
9480 #line 9480 "configure"
9481 #include "confdefs.h"
9482
9483 #include <stdlib.h>
9484 #include <stdarg.h>
9485 #include <stdio.h>
9486 #ifdef HAVE_LIBUTF8_H
9487 #include <libutf8.h>
9488 #endif
9489 int
9490 main ()
9491 {
9492 wchar_t state
9493   ;
9494   return 0;
9495 }
9496 _ACEOF
9497 rm -f conftest.$ac_objext
9498 if { (eval echo "$as_me:9498: \"$ac_compile\"") >&5
9499   (eval $ac_compile) 2>&5
9500   ac_status=$?
9501   echo "$as_me:9501: \$? = $ac_status" >&5
9502   (exit $ac_status); } &&
9503          { ac_try='test -s conftest.$ac_objext'
9504   { (eval echo "$as_me:9504: \"$ac_try\"") >&5
9505   (eval $ac_try) 2>&5
9506   ac_status=$?
9507   echo "$as_me:9507: \$? = $ac_status" >&5
9508   (exit $ac_status); }; }; then
9509   cf_cv_wchar_t=no
9510 else
9511   echo "$as_me: failed program was:" >&5
9512 cat conftest.$ac_ext >&5
9513 cat >conftest.$ac_ext <<_ACEOF
9514 #line 9514 "configure"
9515 #include "confdefs.h"
9516
9517 #include <stdlib.h>
9518 #include <stdarg.h>
9519 #include <stdio.h>
9520 #include <wchar.h>
9521 #ifdef HAVE_LIBUTF8_H
9522 #include <libutf8.h>
9523 #endif
9524 int
9525 main ()
9526 {
9527 wchar_t value
9528   ;
9529   return 0;
9530 }
9531 _ACEOF
9532 rm -f conftest.$ac_objext
9533 if { (eval echo "$as_me:9533: \"$ac_compile\"") >&5
9534   (eval $ac_compile) 2>&5
9535   ac_status=$?
9536   echo "$as_me:9536: \$? = $ac_status" >&5
9537   (exit $ac_status); } &&
9538          { ac_try='test -s conftest.$ac_objext'
9539   { (eval echo "$as_me:9539: \"$ac_try\"") >&5
9540   (eval $ac_try) 2>&5
9541   ac_status=$?
9542   echo "$as_me:9542: \$? = $ac_status" >&5
9543   (exit $ac_status); }; }; then
9544   cf_cv_wchar_t=yes
9545 else
9546   echo "$as_me: failed program was:" >&5
9547 cat conftest.$ac_ext >&5
9548 cf_cv_wchar_t=unknown
9549 fi
9550 rm -f conftest.$ac_objext conftest.$ac_ext
9551 fi
9552 rm -f conftest.$ac_objext conftest.$ac_ext
9553 fi
9554 echo "$as_me:9554: result: $cf_cv_wchar_t" >&5
9555 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9556
9557 if test "$cf_cv_wchar_t" = yes ; then
9558         cat >>confdefs.h <<\EOF
9559 #define NEED_WCHAR_H 1
9560 EOF
9561
9562         NEED_WCHAR_H=1
9563 fi
9564
9565 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9566 if test "$cf_cv_wchar_t" = unknown ; then
9567         NCURSES_WCHAR_T=1
9568 fi
9569
9570 # if we find wchar_t in either place, use substitution to provide a fallback.
9571 if test "$cf_cv_wchar_t" != unknown ; then
9572         NCURSES_OK_WCHAR_T=1
9573 fi
9574
9575 # This is needed on Tru64 5.0 to declare wint_t
9576 echo "$as_me:9576: checking if we must include wchar.h to declare wint_t" >&5
9577 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9578 if test "${cf_cv_wint_t+set}" = set; then
9579   echo $ECHO_N "(cached) $ECHO_C" >&6
9580 else
9581
9582 cat >conftest.$ac_ext <<_ACEOF
9583 #line 9583 "configure"
9584 #include "confdefs.h"
9585
9586 #include <stdlib.h>
9587 #include <stdarg.h>
9588 #include <stdio.h>
9589 #ifdef HAVE_LIBUTF8_H
9590 #include <libutf8.h>
9591 #endif
9592 int
9593 main ()
9594 {
9595 wint_t state
9596   ;
9597   return 0;
9598 }
9599 _ACEOF
9600 rm -f conftest.$ac_objext
9601 if { (eval echo "$as_me:9601: \"$ac_compile\"") >&5
9602   (eval $ac_compile) 2>&5
9603   ac_status=$?
9604   echo "$as_me:9604: \$? = $ac_status" >&5
9605   (exit $ac_status); } &&
9606          { ac_try='test -s conftest.$ac_objext'
9607   { (eval echo "$as_me:9607: \"$ac_try\"") >&5
9608   (eval $ac_try) 2>&5
9609   ac_status=$?
9610   echo "$as_me:9610: \$? = $ac_status" >&5
9611   (exit $ac_status); }; }; then
9612   cf_cv_wint_t=no
9613 else
9614   echo "$as_me: failed program was:" >&5
9615 cat conftest.$ac_ext >&5
9616 cat >conftest.$ac_ext <<_ACEOF
9617 #line 9617 "configure"
9618 #include "confdefs.h"
9619
9620 #include <stdlib.h>
9621 #include <stdarg.h>
9622 #include <stdio.h>
9623 #include <wchar.h>
9624 #ifdef HAVE_LIBUTF8_H
9625 #include <libutf8.h>
9626 #endif
9627 int
9628 main ()
9629 {
9630 wint_t value
9631   ;
9632   return 0;
9633 }
9634 _ACEOF
9635 rm -f conftest.$ac_objext
9636 if { (eval echo "$as_me:9636: \"$ac_compile\"") >&5
9637   (eval $ac_compile) 2>&5
9638   ac_status=$?
9639   echo "$as_me:9639: \$? = $ac_status" >&5
9640   (exit $ac_status); } &&
9641          { ac_try='test -s conftest.$ac_objext'
9642   { (eval echo "$as_me:9642: \"$ac_try\"") >&5
9643   (eval $ac_try) 2>&5
9644   ac_status=$?
9645   echo "$as_me:9645: \$? = $ac_status" >&5
9646   (exit $ac_status); }; }; then
9647   cf_cv_wint_t=yes
9648 else
9649   echo "$as_me: failed program was:" >&5
9650 cat conftest.$ac_ext >&5
9651 cf_cv_wint_t=unknown
9652 fi
9653 rm -f conftest.$ac_objext conftest.$ac_ext
9654 fi
9655 rm -f conftest.$ac_objext conftest.$ac_ext
9656 fi
9657 echo "$as_me:9657: result: $cf_cv_wint_t" >&5
9658 echo "${ECHO_T}$cf_cv_wint_t" >&6
9659
9660 if test "$cf_cv_wint_t" = yes ; then
9661         cat >>confdefs.h <<\EOF
9662 #define NEED_WCHAR_H 1
9663 EOF
9664
9665         NEED_WCHAR_H=1
9666 fi
9667
9668 # if we do not find wint_t in either place, use substitution to provide a fallback.
9669 if test "$cf_cv_wint_t" = unknown ; then
9670         NCURSES_WINT_T=1
9671 fi
9672
9673 # if we find wint_t in either place, use substitution to provide a fallback.
9674 if test "$cf_cv_wint_t" != unknown ; then
9675         NCURSES_OK_WINT_T=1
9676 fi
9677
9678         if test "$NCURSES_MBSTATE_T" != 0; then
9679                 cat >>confdefs.h <<\EOF
9680 #define NEED_MBSTATE_T_DEF 1
9681 EOF
9682
9683         fi
9684 fi
9685
9686 ###   use option --disable-lp64 to allow long chtype
9687 case $cf_cv_abi_version in
9688 [345]*)
9689         default_with_lp64=no
9690         ;;
9691 *)
9692         default_with_lp64=yes
9693         ;;
9694 esac
9695
9696 echo "$as_me:9696: checking whether to enable _LP64 definition in curses.h" >&5
9697 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9698
9699 # Check whether --enable-lp64 or --disable-lp64 was given.
9700 if test "${enable_lp64+set}" = set; then
9701   enableval="$enable_lp64"
9702   with_lp64=$enableval
9703 else
9704   with_lp64=$default_with_lp64
9705 fi;
9706 echo "$as_me:9706: result: $with_lp64" >&5
9707 echo "${ECHO_T}$with_lp64" >&6
9708
9709 if test "$with_lp64" = yes ; then
9710         cf_cv_enable_lp64=1
9711 else
9712         cf_cv_enable_lp64=0
9713 fi
9714
9715 # Check whether --enable-largefile or --disable-largefile was given.
9716 if test "${enable_largefile+set}" = set; then
9717   enableval="$enable_largefile"
9718
9719 fi;
9720 if test "$enable_largefile" != no; then
9721
9722   echo "$as_me:9722: checking for special C compiler options needed for large files" >&5
9723 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9724 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9725   echo $ECHO_N "(cached) $ECHO_C" >&6
9726 else
9727   ac_cv_sys_largefile_CC=no
9728      if test "$GCC" != yes; then
9729        ac_save_CC=$CC
9730        while :; do
9731          # IRIX 6.2 and later do not support large files by default,
9732          # so use the C compiler's -n32 option if that helps.
9733          cat >conftest.$ac_ext <<_ACEOF
9734 #line 9734 "configure"
9735 #include "confdefs.h"
9736 #include <sys/types.h>
9737  /* Check that off_t can represent 2**63 - 1 correctly.
9738     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9739     since some C++ compilers masquerading as C compilers
9740     incorrectly reject 9223372036854775807.  */
9741 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9742   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9743                        && LARGE_OFF_T % 2147483647 == 1)
9744                       ? 1 : -1];
9745 int
9746 main ()
9747 {
9748
9749   ;
9750   return 0;
9751 }
9752 _ACEOF
9753          rm -f conftest.$ac_objext
9754 if { (eval echo "$as_me:9754: \"$ac_compile\"") >&5
9755   (eval $ac_compile) 2>&5
9756   ac_status=$?
9757   echo "$as_me:9757: \$? = $ac_status" >&5
9758   (exit $ac_status); } &&
9759          { ac_try='test -s conftest.$ac_objext'
9760   { (eval echo "$as_me:9760: \"$ac_try\"") >&5
9761   (eval $ac_try) 2>&5
9762   ac_status=$?
9763   echo "$as_me:9763: \$? = $ac_status" >&5
9764   (exit $ac_status); }; }; then
9765   break
9766 else
9767   echo "$as_me: failed program was:" >&5
9768 cat conftest.$ac_ext >&5
9769 fi
9770 rm -f conftest.$ac_objext
9771          CC="$CC -n32"
9772          rm -f conftest.$ac_objext
9773 if { (eval echo "$as_me:9773: \"$ac_compile\"") >&5
9774   (eval $ac_compile) 2>&5
9775   ac_status=$?
9776   echo "$as_me:9776: \$? = $ac_status" >&5
9777   (exit $ac_status); } &&
9778          { ac_try='test -s conftest.$ac_objext'
9779   { (eval echo "$as_me:9779: \"$ac_try\"") >&5
9780   (eval $ac_try) 2>&5
9781   ac_status=$?
9782   echo "$as_me:9782: \$? = $ac_status" >&5
9783   (exit $ac_status); }; }; then
9784   ac_cv_sys_largefile_CC=' -n32'; break
9785 else
9786   echo "$as_me: failed program was:" >&5
9787 cat conftest.$ac_ext >&5
9788 fi
9789 rm -f conftest.$ac_objext
9790          break
9791        done
9792        CC=$ac_save_CC
9793        rm -f conftest.$ac_ext
9794     fi
9795 fi
9796 echo "$as_me:9796: result: $ac_cv_sys_largefile_CC" >&5
9797 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9798   if test "$ac_cv_sys_largefile_CC" != no; then
9799     CC=$CC$ac_cv_sys_largefile_CC
9800   fi
9801
9802   echo "$as_me:9802: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9803 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9804 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9805   echo $ECHO_N "(cached) $ECHO_C" >&6
9806 else
9807   while :; do
9808   ac_cv_sys_file_offset_bits=no
9809   cat >conftest.$ac_ext <<_ACEOF
9810 #line 9810 "configure"
9811 #include "confdefs.h"
9812 #include <sys/types.h>
9813  /* Check that off_t can represent 2**63 - 1 correctly.
9814     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9815     since some C++ compilers masquerading as C compilers
9816     incorrectly reject 9223372036854775807.  */
9817 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9818   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9819                        && LARGE_OFF_T % 2147483647 == 1)
9820                       ? 1 : -1];
9821 int
9822 main ()
9823 {
9824
9825   ;
9826   return 0;
9827 }
9828 _ACEOF
9829 rm -f conftest.$ac_objext
9830 if { (eval echo "$as_me:9830: \"$ac_compile\"") >&5
9831   (eval $ac_compile) 2>&5
9832   ac_status=$?
9833   echo "$as_me:9833: \$? = $ac_status" >&5
9834   (exit $ac_status); } &&
9835          { ac_try='test -s conftest.$ac_objext'
9836   { (eval echo "$as_me:9836: \"$ac_try\"") >&5
9837   (eval $ac_try) 2>&5
9838   ac_status=$?
9839   echo "$as_me:9839: \$? = $ac_status" >&5
9840   (exit $ac_status); }; }; then
9841   break
9842 else
9843   echo "$as_me: failed program was:" >&5
9844 cat conftest.$ac_ext >&5
9845 fi
9846 rm -f conftest.$ac_objext conftest.$ac_ext
9847   cat >conftest.$ac_ext <<_ACEOF
9848 #line 9848 "configure"
9849 #include "confdefs.h"
9850 #define _FILE_OFFSET_BITS 64
9851 #include <sys/types.h>
9852  /* Check that off_t can represent 2**63 - 1 correctly.
9853     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9854     since some C++ compilers masquerading as C compilers
9855     incorrectly reject 9223372036854775807.  */
9856 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9857   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9858                        && LARGE_OFF_T % 2147483647 == 1)
9859                       ? 1 : -1];
9860 int
9861 main ()
9862 {
9863
9864   ;
9865   return 0;
9866 }
9867 _ACEOF
9868 rm -f conftest.$ac_objext
9869 if { (eval echo "$as_me:9869: \"$ac_compile\"") >&5
9870   (eval $ac_compile) 2>&5
9871   ac_status=$?
9872   echo "$as_me:9872: \$? = $ac_status" >&5
9873   (exit $ac_status); } &&
9874          { ac_try='test -s conftest.$ac_objext'
9875   { (eval echo "$as_me:9875: \"$ac_try\"") >&5
9876   (eval $ac_try) 2>&5
9877   ac_status=$?
9878   echo "$as_me:9878: \$? = $ac_status" >&5
9879   (exit $ac_status); }; }; then
9880   ac_cv_sys_file_offset_bits=64; break
9881 else
9882   echo "$as_me: failed program was:" >&5
9883 cat conftest.$ac_ext >&5
9884 fi
9885 rm -f conftest.$ac_objext conftest.$ac_ext
9886   break
9887 done
9888 fi
9889 echo "$as_me:9889: result: $ac_cv_sys_file_offset_bits" >&5
9890 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9891 if test "$ac_cv_sys_file_offset_bits" != no; then
9892
9893 cat >>confdefs.h <<EOF
9894 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9895 EOF
9896
9897 fi
9898 rm -rf conftest*
9899   echo "$as_me:9899: checking for _LARGE_FILES value needed for large files" >&5
9900 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9901 if test "${ac_cv_sys_large_files+set}" = set; then
9902   echo $ECHO_N "(cached) $ECHO_C" >&6
9903 else
9904   while :; do
9905   ac_cv_sys_large_files=no
9906   cat >conftest.$ac_ext <<_ACEOF
9907 #line 9907 "configure"
9908 #include "confdefs.h"
9909 #include <sys/types.h>
9910  /* Check that off_t can represent 2**63 - 1 correctly.
9911     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9912     since some C++ compilers masquerading as C compilers
9913     incorrectly reject 9223372036854775807.  */
9914 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9915   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9916                        && LARGE_OFF_T % 2147483647 == 1)
9917                       ? 1 : -1];
9918 int
9919 main ()
9920 {
9921
9922   ;
9923   return 0;
9924 }
9925 _ACEOF
9926 rm -f conftest.$ac_objext
9927 if { (eval echo "$as_me:9927: \"$ac_compile\"") >&5
9928   (eval $ac_compile) 2>&5
9929   ac_status=$?
9930   echo "$as_me:9930: \$? = $ac_status" >&5
9931   (exit $ac_status); } &&
9932          { ac_try='test -s conftest.$ac_objext'
9933   { (eval echo "$as_me:9933: \"$ac_try\"") >&5
9934   (eval $ac_try) 2>&5
9935   ac_status=$?
9936   echo "$as_me:9936: \$? = $ac_status" >&5
9937   (exit $ac_status); }; }; then
9938   break
9939 else
9940   echo "$as_me: failed program was:" >&5
9941 cat conftest.$ac_ext >&5
9942 fi
9943 rm -f conftest.$ac_objext conftest.$ac_ext
9944   cat >conftest.$ac_ext <<_ACEOF
9945 #line 9945 "configure"
9946 #include "confdefs.h"
9947 #define _LARGE_FILES 1
9948 #include <sys/types.h>
9949  /* Check that off_t can represent 2**63 - 1 correctly.
9950     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9951     since some C++ compilers masquerading as C compilers
9952     incorrectly reject 9223372036854775807.  */
9953 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9954   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9955                        && LARGE_OFF_T % 2147483647 == 1)
9956                       ? 1 : -1];
9957 int
9958 main ()
9959 {
9960
9961   ;
9962   return 0;
9963 }
9964 _ACEOF
9965 rm -f conftest.$ac_objext
9966 if { (eval echo "$as_me:9966: \"$ac_compile\"") >&5
9967   (eval $ac_compile) 2>&5
9968   ac_status=$?
9969   echo "$as_me:9969: \$? = $ac_status" >&5
9970   (exit $ac_status); } &&
9971          { ac_try='test -s conftest.$ac_objext'
9972   { (eval echo "$as_me:9972: \"$ac_try\"") >&5
9973   (eval $ac_try) 2>&5
9974   ac_status=$?
9975   echo "$as_me:9975: \$? = $ac_status" >&5
9976   (exit $ac_status); }; }; then
9977   ac_cv_sys_large_files=1; break
9978 else
9979   echo "$as_me: failed program was:" >&5
9980 cat conftest.$ac_ext >&5
9981 fi
9982 rm -f conftest.$ac_objext conftest.$ac_ext
9983   break
9984 done
9985 fi
9986 echo "$as_me:9986: result: $ac_cv_sys_large_files" >&5
9987 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9988 if test "$ac_cv_sys_large_files" != no; then
9989
9990 cat >>confdefs.h <<EOF
9991 #define _LARGE_FILES $ac_cv_sys_large_files
9992 EOF
9993
9994 fi
9995 rm -rf conftest*
9996 fi
9997
9998     if test "$enable_largefile" != no ; then
9999         echo "$as_me:9999: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10000 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10001 if test "${ac_cv_sys_largefile_source+set}" = set; then
10002   echo $ECHO_N "(cached) $ECHO_C" >&6
10003 else
10004   while :; do
10005   ac_cv_sys_largefile_source=no
10006   cat >conftest.$ac_ext <<_ACEOF
10007 #line 10007 "configure"
10008 #include "confdefs.h"
10009 #include <stdio.h>
10010 int
10011 main ()
10012 {
10013 return !fseeko;
10014   ;
10015   return 0;
10016 }
10017 _ACEOF
10018 rm -f conftest.$ac_objext
10019 if { (eval echo "$as_me:10019: \"$ac_compile\"") >&5
10020   (eval $ac_compile) 2>&5
10021   ac_status=$?
10022   echo "$as_me:10022: \$? = $ac_status" >&5
10023   (exit $ac_status); } &&
10024          { ac_try='test -s conftest.$ac_objext'
10025   { (eval echo "$as_me:10025: \"$ac_try\"") >&5
10026   (eval $ac_try) 2>&5
10027   ac_status=$?
10028   echo "$as_me:10028: \$? = $ac_status" >&5
10029   (exit $ac_status); }; }; then
10030   break
10031 else
10032   echo "$as_me: failed program was:" >&5
10033 cat conftest.$ac_ext >&5
10034 fi
10035 rm -f conftest.$ac_objext conftest.$ac_ext
10036   cat >conftest.$ac_ext <<_ACEOF
10037 #line 10037 "configure"
10038 #include "confdefs.h"
10039 #define _LARGEFILE_SOURCE 1
10040 #include <stdio.h>
10041 int
10042 main ()
10043 {
10044 return !fseeko;
10045   ;
10046   return 0;
10047 }
10048 _ACEOF
10049 rm -f conftest.$ac_objext
10050 if { (eval echo "$as_me:10050: \"$ac_compile\"") >&5
10051   (eval $ac_compile) 2>&5
10052   ac_status=$?
10053   echo "$as_me:10053: \$? = $ac_status" >&5
10054   (exit $ac_status); } &&
10055          { ac_try='test -s conftest.$ac_objext'
10056   { (eval echo "$as_me:10056: \"$ac_try\"") >&5
10057   (eval $ac_try) 2>&5
10058   ac_status=$?
10059   echo "$as_me:10059: \$? = $ac_status" >&5
10060   (exit $ac_status); }; }; then
10061   ac_cv_sys_largefile_source=1; break
10062 else
10063   echo "$as_me: failed program was:" >&5
10064 cat conftest.$ac_ext >&5
10065 fi
10066 rm -f conftest.$ac_objext conftest.$ac_ext
10067   break
10068 done
10069 fi
10070 echo "$as_me:10070: result: $ac_cv_sys_largefile_source" >&5
10071 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10072 if test "$ac_cv_sys_largefile_source" != no; then
10073
10074 cat >>confdefs.h <<EOF
10075 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10076 EOF
10077
10078 fi
10079 rm -rf conftest*
10080
10081 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10082 # in glibc 2.1.3, but that breaks too many other things.
10083 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10084 echo "$as_me:10084: checking for fseeko" >&5
10085 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10086 if test "${ac_cv_func_fseeko+set}" = set; then
10087   echo $ECHO_N "(cached) $ECHO_C" >&6
10088 else
10089   cat >conftest.$ac_ext <<_ACEOF
10090 #line 10090 "configure"
10091 #include "confdefs.h"
10092 #include <stdio.h>
10093 int
10094 main ()
10095 {
10096 return fseeko && fseeko (stdin, 0, 0);
10097   ;
10098   return 0;
10099 }
10100 _ACEOF
10101 rm -f conftest.$ac_objext conftest$ac_exeext
10102 if { (eval echo "$as_me:10102: \"$ac_link\"") >&5
10103   (eval $ac_link) 2>&5
10104   ac_status=$?
10105   echo "$as_me:10105: \$? = $ac_status" >&5
10106   (exit $ac_status); } &&
10107          { ac_try='test -s conftest$ac_exeext'
10108   { (eval echo "$as_me:10108: \"$ac_try\"") >&5
10109   (eval $ac_try) 2>&5
10110   ac_status=$?
10111   echo "$as_me:10111: \$? = $ac_status" >&5
10112   (exit $ac_status); }; }; then
10113   ac_cv_func_fseeko=yes
10114 else
10115   echo "$as_me: failed program was:" >&5
10116 cat conftest.$ac_ext >&5
10117 ac_cv_func_fseeko=no
10118 fi
10119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10120 fi
10121 echo "$as_me:10121: result: $ac_cv_func_fseeko" >&5
10122 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10123 if test $ac_cv_func_fseeko = yes; then
10124
10125 cat >>confdefs.h <<\EOF
10126 #define HAVE_FSEEKO 1
10127 EOF
10128
10129 fi
10130
10131         # Normally we would collect these definitions in the config.h,
10132         # but (like _XOPEN_SOURCE), some environments rely on having these
10133         # defined before any of the system headers are included.  Another
10134         # case comes up with C++, e.g., on AIX the compiler compiles the
10135         # header files by themselves before looking at the body files it is
10136         # told to compile.  For ncurses, those header files do not include
10137         # the config.h
10138         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10139         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10140         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10141
10142         echo "$as_me:10142: checking whether to use struct dirent64" >&5
10143 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10144 if test "${cf_cv_struct_dirent64+set}" = set; then
10145   echo $ECHO_N "(cached) $ECHO_C" >&6
10146 else
10147
10148                 cat >conftest.$ac_ext <<_ACEOF
10149 #line 10149 "configure"
10150 #include "confdefs.h"
10151
10152 #include <sys/types.h>
10153 #include <dirent.h>
10154
10155 int
10156 main ()
10157 {
10158
10159                 /* if transitional largefile support is setup, this is true */
10160                 extern struct dirent64 * readdir(DIR *);
10161                 struct dirent64 *x = readdir((DIR *)0);
10162                 struct dirent *y = readdir((DIR *)0);
10163                 int z = x - y;
10164
10165   ;
10166   return 0;
10167 }
10168 _ACEOF
10169 rm -f conftest.$ac_objext
10170 if { (eval echo "$as_me:10170: \"$ac_compile\"") >&5
10171   (eval $ac_compile) 2>&5
10172   ac_status=$?
10173   echo "$as_me:10173: \$? = $ac_status" >&5
10174   (exit $ac_status); } &&
10175          { ac_try='test -s conftest.$ac_objext'
10176   { (eval echo "$as_me:10176: \"$ac_try\"") >&5
10177   (eval $ac_try) 2>&5
10178   ac_status=$?
10179   echo "$as_me:10179: \$? = $ac_status" >&5
10180   (exit $ac_status); }; }; then
10181   cf_cv_struct_dirent64=yes
10182 else
10183   echo "$as_me: failed program was:" >&5
10184 cat conftest.$ac_ext >&5
10185 cf_cv_struct_dirent64=no
10186 fi
10187 rm -f conftest.$ac_objext conftest.$ac_ext
10188
10189 fi
10190 echo "$as_me:10190: result: $cf_cv_struct_dirent64" >&5
10191 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10192         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
10193 #define HAVE_STRUCT_DIRENT64 1
10194 EOF
10195
10196     fi
10197
10198 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10199 echo "$as_me:10199: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10200 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10201
10202 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10203 if test "${enable_tparm_varargs+set}" = set; then
10204   enableval="$enable_tparm_varargs"
10205   with_tparm_varargs=$enableval
10206 else
10207   with_tparm_varargs=yes
10208 fi;
10209 echo "$as_me:10209: result: $with_tparm_varargs" >&5
10210 echo "${ECHO_T}$with_tparm_varargs" >&6
10211 NCURSES_TPARM_VARARGS=0
10212 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
10213
10214 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10215 if test "$with_ticlib" != no ; then
10216 echo "$as_me:10216: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10217 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10218
10219 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10220 if test "${enable_tic_depends+set}" = set; then
10221   enableval="$enable_tic_depends"
10222   with_tic_depends=$enableval
10223 else
10224   with_tic_depends=yes
10225 fi;
10226 echo "$as_me:10226: result: $with_tic_depends" >&5
10227 echo "${ECHO_T}$with_tic_depends" >&6
10228 else
10229         with_tic_depends=no
10230 fi
10231
10232 ###   use option --with-bool to override bool's type
10233 echo "$as_me:10233: checking for type of bool" >&5
10234 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10235
10236 # Check whether --with-bool or --without-bool was given.
10237 if test "${with_bool+set}" = set; then
10238   withval="$with_bool"
10239   NCURSES_BOOL="$withval"
10240 else
10241   NCURSES_BOOL=auto
10242 fi;
10243 echo "$as_me:10243: result: $NCURSES_BOOL" >&5
10244 echo "${ECHO_T}$NCURSES_BOOL" >&6
10245
10246 echo "$as_me:10246: checking for alternate terminal capabilities file" >&5
10247 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10248
10249 # Check whether --with-caps or --without-caps was given.
10250 if test "${with_caps+set}" = set; then
10251   withval="$with_caps"
10252   TERMINFO_CAPS=Caps.$withval
10253 else
10254   TERMINFO_CAPS=Caps
10255 fi;
10256 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10257 echo "$as_me:10257: result: $TERMINFO_CAPS" >&5
10258 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10259
10260 ###   use option --with-chtype to override chtype's type
10261 echo "$as_me:10261: checking for type of chtype" >&5
10262 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10263
10264 # Check whether --with-chtype or --without-chtype was given.
10265 if test "${with_chtype+set}" = set; then
10266   withval="$with_chtype"
10267   NCURSES_CHTYPE="$withval"
10268 else
10269   NCURSES_CHTYPE=auto
10270 fi;
10271 echo "$as_me:10271: result: $NCURSES_CHTYPE" >&5
10272 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10273
10274 ###   use option --with-ospeed to override ospeed's type
10275 echo "$as_me:10275: checking for type of ospeed" >&5
10276 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10277
10278 # Check whether --with-ospeed or --without-ospeed was given.
10279 if test "${with_ospeed+set}" = set; then
10280   withval="$with_ospeed"
10281   NCURSES_OSPEED="$withval"
10282 else
10283   NCURSES_OSPEED=short
10284 fi;
10285 echo "$as_me:10285: result: $NCURSES_OSPEED" >&5
10286 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10287
10288 ###   use option --with-mmask-t to override mmask_t's type
10289 echo "$as_me:10289: checking for type of mmask_t" >&5
10290 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10291
10292 # Check whether --with-mmask-t or --without-mmask-t was given.
10293 if test "${with_mmask_t+set}" = set; then
10294   withval="$with_mmask_t"
10295   NCURSES_MMASK_T="$withval"
10296 else
10297   NCURSES_MMASK_T=auto
10298 fi;
10299 echo "$as_me:10299: result: $NCURSES_MMASK_T" >&5
10300 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10301
10302 ###   use option --with-ccharw-max to override CCHARW_MAX size
10303 echo "$as_me:10303: checking for size CCHARW_MAX" >&5
10304 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10305
10306 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10307 if test "${with_ccharw_max+set}" = set; then
10308   withval="$with_ccharw_max"
10309   NCURSES_CCHARW_MAX="$withval"
10310 else
10311   NCURSES_CCHARW_MAX=5
10312 fi;
10313 echo "$as_me:10313: result: $NCURSES_CCHARW_MAX" >&5
10314 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10315
10316 ###   use option --with-tparm-arg to override tparm's argument type
10317 echo "$as_me:10317: checking for type of tparm args" >&5
10318 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10319
10320 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10321 if test "${with_tparm_arg+set}" = set; then
10322   withval="$with_tparm_arg"
10323   NCURSES_TPARM_ARG="$withval"
10324 else
10325   NCURSES_TPARM_ARG=long
10326 fi;
10327 echo "$as_me:10327: result: $NCURSES_TPARM_ARG" >&5
10328 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10329
10330 ### Enable compiling-in rcs id's
10331 echo "$as_me:10331: checking if RCS identifiers should be compiled-in" >&5
10332 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10333
10334 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10335 if test "${with_rcs_ids+set}" = set; then
10336   withval="$with_rcs_ids"
10337   with_rcs_ids=$withval
10338 else
10339   with_rcs_ids=no
10340 fi;
10341 echo "$as_me:10341: result: $with_rcs_ids" >&5
10342 echo "${ECHO_T}$with_rcs_ids" >&6
10343 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
10344 #define USE_RCS_IDS 1
10345 EOF
10346
10347 ###############################################################################
10348
10349 echo "$as_me:10349: checking format of man-pages" >&5
10350 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10351
10352 # Check whether --with-manpage-format or --without-manpage-format was given.
10353 if test "${with_manpage_format+set}" = set; then
10354   withval="$with_manpage_format"
10355   MANPAGE_FORMAT=$withval
10356 else
10357   MANPAGE_FORMAT=unknown
10358 fi;
10359
10360 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10361 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10362
10363 cf_unknown=
10364
10365 case $MANPAGE_FORMAT in
10366 unknown)
10367   if test -z "$MANPATH" ; then
10368     MANPATH="/usr/man:/usr/share/man"
10369   fi
10370
10371   # look for the 'date' man-page (it's most likely to be installed!)
10372   MANPAGE_FORMAT=
10373   cf_preform=no
10374   cf_catonly=yes
10375   cf_example=date
10376
10377   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10378   for cf_dir in $MANPATH; do
10379     test -z "$cf_dir" && cf_dir=/usr/man
10380     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
10381     do
10382       cf_test=`echo $cf_name | sed -e 's/*//'`
10383       if test "x$cf_test" = "x$cf_name" ; then
10384
10385         case "$cf_name" in
10386         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10387         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10388         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10389         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10390         esac
10391
10392         case "$cf_name" in
10393         $cf_dir/man*)
10394           cf_catonly=no
10395           ;;
10396         $cf_dir/cat*)
10397           cf_preform=yes
10398           ;;
10399         esac
10400         break
10401       fi
10402
10403       # if we found a match in either man* or cat*, stop looking
10404       if test -n "$MANPAGE_FORMAT" ; then
10405         cf_found=no
10406         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10407         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10408         case "$cf_name" in
10409         $cf_dir/cat*)
10410           cf_found=yes
10411           ;;
10412         esac
10413         test $cf_found=yes && break
10414       fi
10415     done
10416     # only check the first directory in $MANPATH where we find manpages
10417     if test -n "$MANPAGE_FORMAT" ; then
10418        break
10419     fi
10420   done
10421   # if we did not find the example, just assume it is normal
10422   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10423   IFS="$ac_save_ifs"
10424   ;;
10425 *)
10426   for cf_option in $MANPAGE_FORMAT; do
10427      case $cf_option in #(vi
10428      gzip|compress|BSDI|normal|formatted|catonly)
10429        ;;
10430      *)
10431        cf_unknown="$cf_unknown $cf_option"
10432        ;;
10433      esac
10434   done
10435   ;;
10436 esac
10437
10438 echo "$as_me:10438: result: $MANPAGE_FORMAT" >&5
10439 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10440 if test -n "$cf_unknown" ; then
10441   { echo "$as_me:10441: WARNING: Unexpected manpage-format $cf_unknown" >&5
10442 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10443 fi
10444
10445 echo "$as_me:10445: checking for manpage renaming" >&5
10446 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10447
10448 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10449 if test "${with_manpage_renames+set}" = set; then
10450   withval="$with_manpage_renames"
10451   MANPAGE_RENAMES=$withval
10452 else
10453   MANPAGE_RENAMES=yes
10454 fi;
10455
10456 case ".$MANPAGE_RENAMES" in #(vi
10457 .no) #(vi
10458   ;;
10459 .|.yes)
10460   # Debian 'man' program?
10461   if test -f /etc/debian_version ; then
10462     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10463   else
10464     MANPAGE_RENAMES=no
10465   fi
10466   ;;
10467 esac
10468
10469 if test "$MANPAGE_RENAMES" != no ; then
10470   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10471     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10472   elif test ! -f $MANPAGE_RENAMES ; then
10473     { { echo "$as_me:10473: error: not a filename: $MANPAGE_RENAMES" >&5
10474 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10475    { (exit 1); exit 1; }; }
10476   fi
10477
10478   test ! -d man && mkdir man
10479
10480   # Construct a sed-script to perform renaming within man-pages
10481   if test -n "$MANPAGE_RENAMES" ; then
10482     test ! -d man && mkdir man
10483     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10484   fi
10485 fi
10486
10487 echo "$as_me:10487: result: $MANPAGE_RENAMES" >&5
10488 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10489
10490 echo "$as_me:10490: checking if manpage aliases will be installed" >&5
10491 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10492
10493 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10494 if test "${with_manpage_aliases+set}" = set; then
10495   withval="$with_manpage_aliases"
10496   MANPAGE_ALIASES=$withval
10497 else
10498   MANPAGE_ALIASES=yes
10499 fi;
10500
10501 echo "$as_me:10501: result: $MANPAGE_ALIASES" >&5
10502 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10503
10504 case "x$LN_S" in #(vi
10505 xln*) #(vi
10506         cf_use_symlinks=yes
10507         ;;
10508 *)
10509         cf_use_symlinks=no
10510         ;;
10511 esac
10512
10513 MANPAGE_SYMLINKS=no
10514 if test "$MANPAGE_ALIASES" = yes ; then
10515 echo "$as_me:10515: checking if manpage symlinks should be used" >&5
10516 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10517
10518 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10519 if test "${with_manpage_symlinks+set}" = set; then
10520   withval="$with_manpage_symlinks"
10521   MANPAGE_SYMLINKS=$withval
10522 else
10523   MANPAGE_SYMLINKS=$cf_use_symlinks
10524 fi;
10525
10526 if test "$$cf_use_symlinks" = no; then
10527 if test "$MANPAGE_SYMLINKS" = yes ; then
10528         { echo "$as_me:10528: WARNING: cannot make symlinks" >&5
10529 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10530         MANPAGE_SYMLINKS=no
10531 fi
10532 fi
10533
10534 echo "$as_me:10534: result: $MANPAGE_SYMLINKS" >&5
10535 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10536 fi
10537
10538 echo "$as_me:10538: checking for manpage tbl" >&5
10539 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10540
10541 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10542 if test "${with_manpage_tbl+set}" = set; then
10543   withval="$with_manpage_tbl"
10544   MANPAGE_TBL=$withval
10545 else
10546   MANPAGE_TBL=no
10547 fi;
10548
10549 echo "$as_me:10549: result: $MANPAGE_TBL" >&5
10550 echo "${ECHO_T}$MANPAGE_TBL" >&6
10551
10552   if test "$prefix" = "NONE" ; then
10553      cf_prefix="$ac_default_prefix"
10554   else
10555      cf_prefix="$prefix"
10556   fi
10557
10558   case "$MANPAGE_FORMAT" in # (vi
10559   *catonly*) # (vi
10560     cf_format=yes
10561     cf_inboth=no
10562     ;;
10563   *formatted*) # (vi
10564     cf_format=yes
10565     cf_inboth=yes
10566     ;;
10567   *)
10568     cf_format=no
10569     cf_inboth=no
10570     ;;
10571   esac
10572
10573 test ! -d man && mkdir man
10574
10575 cf_so_strip=
10576 cf_compress=
10577 case "$MANPAGE_FORMAT" in #(vi
10578 *compress*) #(vi
10579         cf_so_strip="Z"
10580         cf_compress=compress
10581   ;;
10582 *gzip*)
10583         cf_so_strip="gz"
10584         cf_compress=gzip
10585   ;;
10586 esac
10587
10588 cf_edit_man=./edit_man.sh
10589 cf_man_alias=`pwd`/man_alias.sed
10590
10591 cat >$cf_edit_man <<CF_EOF
10592 #! /bin/sh
10593 # this script is generated by the configure-script CF_MAN_PAGES macro.
10594
10595 prefix="$cf_prefix"
10596 datadir="$datadir"
10597
10598 NCURSES_MAJOR="$NCURSES_MAJOR"
10599 NCURSES_MINOR="$NCURSES_MINOR"
10600 NCURSES_PATCH="$NCURSES_PATCH"
10601
10602 NCURSES_OSPEED="$NCURSES_OSPEED"
10603 TERMINFO="$TERMINFO"
10604
10605 INSTALL="$INSTALL"
10606 INSTALL_DATA="$INSTALL_DATA"
10607
10608 transform="$program_transform_name"
10609
10610 TMP=\${TMPDIR:=/tmp}/man\$\$
10611 trap "rm -f \$TMP" 0 1 2 5 15
10612
10613 form=\$1
10614 shift || exit 1
10615
10616 verb=\$1
10617 shift || exit 1
10618
10619 mandir=\$1
10620 shift || exit 1
10621
10622 srcdir=\$1
10623 top_srcdir=\$srcdir/..
10624 shift || exit 1
10625
10626 if test "\$form" = normal ; then
10627         if test "$cf_format" = yes ; then
10628         if test "$cf_inboth" = no ; then
10629                 sh \$0 format \$verb \$mandir \$srcdir \$*
10630                 exit $?
10631         fi
10632         fi
10633         cf_subdir=\$mandir/man
10634         cf_tables=$MANPAGE_TBL
10635 else
10636         cf_subdir=\$mandir/cat
10637         cf_tables=yes
10638 fi
10639
10640 # process the list of source-files
10641 for i in \$* ; do
10642 case \$i in #(vi
10643 *.orig|*.rej) ;; #(vi
10644 *.[0-9]*)
10645         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10646         if test \$verb = installing ; then
10647         if test ! -d \$cf_subdir\${section} ; then
10648                 mkdir -p \$cf_subdir\$section
10649         fi
10650         fi
10651
10652         # replace variables in man page
10653         if test ! -f $cf_man_alias ; then
10654 cat >>$cf_man_alias <<-CF_EOF2
10655                 s,@DATADIR@,\$datadir,g
10656                 s,@TERMINFO@,\$TERMINFO,g
10657                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
10658                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
10659                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
10660                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
10661 CF_EOF
10662
10663         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10664         do
10665                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10666                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10667 cat >>$cf_edit_man <<-CF_EOF
10668                 s,@$cf_NAME@,$cf_name,g
10669 CF_EOF
10670         done
10671
10672 cat >>$cf_edit_man <<CF_EOF
10673 CF_EOF2
10674                 echo "...made $cf_man_alias"
10675         fi
10676
10677         aliases=
10678         cf_source=\`basename \$i\`
10679         inalias=\$cf_source
10680         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10681         if test ! -f \$inalias ; then
10682                 echo .. skipped \$cf_source
10683                 continue
10684         fi
10685 CF_EOF
10686
10687 if test "$MANPAGE_ALIASES" != no ; then
10688 cat >>$cf_edit_man <<CF_EOF
10689         nCurses=ignore.3x
10690         test $with_curses_h = yes && nCurses=ncurses.3x
10691         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10692 CF_EOF
10693 fi
10694
10695 if test "$MANPAGE_RENAMES" = no ; then
10696 cat >>$cf_edit_man <<CF_EOF
10697         # perform program transformations for section 1 man pages
10698         if test \$section = 1 ; then
10699                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10700         else
10701                 cf_target=\$cf_subdir\${section}/\$cf_source
10702         fi
10703 CF_EOF
10704 else
10705 cat >>$cf_edit_man <<CF_EOF
10706         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10707         if test -z "\$cf_target" ; then
10708                 echo '? missing rename for '\$cf_source
10709                 cf_target="\$cf_source"
10710         fi
10711         cf_target="\$cf_subdir\${section}/\${cf_target}"
10712
10713 CF_EOF
10714 fi
10715
10716 cat >>$cf_edit_man <<CF_EOF
10717         sed     -f $cf_man_alias \\
10718 CF_EOF
10719
10720 if test -f $MANPAGE_RENAMES ; then
10721 cat >>$cf_edit_man <<CF_EOF
10722                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10723 CF_EOF
10724 else
10725 cat >>$cf_edit_man <<CF_EOF
10726                 < \$i >\$TMP
10727 CF_EOF
10728 fi
10729
10730 cat >>$cf_edit_man <<CF_EOF
10731 if test \$cf_tables = yes ; then
10732         tbl \$TMP >\$TMP.out
10733         mv \$TMP.out \$TMP
10734 fi
10735 CF_EOF
10736
10737 if test $with_overwrite != yes ; then
10738 cat >>$cf_edit_man <<CF_EOF
10739         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10740         mv \$TMP.out \$TMP
10741 CF_EOF
10742 fi
10743
10744 if test $with_curses_h != yes ; then
10745 cat >>$cf_edit_man <<CF_EOF
10746         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10747         mv \$TMP.out \$TMP
10748 CF_EOF
10749 fi
10750
10751 cat >>$cf_edit_man <<CF_EOF
10752         if test \$form = format ; then
10753                 nroff -man \$TMP >\$TMP.out
10754                 mv \$TMP.out \$TMP
10755         fi
10756 CF_EOF
10757
10758 if test -n "$cf_compress" ; then
10759 cat >>$cf_edit_man <<CF_EOF
10760         if test \$verb = installing ; then
10761         if ( $cf_compress -f \$TMP )
10762         then
10763                 mv \$TMP.$cf_so_strip \$TMP
10764         fi
10765         fi
10766         cf_target="\$cf_target.$cf_so_strip"
10767 CF_EOF
10768 fi
10769
10770 case "$MANPAGE_FORMAT" in #(vi
10771 *BSDI*)
10772 cat >>$cf_edit_man <<CF_EOF
10773         if test \$form = format ; then
10774                 # BSDI installs only .0 suffixes in the cat directories
10775                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10776         fi
10777 CF_EOF
10778   ;;
10779 esac
10780
10781 cat >>$cf_edit_man <<CF_EOF
10782         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10783         if test \$verb = installing ; then
10784                 echo \$verb \$cf_target
10785                 \$INSTALL_DATA \$TMP \$cf_target
10786                 test -d \$cf_subdir\${section} &&
10787                 test -n "\$aliases" && (
10788                         cd \$cf_subdir\${section} && (
10789                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10790                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10791                                 cf_target=\`basename \$cf_target\`
10792                                 for cf_alias in \$aliases
10793                                 do
10794                                         if test \$section = 1 ; then
10795                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10796                                         fi
10797
10798                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10799                                                 if test -f \$cf_alias\${suffix} ; then
10800                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10801                                                         then
10802                                                                 continue
10803                                                         fi
10804                                                 fi
10805                                                 echo .. \$verb alias \$cf_alias\${suffix}
10806 CF_EOF
10807 case "x$LN_S" in #(vi
10808 *-f) #(vi
10809 cat >>$cf_edit_man <<CF_EOF
10810                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10811 CF_EOF
10812         ;;
10813 *)
10814 cat >>$cf_edit_man <<CF_EOF
10815                                                 rm -f \$cf_alias\${suffix}
10816                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10817 CF_EOF
10818         ;;
10819 esac
10820 cat >>$cf_edit_man <<CF_EOF
10821                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10822                                                 echo ".so \$cf_source" >\$TMP
10823 CF_EOF
10824 if test -n "$cf_compress" ; then
10825 cat >>$cf_edit_man <<CF_EOF
10826                                                 if test -n "$cf_so_strip" ; then
10827                                                         $cf_compress -f \$TMP
10828                                                         mv \$TMP.$cf_so_strip \$TMP
10829                                                 fi
10830 CF_EOF
10831 fi
10832 cat >>$cf_edit_man <<CF_EOF
10833                                                 echo .. \$verb alias \$cf_alias\${suffix}
10834                                                 rm -f \$cf_alias\${suffix}
10835                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10836                                         fi
10837                                 done
10838                         )
10839                 )
10840         elif test \$verb = removing ; then
10841                 test -f \$cf_target && (
10842                         echo \$verb \$cf_target
10843                         rm -f \$cf_target
10844                 )
10845                 test -d \$cf_subdir\${section} &&
10846                 test -n "\$aliases" && (
10847                         cd \$cf_subdir\${section} && (
10848                                 for cf_alias in \$aliases
10849                                 do
10850                                         if test \$section = 1 ; then
10851                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10852                                         fi
10853
10854                                         echo .. \$verb alias \$cf_alias\${suffix}
10855                                         rm -f \$cf_alias\${suffix}
10856                                 done
10857                         )
10858                 )
10859         else
10860 #               echo ".hy 0"
10861                 cat \$TMP
10862         fi
10863         ;;
10864 esac
10865 done
10866
10867 if test $cf_inboth = yes ; then
10868 if test \$form != format ; then
10869         sh \$0 format \$verb \$mandir \$srcdir \$*
10870 fi
10871 fi
10872
10873 exit 0
10874 CF_EOF
10875 chmod 755 $cf_edit_man
10876
10877 ###############################################################################
10878
10879 ### Note that some functions (such as const) are normally disabled anyway.
10880 echo "$as_me:10880: checking if you want to build with function extensions" >&5
10881 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10882
10883 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10884 if test "${enable_ext_funcs+set}" = set; then
10885   enableval="$enable_ext_funcs"
10886   with_ext_funcs=$enableval
10887 else
10888   with_ext_funcs=yes
10889 fi;
10890 echo "$as_me:10890: result: $with_ext_funcs" >&5
10891 echo "${ECHO_T}$with_ext_funcs" >&6
10892 if test "$with_ext_funcs" = yes ; then
10893         NCURSES_EXT_FUNCS=1
10894         cat >>confdefs.h <<\EOF
10895 #define HAVE_ASSUME_DEFAULT_COLORS 1
10896 EOF
10897
10898         cat >>confdefs.h <<\EOF
10899 #define HAVE_CURSES_VERSION 1
10900 EOF
10901
10902         cat >>confdefs.h <<\EOF
10903 #define HAVE_HAS_KEY 1
10904 EOF
10905
10906         cat >>confdefs.h <<\EOF
10907 #define HAVE_RESIZETERM 1
10908 EOF
10909
10910         cat >>confdefs.h <<\EOF
10911 #define HAVE_RESIZE_TERM 1
10912 EOF
10913
10914         cat >>confdefs.h <<\EOF
10915 #define HAVE_TERM_ENTRY_H 1
10916 EOF
10917
10918         cat >>confdefs.h <<\EOF
10919 #define HAVE_USE_DEFAULT_COLORS 1
10920 EOF
10921
10922         cat >>confdefs.h <<\EOF
10923 #define HAVE_USE_SCREEN 1
10924 EOF
10925
10926         cat >>confdefs.h <<\EOF
10927 #define HAVE_USE_WINDOW 1
10928 EOF
10929
10930         cat >>confdefs.h <<\EOF
10931 #define HAVE_WRESIZE 1
10932 EOF
10933
10934         cat >>confdefs.h <<\EOF
10935 #define NCURSES_EXT_FUNCS 1
10936 EOF
10937
10938         GENERATED_EXT_FUNCS=generated
10939 else
10940         NCURSES_EXT_FUNCS=0
10941         GENERATED_EXT_FUNCS=
10942 fi
10943
10944 echo "$as_me:10944: checking if you want to build with experimental SCREEN extensions" >&5
10945 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10946
10947 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10948 if test "${enable_sp_funcs+set}" = set; then
10949   enableval="$enable_sp_funcs"
10950   with_sp_funcs=$enableval
10951 else
10952   with_sp_funcs=no
10953 fi;
10954 echo "$as_me:10954: result: $with_sp_funcs" >&5
10955 echo "${ECHO_T}$with_sp_funcs" >&6
10956 if test "$with_sp_funcs" = yes ; then
10957         NCURSES_SP_FUNCS=1
10958         cat >>confdefs.h <<\EOF
10959 #define NCURSES_SP_FUNCS 1
10960 EOF
10961
10962         GENERATED_SP_FUNCS=generated
10963 else
10964         NCURSES_SP_FUNCS=0
10965         GENERATED_SP_FUNCS=
10966 fi
10967
10968 echo "$as_me:10968: checking if you want to build with experimental terminal-driver" >&5
10969 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10970
10971 # Check whether --enable-term-driver or --disable-term-driver was given.
10972 if test "${enable_term_driver+set}" = set; then
10973   enableval="$enable_term_driver"
10974   with_term_driver=$enableval
10975 else
10976   with_term_driver=no
10977 fi;
10978 echo "$as_me:10978: result: $with_term_driver" >&5
10979 echo "${ECHO_T}$with_term_driver" >&6
10980 if test "$with_term_driver" = yes ; then
10981         cat >>confdefs.h <<\EOF
10982 #define USE_TERM_DRIVER 1
10983 EOF
10984
10985         if test "$with_sp_funcs" != yes ; then
10986                 { { echo "$as_me:10986: error: The term-driver option relies upon sp-funcs" >&5
10987 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10988    { (exit 1); exit 1; }; }
10989         fi
10990 fi
10991
10992 ###   use option --enable-const to turn on use of const beyond that in XSI.
10993 echo "$as_me:10993: checking for extended use of const keyword" >&5
10994 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10995
10996 # Check whether --enable-const or --disable-const was given.
10997 if test "${enable_const+set}" = set; then
10998   enableval="$enable_const"
10999   with_ext_const=$enableval
11000 else
11001   with_ext_const=no
11002 fi;
11003 echo "$as_me:11003: result: $with_ext_const" >&5
11004 echo "${ECHO_T}$with_ext_const" >&6
11005 NCURSES_CONST='/*nothing*/'
11006 if test "$with_ext_const" = yes ; then
11007         NCURSES_CONST=const
11008 fi
11009
11010 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11011 echo "$as_me:11011: checking if you want to use extended colors" >&5
11012 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11013
11014 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11015 if test "${enable_ext_colors+set}" = set; then
11016   enableval="$enable_ext_colors"
11017   with_ext_colors=$enableval
11018 else
11019   with_ext_colors=no
11020 fi;
11021 echo "$as_me:11021: result: $with_ext_colors" >&5
11022 echo "${ECHO_T}$with_ext_colors" >&6
11023 NCURSES_EXT_COLORS=0
11024 if test "$with_ext_colors" = yes ; then
11025         if test "$with_widec" != yes ; then
11026                 { { echo "$as_me:11026: error: This option applies only to wide-character library" >&5
11027 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11028    { (exit 1); exit 1; }; }
11029         else
11030                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11031
11032 if test "${with_abi_version+set}" != set; then
11033         case $cf_cv_rel_version in
11034         5.*)
11035                 cf_cv_rel_version=6.0
11036                 cf_cv_abi_version=6
11037                 { echo "$as_me:11037: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11038 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11039                 ;;
11040         esac
11041 fi
11042
11043         fi
11044         NCURSES_EXT_COLORS=1
11045         cat >>confdefs.h <<\EOF
11046 #define NCURSES_EXT_COLORS 1
11047 EOF
11048
11049 fi
11050
11051 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11052 echo "$as_me:11052: checking if you want to use extended mouse encoding" >&5
11053 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11054
11055 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11056 if test "${enable_ext_mouse+set}" = set; then
11057   enableval="$enable_ext_mouse"
11058   with_ext_mouse=$enableval
11059 else
11060   with_ext_mouse=no
11061 fi;
11062 echo "$as_me:11062: result: $with_ext_mouse" >&5
11063 echo "${ECHO_T}$with_ext_mouse" >&6
11064 NCURSES_MOUSE_VERSION=1
11065 if test "$with_ext_mouse" = yes ; then
11066         NCURSES_MOUSE_VERSION=2
11067
11068 if test "${with_abi_version+set}" != set; then
11069         case $cf_cv_rel_version in
11070         5.*)
11071                 cf_cv_rel_version=6.0
11072                 cf_cv_abi_version=6
11073                 { echo "$as_me:11073: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11074 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11075                 ;;
11076         esac
11077 fi
11078
11079 fi
11080
11081 echo "$as_me:11081: checking if you want \$NCURSES_NO_PADDING code" >&5
11082 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11083
11084 # Check whether --enable-no-padding or --disable-no-padding was given.
11085 if test "${enable_no_padding+set}" = set; then
11086   enableval="$enable_no_padding"
11087   with_no_padding=$enableval
11088 else
11089   with_no_padding=$with_ext_funcs
11090 fi;
11091 echo "$as_me:11091: result: $with_no_padding" >&5
11092 echo "${ECHO_T}$with_no_padding" >&6
11093 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
11094 #define NCURSES_NO_PADDING 1
11095 EOF
11096
11097 echo "$as_me:11097: checking for ANSI C header files" >&5
11098 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11099 if test "${ac_cv_header_stdc+set}" = set; then
11100   echo $ECHO_N "(cached) $ECHO_C" >&6
11101 else
11102   cat >conftest.$ac_ext <<_ACEOF
11103 #line 11103 "configure"
11104 #include "confdefs.h"
11105 #include <stdlib.h>
11106 #include <stdarg.h>
11107 #include <string.h>
11108 #include <float.h>
11109
11110 _ACEOF
11111 if { (eval echo "$as_me:11111: \"$ac_cpp conftest.$ac_ext\"") >&5
11112   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11113   ac_status=$?
11114   egrep -v '^ *\+' conftest.er1 >conftest.err
11115   rm -f conftest.er1
11116   cat conftest.err >&5
11117   echo "$as_me:11117: \$? = $ac_status" >&5
11118   (exit $ac_status); } >/dev/null; then
11119   if test -s conftest.err; then
11120     ac_cpp_err=$ac_c_preproc_warn_flag
11121   else
11122     ac_cpp_err=
11123   fi
11124 else
11125   ac_cpp_err=yes
11126 fi
11127 if test -z "$ac_cpp_err"; then
11128   ac_cv_header_stdc=yes
11129 else
11130   echo "$as_me: failed program was:" >&5
11131   cat conftest.$ac_ext >&5
11132   ac_cv_header_stdc=no
11133 fi
11134 rm -f conftest.err conftest.$ac_ext
11135
11136 if test $ac_cv_header_stdc = yes; then
11137   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11138   cat >conftest.$ac_ext <<_ACEOF
11139 #line 11139 "configure"
11140 #include "confdefs.h"
11141 #include <string.h>
11142
11143 _ACEOF
11144 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11145   egrep "memchr" >/dev/null 2>&1; then
11146   :
11147 else
11148   ac_cv_header_stdc=no
11149 fi
11150 rm -rf conftest*
11151
11152 fi
11153
11154 if test $ac_cv_header_stdc = yes; then
11155   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11156   cat >conftest.$ac_ext <<_ACEOF
11157 #line 11157 "configure"
11158 #include "confdefs.h"
11159 #include <stdlib.h>
11160
11161 _ACEOF
11162 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11163   egrep "free" >/dev/null 2>&1; then
11164   :
11165 else
11166   ac_cv_header_stdc=no
11167 fi
11168 rm -rf conftest*
11169
11170 fi
11171
11172 if test $ac_cv_header_stdc = yes; then
11173   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11174   if test "$cross_compiling" = yes; then
11175   :
11176 else
11177   cat >conftest.$ac_ext <<_ACEOF
11178 #line 11178 "configure"
11179 #include "confdefs.h"
11180 #include <ctype.h>
11181 #if ((' ' & 0x0FF) == 0x020)
11182 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11183 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11184 #else
11185 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11186                      || ('j' <= (c) && (c) <= 'r') \
11187                      || ('s' <= (c) && (c) <= 'z'))
11188 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11189 #endif
11190
11191 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11192 int
11193 main ()
11194 {
11195   int i;
11196   for (i = 0; i < 256; i++)
11197     if (XOR (islower (i), ISLOWER (i))
11198         || toupper (i) != TOUPPER (i))
11199       $ac_main_return(2);
11200   $ac_main_return (0);
11201 }
11202 _ACEOF
11203 rm -f conftest$ac_exeext
11204 if { (eval echo "$as_me:11204: \"$ac_link\"") >&5
11205   (eval $ac_link) 2>&5
11206   ac_status=$?
11207   echo "$as_me:11207: \$? = $ac_status" >&5
11208   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11209   { (eval echo "$as_me:11209: \"$ac_try\"") >&5
11210   (eval $ac_try) 2>&5
11211   ac_status=$?
11212   echo "$as_me:11212: \$? = $ac_status" >&5
11213   (exit $ac_status); }; }; then
11214   :
11215 else
11216   echo "$as_me: program exited with status $ac_status" >&5
11217 echo "$as_me: failed program was:" >&5
11218 cat conftest.$ac_ext >&5
11219 ac_cv_header_stdc=no
11220 fi
11221 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11222 fi
11223 fi
11224 fi
11225 echo "$as_me:11225: result: $ac_cv_header_stdc" >&5
11226 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11227 if test $ac_cv_header_stdc = yes; then
11228
11229 cat >>confdefs.h <<\EOF
11230 #define STDC_HEADERS 1
11231 EOF
11232
11233 fi
11234
11235 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11236
11237 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11238                   inttypes.h stdint.h unistd.h
11239 do
11240 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11241 echo "$as_me:11241: checking for $ac_header" >&5
11242 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11243 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11244   echo $ECHO_N "(cached) $ECHO_C" >&6
11245 else
11246   cat >conftest.$ac_ext <<_ACEOF
11247 #line 11247 "configure"
11248 #include "confdefs.h"
11249 $ac_includes_default
11250 #include <$ac_header>
11251 _ACEOF
11252 rm -f conftest.$ac_objext
11253 if { (eval echo "$as_me:11253: \"$ac_compile\"") >&5
11254   (eval $ac_compile) 2>&5
11255   ac_status=$?
11256   echo "$as_me:11256: \$? = $ac_status" >&5
11257   (exit $ac_status); } &&
11258          { ac_try='test -s conftest.$ac_objext'
11259   { (eval echo "$as_me:11259: \"$ac_try\"") >&5
11260   (eval $ac_try) 2>&5
11261   ac_status=$?
11262   echo "$as_me:11262: \$? = $ac_status" >&5
11263   (exit $ac_status); }; }; then
11264   eval "$as_ac_Header=yes"
11265 else
11266   echo "$as_me: failed program was:" >&5
11267 cat conftest.$ac_ext >&5
11268 eval "$as_ac_Header=no"
11269 fi
11270 rm -f conftest.$ac_objext conftest.$ac_ext
11271 fi
11272 echo "$as_me:11272: result: `eval echo '${'$as_ac_Header'}'`" >&5
11273 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11274 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11275   cat >>confdefs.h <<EOF
11276 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11277 EOF
11278
11279 fi
11280 done
11281
11282 echo "$as_me:11282: checking for signed char" >&5
11283 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11284 if test "${ac_cv_type_signed_char+set}" = set; then
11285   echo $ECHO_N "(cached) $ECHO_C" >&6
11286 else
11287   cat >conftest.$ac_ext <<_ACEOF
11288 #line 11288 "configure"
11289 #include "confdefs.h"
11290 $ac_includes_default
11291 int
11292 main ()
11293 {
11294 if ((signed char *) 0)
11295   return 0;
11296 if (sizeof (signed char))
11297   return 0;
11298   ;
11299   return 0;
11300 }
11301 _ACEOF
11302 rm -f conftest.$ac_objext
11303 if { (eval echo "$as_me:11303: \"$ac_compile\"") >&5
11304   (eval $ac_compile) 2>&5
11305   ac_status=$?
11306   echo "$as_me:11306: \$? = $ac_status" >&5
11307   (exit $ac_status); } &&
11308          { ac_try='test -s conftest.$ac_objext'
11309   { (eval echo "$as_me:11309: \"$ac_try\"") >&5
11310   (eval $ac_try) 2>&5
11311   ac_status=$?
11312   echo "$as_me:11312: \$? = $ac_status" >&5
11313   (exit $ac_status); }; }; then
11314   ac_cv_type_signed_char=yes
11315 else
11316   echo "$as_me: failed program was:" >&5
11317 cat conftest.$ac_ext >&5
11318 ac_cv_type_signed_char=no
11319 fi
11320 rm -f conftest.$ac_objext conftest.$ac_ext
11321 fi
11322 echo "$as_me:11322: result: $ac_cv_type_signed_char" >&5
11323 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11324
11325 echo "$as_me:11325: checking size of signed char" >&5
11326 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11327 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11328   echo $ECHO_N "(cached) $ECHO_C" >&6
11329 else
11330   if test "$ac_cv_type_signed_char" = yes; then
11331   if test "$cross_compiling" = yes; then
11332   # Depending upon the size, compute the lo and hi bounds.
11333 cat >conftest.$ac_ext <<_ACEOF
11334 #line 11334 "configure"
11335 #include "confdefs.h"
11336 $ac_includes_default
11337 int
11338 main ()
11339 {
11340 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11341   ;
11342   return 0;
11343 }
11344 _ACEOF
11345 rm -f conftest.$ac_objext
11346 if { (eval echo "$as_me:11346: \"$ac_compile\"") >&5
11347   (eval $ac_compile) 2>&5
11348   ac_status=$?
11349   echo "$as_me:11349: \$? = $ac_status" >&5
11350   (exit $ac_status); } &&
11351          { ac_try='test -s conftest.$ac_objext'
11352   { (eval echo "$as_me:11352: \"$ac_try\"") >&5
11353   (eval $ac_try) 2>&5
11354   ac_status=$?
11355   echo "$as_me:11355: \$? = $ac_status" >&5
11356   (exit $ac_status); }; }; then
11357   ac_lo=0 ac_mid=0
11358   while :; do
11359     cat >conftest.$ac_ext <<_ACEOF
11360 #line 11360 "configure"
11361 #include "confdefs.h"
11362 $ac_includes_default
11363 int
11364 main ()
11365 {
11366 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11367   ;
11368   return 0;
11369 }
11370 _ACEOF
11371 rm -f conftest.$ac_objext
11372 if { (eval echo "$as_me:11372: \"$ac_compile\"") >&5
11373   (eval $ac_compile) 2>&5
11374   ac_status=$?
11375   echo "$as_me:11375: \$? = $ac_status" >&5
11376   (exit $ac_status); } &&
11377          { ac_try='test -s conftest.$ac_objext'
11378   { (eval echo "$as_me:11378: \"$ac_try\"") >&5
11379   (eval $ac_try) 2>&5
11380   ac_status=$?
11381   echo "$as_me:11381: \$? = $ac_status" >&5
11382   (exit $ac_status); }; }; then
11383   ac_hi=$ac_mid; break
11384 else
11385   echo "$as_me: failed program was:" >&5
11386 cat conftest.$ac_ext >&5
11387 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11388 fi
11389 rm -f conftest.$ac_objext conftest.$ac_ext
11390   done
11391 else
11392   echo "$as_me: failed program was:" >&5
11393 cat conftest.$ac_ext >&5
11394 ac_hi=-1 ac_mid=-1
11395   while :; do
11396     cat >conftest.$ac_ext <<_ACEOF
11397 #line 11397 "configure"
11398 #include "confdefs.h"
11399 $ac_includes_default
11400 int
11401 main ()
11402 {
11403 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11404   ;
11405   return 0;
11406 }
11407 _ACEOF
11408 rm -f conftest.$ac_objext
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); } &&
11414          { ac_try='test -s conftest.$ac_objext'
11415   { (eval echo "$as_me:11415: \"$ac_try\"") >&5
11416   (eval $ac_try) 2>&5
11417   ac_status=$?
11418   echo "$as_me:11418: \$? = $ac_status" >&5
11419   (exit $ac_status); }; }; then
11420   ac_lo=$ac_mid; break
11421 else
11422   echo "$as_me: failed program was:" >&5
11423 cat conftest.$ac_ext >&5
11424 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11425 fi
11426 rm -f conftest.$ac_objext conftest.$ac_ext
11427   done
11428 fi
11429 rm -f conftest.$ac_objext conftest.$ac_ext
11430 # Binary search between lo and hi bounds.
11431 while test "x$ac_lo" != "x$ac_hi"; do
11432   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11433   cat >conftest.$ac_ext <<_ACEOF
11434 #line 11434 "configure"
11435 #include "confdefs.h"
11436 $ac_includes_default
11437 int
11438 main ()
11439 {
11440 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11441   ;
11442   return 0;
11443 }
11444 _ACEOF
11445 rm -f conftest.$ac_objext
11446 if { (eval echo "$as_me:11446: \"$ac_compile\"") >&5
11447   (eval $ac_compile) 2>&5
11448   ac_status=$?
11449   echo "$as_me:11449: \$? = $ac_status" >&5
11450   (exit $ac_status); } &&
11451          { ac_try='test -s conftest.$ac_objext'
11452   { (eval echo "$as_me:11452: \"$ac_try\"") >&5
11453   (eval $ac_try) 2>&5
11454   ac_status=$?
11455   echo "$as_me:11455: \$? = $ac_status" >&5
11456   (exit $ac_status); }; }; then
11457   ac_hi=$ac_mid
11458 else
11459   echo "$as_me: failed program was:" >&5
11460 cat conftest.$ac_ext >&5
11461 ac_lo=`expr $ac_mid + 1`
11462 fi
11463 rm -f conftest.$ac_objext conftest.$ac_ext
11464 done
11465 ac_cv_sizeof_signed_char=$ac_lo
11466 else
11467   if test "$cross_compiling" = yes; then
11468   { { echo "$as_me:11468: error: cannot run test program while cross compiling" >&5
11469 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11470    { (exit 1); exit 1; }; }
11471 else
11472   cat >conftest.$ac_ext <<_ACEOF
11473 #line 11473 "configure"
11474 #include "confdefs.h"
11475 $ac_includes_default
11476 int
11477 main ()
11478 {
11479 FILE *f = fopen ("conftest.val", "w");
11480 if (!f)
11481   $ac_main_return (1);
11482 fprintf (f, "%d", (sizeof (signed char)));
11483 fclose (f);
11484   ;
11485   return 0;
11486 }
11487 _ACEOF
11488 rm -f conftest$ac_exeext
11489 if { (eval echo "$as_me:11489: \"$ac_link\"") >&5
11490   (eval $ac_link) 2>&5
11491   ac_status=$?
11492   echo "$as_me:11492: \$? = $ac_status" >&5
11493   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11494   { (eval echo "$as_me:11494: \"$ac_try\"") >&5
11495   (eval $ac_try) 2>&5
11496   ac_status=$?
11497   echo "$as_me:11497: \$? = $ac_status" >&5
11498   (exit $ac_status); }; }; then
11499   ac_cv_sizeof_signed_char=`cat conftest.val`
11500 else
11501   echo "$as_me: program exited with status $ac_status" >&5
11502 echo "$as_me: failed program was:" >&5
11503 cat conftest.$ac_ext >&5
11504 fi
11505 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11506 fi
11507 fi
11508 rm -f conftest.val
11509 else
11510   ac_cv_sizeof_signed_char=0
11511 fi
11512 fi
11513 echo "$as_me:11513: result: $ac_cv_sizeof_signed_char" >&5
11514 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11515 cat >>confdefs.h <<EOF
11516 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11517 EOF
11518
11519 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11520         NCURSES_SBOOL="signed char"
11521 else
11522         NCURSES_SBOOL="char"
11523 fi
11524 echo "$as_me:11524: checking if you want to use signed Boolean array in term.h" >&5
11525 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11526
11527 # Check whether --enable-signed-char or --disable-signed-char was given.
11528 if test "${enable_signed_char+set}" = set; then
11529   enableval="$enable_signed_char"
11530   with_signed_char=$enableval
11531 else
11532   with_signed_char=no
11533 fi;
11534 echo "$as_me:11534: result: $with_signed_char" >&5
11535 echo "${ECHO_T}$with_signed_char" >&6
11536 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
11537
11538 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11539 echo "$as_me:11539: checking if you want SIGWINCH handler" >&5
11540 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11541
11542 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11543 if test "${enable_sigwinch+set}" = set; then
11544   enableval="$enable_sigwinch"
11545   with_sigwinch=$enableval
11546 else
11547   with_sigwinch=$with_ext_funcs
11548 fi;
11549 echo "$as_me:11549: result: $with_sigwinch" >&5
11550 echo "${ECHO_T}$with_sigwinch" >&6
11551 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
11552 #define USE_SIGWINCH 1
11553 EOF
11554
11555 ###   use option --enable-tcap-names to allow user to define new capabilities
11556 echo "$as_me:11556: checking if you want user-definable terminal capabilities like termcap" >&5
11557 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11558
11559 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11560 if test "${enable_tcap_names+set}" = set; then
11561   enableval="$enable_tcap_names"
11562   with_tcap_names=$enableval
11563 else
11564   with_tcap_names=$with_ext_funcs
11565 fi;
11566 echo "$as_me:11566: result: $with_tcap_names" >&5
11567 echo "${ECHO_T}$with_tcap_names" >&6
11568 NCURSES_XNAMES=0
11569 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
11570
11571 ###############################################################################
11572 # These options are relatively safe to experiment with.
11573
11574 echo "$as_me:11574: checking if you want all development code" >&5
11575 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11576
11577 # Check whether --with-develop or --without-develop was given.
11578 if test "${with_develop+set}" = set; then
11579   withval="$with_develop"
11580   with_develop=$withval
11581 else
11582   with_develop=no
11583 fi;
11584 echo "$as_me:11584: result: $with_develop" >&5
11585 echo "${ECHO_T}$with_develop" >&6
11586
11587 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11588 echo "$as_me:11588: checking if you want hard-tabs code" >&5
11589 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11590
11591 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11592 if test "${enable_hard_tabs+set}" = set; then
11593   enableval="$enable_hard_tabs"
11594
11595 else
11596   enable_hard_tabs=$with_develop
11597 fi;
11598 echo "$as_me:11598: result: $enable_hard_tabs" >&5
11599 echo "${ECHO_T}$enable_hard_tabs" >&6
11600 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
11601 #define USE_HARD_TABS 1
11602 EOF
11603
11604 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11605 echo "$as_me:11605: checking if you want limited support for xmc" >&5
11606 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11607
11608 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11609 if test "${enable_xmc_glitch+set}" = set; then
11610   enableval="$enable_xmc_glitch"
11611
11612 else
11613   enable_xmc_glitch=$with_develop
11614 fi;
11615 echo "$as_me:11615: result: $enable_xmc_glitch" >&5
11616 echo "${ECHO_T}$enable_xmc_glitch" >&6
11617 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
11618 #define USE_XMC_SUPPORT 1
11619 EOF
11620
11621 ###############################################################################
11622 # These are just experimental, probably should not be in a package:
11623
11624 echo "$as_me:11624: checking if you do not want to assume colors are white-on-black" >&5
11625 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11626
11627 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11628 if test "${enable_assumed_color+set}" = set; then
11629   enableval="$enable_assumed_color"
11630   with_assumed_color=$enableval
11631 else
11632   with_assumed_color=yes
11633 fi;
11634 echo "$as_me:11634: result: $with_assumed_color" >&5
11635 echo "${ECHO_T}$with_assumed_color" >&6
11636 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
11637 #define USE_ASSUMED_COLOR 1
11638 EOF
11639
11640 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11641 echo "$as_me:11641: checking if you want hashmap scrolling-optimization code" >&5
11642 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11643
11644 # Check whether --enable-hashmap or --disable-hashmap was given.
11645 if test "${enable_hashmap+set}" = set; then
11646   enableval="$enable_hashmap"
11647   with_hashmap=$enableval
11648 else
11649   with_hashmap=yes
11650 fi;
11651 echo "$as_me:11651: result: $with_hashmap" >&5
11652 echo "${ECHO_T}$with_hashmap" >&6
11653 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
11654 #define USE_HASHMAP 1
11655 EOF
11656
11657 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11658 echo "$as_me:11658: checking if you want colorfgbg code" >&5
11659 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11660
11661 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11662 if test "${enable_colorfgbg+set}" = set; then
11663   enableval="$enable_colorfgbg"
11664   with_colorfgbg=$enableval
11665 else
11666   with_colorfgbg=no
11667 fi;
11668 echo "$as_me:11668: result: $with_colorfgbg" >&5
11669 echo "${ECHO_T}$with_colorfgbg" >&6
11670 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
11671 #define USE_COLORFGBG 1
11672 EOF
11673
11674 ###   use option --enable-interop to turn on use of bindings used for interop
11675 echo "$as_me:11675: checking if you want interop bindings" >&5
11676 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11677
11678 # Check whether --enable-interop or --disable-interop was given.
11679 if test "${enable_interop+set}" = set; then
11680   enableval="$enable_interop"
11681   with_exp_interop=$enableval
11682 else
11683   with_exp_interop=no
11684 fi;
11685 echo "$as_me:11685: result: $with_exp_interop" >&5
11686 echo "${ECHO_T}$with_exp_interop" >&6
11687
11688 NCURSES_INTEROP_FUNCS=0
11689 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
11690
11691 # This is still experimental (20080329), but should ultimately be moved to
11692 # the script-block --with-normal, etc.
11693
11694 echo "$as_me:11694: checking if you want to link with the pthread library" >&5
11695 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11696
11697 # Check whether --with-pthread or --without-pthread was given.
11698 if test "${with_pthread+set}" = set; then
11699   withval="$with_pthread"
11700   with_pthread=$withval
11701 else
11702   with_pthread=no
11703 fi;
11704 echo "$as_me:11704: result: $with_pthread" >&5
11705 echo "${ECHO_T}$with_pthread" >&6
11706
11707 if test "$with_pthread" != no ; then
11708     echo "$as_me:11708: checking for pthread.h" >&5
11709 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11710 if test "${ac_cv_header_pthread_h+set}" = set; then
11711   echo $ECHO_N "(cached) $ECHO_C" >&6
11712 else
11713   cat >conftest.$ac_ext <<_ACEOF
11714 #line 11714 "configure"
11715 #include "confdefs.h"
11716 #include <pthread.h>
11717 _ACEOF
11718 if { (eval echo "$as_me:11718: \"$ac_cpp conftest.$ac_ext\"") >&5
11719   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11720   ac_status=$?
11721   egrep -v '^ *\+' conftest.er1 >conftest.err
11722   rm -f conftest.er1
11723   cat conftest.err >&5
11724   echo "$as_me:11724: \$? = $ac_status" >&5
11725   (exit $ac_status); } >/dev/null; then
11726   if test -s conftest.err; then
11727     ac_cpp_err=$ac_c_preproc_warn_flag
11728   else
11729     ac_cpp_err=
11730   fi
11731 else
11732   ac_cpp_err=yes
11733 fi
11734 if test -z "$ac_cpp_err"; then
11735   ac_cv_header_pthread_h=yes
11736 else
11737   echo "$as_me: failed program was:" >&5
11738   cat conftest.$ac_ext >&5
11739   ac_cv_header_pthread_h=no
11740 fi
11741 rm -f conftest.err conftest.$ac_ext
11742 fi
11743 echo "$as_me:11743: result: $ac_cv_header_pthread_h" >&5
11744 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11745 if test $ac_cv_header_pthread_h = yes; then
11746
11747         cat >>confdefs.h <<\EOF
11748 #define HAVE_PTHREADS_H 1
11749 EOF
11750
11751         for cf_lib_pthread in pthread c_r
11752         do
11753             echo "$as_me:11753: checking if we can link with the $cf_lib_pthread library" >&5
11754 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11755             cf_save_LIBS="$LIBS"
11756             LIBS="-l$cf_lib_pthread $LIBS"
11757             cat >conftest.$ac_ext <<_ACEOF
11758 #line 11758 "configure"
11759 #include "confdefs.h"
11760
11761 #include <pthread.h>
11762
11763 int
11764 main ()
11765 {
11766
11767                 int rc = pthread_create(0,0,0,0);
11768                 int r2 = pthread_mutexattr_settype(0, 0);
11769
11770   ;
11771   return 0;
11772 }
11773 _ACEOF
11774 rm -f conftest.$ac_objext conftest$ac_exeext
11775 if { (eval echo "$as_me:11775: \"$ac_link\"") >&5
11776   (eval $ac_link) 2>&5
11777   ac_status=$?
11778   echo "$as_me:11778: \$? = $ac_status" >&5
11779   (exit $ac_status); } &&
11780          { ac_try='test -s conftest$ac_exeext'
11781   { (eval echo "$as_me:11781: \"$ac_try\"") >&5
11782   (eval $ac_try) 2>&5
11783   ac_status=$?
11784   echo "$as_me:11784: \$? = $ac_status" >&5
11785   (exit $ac_status); }; }; then
11786   with_pthread=yes
11787 else
11788   echo "$as_me: failed program was:" >&5
11789 cat conftest.$ac_ext >&5
11790 with_pthread=no
11791 fi
11792 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11793             LIBS="$cf_save_LIBS"
11794             echo "$as_me:11794: result: $with_pthread" >&5
11795 echo "${ECHO_T}$with_pthread" >&6
11796             test "$with_pthread" = yes && break
11797         done
11798
11799         if test "$with_pthread" = yes ; then
11800             LIBS="-l$cf_lib_pthread $LIBS"
11801             cat >>confdefs.h <<\EOF
11802 #define HAVE_LIBPTHREADS 1
11803 EOF
11804
11805         else
11806             { { echo "$as_me:11806: error: Cannot link with pthread library" >&5
11807 echo "$as_me: error: Cannot link with pthread library" >&2;}
11808    { (exit 1); exit 1; }; }
11809         fi
11810
11811 fi
11812
11813 fi
11814
11815 if test "x$with_pthread" != xno; then
11816         echo "$as_me:11816: checking for pthread_kill" >&5
11817 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11818 if test "${ac_cv_func_pthread_kill+set}" = set; then
11819   echo $ECHO_N "(cached) $ECHO_C" >&6
11820 else
11821   cat >conftest.$ac_ext <<_ACEOF
11822 #line 11822 "configure"
11823 #include "confdefs.h"
11824 /* System header to define __stub macros and hopefully few prototypes,
11825     which can conflict with char pthread_kill (); below.  */
11826 #include <assert.h>
11827 /* Override any gcc2 internal prototype to avoid an error.  */
11828 #ifdef __cplusplus
11829 extern "C"
11830 #endif
11831 /* We use char because int might match the return type of a gcc2
11832    builtin and then its argument prototype would still apply.  */
11833 char pthread_kill ();
11834 char (*f) ();
11835
11836 int
11837 main ()
11838 {
11839 /* The GNU C library defines this for functions which it implements
11840     to always fail with ENOSYS.  Some functions are actually named
11841     something starting with __ and the normal name is an alias.  */
11842 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11843 choke me
11844 #else
11845 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11846 #endif
11847
11848   ;
11849   return 0;
11850 }
11851 _ACEOF
11852 rm -f conftest.$ac_objext conftest$ac_exeext
11853 if { (eval echo "$as_me:11853: \"$ac_link\"") >&5
11854   (eval $ac_link) 2>&5
11855   ac_status=$?
11856   echo "$as_me:11856: \$? = $ac_status" >&5
11857   (exit $ac_status); } &&
11858          { ac_try='test -s conftest$ac_exeext'
11859   { (eval echo "$as_me:11859: \"$ac_try\"") >&5
11860   (eval $ac_try) 2>&5
11861   ac_status=$?
11862   echo "$as_me:11862: \$? = $ac_status" >&5
11863   (exit $ac_status); }; }; then
11864   ac_cv_func_pthread_kill=yes
11865 else
11866   echo "$as_me: failed program was:" >&5
11867 cat conftest.$ac_ext >&5
11868 ac_cv_func_pthread_kill=no
11869 fi
11870 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11871 fi
11872 echo "$as_me:11872: result: $ac_cv_func_pthread_kill" >&5
11873 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11874 if test $ac_cv_func_pthread_kill = yes; then
11875
11876                 echo "$as_me:11876: checking if you want to allow EINTR in wgetch with pthreads" >&5
11877 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11878
11879 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11880 if test "${enable_pthreads_eintr+set}" = set; then
11881   enableval="$enable_pthreads_eintr"
11882   use_pthreads_eintr=$enableval
11883 else
11884   use_pthreads_eintr=no
11885 fi;
11886                 echo "$as_me:11886: result: $use_pthreads_eintr" >&5
11887 echo "${ECHO_T}$use_pthreads_eintr" >&6
11888                 if test $use_pthreads_eintr = yes ; then
11889                         cat >>confdefs.h <<\EOF
11890 #define USE_PTHREADS_EINTR 1
11891 EOF
11892
11893                 fi
11894 fi
11895
11896         echo "$as_me:11896: checking if you want to use weak-symbols for pthreads" >&5
11897 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11898
11899 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11900 if test "${enable_weak_symbols+set}" = set; then
11901   enableval="$enable_weak_symbols"
11902   use_weak_symbols=$enableval
11903 else
11904   use_weak_symbols=no
11905 fi;
11906         echo "$as_me:11906: result: $use_weak_symbols" >&5
11907 echo "${ECHO_T}$use_weak_symbols" >&6
11908         if test "$use_weak_symbols" = yes ; then
11909
11910 echo "$as_me:11910: checking if $CC supports weak symbols" >&5
11911 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11912 if test "${cf_cv_weak_symbols+set}" = set; then
11913   echo $ECHO_N "(cached) $ECHO_C" >&6
11914 else
11915
11916 cat >conftest.$ac_ext <<_ACEOF
11917 #line 11917 "configure"
11918 #include "confdefs.h"
11919
11920 #include <stdio.h>
11921 int
11922 main ()
11923 {
11924
11925 #if defined(__GNUC__)
11926 #  if defined __USE_ISOC99
11927 #    define _cat_pragma(exp)    _Pragma(#exp)
11928 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11929 #  else
11930 #    define _weak_pragma(exp)
11931 #  endif
11932 #  define _declare(name)        __extension__ extern __typeof__(name) name
11933 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11934 #endif
11935
11936 weak_symbol(fopen);
11937
11938   ;
11939   return 0;
11940 }
11941 _ACEOF
11942 rm -f conftest.$ac_objext
11943 if { (eval echo "$as_me:11943: \"$ac_compile\"") >&5
11944   (eval $ac_compile) 2>&5
11945   ac_status=$?
11946   echo "$as_me:11946: \$? = $ac_status" >&5
11947   (exit $ac_status); } &&
11948          { ac_try='test -s conftest.$ac_objext'
11949   { (eval echo "$as_me:11949: \"$ac_try\"") >&5
11950   (eval $ac_try) 2>&5
11951   ac_status=$?
11952   echo "$as_me:11952: \$? = $ac_status" >&5
11953   (exit $ac_status); }; }; then
11954   cf_cv_weak_symbols=yes
11955 else
11956   echo "$as_me: failed program was:" >&5
11957 cat conftest.$ac_ext >&5
11958 cf_cv_weak_symbols=no
11959 fi
11960 rm -f conftest.$ac_objext conftest.$ac_ext
11961
11962 fi
11963 echo "$as_me:11963: result: $cf_cv_weak_symbols" >&5
11964 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11965
11966         else
11967                 cf_cv_weak_symbols=no
11968         fi
11969
11970         if test $cf_cv_weak_symbols = yes ; then
11971                 cat >>confdefs.h <<\EOF
11972 #define USE_WEAK_SYMBOLS 1
11973 EOF
11974
11975         fi
11976 fi
11977
11978 PTHREAD=
11979 if test "$with_pthread" = "yes" ; then
11980     cat >>confdefs.h <<\EOF
11981 #define USE_PTHREADS 1
11982 EOF
11983
11984     enable_reentrant=yes
11985     if test $cf_cv_weak_symbols = yes ; then
11986         PTHREAD=-lpthread
11987     fi
11988 fi
11989
11990 # Reentrant code has to be opaque; there's little advantage to making ncurses
11991 # opaque outside of that, so there is no --enable-opaque option.  We can use
11992 # this option without --with-pthreads, but this will be always set for
11993 # pthreads.
11994 echo "$as_me:11994: checking if you want experimental reentrant code" >&5
11995 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11996
11997 # Check whether --enable-reentrant or --disable-reentrant was given.
11998 if test "${enable_reentrant+set}" = set; then
11999   enableval="$enable_reentrant"
12000   with_reentrant=$enableval
12001 else
12002   with_reentrant=no
12003 fi;
12004 echo "$as_me:12004: result: $with_reentrant" >&5
12005 echo "${ECHO_T}$with_reentrant" >&6
12006 if test "$with_reentrant" = yes ; then
12007         cf_cv_enable_reentrant=1
12008         cf_cv_enable_opaque="NCURSES_INTERNALS"
12009         NCURSES_OPAQUE=1
12010         NCURSES_SIZE_T=int
12011         if test $cf_cv_weak_symbols = yes ; then
12012
12013 # remove pthread library from $LIBS
12014 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12015
12016                 TEST_LIBS="-lpthread $TEST_LIBS"
12017                 TEST_LIBS2="-lpthread $TEST_LIBS2"
12018         else
12019                 LIB_SUFFIX="t${LIB_SUFFIX}"
12020         fi
12021         cat >>confdefs.h <<\EOF
12022 #define USE_REENTRANT 1
12023 EOF
12024
12025 if test "${with_abi_version+set}" != set; then
12026         case $cf_cv_rel_version in
12027         5.*)
12028                 cf_cv_rel_version=6.0
12029                 cf_cv_abi_version=6
12030                 { echo "$as_me:12030: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12031 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12032                 ;;
12033         esac
12034 fi
12035
12036 else
12037         cf_cv_enable_reentrant=0
12038         cf_cv_enable_opaque="NCURSES_OPAQUE"
12039         NCURSES_OPAQUE=0
12040         NCURSES_SIZE_T=short
12041 fi
12042
12043 ### Allow using a different wrap-prefix
12044 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12045         echo "$as_me:12045: checking for prefix used to wrap public variables" >&5
12046 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12047
12048 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12049 if test "${with_wrap_prefix+set}" = set; then
12050   withval="$with_wrap_prefix"
12051   NCURSES_WRAP_PREFIX=$withval
12052 else
12053   NCURSES_WRAP_PREFIX=_nc_
12054 fi;
12055         echo "$as_me:12055: result: $NCURSES_WRAP_PREFIX" >&5
12056 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12057 else
12058         NCURSES_WRAP_PREFIX=_nc_
12059 fi
12060
12061 cat >>confdefs.h <<EOF
12062 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12063 EOF
12064
12065 echo "$as_me:12065: checking if you want experimental safe-sprintf code" >&5
12066 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12067
12068 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12069 if test "${enable_safe_sprintf+set}" = set; then
12070   enableval="$enable_safe_sprintf"
12071   with_safe_sprintf=$enableval
12072 else
12073   with_safe_sprintf=no
12074 fi;
12075 echo "$as_me:12075: result: $with_safe_sprintf" >&5
12076 echo "${ECHO_T}$with_safe_sprintf" >&6
12077 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
12078 #define USE_SAFE_SPRINTF 1
12079 EOF
12080
12081 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12082 # when hashmap is used scroll hints are useless
12083 if test "$with_hashmap" = no ; then
12084 echo "$as_me:12084: checking if you want to experiment without scrolling-hints code" >&5
12085 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12086
12087 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12088 if test "${enable_scroll_hints+set}" = set; then
12089   enableval="$enable_scroll_hints"
12090   with_scroll_hints=$enableval
12091 else
12092   with_scroll_hints=yes
12093 fi;
12094 echo "$as_me:12094: result: $with_scroll_hints" >&5
12095 echo "${ECHO_T}$with_scroll_hints" >&6
12096 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
12097 #define USE_SCROLL_HINTS 1
12098 EOF
12099
12100 fi
12101
12102 echo "$as_me:12102: checking if you want experimental wgetch-events code" >&5
12103 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12104
12105 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12106 if test "${enable_wgetch_events+set}" = set; then
12107   enableval="$enable_wgetch_events"
12108   with_wgetch_events=$enableval
12109 else
12110   with_wgetch_events=no
12111 fi;
12112 echo "$as_me:12112: result: $with_wgetch_events" >&5
12113 echo "${ECHO_T}$with_wgetch_events" >&6
12114 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
12115 #define NCURSES_WGETCH_EVENTS 1
12116 EOF
12117
12118 ###############################################################################
12119
12120 ###     use option --disable-echo to suppress full display compiling commands
12121
12122 echo "$as_me:12122: checking if you want to see long compiling messages" >&5
12123 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12124
12125 # Check whether --enable-echo or --disable-echo was given.
12126 if test "${enable_echo+set}" = set; then
12127   enableval="$enable_echo"
12128   test "$enableval" != no && enableval=yes
12129   if test "$enableval" != "yes" ; then
12130
12131     ECHO_LT='--silent'
12132     ECHO_LD='@echo linking $@;'
12133     RULE_CC='@echo compiling $<'
12134     SHOW_CC='@echo compiling $@'
12135     ECHO_CC='@'
12136
12137   else
12138
12139     ECHO_LT=''
12140     ECHO_LD=''
12141     RULE_CC=''
12142     SHOW_CC=''
12143     ECHO_CC=''
12144
12145   fi
12146 else
12147   enableval=yes
12148
12149     ECHO_LT=''
12150     ECHO_LD=''
12151     RULE_CC=''
12152     SHOW_CC=''
12153     ECHO_CC=''
12154
12155 fi;
12156 echo "$as_me:12156: result: $enableval" >&5
12157 echo "${ECHO_T}$enableval" >&6
12158
12159 if test "$enable_echo" = yes; then
12160         ECHO_LINK=
12161 else
12162         ECHO_LINK='@ echo linking $@ ... ;'
12163         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12164         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12165 fi
12166
12167 ###     use option --enable-warnings to turn on all gcc warnings
12168 echo "$as_me:12168: checking if you want to see compiler warnings" >&5
12169 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12170
12171 # Check whether --enable-warnings or --disable-warnings was given.
12172 if test "${enable_warnings+set}" = set; then
12173   enableval="$enable_warnings"
12174   with_warnings=$enableval
12175 fi;
12176 echo "$as_me:12176: result: $with_warnings" >&5
12177 echo "${ECHO_T}$with_warnings" >&6
12178
12179 if test "x$with_warnings" = "xyes"; then
12180
12181         ADAFLAGS="$ADAFLAGS -gnatg"
12182
12183 INTEL_COMPILER=no
12184
12185 if test "$GCC" = yes ; then
12186         case $host_os in
12187         linux*|gnu*)
12188                 echo "$as_me:12188: checking if this is really Intel C compiler" >&5
12189 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12190                 cf_save_CFLAGS="$CFLAGS"
12191                 CFLAGS="$CFLAGS -no-gcc"
12192                 cat >conftest.$ac_ext <<_ACEOF
12193 #line 12193 "configure"
12194 #include "confdefs.h"
12195
12196 int
12197 main ()
12198 {
12199
12200 #ifdef __INTEL_COMPILER
12201 #else
12202 make an error
12203 #endif
12204
12205   ;
12206   return 0;
12207 }
12208 _ACEOF
12209 rm -f conftest.$ac_objext
12210 if { (eval echo "$as_me:12210: \"$ac_compile\"") >&5
12211   (eval $ac_compile) 2>&5
12212   ac_status=$?
12213   echo "$as_me:12213: \$? = $ac_status" >&5
12214   (exit $ac_status); } &&
12215          { ac_try='test -s conftest.$ac_objext'
12216   { (eval echo "$as_me:12216: \"$ac_try\"") >&5
12217   (eval $ac_try) 2>&5
12218   ac_status=$?
12219   echo "$as_me:12219: \$? = $ac_status" >&5
12220   (exit $ac_status); }; }; then
12221   INTEL_COMPILER=yes
12222 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12223
12224 else
12225   echo "$as_me: failed program was:" >&5
12226 cat conftest.$ac_ext >&5
12227 fi
12228 rm -f conftest.$ac_objext conftest.$ac_ext
12229                 CFLAGS="$cf_save_CFLAGS"
12230                 echo "$as_me:12230: result: $INTEL_COMPILER" >&5
12231 echo "${ECHO_T}$INTEL_COMPILER" >&6
12232                 ;;
12233         esac
12234 fi
12235
12236 cat > conftest.$ac_ext <<EOF
12237 #line 12237 "${as_me:-configure}"
12238 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12239 EOF
12240
12241 if test "$INTEL_COMPILER" = yes
12242 then
12243 # The "-wdXXX" options suppress warnings:
12244 # remark #1419: external declaration in primary source file
12245 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12246 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12247 # remark #193: zero used for undefined preprocessing identifier
12248 # remark #593: variable "curs_sb_left_arrow" was set but never used
12249 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12250 # remark #869: parameter "tw" was never referenced
12251 # remark #981: operands are evaluated in unspecified order
12252 # warning #279: controlling expression is constant
12253
12254         { echo "$as_me:12254: checking for $CC warning options..." >&5
12255 echo "$as_me: checking for $CC warning options..." >&6;}
12256         cf_save_CFLAGS="$CFLAGS"
12257         EXTRA_CFLAGS="-Wall"
12258         for cf_opt in \
12259                 wd1419 \
12260                 wd1683 \
12261                 wd1684 \
12262                 wd193 \
12263                 wd593 \
12264                 wd279 \
12265                 wd810 \
12266                 wd869 \
12267                 wd981
12268         do
12269                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12270                 if { (eval echo "$as_me:12270: \"$ac_compile\"") >&5
12271   (eval $ac_compile) 2>&5
12272   ac_status=$?
12273   echo "$as_me:12273: \$? = $ac_status" >&5
12274   (exit $ac_status); }; then
12275                         test -n "$verbose" && echo "$as_me:12275: result: ... -$cf_opt" >&5
12276 echo "${ECHO_T}... -$cf_opt" >&6
12277                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12278                 fi
12279         done
12280         CFLAGS="$cf_save_CFLAGS"
12281
12282 elif test "$GCC" = yes
12283 then
12284         { echo "$as_me:12284: checking for $CC warning options..." >&5
12285 echo "$as_me: checking for $CC warning options..." >&6;}
12286         cf_save_CFLAGS="$CFLAGS"
12287         EXTRA_CFLAGS=
12288         cf_warn_CONST=""
12289         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12290         for cf_opt in W Wall \
12291                 Wbad-function-cast \
12292                 Wcast-align \
12293                 Wcast-qual \
12294                 Winline \
12295                 Wmissing-declarations \
12296                 Wmissing-prototypes \
12297                 Wnested-externs \
12298                 Wpointer-arith \
12299                 Wshadow \
12300                 Wstrict-prototypes \
12301                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12302         do
12303                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12304                 if { (eval echo "$as_me:12304: \"$ac_compile\"") >&5
12305   (eval $ac_compile) 2>&5
12306   ac_status=$?
12307   echo "$as_me:12307: \$? = $ac_status" >&5
12308   (exit $ac_status); }; then
12309                         test -n "$verbose" && echo "$as_me:12309: result: ... -$cf_opt" >&5
12310 echo "${ECHO_T}... -$cf_opt" >&6
12311                         case $cf_opt in #(vi
12312                         Wcast-qual) #(vi
12313                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12314                                 ;;
12315                         Winline) #(vi
12316                                 case $GCC_VERSION in
12317                                 [34].*)
12318                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12319
12320 echo "${as_me:-configure}:12320: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12321
12322                                         continue;;
12323                                 esac
12324                                 ;;
12325                         esac
12326                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12327                 fi
12328         done
12329         CFLAGS="$cf_save_CFLAGS"
12330 fi
12331 rm -rf conftest*
12332
12333         if test "$cf_with_cxx" = yes ; then
12334
12335 INTEL_CPLUSPLUS=no
12336
12337 if test "$GCC" = yes ; then
12338         case $host_os in
12339         linux*|gnu*)
12340                 echo "$as_me:12340: checking if this is really Intel C++ compiler" >&5
12341 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12342                 cf_save_CFLAGS="$CXXFLAGS"
12343                 CXXFLAGS="$CXXFLAGS -no-gcc"
12344                 cat >conftest.$ac_ext <<_ACEOF
12345 #line 12345 "configure"
12346 #include "confdefs.h"
12347
12348 int
12349 main ()
12350 {
12351
12352 #ifdef __INTEL_COMPILER
12353 #else
12354 make an error
12355 #endif
12356
12357   ;
12358   return 0;
12359 }
12360 _ACEOF
12361 rm -f conftest.$ac_objext
12362 if { (eval echo "$as_me:12362: \"$ac_compile\"") >&5
12363   (eval $ac_compile) 2>&5
12364   ac_status=$?
12365   echo "$as_me:12365: \$? = $ac_status" >&5
12366   (exit $ac_status); } &&
12367          { ac_try='test -s conftest.$ac_objext'
12368   { (eval echo "$as_me:12368: \"$ac_try\"") >&5
12369   (eval $ac_try) 2>&5
12370   ac_status=$?
12371   echo "$as_me:12371: \$? = $ac_status" >&5
12372   (exit $ac_status); }; }; then
12373   INTEL_CPLUSPLUS=yes
12374 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12375
12376 else
12377   echo "$as_me: failed program was:" >&5
12378 cat conftest.$ac_ext >&5
12379 fi
12380 rm -f conftest.$ac_objext conftest.$ac_ext
12381                 CXXFLAGS="$cf_save_CFLAGS"
12382                 echo "$as_me:12382: result: $INTEL_CPLUSPLUS" >&5
12383 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12384                 ;;
12385         esac
12386 fi
12387
12388 ac_ext=cc
12389 ac_cpp='$CXXCPP $CPPFLAGS'
12390 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12391 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12392 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12393 ac_main_return=return
12394
12395 cat > conftest.$ac_ext <<EOF
12396 #line 12396 "configure"
12397 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12398 EOF
12399
12400 if test "$INTEL_CPLUSPLUS" = yes
12401 then
12402 # The "-wdXXX" options suppress warnings:
12403 # remark #1419: external declaration in primary source file
12404 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12405 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12406 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12407 # remark #193: zero used for undefined preprocessing identifier
12408 # remark #593: variable "curs_sb_left_arrow" was set but never used
12409 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12410 # remark #869: parameter "tw" was never referenced
12411 # remark #981: operands are evaluated in unspecified order
12412 # warning #269: invalid format string conversion
12413
12414         { echo "$as_me:12414: checking for $CC warning options..." >&5
12415 echo "$as_me: checking for $CC warning options..." >&6;}
12416         cf_save_CXXFLAGS="$CXXFLAGS"
12417         EXTRA_CXXFLAGS="-Wall"
12418         for cf_opt in \
12419                 wd1419 \
12420                 wd1682 \
12421                 wd1683 \
12422                 wd1684 \
12423                 wd193 \
12424                 wd279 \
12425                 wd593 \
12426                 wd810 \
12427                 wd869 \
12428                 wd981
12429         do
12430                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12431                 if { (eval echo "$as_me:12431: \"$ac_compile\"") >&5
12432   (eval $ac_compile) 2>&5
12433   ac_status=$?
12434   echo "$as_me:12434: \$? = $ac_status" >&5
12435   (exit $ac_status); }; then
12436                         test -n "$verbose" && echo "$as_me:12436: result: ... -$cf_opt" >&5
12437 echo "${ECHO_T}... -$cf_opt" >&6
12438                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12439                 fi
12440         done
12441         CXXFLAGS="$cf_save_CXXFLAGS"
12442
12443 elif test "$GXX" = yes
12444 then
12445         { echo "$as_me:12445: checking for $CXX warning options..." >&5
12446 echo "$as_me: checking for $CXX warning options..." >&6;}
12447         cf_save_CXXFLAGS="$CXXFLAGS"
12448         EXTRA_CXXFLAGS="-W -Wall"
12449         cf_gxx_extra_warnings=""
12450         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12451         case "$GCC_VERSION" in
12452         [1-2].*)
12453                 ;;
12454         *)
12455                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12456                 ;;
12457         esac
12458         for cf_opt in \
12459                 Wabi \
12460                 fabi-version=0 \
12461                 Woverloaded-virtual \
12462                 Wsign-promo \
12463                 Wsynth \
12464                 Wold-style-cast \
12465                 Wcast-align \
12466                 Wcast-qual \
12467                 Wmissing-prototypes \
12468                 Wpointer-arith \
12469                 Wshadow \
12470                 Wstrict-prototypes \
12471                 Wundef $cf_gxx_extra_warnings Wno-unused
12472         do
12473                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12474                 if { (eval echo "$as_me:12474: \"$ac_compile\"") >&5
12475   (eval $ac_compile) 2>&5
12476   ac_status=$?
12477   echo "$as_me:12477: \$? = $ac_status" >&5
12478   (exit $ac_status); }; then
12479                         test -n "$verbose" && echo "$as_me:12479: result: ... -$cf_opt" >&5
12480 echo "${ECHO_T}... -$cf_opt" >&6
12481                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12482                 else
12483                         test -n "$verbose" && echo "$as_me:12483: result: ... no -$cf_opt" >&5
12484 echo "${ECHO_T}... no -$cf_opt" >&6
12485                 fi
12486         done
12487         CXXFLAGS="$cf_save_CXXFLAGS"
12488 fi
12489
12490 rm -rf conftest*
12491 ac_ext=c
12492 ac_cpp='$CPP $CPPFLAGS'
12493 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12494 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12495 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12496 ac_main_return=return
12497
12498         fi
12499 fi
12500
12501 if test "$GCC" = yes
12502 then
12503 cat > conftest.i <<EOF
12504 #ifndef GCC_PRINTF
12505 #define GCC_PRINTF 0
12506 #endif
12507 #ifndef GCC_SCANF
12508 #define GCC_SCANF 0
12509 #endif
12510 #ifndef GCC_NORETURN
12511 #define GCC_NORETURN /* nothing */
12512 #endif
12513 #ifndef GCC_UNUSED
12514 #define GCC_UNUSED /* nothing */
12515 #endif
12516 EOF
12517 if test "$GCC" = yes
12518 then
12519         { echo "$as_me:12519: checking for $CC __attribute__ directives..." >&5
12520 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12521 cat > conftest.$ac_ext <<EOF
12522 #line 12522 "${as_me:-configure}"
12523 #include "confdefs.h"
12524 #include "conftest.h"
12525 #include "conftest.i"
12526 #if     GCC_PRINTF
12527 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12528 #else
12529 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12530 #endif
12531 #if     GCC_SCANF
12532 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12533 #else
12534 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12535 #endif
12536 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12537 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12538 extern void foo(void) GCC_NORETURN;
12539 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12540 EOF
12541         cf_printf_attribute=no
12542         cf_scanf_attribute=no
12543         for cf_attribute in scanf printf unused noreturn
12544         do
12545
12546 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12547
12548                 cf_directive="__attribute__(($cf_attribute))"
12549                 echo "checking for $CC $cf_directive" 1>&5
12550
12551                 case $cf_attribute in #(vi
12552                 printf) #(vi
12553                         cf_printf_attribute=yes
12554                         cat >conftest.h <<EOF
12555 #define GCC_$cf_ATTRIBUTE 1
12556 EOF
12557                         ;;
12558                 scanf) #(vi
12559                         cf_scanf_attribute=yes
12560                         cat >conftest.h <<EOF
12561 #define GCC_$cf_ATTRIBUTE 1
12562 EOF
12563                         ;;
12564                 *) #(vi
12565                         cat >conftest.h <<EOF
12566 #define GCC_$cf_ATTRIBUTE $cf_directive
12567 EOF
12568                         ;;
12569                 esac
12570
12571                 if { (eval echo "$as_me:12571: \"$ac_compile\"") >&5
12572   (eval $ac_compile) 2>&5
12573   ac_status=$?
12574   echo "$as_me:12574: \$? = $ac_status" >&5
12575   (exit $ac_status); }; then
12576                         test -n "$verbose" && echo "$as_me:12576: result: ... $cf_attribute" >&5
12577 echo "${ECHO_T}... $cf_attribute" >&6
12578                         cat conftest.h >>confdefs.h
12579                         case $cf_attribute in #(vi
12580                         printf) #(vi
12581                                 if test "$cf_printf_attribute" = no ; then
12582                                         cat >>confdefs.h <<EOF
12583 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
12584 EOF
12585                                 else
12586                                         cat >>confdefs.h <<EOF
12587 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12588 EOF
12589                                 fi
12590                                 ;;
12591                         scanf) #(vi
12592                                 if test "$cf_scanf_attribute" = no ; then
12593                                         cat >>confdefs.h <<EOF
12594 #define GCC_SCANFLIKE(fmt,var) /* nothing */
12595 EOF
12596                                 else
12597                                         cat >>confdefs.h <<EOF
12598 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12599 EOF
12600                                 fi
12601                                 ;;
12602                         esac
12603                 fi
12604         done
12605 else
12606         fgrep define conftest.i >>confdefs.h
12607 fi
12608 rm -rf conftest*
12609 fi
12610
12611 echo "$as_me:12611: checking if you want to work around bogus compiler/loader warnings" >&5
12612 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12613
12614 # Check whether --enable-string-hacks or --disable-string-hacks was given.
12615 if test "${enable_string_hacks+set}" = set; then
12616   enableval="$enable_string_hacks"
12617   with_string_hacks=$enableval
12618 else
12619   with_string_hacks=no
12620 fi;
12621 echo "$as_me:12621: result: $with_string_hacks" >&5
12622 echo "${ECHO_T}$with_string_hacks" >&6
12623
12624 if test "x$with_string_hacks" = "xyes"; then
12625         cat >>confdefs.h <<\EOF
12626 #define USE_STRING_HACKS 1
12627 EOF
12628
12629         { echo "$as_me:12629: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
12630 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
12631
12632 for ac_func in strlcat strlcpy snprintf
12633 do
12634 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12635 echo "$as_me:12635: checking for $ac_func" >&5
12636 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12637 if eval "test \"\${$as_ac_var+set}\" = set"; then
12638   echo $ECHO_N "(cached) $ECHO_C" >&6
12639 else
12640   cat >conftest.$ac_ext <<_ACEOF
12641 #line 12641 "configure"
12642 #include "confdefs.h"
12643 /* System header to define __stub macros and hopefully few prototypes,
12644     which can conflict with char $ac_func (); below.  */
12645 #include <assert.h>
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 $ac_func ();
12653 char (*f) ();
12654
12655 int
12656 main ()
12657 {
12658 /* The GNU C library defines this for functions which it implements
12659     to always fail with ENOSYS.  Some functions are actually named
12660     something starting with __ and the normal name is an alias.  */
12661 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12662 choke me
12663 #else
12664 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12665 #endif
12666
12667   ;
12668   return 0;
12669 }
12670 _ACEOF
12671 rm -f conftest.$ac_objext conftest$ac_exeext
12672 if { (eval echo "$as_me:12672: \"$ac_link\"") >&5
12673   (eval $ac_link) 2>&5
12674   ac_status=$?
12675   echo "$as_me:12675: \$? = $ac_status" >&5
12676   (exit $ac_status); } &&
12677          { ac_try='test -s conftest$ac_exeext'
12678   { (eval echo "$as_me:12678: \"$ac_try\"") >&5
12679   (eval $ac_try) 2>&5
12680   ac_status=$?
12681   echo "$as_me:12681: \$? = $ac_status" >&5
12682   (exit $ac_status); }; }; then
12683   eval "$as_ac_var=yes"
12684 else
12685   echo "$as_me: failed program was:" >&5
12686 cat conftest.$ac_ext >&5
12687 eval "$as_ac_var=no"
12688 fi
12689 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12690 fi
12691 echo "$as_me:12691: result: `eval echo '${'$as_ac_var'}'`" >&5
12692 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12693 if test `eval echo '${'$as_ac_var'}'` = yes; then
12694   cat >>confdefs.h <<EOF
12695 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12696 EOF
12697
12698 fi
12699 done
12700
12701 fi
12702
12703 ###     use option --enable-assertions to turn on generation of assertion code
12704 echo "$as_me:12704: checking if you want to enable runtime assertions" >&5
12705 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12706
12707 # Check whether --enable-assertions or --disable-assertions was given.
12708 if test "${enable_assertions+set}" = set; then
12709   enableval="$enable_assertions"
12710   with_assertions=$enableval
12711 else
12712   with_assertions=no
12713 fi;
12714 echo "$as_me:12714: result: $with_assertions" >&5
12715 echo "${ECHO_T}$with_assertions" >&6
12716 if test -n "$GCC"
12717 then
12718         if test "$with_assertions" = no
12719         then
12720                 cat >>confdefs.h <<\EOF
12721 #define NDEBUG 1
12722 EOF
12723
12724                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12725         else
12726
12727         ADAFLAGS="$ADAFLAGS -gnata"
12728
12729         fi
12730 fi
12731
12732 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12733
12734 echo "$as_me:12734: checking if you want to use dmalloc for testing" >&5
12735 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12736
12737 # Check whether --with-dmalloc or --without-dmalloc was given.
12738 if test "${with_dmalloc+set}" = set; then
12739   withval="$with_dmalloc"
12740   cat >>confdefs.h <<\EOF
12741 #define USE_DMALLOC 1
12742 EOF
12743
12744         : ${with_cflags:=-g}
12745         : ${with_no_leaks:=yes}
12746          with_dmalloc=yes
12747 else
12748   with_dmalloc=
12749 fi;
12750 echo "$as_me:12750: result: ${with_dmalloc:-no}" >&5
12751 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12752
12753 case .$with_cflags in #(vi
12754 .*-g*)
12755         case .$CFLAGS in #(vi
12756         .*-g*) #(vi
12757                 ;;
12758         *)
12759
12760 cf_fix_cppflags=no
12761 cf_new_cflags=
12762 cf_new_cppflags=
12763 cf_new_extra_cppflags=
12764
12765 for cf_add_cflags in -g
12766 do
12767 case $cf_fix_cppflags in
12768 no)
12769         case $cf_add_cflags in #(vi
12770         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12771                 case $cf_add_cflags in
12772                 -D*)
12773                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12774
12775                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12776                                 && test -z "${cf_tst_cflags}" \
12777                                 && cf_fix_cppflags=yes
12778
12779                         if test $cf_fix_cppflags = yes ; then
12780                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12781                                 continue
12782                         elif test "${cf_tst_cflags}" = "\"'" ; then
12783                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12784                                 continue
12785                         fi
12786                         ;;
12787                 esac
12788                 case "$CPPFLAGS" in
12789                 *$cf_add_cflags) #(vi
12790                         ;;
12791                 *) #(vi
12792                         case $cf_add_cflags in #(vi
12793                         -D*)
12794                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12795
12796 CPPFLAGS=`echo "$CPPFLAGS" | \
12797         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12798                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12799
12800                                 ;;
12801                         esac
12802                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12803                         ;;
12804                 esac
12805                 ;;
12806         *)
12807                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12808                 ;;
12809         esac
12810         ;;
12811 yes)
12812         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12813
12814         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12815
12816         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12817                 && test -z "${cf_tst_cflags}" \
12818                 && cf_fix_cppflags=no
12819         ;;
12820 esac
12821 done
12822
12823 if test -n "$cf_new_cflags" ; then
12824
12825         CFLAGS="$CFLAGS $cf_new_cflags"
12826 fi
12827
12828 if test -n "$cf_new_cppflags" ; then
12829
12830         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12831 fi
12832
12833 if test -n "$cf_new_extra_cppflags" ; then
12834
12835         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12836 fi
12837
12838                 ;;
12839         esac
12840         ;;
12841 esac
12842
12843 if test "$with_dmalloc" = yes ; then
12844         echo "$as_me:12844: checking for dmalloc.h" >&5
12845 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12846 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12847   echo $ECHO_N "(cached) $ECHO_C" >&6
12848 else
12849   cat >conftest.$ac_ext <<_ACEOF
12850 #line 12850 "configure"
12851 #include "confdefs.h"
12852 #include <dmalloc.h>
12853 _ACEOF
12854 if { (eval echo "$as_me:12854: \"$ac_cpp conftest.$ac_ext\"") >&5
12855   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12856   ac_status=$?
12857   egrep -v '^ *\+' conftest.er1 >conftest.err
12858   rm -f conftest.er1
12859   cat conftest.err >&5
12860   echo "$as_me:12860: \$? = $ac_status" >&5
12861   (exit $ac_status); } >/dev/null; then
12862   if test -s conftest.err; then
12863     ac_cpp_err=$ac_c_preproc_warn_flag
12864   else
12865     ac_cpp_err=
12866   fi
12867 else
12868   ac_cpp_err=yes
12869 fi
12870 if test -z "$ac_cpp_err"; then
12871   ac_cv_header_dmalloc_h=yes
12872 else
12873   echo "$as_me: failed program was:" >&5
12874   cat conftest.$ac_ext >&5
12875   ac_cv_header_dmalloc_h=no
12876 fi
12877 rm -f conftest.err conftest.$ac_ext
12878 fi
12879 echo "$as_me:12879: result: $ac_cv_header_dmalloc_h" >&5
12880 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12881 if test $ac_cv_header_dmalloc_h = yes; then
12882
12883 echo "$as_me:12883: checking for dmalloc_debug in -ldmalloc" >&5
12884 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12885 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12886   echo $ECHO_N "(cached) $ECHO_C" >&6
12887 else
12888   ac_check_lib_save_LIBS=$LIBS
12889 LIBS="-ldmalloc  $LIBS"
12890 cat >conftest.$ac_ext <<_ACEOF
12891 #line 12891 "configure"
12892 #include "confdefs.h"
12893
12894 /* Override any gcc2 internal prototype to avoid an error.  */
12895 #ifdef __cplusplus
12896 extern "C"
12897 #endif
12898 /* We use char because int might match the return type of a gcc2
12899    builtin and then its argument prototype would still apply.  */
12900 char dmalloc_debug ();
12901 int
12902 main ()
12903 {
12904 dmalloc_debug ();
12905   ;
12906   return 0;
12907 }
12908 _ACEOF
12909 rm -f conftest.$ac_objext conftest$ac_exeext
12910 if { (eval echo "$as_me:12910: \"$ac_link\"") >&5
12911   (eval $ac_link) 2>&5
12912   ac_status=$?
12913   echo "$as_me:12913: \$? = $ac_status" >&5
12914   (exit $ac_status); } &&
12915          { ac_try='test -s conftest$ac_exeext'
12916   { (eval echo "$as_me:12916: \"$ac_try\"") >&5
12917   (eval $ac_try) 2>&5
12918   ac_status=$?
12919   echo "$as_me:12919: \$? = $ac_status" >&5
12920   (exit $ac_status); }; }; then
12921   ac_cv_lib_dmalloc_dmalloc_debug=yes
12922 else
12923   echo "$as_me: failed program was:" >&5
12924 cat conftest.$ac_ext >&5
12925 ac_cv_lib_dmalloc_dmalloc_debug=no
12926 fi
12927 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12928 LIBS=$ac_check_lib_save_LIBS
12929 fi
12930 echo "$as_me:12930: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12931 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12932 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12933   cat >>confdefs.h <<EOF
12934 #define HAVE_LIBDMALLOC 1
12935 EOF
12936
12937   LIBS="-ldmalloc $LIBS"
12938
12939 fi
12940
12941 fi
12942
12943 fi
12944
12945 echo "$as_me:12945: checking if you want to use dbmalloc for testing" >&5
12946 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
12947
12948 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12949 if test "${with_dbmalloc+set}" = set; then
12950   withval="$with_dbmalloc"
12951   cat >>confdefs.h <<\EOF
12952 #define USE_DBMALLOC 1
12953 EOF
12954
12955         : ${with_cflags:=-g}
12956         : ${with_no_leaks:=yes}
12957          with_dbmalloc=yes
12958 else
12959   with_dbmalloc=
12960 fi;
12961 echo "$as_me:12961: result: ${with_dbmalloc:-no}" >&5
12962 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12963
12964 case .$with_cflags in #(vi
12965 .*-g*)
12966         case .$CFLAGS in #(vi
12967         .*-g*) #(vi
12968                 ;;
12969         *)
12970
12971 cf_fix_cppflags=no
12972 cf_new_cflags=
12973 cf_new_cppflags=
12974 cf_new_extra_cppflags=
12975
12976 for cf_add_cflags in -g
12977 do
12978 case $cf_fix_cppflags in
12979 no)
12980         case $cf_add_cflags in #(vi
12981         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12982                 case $cf_add_cflags in
12983                 -D*)
12984                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12985
12986                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12987                                 && test -z "${cf_tst_cflags}" \
12988                                 && cf_fix_cppflags=yes
12989
12990                         if test $cf_fix_cppflags = yes ; then
12991                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12992                                 continue
12993                         elif test "${cf_tst_cflags}" = "\"'" ; then
12994                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12995                                 continue
12996                         fi
12997                         ;;
12998                 esac
12999                 case "$CPPFLAGS" in
13000                 *$cf_add_cflags) #(vi
13001                         ;;
13002                 *) #(vi
13003                         case $cf_add_cflags in #(vi
13004                         -D*)
13005                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13006
13007 CPPFLAGS=`echo "$CPPFLAGS" | \
13008         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13009                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13010
13011                                 ;;
13012                         esac
13013                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13014                         ;;
13015                 esac
13016                 ;;
13017         *)
13018                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13019                 ;;
13020         esac
13021         ;;
13022 yes)
13023         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13024
13025         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13026
13027         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13028                 && test -z "${cf_tst_cflags}" \
13029                 && cf_fix_cppflags=no
13030         ;;
13031 esac
13032 done
13033
13034 if test -n "$cf_new_cflags" ; then
13035
13036         CFLAGS="$CFLAGS $cf_new_cflags"
13037 fi
13038
13039 if test -n "$cf_new_cppflags" ; then
13040
13041         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13042 fi
13043
13044 if test -n "$cf_new_extra_cppflags" ; then
13045
13046         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13047 fi
13048
13049                 ;;
13050         esac
13051         ;;
13052 esac
13053
13054 if test "$with_dbmalloc" = yes ; then
13055         echo "$as_me:13055: checking for dbmalloc.h" >&5
13056 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13057 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13058   echo $ECHO_N "(cached) $ECHO_C" >&6
13059 else
13060   cat >conftest.$ac_ext <<_ACEOF
13061 #line 13061 "configure"
13062 #include "confdefs.h"
13063 #include <dbmalloc.h>
13064 _ACEOF
13065 if { (eval echo "$as_me:13065: \"$ac_cpp conftest.$ac_ext\"") >&5
13066   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13067   ac_status=$?
13068   egrep -v '^ *\+' conftest.er1 >conftest.err
13069   rm -f conftest.er1
13070   cat conftest.err >&5
13071   echo "$as_me:13071: \$? = $ac_status" >&5
13072   (exit $ac_status); } >/dev/null; then
13073   if test -s conftest.err; then
13074     ac_cpp_err=$ac_c_preproc_warn_flag
13075   else
13076     ac_cpp_err=
13077   fi
13078 else
13079   ac_cpp_err=yes
13080 fi
13081 if test -z "$ac_cpp_err"; then
13082   ac_cv_header_dbmalloc_h=yes
13083 else
13084   echo "$as_me: failed program was:" >&5
13085   cat conftest.$ac_ext >&5
13086   ac_cv_header_dbmalloc_h=no
13087 fi
13088 rm -f conftest.err conftest.$ac_ext
13089 fi
13090 echo "$as_me:13090: result: $ac_cv_header_dbmalloc_h" >&5
13091 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13092 if test $ac_cv_header_dbmalloc_h = yes; then
13093
13094 echo "$as_me:13094: checking for debug_malloc in -ldbmalloc" >&5
13095 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13096 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13097   echo $ECHO_N "(cached) $ECHO_C" >&6
13098 else
13099   ac_check_lib_save_LIBS=$LIBS
13100 LIBS="-ldbmalloc  $LIBS"
13101 cat >conftest.$ac_ext <<_ACEOF
13102 #line 13102 "configure"
13103 #include "confdefs.h"
13104
13105 /* Override any gcc2 internal prototype to avoid an error.  */
13106 #ifdef __cplusplus
13107 extern "C"
13108 #endif
13109 /* We use char because int might match the return type of a gcc2
13110    builtin and then its argument prototype would still apply.  */
13111 char debug_malloc ();
13112 int
13113 main ()
13114 {
13115 debug_malloc ();
13116   ;
13117   return 0;
13118 }
13119 _ACEOF
13120 rm -f conftest.$ac_objext conftest$ac_exeext
13121 if { (eval echo "$as_me:13121: \"$ac_link\"") >&5
13122   (eval $ac_link) 2>&5
13123   ac_status=$?
13124   echo "$as_me:13124: \$? = $ac_status" >&5
13125   (exit $ac_status); } &&
13126          { ac_try='test -s conftest$ac_exeext'
13127   { (eval echo "$as_me:13127: \"$ac_try\"") >&5
13128   (eval $ac_try) 2>&5
13129   ac_status=$?
13130   echo "$as_me:13130: \$? = $ac_status" >&5
13131   (exit $ac_status); }; }; then
13132   ac_cv_lib_dbmalloc_debug_malloc=yes
13133 else
13134   echo "$as_me: failed program was:" >&5
13135 cat conftest.$ac_ext >&5
13136 ac_cv_lib_dbmalloc_debug_malloc=no
13137 fi
13138 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13139 LIBS=$ac_check_lib_save_LIBS
13140 fi
13141 echo "$as_me:13141: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13142 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13143 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13144   cat >>confdefs.h <<EOF
13145 #define HAVE_LIBDBMALLOC 1
13146 EOF
13147
13148   LIBS="-ldbmalloc $LIBS"
13149
13150 fi
13151
13152 fi
13153
13154 fi
13155
13156 echo "$as_me:13156: checking if you want to use valgrind for testing" >&5
13157 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13158
13159 # Check whether --with-valgrind or --without-valgrind was given.
13160 if test "${with_valgrind+set}" = set; then
13161   withval="$with_valgrind"
13162   cat >>confdefs.h <<\EOF
13163 #define USE_VALGRIND 1
13164 EOF
13165
13166         : ${with_cflags:=-g}
13167         : ${with_no_leaks:=yes}
13168          with_valgrind=yes
13169 else
13170   with_valgrind=
13171 fi;
13172 echo "$as_me:13172: result: ${with_valgrind:-no}" >&5
13173 echo "${ECHO_T}${with_valgrind:-no}" >&6
13174
13175 case .$with_cflags in #(vi
13176 .*-g*)
13177         case .$CFLAGS in #(vi
13178         .*-g*) #(vi
13179                 ;;
13180         *)
13181
13182 cf_fix_cppflags=no
13183 cf_new_cflags=
13184 cf_new_cppflags=
13185 cf_new_extra_cppflags=
13186
13187 for cf_add_cflags in -g
13188 do
13189 case $cf_fix_cppflags in
13190 no)
13191         case $cf_add_cflags in #(vi
13192         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13193                 case $cf_add_cflags in
13194                 -D*)
13195                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13196
13197                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13198                                 && test -z "${cf_tst_cflags}" \
13199                                 && cf_fix_cppflags=yes
13200
13201                         if test $cf_fix_cppflags = yes ; then
13202                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13203                                 continue
13204                         elif test "${cf_tst_cflags}" = "\"'" ; then
13205                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13206                                 continue
13207                         fi
13208                         ;;
13209                 esac
13210                 case "$CPPFLAGS" in
13211                 *$cf_add_cflags) #(vi
13212                         ;;
13213                 *) #(vi
13214                         case $cf_add_cflags in #(vi
13215                         -D*)
13216                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13217
13218 CPPFLAGS=`echo "$CPPFLAGS" | \
13219         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13220                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13221
13222                                 ;;
13223                         esac
13224                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13225                         ;;
13226                 esac
13227                 ;;
13228         *)
13229                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13230                 ;;
13231         esac
13232         ;;
13233 yes)
13234         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13235
13236         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13237
13238         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13239                 && test -z "${cf_tst_cflags}" \
13240                 && cf_fix_cppflags=no
13241         ;;
13242 esac
13243 done
13244
13245 if test -n "$cf_new_cflags" ; then
13246
13247         CFLAGS="$CFLAGS $cf_new_cflags"
13248 fi
13249
13250 if test -n "$cf_new_cppflags" ; then
13251
13252         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13253 fi
13254
13255 if test -n "$cf_new_extra_cppflags" ; then
13256
13257         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13258 fi
13259
13260                 ;;
13261         esac
13262         ;;
13263 esac
13264
13265 echo "$as_me:13265: checking if you want to perform memory-leak testing" >&5
13266 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13267
13268 # Check whether --enable-leaks or --disable-leaks was given.
13269 if test "${enable_leaks+set}" = set; then
13270   enableval="$enable_leaks"
13271   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13272 else
13273   : ${with_no_leaks:=no}
13274 fi;
13275 echo "$as_me:13275: result: $with_no_leaks" >&5
13276 echo "${ECHO_T}$with_no_leaks" >&6
13277
13278 if test "$with_no_leaks" = yes ; then
13279         cat >>confdefs.h <<\EOF
13280 #define NO_LEAKS 1
13281 EOF
13282
13283         cat >>confdefs.h <<\EOF
13284 #define YY_NO_LEAKS 1
13285 EOF
13286
13287 fi
13288
13289 cat >>confdefs.h <<\EOF
13290 #define HAVE_NC_ALLOC_H 1
13291 EOF
13292
13293 ###     use option --enable-expanded to generate certain macros as functions
13294
13295 # Check whether --enable-expanded or --disable-expanded was given.
13296 if test "${enable_expanded+set}" = set; then
13297   enableval="$enable_expanded"
13298   test "$enableval" = yes && cat >>confdefs.h <<\EOF
13299 #define NCURSES_EXPANDED 1
13300 EOF
13301
13302 fi;
13303
13304 ###     use option --disable-macros to suppress macros in favor of functions
13305
13306 # Check whether --enable-macros or --disable-macros was given.
13307 if test "${enable_macros+set}" = set; then
13308   enableval="$enable_macros"
13309   test "$enableval" = no && cat >>confdefs.h <<\EOF
13310 #define NCURSES_NOMACROS 1
13311 EOF
13312
13313 fi;
13314
13315 # Normally we only add trace() to the debug-library.  Allow this to be
13316 # extended to all models of the ncurses library:
13317 cf_all_traces=no
13318 case "$CFLAGS $CPPFLAGS" in
13319 *-DTRACE*)
13320         cf_all_traces=yes
13321         ;;
13322 esac
13323
13324 echo "$as_me:13324: checking whether to add trace feature to all models" >&5
13325 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13326
13327 # Check whether --with-trace or --without-trace was given.
13328 if test "${with_trace+set}" = set; then
13329   withval="$with_trace"
13330   cf_with_trace=$withval
13331 else
13332   cf_with_trace=$cf_all_traces
13333 fi;
13334 echo "$as_me:13334: result: $cf_with_trace" >&5
13335 echo "${ECHO_T}$cf_with_trace" >&6
13336
13337 if test "$cf_with_trace" = yes ; then
13338         LIB_TRACING=all
13339         ADA_TRACE=TRUE
13340
13341 cf_fix_cppflags=no
13342 cf_new_cflags=
13343 cf_new_cppflags=
13344 cf_new_extra_cppflags=
13345
13346 for cf_add_cflags in -DTRACE
13347 do
13348 case $cf_fix_cppflags in
13349 no)
13350         case $cf_add_cflags in #(vi
13351         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13352                 case $cf_add_cflags in
13353                 -D*)
13354                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13355
13356                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13357                                 && test -z "${cf_tst_cflags}" \
13358                                 && cf_fix_cppflags=yes
13359
13360                         if test $cf_fix_cppflags = yes ; then
13361                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13362                                 continue
13363                         elif test "${cf_tst_cflags}" = "\"'" ; then
13364                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13365                                 continue
13366                         fi
13367                         ;;
13368                 esac
13369                 case "$CPPFLAGS" in
13370                 *$cf_add_cflags) #(vi
13371                         ;;
13372                 *) #(vi
13373                         case $cf_add_cflags in #(vi
13374                         -D*)
13375                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13376
13377 CPPFLAGS=`echo "$CPPFLAGS" | \
13378         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13379                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13380
13381                                 ;;
13382                         esac
13383                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13384                         ;;
13385                 esac
13386                 ;;
13387         *)
13388                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13389                 ;;
13390         esac
13391         ;;
13392 yes)
13393         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13394
13395         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13396
13397         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13398                 && test -z "${cf_tst_cflags}" \
13399                 && cf_fix_cppflags=no
13400         ;;
13401 esac
13402 done
13403
13404 if test -n "$cf_new_cflags" ; then
13405
13406         CFLAGS="$CFLAGS $cf_new_cflags"
13407 fi
13408
13409 if test -n "$cf_new_cppflags" ; then
13410
13411         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13412 fi
13413
13414 if test -n "$cf_new_extra_cppflags" ; then
13415
13416         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13417 fi
13418
13419 else
13420         LIB_TRACING=DEBUG
13421         ADA_TRACE=FALSE
13422 fi
13423
13424 ###     Checks for libraries.
13425 case $cf_cv_system_name in #(vi
13426 *mingw32*) #(vi
13427         ;;
13428 *)
13429 echo "$as_me:13429: checking for gettimeofday" >&5
13430 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13431 if test "${ac_cv_func_gettimeofday+set}" = set; then
13432   echo $ECHO_N "(cached) $ECHO_C" >&6
13433 else
13434   cat >conftest.$ac_ext <<_ACEOF
13435 #line 13435 "configure"
13436 #include "confdefs.h"
13437 /* System header to define __stub macros and hopefully few prototypes,
13438     which can conflict with char gettimeofday (); below.  */
13439 #include <assert.h>
13440 /* Override any gcc2 internal prototype to avoid an error.  */
13441 #ifdef __cplusplus
13442 extern "C"
13443 #endif
13444 /* We use char because int might match the return type of a gcc2
13445    builtin and then its argument prototype would still apply.  */
13446 char gettimeofday ();
13447 char (*f) ();
13448
13449 int
13450 main ()
13451 {
13452 /* The GNU C library defines this for functions which it implements
13453     to always fail with ENOSYS.  Some functions are actually named
13454     something starting with __ and the normal name is an alias.  */
13455 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13456 choke me
13457 #else
13458 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13459 #endif
13460
13461   ;
13462   return 0;
13463 }
13464 _ACEOF
13465 rm -f conftest.$ac_objext conftest$ac_exeext
13466 if { (eval echo "$as_me:13466: \"$ac_link\"") >&5
13467   (eval $ac_link) 2>&5
13468   ac_status=$?
13469   echo "$as_me:13469: \$? = $ac_status" >&5
13470   (exit $ac_status); } &&
13471          { ac_try='test -s conftest$ac_exeext'
13472   { (eval echo "$as_me:13472: \"$ac_try\"") >&5
13473   (eval $ac_try) 2>&5
13474   ac_status=$?
13475   echo "$as_me:13475: \$? = $ac_status" >&5
13476   (exit $ac_status); }; }; then
13477   ac_cv_func_gettimeofday=yes
13478 else
13479   echo "$as_me: failed program was:" >&5
13480 cat conftest.$ac_ext >&5
13481 ac_cv_func_gettimeofday=no
13482 fi
13483 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13484 fi
13485 echo "$as_me:13485: result: $ac_cv_func_gettimeofday" >&5
13486 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13487 if test $ac_cv_func_gettimeofday = yes; then
13488   cat >>confdefs.h <<\EOF
13489 #define HAVE_GETTIMEOFDAY 1
13490 EOF
13491
13492 else
13493
13494 echo "$as_me:13494: checking for gettimeofday in -lbsd" >&5
13495 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13496 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13497   echo $ECHO_N "(cached) $ECHO_C" >&6
13498 else
13499   ac_check_lib_save_LIBS=$LIBS
13500 LIBS="-lbsd  $LIBS"
13501 cat >conftest.$ac_ext <<_ACEOF
13502 #line 13502 "configure"
13503 #include "confdefs.h"
13504
13505 /* Override any gcc2 internal prototype to avoid an error.  */
13506 #ifdef __cplusplus
13507 extern "C"
13508 #endif
13509 /* We use char because int might match the return type of a gcc2
13510    builtin and then its argument prototype would still apply.  */
13511 char gettimeofday ();
13512 int
13513 main ()
13514 {
13515 gettimeofday ();
13516   ;
13517   return 0;
13518 }
13519 _ACEOF
13520 rm -f conftest.$ac_objext conftest$ac_exeext
13521 if { (eval echo "$as_me:13521: \"$ac_link\"") >&5
13522   (eval $ac_link) 2>&5
13523   ac_status=$?
13524   echo "$as_me:13524: \$? = $ac_status" >&5
13525   (exit $ac_status); } &&
13526          { ac_try='test -s conftest$ac_exeext'
13527   { (eval echo "$as_me:13527: \"$ac_try\"") >&5
13528   (eval $ac_try) 2>&5
13529   ac_status=$?
13530   echo "$as_me:13530: \$? = $ac_status" >&5
13531   (exit $ac_status); }; }; then
13532   ac_cv_lib_bsd_gettimeofday=yes
13533 else
13534   echo "$as_me: failed program was:" >&5
13535 cat conftest.$ac_ext >&5
13536 ac_cv_lib_bsd_gettimeofday=no
13537 fi
13538 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13539 LIBS=$ac_check_lib_save_LIBS
13540 fi
13541 echo "$as_me:13541: result: $ac_cv_lib_bsd_gettimeofday" >&5
13542 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13543 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13544   cat >>confdefs.h <<\EOF
13545 #define HAVE_GETTIMEOFDAY 1
13546 EOF
13547
13548         LIBS="-lbsd $LIBS"
13549 fi
13550
13551 fi
13552         ;;
13553 esac
13554
13555 echo "$as_me:13555: checking if -lm needed for math functions" >&5
13556 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13557 if test "${cf_cv_need_libm+set}" = set; then
13558   echo $ECHO_N "(cached) $ECHO_C" >&6
13559 else
13560
13561         cat >conftest.$ac_ext <<_ACEOF
13562 #line 13562 "configure"
13563 #include "confdefs.h"
13564
13565         #include <stdio.h>
13566         #include <math.h>
13567
13568 int
13569 main ()
13570 {
13571 double x = rand(); printf("result = %g\n", sin(x))
13572   ;
13573   return 0;
13574 }
13575 _ACEOF
13576 rm -f conftest.$ac_objext conftest$ac_exeext
13577 if { (eval echo "$as_me:13577: \"$ac_link\"") >&5
13578   (eval $ac_link) 2>&5
13579   ac_status=$?
13580   echo "$as_me:13580: \$? = $ac_status" >&5
13581   (exit $ac_status); } &&
13582          { ac_try='test -s conftest$ac_exeext'
13583   { (eval echo "$as_me:13583: \"$ac_try\"") >&5
13584   (eval $ac_try) 2>&5
13585   ac_status=$?
13586   echo "$as_me:13586: \$? = $ac_status" >&5
13587   (exit $ac_status); }; }; then
13588   cf_cv_need_libm=no
13589 else
13590   echo "$as_me: failed program was:" >&5
13591 cat conftest.$ac_ext >&5
13592 cf_cv_need_libm=yes
13593 fi
13594 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13595 fi
13596 echo "$as_me:13596: result: $cf_cv_need_libm" >&5
13597 echo "${ECHO_T}$cf_cv_need_libm" >&6
13598 if test "$cf_cv_need_libm" = yes
13599 then
13600 MATH_LIB=-lm
13601 fi
13602
13603 ###     Checks for header files.
13604 echo "$as_me:13604: checking for ANSI C header files" >&5
13605 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13606 if test "${ac_cv_header_stdc+set}" = set; then
13607   echo $ECHO_N "(cached) $ECHO_C" >&6
13608 else
13609   cat >conftest.$ac_ext <<_ACEOF
13610 #line 13610 "configure"
13611 #include "confdefs.h"
13612 #include <stdlib.h>
13613 #include <stdarg.h>
13614 #include <string.h>
13615 #include <float.h>
13616
13617 _ACEOF
13618 if { (eval echo "$as_me:13618: \"$ac_cpp conftest.$ac_ext\"") >&5
13619   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13620   ac_status=$?
13621   egrep -v '^ *\+' conftest.er1 >conftest.err
13622   rm -f conftest.er1
13623   cat conftest.err >&5
13624   echo "$as_me:13624: \$? = $ac_status" >&5
13625   (exit $ac_status); } >/dev/null; then
13626   if test -s conftest.err; then
13627     ac_cpp_err=$ac_c_preproc_warn_flag
13628   else
13629     ac_cpp_err=
13630   fi
13631 else
13632   ac_cpp_err=yes
13633 fi
13634 if test -z "$ac_cpp_err"; then
13635   ac_cv_header_stdc=yes
13636 else
13637   echo "$as_me: failed program was:" >&5
13638   cat conftest.$ac_ext >&5
13639   ac_cv_header_stdc=no
13640 fi
13641 rm -f conftest.err conftest.$ac_ext
13642
13643 if test $ac_cv_header_stdc = yes; then
13644   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13645   cat >conftest.$ac_ext <<_ACEOF
13646 #line 13646 "configure"
13647 #include "confdefs.h"
13648 #include <string.h>
13649
13650 _ACEOF
13651 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13652   egrep "memchr" >/dev/null 2>&1; then
13653   :
13654 else
13655   ac_cv_header_stdc=no
13656 fi
13657 rm -rf conftest*
13658
13659 fi
13660
13661 if test $ac_cv_header_stdc = yes; then
13662   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13663   cat >conftest.$ac_ext <<_ACEOF
13664 #line 13664 "configure"
13665 #include "confdefs.h"
13666 #include <stdlib.h>
13667
13668 _ACEOF
13669 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13670   egrep "free" >/dev/null 2>&1; then
13671   :
13672 else
13673   ac_cv_header_stdc=no
13674 fi
13675 rm -rf conftest*
13676
13677 fi
13678
13679 if test $ac_cv_header_stdc = yes; then
13680   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13681   if test "$cross_compiling" = yes; then
13682   :
13683 else
13684   cat >conftest.$ac_ext <<_ACEOF
13685 #line 13685 "configure"
13686 #include "confdefs.h"
13687 #include <ctype.h>
13688 #if ((' ' & 0x0FF) == 0x020)
13689 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13690 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13691 #else
13692 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13693                      || ('j' <= (c) && (c) <= 'r') \
13694                      || ('s' <= (c) && (c) <= 'z'))
13695 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13696 #endif
13697
13698 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13699 int
13700 main ()
13701 {
13702   int i;
13703   for (i = 0; i < 256; i++)
13704     if (XOR (islower (i), ISLOWER (i))
13705         || toupper (i) != TOUPPER (i))
13706       $ac_main_return(2);
13707   $ac_main_return (0);
13708 }
13709 _ACEOF
13710 rm -f conftest$ac_exeext
13711 if { (eval echo "$as_me:13711: \"$ac_link\"") >&5
13712   (eval $ac_link) 2>&5
13713   ac_status=$?
13714   echo "$as_me:13714: \$? = $ac_status" >&5
13715   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13716   { (eval echo "$as_me:13716: \"$ac_try\"") >&5
13717   (eval $ac_try) 2>&5
13718   ac_status=$?
13719   echo "$as_me:13719: \$? = $ac_status" >&5
13720   (exit $ac_status); }; }; then
13721   :
13722 else
13723   echo "$as_me: program exited with status $ac_status" >&5
13724 echo "$as_me: failed program was:" >&5
13725 cat conftest.$ac_ext >&5
13726 ac_cv_header_stdc=no
13727 fi
13728 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13729 fi
13730 fi
13731 fi
13732 echo "$as_me:13732: result: $ac_cv_header_stdc" >&5
13733 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13734 if test $ac_cv_header_stdc = yes; then
13735
13736 cat >>confdefs.h <<\EOF
13737 #define STDC_HEADERS 1
13738 EOF
13739
13740 fi
13741
13742 ac_header_dirent=no
13743 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13744   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13745 echo "$as_me:13745: checking for $ac_hdr that defines DIR" >&5
13746 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13747 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13748   echo $ECHO_N "(cached) $ECHO_C" >&6
13749 else
13750   cat >conftest.$ac_ext <<_ACEOF
13751 #line 13751 "configure"
13752 #include "confdefs.h"
13753 #include <sys/types.h>
13754 #include <$ac_hdr>
13755
13756 int
13757 main ()
13758 {
13759 if ((DIR *) 0)
13760 return 0;
13761   ;
13762   return 0;
13763 }
13764 _ACEOF
13765 rm -f conftest.$ac_objext
13766 if { (eval echo "$as_me:13766: \"$ac_compile\"") >&5
13767   (eval $ac_compile) 2>&5
13768   ac_status=$?
13769   echo "$as_me:13769: \$? = $ac_status" >&5
13770   (exit $ac_status); } &&
13771          { ac_try='test -s conftest.$ac_objext'
13772   { (eval echo "$as_me:13772: \"$ac_try\"") >&5
13773   (eval $ac_try) 2>&5
13774   ac_status=$?
13775   echo "$as_me:13775: \$? = $ac_status" >&5
13776   (exit $ac_status); }; }; then
13777   eval "$as_ac_Header=yes"
13778 else
13779   echo "$as_me: failed program was:" >&5
13780 cat conftest.$ac_ext >&5
13781 eval "$as_ac_Header=no"
13782 fi
13783 rm -f conftest.$ac_objext conftest.$ac_ext
13784 fi
13785 echo "$as_me:13785: result: `eval echo '${'$as_ac_Header'}'`" >&5
13786 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13787 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13788   cat >>confdefs.h <<EOF
13789 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13790 EOF
13791
13792 ac_header_dirent=$ac_hdr; break
13793 fi
13794
13795 done
13796 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13797 if test $ac_header_dirent = dirent.h; then
13798   echo "$as_me:13798: checking for opendir in -ldir" >&5
13799 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13800 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13801   echo $ECHO_N "(cached) $ECHO_C" >&6
13802 else
13803   ac_check_lib_save_LIBS=$LIBS
13804 LIBS="-ldir  $LIBS"
13805 cat >conftest.$ac_ext <<_ACEOF
13806 #line 13806 "configure"
13807 #include "confdefs.h"
13808
13809 /* Override any gcc2 internal prototype to avoid an error.  */
13810 #ifdef __cplusplus
13811 extern "C"
13812 #endif
13813 /* We use char because int might match the return type of a gcc2
13814    builtin and then its argument prototype would still apply.  */
13815 char opendir ();
13816 int
13817 main ()
13818 {
13819 opendir ();
13820   ;
13821   return 0;
13822 }
13823 _ACEOF
13824 rm -f conftest.$ac_objext conftest$ac_exeext
13825 if { (eval echo "$as_me:13825: \"$ac_link\"") >&5
13826   (eval $ac_link) 2>&5
13827   ac_status=$?
13828   echo "$as_me:13828: \$? = $ac_status" >&5
13829   (exit $ac_status); } &&
13830          { ac_try='test -s conftest$ac_exeext'
13831   { (eval echo "$as_me:13831: \"$ac_try\"") >&5
13832   (eval $ac_try) 2>&5
13833   ac_status=$?
13834   echo "$as_me:13834: \$? = $ac_status" >&5
13835   (exit $ac_status); }; }; then
13836   ac_cv_lib_dir_opendir=yes
13837 else
13838   echo "$as_me: failed program was:" >&5
13839 cat conftest.$ac_ext >&5
13840 ac_cv_lib_dir_opendir=no
13841 fi
13842 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13843 LIBS=$ac_check_lib_save_LIBS
13844 fi
13845 echo "$as_me:13845: result: $ac_cv_lib_dir_opendir" >&5
13846 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13847 if test $ac_cv_lib_dir_opendir = yes; then
13848   LIBS="$LIBS -ldir"
13849 fi
13850
13851 else
13852   echo "$as_me:13852: checking for opendir in -lx" >&5
13853 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13854 if test "${ac_cv_lib_x_opendir+set}" = set; then
13855   echo $ECHO_N "(cached) $ECHO_C" >&6
13856 else
13857   ac_check_lib_save_LIBS=$LIBS
13858 LIBS="-lx  $LIBS"
13859 cat >conftest.$ac_ext <<_ACEOF
13860 #line 13860 "configure"
13861 #include "confdefs.h"
13862
13863 /* Override any gcc2 internal prototype to avoid an error.  */
13864 #ifdef __cplusplus
13865 extern "C"
13866 #endif
13867 /* We use char because int might match the return type of a gcc2
13868    builtin and then its argument prototype would still apply.  */
13869 char opendir ();
13870 int
13871 main ()
13872 {
13873 opendir ();
13874   ;
13875   return 0;
13876 }
13877 _ACEOF
13878 rm -f conftest.$ac_objext conftest$ac_exeext
13879 if { (eval echo "$as_me:13879: \"$ac_link\"") >&5
13880   (eval $ac_link) 2>&5
13881   ac_status=$?
13882   echo "$as_me:13882: \$? = $ac_status" >&5
13883   (exit $ac_status); } &&
13884          { ac_try='test -s conftest$ac_exeext'
13885   { (eval echo "$as_me:13885: \"$ac_try\"") >&5
13886   (eval $ac_try) 2>&5
13887   ac_status=$?
13888   echo "$as_me:13888: \$? = $ac_status" >&5
13889   (exit $ac_status); }; }; then
13890   ac_cv_lib_x_opendir=yes
13891 else
13892   echo "$as_me: failed program was:" >&5
13893 cat conftest.$ac_ext >&5
13894 ac_cv_lib_x_opendir=no
13895 fi
13896 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13897 LIBS=$ac_check_lib_save_LIBS
13898 fi
13899 echo "$as_me:13899: result: $ac_cv_lib_x_opendir" >&5
13900 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13901 if test $ac_cv_lib_x_opendir = yes; then
13902   LIBS="$LIBS -lx"
13903 fi
13904
13905 fi
13906
13907 echo "$as_me:13907: checking whether time.h and sys/time.h may both be included" >&5
13908 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13909 if test "${ac_cv_header_time+set}" = set; then
13910   echo $ECHO_N "(cached) $ECHO_C" >&6
13911 else
13912   cat >conftest.$ac_ext <<_ACEOF
13913 #line 13913 "configure"
13914 #include "confdefs.h"
13915 #include <sys/types.h>
13916 #include <sys/time.h>
13917 #include <time.h>
13918
13919 int
13920 main ()
13921 {
13922 if ((struct tm *) 0)
13923 return 0;
13924   ;
13925   return 0;
13926 }
13927 _ACEOF
13928 rm -f conftest.$ac_objext
13929 if { (eval echo "$as_me:13929: \"$ac_compile\"") >&5
13930   (eval $ac_compile) 2>&5
13931   ac_status=$?
13932   echo "$as_me:13932: \$? = $ac_status" >&5
13933   (exit $ac_status); } &&
13934          { ac_try='test -s conftest.$ac_objext'
13935   { (eval echo "$as_me:13935: \"$ac_try\"") >&5
13936   (eval $ac_try) 2>&5
13937   ac_status=$?
13938   echo "$as_me:13938: \$? = $ac_status" >&5
13939   (exit $ac_status); }; }; then
13940   ac_cv_header_time=yes
13941 else
13942   echo "$as_me: failed program was:" >&5
13943 cat conftest.$ac_ext >&5
13944 ac_cv_header_time=no
13945 fi
13946 rm -f conftest.$ac_objext conftest.$ac_ext
13947 fi
13948 echo "$as_me:13948: result: $ac_cv_header_time" >&5
13949 echo "${ECHO_T}$ac_cv_header_time" >&6
13950 if test $ac_cv_header_time = yes; then
13951
13952 cat >>confdefs.h <<\EOF
13953 #define TIME_WITH_SYS_TIME 1
13954 EOF
13955
13956 fi
13957
13958 cf_regex_func=no
13959
13960 cf_regex_libs="regex re"
13961 case $host_os in #(vi
13962 mingw*)
13963         cf_regex_libs="gnurx $cf_regex_libs"
13964         ;;
13965 esac
13966
13967 echo "$as_me:13967: checking for regcomp" >&5
13968 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13969 if test "${ac_cv_func_regcomp+set}" = set; then
13970   echo $ECHO_N "(cached) $ECHO_C" >&6
13971 else
13972   cat >conftest.$ac_ext <<_ACEOF
13973 #line 13973 "configure"
13974 #include "confdefs.h"
13975 /* System header to define __stub macros and hopefully few prototypes,
13976     which can conflict with char regcomp (); below.  */
13977 #include <assert.h>
13978 /* Override any gcc2 internal prototype to avoid an error.  */
13979 #ifdef __cplusplus
13980 extern "C"
13981 #endif
13982 /* We use char because int might match the return type of a gcc2
13983    builtin and then its argument prototype would still apply.  */
13984 char regcomp ();
13985 char (*f) ();
13986
13987 int
13988 main ()
13989 {
13990 /* The GNU C library defines this for functions which it implements
13991     to always fail with ENOSYS.  Some functions are actually named
13992     something starting with __ and the normal name is an alias.  */
13993 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13994 choke me
13995 #else
13996 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13997 #endif
13998
13999   ;
14000   return 0;
14001 }
14002 _ACEOF
14003 rm -f conftest.$ac_objext conftest$ac_exeext
14004 if { (eval echo "$as_me:14004: \"$ac_link\"") >&5
14005   (eval $ac_link) 2>&5
14006   ac_status=$?
14007   echo "$as_me:14007: \$? = $ac_status" >&5
14008   (exit $ac_status); } &&
14009          { ac_try='test -s conftest$ac_exeext'
14010   { (eval echo "$as_me:14010: \"$ac_try\"") >&5
14011   (eval $ac_try) 2>&5
14012   ac_status=$?
14013   echo "$as_me:14013: \$? = $ac_status" >&5
14014   (exit $ac_status); }; }; then
14015   ac_cv_func_regcomp=yes
14016 else
14017   echo "$as_me: failed program was:" >&5
14018 cat conftest.$ac_ext >&5
14019 ac_cv_func_regcomp=no
14020 fi
14021 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14022 fi
14023 echo "$as_me:14023: result: $ac_cv_func_regcomp" >&5
14024 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14025 if test $ac_cv_func_regcomp = yes; then
14026   cf_regex_func=regcomp
14027 else
14028
14029         for cf_regex_lib in $cf_regex_libs
14030         do
14031                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14032 echo "$as_me:14032: checking for regcomp in -l$cf_regex_lib" >&5
14033 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14034 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14035   echo $ECHO_N "(cached) $ECHO_C" >&6
14036 else
14037   ac_check_lib_save_LIBS=$LIBS
14038 LIBS="-l$cf_regex_lib  $LIBS"
14039 cat >conftest.$ac_ext <<_ACEOF
14040 #line 14040 "configure"
14041 #include "confdefs.h"
14042
14043 /* Override any gcc2 internal prototype to avoid an error.  */
14044 #ifdef __cplusplus
14045 extern "C"
14046 #endif
14047 /* We use char because int might match the return type of a gcc2
14048    builtin and then its argument prototype would still apply.  */
14049 char regcomp ();
14050 int
14051 main ()
14052 {
14053 regcomp ();
14054   ;
14055   return 0;
14056 }
14057 _ACEOF
14058 rm -f conftest.$ac_objext conftest$ac_exeext
14059 if { (eval echo "$as_me:14059: \"$ac_link\"") >&5
14060   (eval $ac_link) 2>&5
14061   ac_status=$?
14062   echo "$as_me:14062: \$? = $ac_status" >&5
14063   (exit $ac_status); } &&
14064          { ac_try='test -s conftest$ac_exeext'
14065   { (eval echo "$as_me:14065: \"$ac_try\"") >&5
14066   (eval $ac_try) 2>&5
14067   ac_status=$?
14068   echo "$as_me:14068: \$? = $ac_status" >&5
14069   (exit $ac_status); }; }; then
14070   eval "$as_ac_Lib=yes"
14071 else
14072   echo "$as_me: failed program was:" >&5
14073 cat conftest.$ac_ext >&5
14074 eval "$as_ac_Lib=no"
14075 fi
14076 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14077 LIBS=$ac_check_lib_save_LIBS
14078 fi
14079 echo "$as_me:14079: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14080 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14081 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14082
14083                                 LIBS="-l$cf_regex_lib $LIBS"
14084                                 cf_regex_func=regcomp
14085                                 break
14086 fi
14087
14088         done
14089
14090 fi
14091
14092 if test "$cf_regex_func" = no ; then
14093         echo "$as_me:14093: checking for compile" >&5
14094 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14095 if test "${ac_cv_func_compile+set}" = set; then
14096   echo $ECHO_N "(cached) $ECHO_C" >&6
14097 else
14098   cat >conftest.$ac_ext <<_ACEOF
14099 #line 14099 "configure"
14100 #include "confdefs.h"
14101 /* System header to define __stub macros and hopefully few prototypes,
14102     which can conflict with char compile (); below.  */
14103 #include <assert.h>
14104 /* Override any gcc2 internal prototype to avoid an error.  */
14105 #ifdef __cplusplus
14106 extern "C"
14107 #endif
14108 /* We use char because int might match the return type of a gcc2
14109    builtin and then its argument prototype would still apply.  */
14110 char compile ();
14111 char (*f) ();
14112
14113 int
14114 main ()
14115 {
14116 /* The GNU C library defines this for functions which it implements
14117     to always fail with ENOSYS.  Some functions are actually named
14118     something starting with __ and the normal name is an alias.  */
14119 #if defined (__stub_compile) || defined (__stub___compile)
14120 choke me
14121 #else
14122 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14123 #endif
14124
14125   ;
14126   return 0;
14127 }
14128 _ACEOF
14129 rm -f conftest.$ac_objext conftest$ac_exeext
14130 if { (eval echo "$as_me:14130: \"$ac_link\"") >&5
14131   (eval $ac_link) 2>&5
14132   ac_status=$?
14133   echo "$as_me:14133: \$? = $ac_status" >&5
14134   (exit $ac_status); } &&
14135          { ac_try='test -s conftest$ac_exeext'
14136   { (eval echo "$as_me:14136: \"$ac_try\"") >&5
14137   (eval $ac_try) 2>&5
14138   ac_status=$?
14139   echo "$as_me:14139: \$? = $ac_status" >&5
14140   (exit $ac_status); }; }; then
14141   ac_cv_func_compile=yes
14142 else
14143   echo "$as_me: failed program was:" >&5
14144 cat conftest.$ac_ext >&5
14145 ac_cv_func_compile=no
14146 fi
14147 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14148 fi
14149 echo "$as_me:14149: result: $ac_cv_func_compile" >&5
14150 echo "${ECHO_T}$ac_cv_func_compile" >&6
14151 if test $ac_cv_func_compile = yes; then
14152   cf_regex_func=compile
14153 else
14154
14155                 echo "$as_me:14155: checking for compile in -lgen" >&5
14156 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14157 if test "${ac_cv_lib_gen_compile+set}" = set; then
14158   echo $ECHO_N "(cached) $ECHO_C" >&6
14159 else
14160   ac_check_lib_save_LIBS=$LIBS
14161 LIBS="-lgen  $LIBS"
14162 cat >conftest.$ac_ext <<_ACEOF
14163 #line 14163 "configure"
14164 #include "confdefs.h"
14165
14166 /* Override any gcc2 internal prototype to avoid an error.  */
14167 #ifdef __cplusplus
14168 extern "C"
14169 #endif
14170 /* We use char because int might match the return type of a gcc2
14171    builtin and then its argument prototype would still apply.  */
14172 char compile ();
14173 int
14174 main ()
14175 {
14176 compile ();
14177   ;
14178   return 0;
14179 }
14180 _ACEOF
14181 rm -f conftest.$ac_objext conftest$ac_exeext
14182 if { (eval echo "$as_me:14182: \"$ac_link\"") >&5
14183   (eval $ac_link) 2>&5
14184   ac_status=$?
14185   echo "$as_me:14185: \$? = $ac_status" >&5
14186   (exit $ac_status); } &&
14187          { ac_try='test -s conftest$ac_exeext'
14188   { (eval echo "$as_me:14188: \"$ac_try\"") >&5
14189   (eval $ac_try) 2>&5
14190   ac_status=$?
14191   echo "$as_me:14191: \$? = $ac_status" >&5
14192   (exit $ac_status); }; }; then
14193   ac_cv_lib_gen_compile=yes
14194 else
14195   echo "$as_me: failed program was:" >&5
14196 cat conftest.$ac_ext >&5
14197 ac_cv_lib_gen_compile=no
14198 fi
14199 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14200 LIBS=$ac_check_lib_save_LIBS
14201 fi
14202 echo "$as_me:14202: result: $ac_cv_lib_gen_compile" >&5
14203 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14204 if test $ac_cv_lib_gen_compile = yes; then
14205
14206                                 LIBS="-lgen $LIBS"
14207                                 cf_regex_func=compile
14208 fi
14209
14210 fi
14211
14212 fi
14213
14214 if test "$cf_regex_func" = no ; then
14215         { echo "$as_me:14215: WARNING: cannot find regular expression library" >&5
14216 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14217 fi
14218
14219 echo "$as_me:14219: checking for regular-expression headers" >&5
14220 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14221 if test "${cf_cv_regex_hdrs+set}" = set; then
14222   echo $ECHO_N "(cached) $ECHO_C" >&6
14223 else
14224
14225 cf_cv_regex_hdrs=no
14226 case $cf_regex_func in #(vi
14227 compile) #(vi
14228         for cf_regex_hdr in regexp.h regexpr.h
14229         do
14230                 cat >conftest.$ac_ext <<_ACEOF
14231 #line 14231 "configure"
14232 #include "confdefs.h"
14233 #include <$cf_regex_hdr>
14234 int
14235 main ()
14236 {
14237
14238                         char *p = compile("", "", "", 0);
14239                         int x = step("", "");
14240
14241   ;
14242   return 0;
14243 }
14244 _ACEOF
14245 rm -f conftest.$ac_objext conftest$ac_exeext
14246 if { (eval echo "$as_me:14246: \"$ac_link\"") >&5
14247   (eval $ac_link) 2>&5
14248   ac_status=$?
14249   echo "$as_me:14249: \$? = $ac_status" >&5
14250   (exit $ac_status); } &&
14251          { ac_try='test -s conftest$ac_exeext'
14252   { (eval echo "$as_me:14252: \"$ac_try\"") >&5
14253   (eval $ac_try) 2>&5
14254   ac_status=$?
14255   echo "$as_me:14255: \$? = $ac_status" >&5
14256   (exit $ac_status); }; }; then
14257
14258                         cf_cv_regex_hdrs=$cf_regex_hdr
14259                         break
14260
14261 else
14262   echo "$as_me: failed program was:" >&5
14263 cat conftest.$ac_ext >&5
14264 fi
14265 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14266         done
14267         ;;
14268 *)
14269         for cf_regex_hdr in regex.h
14270         do
14271                 cat >conftest.$ac_ext <<_ACEOF
14272 #line 14272 "configure"
14273 #include "confdefs.h"
14274 #include <sys/types.h>
14275 #include <$cf_regex_hdr>
14276 int
14277 main ()
14278 {
14279
14280                         regex_t *p;
14281                         int x = regcomp(p, "", 0);
14282                         int y = regexec(p, "", 0, 0, 0);
14283                         regfree(p);
14284
14285   ;
14286   return 0;
14287 }
14288 _ACEOF
14289 rm -f conftest.$ac_objext conftest$ac_exeext
14290 if { (eval echo "$as_me:14290: \"$ac_link\"") >&5
14291   (eval $ac_link) 2>&5
14292   ac_status=$?
14293   echo "$as_me:14293: \$? = $ac_status" >&5
14294   (exit $ac_status); } &&
14295          { ac_try='test -s conftest$ac_exeext'
14296   { (eval echo "$as_me:14296: \"$ac_try\"") >&5
14297   (eval $ac_try) 2>&5
14298   ac_status=$?
14299   echo "$as_me:14299: \$? = $ac_status" >&5
14300   (exit $ac_status); }; }; then
14301
14302                         cf_cv_regex_hdrs=$cf_regex_hdr
14303                         break
14304
14305 else
14306   echo "$as_me: failed program was:" >&5
14307 cat conftest.$ac_ext >&5
14308 fi
14309 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14310         done
14311         ;;
14312 esac
14313
14314 fi
14315 echo "$as_me:14315: result: $cf_cv_regex_hdrs" >&5
14316 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14317
14318 case $cf_cv_regex_hdrs in #(vi
14319     no)        { echo "$as_me:14319: WARNING: no regular expression header found" >&5
14320 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14321     regex.h)   cat >>confdefs.h <<\EOF
14322 #define HAVE_REGEX_H_FUNCS 1
14323 EOF
14324  ;; #(vi
14325     regexp.h)  cat >>confdefs.h <<\EOF
14326 #define HAVE_REGEXP_H_FUNCS 1
14327 EOF
14328  ;; #(vi
14329     regexpr.h) cat >>confdefs.h <<\EOF
14330 #define HAVE_REGEXPR_H_FUNCS 1
14331 EOF
14332  ;;
14333 esac
14334
14335 for ac_header in \
14336 fcntl.h \
14337 getopt.h \
14338 limits.h \
14339 locale.h \
14340 math.h \
14341 poll.h \
14342 sys/bsdtypes.h \
14343 sys/ioctl.h \
14344 sys/param.h \
14345 sys/poll.h \
14346 sys/select.h \
14347 sys/time.h \
14348 sys/times.h \
14349 ttyent.h \
14350 unistd.h \
14351 wctype.h \
14352
14353 do
14354 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14355 echo "$as_me:14355: checking for $ac_header" >&5
14356 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14357 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14358   echo $ECHO_N "(cached) $ECHO_C" >&6
14359 else
14360   cat >conftest.$ac_ext <<_ACEOF
14361 #line 14361 "configure"
14362 #include "confdefs.h"
14363 #include <$ac_header>
14364 _ACEOF
14365 if { (eval echo "$as_me:14365: \"$ac_cpp conftest.$ac_ext\"") >&5
14366   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14367   ac_status=$?
14368   egrep -v '^ *\+' conftest.er1 >conftest.err
14369   rm -f conftest.er1
14370   cat conftest.err >&5
14371   echo "$as_me:14371: \$? = $ac_status" >&5
14372   (exit $ac_status); } >/dev/null; then
14373   if test -s conftest.err; then
14374     ac_cpp_err=$ac_c_preproc_warn_flag
14375   else
14376     ac_cpp_err=
14377   fi
14378 else
14379   ac_cpp_err=yes
14380 fi
14381 if test -z "$ac_cpp_err"; then
14382   eval "$as_ac_Header=yes"
14383 else
14384   echo "$as_me: failed program was:" >&5
14385   cat conftest.$ac_ext >&5
14386   eval "$as_ac_Header=no"
14387 fi
14388 rm -f conftest.err conftest.$ac_ext
14389 fi
14390 echo "$as_me:14390: result: `eval echo '${'$as_ac_Header'}'`" >&5
14391 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14392 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14393   cat >>confdefs.h <<EOF
14394 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14395 EOF
14396
14397 fi
14398 done
14399
14400 for ac_header in unistd.h getopt.h
14401 do
14402 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14403 echo "$as_me:14403: checking for $ac_header" >&5
14404 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14405 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14406   echo $ECHO_N "(cached) $ECHO_C" >&6
14407 else
14408   cat >conftest.$ac_ext <<_ACEOF
14409 #line 14409 "configure"
14410 #include "confdefs.h"
14411 #include <$ac_header>
14412 _ACEOF
14413 if { (eval echo "$as_me:14413: \"$ac_cpp conftest.$ac_ext\"") >&5
14414   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14415   ac_status=$?
14416   egrep -v '^ *\+' conftest.er1 >conftest.err
14417   rm -f conftest.er1
14418   cat conftest.err >&5
14419   echo "$as_me:14419: \$? = $ac_status" >&5
14420   (exit $ac_status); } >/dev/null; then
14421   if test -s conftest.err; then
14422     ac_cpp_err=$ac_c_preproc_warn_flag
14423   else
14424     ac_cpp_err=
14425   fi
14426 else
14427   ac_cpp_err=yes
14428 fi
14429 if test -z "$ac_cpp_err"; then
14430   eval "$as_ac_Header=yes"
14431 else
14432   echo "$as_me: failed program was:" >&5
14433   cat conftest.$ac_ext >&5
14434   eval "$as_ac_Header=no"
14435 fi
14436 rm -f conftest.err conftest.$ac_ext
14437 fi
14438 echo "$as_me:14438: result: `eval echo '${'$as_ac_Header'}'`" >&5
14439 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14440 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14441   cat >>confdefs.h <<EOF
14442 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14443 EOF
14444
14445 fi
14446 done
14447
14448 echo "$as_me:14448: checking for header declaring getopt variables" >&5
14449 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14450 if test "${cf_cv_getopt_header+set}" = set; then
14451   echo $ECHO_N "(cached) $ECHO_C" >&6
14452 else
14453
14454 cf_cv_getopt_header=none
14455 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14456 do
14457 cat >conftest.$ac_ext <<_ACEOF
14458 #line 14458 "configure"
14459 #include "confdefs.h"
14460
14461 #include <$cf_header>
14462 int
14463 main ()
14464 {
14465 int x = optind; char *y = optarg
14466   ;
14467   return 0;
14468 }
14469 _ACEOF
14470 rm -f conftest.$ac_objext
14471 if { (eval echo "$as_me:14471: \"$ac_compile\"") >&5
14472   (eval $ac_compile) 2>&5
14473   ac_status=$?
14474   echo "$as_me:14474: \$? = $ac_status" >&5
14475   (exit $ac_status); } &&
14476          { ac_try='test -s conftest.$ac_objext'
14477   { (eval echo "$as_me:14477: \"$ac_try\"") >&5
14478   (eval $ac_try) 2>&5
14479   ac_status=$?
14480   echo "$as_me:14480: \$? = $ac_status" >&5
14481   (exit $ac_status); }; }; then
14482   cf_cv_getopt_header=$cf_header
14483  break
14484 else
14485   echo "$as_me: failed program was:" >&5
14486 cat conftest.$ac_ext >&5
14487 fi
14488 rm -f conftest.$ac_objext conftest.$ac_ext
14489 done
14490
14491 fi
14492 echo "$as_me:14492: result: $cf_cv_getopt_header" >&5
14493 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14494 if test $cf_cv_getopt_header != none ; then
14495         cat >>confdefs.h <<\EOF
14496 #define HAVE_GETOPT_HEADER 1
14497 EOF
14498
14499 fi
14500
14501 # check for ISC (this may also define _POSIX_SOURCE)
14502 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14503 if test "$ISC" = yes ; then
14504
14505 echo "$as_me:14505: checking for main in -lcposix" >&5
14506 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14507 if test "${ac_cv_lib_cposix_main+set}" = set; then
14508   echo $ECHO_N "(cached) $ECHO_C" >&6
14509 else
14510   ac_check_lib_save_LIBS=$LIBS
14511 LIBS="-lcposix  $LIBS"
14512 cat >conftest.$ac_ext <<_ACEOF
14513 #line 14513 "configure"
14514 #include "confdefs.h"
14515
14516 int
14517 main ()
14518 {
14519 main ();
14520   ;
14521   return 0;
14522 }
14523 _ACEOF
14524 rm -f conftest.$ac_objext conftest$ac_exeext
14525 if { (eval echo "$as_me:14525: \"$ac_link\"") >&5
14526   (eval $ac_link) 2>&5
14527   ac_status=$?
14528   echo "$as_me:14528: \$? = $ac_status" >&5
14529   (exit $ac_status); } &&
14530          { ac_try='test -s conftest$ac_exeext'
14531   { (eval echo "$as_me:14531: \"$ac_try\"") >&5
14532   (eval $ac_try) 2>&5
14533   ac_status=$?
14534   echo "$as_me:14534: \$? = $ac_status" >&5
14535   (exit $ac_status); }; }; then
14536   ac_cv_lib_cposix_main=yes
14537 else
14538   echo "$as_me: failed program was:" >&5
14539 cat conftest.$ac_ext >&5
14540 ac_cv_lib_cposix_main=no
14541 fi
14542 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14543 LIBS=$ac_check_lib_save_LIBS
14544 fi
14545 echo "$as_me:14545: result: $ac_cv_lib_cposix_main" >&5
14546 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14547 if test $ac_cv_lib_cposix_main = yes; then
14548   cat >>confdefs.h <<EOF
14549 #define HAVE_LIBCPOSIX 1
14550 EOF
14551
14552   LIBS="-lcposix $LIBS"
14553
14554 fi
14555
14556         echo "$as_me:14556: checking for bzero in -linet" >&5
14557 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14558 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14559   echo $ECHO_N "(cached) $ECHO_C" >&6
14560 else
14561   ac_check_lib_save_LIBS=$LIBS
14562 LIBS="-linet  $LIBS"
14563 cat >conftest.$ac_ext <<_ACEOF
14564 #line 14564 "configure"
14565 #include "confdefs.h"
14566
14567 /* Override any gcc2 internal prototype to avoid an error.  */
14568 #ifdef __cplusplus
14569 extern "C"
14570 #endif
14571 /* We use char because int might match the return type of a gcc2
14572    builtin and then its argument prototype would still apply.  */
14573 char bzero ();
14574 int
14575 main ()
14576 {
14577 bzero ();
14578   ;
14579   return 0;
14580 }
14581 _ACEOF
14582 rm -f conftest.$ac_objext conftest$ac_exeext
14583 if { (eval echo "$as_me:14583: \"$ac_link\"") >&5
14584   (eval $ac_link) 2>&5
14585   ac_status=$?
14586   echo "$as_me:14586: \$? = $ac_status" >&5
14587   (exit $ac_status); } &&
14588          { ac_try='test -s conftest$ac_exeext'
14589   { (eval echo "$as_me:14589: \"$ac_try\"") >&5
14590   (eval $ac_try) 2>&5
14591   ac_status=$?
14592   echo "$as_me:14592: \$? = $ac_status" >&5
14593   (exit $ac_status); }; }; then
14594   ac_cv_lib_inet_bzero=yes
14595 else
14596   echo "$as_me: failed program was:" >&5
14597 cat conftest.$ac_ext >&5
14598 ac_cv_lib_inet_bzero=no
14599 fi
14600 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14601 LIBS=$ac_check_lib_save_LIBS
14602 fi
14603 echo "$as_me:14603: result: $ac_cv_lib_inet_bzero" >&5
14604 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14605 if test $ac_cv_lib_inet_bzero = yes; then
14606   LIBS="-linet $LIBS"
14607 fi
14608 fi
14609
14610 echo "$as_me:14610: checking if sys/time.h works with sys/select.h" >&5
14611 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14612 if test "${cf_cv_sys_time_select+set}" = set; then
14613   echo $ECHO_N "(cached) $ECHO_C" >&6
14614 else
14615
14616 cat >conftest.$ac_ext <<_ACEOF
14617 #line 14617 "configure"
14618 #include "confdefs.h"
14619
14620 #include <sys/types.h>
14621 #ifdef HAVE_SYS_TIME_H
14622 #include <sys/time.h>
14623 #endif
14624 #ifdef HAVE_SYS_SELECT_H
14625 #include <sys/select.h>
14626 #endif
14627
14628 int
14629 main ()
14630 {
14631
14632   ;
14633   return 0;
14634 }
14635 _ACEOF
14636 rm -f conftest.$ac_objext
14637 if { (eval echo "$as_me:14637: \"$ac_compile\"") >&5
14638   (eval $ac_compile) 2>&5
14639   ac_status=$?
14640   echo "$as_me:14640: \$? = $ac_status" >&5
14641   (exit $ac_status); } &&
14642          { ac_try='test -s conftest.$ac_objext'
14643   { (eval echo "$as_me:14643: \"$ac_try\"") >&5
14644   (eval $ac_try) 2>&5
14645   ac_status=$?
14646   echo "$as_me:14646: \$? = $ac_status" >&5
14647   (exit $ac_status); }; }; then
14648   cf_cv_sys_time_select=yes
14649 else
14650   echo "$as_me: failed program was:" >&5
14651 cat conftest.$ac_ext >&5
14652 cf_cv_sys_time_select=no
14653 fi
14654 rm -f conftest.$ac_objext conftest.$ac_ext
14655
14656 fi
14657
14658 echo "$as_me:14658: result: $cf_cv_sys_time_select" >&5
14659 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14660 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
14661 #define HAVE_SYS_TIME_SELECT 1
14662 EOF
14663
14664 ###     checks for compiler characteristics
14665 ac_ext=c
14666 ac_cpp='$CPP $CPPFLAGS'
14667 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14668 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14669 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14670 ac_main_return=return
14671
14672 echo "$as_me:14672: checking for $CC option to accept ANSI C" >&5
14673 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14674 if test "${ac_cv_prog_cc_stdc+set}" = set; then
14675   echo $ECHO_N "(cached) $ECHO_C" >&6
14676 else
14677   ac_cv_prog_cc_stdc=no
14678 ac_save_CC=$CC
14679 cat >conftest.$ac_ext <<_ACEOF
14680 #line 14680 "configure"
14681 #include "confdefs.h"
14682 #include <stdarg.h>
14683 #include <stdio.h>
14684 #include <sys/types.h>
14685 #include <sys/stat.h>
14686 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
14687 struct buf { int x; };
14688 FILE * (*rcsopen) (struct buf *, struct stat *, int);
14689 static char *e (p, i)
14690      char **p;
14691      int i;
14692 {
14693   return p[i];
14694 }
14695 static char *f (char * (*g) (char **, int), char **p, ...)
14696 {
14697   char *s;
14698   va_list v;
14699   va_start (v,p);
14700   s = g (p, va_arg (v,int));
14701   va_end (v);
14702   return s;
14703 }
14704 int test (int i, double x);
14705 struct s1 {int (*f) (int a);};
14706 struct s2 {int (*f) (double a);};
14707 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14708 int argc;
14709 char **argv;
14710 int
14711 main ()
14712 {
14713 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
14714   ;
14715   return 0;
14716 }
14717 _ACEOF
14718 # Don't try gcc -ansi; that turns off useful extensions and
14719 # breaks some systems' header files.
14720 # AIX                   -qlanglvl=ansi
14721 # Ultrix and OSF/1      -std1
14722 # HP-UX 10.20 and later -Ae
14723 # HP-UX older versions  -Aa -D_HPUX_SOURCE
14724 # SVR4                  -Xc -D__EXTENSIONS__
14725 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14726 do
14727   CC="$ac_save_CC $ac_arg"
14728   rm -f conftest.$ac_objext
14729 if { (eval echo "$as_me:14729: \"$ac_compile\"") >&5
14730   (eval $ac_compile) 2>&5
14731   ac_status=$?
14732   echo "$as_me:14732: \$? = $ac_status" >&5
14733   (exit $ac_status); } &&
14734          { ac_try='test -s conftest.$ac_objext'
14735   { (eval echo "$as_me:14735: \"$ac_try\"") >&5
14736   (eval $ac_try) 2>&5
14737   ac_status=$?
14738   echo "$as_me:14738: \$? = $ac_status" >&5
14739   (exit $ac_status); }; }; then
14740   ac_cv_prog_cc_stdc=$ac_arg
14741 break
14742 else
14743   echo "$as_me: failed program was:" >&5
14744 cat conftest.$ac_ext >&5
14745 fi
14746 rm -f conftest.$ac_objext
14747 done
14748 rm -f conftest.$ac_ext conftest.$ac_objext
14749 CC=$ac_save_CC
14750
14751 fi
14752
14753 case "x$ac_cv_prog_cc_stdc" in
14754   x|xno)
14755     echo "$as_me:14755: result: none needed" >&5
14756 echo "${ECHO_T}none needed" >&6 ;;
14757   *)
14758     echo "$as_me:14758: result: $ac_cv_prog_cc_stdc" >&5
14759 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14760     CC="$CC $ac_cv_prog_cc_stdc" ;;
14761 esac
14762
14763 echo "$as_me:14763: checking for an ANSI C-conforming const" >&5
14764 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14765 if test "${ac_cv_c_const+set}" = set; then
14766   echo $ECHO_N "(cached) $ECHO_C" >&6
14767 else
14768   cat >conftest.$ac_ext <<_ACEOF
14769 #line 14769 "configure"
14770 #include "confdefs.h"
14771
14772 int
14773 main ()
14774 {
14775 /* FIXME: Include the comments suggested by Paul. */
14776 #ifndef __cplusplus
14777   /* Ultrix mips cc rejects this.  */
14778   typedef int charset[2];
14779   const charset x;
14780   /* SunOS 4.1.1 cc rejects this.  */
14781   char const *const *ccp;
14782   char **p;
14783   /* NEC SVR4.0.2 mips cc rejects this.  */
14784   struct point {int x, y;};
14785   static struct point const zero = {0,0};
14786   /* AIX XL C 1.02.0.0 rejects this.
14787      It does not let you subtract one const X* pointer from another in
14788      an arm of an if-expression whose if-part is not a constant
14789      expression */
14790   const char *g = "string";
14791   ccp = &g + (g ? g-g : 0);
14792   /* HPUX 7.0 cc rejects these. */
14793   ++ccp;
14794   p = (char**) ccp;
14795   ccp = (char const *const *) p;
14796   { /* SCO 3.2v4 cc rejects this.  */
14797     char *t;
14798     char const *s = 0 ? (char *) 0 : (char const *) 0;
14799
14800     *t++ = 0;
14801   }
14802   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14803     int x[] = {25, 17};
14804     const int *foo = &x[0];
14805     ++foo;
14806   }
14807   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14808     typedef const int *iptr;
14809     iptr p = 0;
14810     ++p;
14811   }
14812   { /* AIX XL C 1.02.0.0 rejects this saying
14813        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14814     struct s { int j; const int *ap[3]; };
14815     struct s *b; b->j = 5;
14816   }
14817   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14818     const int foo = 10;
14819   }
14820 #endif
14821
14822   ;
14823   return 0;
14824 }
14825 _ACEOF
14826 rm -f conftest.$ac_objext
14827 if { (eval echo "$as_me:14827: \"$ac_compile\"") >&5
14828   (eval $ac_compile) 2>&5
14829   ac_status=$?
14830   echo "$as_me:14830: \$? = $ac_status" >&5
14831   (exit $ac_status); } &&
14832          { ac_try='test -s conftest.$ac_objext'
14833   { (eval echo "$as_me:14833: \"$ac_try\"") >&5
14834   (eval $ac_try) 2>&5
14835   ac_status=$?
14836   echo "$as_me:14836: \$? = $ac_status" >&5
14837   (exit $ac_status); }; }; then
14838   ac_cv_c_const=yes
14839 else
14840   echo "$as_me: failed program was:" >&5
14841 cat conftest.$ac_ext >&5
14842 ac_cv_c_const=no
14843 fi
14844 rm -f conftest.$ac_objext conftest.$ac_ext
14845 fi
14846 echo "$as_me:14846: result: $ac_cv_c_const" >&5
14847 echo "${ECHO_T}$ac_cv_c_const" >&6
14848 if test $ac_cv_c_const = no; then
14849
14850 cat >>confdefs.h <<\EOF
14851 #define const
14852 EOF
14853
14854 fi
14855
14856 echo "$as_me:14856: checking for inline" >&5
14857 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14858 if test "${ac_cv_c_inline+set}" = set; then
14859   echo $ECHO_N "(cached) $ECHO_C" >&6
14860 else
14861   ac_cv_c_inline=no
14862 for ac_kw in inline __inline__ __inline; do
14863   cat >conftest.$ac_ext <<_ACEOF
14864 #line 14864 "configure"
14865 #include "confdefs.h"
14866 #ifndef __cplusplus
14867 static $ac_kw int static_foo () {return 0; }
14868 $ac_kw int foo () {return 0; }
14869 #endif
14870
14871 _ACEOF
14872 rm -f conftest.$ac_objext
14873 if { (eval echo "$as_me:14873: \"$ac_compile\"") >&5
14874   (eval $ac_compile) 2>&5
14875   ac_status=$?
14876   echo "$as_me:14876: \$? = $ac_status" >&5
14877   (exit $ac_status); } &&
14878          { ac_try='test -s conftest.$ac_objext'
14879   { (eval echo "$as_me:14879: \"$ac_try\"") >&5
14880   (eval $ac_try) 2>&5
14881   ac_status=$?
14882   echo "$as_me:14882: \$? = $ac_status" >&5
14883   (exit $ac_status); }; }; then
14884   ac_cv_c_inline=$ac_kw; break
14885 else
14886   echo "$as_me: failed program was:" >&5
14887 cat conftest.$ac_ext >&5
14888 fi
14889 rm -f conftest.$ac_objext conftest.$ac_ext
14890 done
14891
14892 fi
14893 echo "$as_me:14893: result: $ac_cv_c_inline" >&5
14894 echo "${ECHO_T}$ac_cv_c_inline" >&6
14895 case $ac_cv_c_inline in
14896   inline | yes) ;;
14897   no)
14898 cat >>confdefs.h <<\EOF
14899 #define inline
14900 EOF
14901  ;;
14902   *)  cat >>confdefs.h <<EOF
14903 #define inline $ac_cv_c_inline
14904 EOF
14905  ;;
14906 esac
14907
14908 NCURSES_INLINE=
14909 if test "$ac_cv_c_inline" != no ; then
14910   NCURSES_INLINE=inline
14911   if test "$INTEL_COMPILER" = yes
14912   then
14913     :
14914   elif test "$GCC" = yes
14915   then
14916     echo "$as_me:14916: checking if $CC supports options to tune inlining" >&5
14917 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14918 if test "${cf_cv_gcc_inline+set}" = set; then
14919   echo $ECHO_N "(cached) $ECHO_C" >&6
14920 else
14921
14922       cf_save_CFLAGS=$CFLAGS
14923       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14924       cat >conftest.$ac_ext <<_ACEOF
14925 #line 14925 "configure"
14926 #include "confdefs.h"
14927 inline int foo(void) { return 1; }
14928 int
14929 main ()
14930 {
14931 ${cf_cv_main_return:-return} foo()
14932   ;
14933   return 0;
14934 }
14935 _ACEOF
14936 rm -f conftest.$ac_objext
14937 if { (eval echo "$as_me:14937: \"$ac_compile\"") >&5
14938   (eval $ac_compile) 2>&5
14939   ac_status=$?
14940   echo "$as_me:14940: \$? = $ac_status" >&5
14941   (exit $ac_status); } &&
14942          { ac_try='test -s conftest.$ac_objext'
14943   { (eval echo "$as_me:14943: \"$ac_try\"") >&5
14944   (eval $ac_try) 2>&5
14945   ac_status=$?
14946   echo "$as_me:14946: \$? = $ac_status" >&5
14947   (exit $ac_status); }; }; then
14948   cf_cv_gcc_inline=yes
14949 else
14950   echo "$as_me: failed program was:" >&5
14951 cat conftest.$ac_ext >&5
14952 cf_cv_gcc_inline=no
14953 fi
14954 rm -f conftest.$ac_objext conftest.$ac_ext
14955       CFLAGS=$cf_save_CFLAGS
14956
14957 fi
14958 echo "$as_me:14958: result: $cf_cv_gcc_inline" >&5
14959 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14960     if test "$cf_cv_gcc_inline" = yes ; then
14961
14962 cf_fix_cppflags=no
14963 cf_new_cflags=
14964 cf_new_cppflags=
14965 cf_new_extra_cppflags=
14966
14967 for cf_add_cflags in --param max-inline-insns-single=1200
14968 do
14969 case $cf_fix_cppflags in
14970 no)
14971         case $cf_add_cflags in #(vi
14972         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14973                 case $cf_add_cflags in
14974                 -D*)
14975                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14976
14977                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14978                                 && test -z "${cf_tst_cflags}" \
14979                                 && cf_fix_cppflags=yes
14980
14981                         if test $cf_fix_cppflags = yes ; then
14982                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14983                                 continue
14984                         elif test "${cf_tst_cflags}" = "\"'" ; then
14985                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14986                                 continue
14987                         fi
14988                         ;;
14989                 esac
14990                 case "$CPPFLAGS" in
14991                 *$cf_add_cflags) #(vi
14992                         ;;
14993                 *) #(vi
14994                         case $cf_add_cflags in #(vi
14995                         -D*)
14996                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14997
14998 CPPFLAGS=`echo "$CPPFLAGS" | \
14999         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15000                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15001
15002                                 ;;
15003                         esac
15004                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15005                         ;;
15006                 esac
15007                 ;;
15008         *)
15009                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15010                 ;;
15011         esac
15012         ;;
15013 yes)
15014         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15015
15016         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15017
15018         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15019                 && test -z "${cf_tst_cflags}" \
15020                 && cf_fix_cppflags=no
15021         ;;
15022 esac
15023 done
15024
15025 if test -n "$cf_new_cflags" ; then
15026
15027         CFLAGS="$CFLAGS $cf_new_cflags"
15028 fi
15029
15030 if test -n "$cf_new_cppflags" ; then
15031
15032         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15033 fi
15034
15035 if test -n "$cf_new_extra_cppflags" ; then
15036
15037         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15038 fi
15039
15040     fi
15041   fi
15042 fi
15043
15044 echo "$as_me:15044: checking for signal global datatype" >&5
15045 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15046 if test "${cf_cv_sig_atomic_t+set}" = set; then
15047   echo $ECHO_N "(cached) $ECHO_C" >&6
15048 else
15049
15050         for cf_type in \
15051                 "volatile sig_atomic_t" \
15052                 "sig_atomic_t" \
15053                 "int"
15054         do
15055         cat >conftest.$ac_ext <<_ACEOF
15056 #line 15056 "configure"
15057 #include "confdefs.h"
15058
15059 #include <sys/types.h>
15060 #include <signal.h>
15061 #include <stdio.h>
15062
15063 extern $cf_type x;
15064 $cf_type x;
15065 static void handler(int sig)
15066 {
15067         x = 5;
15068 }
15069 int
15070 main ()
15071 {
15072 signal(SIGINT, handler);
15073                  x = 1
15074   ;
15075   return 0;
15076 }
15077 _ACEOF
15078 rm -f conftest.$ac_objext
15079 if { (eval echo "$as_me:15079: \"$ac_compile\"") >&5
15080   (eval $ac_compile) 2>&5
15081   ac_status=$?
15082   echo "$as_me:15082: \$? = $ac_status" >&5
15083   (exit $ac_status); } &&
15084          { ac_try='test -s conftest.$ac_objext'
15085   { (eval echo "$as_me:15085: \"$ac_try\"") >&5
15086   (eval $ac_try) 2>&5
15087   ac_status=$?
15088   echo "$as_me:15088: \$? = $ac_status" >&5
15089   (exit $ac_status); }; }; then
15090   cf_cv_sig_atomic_t=$cf_type
15091 else
15092   echo "$as_me: failed program was:" >&5
15093 cat conftest.$ac_ext >&5
15094 cf_cv_sig_atomic_t=no
15095 fi
15096 rm -f conftest.$ac_objext conftest.$ac_ext
15097                 test "$cf_cv_sig_atomic_t" != no && break
15098         done
15099
15100 fi
15101
15102 echo "$as_me:15102: result: $cf_cv_sig_atomic_t" >&5
15103 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15104 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
15105 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15106 EOF
15107
15108 if test $NCURSES_CHTYPE = auto ; then
15109
15110 echo "$as_me:15110: checking for type of chtype" >&5
15111 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15112 if test "${cf_cv_typeof_chtype+set}" = set; then
15113   echo $ECHO_N "(cached) $ECHO_C" >&6
15114 else
15115
15116                 if test "$cross_compiling" = yes; then
15117   cf_cv_typeof_chtype=long
15118 else
15119   cat >conftest.$ac_ext <<_ACEOF
15120 #line 15120 "configure"
15121 #include "confdefs.h"
15122
15123 #define WANT_BITS 31
15124 #include <stdio.h>
15125 int main()
15126 {
15127         FILE *fp = fopen("cf_test.out", "w");
15128         if (fp != 0) {
15129                 char *result = "long";
15130                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15131                         int n;
15132                         unsigned int x, y;
15133                         for (n = 0; n < WANT_BITS; n++) {
15134                                 x = (1 << n);
15135                                 y = (x >> n);
15136                                 if (y != 1 || x == 0) {
15137                                         x = 0;
15138                                         break;
15139                                 }
15140                         }
15141                         /*
15142                          * If x is nonzero, an int is big enough for the bits
15143                          * that we want.
15144                          */
15145                         result = (x != 0) ? "int" : "long";
15146                 }
15147                 fputs(result, fp);
15148                 fclose(fp);
15149         }
15150         ${cf_cv_main_return:-return}(0);
15151 }
15152
15153 _ACEOF
15154 rm -f conftest$ac_exeext
15155 if { (eval echo "$as_me:15155: \"$ac_link\"") >&5
15156   (eval $ac_link) 2>&5
15157   ac_status=$?
15158   echo "$as_me:15158: \$? = $ac_status" >&5
15159   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15160   { (eval echo "$as_me:15160: \"$ac_try\"") >&5
15161   (eval $ac_try) 2>&5
15162   ac_status=$?
15163   echo "$as_me:15163: \$? = $ac_status" >&5
15164   (exit $ac_status); }; }; then
15165   cf_cv_typeof_chtype=`cat cf_test.out`
15166 else
15167   echo "$as_me: program exited with status $ac_status" >&5
15168 echo "$as_me: failed program was:" >&5
15169 cat conftest.$ac_ext >&5
15170 cf_cv_typeof_chtype=long
15171 fi
15172 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15173 fi
15174                 rm -f cf_test.out
15175
15176 fi
15177
15178 echo "$as_me:15178: result: $cf_cv_typeof_chtype" >&5
15179 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15180
15181 cat >>confdefs.h <<EOF
15182 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15183 EOF
15184
15185 else
15186         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15187 fi
15188 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15189
15190 echo "$as_me:15190: checking if unsigned literals are legal" >&5
15191 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15192 if test "${cf_cv_unsigned_literals+set}" = set; then
15193   echo $ECHO_N "(cached) $ECHO_C" >&6
15194 else
15195
15196         cat >conftest.$ac_ext <<_ACEOF
15197 #line 15197 "configure"
15198 #include "confdefs.h"
15199
15200 int
15201 main ()
15202 {
15203 long x = 1L + 1UL + 1U + 1
15204   ;
15205   return 0;
15206 }
15207 _ACEOF
15208 rm -f conftest.$ac_objext
15209 if { (eval echo "$as_me:15209: \"$ac_compile\"") >&5
15210   (eval $ac_compile) 2>&5
15211   ac_status=$?
15212   echo "$as_me:15212: \$? = $ac_status" >&5
15213   (exit $ac_status); } &&
15214          { ac_try='test -s conftest.$ac_objext'
15215   { (eval echo "$as_me:15215: \"$ac_try\"") >&5
15216   (eval $ac_try) 2>&5
15217   ac_status=$?
15218   echo "$as_me:15218: \$? = $ac_status" >&5
15219   (exit $ac_status); }; }; then
15220   cf_cv_unsigned_literals=yes
15221 else
15222   echo "$as_me: failed program was:" >&5
15223 cat conftest.$ac_ext >&5
15224 cf_cv_unsigned_literals=no
15225 fi
15226 rm -f conftest.$ac_objext conftest.$ac_ext
15227
15228 fi
15229
15230 echo "$as_me:15230: result: $cf_cv_unsigned_literals" >&5
15231 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15232
15233 cf_cv_1UL="1"
15234 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15235 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15236
15237 if test $NCURSES_MMASK_T = auto ; then
15238         cf_cv_typeof_mmask_t=long
15239 else
15240         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15241 fi
15242 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15243
15244 ###     Checks for external-data
15245
15246 echo "$as_me:15246: checking if external errno is declared" >&5
15247 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15248 if test "${cf_cv_dcl_errno+set}" = set; then
15249   echo $ECHO_N "(cached) $ECHO_C" >&6
15250 else
15251
15252     cat >conftest.$ac_ext <<_ACEOF
15253 #line 15253 "configure"
15254 #include "confdefs.h"
15255
15256 #ifdef HAVE_STDLIB_H
15257 #include <stdlib.h>
15258 #endif
15259 #include <stdio.h>
15260 #include <sys/types.h>
15261 #include <errno.h>
15262 int
15263 main ()
15264 {
15265 int x = (int) errno
15266   ;
15267   return 0;
15268 }
15269 _ACEOF
15270 rm -f conftest.$ac_objext
15271 if { (eval echo "$as_me:15271: \"$ac_compile\"") >&5
15272   (eval $ac_compile) 2>&5
15273   ac_status=$?
15274   echo "$as_me:15274: \$? = $ac_status" >&5
15275   (exit $ac_status); } &&
15276          { ac_try='test -s conftest.$ac_objext'
15277   { (eval echo "$as_me:15277: \"$ac_try\"") >&5
15278   (eval $ac_try) 2>&5
15279   ac_status=$?
15280   echo "$as_me:15280: \$? = $ac_status" >&5
15281   (exit $ac_status); }; }; then
15282   cf_cv_dcl_errno=yes
15283 else
15284   echo "$as_me: failed program was:" >&5
15285 cat conftest.$ac_ext >&5
15286 cf_cv_dcl_errno=no
15287 fi
15288 rm -f conftest.$ac_objext conftest.$ac_ext
15289
15290 fi
15291 echo "$as_me:15291: result: $cf_cv_dcl_errno" >&5
15292 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15293
15294 if test "$cf_cv_dcl_errno" = no ; then
15295
15296 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15297
15298     cat >>confdefs.h <<EOF
15299 #define $cf_result 1
15300 EOF
15301
15302 fi
15303
15304 # It's possible (for near-UNIX clones) that the data doesn't exist
15305
15306 echo "$as_me:15306: checking if external errno exists" >&5
15307 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15308 if test "${cf_cv_have_errno+set}" = set; then
15309   echo $ECHO_N "(cached) $ECHO_C" >&6
15310 else
15311
15312     cat >conftest.$ac_ext <<_ACEOF
15313 #line 15313 "configure"
15314 #include "confdefs.h"
15315
15316 #undef errno
15317 extern int errno;
15318
15319 int
15320 main ()
15321 {
15322 errno = 2
15323   ;
15324   return 0;
15325 }
15326 _ACEOF
15327 rm -f conftest.$ac_objext conftest$ac_exeext
15328 if { (eval echo "$as_me:15328: \"$ac_link\"") >&5
15329   (eval $ac_link) 2>&5
15330   ac_status=$?
15331   echo "$as_me:15331: \$? = $ac_status" >&5
15332   (exit $ac_status); } &&
15333          { ac_try='test -s conftest$ac_exeext'
15334   { (eval echo "$as_me:15334: \"$ac_try\"") >&5
15335   (eval $ac_try) 2>&5
15336   ac_status=$?
15337   echo "$as_me:15337: \$? = $ac_status" >&5
15338   (exit $ac_status); }; }; then
15339   cf_cv_have_errno=yes
15340 else
15341   echo "$as_me: failed program was:" >&5
15342 cat conftest.$ac_ext >&5
15343 cf_cv_have_errno=no
15344 fi
15345 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15346
15347 fi
15348 echo "$as_me:15348: result: $cf_cv_have_errno" >&5
15349 echo "${ECHO_T}$cf_cv_have_errno" >&6
15350
15351 if test "$cf_cv_have_errno" = yes ; then
15352
15353 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15354
15355     cat >>confdefs.h <<EOF
15356 #define $cf_result 1
15357 EOF
15358
15359 fi
15360
15361 echo "$as_me:15361: checking if data-only library module links" >&5
15362 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15363 if test "${cf_cv_link_dataonly+set}" = set; then
15364   echo $ECHO_N "(cached) $ECHO_C" >&6
15365 else
15366
15367         rm -f conftest.a
15368         cat >conftest.$ac_ext <<EOF
15369 #line 15369 "configure"
15370 int     testdata[3] = { 123, 456, 789 };
15371 EOF
15372         if { (eval echo "$as_me:15372: \"$ac_compile\"") >&5
15373   (eval $ac_compile) 2>&5
15374   ac_status=$?
15375   echo "$as_me:15375: \$? = $ac_status" >&5
15376   (exit $ac_status); } ; then
15377                 mv conftest.o data.o && \
15378                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15379         fi
15380         rm -f conftest.$ac_ext data.o
15381         cat >conftest.$ac_ext <<EOF
15382 #line 15382 "configure"
15383 int     testfunc()
15384 {
15385 #if defined(NeXT)
15386         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15387 #else
15388         extern int testdata[3];
15389         return testdata[0] == 123
15390            &&  testdata[1] == 456
15391            &&  testdata[2] == 789;
15392 #endif
15393 }
15394 EOF
15395         if { (eval echo "$as_me:15395: \"$ac_compile\"") >&5
15396   (eval $ac_compile) 2>&5
15397   ac_status=$?
15398   echo "$as_me:15398: \$? = $ac_status" >&5
15399   (exit $ac_status); }; then
15400                 mv conftest.o func.o && \
15401                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15402         fi
15403         rm -f conftest.$ac_ext func.o
15404         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15405         cf_saveLIBS="$LIBS"
15406         LIBS="conftest.a $LIBS"
15407         if test "$cross_compiling" = yes; then
15408   cf_cv_link_dataonly=unknown
15409 else
15410   cat >conftest.$ac_ext <<_ACEOF
15411 #line 15411 "configure"
15412 #include "confdefs.h"
15413
15414         int main()
15415         {
15416                 extern int testfunc();
15417                 ${cf_cv_main_return:-return} (!testfunc());
15418         }
15419
15420 _ACEOF
15421 rm -f conftest$ac_exeext
15422 if { (eval echo "$as_me:15422: \"$ac_link\"") >&5
15423   (eval $ac_link) 2>&5
15424   ac_status=$?
15425   echo "$as_me:15425: \$? = $ac_status" >&5
15426   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15427   { (eval echo "$as_me:15427: \"$ac_try\"") >&5
15428   (eval $ac_try) 2>&5
15429   ac_status=$?
15430   echo "$as_me:15430: \$? = $ac_status" >&5
15431   (exit $ac_status); }; }; then
15432   cf_cv_link_dataonly=yes
15433 else
15434   echo "$as_me: program exited with status $ac_status" >&5
15435 echo "$as_me: failed program was:" >&5
15436 cat conftest.$ac_ext >&5
15437 cf_cv_link_dataonly=no
15438 fi
15439 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15440 fi
15441         LIBS="$cf_saveLIBS"
15442
15443 fi
15444
15445 echo "$as_me:15445: result: $cf_cv_link_dataonly" >&5
15446 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15447
15448 if test "$cf_cv_link_dataonly" = no ; then
15449         cat >>confdefs.h <<\EOF
15450 #define BROKEN_LINKER 1
15451 EOF
15452
15453         BROKEN_LINKER=1
15454 fi
15455
15456 ###     Checks for library functions.
15457
15458 for ac_func in \
15459 getcwd \
15460 getegid \
15461 geteuid \
15462 getttynam \
15463 issetugid \
15464 poll \
15465 remove \
15466 select \
15467 setbuf \
15468 setbuffer \
15469 setvbuf \
15470 sigaction \
15471 sigvec \
15472 strdup \
15473 strstr \
15474 tcgetpgrp \
15475 times \
15476 vsnprintf \
15477
15478 do
15479 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15480 echo "$as_me:15480: checking for $ac_func" >&5
15481 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15482 if eval "test \"\${$as_ac_var+set}\" = set"; then
15483   echo $ECHO_N "(cached) $ECHO_C" >&6
15484 else
15485   cat >conftest.$ac_ext <<_ACEOF
15486 #line 15486 "configure"
15487 #include "confdefs.h"
15488 /* System header to define __stub macros and hopefully few prototypes,
15489     which can conflict with char $ac_func (); below.  */
15490 #include <assert.h>
15491 /* Override any gcc2 internal prototype to avoid an error.  */
15492 #ifdef __cplusplus
15493 extern "C"
15494 #endif
15495 /* We use char because int might match the return type of a gcc2
15496    builtin and then its argument prototype would still apply.  */
15497 char $ac_func ();
15498 char (*f) ();
15499
15500 int
15501 main ()
15502 {
15503 /* The GNU C library defines this for functions which it implements
15504     to always fail with ENOSYS.  Some functions are actually named
15505     something starting with __ and the normal name is an alias.  */
15506 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15507 choke me
15508 #else
15509 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15510 #endif
15511
15512   ;
15513   return 0;
15514 }
15515 _ACEOF
15516 rm -f conftest.$ac_objext conftest$ac_exeext
15517 if { (eval echo "$as_me:15517: \"$ac_link\"") >&5
15518   (eval $ac_link) 2>&5
15519   ac_status=$?
15520   echo "$as_me:15520: \$? = $ac_status" >&5
15521   (exit $ac_status); } &&
15522          { ac_try='test -s conftest$ac_exeext'
15523   { (eval echo "$as_me:15523: \"$ac_try\"") >&5
15524   (eval $ac_try) 2>&5
15525   ac_status=$?
15526   echo "$as_me:15526: \$? = $ac_status" >&5
15527   (exit $ac_status); }; }; then
15528   eval "$as_ac_var=yes"
15529 else
15530   echo "$as_me: failed program was:" >&5
15531 cat conftest.$ac_ext >&5
15532 eval "$as_ac_var=no"
15533 fi
15534 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15535 fi
15536 echo "$as_me:15536: result: `eval echo '${'$as_ac_var'}'`" >&5
15537 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15538 if test `eval echo '${'$as_ac_var'}'` = yes; then
15539   cat >>confdefs.h <<EOF
15540 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15541 EOF
15542
15543 fi
15544 done
15545
15546 if test "$with_getcap" = "yes" ; then
15547
15548 echo "$as_me:15548: checking for terminal-capability database functions" >&5
15549 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15550 if test "${cf_cv_cgetent+set}" = set; then
15551   echo $ECHO_N "(cached) $ECHO_C" >&6
15552 else
15553
15554 cat >conftest.$ac_ext <<_ACEOF
15555 #line 15555 "configure"
15556 #include "confdefs.h"
15557
15558 #include <stdlib.h>
15559 int
15560 main ()
15561 {
15562
15563         char temp[128];
15564         char *buf = temp;
15565         char *db_array = temp;
15566         cgetent(&buf, &db_array, "vt100");
15567         cgetcap(buf, "tc", '=');
15568         cgetmatch(buf, "tc");
15569
15570   ;
15571   return 0;
15572 }
15573 _ACEOF
15574 rm -f conftest.$ac_objext conftest$ac_exeext
15575 if { (eval echo "$as_me:15575: \"$ac_link\"") >&5
15576   (eval $ac_link) 2>&5
15577   ac_status=$?
15578   echo "$as_me:15578: \$? = $ac_status" >&5
15579   (exit $ac_status); } &&
15580          { ac_try='test -s conftest$ac_exeext'
15581   { (eval echo "$as_me:15581: \"$ac_try\"") >&5
15582   (eval $ac_try) 2>&5
15583   ac_status=$?
15584   echo "$as_me:15584: \$? = $ac_status" >&5
15585   (exit $ac_status); }; }; then
15586   cf_cv_cgetent=yes
15587 else
15588   echo "$as_me: failed program was:" >&5
15589 cat conftest.$ac_ext >&5
15590 cf_cv_cgetent=no
15591 fi
15592 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15593
15594 fi
15595 echo "$as_me:15595: result: $cf_cv_cgetent" >&5
15596 echo "${ECHO_T}$cf_cv_cgetent" >&6
15597
15598 if test "$cf_cv_cgetent" = yes
15599 then
15600         cat >>confdefs.h <<\EOF
15601 #define HAVE_BSD_CGETENT 1
15602 EOF
15603
15604 echo "$as_me:15604: checking if cgetent uses const parameter" >&5
15605 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15606 if test "${cf_cv_cgetent_const+set}" = set; then
15607   echo $ECHO_N "(cached) $ECHO_C" >&6
15608 else
15609
15610 cat >conftest.$ac_ext <<_ACEOF
15611 #line 15611 "configure"
15612 #include "confdefs.h"
15613
15614 #include <stdlib.h>
15615 int
15616 main ()
15617 {
15618
15619         char temp[128];
15620         char *buf = temp;
15621 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15622         const char *db_array = temp;
15623         cgetent(&buf, &db_array, "vt100");
15624 #endif
15625         cgetcap(buf, "tc", '=');
15626         cgetmatch(buf, "tc");
15627
15628   ;
15629   return 0;
15630 }
15631 _ACEOF
15632 rm -f conftest.$ac_objext conftest$ac_exeext
15633 if { (eval echo "$as_me:15633: \"$ac_link\"") >&5
15634   (eval $ac_link) 2>&5
15635   ac_status=$?
15636   echo "$as_me:15636: \$? = $ac_status" >&5
15637   (exit $ac_status); } &&
15638          { ac_try='test -s conftest$ac_exeext'
15639   { (eval echo "$as_me:15639: \"$ac_try\"") >&5
15640   (eval $ac_try) 2>&5
15641   ac_status=$?
15642   echo "$as_me:15642: \$? = $ac_status" >&5
15643   (exit $ac_status); }; }; then
15644   cf_cv_cgetent_const=yes
15645 else
15646   echo "$as_me: failed program was:" >&5
15647 cat conftest.$ac_ext >&5
15648 cf_cv_cgetent_const=no
15649 fi
15650 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15651
15652 fi
15653 echo "$as_me:15653: result: $cf_cv_cgetent_const" >&5
15654 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15655         if test "$cf_cv_cgetent_const" = yes
15656         then
15657                 cat >>confdefs.h <<EOF
15658 #define CGETENT_CONST const
15659 EOF
15660
15661         fi
15662 fi
15663
15664 fi
15665
15666 echo "$as_me:15666: checking for isascii" >&5
15667 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15668 if test "${cf_cv_have_isascii+set}" = set; then
15669   echo $ECHO_N "(cached) $ECHO_C" >&6
15670 else
15671
15672         cat >conftest.$ac_ext <<_ACEOF
15673 #line 15673 "configure"
15674 #include "confdefs.h"
15675 #include <ctype.h>
15676 int
15677 main ()
15678 {
15679 int x = isascii(' ')
15680   ;
15681   return 0;
15682 }
15683 _ACEOF
15684 rm -f conftest.$ac_objext conftest$ac_exeext
15685 if { (eval echo "$as_me:15685: \"$ac_link\"") >&5
15686   (eval $ac_link) 2>&5
15687   ac_status=$?
15688   echo "$as_me:15688: \$? = $ac_status" >&5
15689   (exit $ac_status); } &&
15690          { ac_try='test -s conftest$ac_exeext'
15691   { (eval echo "$as_me:15691: \"$ac_try\"") >&5
15692   (eval $ac_try) 2>&5
15693   ac_status=$?
15694   echo "$as_me:15694: \$? = $ac_status" >&5
15695   (exit $ac_status); }; }; then
15696   cf_cv_have_isascii=yes
15697 else
15698   echo "$as_me: failed program was:" >&5
15699 cat conftest.$ac_ext >&5
15700 cf_cv_have_isascii=no
15701 fi
15702 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15703
15704 fi
15705 echo "$as_me:15705: result: $cf_cv_have_isascii" >&5
15706 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15707 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
15708 #define HAVE_ISASCII 1
15709 EOF
15710
15711 if test "$ac_cv_func_sigaction" = yes; then
15712 echo "$as_me:15712: checking whether sigaction needs _POSIX_SOURCE" >&5
15713 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15714 cat >conftest.$ac_ext <<_ACEOF
15715 #line 15715 "configure"
15716 #include "confdefs.h"
15717
15718 #include <sys/types.h>
15719 #include <signal.h>
15720 int
15721 main ()
15722 {
15723 struct sigaction act
15724   ;
15725   return 0;
15726 }
15727 _ACEOF
15728 rm -f conftest.$ac_objext
15729 if { (eval echo "$as_me:15729: \"$ac_compile\"") >&5
15730   (eval $ac_compile) 2>&5
15731   ac_status=$?
15732   echo "$as_me:15732: \$? = $ac_status" >&5
15733   (exit $ac_status); } &&
15734          { ac_try='test -s conftest.$ac_objext'
15735   { (eval echo "$as_me:15735: \"$ac_try\"") >&5
15736   (eval $ac_try) 2>&5
15737   ac_status=$?
15738   echo "$as_me:15738: \$? = $ac_status" >&5
15739   (exit $ac_status); }; }; then
15740   sigact_bad=no
15741 else
15742   echo "$as_me: failed program was:" >&5
15743 cat conftest.$ac_ext >&5
15744
15745 cat >conftest.$ac_ext <<_ACEOF
15746 #line 15746 "configure"
15747 #include "confdefs.h"
15748
15749 #define _POSIX_SOURCE
15750 #include <sys/types.h>
15751 #include <signal.h>
15752 int
15753 main ()
15754 {
15755 struct sigaction act
15756   ;
15757   return 0;
15758 }
15759 _ACEOF
15760 rm -f conftest.$ac_objext
15761 if { (eval echo "$as_me:15761: \"$ac_compile\"") >&5
15762   (eval $ac_compile) 2>&5
15763   ac_status=$?
15764   echo "$as_me:15764: \$? = $ac_status" >&5
15765   (exit $ac_status); } &&
15766          { ac_try='test -s conftest.$ac_objext'
15767   { (eval echo "$as_me:15767: \"$ac_try\"") >&5
15768   (eval $ac_try) 2>&5
15769   ac_status=$?
15770   echo "$as_me:15770: \$? = $ac_status" >&5
15771   (exit $ac_status); }; }; then
15772   sigact_bad=yes
15773          cat >>confdefs.h <<\EOF
15774 #define _POSIX_SOURCE 1
15775 EOF
15776
15777 else
15778   echo "$as_me: failed program was:" >&5
15779 cat conftest.$ac_ext >&5
15780 sigact_bad=unknown
15781 fi
15782 rm -f conftest.$ac_objext conftest.$ac_ext
15783 fi
15784 rm -f conftest.$ac_objext conftest.$ac_ext
15785 echo "$as_me:15785: result: $sigact_bad" >&5
15786 echo "${ECHO_T}$sigact_bad" >&6
15787 fi
15788
15789 echo "$as_me:15789: checking if nanosleep really works" >&5
15790 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15791 if test "${cf_cv_func_nanosleep+set}" = set; then
15792   echo $ECHO_N "(cached) $ECHO_C" >&6
15793 else
15794
15795 if test "$cross_compiling" = yes; then
15796   cf_cv_func_nanosleep=unknown
15797 else
15798   cat >conftest.$ac_ext <<_ACEOF
15799 #line 15799 "configure"
15800 #include "confdefs.h"
15801
15802 #include <stdio.h>
15803 #include <errno.h>
15804 #include <time.h>
15805
15806 #ifdef HAVE_SYS_TIME_H
15807 #include <sys/time.h>
15808 #endif
15809
15810 int main() {
15811         struct timespec ts1, ts2;
15812         int code;
15813         ts1.tv_sec  = 0;
15814         ts1.tv_nsec = 750000000;
15815         ts2.tv_sec  = 0;
15816         ts2.tv_nsec = 0;
15817         errno = 0;
15818         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15819         ${cf_cv_main_return:-return}(code != 0);
15820 }
15821
15822 _ACEOF
15823 rm -f conftest$ac_exeext
15824 if { (eval echo "$as_me:15824: \"$ac_link\"") >&5
15825   (eval $ac_link) 2>&5
15826   ac_status=$?
15827   echo "$as_me:15827: \$? = $ac_status" >&5
15828   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15829   { (eval echo "$as_me:15829: \"$ac_try\"") >&5
15830   (eval $ac_try) 2>&5
15831   ac_status=$?
15832   echo "$as_me:15832: \$? = $ac_status" >&5
15833   (exit $ac_status); }; }; then
15834   cf_cv_func_nanosleep=yes
15835 else
15836   echo "$as_me: program exited with status $ac_status" >&5
15837 echo "$as_me: failed program was:" >&5
15838 cat conftest.$ac_ext >&5
15839 cf_cv_func_nanosleep=no
15840 fi
15841 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15842 fi
15843 fi
15844 echo "$as_me:15844: result: $cf_cv_func_nanosleep" >&5
15845 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15846
15847 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
15848 #define HAVE_NANOSLEEP 1
15849 EOF
15850
15851 for ac_header in \
15852 termio.h \
15853 termios.h \
15854 unistd.h \
15855
15856 do
15857 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15858 echo "$as_me:15858: checking for $ac_header" >&5
15859 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15860 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15861   echo $ECHO_N "(cached) $ECHO_C" >&6
15862 else
15863   cat >conftest.$ac_ext <<_ACEOF
15864 #line 15864 "configure"
15865 #include "confdefs.h"
15866 #include <$ac_header>
15867 _ACEOF
15868 if { (eval echo "$as_me:15868: \"$ac_cpp conftest.$ac_ext\"") >&5
15869   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15870   ac_status=$?
15871   egrep -v '^ *\+' conftest.er1 >conftest.err
15872   rm -f conftest.er1
15873   cat conftest.err >&5
15874   echo "$as_me:15874: \$? = $ac_status" >&5
15875   (exit $ac_status); } >/dev/null; then
15876   if test -s conftest.err; then
15877     ac_cpp_err=$ac_c_preproc_warn_flag
15878   else
15879     ac_cpp_err=
15880   fi
15881 else
15882   ac_cpp_err=yes
15883 fi
15884 if test -z "$ac_cpp_err"; then
15885   eval "$as_ac_Header=yes"
15886 else
15887   echo "$as_me: failed program was:" >&5
15888   cat conftest.$ac_ext >&5
15889   eval "$as_ac_Header=no"
15890 fi
15891 rm -f conftest.err conftest.$ac_ext
15892 fi
15893 echo "$as_me:15893: result: `eval echo '${'$as_ac_Header'}'`" >&5
15894 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15895 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15896   cat >>confdefs.h <<EOF
15897 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15898 EOF
15899
15900 fi
15901 done
15902
15903 if test "$ISC" = yes ; then
15904
15905 for ac_header in sys/termio.h
15906 do
15907 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15908 echo "$as_me:15908: checking for $ac_header" >&5
15909 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15910 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15911   echo $ECHO_N "(cached) $ECHO_C" >&6
15912 else
15913   cat >conftest.$ac_ext <<_ACEOF
15914 #line 15914 "configure"
15915 #include "confdefs.h"
15916 #include <$ac_header>
15917 _ACEOF
15918 if { (eval echo "$as_me:15918: \"$ac_cpp conftest.$ac_ext\"") >&5
15919   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15920   ac_status=$?
15921   egrep -v '^ *\+' conftest.er1 >conftest.err
15922   rm -f conftest.er1
15923   cat conftest.err >&5
15924   echo "$as_me:15924: \$? = $ac_status" >&5
15925   (exit $ac_status); } >/dev/null; then
15926   if test -s conftest.err; then
15927     ac_cpp_err=$ac_c_preproc_warn_flag
15928   else
15929     ac_cpp_err=
15930   fi
15931 else
15932   ac_cpp_err=yes
15933 fi
15934 if test -z "$ac_cpp_err"; then
15935   eval "$as_ac_Header=yes"
15936 else
15937   echo "$as_me: failed program was:" >&5
15938   cat conftest.$ac_ext >&5
15939   eval "$as_ac_Header=no"
15940 fi
15941 rm -f conftest.err conftest.$ac_ext
15942 fi
15943 echo "$as_me:15943: result: `eval echo '${'$as_ac_Header'}'`" >&5
15944 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15945 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15946   cat >>confdefs.h <<EOF
15947 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15948 EOF
15949
15950 fi
15951 done
15952
15953 fi
15954 if test "$ac_cv_header_termios_h" = yes ; then
15955         case "$CFLAGS $CPPFLAGS" in
15956         *-D_POSIX_SOURCE*)
15957                 termios_bad=dunno ;;
15958         *)      termios_bad=maybe ;;
15959         esac
15960         if test "$termios_bad" = maybe ; then
15961         echo "$as_me:15961: checking whether termios.h needs _POSIX_SOURCE" >&5
15962 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15963         cat >conftest.$ac_ext <<_ACEOF
15964 #line 15964 "configure"
15965 #include "confdefs.h"
15966 #include <termios.h>
15967 int
15968 main ()
15969 {
15970 struct termios foo; int x = foo.c_iflag
15971   ;
15972   return 0;
15973 }
15974 _ACEOF
15975 rm -f conftest.$ac_objext
15976 if { (eval echo "$as_me:15976: \"$ac_compile\"") >&5
15977   (eval $ac_compile) 2>&5
15978   ac_status=$?
15979   echo "$as_me:15979: \$? = $ac_status" >&5
15980   (exit $ac_status); } &&
15981          { ac_try='test -s conftest.$ac_objext'
15982   { (eval echo "$as_me:15982: \"$ac_try\"") >&5
15983   (eval $ac_try) 2>&5
15984   ac_status=$?
15985   echo "$as_me:15985: \$? = $ac_status" >&5
15986   (exit $ac_status); }; }; then
15987   termios_bad=no
15988 else
15989   echo "$as_me: failed program was:" >&5
15990 cat conftest.$ac_ext >&5
15991
15992                 cat >conftest.$ac_ext <<_ACEOF
15993 #line 15993 "configure"
15994 #include "confdefs.h"
15995
15996 #define _POSIX_SOURCE
15997 #include <termios.h>
15998 int
15999 main ()
16000 {
16001 struct termios foo; int x = foo.c_iflag
16002   ;
16003   return 0;
16004 }
16005 _ACEOF
16006 rm -f conftest.$ac_objext
16007 if { (eval echo "$as_me:16007: \"$ac_compile\"") >&5
16008   (eval $ac_compile) 2>&5
16009   ac_status=$?
16010   echo "$as_me:16010: \$? = $ac_status" >&5
16011   (exit $ac_status); } &&
16012          { ac_try='test -s conftest.$ac_objext'
16013   { (eval echo "$as_me:16013: \"$ac_try\"") >&5
16014   (eval $ac_try) 2>&5
16015   ac_status=$?
16016   echo "$as_me:16016: \$? = $ac_status" >&5
16017   (exit $ac_status); }; }; then
16018   termios_bad=unknown
16019 else
16020   echo "$as_me: failed program was:" >&5
16021 cat conftest.$ac_ext >&5
16022 termios_bad=yes cat >>confdefs.h <<\EOF
16023 #define _POSIX_SOURCE 1
16024 EOF
16025
16026 fi
16027 rm -f conftest.$ac_objext conftest.$ac_ext
16028
16029 fi
16030 rm -f conftest.$ac_objext conftest.$ac_ext
16031         echo "$as_me:16031: result: $termios_bad" >&5
16032 echo "${ECHO_T}$termios_bad" >&6
16033         fi
16034 fi
16035
16036 echo "$as_me:16036: checking for tcgetattr" >&5
16037 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16038 if test "${cf_cv_have_tcgetattr+set}" = set; then
16039   echo $ECHO_N "(cached) $ECHO_C" >&6
16040 else
16041
16042 cat >conftest.$ac_ext <<_ACEOF
16043 #line 16043 "configure"
16044 #include "confdefs.h"
16045
16046 #include <sys/types.h>
16047 #ifdef HAVE_UNISTD_H
16048 #include <unistd.h>
16049 #endif
16050 #ifdef HAVE_TERMIOS_H
16051 #include <termios.h>
16052 #define TTY struct termios
16053 #else
16054 #ifdef HAVE_TERMIO_H
16055 #include <termio.h>
16056 #define TTY struct termio
16057 #endif
16058 #endif
16059
16060 int
16061 main ()
16062 {
16063
16064 TTY foo;
16065 tcgetattr(1, &foo);
16066   ;
16067   return 0;
16068 }
16069 _ACEOF
16070 rm -f conftest.$ac_objext conftest$ac_exeext
16071 if { (eval echo "$as_me:16071: \"$ac_link\"") >&5
16072   (eval $ac_link) 2>&5
16073   ac_status=$?
16074   echo "$as_me:16074: \$? = $ac_status" >&5
16075   (exit $ac_status); } &&
16076          { ac_try='test -s conftest$ac_exeext'
16077   { (eval echo "$as_me:16077: \"$ac_try\"") >&5
16078   (eval $ac_try) 2>&5
16079   ac_status=$?
16080   echo "$as_me:16080: \$? = $ac_status" >&5
16081   (exit $ac_status); }; }; then
16082   cf_cv_have_tcgetattr=yes
16083 else
16084   echo "$as_me: failed program was:" >&5
16085 cat conftest.$ac_ext >&5
16086 cf_cv_have_tcgetattr=no
16087 fi
16088 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16089 fi
16090 echo "$as_me:16090: result: $cf_cv_have_tcgetattr" >&5
16091 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16092 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
16093 #define HAVE_TCGETATTR 1
16094 EOF
16095
16096 echo "$as_me:16096: checking for vsscanf function or workaround" >&5
16097 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16098 if test "${cf_cv_func_vsscanf+set}" = set; then
16099   echo $ECHO_N "(cached) $ECHO_C" >&6
16100 else
16101
16102 cat >conftest.$ac_ext <<_ACEOF
16103 #line 16103 "configure"
16104 #include "confdefs.h"
16105
16106 #include <stdarg.h>
16107 #include <stdio.h>
16108 int
16109 main ()
16110 {
16111
16112         va_list ap;
16113         vsscanf("from", "%d", ap)
16114   ;
16115   return 0;
16116 }
16117 _ACEOF
16118 rm -f conftest.$ac_objext conftest$ac_exeext
16119 if { (eval echo "$as_me:16119: \"$ac_link\"") >&5
16120   (eval $ac_link) 2>&5
16121   ac_status=$?
16122   echo "$as_me:16122: \$? = $ac_status" >&5
16123   (exit $ac_status); } &&
16124          { ac_try='test -s conftest$ac_exeext'
16125   { (eval echo "$as_me:16125: \"$ac_try\"") >&5
16126   (eval $ac_try) 2>&5
16127   ac_status=$?
16128   echo "$as_me:16128: \$? = $ac_status" >&5
16129   (exit $ac_status); }; }; then
16130   cf_cv_func_vsscanf=vsscanf
16131 else
16132   echo "$as_me: failed program was:" >&5
16133 cat conftest.$ac_ext >&5
16134
16135 cat >conftest.$ac_ext <<_ACEOF
16136 #line 16136 "configure"
16137 #include "confdefs.h"
16138
16139 #include <stdarg.h>
16140 #include <stdio.h>
16141 int
16142 main ()
16143 {
16144
16145     FILE strbuf;
16146     char *str = "from";
16147
16148     strbuf._flag = _IOREAD;
16149     strbuf._ptr = strbuf._base = (unsigned char *) str;
16150     strbuf._cnt = strlen(str);
16151     strbuf._file = _NFILE;
16152     return (vfscanf(&strbuf, "%d", ap))
16153   ;
16154   return 0;
16155 }
16156 _ACEOF
16157 rm -f conftest.$ac_objext conftest$ac_exeext
16158 if { (eval echo "$as_me:16158: \"$ac_link\"") >&5
16159   (eval $ac_link) 2>&5
16160   ac_status=$?
16161   echo "$as_me:16161: \$? = $ac_status" >&5
16162   (exit $ac_status); } &&
16163          { ac_try='test -s conftest$ac_exeext'
16164   { (eval echo "$as_me:16164: \"$ac_try\"") >&5
16165   (eval $ac_try) 2>&5
16166   ac_status=$?
16167   echo "$as_me:16167: \$? = $ac_status" >&5
16168   (exit $ac_status); }; }; then
16169   cf_cv_func_vsscanf=vfscanf
16170 else
16171   echo "$as_me: failed program was:" >&5
16172 cat conftest.$ac_ext >&5
16173
16174 cat >conftest.$ac_ext <<_ACEOF
16175 #line 16175 "configure"
16176 #include "confdefs.h"
16177
16178 #include <stdarg.h>
16179 #include <stdio.h>
16180 int
16181 main ()
16182 {
16183
16184     FILE strbuf;
16185     char *str = "from";
16186
16187     strbuf._flag = _IOREAD;
16188     strbuf._ptr = strbuf._base = (unsigned char *) str;
16189     strbuf._cnt = strlen(str);
16190     strbuf._file = _NFILE;
16191     return (_doscan(&strbuf, "%d", ap))
16192   ;
16193   return 0;
16194 }
16195 _ACEOF
16196 rm -f conftest.$ac_objext conftest$ac_exeext
16197 if { (eval echo "$as_me:16197: \"$ac_link\"") >&5
16198   (eval $ac_link) 2>&5
16199   ac_status=$?
16200   echo "$as_me:16200: \$? = $ac_status" >&5
16201   (exit $ac_status); } &&
16202          { ac_try='test -s conftest$ac_exeext'
16203   { (eval echo "$as_me:16203: \"$ac_try\"") >&5
16204   (eval $ac_try) 2>&5
16205   ac_status=$?
16206   echo "$as_me:16206: \$? = $ac_status" >&5
16207   (exit $ac_status); }; }; then
16208   cf_cv_func_vsscanf=_doscan
16209 else
16210   echo "$as_me: failed program was:" >&5
16211 cat conftest.$ac_ext >&5
16212
16213 cf_cv_func_vsscanf=no
16214 fi
16215 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16216 fi
16217 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16218 fi
16219 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16220 fi
16221 echo "$as_me:16221: result: $cf_cv_func_vsscanf" >&5
16222 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16223
16224 case $cf_cv_func_vsscanf in #(vi
16225 vsscanf) cat >>confdefs.h <<\EOF
16226 #define HAVE_VSSCANF 1
16227 EOF
16228 ;; #(vi
16229 vfscanf) cat >>confdefs.h <<\EOF
16230 #define HAVE_VFSCANF 1
16231 EOF
16232 ;; #(vi
16233 _doscan) cat >>confdefs.h <<\EOF
16234 #define HAVE__DOSCAN 1
16235 EOF
16236 ;;
16237 esac
16238
16239 echo "$as_me:16239: checking for working mkstemp" >&5
16240 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16241 if test "${cf_cv_func_mkstemp+set}" = set; then
16242   echo $ECHO_N "(cached) $ECHO_C" >&6
16243 else
16244
16245 rm -rf conftest*
16246 if test "$cross_compiling" = yes; then
16247   cf_cv_func_mkstemp=maybe
16248 else
16249   cat >conftest.$ac_ext <<_ACEOF
16250 #line 16250 "configure"
16251 #include "confdefs.h"
16252
16253 #include <sys/types.h>
16254 #include <stdlib.h>
16255 #include <stdio.h>
16256 #include <string.h>
16257 #include <sys/stat.h>
16258 int main()
16259 {
16260         char *tmpl = "conftestXXXXXX";
16261         char name[2][80];
16262         int n;
16263         int result = 0;
16264         int fd;
16265         struct stat sb;
16266
16267         umask(077);
16268         for (n = 0; n < 2; ++n) {
16269                 strcpy(name[n], tmpl);
16270                 if ((fd = mkstemp(name[n])) >= 0) {
16271                         if (!strcmp(name[n], tmpl)
16272                          || stat(name[n], &sb) != 0
16273                          || (sb.st_mode & S_IFMT) != S_IFREG
16274                          || (sb.st_mode & 077) != 0) {
16275                                 result = 1;
16276                         }
16277                         close(fd);
16278                 }
16279         }
16280         if (result == 0
16281          && !strcmp(name[0], name[1]))
16282                 result = 1;
16283         ${cf_cv_main_return:-return}(result);
16284 }
16285
16286 _ACEOF
16287 rm -f conftest$ac_exeext
16288 if { (eval echo "$as_me:16288: \"$ac_link\"") >&5
16289   (eval $ac_link) 2>&5
16290   ac_status=$?
16291   echo "$as_me:16291: \$? = $ac_status" >&5
16292   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16293   { (eval echo "$as_me:16293: \"$ac_try\"") >&5
16294   (eval $ac_try) 2>&5
16295   ac_status=$?
16296   echo "$as_me:16296: \$? = $ac_status" >&5
16297   (exit $ac_status); }; }; then
16298   cf_cv_func_mkstemp=yes
16299
16300 else
16301   echo "$as_me: program exited with status $ac_status" >&5
16302 echo "$as_me: failed program was:" >&5
16303 cat conftest.$ac_ext >&5
16304 cf_cv_func_mkstemp=no
16305
16306 fi
16307 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16308 fi
16309
16310 fi
16311 echo "$as_me:16311: result: $cf_cv_func_mkstemp" >&5
16312 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16313 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16314         echo "$as_me:16314: checking for mkstemp" >&5
16315 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16316 if test "${ac_cv_func_mkstemp+set}" = set; then
16317   echo $ECHO_N "(cached) $ECHO_C" >&6
16318 else
16319   cat >conftest.$ac_ext <<_ACEOF
16320 #line 16320 "configure"
16321 #include "confdefs.h"
16322 /* System header to define __stub macros and hopefully few prototypes,
16323     which can conflict with char mkstemp (); below.  */
16324 #include <assert.h>
16325 /* Override any gcc2 internal prototype to avoid an error.  */
16326 #ifdef __cplusplus
16327 extern "C"
16328 #endif
16329 /* We use char because int might match the return type of a gcc2
16330    builtin and then its argument prototype would still apply.  */
16331 char mkstemp ();
16332 char (*f) ();
16333
16334 int
16335 main ()
16336 {
16337 /* The GNU C library defines this for functions which it implements
16338     to always fail with ENOSYS.  Some functions are actually named
16339     something starting with __ and the normal name is an alias.  */
16340 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16341 choke me
16342 #else
16343 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16344 #endif
16345
16346   ;
16347   return 0;
16348 }
16349 _ACEOF
16350 rm -f conftest.$ac_objext conftest$ac_exeext
16351 if { (eval echo "$as_me:16351: \"$ac_link\"") >&5
16352   (eval $ac_link) 2>&5
16353   ac_status=$?
16354   echo "$as_me:16354: \$? = $ac_status" >&5
16355   (exit $ac_status); } &&
16356          { ac_try='test -s conftest$ac_exeext'
16357   { (eval echo "$as_me:16357: \"$ac_try\"") >&5
16358   (eval $ac_try) 2>&5
16359   ac_status=$?
16360   echo "$as_me:16360: \$? = $ac_status" >&5
16361   (exit $ac_status); }; }; then
16362   ac_cv_func_mkstemp=yes
16363 else
16364   echo "$as_me: failed program was:" >&5
16365 cat conftest.$ac_ext >&5
16366 ac_cv_func_mkstemp=no
16367 fi
16368 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16369 fi
16370 echo "$as_me:16370: result: $ac_cv_func_mkstemp" >&5
16371 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16372
16373 fi
16374 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16375         cat >>confdefs.h <<\EOF
16376 #define HAVE_MKSTEMP 1
16377 EOF
16378
16379 fi
16380
16381 # setup for prototype of fallback for vsscanf()
16382
16383 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16384         HAVE_VSSCANF=1
16385 else
16386         HAVE_VSSCANF=0
16387 fi
16388
16389 if test "$cross_compiling" = yes ; then
16390         { echo "$as_me:16390: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16391 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16392 else
16393         echo "$as_me:16393: checking whether setvbuf arguments are reversed" >&5
16394 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16395 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16396   echo $ECHO_N "(cached) $ECHO_C" >&6
16397 else
16398   if test "$cross_compiling" = yes; then
16399   { { echo "$as_me:16399: error: cannot run test program while cross compiling" >&5
16400 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16401    { (exit 1); exit 1; }; }
16402 else
16403   cat >conftest.$ac_ext <<_ACEOF
16404 #line 16404 "configure"
16405 #include "confdefs.h"
16406 #include <stdio.h>
16407 /* If setvbuf has the reversed format, exit 0. */
16408 int
16409 main ()
16410 {
16411   /* This call has the arguments reversed.
16412      A reversed system may check and see that the address of main
16413      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16414   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16415     $ac_main_return(1);
16416   putc('\r', stdout);
16417   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16418 }
16419 _ACEOF
16420 rm -f conftest$ac_exeext
16421 if { (eval echo "$as_me:16421: \"$ac_link\"") >&5
16422   (eval $ac_link) 2>&5
16423   ac_status=$?
16424   echo "$as_me:16424: \$? = $ac_status" >&5
16425   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16426   { (eval echo "$as_me:16426: \"$ac_try\"") >&5
16427   (eval $ac_try) 2>&5
16428   ac_status=$?
16429   echo "$as_me:16429: \$? = $ac_status" >&5
16430   (exit $ac_status); }; }; then
16431   ac_cv_func_setvbuf_reversed=yes
16432 else
16433   echo "$as_me: program exited with status $ac_status" >&5
16434 echo "$as_me: failed program was:" >&5
16435 cat conftest.$ac_ext >&5
16436 ac_cv_func_setvbuf_reversed=no
16437 fi
16438 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16439 fi
16440 rm -f core core.* *.core
16441 fi
16442 echo "$as_me:16442: result: $ac_cv_func_setvbuf_reversed" >&5
16443 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16444 if test $ac_cv_func_setvbuf_reversed = yes; then
16445
16446 cat >>confdefs.h <<\EOF
16447 #define SETVBUF_REVERSED 1
16448 EOF
16449
16450 fi
16451
16452 fi
16453 echo "$as_me:16453: checking return type of signal handlers" >&5
16454 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
16455 if test "${ac_cv_type_signal+set}" = set; then
16456   echo $ECHO_N "(cached) $ECHO_C" >&6
16457 else
16458   cat >conftest.$ac_ext <<_ACEOF
16459 #line 16459 "configure"
16460 #include "confdefs.h"
16461 #include <sys/types.h>
16462 #include <signal.h>
16463 #ifdef signal
16464 # undef signal
16465 #endif
16466 #ifdef __cplusplus
16467 extern "C" void (*signal (int, void (*)(int)))(int);
16468 #else
16469 void (*signal ()) ();
16470 #endif
16471
16472 int
16473 main ()
16474 {
16475 int i;
16476   ;
16477   return 0;
16478 }
16479 _ACEOF
16480 rm -f conftest.$ac_objext
16481 if { (eval echo "$as_me:16481: \"$ac_compile\"") >&5
16482   (eval $ac_compile) 2>&5
16483   ac_status=$?
16484   echo "$as_me:16484: \$? = $ac_status" >&5
16485   (exit $ac_status); } &&
16486          { ac_try='test -s conftest.$ac_objext'
16487   { (eval echo "$as_me:16487: \"$ac_try\"") >&5
16488   (eval $ac_try) 2>&5
16489   ac_status=$?
16490   echo "$as_me:16490: \$? = $ac_status" >&5
16491   (exit $ac_status); }; }; then
16492   ac_cv_type_signal=void
16493 else
16494   echo "$as_me: failed program was:" >&5
16495 cat conftest.$ac_ext >&5
16496 ac_cv_type_signal=int
16497 fi
16498 rm -f conftest.$ac_objext conftest.$ac_ext
16499 fi
16500 echo "$as_me:16500: result: $ac_cv_type_signal" >&5
16501 echo "${ECHO_T}$ac_cv_type_signal" >&6
16502
16503 cat >>confdefs.h <<EOF
16504 #define RETSIGTYPE $ac_cv_type_signal
16505 EOF
16506
16507 echo "$as_me:16507: checking for intptr_t" >&5
16508 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16509 if test "${ac_cv_type_intptr_t+set}" = set; then
16510   echo $ECHO_N "(cached) $ECHO_C" >&6
16511 else
16512   cat >conftest.$ac_ext <<_ACEOF
16513 #line 16513 "configure"
16514 #include "confdefs.h"
16515 $ac_includes_default
16516 int
16517 main ()
16518 {
16519 if ((intptr_t *) 0)
16520   return 0;
16521 if (sizeof (intptr_t))
16522   return 0;
16523   ;
16524   return 0;
16525 }
16526 _ACEOF
16527 rm -f conftest.$ac_objext
16528 if { (eval echo "$as_me:16528: \"$ac_compile\"") >&5
16529   (eval $ac_compile) 2>&5
16530   ac_status=$?
16531   echo "$as_me:16531: \$? = $ac_status" >&5
16532   (exit $ac_status); } &&
16533          { ac_try='test -s conftest.$ac_objext'
16534   { (eval echo "$as_me:16534: \"$ac_try\"") >&5
16535   (eval $ac_try) 2>&5
16536   ac_status=$?
16537   echo "$as_me:16537: \$? = $ac_status" >&5
16538   (exit $ac_status); }; }; then
16539   ac_cv_type_intptr_t=yes
16540 else
16541   echo "$as_me: failed program was:" >&5
16542 cat conftest.$ac_ext >&5
16543 ac_cv_type_intptr_t=no
16544 fi
16545 rm -f conftest.$ac_objext conftest.$ac_ext
16546 fi
16547 echo "$as_me:16547: result: $ac_cv_type_intptr_t" >&5
16548 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16549 if test $ac_cv_type_intptr_t = yes; then
16550   :
16551 else
16552
16553 cat >>confdefs.h <<EOF
16554 #define intptr_t long
16555 EOF
16556
16557 fi
16558
16559 echo "$as_me:16559: checking for type sigaction_t" >&5
16560 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16561 if test "${cf_cv_type_sigaction+set}" = set; then
16562   echo $ECHO_N "(cached) $ECHO_C" >&6
16563 else
16564
16565         cat >conftest.$ac_ext <<_ACEOF
16566 #line 16566 "configure"
16567 #include "confdefs.h"
16568
16569 #include <signal.h>
16570 int
16571 main ()
16572 {
16573 sigaction_t x
16574   ;
16575   return 0;
16576 }
16577 _ACEOF
16578 rm -f conftest.$ac_objext
16579 if { (eval echo "$as_me:16579: \"$ac_compile\"") >&5
16580   (eval $ac_compile) 2>&5
16581   ac_status=$?
16582   echo "$as_me:16582: \$? = $ac_status" >&5
16583   (exit $ac_status); } &&
16584          { ac_try='test -s conftest.$ac_objext'
16585   { (eval echo "$as_me:16585: \"$ac_try\"") >&5
16586   (eval $ac_try) 2>&5
16587   ac_status=$?
16588   echo "$as_me:16588: \$? = $ac_status" >&5
16589   (exit $ac_status); }; }; then
16590   cf_cv_type_sigaction=yes
16591 else
16592   echo "$as_me: failed program was:" >&5
16593 cat conftest.$ac_ext >&5
16594 cf_cv_type_sigaction=no
16595 fi
16596 rm -f conftest.$ac_objext conftest.$ac_ext
16597 fi
16598
16599 echo "$as_me:16599: result: $cf_cv_type_sigaction" >&5
16600 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16601 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
16602 #define HAVE_TYPE_SIGACTION 1
16603 EOF
16604
16605 echo "$as_me:16605: checking declaration of size-change" >&5
16606 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16607 if test "${cf_cv_sizechange+set}" = set; then
16608   echo $ECHO_N "(cached) $ECHO_C" >&6
16609 else
16610
16611     cf_cv_sizechange=unknown
16612     cf_save_CPPFLAGS="$CPPFLAGS"
16613
16614 for cf_opts in "" "NEED_PTEM_H"
16615 do
16616
16617     CPPFLAGS="$cf_save_CPPFLAGS"
16618     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16619     cat >conftest.$ac_ext <<_ACEOF
16620 #line 16620 "configure"
16621 #include "confdefs.h"
16622 #include <sys/types.h>
16623 #ifdef HAVE_TERMIOS_H
16624 #include <termios.h>
16625 #else
16626 #ifdef HAVE_TERMIO_H
16627 #include <termio.h>
16628 #endif
16629 #endif
16630 #ifdef NEED_PTEM_H
16631 /* This is a workaround for SCO:  they neglected to define struct winsize in
16632  * termios.h -- it's only in termio.h and ptem.h
16633  */
16634 #include        <sys/stream.h>
16635 #include        <sys/ptem.h>
16636 #endif
16637 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16638 #include <sys/ioctl.h>
16639 #endif
16640
16641 int
16642 main ()
16643 {
16644
16645 #ifdef TIOCGSIZE
16646         struct ttysize win;     /* FIXME: what system is this? */
16647         int y = win.ts_lines;
16648         int x = win.ts_cols;
16649 #else
16650 #ifdef TIOCGWINSZ
16651         struct winsize win;
16652         int y = win.ws_row;
16653         int x = win.ws_col;
16654 #else
16655         no TIOCGSIZE or TIOCGWINSZ
16656 #endif /* TIOCGWINSZ */
16657 #endif /* TIOCGSIZE */
16658
16659   ;
16660   return 0;
16661 }
16662 _ACEOF
16663 rm -f conftest.$ac_objext
16664 if { (eval echo "$as_me:16664: \"$ac_compile\"") >&5
16665   (eval $ac_compile) 2>&5
16666   ac_status=$?
16667   echo "$as_me:16667: \$? = $ac_status" >&5
16668   (exit $ac_status); } &&
16669          { ac_try='test -s conftest.$ac_objext'
16670   { (eval echo "$as_me:16670: \"$ac_try\"") >&5
16671   (eval $ac_try) 2>&5
16672   ac_status=$?
16673   echo "$as_me:16673: \$? = $ac_status" >&5
16674   (exit $ac_status); }; }; then
16675   cf_cv_sizechange=yes
16676 else
16677   echo "$as_me: failed program was:" >&5
16678 cat conftest.$ac_ext >&5
16679 cf_cv_sizechange=no
16680 fi
16681 rm -f conftest.$ac_objext conftest.$ac_ext
16682
16683         CPPFLAGS="$cf_save_CPPFLAGS"
16684         if test "$cf_cv_sizechange" = yes ; then
16685                 echo "size-change succeeded ($cf_opts)" >&5
16686                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16687                 break
16688         fi
16689 done
16690
16691 fi
16692 echo "$as_me:16692: result: $cf_cv_sizechange" >&5
16693 echo "${ECHO_T}$cf_cv_sizechange" >&6
16694 if test "$cf_cv_sizechange" != no ; then
16695         cat >>confdefs.h <<\EOF
16696 #define HAVE_SIZECHANGE 1
16697 EOF
16698
16699         case $cf_cv_sizechange in #(vi
16700         NEED*)
16701                 cat >>confdefs.h <<EOF
16702 #define $cf_cv_sizechange  1
16703 EOF
16704
16705                 ;;
16706         esac
16707 fi
16708
16709 echo "$as_me:16709: checking for memmove" >&5
16710 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16711 if test "${ac_cv_func_memmove+set}" = set; then
16712   echo $ECHO_N "(cached) $ECHO_C" >&6
16713 else
16714   cat >conftest.$ac_ext <<_ACEOF
16715 #line 16715 "configure"
16716 #include "confdefs.h"
16717 /* System header to define __stub macros and hopefully few prototypes,
16718     which can conflict with char memmove (); below.  */
16719 #include <assert.h>
16720 /* Override any gcc2 internal prototype to avoid an error.  */
16721 #ifdef __cplusplus
16722 extern "C"
16723 #endif
16724 /* We use char because int might match the return type of a gcc2
16725    builtin and then its argument prototype would still apply.  */
16726 char memmove ();
16727 char (*f) ();
16728
16729 int
16730 main ()
16731 {
16732 /* The GNU C library defines this for functions which it implements
16733     to always fail with ENOSYS.  Some functions are actually named
16734     something starting with __ and the normal name is an alias.  */
16735 #if defined (__stub_memmove) || defined (__stub___memmove)
16736 choke me
16737 #else
16738 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16739 #endif
16740
16741   ;
16742   return 0;
16743 }
16744 _ACEOF
16745 rm -f conftest.$ac_objext conftest$ac_exeext
16746 if { (eval echo "$as_me:16746: \"$ac_link\"") >&5
16747   (eval $ac_link) 2>&5
16748   ac_status=$?
16749   echo "$as_me:16749: \$? = $ac_status" >&5
16750   (exit $ac_status); } &&
16751          { ac_try='test -s conftest$ac_exeext'
16752   { (eval echo "$as_me:16752: \"$ac_try\"") >&5
16753   (eval $ac_try) 2>&5
16754   ac_status=$?
16755   echo "$as_me:16755: \$? = $ac_status" >&5
16756   (exit $ac_status); }; }; then
16757   ac_cv_func_memmove=yes
16758 else
16759   echo "$as_me: failed program was:" >&5
16760 cat conftest.$ac_ext >&5
16761 ac_cv_func_memmove=no
16762 fi
16763 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16764 fi
16765 echo "$as_me:16765: result: $ac_cv_func_memmove" >&5
16766 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16767 if test $ac_cv_func_memmove = yes; then
16768   :
16769 else
16770
16771 echo "$as_me:16771: checking for bcopy" >&5
16772 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16773 if test "${ac_cv_func_bcopy+set}" = set; then
16774   echo $ECHO_N "(cached) $ECHO_C" >&6
16775 else
16776   cat >conftest.$ac_ext <<_ACEOF
16777 #line 16777 "configure"
16778 #include "confdefs.h"
16779 /* System header to define __stub macros and hopefully few prototypes,
16780     which can conflict with char bcopy (); below.  */
16781 #include <assert.h>
16782 /* Override any gcc2 internal prototype to avoid an error.  */
16783 #ifdef __cplusplus
16784 extern "C"
16785 #endif
16786 /* We use char because int might match the return type of a gcc2
16787    builtin and then its argument prototype would still apply.  */
16788 char bcopy ();
16789 char (*f) ();
16790
16791 int
16792 main ()
16793 {
16794 /* The GNU C library defines this for functions which it implements
16795     to always fail with ENOSYS.  Some functions are actually named
16796     something starting with __ and the normal name is an alias.  */
16797 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16798 choke me
16799 #else
16800 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16801 #endif
16802
16803   ;
16804   return 0;
16805 }
16806 _ACEOF
16807 rm -f conftest.$ac_objext conftest$ac_exeext
16808 if { (eval echo "$as_me:16808: \"$ac_link\"") >&5
16809   (eval $ac_link) 2>&5
16810   ac_status=$?
16811   echo "$as_me:16811: \$? = $ac_status" >&5
16812   (exit $ac_status); } &&
16813          { ac_try='test -s conftest$ac_exeext'
16814   { (eval echo "$as_me:16814: \"$ac_try\"") >&5
16815   (eval $ac_try) 2>&5
16816   ac_status=$?
16817   echo "$as_me:16817: \$? = $ac_status" >&5
16818   (exit $ac_status); }; }; then
16819   ac_cv_func_bcopy=yes
16820 else
16821   echo "$as_me: failed program was:" >&5
16822 cat conftest.$ac_ext >&5
16823 ac_cv_func_bcopy=no
16824 fi
16825 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16826 fi
16827 echo "$as_me:16827: result: $ac_cv_func_bcopy" >&5
16828 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16829 if test $ac_cv_func_bcopy = yes; then
16830
16831         echo "$as_me:16831: checking if bcopy does overlapping moves" >&5
16832 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16833 if test "${cf_cv_good_bcopy+set}" = set; then
16834   echo $ECHO_N "(cached) $ECHO_C" >&6
16835 else
16836
16837                 if test "$cross_compiling" = yes; then
16838   cf_cv_good_bcopy=unknown
16839 else
16840   cat >conftest.$ac_ext <<_ACEOF
16841 #line 16841 "configure"
16842 #include "confdefs.h"
16843
16844 int main() {
16845         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16846         char temp[40];
16847         bcopy(data, temp, sizeof(data));
16848         bcopy(temp+10, temp, 15);
16849         bcopy(temp+5, temp+15, 10);
16850         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16851 }
16852
16853 _ACEOF
16854 rm -f conftest$ac_exeext
16855 if { (eval echo "$as_me:16855: \"$ac_link\"") >&5
16856   (eval $ac_link) 2>&5
16857   ac_status=$?
16858   echo "$as_me:16858: \$? = $ac_status" >&5
16859   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16860   { (eval echo "$as_me:16860: \"$ac_try\"") >&5
16861   (eval $ac_try) 2>&5
16862   ac_status=$?
16863   echo "$as_me:16863: \$? = $ac_status" >&5
16864   (exit $ac_status); }; }; then
16865   cf_cv_good_bcopy=yes
16866 else
16867   echo "$as_me: program exited with status $ac_status" >&5
16868 echo "$as_me: failed program was:" >&5
16869 cat conftest.$ac_ext >&5
16870 cf_cv_good_bcopy=no
16871 fi
16872 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16873 fi
16874
16875 fi
16876 echo "$as_me:16876: result: $cf_cv_good_bcopy" >&5
16877 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16878
16879 else
16880   cf_cv_good_bcopy=no
16881 fi
16882
16883         if test "$cf_cv_good_bcopy" = yes ; then
16884                 cat >>confdefs.h <<\EOF
16885 #define USE_OK_BCOPY 1
16886 EOF
16887
16888         else
16889                 cat >>confdefs.h <<\EOF
16890 #define USE_MY_MEMMOVE 1
16891 EOF
16892
16893         fi
16894
16895 fi
16896
16897 echo "$as_me:16897: checking if poll really works" >&5
16898 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16899 if test "${cf_cv_working_poll+set}" = set; then
16900   echo $ECHO_N "(cached) $ECHO_C" >&6
16901 else
16902
16903 if test "$cross_compiling" = yes; then
16904   cf_cv_working_poll=unknown
16905 else
16906   cat >conftest.$ac_ext <<_ACEOF
16907 #line 16907 "configure"
16908 #include "confdefs.h"
16909
16910 #include <stdio.h>
16911 #ifdef HAVE_POLL_H
16912 #include <poll.h>
16913 #else
16914 #include <sys/poll.h>
16915 #endif
16916 int main() {
16917         struct pollfd myfds;
16918         int ret;
16919
16920         /* check for Darwin bug with respect to "devices" */
16921         myfds.fd = open("/dev/null", 1);
16922         if (myfds.fd < 0)
16923                 myfds.fd = 0;
16924         myfds.events = POLLIN;
16925         myfds.revents = 0;
16926
16927         ret = poll(&myfds, 1, 100);
16928
16929         if (ret < 0 || (myfds.revents & POLLNVAL)) {
16930                 ret = -1;
16931         } else {
16932
16933                 /* also check with standard input */
16934                 myfds.fd = 0;
16935                 myfds.events = POLLIN;
16936                 myfds.revents = 0;
16937
16938                 ret = poll(&myfds, 1, 100);
16939                 if (ret < 0) {
16940                         ret = 0;
16941                 }
16942         }
16943         ${cf_cv_main_return:-return}(ret != 0);
16944 }
16945 _ACEOF
16946 rm -f conftest$ac_exeext
16947 if { (eval echo "$as_me:16947: \"$ac_link\"") >&5
16948   (eval $ac_link) 2>&5
16949   ac_status=$?
16950   echo "$as_me:16950: \$? = $ac_status" >&5
16951   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16952   { (eval echo "$as_me:16952: \"$ac_try\"") >&5
16953   (eval $ac_try) 2>&5
16954   ac_status=$?
16955   echo "$as_me:16955: \$? = $ac_status" >&5
16956   (exit $ac_status); }; }; then
16957   cf_cv_working_poll=yes
16958 else
16959   echo "$as_me: program exited with status $ac_status" >&5
16960 echo "$as_me: failed program was:" >&5
16961 cat conftest.$ac_ext >&5
16962 cf_cv_working_poll=no
16963 fi
16964 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16965 fi
16966 fi
16967 echo "$as_me:16967: result: $cf_cv_working_poll" >&5
16968 echo "${ECHO_T}$cf_cv_working_poll" >&6
16969 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
16970 #define HAVE_WORKING_POLL 1
16971 EOF
16972
16973 echo "$as_me:16973: checking for va_copy" >&5
16974 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16975 if test "${cf_cv_have_va_copy+set}" = set; then
16976   echo $ECHO_N "(cached) $ECHO_C" >&6
16977 else
16978
16979 cat >conftest.$ac_ext <<_ACEOF
16980 #line 16980 "configure"
16981 #include "confdefs.h"
16982
16983 #include <stdarg.h>
16984
16985 int
16986 main ()
16987 {
16988
16989         static va_list dst;
16990         static va_list src;
16991         va_copy(dst, src)
16992   ;
16993   return 0;
16994 }
16995 _ACEOF
16996 rm -f conftest.$ac_objext conftest$ac_exeext
16997 if { (eval echo "$as_me:16997: \"$ac_link\"") >&5
16998   (eval $ac_link) 2>&5
16999   ac_status=$?
17000   echo "$as_me:17000: \$? = $ac_status" >&5
17001   (exit $ac_status); } &&
17002          { ac_try='test -s conftest$ac_exeext'
17003   { (eval echo "$as_me:17003: \"$ac_try\"") >&5
17004   (eval $ac_try) 2>&5
17005   ac_status=$?
17006   echo "$as_me:17006: \$? = $ac_status" >&5
17007   (exit $ac_status); }; }; then
17008   cf_cv_have_va_copy=yes
17009 else
17010   echo "$as_me: failed program was:" >&5
17011 cat conftest.$ac_ext >&5
17012 cf_cv_have_va_copy=no
17013 fi
17014 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17015 fi
17016 echo "$as_me:17016: result: $cf_cv_have_va_copy" >&5
17017 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17018
17019 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
17020 #define HAVE_VA_COPY 1
17021 EOF
17022
17023 echo "$as_me:17023: checking for __va_copy" >&5
17024 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17025 if test "${cf_cv_have___va_copy+set}" = set; then
17026   echo $ECHO_N "(cached) $ECHO_C" >&6
17027 else
17028
17029 cat >conftest.$ac_ext <<_ACEOF
17030 #line 17030 "configure"
17031 #include "confdefs.h"
17032
17033 #include <stdarg.h>
17034
17035 int
17036 main ()
17037 {
17038
17039         static va_list dst;
17040         static va_list src;
17041         __va_copy(dst, src)
17042   ;
17043   return 0;
17044 }
17045 _ACEOF
17046 rm -f conftest.$ac_objext conftest$ac_exeext
17047 if { (eval echo "$as_me:17047: \"$ac_link\"") >&5
17048   (eval $ac_link) 2>&5
17049   ac_status=$?
17050   echo "$as_me:17050: \$? = $ac_status" >&5
17051   (exit $ac_status); } &&
17052          { ac_try='test -s conftest$ac_exeext'
17053   { (eval echo "$as_me:17053: \"$ac_try\"") >&5
17054   (eval $ac_try) 2>&5
17055   ac_status=$?
17056   echo "$as_me:17056: \$? = $ac_status" >&5
17057   (exit $ac_status); }; }; then
17058   cf_cv_have___va_copy=yes
17059 else
17060   echo "$as_me: failed program was:" >&5
17061 cat conftest.$ac_ext >&5
17062 cf_cv_have___va_copy=no
17063 fi
17064 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17065 fi
17066 echo "$as_me:17066: result: $cf_cv_have___va_copy" >&5
17067 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17068
17069 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
17070 #define HAVE___VA_COPY 1
17071 EOF
17072
17073 echo "$as_me:17073: checking for pid_t" >&5
17074 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17075 if test "${ac_cv_type_pid_t+set}" = set; then
17076   echo $ECHO_N "(cached) $ECHO_C" >&6
17077 else
17078   cat >conftest.$ac_ext <<_ACEOF
17079 #line 17079 "configure"
17080 #include "confdefs.h"
17081 $ac_includes_default
17082 int
17083 main ()
17084 {
17085 if ((pid_t *) 0)
17086   return 0;
17087 if (sizeof (pid_t))
17088   return 0;
17089   ;
17090   return 0;
17091 }
17092 _ACEOF
17093 rm -f conftest.$ac_objext
17094 if { (eval echo "$as_me:17094: \"$ac_compile\"") >&5
17095   (eval $ac_compile) 2>&5
17096   ac_status=$?
17097   echo "$as_me:17097: \$? = $ac_status" >&5
17098   (exit $ac_status); } &&
17099          { ac_try='test -s conftest.$ac_objext'
17100   { (eval echo "$as_me:17100: \"$ac_try\"") >&5
17101   (eval $ac_try) 2>&5
17102   ac_status=$?
17103   echo "$as_me:17103: \$? = $ac_status" >&5
17104   (exit $ac_status); }; }; then
17105   ac_cv_type_pid_t=yes
17106 else
17107   echo "$as_me: failed program was:" >&5
17108 cat conftest.$ac_ext >&5
17109 ac_cv_type_pid_t=no
17110 fi
17111 rm -f conftest.$ac_objext conftest.$ac_ext
17112 fi
17113 echo "$as_me:17113: result: $ac_cv_type_pid_t" >&5
17114 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17115 if test $ac_cv_type_pid_t = yes; then
17116   :
17117 else
17118
17119 cat >>confdefs.h <<EOF
17120 #define pid_t int
17121 EOF
17122
17123 fi
17124
17125 for ac_header in unistd.h vfork.h
17126 do
17127 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17128 echo "$as_me:17128: checking for $ac_header" >&5
17129 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17130 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17131   echo $ECHO_N "(cached) $ECHO_C" >&6
17132 else
17133   cat >conftest.$ac_ext <<_ACEOF
17134 #line 17134 "configure"
17135 #include "confdefs.h"
17136 #include <$ac_header>
17137 _ACEOF
17138 if { (eval echo "$as_me:17138: \"$ac_cpp conftest.$ac_ext\"") >&5
17139   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17140   ac_status=$?
17141   egrep -v '^ *\+' conftest.er1 >conftest.err
17142   rm -f conftest.er1
17143   cat conftest.err >&5
17144   echo "$as_me:17144: \$? = $ac_status" >&5
17145   (exit $ac_status); } >/dev/null; then
17146   if test -s conftest.err; then
17147     ac_cpp_err=$ac_c_preproc_warn_flag
17148   else
17149     ac_cpp_err=
17150   fi
17151 else
17152   ac_cpp_err=yes
17153 fi
17154 if test -z "$ac_cpp_err"; then
17155   eval "$as_ac_Header=yes"
17156 else
17157   echo "$as_me: failed program was:" >&5
17158   cat conftest.$ac_ext >&5
17159   eval "$as_ac_Header=no"
17160 fi
17161 rm -f conftest.err conftest.$ac_ext
17162 fi
17163 echo "$as_me:17163: result: `eval echo '${'$as_ac_Header'}'`" >&5
17164 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17165 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17166   cat >>confdefs.h <<EOF
17167 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17168 EOF
17169
17170 fi
17171 done
17172
17173 for ac_func in fork vfork
17174 do
17175 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17176 echo "$as_me:17176: checking for $ac_func" >&5
17177 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17178 if eval "test \"\${$as_ac_var+set}\" = set"; then
17179   echo $ECHO_N "(cached) $ECHO_C" >&6
17180 else
17181   cat >conftest.$ac_ext <<_ACEOF
17182 #line 17182 "configure"
17183 #include "confdefs.h"
17184 /* System header to define __stub macros and hopefully few prototypes,
17185     which can conflict with char $ac_func (); below.  */
17186 #include <assert.h>
17187 /* Override any gcc2 internal prototype to avoid an error.  */
17188 #ifdef __cplusplus
17189 extern "C"
17190 #endif
17191 /* We use char because int might match the return type of a gcc2
17192    builtin and then its argument prototype would still apply.  */
17193 char $ac_func ();
17194 char (*f) ();
17195
17196 int
17197 main ()
17198 {
17199 /* The GNU C library defines this for functions which it implements
17200     to always fail with ENOSYS.  Some functions are actually named
17201     something starting with __ and the normal name is an alias.  */
17202 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17203 choke me
17204 #else
17205 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17206 #endif
17207
17208   ;
17209   return 0;
17210 }
17211 _ACEOF
17212 rm -f conftest.$ac_objext conftest$ac_exeext
17213 if { (eval echo "$as_me:17213: \"$ac_link\"") >&5
17214   (eval $ac_link) 2>&5
17215   ac_status=$?
17216   echo "$as_me:17216: \$? = $ac_status" >&5
17217   (exit $ac_status); } &&
17218          { ac_try='test -s conftest$ac_exeext'
17219   { (eval echo "$as_me:17219: \"$ac_try\"") >&5
17220   (eval $ac_try) 2>&5
17221   ac_status=$?
17222   echo "$as_me:17222: \$? = $ac_status" >&5
17223   (exit $ac_status); }; }; then
17224   eval "$as_ac_var=yes"
17225 else
17226   echo "$as_me: failed program was:" >&5
17227 cat conftest.$ac_ext >&5
17228 eval "$as_ac_var=no"
17229 fi
17230 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17231 fi
17232 echo "$as_me:17232: result: `eval echo '${'$as_ac_var'}'`" >&5
17233 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17234 if test `eval echo '${'$as_ac_var'}'` = yes; then
17235   cat >>confdefs.h <<EOF
17236 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17237 EOF
17238
17239 fi
17240 done
17241
17242 ac_cv_func_fork_works=$ac_cv_func_fork
17243 if test "x$ac_cv_func_fork" = xyes; then
17244   echo "$as_me:17244: checking for working fork" >&5
17245 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17246 if test "${ac_cv_func_fork_works+set}" = set; then
17247   echo $ECHO_N "(cached) $ECHO_C" >&6
17248 else
17249   if test "$cross_compiling" = yes; then
17250   ac_cv_func_fork_works=cross
17251 else
17252   cat >conftest.$ac_ext <<_ACEOF
17253 /* By Rüdiger Kuhlmann. */
17254       #include <sys/types.h>
17255       #if HAVE_UNISTD_H
17256       # include <unistd.h>
17257       #endif
17258       /* Some systems only have a dummy stub for fork() */
17259       int main ()
17260       {
17261         if (fork() < 0)
17262           $ac_main_return (1);
17263         $ac_main_return (0);
17264       }
17265 _ACEOF
17266 rm -f conftest$ac_exeext
17267 if { (eval echo "$as_me:17267: \"$ac_link\"") >&5
17268   (eval $ac_link) 2>&5
17269   ac_status=$?
17270   echo "$as_me:17270: \$? = $ac_status" >&5
17271   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17272   { (eval echo "$as_me:17272: \"$ac_try\"") >&5
17273   (eval $ac_try) 2>&5
17274   ac_status=$?
17275   echo "$as_me:17275: \$? = $ac_status" >&5
17276   (exit $ac_status); }; }; then
17277   ac_cv_func_fork_works=yes
17278 else
17279   echo "$as_me: program exited with status $ac_status" >&5
17280 echo "$as_me: failed program was:" >&5
17281 cat conftest.$ac_ext >&5
17282 ac_cv_func_fork_works=no
17283 fi
17284 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17285 fi
17286 fi
17287 echo "$as_me:17287: result: $ac_cv_func_fork_works" >&5
17288 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17289
17290 fi
17291 if test "x$ac_cv_func_fork_works" = xcross; then
17292   case $host in
17293     *-*-amigaos* | *-*-msdosdjgpp*)
17294       # Override, as these systems have only a dummy fork() stub
17295       ac_cv_func_fork_works=no
17296       ;;
17297     *)
17298       ac_cv_func_fork_works=yes
17299       ;;
17300   esac
17301   { echo "$as_me:17301: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17302 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17303 fi
17304 ac_cv_func_vfork_works=$ac_cv_func_vfork
17305 if test "x$ac_cv_func_vfork" = xyes; then
17306   echo "$as_me:17306: checking for working vfork" >&5
17307 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17308 if test "${ac_cv_func_vfork_works+set}" = set; then
17309   echo $ECHO_N "(cached) $ECHO_C" >&6
17310 else
17311   if test "$cross_compiling" = yes; then
17312   ac_cv_func_vfork_works=cross
17313 else
17314   cat >conftest.$ac_ext <<_ACEOF
17315 #line 17315 "configure"
17316 #include "confdefs.h"
17317 /* Thanks to Paul Eggert for this test.  */
17318 #include <stdio.h>
17319 #include <sys/types.h>
17320 #include <sys/stat.h>
17321 #if HAVE_UNISTD_H
17322 # include <unistd.h>
17323 #endif
17324 #if HAVE_VFORK_H
17325 # include <vfork.h>
17326 #endif
17327 /* On some sparc systems, changes by the child to local and incoming
17328    argument registers are propagated back to the parent.  The compiler
17329    is told about this with #include <vfork.h>, but some compilers
17330    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17331    static variable whose address is put into a register that is
17332    clobbered by the vfork.  */
17333 static
17334 #ifdef __cplusplus
17335 sparc_address_test (int arg)
17336 # else
17337 sparc_address_test (arg) int arg;
17338 #endif
17339 {
17340   static pid_t child;
17341   if (!child) {
17342     child = vfork ();
17343     if (child < 0) {
17344       perror ("vfork");
17345       _exit(2);
17346     }
17347     if (!child) {
17348       arg = getpid();
17349       write(-1, "", 0);
17350       _exit (arg);
17351     }
17352   }
17353 }
17354
17355 int
17356 main ()
17357 {
17358   pid_t parent = getpid ();
17359   pid_t child;
17360
17361   sparc_address_test ();
17362
17363   child = vfork ();
17364
17365   if (child == 0) {
17366     /* Here is another test for sparc vfork register problems.  This
17367        test uses lots of local variables, at least as many local
17368        variables as main has allocated so far including compiler
17369        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17370        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17371        reuse the register of parent for one of the local variables,
17372        since it will think that parent can't possibly be used any more
17373        in this routine.  Assigning to the local variable will thus
17374        munge parent in the parent process.  */
17375     pid_t
17376       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17377       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17378     /* Convince the compiler that p..p7 are live; otherwise, it might
17379        use the same hardware register for all 8 local variables.  */
17380     if (p != p1 || p != p2 || p != p3 || p != p4
17381         || p != p5 || p != p6 || p != p7)
17382       _exit(1);
17383
17384     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17385        from child file descriptors.  If the child closes a descriptor
17386        before it execs or exits, this munges the parent's descriptor
17387        as well.  Test for this by closing stdout in the child.  */
17388     _exit(close(fileno(stdout)) != 0);
17389   } else {
17390     int status;
17391     struct stat st;
17392
17393     while (wait(&status) != child)
17394       ;
17395     $ac_main_return(
17396          /* Was there some problem with vforking?  */
17397          child < 0
17398
17399          /* Did the child fail?  (This shouldn't happen.)  */
17400          || status
17401
17402          /* Did the vfork/compiler bug occur?  */
17403          || parent != getpid()
17404
17405          /* Did the file descriptor bug occur?  */
17406          || fstat(fileno(stdout), &st) != 0
17407          );
17408   }
17409 }
17410 _ACEOF
17411 rm -f conftest$ac_exeext
17412 if { (eval echo "$as_me:17412: \"$ac_link\"") >&5
17413   (eval $ac_link) 2>&5
17414   ac_status=$?
17415   echo "$as_me:17415: \$? = $ac_status" >&5
17416   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17417   { (eval echo "$as_me:17417: \"$ac_try\"") >&5
17418   (eval $ac_try) 2>&5
17419   ac_status=$?
17420   echo "$as_me:17420: \$? = $ac_status" >&5
17421   (exit $ac_status); }; }; then
17422   ac_cv_func_vfork_works=yes
17423 else
17424   echo "$as_me: program exited with status $ac_status" >&5
17425 echo "$as_me: failed program was:" >&5
17426 cat conftest.$ac_ext >&5
17427 ac_cv_func_vfork_works=no
17428 fi
17429 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17430 fi
17431 fi
17432 echo "$as_me:17432: result: $ac_cv_func_vfork_works" >&5
17433 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17434
17435 fi;
17436 if test "x$ac_cv_func_fork_works" = xcross; then
17437   ac_cv_func_vfork_works=ac_cv_func_vfork
17438   { echo "$as_me:17438: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17439 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17440 fi
17441
17442 if test "x$ac_cv_func_vfork_works" = xyes; then
17443
17444 cat >>confdefs.h <<\EOF
17445 #define HAVE_WORKING_VFORK 1
17446 EOF
17447
17448 else
17449
17450 cat >>confdefs.h <<\EOF
17451 #define vfork fork
17452 EOF
17453
17454 fi
17455 if test "x$ac_cv_func_fork_works" = xyes; then
17456
17457 cat >>confdefs.h <<\EOF
17458 #define HAVE_WORKING_FORK 1
17459 EOF
17460
17461 fi
17462
17463 # special check for test/ditto.c
17464
17465 echo "$as_me:17465: checking for openpty in -lutil" >&5
17466 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17467 if test "${ac_cv_lib_util_openpty+set}" = set; then
17468   echo $ECHO_N "(cached) $ECHO_C" >&6
17469 else
17470   ac_check_lib_save_LIBS=$LIBS
17471 LIBS="-lutil  $LIBS"
17472 cat >conftest.$ac_ext <<_ACEOF
17473 #line 17473 "configure"
17474 #include "confdefs.h"
17475
17476 /* Override any gcc2 internal prototype to avoid an error.  */
17477 #ifdef __cplusplus
17478 extern "C"
17479 #endif
17480 /* We use char because int might match the return type of a gcc2
17481    builtin and then its argument prototype would still apply.  */
17482 char openpty ();
17483 int
17484 main ()
17485 {
17486 openpty ();
17487   ;
17488   return 0;
17489 }
17490 _ACEOF
17491 rm -f conftest.$ac_objext conftest$ac_exeext
17492 if { (eval echo "$as_me:17492: \"$ac_link\"") >&5
17493   (eval $ac_link) 2>&5
17494   ac_status=$?
17495   echo "$as_me:17495: \$? = $ac_status" >&5
17496   (exit $ac_status); } &&
17497          { ac_try='test -s conftest$ac_exeext'
17498   { (eval echo "$as_me:17498: \"$ac_try\"") >&5
17499   (eval $ac_try) 2>&5
17500   ac_status=$?
17501   echo "$as_me:17501: \$? = $ac_status" >&5
17502   (exit $ac_status); }; }; then
17503   ac_cv_lib_util_openpty=yes
17504 else
17505   echo "$as_me: failed program was:" >&5
17506 cat conftest.$ac_ext >&5
17507 ac_cv_lib_util_openpty=no
17508 fi
17509 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17510 LIBS=$ac_check_lib_save_LIBS
17511 fi
17512 echo "$as_me:17512: result: $ac_cv_lib_util_openpty" >&5
17513 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17514 if test $ac_cv_lib_util_openpty = yes; then
17515   cf_cv_lib_util=yes
17516 else
17517   cf_cv_lib_util=no
17518 fi
17519
17520 echo "$as_me:17520: checking for openpty header" >&5
17521 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17522 if test "${cf_cv_func_openpty+set}" = set; then
17523   echo $ECHO_N "(cached) $ECHO_C" >&6
17524 else
17525
17526     cf_save_LIBS="$LIBS"
17527     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17528     for cf_header in pty.h libutil.h util.h
17529     do
17530     cat >conftest.$ac_ext <<_ACEOF
17531 #line 17531 "configure"
17532 #include "confdefs.h"
17533
17534 #include <$cf_header>
17535
17536 int
17537 main ()
17538 {
17539
17540     int x = openpty((int *)0, (int *)0, (char *)0,
17541                    (struct termios *)0, (struct winsize *)0);
17542
17543   ;
17544   return 0;
17545 }
17546 _ACEOF
17547 rm -f conftest.$ac_objext conftest$ac_exeext
17548 if { (eval echo "$as_me:17548: \"$ac_link\"") >&5
17549   (eval $ac_link) 2>&5
17550   ac_status=$?
17551   echo "$as_me:17551: \$? = $ac_status" >&5
17552   (exit $ac_status); } &&
17553          { ac_try='test -s conftest$ac_exeext'
17554   { (eval echo "$as_me:17554: \"$ac_try\"") >&5
17555   (eval $ac_try) 2>&5
17556   ac_status=$?
17557   echo "$as_me:17557: \$? = $ac_status" >&5
17558   (exit $ac_status); }; }; then
17559
17560         cf_cv_func_openpty=$cf_header
17561         break
17562
17563 else
17564   echo "$as_me: failed program was:" >&5
17565 cat conftest.$ac_ext >&5
17566
17567         cf_cv_func_openpty=no
17568
17569 fi
17570 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17571     done
17572     LIBS="$cf_save_LIBS"
17573
17574 fi
17575 echo "$as_me:17575: result: $cf_cv_func_openpty" >&5
17576 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17577
17578 if test "$cf_cv_func_openpty" != no ; then
17579     cat >>confdefs.h <<EOF
17580 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17581 EOF
17582
17583     cat >>confdefs.h <<\EOF
17584 #define USE_XTERM_PTY 1
17585 EOF
17586
17587     if test "$cf_cv_lib_util" = yes ; then
17588         TEST_LIBS="-lutil $TEST_LIBS"
17589     fi
17590 fi
17591
17592 if test "$with_hashed_db" != no ; then
17593         cat >>confdefs.h <<\EOF
17594 #define USE_HASHED_DB 1
17595 EOF
17596
17597 case $with_hashed_db in #(vi
17598 yes|*able*) #(vi
17599     ;;
17600 *)
17601     if test -d "$with_hashed_db" ; then
17602
17603 if test -n "$with_hashed_db/include" ; then
17604   for cf_add_incdir in $with_hashed_db/include
17605   do
17606         while test $cf_add_incdir != /usr/include
17607         do
17608           if test -d $cf_add_incdir
17609           then
17610                 cf_have_incdir=no
17611                 if test -n "$CFLAGS$CPPFLAGS" ; then
17612                   # a loop is needed to ensure we can add subdirs of existing dirs
17613                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17614                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17615                           cf_have_incdir=yes; break
17616                         fi
17617                   done
17618                 fi
17619
17620                 if test "$cf_have_incdir" = no ; then
17621                   if test "$cf_add_incdir" = /usr/local/include ; then
17622                         if test "$GCC" = yes
17623                         then
17624                           cf_save_CPPFLAGS=$CPPFLAGS
17625                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17626                           cat >conftest.$ac_ext <<_ACEOF
17627 #line 17627 "configure"
17628 #include "confdefs.h"
17629 #include <stdio.h>
17630 int
17631 main ()
17632 {
17633 printf("Hello")
17634   ;
17635   return 0;
17636 }
17637 _ACEOF
17638 rm -f conftest.$ac_objext
17639 if { (eval echo "$as_me:17639: \"$ac_compile\"") >&5
17640   (eval $ac_compile) 2>&5
17641   ac_status=$?
17642   echo "$as_me:17642: \$? = $ac_status" >&5
17643   (exit $ac_status); } &&
17644          { ac_try='test -s conftest.$ac_objext'
17645   { (eval echo "$as_me:17645: \"$ac_try\"") >&5
17646   (eval $ac_try) 2>&5
17647   ac_status=$?
17648   echo "$as_me:17648: \$? = $ac_status" >&5
17649   (exit $ac_status); }; }; then
17650   :
17651 else
17652   echo "$as_me: failed program was:" >&5
17653 cat conftest.$ac_ext >&5
17654 cf_have_incdir=yes
17655 fi
17656 rm -f conftest.$ac_objext conftest.$ac_ext
17657                           CPPFLAGS=$cf_save_CPPFLAGS
17658                         fi
17659                   fi
17660                 fi
17661
17662                 if test "$cf_have_incdir" = no ; then
17663                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17664
17665 echo "${as_me:-configure}:17665: testing adding $cf_add_incdir to include-path ..." 1>&5
17666
17667                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17668
17669                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17670                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17671                   cf_add_incdir="$cf_top_incdir"
17672                 else
17673                   break
17674                 fi
17675           fi
17676         done
17677   done
17678 fi
17679
17680 if test -n "$with_hashed_db/lib" ; then
17681   for cf_add_libdir in $with_hashed_db/lib
17682   do
17683     if test $cf_add_libdir = /usr/lib ; then
17684       :
17685     elif test -d $cf_add_libdir
17686     then
17687       cf_have_libdir=no
17688       if test -n "$LDFLAGS$LIBS" ; then
17689         # a loop is needed to ensure we can add subdirs of existing dirs
17690         for cf_test_libdir in $LDFLAGS $LIBS ; do
17691           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17692             cf_have_libdir=yes; break
17693           fi
17694         done
17695       fi
17696       if test "$cf_have_libdir" = no ; then
17697         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17698
17699 echo "${as_me:-configure}:17699: testing adding $cf_add_libdir to library-path ..." 1>&5
17700
17701         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17702       fi
17703     fi
17704   done
17705 fi
17706
17707     fi
17708 esac
17709
17710 echo "$as_me:17710: checking for db.h" >&5
17711 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17712 if test "${ac_cv_header_db_h+set}" = set; then
17713   echo $ECHO_N "(cached) $ECHO_C" >&6
17714 else
17715   cat >conftest.$ac_ext <<_ACEOF
17716 #line 17716 "configure"
17717 #include "confdefs.h"
17718 #include <db.h>
17719 _ACEOF
17720 if { (eval echo "$as_me:17720: \"$ac_cpp conftest.$ac_ext\"") >&5
17721   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17722   ac_status=$?
17723   egrep -v '^ *\+' conftest.er1 >conftest.err
17724   rm -f conftest.er1
17725   cat conftest.err >&5
17726   echo "$as_me:17726: \$? = $ac_status" >&5
17727   (exit $ac_status); } >/dev/null; then
17728   if test -s conftest.err; then
17729     ac_cpp_err=$ac_c_preproc_warn_flag
17730   else
17731     ac_cpp_err=
17732   fi
17733 else
17734   ac_cpp_err=yes
17735 fi
17736 if test -z "$ac_cpp_err"; then
17737   ac_cv_header_db_h=yes
17738 else
17739   echo "$as_me: failed program was:" >&5
17740   cat conftest.$ac_ext >&5
17741   ac_cv_header_db_h=no
17742 fi
17743 rm -f conftest.err conftest.$ac_ext
17744 fi
17745 echo "$as_me:17745: result: $ac_cv_header_db_h" >&5
17746 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17747 if test $ac_cv_header_db_h = yes; then
17748
17749 echo "$as_me:17749: checking for version of db" >&5
17750 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17751 if test "${cf_cv_hashed_db_version+set}" = set; then
17752   echo $ECHO_N "(cached) $ECHO_C" >&6
17753 else
17754
17755 cf_cv_hashed_db_version=unknown
17756
17757 for cf_db_version in 1 2 3 4 5
17758 do
17759
17760 echo "${as_me:-configure}:17760: testing checking for db version $cf_db_version ..." 1>&5
17761
17762         cat >conftest.$ac_ext <<_ACEOF
17763 #line 17763 "configure"
17764 #include "confdefs.h"
17765
17766 $ac_includes_default
17767 #include <db.h>
17768
17769 #ifdef DB_VERSION_MAJOR
17770         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17771 #if $cf_db_version == DB_VERSION_MAJOR
17772         /* ok */
17773 #else
17774         make an error
17775 #endif
17776 #else
17777 #if $cf_db_version == 1
17778         /* ok: assuming this is DB 1.8.5 */
17779 #else
17780         make an error
17781 #endif
17782 #endif
17783
17784 int
17785 main ()
17786 {
17787 DBT *foo = 0
17788   ;
17789   return 0;
17790 }
17791 _ACEOF
17792 rm -f conftest.$ac_objext
17793 if { (eval echo "$as_me:17793: \"$ac_compile\"") >&5
17794   (eval $ac_compile) 2>&5
17795   ac_status=$?
17796   echo "$as_me:17796: \$? = $ac_status" >&5
17797   (exit $ac_status); } &&
17798          { ac_try='test -s conftest.$ac_objext'
17799   { (eval echo "$as_me:17799: \"$ac_try\"") >&5
17800   (eval $ac_try) 2>&5
17801   ac_status=$?
17802   echo "$as_me:17802: \$? = $ac_status" >&5
17803   (exit $ac_status); }; }; then
17804
17805         cf_cv_hashed_db_version=$cf_db_version
17806         break
17807
17808 else
17809   echo "$as_me: failed program was:" >&5
17810 cat conftest.$ac_ext >&5
17811 fi
17812 rm -f conftest.$ac_objext conftest.$ac_ext
17813 done
17814
17815 fi
17816 echo "$as_me:17816: result: $cf_cv_hashed_db_version" >&5
17817 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17818
17819 if test "$cf_cv_hashed_db_version" = unknown ; then
17820         { { echo "$as_me:17820: error: Cannot determine version of db" >&5
17821 echo "$as_me: error: Cannot determine version of db" >&2;}
17822    { (exit 1); exit 1; }; }
17823 else
17824
17825 echo "$as_me:17825: checking for db libraries" >&5
17826 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17827 if test "${cf_cv_hashed_db_libs+set}" = set; then
17828   echo $ECHO_N "(cached) $ECHO_C" >&6
17829 else
17830
17831 cf_cv_hashed_db_libs=unknown
17832 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17833 do
17834         cf_save_libs="$LIBS"
17835         if test -n "$cf_db_libs"; then
17836                 LIBS="-l$cf_db_libs $LIBS"
17837         fi
17838
17839 echo "${as_me:-configure}:17839: testing checking for library "$cf_db_libs" ..." 1>&5
17840
17841         cat >conftest.$ac_ext <<_ACEOF
17842 #line 17842 "configure"
17843 #include "confdefs.h"
17844
17845 $ac_includes_default
17846 #include <db.h>
17847
17848 int
17849 main ()
17850 {
17851
17852         char *path = "/tmp/foo";
17853 #ifdef DB_VERSION_MAJOR
17854 #if DB_VERSION_MAJOR >= 4
17855         DB *result = 0;
17856         db_create(&result, NULL, 0);
17857         result->open(result,
17858                 NULL,
17859                 path,
17860                 path,
17861                 DB_HASH,
17862                 DB_CREATE,
17863                 0644);
17864 #elif DB_VERSION_MAJOR >= 3
17865         DB *result = 0;
17866         db_create(&result, NULL, 0);
17867         result->open(result,
17868                 path,
17869                 path,
17870                 DB_HASH,
17871                 DB_CREATE,
17872                 0644);
17873 #elif DB_VERSION_MAJOR >= 2
17874         DB *result = 0;
17875         db_open(path,
17876                 DB_HASH,
17877                 DB_CREATE,
17878                 0644,
17879                 (DB_ENV *) 0,
17880                 (DB_INFO *) 0,
17881                 &result);
17882 #endif /* DB_VERSION_MAJOR */
17883 #else
17884         DB *result = dbopen(path,
17885                      2,
17886                      0644,
17887                      DB_HASH,
17888                      0);
17889 #endif
17890         ${cf_cv_main_return:-return}(result != 0)
17891
17892   ;
17893   return 0;
17894 }
17895 _ACEOF
17896 rm -f conftest.$ac_objext conftest$ac_exeext
17897 if { (eval echo "$as_me:17897: \"$ac_link\"") >&5
17898   (eval $ac_link) 2>&5
17899   ac_status=$?
17900   echo "$as_me:17900: \$? = $ac_status" >&5
17901   (exit $ac_status); } &&
17902          { ac_try='test -s conftest$ac_exeext'
17903   { (eval echo "$as_me:17903: \"$ac_try\"") >&5
17904   (eval $ac_try) 2>&5
17905   ac_status=$?
17906   echo "$as_me:17906: \$? = $ac_status" >&5
17907   (exit $ac_status); }; }; then
17908
17909         if test -n "$cf_db_libs" ; then
17910                 cf_cv_hashed_db_libs=$cf_db_libs
17911         else
17912                 cf_cv_hashed_db_libs=default
17913         fi
17914         LIBS="$cf_save_libs"
17915         break
17916
17917 else
17918   echo "$as_me: failed program was:" >&5
17919 cat conftest.$ac_ext >&5
17920 fi
17921 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17922         LIBS="$cf_save_libs"
17923 done
17924
17925 fi
17926 echo "$as_me:17926: result: $cf_cv_hashed_db_libs" >&5
17927 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17928
17929         if test "$cf_cv_hashed_db_libs" = unknown ; then
17930                 { { echo "$as_me:17930: error: Cannot determine library for db" >&5
17931 echo "$as_me: error: Cannot determine library for db" >&2;}
17932    { (exit 1); exit 1; }; }
17933         elif test "$cf_cv_hashed_db_libs" != default ; then
17934                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17935         fi
17936 fi
17937
17938 else
17939
17940         { { echo "$as_me:17940: error: Cannot find db.h" >&5
17941 echo "$as_me: error: Cannot find db.h" >&2;}
17942    { (exit 1); exit 1; }; }
17943
17944 fi
17945
17946 fi
17947
17948 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17949         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17950         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17951 fi
17952
17953 # Just in case, check if the C compiler has a bool type.
17954
17955 echo "$as_me:17955: checking if we should include stdbool.h" >&5
17956 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17957
17958 if test "${cf_cv_header_stdbool_h+set}" = set; then
17959   echo $ECHO_N "(cached) $ECHO_C" >&6
17960 else
17961
17962         cat >conftest.$ac_ext <<_ACEOF
17963 #line 17963 "configure"
17964 #include "confdefs.h"
17965
17966 int
17967 main ()
17968 {
17969 bool foo = false
17970   ;
17971   return 0;
17972 }
17973 _ACEOF
17974 rm -f conftest.$ac_objext
17975 if { (eval echo "$as_me:17975: \"$ac_compile\"") >&5
17976   (eval $ac_compile) 2>&5
17977   ac_status=$?
17978   echo "$as_me:17978: \$? = $ac_status" >&5
17979   (exit $ac_status); } &&
17980          { ac_try='test -s conftest.$ac_objext'
17981   { (eval echo "$as_me:17981: \"$ac_try\"") >&5
17982   (eval $ac_try) 2>&5
17983   ac_status=$?
17984   echo "$as_me:17984: \$? = $ac_status" >&5
17985   (exit $ac_status); }; }; then
17986   cf_cv_header_stdbool_h=0
17987 else
17988   echo "$as_me: failed program was:" >&5
17989 cat conftest.$ac_ext >&5
17990 cat >conftest.$ac_ext <<_ACEOF
17991 #line 17991 "configure"
17992 #include "confdefs.h"
17993
17994 #ifndef __BEOS__
17995 #include <stdbool.h>
17996 #endif
17997
17998 int
17999 main ()
18000 {
18001 bool foo = false
18002   ;
18003   return 0;
18004 }
18005 _ACEOF
18006 rm -f conftest.$ac_objext
18007 if { (eval echo "$as_me:18007: \"$ac_compile\"") >&5
18008   (eval $ac_compile) 2>&5
18009   ac_status=$?
18010   echo "$as_me:18010: \$? = $ac_status" >&5
18011   (exit $ac_status); } &&
18012          { ac_try='test -s conftest.$ac_objext'
18013   { (eval echo "$as_me:18013: \"$ac_try\"") >&5
18014   (eval $ac_try) 2>&5
18015   ac_status=$?
18016   echo "$as_me:18016: \$? = $ac_status" >&5
18017   (exit $ac_status); }; }; then
18018   cf_cv_header_stdbool_h=1
18019 else
18020   echo "$as_me: failed program was:" >&5
18021 cat conftest.$ac_ext >&5
18022 cf_cv_header_stdbool_h=0
18023 fi
18024 rm -f conftest.$ac_objext conftest.$ac_ext
18025 fi
18026 rm -f conftest.$ac_objext conftest.$ac_ext
18027 fi
18028
18029 if test "$cf_cv_header_stdbool_h" = 1
18030 then    echo "$as_me:18030: result: yes" >&5
18031 echo "${ECHO_T}yes" >&6
18032 else    echo "$as_me:18032: result: no" >&5
18033 echo "${ECHO_T}no" >&6
18034 fi
18035
18036 echo "$as_me:18036: checking for builtin bool type" >&5
18037 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18038
18039 if test "${cf_cv_cc_bool_type+set}" = set; then
18040   echo $ECHO_N "(cached) $ECHO_C" >&6
18041 else
18042
18043         cat >conftest.$ac_ext <<_ACEOF
18044 #line 18044 "configure"
18045 #include "confdefs.h"
18046
18047 #include <stdio.h>
18048 #include <sys/types.h>
18049
18050 int
18051 main ()
18052 {
18053 bool x = false
18054   ;
18055   return 0;
18056 }
18057 _ACEOF
18058 rm -f conftest.$ac_objext
18059 if { (eval echo "$as_me:18059: \"$ac_compile\"") >&5
18060   (eval $ac_compile) 2>&5
18061   ac_status=$?
18062   echo "$as_me:18062: \$? = $ac_status" >&5
18063   (exit $ac_status); } &&
18064          { ac_try='test -s conftest.$ac_objext'
18065   { (eval echo "$as_me:18065: \"$ac_try\"") >&5
18066   (eval $ac_try) 2>&5
18067   ac_status=$?
18068   echo "$as_me:18068: \$? = $ac_status" >&5
18069   (exit $ac_status); }; }; then
18070   cf_cv_cc_bool_type=1
18071 else
18072   echo "$as_me: failed program was:" >&5
18073 cat conftest.$ac_ext >&5
18074 cf_cv_cc_bool_type=0
18075 fi
18076 rm -f conftest.$ac_objext conftest.$ac_ext
18077
18078 fi
18079
18080 if test "$cf_cv_cc_bool_type" = 1
18081 then    echo "$as_me:18081: result: yes" >&5
18082 echo "${ECHO_T}yes" >&6
18083 else    echo "$as_me:18083: result: no" >&5
18084 echo "${ECHO_T}no" >&6
18085 fi
18086
18087 # Check for C++ compiler characteristics (and ensure that it's there!)
18088 if test -n "$CXX" ; then
18089         ac_ext=cc
18090 ac_cpp='$CXXCPP $CPPFLAGS'
18091 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18092 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18093 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18094 ac_main_return=return
18095
18096 if test -n "$GXX" ; then
18097 case $cf_cv_system_name in #(vi
18098 os2*) #(vi
18099         cf_stdcpp_libname=stdcpp
18100         ;;
18101 *)
18102         cf_stdcpp_libname=stdc++
18103         ;;
18104 esac
18105 echo "$as_me:18105: checking for library $cf_stdcpp_libname" >&5
18106 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
18107 if test "${cf_cv_libstdcpp+set}" = set; then
18108   echo $ECHO_N "(cached) $ECHO_C" >&6
18109 else
18110
18111         cf_save="$LIBS"
18112         LIBS="-l$cf_stdcpp_libname $LIBS"
18113 cat >conftest.$ac_ext <<_ACEOF
18114 #line 18114 "configure"
18115 #include "confdefs.h"
18116
18117 #include <strstream.h>
18118 int
18119 main ()
18120 {
18121
18122 char buf[80];
18123 strstreambuf foo(buf, sizeof(buf))
18124
18125   ;
18126   return 0;
18127 }
18128 _ACEOF
18129 rm -f conftest.$ac_objext conftest$ac_exeext
18130 if { (eval echo "$as_me:18130: \"$ac_link\"") >&5
18131   (eval $ac_link) 2>&5
18132   ac_status=$?
18133   echo "$as_me:18133: \$? = $ac_status" >&5
18134   (exit $ac_status); } &&
18135          { ac_try='test -s conftest$ac_exeext'
18136   { (eval echo "$as_me:18136: \"$ac_try\"") >&5
18137   (eval $ac_try) 2>&5
18138   ac_status=$?
18139   echo "$as_me:18139: \$? = $ac_status" >&5
18140   (exit $ac_status); }; }; then
18141   cf_cv_libstdcpp=yes
18142 else
18143   echo "$as_me: failed program was:" >&5
18144 cat conftest.$ac_ext >&5
18145 cf_cv_libstdcpp=no
18146 fi
18147 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18148         LIBS="$cf_save"
18149
18150 fi
18151 echo "$as_me:18151: result: $cf_cv_libstdcpp" >&5
18152 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18153 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
18154 fi
18155
18156         echo "$as_me:18156: checking whether $CXX understands -c and -o together" >&5
18157 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18158 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18159   echo $ECHO_N "(cached) $ECHO_C" >&6
18160 else
18161
18162 cat > conftest.$ac_ext <<CF_EOF
18163 #include <stdio.h>
18164 int main()
18165 {
18166         ${cf_cv_main_return:-return}(0);
18167 }
18168 CF_EOF
18169 # We do the test twice because some compilers refuse to overwrite an
18170 # existing .o file with -o, though they will create one.
18171 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18172 if { (eval echo "$as_me:18172: \"$ac_try\"") >&5
18173   (eval $ac_try) 2>&5
18174   ac_status=$?
18175   echo "$as_me:18175: \$? = $ac_status" >&5
18176   (exit $ac_status); } &&
18177   test -f conftest2.$ac_objext && { (eval echo "$as_me:18177: \"$ac_try\"") >&5
18178   (eval $ac_try) 2>&5
18179   ac_status=$?
18180   echo "$as_me:18180: \$? = $ac_status" >&5
18181   (exit $ac_status); };
18182 then
18183   eval cf_cv_prog_CXX_c_o=yes
18184 else
18185   eval cf_cv_prog_CXX_c_o=no
18186 fi
18187 rm -rf conftest*
18188
18189 fi
18190 if test $cf_cv_prog_CXX_c_o = yes; then
18191   echo "$as_me:18191: result: yes" >&5
18192 echo "${ECHO_T}yes" >&6
18193 else
18194   echo "$as_me:18194: result: no" >&5
18195 echo "${ECHO_T}no" >&6
18196 fi
18197
18198         case $GXX_VERSION in
18199         1*|2.0-6*)
18200                 cf_cxx_library=yes
18201                 ;;
18202         *-2.7*|2.7*)
18203
18204 cf_cxx_library=unknown
18205 case $cf_cv_system_name in #(vi
18206 os2*) #(vi
18207         cf_gpp_libname=gpp
18208         ;;
18209 *)
18210         cf_gpp_libname=g++
18211         ;;
18212 esac
18213 if test "$GXX" = yes; then
18214         echo "$as_me:18214: checking for lib$cf_gpp_libname" >&5
18215 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18216         cf_save="$LIBS"
18217         LIBS="-l$cf_gpp_libname $LIBS"
18218         cat >conftest.$ac_ext <<_ACEOF
18219 #line 18219 "configure"
18220 #include "confdefs.h"
18221
18222 #include <$cf_gpp_libname/builtin.h>
18223
18224 int
18225 main ()
18226 {
18227 two_arg_error_handler_t foo2 = lib_error_handler
18228   ;
18229   return 0;
18230 }
18231 _ACEOF
18232 rm -f conftest.$ac_objext conftest$ac_exeext
18233 if { (eval echo "$as_me:18233: \"$ac_link\"") >&5
18234   (eval $ac_link) 2>&5
18235   ac_status=$?
18236   echo "$as_me:18236: \$? = $ac_status" >&5
18237   (exit $ac_status); } &&
18238          { ac_try='test -s conftest$ac_exeext'
18239   { (eval echo "$as_me:18239: \"$ac_try\"") >&5
18240   (eval $ac_try) 2>&5
18241   ac_status=$?
18242   echo "$as_me:18242: \$? = $ac_status" >&5
18243   (exit $ac_status); }; }; then
18244   cf_cxx_library=yes
18245          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18246          if test "$cf_gpp_libname" = cpp ; then
18247             cat >>confdefs.h <<\EOF
18248 #define HAVE_GPP_BUILTIN_H 1
18249 EOF
18250
18251          else
18252             cat >>confdefs.h <<\EOF
18253 #define HAVE_GXX_BUILTIN_H 1
18254 EOF
18255
18256          fi
18257 else
18258   echo "$as_me: failed program was:" >&5
18259 cat conftest.$ac_ext >&5
18260 cat >conftest.$ac_ext <<_ACEOF
18261 #line 18261 "configure"
18262 #include "confdefs.h"
18263
18264 #include <builtin.h>
18265
18266 int
18267 main ()
18268 {
18269 two_arg_error_handler_t foo2 = lib_error_handler
18270   ;
18271   return 0;
18272 }
18273 _ACEOF
18274 rm -f conftest.$ac_objext conftest$ac_exeext
18275 if { (eval echo "$as_me:18275: \"$ac_link\"") >&5
18276   (eval $ac_link) 2>&5
18277   ac_status=$?
18278   echo "$as_me:18278: \$? = $ac_status" >&5
18279   (exit $ac_status); } &&
18280          { ac_try='test -s conftest$ac_exeext'
18281   { (eval echo "$as_me:18281: \"$ac_try\"") >&5
18282   (eval $ac_try) 2>&5
18283   ac_status=$?
18284   echo "$as_me:18284: \$? = $ac_status" >&5
18285   (exit $ac_status); }; }; then
18286   cf_cxx_library=yes
18287          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18288          cat >>confdefs.h <<\EOF
18289 #define HAVE_BUILTIN_H 1
18290 EOF
18291
18292 else
18293   echo "$as_me: failed program was:" >&5
18294 cat conftest.$ac_ext >&5
18295 cf_cxx_library=no
18296 fi
18297 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18298 fi
18299 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18300         LIBS="$cf_save"
18301         echo "$as_me:18301: result: $cf_cxx_library" >&5
18302 echo "${ECHO_T}$cf_cxx_library" >&6
18303 fi
18304
18305                 ;;
18306         *)
18307                 cf_cxx_library=no
18308                 ;;
18309         esac
18310
18311         ac_ext=cc
18312 ac_cpp='$CXXCPP $CPPFLAGS'
18313 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18314 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18315 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18316 ac_main_return=return
18317 echo "$as_me:18317: checking how to run the C++ preprocessor" >&5
18318 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18319 if test -z "$CXXCPP"; then
18320   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18321   echo $ECHO_N "(cached) $ECHO_C" >&6
18322 else
18323       # Double quotes because CXXCPP needs to be expanded
18324     for CXXCPP in "$CXX -E" "/lib/cpp"
18325     do
18326       ac_preproc_ok=false
18327 for ac_cxx_preproc_warn_flag in '' yes
18328 do
18329   # Use a header file that comes with gcc, so configuring glibc
18330   # with a fresh cross-compiler works.
18331   # On the NeXT, cc -E runs the code through the compiler's parser,
18332   # not just through cpp. "Syntax error" is here to catch this case.
18333   cat >conftest.$ac_ext <<_ACEOF
18334 #line 18334 "configure"
18335 #include "confdefs.h"
18336 #include <assert.h>
18337                      Syntax error
18338 _ACEOF
18339 if { (eval echo "$as_me:18339: \"$ac_cpp conftest.$ac_ext\"") >&5
18340   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18341   ac_status=$?
18342   egrep -v '^ *\+' conftest.er1 >conftest.err
18343   rm -f conftest.er1
18344   cat conftest.err >&5
18345   echo "$as_me:18345: \$? = $ac_status" >&5
18346   (exit $ac_status); } >/dev/null; then
18347   if test -s conftest.err; then
18348     ac_cpp_err=$ac_cxx_preproc_warn_flag
18349   else
18350     ac_cpp_err=
18351   fi
18352 else
18353   ac_cpp_err=yes
18354 fi
18355 if test -z "$ac_cpp_err"; then
18356   :
18357 else
18358   echo "$as_me: failed program was:" >&5
18359   cat conftest.$ac_ext >&5
18360   # Broken: fails on valid input.
18361 continue
18362 fi
18363 rm -f conftest.err conftest.$ac_ext
18364
18365   # OK, works on sane cases.  Now check whether non-existent headers
18366   # can be detected and how.
18367   cat >conftest.$ac_ext <<_ACEOF
18368 #line 18368 "configure"
18369 #include "confdefs.h"
18370 #include <ac_nonexistent.h>
18371 _ACEOF
18372 if { (eval echo "$as_me:18372: \"$ac_cpp conftest.$ac_ext\"") >&5
18373   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18374   ac_status=$?
18375   egrep -v '^ *\+' conftest.er1 >conftest.err
18376   rm -f conftest.er1
18377   cat conftest.err >&5
18378   echo "$as_me:18378: \$? = $ac_status" >&5
18379   (exit $ac_status); } >/dev/null; then
18380   if test -s conftest.err; then
18381     ac_cpp_err=$ac_cxx_preproc_warn_flag
18382   else
18383     ac_cpp_err=
18384   fi
18385 else
18386   ac_cpp_err=yes
18387 fi
18388 if test -z "$ac_cpp_err"; then
18389   # Broken: success on invalid input.
18390 continue
18391 else
18392   echo "$as_me: failed program was:" >&5
18393   cat conftest.$ac_ext >&5
18394   # Passes both tests.
18395 ac_preproc_ok=:
18396 break
18397 fi
18398 rm -f conftest.err conftest.$ac_ext
18399
18400 done
18401 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18402 rm -f conftest.err conftest.$ac_ext
18403 if $ac_preproc_ok; then
18404   break
18405 fi
18406
18407     done
18408     ac_cv_prog_CXXCPP=$CXXCPP
18409
18410 fi
18411   CXXCPP=$ac_cv_prog_CXXCPP
18412 else
18413   ac_cv_prog_CXXCPP=$CXXCPP
18414 fi
18415 echo "$as_me:18415: result: $CXXCPP" >&5
18416 echo "${ECHO_T}$CXXCPP" >&6
18417 ac_preproc_ok=false
18418 for ac_cxx_preproc_warn_flag in '' yes
18419 do
18420   # Use a header file that comes with gcc, so configuring glibc
18421   # with a fresh cross-compiler works.
18422   # On the NeXT, cc -E runs the code through the compiler's parser,
18423   # not just through cpp. "Syntax error" is here to catch this case.
18424   cat >conftest.$ac_ext <<_ACEOF
18425 #line 18425 "configure"
18426 #include "confdefs.h"
18427 #include <assert.h>
18428                      Syntax error
18429 _ACEOF
18430 if { (eval echo "$as_me:18430: \"$ac_cpp conftest.$ac_ext\"") >&5
18431   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18432   ac_status=$?
18433   egrep -v '^ *\+' conftest.er1 >conftest.err
18434   rm -f conftest.er1
18435   cat conftest.err >&5
18436   echo "$as_me:18436: \$? = $ac_status" >&5
18437   (exit $ac_status); } >/dev/null; then
18438   if test -s conftest.err; then
18439     ac_cpp_err=$ac_cxx_preproc_warn_flag
18440   else
18441     ac_cpp_err=
18442   fi
18443 else
18444   ac_cpp_err=yes
18445 fi
18446 if test -z "$ac_cpp_err"; then
18447   :
18448 else
18449   echo "$as_me: failed program was:" >&5
18450   cat conftest.$ac_ext >&5
18451   # Broken: fails on valid input.
18452 continue
18453 fi
18454 rm -f conftest.err conftest.$ac_ext
18455
18456   # OK, works on sane cases.  Now check whether non-existent headers
18457   # can be detected and how.
18458   cat >conftest.$ac_ext <<_ACEOF
18459 #line 18459 "configure"
18460 #include "confdefs.h"
18461 #include <ac_nonexistent.h>
18462 _ACEOF
18463 if { (eval echo "$as_me:18463: \"$ac_cpp conftest.$ac_ext\"") >&5
18464   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18465   ac_status=$?
18466   egrep -v '^ *\+' conftest.er1 >conftest.err
18467   rm -f conftest.er1
18468   cat conftest.err >&5
18469   echo "$as_me:18469: \$? = $ac_status" >&5
18470   (exit $ac_status); } >/dev/null; then
18471   if test -s conftest.err; then
18472     ac_cpp_err=$ac_cxx_preproc_warn_flag
18473   else
18474     ac_cpp_err=
18475   fi
18476 else
18477   ac_cpp_err=yes
18478 fi
18479 if test -z "$ac_cpp_err"; then
18480   # Broken: success on invalid input.
18481 continue
18482 else
18483   echo "$as_me: failed program was:" >&5
18484   cat conftest.$ac_ext >&5
18485   # Passes both tests.
18486 ac_preproc_ok=:
18487 break
18488 fi
18489 rm -f conftest.err conftest.$ac_ext
18490
18491 done
18492 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18493 rm -f conftest.err conftest.$ac_ext
18494 if $ac_preproc_ok; then
18495   :
18496 else
18497   { { echo "$as_me:18497: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18498 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18499    { (exit 1); exit 1; }; }
18500 fi
18501
18502 ac_ext=cc
18503 ac_cpp='$CXXCPP $CPPFLAGS'
18504 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18505 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18506 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18507 ac_main_return=return
18508
18509 for ac_header in typeinfo
18510 do
18511 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18512 echo "$as_me:18512: checking for $ac_header" >&5
18513 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18514 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18515   echo $ECHO_N "(cached) $ECHO_C" >&6
18516 else
18517   cat >conftest.$ac_ext <<_ACEOF
18518 #line 18518 "configure"
18519 #include "confdefs.h"
18520 #include <$ac_header>
18521 _ACEOF
18522 if { (eval echo "$as_me:18522: \"$ac_cpp conftest.$ac_ext\"") >&5
18523   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18524   ac_status=$?
18525   egrep -v '^ *\+' conftest.er1 >conftest.err
18526   rm -f conftest.er1
18527   cat conftest.err >&5
18528   echo "$as_me:18528: \$? = $ac_status" >&5
18529   (exit $ac_status); } >/dev/null; then
18530   if test -s conftest.err; then
18531     ac_cpp_err=$ac_cxx_preproc_warn_flag
18532   else
18533     ac_cpp_err=
18534   fi
18535 else
18536   ac_cpp_err=yes
18537 fi
18538 if test -z "$ac_cpp_err"; then
18539   eval "$as_ac_Header=yes"
18540 else
18541   echo "$as_me: failed program was:" >&5
18542   cat conftest.$ac_ext >&5
18543   eval "$as_ac_Header=no"
18544 fi
18545 rm -f conftest.err conftest.$ac_ext
18546 fi
18547 echo "$as_me:18547: result: `eval echo '${'$as_ac_Header'}'`" >&5
18548 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18549 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18550   cat >>confdefs.h <<EOF
18551 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18552 EOF
18553
18554 fi
18555 done
18556
18557 for ac_header in iostream
18558 do
18559 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18560 echo "$as_me:18560: checking for $ac_header" >&5
18561 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18562 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18563   echo $ECHO_N "(cached) $ECHO_C" >&6
18564 else
18565   cat >conftest.$ac_ext <<_ACEOF
18566 #line 18566 "configure"
18567 #include "confdefs.h"
18568 #include <$ac_header>
18569 _ACEOF
18570 if { (eval echo "$as_me:18570: \"$ac_cpp conftest.$ac_ext\"") >&5
18571   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18572   ac_status=$?
18573   egrep -v '^ *\+' conftest.er1 >conftest.err
18574   rm -f conftest.er1
18575   cat conftest.err >&5
18576   echo "$as_me:18576: \$? = $ac_status" >&5
18577   (exit $ac_status); } >/dev/null; then
18578   if test -s conftest.err; then
18579     ac_cpp_err=$ac_cxx_preproc_warn_flag
18580   else
18581     ac_cpp_err=
18582   fi
18583 else
18584   ac_cpp_err=yes
18585 fi
18586 if test -z "$ac_cpp_err"; then
18587   eval "$as_ac_Header=yes"
18588 else
18589   echo "$as_me: failed program was:" >&5
18590   cat conftest.$ac_ext >&5
18591   eval "$as_ac_Header=no"
18592 fi
18593 rm -f conftest.err conftest.$ac_ext
18594 fi
18595 echo "$as_me:18595: result: `eval echo '${'$as_ac_Header'}'`" >&5
18596 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18597 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18598   cat >>confdefs.h <<EOF
18599 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18600 EOF
18601
18602 fi
18603 done
18604
18605 if test x"$ac_cv_header_iostream" = xyes ; then
18606         echo "$as_me:18606: checking if iostream uses std-namespace" >&5
18607 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18608         cat >conftest.$ac_ext <<_ACEOF
18609 #line 18609 "configure"
18610 #include "confdefs.h"
18611
18612 #include <iostream>
18613 using std::endl;
18614 using std::cerr;
18615 int
18616 main ()
18617 {
18618
18619 cerr << "testing" << endl;
18620
18621   ;
18622   return 0;
18623 }
18624 _ACEOF
18625 rm -f conftest.$ac_objext
18626 if { (eval echo "$as_me:18626: \"$ac_compile\"") >&5
18627   (eval $ac_compile) 2>&5
18628   ac_status=$?
18629   echo "$as_me:18629: \$? = $ac_status" >&5
18630   (exit $ac_status); } &&
18631          { ac_try='test -s conftest.$ac_objext'
18632   { (eval echo "$as_me:18632: \"$ac_try\"") >&5
18633   (eval $ac_try) 2>&5
18634   ac_status=$?
18635   echo "$as_me:18635: \$? = $ac_status" >&5
18636   (exit $ac_status); }; }; then
18637   cf_iostream_namespace=yes
18638 else
18639   echo "$as_me: failed program was:" >&5
18640 cat conftest.$ac_ext >&5
18641 cf_iostream_namespace=no
18642 fi
18643 rm -f conftest.$ac_objext conftest.$ac_ext
18644         echo "$as_me:18644: result: $cf_iostream_namespace" >&5
18645 echo "${ECHO_T}$cf_iostream_namespace" >&6
18646         if test "$cf_iostream_namespace" = yes ; then
18647                 cat >>confdefs.h <<\EOF
18648 #define IOSTREAM_NAMESPACE 1
18649 EOF
18650
18651         fi
18652 fi
18653
18654 echo "$as_me:18654: checking if we should include stdbool.h" >&5
18655 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18656
18657 if test "${cf_cv_header_stdbool_h+set}" = set; then
18658   echo $ECHO_N "(cached) $ECHO_C" >&6
18659 else
18660
18661         cat >conftest.$ac_ext <<_ACEOF
18662 #line 18662 "configure"
18663 #include "confdefs.h"
18664
18665 int
18666 main ()
18667 {
18668 bool foo = false
18669   ;
18670   return 0;
18671 }
18672 _ACEOF
18673 rm -f conftest.$ac_objext
18674 if { (eval echo "$as_me:18674: \"$ac_compile\"") >&5
18675   (eval $ac_compile) 2>&5
18676   ac_status=$?
18677   echo "$as_me:18677: \$? = $ac_status" >&5
18678   (exit $ac_status); } &&
18679          { ac_try='test -s conftest.$ac_objext'
18680   { (eval echo "$as_me:18680: \"$ac_try\"") >&5
18681   (eval $ac_try) 2>&5
18682   ac_status=$?
18683   echo "$as_me:18683: \$? = $ac_status" >&5
18684   (exit $ac_status); }; }; then
18685   cf_cv_header_stdbool_h=0
18686 else
18687   echo "$as_me: failed program was:" >&5
18688 cat conftest.$ac_ext >&5
18689 cat >conftest.$ac_ext <<_ACEOF
18690 #line 18690 "configure"
18691 #include "confdefs.h"
18692
18693 #ifndef __BEOS__
18694 #include <stdbool.h>
18695 #endif
18696
18697 int
18698 main ()
18699 {
18700 bool foo = false
18701   ;
18702   return 0;
18703 }
18704 _ACEOF
18705 rm -f conftest.$ac_objext
18706 if { (eval echo "$as_me:18706: \"$ac_compile\"") >&5
18707   (eval $ac_compile) 2>&5
18708   ac_status=$?
18709   echo "$as_me:18709: \$? = $ac_status" >&5
18710   (exit $ac_status); } &&
18711          { ac_try='test -s conftest.$ac_objext'
18712   { (eval echo "$as_me:18712: \"$ac_try\"") >&5
18713   (eval $ac_try) 2>&5
18714   ac_status=$?
18715   echo "$as_me:18715: \$? = $ac_status" >&5
18716   (exit $ac_status); }; }; then
18717   cf_cv_header_stdbool_h=1
18718 else
18719   echo "$as_me: failed program was:" >&5
18720 cat conftest.$ac_ext >&5
18721 cf_cv_header_stdbool_h=0
18722 fi
18723 rm -f conftest.$ac_objext conftest.$ac_ext
18724 fi
18725 rm -f conftest.$ac_objext conftest.$ac_ext
18726 fi
18727
18728 if test "$cf_cv_header_stdbool_h" = 1
18729 then    echo "$as_me:18729: result: yes" >&5
18730 echo "${ECHO_T}yes" >&6
18731 else    echo "$as_me:18731: result: no" >&5
18732 echo "${ECHO_T}no" >&6
18733 fi
18734
18735 echo "$as_me:18735: checking for builtin bool type" >&5
18736 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18737
18738 if test "${cf_cv_builtin_bool+set}" = set; then
18739   echo $ECHO_N "(cached) $ECHO_C" >&6
18740 else
18741
18742         cat >conftest.$ac_ext <<_ACEOF
18743 #line 18743 "configure"
18744 #include "confdefs.h"
18745
18746 #include <stdio.h>
18747 #include <sys/types.h>
18748
18749 int
18750 main ()
18751 {
18752 bool x = false
18753   ;
18754   return 0;
18755 }
18756 _ACEOF
18757 rm -f conftest.$ac_objext
18758 if { (eval echo "$as_me:18758: \"$ac_compile\"") >&5
18759   (eval $ac_compile) 2>&5
18760   ac_status=$?
18761   echo "$as_me:18761: \$? = $ac_status" >&5
18762   (exit $ac_status); } &&
18763          { ac_try='test -s conftest.$ac_objext'
18764   { (eval echo "$as_me:18764: \"$ac_try\"") >&5
18765   (eval $ac_try) 2>&5
18766   ac_status=$?
18767   echo "$as_me:18767: \$? = $ac_status" >&5
18768   (exit $ac_status); }; }; then
18769   cf_cv_builtin_bool=1
18770 else
18771   echo "$as_me: failed program was:" >&5
18772 cat conftest.$ac_ext >&5
18773 cf_cv_builtin_bool=0
18774 fi
18775 rm -f conftest.$ac_objext conftest.$ac_ext
18776
18777 fi
18778
18779 if test "$cf_cv_builtin_bool" = 1
18780 then    echo "$as_me:18780: result: yes" >&5
18781 echo "${ECHO_T}yes" >&6
18782 else    echo "$as_me:18782: result: no" >&5
18783 echo "${ECHO_T}no" >&6
18784 fi
18785
18786 echo "$as_me:18786: checking for size of bool" >&5
18787 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18788 if test "${cf_cv_type_of_bool+set}" = set; then
18789   echo $ECHO_N "(cached) $ECHO_C" >&6
18790 else
18791
18792         rm -f cf_test.out
18793         if test "$cross_compiling" = yes; then
18794   cf_cv_type_of_bool=unknown
18795 else
18796   cat >conftest.$ac_ext <<_ACEOF
18797 #line 18797 "configure"
18798 #include "confdefs.h"
18799
18800 #include <stdlib.h>
18801 #include <stdio.h>
18802
18803 #if defined(__cplusplus)
18804
18805 #ifdef HAVE_GXX_BUILTIN_H
18806 #include <g++/builtin.h>
18807 #elif HAVE_GPP_BUILTIN_H
18808 #include <gpp/builtin.h>
18809 #elif HAVE_BUILTIN_H
18810 #include <builtin.h>
18811 #endif
18812
18813 #else
18814
18815 #if $cf_cv_header_stdbool_h
18816 #include <stdbool.h>
18817 #endif
18818
18819 #endif
18820
18821 main()
18822 {
18823         FILE *fp = fopen("cf_test.out", "w");
18824         if (fp != 0) {
18825                 bool x = true;
18826                 if ((bool)(-x) >= 0)
18827                         fputs("unsigned ", fp);
18828                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18829                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18830                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18831                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18832                 fclose(fp);
18833         }
18834         ${cf_cv_main_return:-return}(0);
18835 }
18836
18837 _ACEOF
18838 rm -f conftest$ac_exeext
18839 if { (eval echo "$as_me:18839: \"$ac_link\"") >&5
18840   (eval $ac_link) 2>&5
18841   ac_status=$?
18842   echo "$as_me:18842: \$? = $ac_status" >&5
18843   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18844   { (eval echo "$as_me:18844: \"$ac_try\"") >&5
18845   (eval $ac_try) 2>&5
18846   ac_status=$?
18847   echo "$as_me:18847: \$? = $ac_status" >&5
18848   (exit $ac_status); }; }; then
18849   cf_cv_type_of_bool=`cat cf_test.out`
18850                  if test -z "$cf_cv_type_of_bool"; then
18851                    cf_cv_type_of_bool=unknown
18852                  fi
18853 else
18854   echo "$as_me: program exited with status $ac_status" >&5
18855 echo "$as_me: failed program was:" >&5
18856 cat conftest.$ac_ext >&5
18857 cf_cv_type_of_bool=unknown
18858 fi
18859 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18860 fi
18861
18862 fi
18863
18864         rm -f cf_test.out
18865 echo "$as_me:18865: result: $cf_cv_type_of_bool" >&5
18866 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18867 if test "$cf_cv_type_of_bool" = unknown ; then
18868         case .$NCURSES_BOOL in #(vi
18869         .auto|.) NCURSES_BOOL=unsigned;;
18870         esac
18871         { echo "$as_me:18871: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18872 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18873         cf_cv_type_of_bool=$NCURSES_BOOL
18874 fi
18875
18876 echo "$as_me:18876: checking for special defines needed for etip.h" >&5
18877 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18878 cf_save_CXXFLAGS="$CXXFLAGS"
18879 cf_result="none"
18880
18881 # etip.h includes ncurses.h which includes ncurses_dll.h
18882 # But ncurses_dll.h is generated - fix here.
18883 test -d include || mkdir include
18884 test -f include/ncurses_dll.h || sed -e 's/@NCURSES_WRAP_PREFIX@/'$NCURSES_WRAP_PREFIX'/g' ${srcdir}/include/ncurses_dll.h.in >include/ncurses_dll.h
18885
18886 for cf_math in "" MATH_H
18887 do
18888 for cf_excp in "" MATH_EXCEPTION
18889 do
18890         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18891         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18892         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18893 cat >conftest.$ac_ext <<_ACEOF
18894 #line 18894 "configure"
18895 #include "confdefs.h"
18896
18897 #include <etip.h.in>
18898
18899 int
18900 main ()
18901 {
18902
18903   ;
18904   return 0;
18905 }
18906 _ACEOF
18907 rm -f conftest.$ac_objext
18908 if { (eval echo "$as_me:18908: \"$ac_compile\"") >&5
18909   (eval $ac_compile) 2>&5
18910   ac_status=$?
18911   echo "$as_me:18911: \$? = $ac_status" >&5
18912   (exit $ac_status); } &&
18913          { ac_try='test -s conftest.$ac_objext'
18914   { (eval echo "$as_me:18914: \"$ac_try\"") >&5
18915   (eval $ac_try) 2>&5
18916   ac_status=$?
18917   echo "$as_me:18917: \$? = $ac_status" >&5
18918   (exit $ac_status); }; }; then
18919
18920         test -n "$cf_math" && cat >>confdefs.h <<EOF
18921 #define ETIP_NEEDS_${cf_math} 1
18922 EOF
18923
18924         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18925 #define ETIP_NEEDS_${cf_excp} 1
18926 EOF
18927
18928         cf_result="$cf_math $cf_excp"
18929         break 2
18930
18931 else
18932   echo "$as_me: failed program was:" >&5
18933 cat conftest.$ac_ext >&5
18934 fi
18935 rm -f conftest.$ac_objext conftest.$ac_ext
18936 done
18937 done
18938 echo "$as_me:18938: result: $cf_result" >&5
18939 echo "${ECHO_T}$cf_result" >&6
18940 CXXFLAGS="$cf_save_CXXFLAGS"
18941
18942 if test -n "$CXX"; then
18943 echo "$as_me:18943: checking if $CXX accepts parameter initialization" >&5
18944 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18945 if test "${cf_cv_cpp_param_init+set}" = set; then
18946   echo $ECHO_N "(cached) $ECHO_C" >&6
18947 else
18948
18949         ac_ext=cc
18950 ac_cpp='$CXXCPP $CPPFLAGS'
18951 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18952 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18953 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18954 ac_main_return=return
18955
18956         if test "$cross_compiling" = yes; then
18957   cf_cv_cpp_param_init=unknown
18958 else
18959   cat >conftest.$ac_ext <<_ACEOF
18960 #line 18960 "configure"
18961 #include "confdefs.h"
18962
18963 class TEST {
18964 private:
18965         int value;
18966 public:
18967         TEST(int x = 1);
18968         ~TEST();
18969 };
18970
18971 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18972 {
18973         value = x;
18974 }
18975 int main() { }
18976
18977 _ACEOF
18978 rm -f conftest$ac_exeext
18979 if { (eval echo "$as_me:18979: \"$ac_link\"") >&5
18980   (eval $ac_link) 2>&5
18981   ac_status=$?
18982   echo "$as_me:18982: \$? = $ac_status" >&5
18983   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18984   { (eval echo "$as_me:18984: \"$ac_try\"") >&5
18985   (eval $ac_try) 2>&5
18986   ac_status=$?
18987   echo "$as_me:18987: \$? = $ac_status" >&5
18988   (exit $ac_status); }; }; then
18989   cf_cv_cpp_param_init=yes
18990 else
18991   echo "$as_me: program exited with status $ac_status" >&5
18992 echo "$as_me: failed program was:" >&5
18993 cat conftest.$ac_ext >&5
18994 cf_cv_cpp_param_init=no
18995 fi
18996 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18997 fi
18998         ac_ext=cc
18999 ac_cpp='$CXXCPP $CPPFLAGS'
19000 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19001 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19002 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19003 ac_main_return=return
19004
19005 fi
19006 echo "$as_me:19006: result: $cf_cv_cpp_param_init" >&5
19007 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
19008 fi
19009 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
19010 #define CPP_HAS_PARAM_INIT 1
19011 EOF
19012
19013 if test -n "$CXX"; then
19014
19015 echo "$as_me:19015: checking if $CXX accepts static_cast" >&5
19016 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
19017 if test "${cf_cv_cpp_static_cast+set}" = set; then
19018   echo $ECHO_N "(cached) $ECHO_C" >&6
19019 else
19020
19021         ac_ext=cc
19022 ac_cpp='$CXXCPP $CPPFLAGS'
19023 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19024 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19025 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19026 ac_main_return=return
19027
19028         cat >conftest.$ac_ext <<_ACEOF
19029 #line 19029 "configure"
19030 #include "confdefs.h"
19031
19032 class NCursesPanel
19033 {
19034 public:
19035   NCursesPanel(int nlines,
19036                int ncols,
19037                int begin_y = 0,
19038                int begin_x = 0)
19039   {
19040   }
19041
19042   ~NCursesPanel();
19043 };
19044
19045 template<class T> class NCursesUserPanel : public NCursesPanel
19046 {
19047 public:
19048   NCursesUserPanel (int nlines,
19049                     int ncols,
19050                     int begin_y = 0,
19051                     int begin_x = 0,
19052                     const T* p_UserData = static_cast<T*>(0))
19053     : NCursesPanel (nlines, ncols, begin_y, begin_x)
19054   {
19055   };
19056   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
19057   {
19058   };
19059
19060   virtual ~NCursesUserPanel() {};
19061 };
19062
19063 int
19064 main ()
19065 {
19066
19067         const char* p_UserData = static_cast<char*>(0)
19068   ;
19069   return 0;
19070 }
19071 _ACEOF
19072 rm -f conftest.$ac_objext
19073 if { (eval echo "$as_me:19073: \"$ac_compile\"") >&5
19074   (eval $ac_compile) 2>&5
19075   ac_status=$?
19076   echo "$as_me:19076: \$? = $ac_status" >&5
19077   (exit $ac_status); } &&
19078          { ac_try='test -s conftest.$ac_objext'
19079   { (eval echo "$as_me:19079: \"$ac_try\"") >&5
19080   (eval $ac_try) 2>&5
19081   ac_status=$?
19082   echo "$as_me:19082: \$? = $ac_status" >&5
19083   (exit $ac_status); }; }; then
19084   cf_cv_cpp_static_cast=yes
19085 else
19086   echo "$as_me: failed program was:" >&5
19087 cat conftest.$ac_ext >&5
19088 cf_cv_cpp_static_cast=no
19089 fi
19090 rm -f conftest.$ac_objext conftest.$ac_ext
19091
19092         ac_ext=cc
19093 ac_cpp='$CXXCPP $CPPFLAGS'
19094 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19095 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19096 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19097 ac_main_return=return
19098
19099 fi
19100 echo "$as_me:19100: result: $cf_cv_cpp_static_cast" >&5
19101 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
19102
19103 fi
19104
19105 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
19106 #define CPP_HAS_STATIC_CAST 1
19107 EOF
19108
19109         CXX_AR='$(AR)'
19110         CXX_ARFLAGS='$(ARFLAGS)'
19111         case $cf_cv_system_name in #(vi
19112         irix*) #(vi
19113             if test "$GXX" != yes ; then
19114                 CXX_AR='$(CXX)'
19115                 CXX_ARFLAGS='-ar -o'
19116             fi
19117             ;;
19118         sco3.2v5*) #(vi
19119             CXXLDFLAGS="-u main"
19120             ;;
19121         solaris2*)
19122             if test "$GXX" != yes ; then
19123                 CXX_AR='$(CXX)'
19124                 CXX_ARFLAGS='-xar -o'
19125             fi
19126             ;;
19127         esac
19128
19129 else
19130         cf_cxx_library=no
19131         cf_cv_builtin_bool=1
19132
19133         # Just because we are not configuring against C++ right now does not
19134         # mean that a user will not want to use C++.  Some distributors disable
19135         # the C++ portion of this configuration as a shortcut (or just to avoid
19136         # compiling the demo in the c++ directory).  So we need a reasonable
19137         # default for the 'bool' type.
19138         #
19139         # Caveat: since the storage of the bool type is not standardized, it
19140         # may change.
19141
19142         if test "$NCURSES_BOOL" != auto ; then
19143                 cf_cv_type_of_bool=$NCURSES_BOOL
19144                 cf_cv_header_stdbool_h=0
19145         else
19146                 if test "$cf_cv_header_stdbool_h" = 1 ; then
19147
19148 echo "$as_me:19148: checking for size of bool" >&5
19149 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19150 if test "${cf_cv_type_of_bool+set}" = set; then
19151   echo $ECHO_N "(cached) $ECHO_C" >&6
19152 else
19153
19154         rm -f cf_test.out
19155         if test "$cross_compiling" = yes; then
19156   cf_cv_type_of_bool=unknown
19157 else
19158   cat >conftest.$ac_ext <<_ACEOF
19159 #line 19159 "configure"
19160 #include "confdefs.h"
19161
19162 #include <stdlib.h>
19163 #include <stdio.h>
19164
19165 #if defined(__cplusplus)
19166
19167 #ifdef HAVE_GXX_BUILTIN_H
19168 #include <g++/builtin.h>
19169 #elif HAVE_GPP_BUILTIN_H
19170 #include <gpp/builtin.h>
19171 #elif HAVE_BUILTIN_H
19172 #include <builtin.h>
19173 #endif
19174
19175 #else
19176
19177 #if $cf_cv_header_stdbool_h
19178 #include <stdbool.h>
19179 #endif
19180
19181 #endif
19182
19183 main()
19184 {
19185         FILE *fp = fopen("cf_test.out", "w");
19186         if (fp != 0) {
19187                 bool x = true;
19188                 if ((bool)(-x) >= 0)
19189                         fputs("unsigned ", fp);
19190                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19191                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19192                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19193                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19194                 fclose(fp);
19195         }
19196         ${cf_cv_main_return:-return}(0);
19197 }
19198
19199 _ACEOF
19200 rm -f conftest$ac_exeext
19201 if { (eval echo "$as_me:19201: \"$ac_link\"") >&5
19202   (eval $ac_link) 2>&5
19203   ac_status=$?
19204   echo "$as_me:19204: \$? = $ac_status" >&5
19205   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19206   { (eval echo "$as_me:19206: \"$ac_try\"") >&5
19207   (eval $ac_try) 2>&5
19208   ac_status=$?
19209   echo "$as_me:19209: \$? = $ac_status" >&5
19210   (exit $ac_status); }; }; then
19211   cf_cv_type_of_bool=`cat cf_test.out`
19212                  if test -z "$cf_cv_type_of_bool"; then
19213                    cf_cv_type_of_bool=unknown
19214                  fi
19215 else
19216   echo "$as_me: program exited with status $ac_status" >&5
19217 echo "$as_me: failed program was:" >&5
19218 cat conftest.$ac_ext >&5
19219 cf_cv_type_of_bool=unknown
19220 fi
19221 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19222 fi
19223
19224 fi
19225
19226         rm -f cf_test.out
19227 echo "$as_me:19227: result: $cf_cv_type_of_bool" >&5
19228 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19229 if test "$cf_cv_type_of_bool" = unknown ; then
19230         case .$NCURSES_BOOL in #(vi
19231         .auto|.) NCURSES_BOOL=unsigned;;
19232         esac
19233         { echo "$as_me:19233: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19234 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19235         cf_cv_type_of_bool=$NCURSES_BOOL
19236 fi
19237
19238                 else
19239                         echo "$as_me:19239: checking for fallback type of bool" >&5
19240 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19241                         case "$host_cpu" in #(vi
19242                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19243                         *)      cf_cv_type_of_bool=int  ;;
19244                         esac
19245                         echo "$as_me:19245: result: $cf_cv_type_of_bool" >&5
19246 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19247                 fi
19248         fi
19249 fi
19250
19251 # If the C compiler did not declare bool, and we did not determine that the C++
19252 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19253 # ncurses library use the same type as C++ bool.  Note that this allows one to
19254 # specify the type of bool in a configure-script option and postpone
19255 # integration with the C++ compiler provided that the types are compatible.
19256 USE_CXX_BOOL=1
19257 if test $cf_cv_cc_bool_type = 1
19258 then
19259         # oops: C has a bool.  Unlikely, but C++ could differ.
19260         USE_CXX_BOOL=0
19261 elif test $cf_cv_builtin_bool = 0
19262 then
19263         # C++ has no bool
19264         USE_CXX_BOOL=0
19265 else
19266         # this is the normal case
19267         USE_CXX_BOOL='defined(__cplusplus)'
19268 fi
19269
19270 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19271
19272         if test "$cf_with_ada" != "no" ; then
19273                 if test "$with_libtool" != "no"; then
19274                         { echo "$as_me:19274: WARNING: libtool does not support Ada - disabling feature" >&5
19275 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19276                         cf_with_ada=no
19277                 fi
19278         fi
19279
19280         if test "$cf_with_ada" != "no" ; then
19281
19282 cf_ada_make=gnatmake
19283 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19284 set dummy $cf_ada_make; ac_word=$2
19285 echo "$as_me:19285: checking for $ac_word" >&5
19286 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19287 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19288   echo $ECHO_N "(cached) $ECHO_C" >&6
19289 else
19290   if test -n "$gnat_exists"; then
19291   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19292 else
19293   ac_save_IFS=$IFS; IFS=$ac_path_separator
19294 ac_dummy="$PATH"
19295 for ac_dir in $ac_dummy; do
19296   IFS=$ac_save_IFS
19297   test -z "$ac_dir" && ac_dir=.
19298   $as_executable_p "$ac_dir/$ac_word" || continue
19299 ac_cv_prog_gnat_exists="yes"
19300 echo "$as_me:19300: found $ac_dir/$ac_word" >&5
19301 break
19302 done
19303
19304   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19305 fi
19306 fi
19307 gnat_exists=$ac_cv_prog_gnat_exists
19308 if test -n "$gnat_exists"; then
19309   echo "$as_me:19309: result: $gnat_exists" >&5
19310 echo "${ECHO_T}$gnat_exists" >&6
19311 else
19312   echo "$as_me:19312: result: no" >&5
19313 echo "${ECHO_T}no" >&6
19314 fi
19315
19316 if test "$ac_cv_prog_gnat_exists" = no; then
19317    cf_ada_make=
19318    cf_cv_prog_gnat_correct=no
19319 else
19320
19321 echo "$as_me:19321: checking for gnat version" >&5
19322 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19323 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19324         grep '[0-9].[0-9][0-9]*' |\
19325     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19326 echo "$as_me:19326: result: $cf_gnat_version" >&5
19327 echo "${ECHO_T}$cf_gnat_version" >&6
19328
19329 case $cf_gnat_version in #(vi
19330 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19331         cf_cv_prog_gnat_correct=yes
19332         ;;
19333 *)
19334         { echo "$as_me:19334: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19335 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19336         cf_cv_prog_gnat_correct=no
19337         ;;
19338 esac
19339
19340    # Extract the first word of "m4", so it can be a program name with args.
19341 set dummy m4; ac_word=$2
19342 echo "$as_me:19342: checking for $ac_word" >&5
19343 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19344 if test "${ac_cv_prog_M4_exists+set}" = set; then
19345   echo $ECHO_N "(cached) $ECHO_C" >&6
19346 else
19347   if test -n "$M4_exists"; then
19348   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19349 else
19350   ac_save_IFS=$IFS; IFS=$ac_path_separator
19351 ac_dummy="$PATH"
19352 for ac_dir in $ac_dummy; do
19353   IFS=$ac_save_IFS
19354   test -z "$ac_dir" && ac_dir=.
19355   $as_executable_p "$ac_dir/$ac_word" || continue
19356 ac_cv_prog_M4_exists="yes"
19357 echo "$as_me:19357: found $ac_dir/$ac_word" >&5
19358 break
19359 done
19360
19361   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19362 fi
19363 fi
19364 M4_exists=$ac_cv_prog_M4_exists
19365 if test -n "$M4_exists"; then
19366   echo "$as_me:19366: result: $M4_exists" >&5
19367 echo "${ECHO_T}$M4_exists" >&6
19368 else
19369   echo "$as_me:19369: result: no" >&5
19370 echo "${ECHO_T}no" >&6
19371 fi
19372
19373    if test "$ac_cv_prog_M4_exists" = no; then
19374       cf_cv_prog_gnat_correct=no
19375       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19376    fi
19377    if test "$cf_cv_prog_gnat_correct" = yes; then
19378       echo "$as_me:19378: checking if GNAT works" >&5
19379 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19380
19381 rm -rf conftest* *~conftest*
19382 cat >>conftest.ads <<CF_EOF
19383 procedure conftest;
19384 CF_EOF
19385 cat >>conftest.adb <<CF_EOF
19386 with Text_IO;
19387 with GNAT.OS_Lib;
19388 procedure conftest is
19389 begin
19390    Text_IO.Put ("Hello World");
19391    Text_IO.New_Line;
19392    GNAT.OS_Lib.OS_Exit (0);
19393 end conftest;
19394 CF_EOF
19395 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19396    if ( ./conftest 1>&5 2>&1 ) ; then
19397       cf_cv_prog_gnat_correct=yes
19398    else
19399       cf_cv_prog_gnat_correct=no
19400    fi
19401 else
19402    cf_cv_prog_gnat_correct=no
19403 fi
19404 rm -rf conftest* *~conftest*
19405
19406       echo "$as_me:19406: result: $cf_cv_prog_gnat_correct" >&5
19407 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19408    fi
19409 fi
19410
19411                 if test "$cf_cv_prog_gnat_correct" = yes; then
19412
19413         ADAFLAGS="$ADAFLAGS -gnatpn"
19414
19415                         # make ADAFLAGS consistent with CFLAGS
19416                         case "$CFLAGS" in
19417                         *-g*)
19418
19419         ADAFLAGS="$ADAFLAGS -g"
19420
19421                                 ;;
19422                         esac
19423                         case "$CFLAGS" in
19424                         *-O*)
19425
19426         ADAFLAGS="$ADAFLAGS -O3"
19427
19428                                 ;;
19429                         esac
19430
19431 echo "$as_me:19431: checking if GNAT supports generics" >&5
19432 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19433 case $cf_gnat_version in #(vi
19434 3.[1-9]*|[4-9].*) #(vi
19435         cf_gnat_generics=yes
19436         ;;
19437 *)
19438         cf_gnat_generics=no
19439         ;;
19440 esac
19441 echo "$as_me:19441: result: $cf_gnat_generics" >&5
19442 echo "${ECHO_T}$cf_gnat_generics" >&6
19443
19444 if test "$cf_gnat_generics" = yes
19445 then
19446         cf_compile_generics=generics
19447         cf_generic_objects="\${GENOBJS}"
19448 else
19449         cf_compile_generics=
19450         cf_generic_objects=
19451 fi
19452
19453 echo "$as_me:19453: checking if GNAT supports SIGINT" >&5
19454 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19455 if test "${cf_cv_gnat_sigint+set}" = set; then
19456   echo $ECHO_N "(cached) $ECHO_C" >&6
19457 else
19458
19459 rm -rf conftest* *~conftest*
19460 cat >>conftest.ads <<CF_EOF
19461 with Ada.Interrupts.Names;
19462
19463 package ConfTest is
19464
19465    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19466    pragma Unreserve_All_Interrupts;
19467    pragma Warnings (On);
19468
19469    protected Process is
19470       procedure Stop;
19471       function Continue return Boolean;
19472       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19473    private
19474       Done : Boolean := False;
19475    end Process;
19476
19477 end ConfTest;
19478 CF_EOF
19479 cat >>conftest.adb <<CF_EOF
19480 package body ConfTest is
19481    protected body Process is
19482       procedure Stop is
19483       begin
19484          Done := True;
19485       end Stop;
19486       function Continue return Boolean is
19487       begin
19488          return not Done;
19489       end Continue;
19490    end Process;
19491 end ConfTest;
19492 CF_EOF
19493 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19494       cf_cv_gnat_sigint=yes
19495 else
19496    cf_cv_gnat_sigint=no
19497 fi
19498 rm -rf conftest* *~conftest*
19499
19500 fi
19501 echo "$as_me:19501: result: $cf_cv_gnat_sigint" >&5
19502 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19503
19504 if test $cf_cv_gnat_sigint = yes ; then
19505         USE_GNAT_SIGINT=""
19506 else
19507         USE_GNAT_SIGINT="#"
19508 fi
19509
19510 echo "$as_me:19510: checking if GNAT pragma Unreferenced works" >&5
19511 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19512 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19513   echo $ECHO_N "(cached) $ECHO_C" >&6
19514 else
19515
19516 rm -rf conftest* *~conftest*
19517 cat >>conftest.ads <<CF_EOF
19518 procedure conftest;
19519 CF_EOF
19520 cat >>conftest.adb <<CF_EOF
19521 with Text_IO;
19522 with GNAT.OS_Lib;
19523 procedure conftest is
19524    test : Integer;
19525    pragma Unreferenced (test);
19526 begin
19527    test := 1;
19528    Text_IO.Put ("Hello World");
19529    Text_IO.New_Line;
19530    GNAT.OS_Lib.OS_Exit (0);
19531 end conftest;
19532 CF_EOF
19533 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19534       cf_cv_pragma_unreferenced=yes
19535 else
19536    cf_cv_pragma_unreferenced=no
19537 fi
19538 rm -rf conftest* *~conftest*
19539
19540 fi
19541 echo "$as_me:19541: result: $cf_cv_pragma_unreferenced" >&5
19542 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19543
19544 # if the pragma is supported, use it (needed in the Trace code).
19545 if test $cf_cv_pragma_unreferenced = yes ; then
19546         PRAGMA_UNREF=TRUE
19547 else
19548         PRAGMA_UNREF=FALSE
19549 fi
19550
19551 cf_gnat_libraries=no
19552 cf_gnat_projects=no
19553
19554 echo "$as_me:19554: checking if GNAT supports project files" >&5
19555 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19556 case $cf_gnat_version in #(vi
19557 3.[0-9]*) #(vi
19558         ;;
19559 *)
19560         case $cf_cv_system_name in #(vi
19561         cygwin*) #(vi
19562                 ;;
19563         *)
19564                 mkdir conftest.src conftest.bin conftest.lib
19565                 cd conftest.src
19566                 rm -rf conftest* *~conftest*
19567                 cat >>library.gpr <<CF_EOF
19568 project Library is
19569   Kind := External ("LIB_KIND");
19570   for Library_Name use "ConfTest";
19571   for Object_Dir use ".";
19572   for Library_ALI_Dir use External("LIBRARY_DIR");
19573   for Library_Version use External ("SONAME");
19574   for Library_Kind use Kind;
19575   for Library_Dir use External("BUILD_DIR");
19576   Source_Dir := External ("SOURCE_DIR");
19577   for Source_Dirs use (Source_Dir);
19578   package Compiler is
19579      for Default_Switches ("Ada") use
19580        ("-g",
19581         "-O2",
19582         "-gnatafno",
19583         "-gnatVa",   -- All validity checks
19584         "-gnatwa");  -- Activate all optional errors
19585   end Compiler;
19586 end Library;
19587 CF_EOF
19588                 cat >>confpackage.ads <<CF_EOF
19589 package ConfPackage is
19590    procedure conftest;
19591 end ConfPackage;
19592 CF_EOF
19593                 cat >>confpackage.adb <<CF_EOF
19594 with Text_IO;
19595 package body ConfPackage is
19596    procedure conftest is
19597    begin
19598       Text_IO.Put ("Hello World");
19599       Text_IO.New_Line;
19600    end conftest;
19601 end ConfPackage;
19602 CF_EOF
19603                 if ( $cf_ada_make $ADAFLAGS \
19604                                 -Plibrary.gpr \
19605                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19606                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19607                                 -XSOURCE_DIR=`pwd` \
19608                                 -XSONAME=libConfTest.so.1 \
19609                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19610                         cf_gnat_projects=yes
19611                 fi
19612                 cd ..
19613                 if test -f conftest.lib/confpackage.ali
19614                 then
19615                         cf_gnat_libraries=yes
19616                 fi
19617                 rm -rf conftest* *~conftest*
19618                 ;;
19619         esac
19620         ;;
19621 esac
19622 echo "$as_me:19622: result: $cf_gnat_projects" >&5
19623 echo "${ECHO_T}$cf_gnat_projects" >&6
19624
19625 if test $cf_gnat_projects = yes
19626 then
19627         echo "$as_me:19627: checking if GNAT supports libraries" >&5
19628 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19629         echo "$as_me:19629: result: $cf_gnat_libraries" >&5
19630 echo "${ECHO_T}$cf_gnat_libraries" >&6
19631 fi
19632
19633 if test "$cf_gnat_projects" = yes
19634 then
19635         USE_OLD_MAKERULES="#"
19636         USE_GNAT_PROJECTS=""
19637 else
19638         USE_OLD_MAKERULES=""
19639         USE_GNAT_PROJECTS="#"
19640 fi
19641
19642 if test "$cf_gnat_libraries" = yes
19643 then
19644         USE_GNAT_LIBRARIES=""
19645 else
19646         USE_GNAT_LIBRARIES="#"
19647 fi
19648
19649 echo "$as_me:19649: checking for ada-compiler" >&5
19650 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19651
19652 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19653 if test "${with_ada_compiler+set}" = set; then
19654   withval="$with_ada_compiler"
19655   cf_ada_compiler=$withval
19656 else
19657   cf_ada_compiler=gnatmake
19658 fi;
19659
19660 echo "$as_me:19660: result: $cf_ada_compiler" >&5
19661 echo "${ECHO_T}$cf_ada_compiler" >&6
19662
19663                         cf_ada_package=terminal_interface
19664
19665 echo "$as_me:19665: checking for ada-include" >&5
19666 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19667
19668 # Check whether --with-ada-include or --without-ada-include was given.
19669 if test "${with_ada_include+set}" = set; then
19670   withval="$with_ada_include"
19671
19672 else
19673   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19674 fi; if test -n "$prefix/share/ada/adainclude" ; then
19675
19676 if test "x$prefix" != xNONE; then
19677   cf_path_syntax="$prefix"
19678 else
19679   cf_path_syntax="$ac_default_prefix"
19680 fi
19681
19682 case ".$withval" in #(vi
19683 .\$\(*\)*|.\'*\'*) #(vi
19684   ;;
19685 ..|./*|.\\*) #(vi
19686   ;;
19687 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19688   ;;
19689 .\${*prefix}*) #(vi
19690   eval withval="$withval"
19691   case ".$withval" in #(vi
19692   .NONE/*)
19693     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19694     ;;
19695   esac
19696   ;; #(vi
19697 .no|.NONE/*)
19698   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19699   ;;
19700 *)
19701   { { echo "$as_me:19701: error: expected a pathname, not \"$withval\"" >&5
19702 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19703    { (exit 1); exit 1; }; }
19704   ;;
19705 esac
19706
19707 fi
19708 ADA_INCLUDE="$withval"
19709
19710 echo "$as_me:19710: result: $ADA_INCLUDE" >&5
19711 echo "${ECHO_T}$ADA_INCLUDE" >&6
19712
19713 echo "$as_me:19713: checking for ada-objects" >&5
19714 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19715
19716 # Check whether --with-ada-objects or --without-ada-objects was given.
19717 if test "${with_ada_objects+set}" = set; then
19718   withval="$with_ada_objects"
19719
19720 else
19721   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19722 fi; if test -n "$prefix/lib/ada/adalib" ; then
19723
19724 if test "x$prefix" != xNONE; then
19725   cf_path_syntax="$prefix"
19726 else
19727   cf_path_syntax="$ac_default_prefix"
19728 fi
19729
19730 case ".$withval" in #(vi
19731 .\$\(*\)*|.\'*\'*) #(vi
19732   ;;
19733 ..|./*|.\\*) #(vi
19734   ;;
19735 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19736   ;;
19737 .\${*prefix}*) #(vi
19738   eval withval="$withval"
19739   case ".$withval" in #(vi
19740   .NONE/*)
19741     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19742     ;;
19743   esac
19744   ;; #(vi
19745 .no|.NONE/*)
19746   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19747   ;;
19748 *)
19749   { { echo "$as_me:19749: error: expected a pathname, not \"$withval\"" >&5
19750 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19751    { (exit 1); exit 1; }; }
19752   ;;
19753 esac
19754
19755 fi
19756 ADA_OBJECTS="$withval"
19757
19758 echo "$as_me:19758: result: $ADA_OBJECTS" >&5
19759 echo "${ECHO_T}$ADA_OBJECTS" >&6
19760
19761 echo "$as_me:19761: checking if an Ada95 shared-library should be built" >&5
19762 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19763
19764 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19765 if test "${with_ada_sharedlib+set}" = set; then
19766   withval="$with_ada_sharedlib"
19767   with_ada_sharedlib=$withval
19768 else
19769   with_ada_sharedlib=no
19770 fi;
19771 echo "$as_me:19771: result: $with_ada_sharedlib" >&5
19772 echo "${ECHO_T}$with_ada_sharedlib" >&6
19773
19774 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19775 MAKE_ADA_SHAREDLIB="#"
19776
19777 if test "x$with_ada_sharedlib" != xno
19778 then
19779         MAKE_ADA_SHAREDLIB=
19780         if test "x$with_ada_sharedlib" != xyes
19781         then
19782                 ADA_SHAREDLIB="$with_ada_sharedlib"
19783         fi
19784 fi
19785
19786                 fi
19787         fi
19788 else
19789         cf_with_ada=no
19790 fi
19791
19792 ### Construct the ncurses library-subsets, if any, from this set of keywords:
19793 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
19794 ###
19795 ### ticlib modules may be a separate library, otherwise contained in termlib.
19796 ### termlib modules may be a separate library, otherwise contained in ncurses.
19797 ###
19798 ### The of "+" or " " between the tokens controls the way the script
19799 ### chooses to split module lists into libraries.
19800 ###
19801 ### (see CF_LIB_RULES).
19802 echo "$as_me:19802: checking for library subsets" >&5
19803 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
19804 LIB_SUBSETS=
19805
19806 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
19807         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
19808         if test "$with_ticlib" != no ; then
19809                 LIB_SUBSETS="${LIB_SUBSETS} "
19810         else
19811                 LIB_SUBSETS="${LIB_SUBSETS}+"
19812         fi
19813 fi
19814
19815 LIB_SUBSETS="${LIB_SUBSETS}termlib"
19816 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
19817
19818 if test "$with_termlib" != no ; then
19819         LIB_SUBSETS="${LIB_SUBSETS} "
19820 else
19821         LIB_SUBSETS="${LIB_SUBSETS}+"
19822 fi
19823
19824 LIB_SUBSETS="${LIB_SUBSETS}base"
19825
19826 # Most term-driver calls are to tinfo, but some like init_pair are to the
19827 # base library (so it resides in base).
19828 if test "$with_term_driver" != no ; then
19829         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
19830         case $cf_cv_system_name in #(vi
19831         *mingw32*) #(vi
19832                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
19833                 ;;
19834         *) #(vi
19835                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
19836                 ;;
19837         esac
19838 fi
19839
19840 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
19841 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
19842
19843 echo "$as_me:19843: result: $LIB_SUBSETS" >&5
19844 echo "${ECHO_T}$LIB_SUBSETS" >&6
19845
19846 ### Construct the list of include-directories to be generated
19847
19848 CPPFLAGS="$CPPFLAGS -I. -I../include"
19849 if test "$srcdir" != "."; then
19850         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
19851 fi
19852 if test "$GCC" != yes; then
19853         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19854 elif test "$includedir" != "/usr/include"; then
19855         if test "$includedir" = '${prefix}/include' ; then
19856                 if test $prefix != /usr ; then
19857                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19858                 fi
19859         else
19860                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
19861         fi
19862 fi
19863
19864 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
19865 if test "$srcdir" != "."; then
19866         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
19867 fi
19868 if test "$GCC" != yes; then
19869         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19870 elif test "$includedir" != "/usr/include"; then
19871         if test "$includedir" = '${prefix}/include' ; then
19872                 if test $prefix != /usr ; then
19873                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19874                 fi
19875         else
19876                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19877         fi
19878 fi
19879
19880 ### Build up pieces for makefile rules
19881 echo "$as_me:19881: checking default library suffix" >&5
19882 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
19883
19884         case $DFT_LWR_MODEL in
19885         libtool) DFT_ARG_SUFFIX=''   ;;
19886         normal)  DFT_ARG_SUFFIX=''   ;;
19887         debug)   DFT_ARG_SUFFIX='_g' ;;
19888         profile) DFT_ARG_SUFFIX='_p' ;;
19889         shared)  DFT_ARG_SUFFIX=''   ;;
19890         esac
19891         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
19892 echo "$as_me:19892: result: $DFT_ARG_SUFFIX" >&5
19893 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
19894
19895 echo "$as_me:19895: checking default library-dependency suffix" >&5
19896 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
19897
19898         case $DFT_LWR_MODEL in #(vi
19899         libtool) #(vi
19900                 DFT_LIB_SUFFIX='.la'
19901                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19902                 ;;
19903         normal) #(vi
19904                 DFT_LIB_SUFFIX='.a'
19905                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19906                 ;;
19907         debug) #(vi
19908                 DFT_LIB_SUFFIX='_g.a'
19909                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19910                 ;;
19911         profile) #(vi
19912                 DFT_LIB_SUFFIX='_p.a'
19913                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19914                 ;;
19915         shared) #(vi
19916                 case $cf_cv_system_name in
19917                 aix[5-7]*) #(vi
19918                         DFT_LIB_SUFFIX='.a'
19919                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19920                         ;;
19921                 cygwin*|mingw*) #(vi
19922                         DFT_LIB_SUFFIX='.dll'
19923                         DFT_DEP_SUFFIX='.dll.a'
19924                         ;;
19925                 darwin*) #(vi
19926                         DFT_LIB_SUFFIX='.dylib'
19927                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19928                         ;;
19929                 hpux*) #(vi
19930                         case $target in
19931                         ia64*) #(vi
19932                                 DFT_LIB_SUFFIX='.so'
19933                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19934                                 ;;
19935                         *) #(vi
19936                                 DFT_LIB_SUFFIX='.sl'
19937                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19938                                 ;;
19939                         esac
19940                         ;;
19941                 *)      DFT_LIB_SUFFIX='.so'
19942                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19943                         ;;
19944                 esac
19945         esac
19946         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19947         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19948 echo "$as_me:19948: result: $DFT_DEP_SUFFIX" >&5
19949 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19950
19951 echo "$as_me:19951: checking default object directory" >&5
19952 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19953
19954         case $DFT_LWR_MODEL in
19955         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19956         normal)  DFT_OBJ_SUBDIR='objects' ;;
19957         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19958         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19959         shared)
19960                 case $cf_cv_system_name in #(vi
19961                 cygwin) #(vi
19962                         DFT_OBJ_SUBDIR='objects' ;;
19963                 *)
19964                         DFT_OBJ_SUBDIR='obj_s' ;;
19965                 esac
19966         esac
19967 echo "$as_me:19967: result: $DFT_OBJ_SUBDIR" >&5
19968 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19969
19970 # libtool thinks it can make c++ shared libraries (perhaps only g++)
19971 if test "$cf_with_cxx" = yes ; then
19972 echo "$as_me:19972: checking c++ library-dependency suffix" >&5
19973 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
19974 if test "$with_libtool" != "no"; then
19975         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19976 else
19977
19978         case normal in #(vi
19979         libtool) #(vi
19980                 CXX_LIB_SUFFIX='.la'
19981                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19982                 ;;
19983         normal) #(vi
19984                 CXX_LIB_SUFFIX='.a'
19985                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19986                 ;;
19987         debug) #(vi
19988                 CXX_LIB_SUFFIX='_g.a'
19989                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19990                 ;;
19991         profile) #(vi
19992                 CXX_LIB_SUFFIX='_p.a'
19993                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19994                 ;;
19995         shared) #(vi
19996                 case $cf_cv_system_name in
19997                 aix[5-7]*) #(vi
19998                         CXX_LIB_SUFFIX='.a'
19999                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20000                         ;;
20001                 cygwin*|mingw*) #(vi
20002                         CXX_LIB_SUFFIX='.dll'
20003                         CXX_DEP_SUFFIX='.dll.a'
20004                         ;;
20005                 darwin*) #(vi
20006                         CXX_LIB_SUFFIX='.dylib'
20007                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20008                         ;;
20009                 hpux*) #(vi
20010                         case $target in
20011                         ia64*) #(vi
20012                                 CXX_LIB_SUFFIX='.so'
20013                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20014                                 ;;
20015                         *) #(vi
20016                                 CXX_LIB_SUFFIX='.sl'
20017                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20018                                 ;;
20019                         esac
20020                         ;;
20021                 *)      CXX_LIB_SUFFIX='.so'
20022                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20023                         ;;
20024                 esac
20025         esac
20026         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
20027         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
20028 fi
20029 echo "$as_me:20029: result: $CXX_LIB_SUFFIX" >&5
20030 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
20031
20032 fi
20033
20034 # do not want -ldl in build except as needed for -lncurses dependency
20035 if test "$with_dlsym" = yes ; then
20036 if test $DFT_LWR_MODEL = shared || \
20037    test $DFT_LWR_MODEL = libtool ; then
20038
20039 # remove dl library from $LIBS
20040 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
20041
20042 fi
20043 fi
20044 ### Set up low-level terminfo dependencies for makefiles.
20045
20046 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
20047 # do not need libdl
20048 TICS_LIST=
20049 if test "$with_dlsym" = yes ; then
20050
20051 # remove dl library from $SHLIB_LIST
20052 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
20053
20054 fi
20055
20056 if test "$with_ticlib" != no ; then
20057
20058         if test "$with_ticlib" != yes ; then
20059                 TICS_NAME=$with_ticlib
20060                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20061                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20062                 TICS_LIB_SUFFIX="${with_ticlib}"
20063         else
20064                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
20065                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
20066                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
20067         fi
20068         TICS_LDFLAGS="-L${LIB_DIR}"
20069         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
20070 else
20071         TICS_LDFLAGS="-L${LIB_DIR}"
20072         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20073 fi
20074
20075 if test "$with_termlib" != no ; then
20076
20077         if test "$with_termlib" != yes ; then
20078                 TINFO_NAME=$with_termlib
20079                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20080                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20081                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20082                 TINFO_LIB_SUFFIX="${with_termlib}"
20083         else
20084                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20085                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
20086                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
20087                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
20088         fi
20089
20090         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20091         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20092         if test "$DFT_LWR_MODEL" = "libtool"; then
20093                 TEST_ARGS="${TEST_DEPS}"
20094                 TEST_ARG2="${TEST_DEP2}"
20095                 TINFO_LDFLAGS="-L${LIB_DIR}"
20096                 TINFO_LIBS="$TEST_ARGS"
20097                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
20098                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
20099         else
20100                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
20101                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
20102                 if test "x$with_term_driver" != xno ; then
20103                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20104                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20105                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20106                 else
20107                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20108                         TINFO_LIBS="$TEST_ARGS"
20109                 fi
20110                 TINFO_LDFLAGS="-L${LIB_DIR}"
20111                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20112         fi
20113 else
20114         # the next lines are needed for linking libtic over libncurses
20115         TINFO_NAME=${LIB_NAME}
20116         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20117         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
20118         if test "$with_tic_depends" = yes ; then
20119                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20120         else
20121                 TICS_LIST="$SHLIB_LIST"
20122         fi
20123
20124         TINFO_LDFLAGS="-L${LIB_DIR}"
20125         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20126 fi
20127
20128 if test "$DFT_LWR_MODEL" = shared ; then
20129         case $cf_cv_system_name in #(vi
20130         cygwin*)
20131                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
20132                 TINFO_SUFFIX=.dll
20133                 ;;
20134         esac
20135 fi
20136
20137 if test "$with_dlsym" = yes ; then
20138
20139 # remove dl library from $TICS_LIST
20140 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
20141
20142 fi
20143
20144 if test "$DFT_LWR_MODEL" = "libtool"; then
20145     OBJEXT=lo
20146 fi
20147
20148 # needed for Ada95
20149 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
20150
20151 case $DFT_LWR_MODEL in
20152 normal|debug|profile)
20153
20154 if test "$GCC" = yes ; then
20155         case $cf_cv_system_name in #(
20156         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
20157                 LDFLAGS_STATIC=
20158                 LDFLAGS_SHARED=
20159                 ;;
20160     *)  #( normally, except when broken
20161         LDFLAGS_STATIC=-static
20162         LDFLAGS_SHARED=-dynamic
20163         ;;
20164     esac
20165 else
20166         case $cf_cv_system_name in #(
20167         aix[4-7]*)      #( from ld manpage
20168                 LDFLAGS_STATIC=-bstatic
20169                 LDFLAGS_SHARED=-bdynamic
20170                 ;;
20171         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
20172                 # We could also use just "archive" and "shared".
20173                 LDFLAGS_STATIC=-Wl,-a,archive_shared
20174                 LDFLAGS_SHARED=-Wl,-a,shared_archive
20175                 ;;
20176         irix*)          #( from ld manpage IRIX64
20177                 LDFLAGS_STATIC=-Bstatic
20178                 LDFLAGS_SHARED=-Bdynamic
20179                 ;;
20180         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
20181                 # alternative "-oldstyle_liblookup" (not in cc manpage)
20182                 LDFLAGS_STATIC=-noso
20183                 LDFLAGS_SHARED=-so_archive
20184                 ;;
20185         solaris2*)
20186                 LDFLAGS_STATIC=-Bstatic
20187                 LDFLAGS_SHARED=-Bdynamic
20188                 ;;
20189         esac
20190 fi
20191
20192 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
20193 then
20194         echo "$as_me:20194: checking if linker supports switching between static/dynamic" >&5
20195 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
20196
20197         rm -f libconftest.a
20198         cat >conftest.$ac_ext <<EOF
20199 #line 20199 "configure"
20200 #include <stdio.h>
20201 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
20202 EOF
20203         if { (eval echo "$as_me:20203: \"$ac_compile\"") >&5
20204   (eval $ac_compile) 2>&5
20205   ac_status=$?
20206   echo "$as_me:20206: \$? = $ac_status" >&5
20207   (exit $ac_status); } ; then
20208                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
20209                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
20210         fi
20211         rm -f conftest.*
20212
20213         cf_save_LIBS="$LIBS"
20214
20215         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20216         cat >conftest.$ac_ext <<_ACEOF
20217 #line 20217 "configure"
20218 #include "confdefs.h"
20219
20220 #line 20220 "configure"
20221 #include <stdio.h>
20222 int cf_ldflags_static(FILE *fp);
20223
20224 int
20225 main ()
20226 {
20227
20228         return cf_ldflags_static(stdin);
20229
20230   ;
20231   return 0;
20232 }
20233 _ACEOF
20234 rm -f conftest.$ac_objext conftest$ac_exeext
20235 if { (eval echo "$as_me:20235: \"$ac_link\"") >&5
20236   (eval $ac_link) 2>&5
20237   ac_status=$?
20238   echo "$as_me:20238: \$? = $ac_status" >&5
20239   (exit $ac_status); } &&
20240          { ac_try='test -s conftest$ac_exeext'
20241   { (eval echo "$as_me:20241: \"$ac_try\"") >&5
20242   (eval $ac_try) 2>&5
20243   ac_status=$?
20244   echo "$as_me:20244: \$? = $ac_status" >&5
20245   (exit $ac_status); }; }; then
20246
20247         # some linkers simply ignore the -dynamic
20248         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20249         *static*) # (vi
20250                 cf_ldflags_static=no
20251                 ;;
20252         *)
20253                 cf_ldflags_static=yes
20254                 ;;
20255         esac
20256
20257 else
20258   echo "$as_me: failed program was:" >&5
20259 cat conftest.$ac_ext >&5
20260 cf_ldflags_static=no
20261 fi
20262 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20263
20264         rm -f libconftest.*
20265         LIBS="$cf_save_LIBS"
20266
20267         echo "$as_me:20267: result: $cf_ldflags_static" >&5
20268 echo "${ECHO_T}$cf_ldflags_static" >&6
20269
20270         if test $cf_ldflags_static != yes
20271         then
20272                 LDFLAGS_STATIC=
20273                 LDFLAGS_SHARED=
20274         fi
20275 else
20276         LDFLAGS_STATIC=
20277         LDFLAGS_SHARED=
20278 fi
20279
20280         ;;
20281 esac
20282
20283 echo "$as_me:20283: checking where we will install curses.h" >&5
20284 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20285 test "$with_overwrite" = no && \
20286 test "x$includedir" = 'x${prefix}/include' && \
20287         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
20288 echo "$as_me:20288: result: $includedir" >&5
20289 echo "${ECHO_T}$includedir" >&6
20290
20291 ### Resolve a conflict between normal and wide-curses by forcing applications
20292 ### that will need libutf8 to add it to their configure script.
20293 if test "$with_overwrite" != no ; then
20294 if test "$NCURSES_LIBUTF8" = 1 ; then
20295         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20296         { echo "$as_me:20296: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20297 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20298 fi
20299 fi
20300 WITH_OVERWRITE=$with_overwrite
20301
20302 # used to separate tack out of the tree
20303 NCURSES_TREE=
20304
20305 ### predefined stuff for the test programs
20306 cat >>confdefs.h <<\EOF
20307 #define HAVE_SLK_COLOR 1
20308 EOF
20309
20310 ### Construct the list of subdirectories for which we'll customize makefiles
20311 ### with the appropriate compile-rules.
20312
20313 echo "$as_me:20313: checking for src modules" >&5
20314 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20315
20316 # dependencies and linker-arguments for test-programs
20317 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20318 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20319 if test "$DFT_LWR_MODEL" = "libtool"; then
20320         TEST_ARGS="${TEST_DEPS}"
20321         TEST_ARG2="${TEST_DEP2}"
20322 else
20323         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20324         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20325 fi
20326
20327 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20328 cf_cv_src_modules=
20329 for cf_dir in $modules_to_build
20330 do
20331         if test -f $srcdir/$cf_dir/modules; then
20332
20333                 # We may/may not have tack in the distribution, though the
20334                 # makefile is.
20335                 if test $cf_dir = tack ; then
20336                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20337                                 continue
20338                         fi
20339                 fi
20340
20341                 if test -z "$cf_cv_src_modules"; then
20342                         cf_cv_src_modules=$cf_dir
20343                 else
20344                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20345                 fi
20346
20347                 # Make the ncurses_cfg.h file record the library interface files as
20348                 # well.  These are header files that are the same name as their
20349                 # directory.  Ncurses is the only library that does not follow
20350                 # that pattern.
20351                 if test $cf_dir = tack ; then
20352                         continue
20353                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20354
20355 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20356
20357                         cat >>confdefs.h <<EOF
20358 #define HAVE_${cf_have_include}_H 1
20359 EOF
20360
20361                         cat >>confdefs.h <<EOF
20362 #define HAVE_LIB${cf_have_include} 1
20363 EOF
20364
20365                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20366                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20367                         if test "$DFT_LWR_MODEL" = "libtool"; then
20368                                 TEST_ARGS="${TEST_DEPS}"
20369                                 TEST_ARG2="${TEST_DEP2}"
20370                         else
20371                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20372                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20373                         fi
20374                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20375                 fi
20376         fi
20377 done
20378 echo "$as_me:20378: result: $cf_cv_src_modules" >&5
20379 echo "${ECHO_T}$cf_cv_src_modules" >&6
20380
20381 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20382 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20383
20384 SRC_SUBDIRS=
20385 if test "x$cf_with_manpages" != xno ; then
20386         SRC_SUBDIRS="$SRC_SUBDIRS man"
20387 fi
20388 SRC_SUBDIRS="$SRC_SUBDIRS include"
20389 for cf_dir in $cf_cv_src_modules
20390 do
20391         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20392 done
20393 if test "x$cf_with_tests" != "xno" ; then
20394         SRC_SUBDIRS="$SRC_SUBDIRS test"
20395 fi
20396 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20397 if test "$cf_with_cxx_binding" != no; then
20398         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20399         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20400 fi
20401
20402 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20403 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20404
20405 ADA_SUBDIRS=
20406 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20407         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20408         ADA_SUBDIRS="gen src"
20409         if test "x$cf_with_tests" != "xno" ; then
20410                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20411         fi
20412 fi
20413
20414 SUB_MAKEFILES=
20415 for cf_dir in $SRC_SUBDIRS
20416 do
20417         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20418 done
20419
20420 if test -n "$ADA_SUBDIRS"; then
20421         for cf_dir in $ADA_SUBDIRS
20422         do
20423                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20424         done
20425
20426 fi
20427
20428 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20429    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20430    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20431 fi
20432
20433 DIRS_TO_MAKE="lib"
20434 for cf_item in $cf_list_models
20435 do
20436
20437         case $cf_item in
20438         libtool) cf_subdir='obj_lo'  ;;
20439         normal)  cf_subdir='objects' ;;
20440         debug)   cf_subdir='obj_g' ;;
20441         profile) cf_subdir='obj_p' ;;
20442         shared)
20443                 case $cf_cv_system_name in #(vi
20444                 cygwin) #(vi
20445                         cf_subdir='objects' ;;
20446                 *)
20447                         cf_subdir='obj_s' ;;
20448                 esac
20449         esac
20450
20451         for cf_item2 in $DIRS_TO_MAKE
20452         do
20453                 test $cf_item2 = $cf_subdir && break
20454         done
20455         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20456 done
20457 for cf_dir in $DIRS_TO_MAKE
20458 do
20459         test ! -d $cf_dir && mkdir $cf_dir
20460 done
20461
20462 # symbols that differ when compiling Ada95 by itself.
20463 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20464
20465 # values to use as strings
20466 cat >>confdefs.h <<EOF
20467 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20468 EOF
20469
20470 cat >>confdefs.h <<EOF
20471 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20472 EOF
20473
20474 ### Now that we're done running tests, add the compiler-warnings, if any
20475
20476 cf_fix_cppflags=no
20477 cf_new_cflags=
20478 cf_new_cppflags=
20479 cf_new_extra_cppflags=
20480
20481 for cf_add_cflags in $EXTRA_CFLAGS
20482 do
20483 case $cf_fix_cppflags in
20484 no)
20485         case $cf_add_cflags in #(vi
20486         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20487                 case $cf_add_cflags in
20488                 -D*)
20489                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20490
20491                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20492                                 && test -z "${cf_tst_cflags}" \
20493                                 && cf_fix_cppflags=yes
20494
20495                         if test $cf_fix_cppflags = yes ; then
20496                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20497                                 continue
20498                         elif test "${cf_tst_cflags}" = "\"'" ; then
20499                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20500                                 continue
20501                         fi
20502                         ;;
20503                 esac
20504                 case "$CPPFLAGS" in
20505                 *$cf_add_cflags) #(vi
20506                         ;;
20507                 *) #(vi
20508                         case $cf_add_cflags in #(vi
20509                         -D*)
20510                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20511
20512 CPPFLAGS=`echo "$CPPFLAGS" | \
20513         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20514                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20515
20516                                 ;;
20517                         esac
20518                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20519                         ;;
20520                 esac
20521                 ;;
20522         *)
20523                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20524                 ;;
20525         esac
20526         ;;
20527 yes)
20528         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20529
20530         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20531
20532         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20533                 && test -z "${cf_tst_cflags}" \
20534                 && cf_fix_cppflags=no
20535         ;;
20536 esac
20537 done
20538
20539 if test -n "$cf_new_cflags" ; then
20540
20541         CFLAGS="$CFLAGS $cf_new_cflags"
20542 fi
20543
20544 if test -n "$cf_new_cppflags" ; then
20545
20546         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20547 fi
20548
20549 if test -n "$cf_new_extra_cppflags" ; then
20550
20551         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20552 fi
20553
20554 ### Define substitutions for header files to avoid name-pollution
20555
20556 if test "$cf_cv_have_tcgetattr" = yes ; then
20557         HAVE_TCGETATTR=1
20558 else
20559         HAVE_TCGETATTR=0
20560 fi
20561
20562 if test "$ac_cv_header_termio_h" = yes ; then
20563         HAVE_TERMIO_H=1
20564 else
20565         HAVE_TERMIO_H=0
20566 fi
20567
20568 if test "$ac_cv_header_termios_h" = yes ; then
20569         HAVE_TERMIOS_H=1
20570 else
20571         HAVE_TERMIOS_H=0
20572 fi
20573
20574 ################################################################################
20575 test "$use_database" = yes && \
20576 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20577
20578 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20579 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20580
20581 if test x"$enable_pc_files" = xyes ; then \
20582 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20583 MAKE_PC_FILES=
20584 else
20585 MAKE_PC_FILES="#"
20586 fi
20587
20588 # Extract the first word of "tic", so it can be a program name with args.
20589 set dummy tic; ac_word=$2
20590 echo "$as_me:20590: checking for $ac_word" >&5
20591 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20592 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20593   echo $ECHO_N "(cached) $ECHO_C" >&6
20594 else
20595   case $TIC_PATH in
20596   [\\/]* | ?:[\\/]*)
20597   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20598   ;;
20599   *)
20600   ac_save_IFS=$IFS; IFS=$ac_path_separator
20601 ac_dummy="$PATH:/usr/local/ncurses/bin"
20602 for ac_dir in $ac_dummy; do
20603   IFS=$ac_save_IFS
20604   test -z "$ac_dir" && ac_dir=.
20605   if $as_executable_p "$ac_dir/$ac_word"; then
20606    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20607    echo "$as_me:20607: found $ac_dir/$ac_word" >&5
20608    break
20609 fi
20610 done
20611
20612   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20613   ;;
20614 esac
20615 fi
20616 TIC_PATH=$ac_cv_path_TIC_PATH
20617
20618 if test -n "$TIC_PATH"; then
20619   echo "$as_me:20619: result: $TIC_PATH" >&5
20620 echo "${ECHO_T}$TIC_PATH" >&6
20621 else
20622   echo "$as_me:20622: result: no" >&5
20623 echo "${ECHO_T}no" >&6
20624 fi
20625
20626 if test -n "$FALLBACK_LIST"
20627 then
20628         if test "$TIC_PATH" = unknown
20629         then
20630                 { echo "$as_me:20630: WARNING: no tic program found for fallbacks" >&5
20631 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20632         fi
20633 fi
20634
20635 if test "x$cf_with_tests" != xno ; then
20636         MAKE_TESTS=
20637 else
20638         MAKE_TESTS="#"
20639 fi
20640
20641 ADAHTML_DIR=../../doc/html/ada
20642
20643 SUB_SCRIPTS=
20644
20645 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_SCRIPTS $SUB_MAKEFILES Makefile"
20646 ac_config_commands="$ac_config_commands default"
20647 cat >confcache <<\_ACEOF
20648 # This file is a shell script that caches the results of configure
20649 # tests run on this system so they can be shared between configure
20650 # scripts and configure runs, see configure's option --config-cache.
20651 # It is not useful on other systems.  If it contains results you don't
20652 # want to keep, you may remove or edit it.
20653 #
20654 # config.status only pays attention to the cache file if you give it
20655 # the --recheck option to rerun configure.
20656 #
20657 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20658 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20659 # following values.
20660
20661 _ACEOF
20662
20663 # The following way of writing the cache mishandles newlines in values,
20664 # but we know of no workaround that is simple, portable, and efficient.
20665 # So, don't put newlines in cache variables' values.
20666 # Ultrix sh set writes to stderr and can't be redirected directly,
20667 # and sets the high bit in the cache file unless we assign to the vars.
20668 {
20669   (set) 2>&1 |
20670     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20671     *ac_space=\ *)
20672       # `set' does not quote correctly, so add quotes (double-quote
20673       # substitution turns \\\\ into \\, and sed turns \\ into \).
20674       sed -n \
20675         "s/'/'\\\\''/g;
20676           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20677       ;;
20678     *)
20679       # `set' quotes correctly as required by POSIX, so do not add quotes.
20680       sed -n \
20681         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20682       ;;
20683     esac;
20684 } |
20685   sed '
20686      t clear
20687      : clear
20688      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20689      t end
20690      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20691      : end' >>confcache
20692 if cmp -s $cache_file confcache; then :; else
20693   if test -w $cache_file; then
20694     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20695     cat confcache >$cache_file
20696   else
20697     echo "not updating unwritable cache $cache_file"
20698   fi
20699 fi
20700 rm -f confcache
20701
20702 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20703 # Let make expand exec_prefix.
20704 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20705
20706 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20707 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20708 # trailing colons and then remove the whole line if VPATH becomes empty
20709 # (actually we leave an empty line to preserve line numbers).
20710 if test "x$srcdir" = x.; then
20711   ac_vpsub='/^[         ]*VPATH[        ]*=/{
20712 s/:*\$(srcdir):*/:/;
20713 s/:*\${srcdir}:*/:/;
20714 s/:*@srcdir@:*/:/;
20715 s/^\([^=]*=[    ]*\):*/\1/;
20716 s/:*$//;
20717 s/^[^=]*=[      ]*$//;
20718 }'
20719 fi
20720
20721 DEFS=-DHAVE_CONFIG_H
20722
20723 : ${CONFIG_STATUS=./config.status}
20724 ac_clean_files_save=$ac_clean_files
20725 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20726 { echo "$as_me:20726: creating $CONFIG_STATUS" >&5
20727 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20728 cat >$CONFIG_STATUS <<_ACEOF
20729 #! $SHELL
20730 # Generated automatically by configure.
20731 # Run this file to recreate the current configuration.
20732 # Compiler output produced by configure, useful for debugging
20733 # configure, is in config.log if it exists.
20734
20735 debug=false
20736 SHELL=\${CONFIG_SHELL-$SHELL}
20737 ac_cs_invocation="\$0 \$@"
20738
20739 _ACEOF
20740
20741 cat >>$CONFIG_STATUS <<\_ACEOF
20742 # Be Bourne compatible
20743 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20744   emulate sh
20745   NULLCMD=:
20746 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20747   set -o posix
20748 fi
20749
20750 # Name of the executable.
20751 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20752
20753 if expr a : '\(a\)' >/dev/null 2>&1; then
20754   as_expr=expr
20755 else
20756   as_expr=false
20757 fi
20758
20759 rm -f conf$$ conf$$.exe conf$$.file
20760 echo >conf$$.file
20761 if ln -s conf$$.file conf$$ 2>/dev/null; then
20762   # We could just check for DJGPP; but this test a) works b) is more generic
20763   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20764   if test -f conf$$.exe; then
20765     # Don't use ln at all; we don't have any links
20766     as_ln_s='cp -p'
20767   else
20768     as_ln_s='ln -s'
20769   fi
20770 elif ln conf$$.file conf$$ 2>/dev/null; then
20771   as_ln_s=ln
20772 else
20773   as_ln_s='cp -p'
20774 fi
20775 rm -f conf$$ conf$$.exe conf$$.file
20776
20777 as_executable_p="test -f"
20778
20779 # Support unset when possible.
20780 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20781   as_unset=unset
20782 else
20783   as_unset=false
20784 fi
20785
20786 # NLS nuisances.
20787 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20788 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20789 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20790 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20791 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20792 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20793 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20794 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20795
20796 # IFS
20797 # We need space, tab and new line, in precisely that order.
20798 as_nl='
20799 '
20800 IFS="   $as_nl"
20801
20802 # CDPATH.
20803 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20804
20805 exec 6>&1
20806
20807 _ACEOF
20808
20809 # Files that config.status was made for.
20810 if test -n "$ac_config_files"; then
20811   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20812 fi
20813
20814 if test -n "$ac_config_headers"; then
20815   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20816 fi
20817
20818 if test -n "$ac_config_links"; then
20819   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20820 fi
20821
20822 if test -n "$ac_config_commands"; then
20823   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20824 fi
20825
20826 cat >>$CONFIG_STATUS <<\EOF
20827
20828 ac_cs_usage="\
20829 \`$as_me' instantiates files from templates according to the
20830 current configuration.
20831
20832 Usage: $0 [OPTIONS] [FILE]...
20833
20834   -h, --help       print this help, then exit
20835   -V, --version    print version number, then exit
20836   -d, --debug      don't remove temporary files
20837       --recheck    update $as_me by reconfiguring in the same conditions
20838   --file=FILE[:TEMPLATE]
20839                    instantiate the configuration file FILE
20840   --header=FILE[:TEMPLATE]
20841                    instantiate the configuration header FILE
20842
20843 Configuration files:
20844 $config_files
20845
20846 Configuration headers:
20847 $config_headers
20848
20849 Configuration commands:
20850 $config_commands
20851
20852 Report bugs to <dickey@invisible-island.net>."
20853 EOF
20854
20855 cat >>$CONFIG_STATUS <<EOF
20856 ac_cs_version="\\
20857 config.status
20858 configured by $0, generated by GNU Autoconf 2.52.20120310,
20859   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20860
20861 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20862 Free Software Foundation, Inc.
20863 This config.status script is free software; the Free Software Foundation
20864 gives unlimited permission to copy, distribute and modify it."
20865 srcdir=$srcdir
20866 INSTALL="$INSTALL"
20867 EOF
20868
20869 cat >>$CONFIG_STATUS <<\EOF
20870 # If no file are specified by the user, then we need to provide default
20871 # value.  By we need to know if files were specified by the user.
20872 ac_need_defaults=:
20873 while test $# != 0
20874 do
20875   case $1 in
20876   --*=*)
20877     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20878     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20879     shift
20880     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20881     shift
20882     ;;
20883   -*);;
20884   *) # This is not an option, so the user has probably given explicit
20885      # arguments.
20886      ac_need_defaults=false;;
20887   esac
20888
20889   case $1 in
20890   # Handling of the options.
20891 EOF
20892 cat >>$CONFIG_STATUS <<EOF
20893   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20894     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20895     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20896 EOF
20897 cat >>$CONFIG_STATUS <<\EOF
20898   --version | --vers* | -V )
20899     echo "$ac_cs_version"; exit 0 ;;
20900   --he | --h)
20901     # Conflict between --help and --header
20902     { { echo "$as_me:20902: error: ambiguous option: $1
20903 Try \`$0 --help' for more information." >&5
20904 echo "$as_me: error: ambiguous option: $1
20905 Try \`$0 --help' for more information." >&2;}
20906    { (exit 1); exit 1; }; };;
20907   --help | --hel | -h )
20908     echo "$ac_cs_usage"; exit 0 ;;
20909   --debug | --d* | -d )
20910     debug=: ;;
20911   --file | --fil | --fi | --f )
20912     shift
20913     CONFIG_FILES="$CONFIG_FILES $1"
20914     ac_need_defaults=false;;
20915   --header | --heade | --head | --hea )
20916     shift
20917     CONFIG_HEADERS="$CONFIG_HEADERS $1"
20918     ac_need_defaults=false;;
20919
20920   # This is an error.
20921   -*) { { echo "$as_me:20921: error: unrecognized option: $1
20922 Try \`$0 --help' for more information." >&5
20923 echo "$as_me: error: unrecognized option: $1
20924 Try \`$0 --help' for more information." >&2;}
20925    { (exit 1); exit 1; }; } ;;
20926
20927   *) ac_config_targets="$ac_config_targets $1" ;;
20928
20929   esac
20930   shift
20931 done
20932
20933 exec 5>>config.log
20934 cat >&5 << _ACEOF
20935
20936 ## ----------------------- ##
20937 ## Running config.status.  ##
20938 ## ----------------------- ##
20939
20940 This file was extended by $as_me 2.52.20120310, executed with
20941   CONFIG_FILES    = $CONFIG_FILES
20942   CONFIG_HEADERS  = $CONFIG_HEADERS
20943   CONFIG_LINKS    = $CONFIG_LINKS
20944   CONFIG_COMMANDS = $CONFIG_COMMANDS
20945   > $ac_cs_invocation
20946 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20947
20948 _ACEOF
20949 EOF
20950
20951 cat >>$CONFIG_STATUS <<EOF
20952 #
20953 # INIT-COMMANDS section.
20954 #
20955
20956 ### Special initialization commands, used to pass information from the
20957 ### configuration-run into config.status
20958
20959 AWK="$AWK"
20960 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20961 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20962 ECHO_LD="$ECHO_LD"
20963 LDCONFIG="$LDCONFIG"
20964 LIBTOOL_VERSION="$LIBTOOL_VERSION"
20965 LIB_NAME="$LIB_NAME"
20966 LIB_PREFIX="$LIB_PREFIX"
20967 LIB_SUBSETS="$LIB_SUBSETS"
20968 LIB_SUFFIX="$LIB_SUFFIX"
20969 LIB_TRACING="$LIB_TRACING"
20970 LN_S="$LN_S"
20971 MAKE_TERMINFO="$MAKE_TERMINFO"
20972 NCURSES_MAJOR="$NCURSES_MAJOR"
20973 NCURSES_MINOR="$NCURSES_MINOR"
20974 NCURSES_OSPEED="$NCURSES_OSPEED"
20975 NCURSES_PATCH="$NCURSES_PATCH"
20976 SRC_SUBDIRS="$SRC_SUBDIRS"
20977 TERMINFO="$TERMINFO"
20978 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
20979 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
20980 TICS_NAME="$TICS_NAME"
20981 TIC_PATH="$TIC_PATH"
20982 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
20983 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
20984 TINFO_NAME="$TINFO_NAME"
20985 TINFO_SUFFIX="$TINFO_SUFFIX"
20986 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20987 WITH_CURSES_H="$with_curses_h"
20988 WITH_ECHO="$with_echo"
20989 WITH_OVERWRITE="$with_overwrite"
20990 cf_LIST_MODELS="$cf_list_models"
20991 cf_cv_abi_version="$cf_cv_abi_version"
20992 cf_cv_do_relink="$cf_cv_do_relink"
20993 cf_cv_do_symlinks="$cf_cv_do_symlinks"
20994 cf_cv_enable_lp64="$cf_cv_enable_lp64"
20995 cf_cv_enable_opaque="$cf_cv_enable_opaque"
20996 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
20997 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
20998 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
20999 cf_cv_rel_version="$cf_cv_rel_version"
21000 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
21001 cf_cv_shared_soname='$cf_cv_shared_soname'
21002 cf_cv_shlib_version="$cf_cv_shlib_version"
21003 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
21004 cf_cv_system_name="$cf_cv_system_name"
21005 cf_cv_term_driver="$with_term_driver"
21006 cf_with_ada="$cf_with_ada"
21007 cf_with_cxx_binding="$cf_with_cxx_binding"
21008 cf_with_manpages="$cf_with_manpages"
21009 cf_with_tests="$cf_with_tests"
21010 host="$host"
21011 target="$target"
21012
21013 EOF
21014
21015 cat >>$CONFIG_STATUS <<\EOF
21016 for ac_config_target in $ac_config_targets
21017 do
21018   case "$ac_config_target" in
21019   # Handling of arguments.
21020   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
21021   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
21022   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
21023   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
21024   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
21025   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
21026   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
21027   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21028   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21029   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
21030   *) { { echo "$as_me:21030: error: invalid argument: $ac_config_target" >&5
21031 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21032    { (exit 1); exit 1; }; };;
21033   esac
21034 done
21035
21036 # If the user did not use the arguments to specify the items to instantiate,
21037 # then the envvar interface is used.  Set only those that are not.
21038 # We use the long form for the default assignment because of an extremely
21039 # bizarre bug on SunOS 4.1.3.
21040 if $ac_need_defaults; then
21041   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21042   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21043   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21044 fi
21045
21046 # Create a temporary directory, and hook for its removal unless debugging.
21047 $debug ||
21048 {
21049   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21050   trap '{ (exit 1); exit 1; }' 1 2 13 15
21051 }
21052
21053 # Create a (secure) tmp directory for tmp files.
21054 : ${TMPDIR=/tmp}
21055 {
21056   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
21057   test -n "$tmp" && test -d "$tmp"
21058 }  ||
21059 {
21060   tmp=$TMPDIR/cs$$-$RANDOM
21061   (umask 077 && mkdir $tmp)
21062 } ||
21063 {
21064    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
21065    { (exit 1); exit 1; }
21066 }
21067
21068 EOF
21069
21070 cat >>$CONFIG_STATUS <<EOF
21071
21072 #
21073 # CONFIG_FILES section.
21074 #
21075
21076 # No need to generate the scripts if there are no CONFIG_FILES.
21077 # This happens for instance when ./config.status config.h
21078 if test -n "\$CONFIG_FILES"; then
21079   # Protect against being on the right side of a sed subst in config.status.
21080   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21081    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21082 s,@SHELL@,$SHELL,;t t
21083 s,@exec_prefix@,$exec_prefix,;t t
21084 s,@prefix@,$prefix,;t t
21085 s,@program_transform_name@,$program_transform_name,;t t
21086 s,@bindir@,$bindir,;t t
21087 s,@sbindir@,$sbindir,;t t
21088 s,@libexecdir@,$libexecdir,;t t
21089 s,@datadir@,$datadir,;t t
21090 s,@sysconfdir@,$sysconfdir,;t t
21091 s,@sharedstatedir@,$sharedstatedir,;t t
21092 s,@localstatedir@,$localstatedir,;t t
21093 s,@libdir@,$libdir,;t t
21094 s,@includedir@,$includedir,;t t
21095 s,@oldincludedir@,$oldincludedir,;t t
21096 s,@infodir@,$infodir,;t t
21097 s,@mandir@,$mandir,;t t
21098 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21099 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21100 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21101 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21102 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21103 s,@build_alias@,$build_alias,;t t
21104 s,@host_alias@,$host_alias,;t t
21105 s,@target_alias@,$target_alias,;t t
21106 s,@ECHO_C@,$ECHO_C,;t t
21107 s,@ECHO_N@,$ECHO_N,;t t
21108 s,@ECHO_T@,$ECHO_T,;t t
21109 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21110 s,@DEFS@,$DEFS,;t t
21111 s,@LIBS@,$LIBS,;t t
21112 s,@top_builddir@,$top_builddir,;t t
21113 s,@EGREP@,$EGREP,;t t
21114 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
21115 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
21116 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
21117 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21118 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21119 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
21120 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
21121 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
21122 s,@build@,$build,;t t
21123 s,@build_cpu@,$build_cpu,;t t
21124 s,@build_vendor@,$build_vendor,;t t
21125 s,@build_os@,$build_os,;t t
21126 s,@host@,$host,;t t
21127 s,@host_cpu@,$host_cpu,;t t
21128 s,@host_vendor@,$host_vendor,;t t
21129 s,@host_os@,$host_os,;t t
21130 s,@target@,$target,;t t
21131 s,@target_cpu@,$target_cpu,;t t
21132 s,@target_vendor@,$target_vendor,;t t
21133 s,@target_os@,$target_os,;t t
21134 s,@CC@,$CC,;t t
21135 s,@CFLAGS@,$CFLAGS,;t t
21136 s,@LDFLAGS@,$LDFLAGS,;t t
21137 s,@CPPFLAGS@,$CPPFLAGS,;t t
21138 s,@ac_ct_CC@,$ac_ct_CC,;t t
21139 s,@EXEEXT@,$EXEEXT,;t t
21140 s,@OBJEXT@,$OBJEXT,;t t
21141 s,@CPP@,$CPP,;t t
21142 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21143 s,@PROG_EXT@,$PROG_EXT,;t t
21144 s,@LDCONFIG@,$LDCONFIG,;t t
21145 s,@CXX@,$CXX,;t t
21146 s,@CXXFLAGS@,$CXXFLAGS,;t t
21147 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
21148 s,@AWK@,$AWK,;t t
21149 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21150 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21151 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21152 s,@LINT@,$LINT,;t t
21153 s,@LINT_OPTS@,$LINT_OPTS,;t t
21154 s,@LN_S@,$LN_S,;t t
21155 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21156 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21157 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
21158 s,@SET_MAKE@,$SET_MAKE,;t t
21159 s,@CTAGS@,$CTAGS,;t t
21160 s,@ETAGS@,$ETAGS,;t t
21161 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21162 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21163 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
21164 s,@RANLIB@,$RANLIB,;t t
21165 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21166 s,@LD@,$LD,;t t
21167 s,@ac_ct_LD@,$ac_ct_LD,;t t
21168 s,@AR@,$AR,;t t
21169 s,@ac_ct_AR@,$ac_ct_AR,;t t
21170 s,@ARFLAGS@,$ARFLAGS,;t t
21171 s,@DESTDIR@,$DESTDIR,;t t
21172 s,@BUILD_CC@,$BUILD_CC,;t t
21173 s,@BUILD_CPP@,$BUILD_CPP,;t t
21174 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
21175 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
21176 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
21177 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
21178 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
21179 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
21180 s,@cf_list_models@,$cf_list_models,;t t
21181 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
21182 s,@LIBTOOL@,$LIBTOOL,;t t
21183 s,@LT_UNDEF@,$LT_UNDEF,;t t
21184 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
21185 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21186 s,@LIB_CREATE@,$LIB_CREATE,;t t
21187 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
21188 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
21189 s,@LIB_PREP@,$LIB_PREP,;t t
21190 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21191 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21192 s,@LIB_LINK@,$LIB_LINK,;t t
21193 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
21194 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
21195 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
21196 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21197 s,@TICS_NAME@,$TICS_NAME,;t t
21198 s,@TINFO_NAME@,$TINFO_NAME,;t t
21199 s,@LIB_NAME@,$LIB_NAME,;t t
21200 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
21201 s,@CC_G_OPT@,$CC_G_OPT,;t t
21202 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
21203 s,@LD_MODEL@,$LD_MODEL,;t t
21204 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21205 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
21206 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21207 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
21208 s,@LINK_PROGS@,$LINK_PROGS,;t t
21209 s,@LINK_TESTS@,$LINK_TESTS,;t t
21210 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21211 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21212 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21213 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21214 s,@RPATH_LIST@,$RPATH_LIST,;t t
21215 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21216 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21217 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21218 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21219 s,@XTERM_KBS@,$XTERM_KBS,;t t
21220 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21221 s,@TERMINFO@,$TERMINFO,;t t
21222 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21223 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21224 s,@TERMPATH@,$TERMPATH,;t t
21225 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21226 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21227 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21228 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21229 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21230 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21231 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21232 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21233 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21234 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21235 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21236 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21237 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21238 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21239 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21240 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
21241 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21242 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21243 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21244 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21245 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21246 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21247 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21248 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21249 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21250 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21251 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21252 s,@PTHREAD@,$PTHREAD,;t t
21253 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21254 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21255 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21256 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21257 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21258 s,@ECHO_LT@,$ECHO_LT,;t t
21259 s,@ECHO_LD@,$ECHO_LD,;t t
21260 s,@RULE_CC@,$RULE_CC,;t t
21261 s,@SHOW_CC@,$SHOW_CC,;t t
21262 s,@ECHO_CC@,$ECHO_CC,;t t
21263 s,@ECHO_LINK@,$ECHO_LINK,;t t
21264 s,@ADAFLAGS@,$ADAFLAGS,;t t
21265 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21266 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21267 s,@ADA_TRACE@,$ADA_TRACE,;t t
21268 s,@MATH_LIB@,$MATH_LIB,;t t
21269 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21270 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21271 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21272 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21273 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21274 s,@TEST_LIBS@,$TEST_LIBS,;t t
21275 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21276 s,@CXXCPP@,$CXXCPP,;t t
21277 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21278 s,@CXX_AR@,$CXX_AR,;t t
21279 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21280 s,@CXXLIBS@,$CXXLIBS,;t t
21281 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21282 s,@gnat_exists@,$gnat_exists,;t t
21283 s,@M4_exists@,$M4_exists,;t t
21284 s,@cf_ada_make@,$cf_ada_make,;t t
21285 s,@cf_compile_generics@,$cf_compile_generics,;t t
21286 s,@cf_generic_objects@,$cf_generic_objects,;t t
21287 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21288 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21289 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21290 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21291 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21292 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21293 s,@cf_ada_package@,$cf_ada_package,;t t
21294 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21295 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21296 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21297 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21298 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21299 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21300 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21301 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21302 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21303 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21304 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21305 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21306 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21307 s,@TICS_LIBS@,$TICS_LIBS,;t t
21308 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21309 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21310 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21311 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21312 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21313 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21314 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21315 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21316 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21317 s,@TICS_LIST@,$TICS_LIST,;t t
21318 s,@TINFO_LIST@,$TINFO_LIST,;t t
21319 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21320 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21321 s,@TEST_ARGS@,$TEST_ARGS,;t t
21322 s,@TEST_DEPS@,$TEST_DEPS,;t t
21323 s,@TEST_ARG2@,$TEST_ARG2,;t t
21324 s,@TEST_DEP2@,$TEST_DEP2,;t t
21325 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21326 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21327 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21328 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21329 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21330 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21331 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21332 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21333 s,@cross_compiling@,$cross_compiling,;t t
21334 s,@TIC_PATH@,$TIC_PATH,;t t
21335 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21336 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21337 CEOF
21338
21339 EOF
21340
21341   cat >>$CONFIG_STATUS <<\EOF
21342   # Split the substitutions into bite-sized pieces for seds with
21343   # small command number limits, like on Digital OSF/1 and HP-UX.
21344   ac_max_sed_lines=48
21345   ac_sed_frag=1 # Number of current file.
21346   ac_beg=1 # First line for current file.
21347   ac_end=$ac_max_sed_lines # Line after last line for current file.
21348   ac_more_lines=:
21349   ac_sed_cmds=
21350   while $ac_more_lines; do
21351     if test $ac_beg -gt 1; then
21352       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21353     else
21354       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21355     fi
21356     if test ! -s $tmp/subs.frag; then
21357       ac_more_lines=false
21358     else
21359       # The purpose of the label and of the branching condition is to
21360       # speed up the sed processing (if there are no `@' at all, there
21361       # is no need to browse any of the substitutions).
21362       # These are the two extra sed commands mentioned above.
21363       (echo ':t
21364   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21365       if test -z "$ac_sed_cmds"; then
21366         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21367       else
21368         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21369       fi
21370       ac_sed_frag=`expr $ac_sed_frag + 1`
21371       ac_beg=$ac_end
21372       ac_end=`expr $ac_end + $ac_max_sed_lines`
21373     fi
21374   done
21375   if test -z "$ac_sed_cmds"; then
21376     ac_sed_cmds=cat
21377   fi
21378 fi # test -n "$CONFIG_FILES"
21379
21380 EOF
21381 cat >>$CONFIG_STATUS <<\EOF
21382 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21383   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21384   case $ac_file in
21385   - | *:- | *:-:* ) # input from stdin
21386         cat >$tmp/stdin
21387         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21388         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21389   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21390         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21391   * )   ac_file_in=$ac_file.in ;;
21392   esac
21393
21394   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21395   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21396          X"$ac_file" : 'X\(//\)[^/]' \| \
21397          X"$ac_file" : 'X\(//\)$' \| \
21398          X"$ac_file" : 'X\(/\)' \| \
21399          .     : '\(.\)' 2>/dev/null ||
21400 echo X"$ac_file" |
21401     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21402           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21403           /^X\(\/\/\)$/{ s//\1/; q; }
21404           /^X\(\/\).*/{ s//\1/; q; }
21405           s/.*/./; q'`
21406   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21407     { case "$ac_dir" in
21408   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21409   *)                      as_incr_dir=.;;
21410 esac
21411 as_dummy="$ac_dir"
21412 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21413   case $as_mkdir_dir in
21414     # Skip DOS drivespec
21415     ?:) as_incr_dir=$as_mkdir_dir ;;
21416     *)
21417       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21418       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21419     ;;
21420   esac
21421 done; }
21422
21423     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21424     # A "../" for each directory in $ac_dir_suffix.
21425     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21426   else
21427     ac_dir_suffix= ac_dots=
21428   fi
21429
21430   case $srcdir in
21431   .)  ac_srcdir=.
21432       if test -z "$ac_dots"; then
21433          ac_top_srcdir=.
21434       else
21435          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21436       fi ;;
21437   [\\/]* | ?:[\\/]* )
21438       ac_srcdir=$srcdir$ac_dir_suffix;
21439       ac_top_srcdir=$srcdir ;;
21440   *) # Relative path.
21441     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21442     ac_top_srcdir=$ac_dots$srcdir ;;
21443   esac
21444
21445   case $INSTALL in
21446   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21447   *) ac_INSTALL=$ac_dots$INSTALL ;;
21448   esac
21449
21450   if test x"$ac_file" != x-; then
21451     { echo "$as_me:21451: creating $ac_file" >&5
21452 echo "$as_me: creating $ac_file" >&6;}
21453     rm -f "$ac_file"
21454   fi
21455   # Let's still pretend it is `configure' which instantiates (i.e., don't
21456   # use $as_me), people would be surprised to read:
21457   #    /* config.h.  Generated automatically by config.status.  */
21458   configure_input="Generated automatically from `echo $ac_file_in |
21459                                                  sed 's,.*/,,'` by configure."
21460
21461   # First look for the input files in the build tree, otherwise in the
21462   # src tree.
21463   ac_file_inputs=`IFS=:
21464     for f in $ac_file_in; do
21465       case $f in
21466       -) echo $tmp/stdin ;;
21467       [\\/$]*)
21468          # Absolute (can't be DOS-style, as IFS=:)
21469          test -f "$f" || { { echo "$as_me:21469: error: cannot find input file: $f" >&5
21470 echo "$as_me: error: cannot find input file: $f" >&2;}
21471    { (exit 1); exit 1; }; }
21472          echo $f;;
21473       *) # Relative
21474          if test -f "$f"; then
21475            # Build tree
21476            echo $f
21477          elif test -f "$srcdir/$f"; then
21478            # Source tree
21479            echo $srcdir/$f
21480          else
21481            # /dev/null tree
21482            { { echo "$as_me:21482: error: cannot find input file: $f" >&5
21483 echo "$as_me: error: cannot find input file: $f" >&2;}
21484    { (exit 1); exit 1; }; }
21485          fi;;
21486       esac
21487     done` || { (exit 1); exit 1; }
21488 EOF
21489 cat >>$CONFIG_STATUS <<EOF
21490   sed "$ac_vpsub
21491 $extrasub
21492 EOF
21493 cat >>$CONFIG_STATUS <<\EOF
21494 :t
21495 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21496 s,@configure_input@,$configure_input,;t t
21497 s,@srcdir@,$ac_srcdir,;t t
21498 s,@top_srcdir@,$ac_top_srcdir,;t t
21499 s,@INSTALL@,$ac_INSTALL,;t t
21500 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21501   rm -f $tmp/stdin
21502   if test x"$ac_file" != x-; then
21503     mv $tmp/out $ac_file
21504   else
21505     cat $tmp/out
21506     rm -f $tmp/out
21507   fi
21508
21509 done
21510 EOF
21511 cat >>$CONFIG_STATUS <<\EOF
21512
21513 #
21514 # CONFIG_HEADER section.
21515 #
21516
21517 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21518 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21519 #
21520 # ac_d sets the value in "#define NAME VALUE" lines.
21521 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21522 ac_dB='[        ].*$,\1#\2'
21523 ac_dC=' '
21524 ac_dD=',;t'
21525 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21526 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21527 ac_iB='\([      ]\),\1#\2define\3'
21528 ac_iC=' '
21529 ac_iD='\4,;t'
21530 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21531 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21532 ac_uB='$,\1#\2define\3'
21533 ac_uC=' '
21534 ac_uD=',;t'
21535
21536 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21537   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21538   case $ac_file in
21539   - | *:- | *:-:* ) # input from stdin
21540         cat >$tmp/stdin
21541         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21542         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21543   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21544         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21545   * )   ac_file_in=$ac_file.in ;;
21546   esac
21547
21548   test x"$ac_file" != x- && { echo "$as_me:21548: creating $ac_file" >&5
21549 echo "$as_me: creating $ac_file" >&6;}
21550
21551   # First look for the input files in the build tree, otherwise in the
21552   # src tree.
21553   ac_file_inputs=`IFS=:
21554     for f in $ac_file_in; do
21555       case $f in
21556       -) echo $tmp/stdin ;;
21557       [\\/$]*)
21558          # Absolute (can't be DOS-style, as IFS=:)
21559          test -f "$f" || { { echo "$as_me:21559: error: cannot find input file: $f" >&5
21560 echo "$as_me: error: cannot find input file: $f" >&2;}
21561    { (exit 1); exit 1; }; }
21562          echo $f;;
21563       *) # Relative
21564          if test -f "$f"; then
21565            # Build tree
21566            echo $f
21567          elif test -f "$srcdir/$f"; then
21568            # Source tree
21569            echo $srcdir/$f
21570          else
21571            # /dev/null tree
21572            { { echo "$as_me:21572: error: cannot find input file: $f" >&5
21573 echo "$as_me: error: cannot find input file: $f" >&2;}
21574    { (exit 1); exit 1; }; }
21575          fi;;
21576       esac
21577     done` || { (exit 1); exit 1; }
21578   # Remove the trailing spaces.
21579   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21580
21581 EOF
21582
21583 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21584 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21585 # be either 'cat' or 'sort'.
21586 cat confdefs.h | uniq >conftest.vals
21587
21588 # Break up conftest.vals because some shells have a limit on
21589 # the size of here documents, and old seds have small limits too.
21590
21591 rm -f conftest.tail
21592 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21593 while grep . conftest.vals >/dev/null
21594 do
21595   # Write chunks of a limited-size here document to conftest.frag.
21596   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21597   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21598   echo 'CEOF' >> $CONFIG_STATUS
21599   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21600   rm -f conftest.vals
21601   mv conftest.tail conftest.vals
21602 done
21603 rm -f conftest.vals
21604
21605 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21606 # marker @DEFS@.
21607 echo '  cat >> conftest.edit <<CEOF
21608 /@DEFS@/r conftest.frag
21609 /@DEFS@/d
21610 CEOF
21611 sed -f conftest.edit $tmp/in > $tmp/out
21612 rm -f $tmp/in
21613 mv $tmp/out $tmp/in
21614 rm -f conftest.edit conftest.frag
21615 ' >> $CONFIG_STATUS
21616
21617 cat >>$CONFIG_STATUS <<\EOF
21618   # Let's still pretend it is `configure' which instantiates (i.e., don't
21619   # use $as_me), people would be surprised to read:
21620   #    /* config.h.  Generated automatically by config.status.  */
21621   if test x"$ac_file" = x-; then
21622     echo "/* Generated automatically by configure.  */" >$tmp/config.h
21623   else
21624     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21625   fi
21626   cat $tmp/in >>$tmp/config.h
21627   rm -f $tmp/in
21628   if test x"$ac_file" != x-; then
21629     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21630       { echo "$as_me:21630: $ac_file is unchanged" >&5
21631 echo "$as_me: $ac_file is unchanged" >&6;}
21632     else
21633       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21634          X"$ac_file" : 'X\(//\)[^/]' \| \
21635          X"$ac_file" : 'X\(//\)$' \| \
21636          X"$ac_file" : 'X\(/\)' \| \
21637          .     : '\(.\)' 2>/dev/null ||
21638 echo X"$ac_file" |
21639     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21640           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21641           /^X\(\/\/\)$/{ s//\1/; q; }
21642           /^X\(\/\).*/{ s//\1/; q; }
21643           s/.*/./; q'`
21644       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21645         { case "$ac_dir" in
21646   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21647   *)                      as_incr_dir=.;;
21648 esac
21649 as_dummy="$ac_dir"
21650 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21651   case $as_mkdir_dir in
21652     # Skip DOS drivespec
21653     ?:) as_incr_dir=$as_mkdir_dir ;;
21654     *)
21655       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21656       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21657     ;;
21658   esac
21659 done; }
21660
21661       fi
21662       rm -f $ac_file
21663       mv $tmp/config.h $ac_file
21664     fi
21665   else
21666     cat $tmp/config.h
21667     rm -f $tmp/config.h
21668   fi
21669 done
21670 EOF
21671 cat >>$CONFIG_STATUS <<\EOF
21672 #
21673 # CONFIG_COMMANDS section.
21674 #
21675 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21676   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21677   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21678
21679   case $ac_dest in
21680     default )
21681 if test "x$cf_with_tests" != xno ; then
21682
21683 for cf_dir in test
21684 do
21685         if test ! -d $srcdir/$cf_dir; then
21686                 continue
21687         elif test -f $srcdir/$cf_dir/programs; then
21688                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21689         fi
21690 done
21691
21692 fi
21693
21694 cf_prefix=$LIB_PREFIX
21695
21696 case $cf_cv_shlib_version in #(vi
21697 cygdll|mingw)
21698         TINFO_NAME=$TINFO_ARG_SUFFIX
21699         TINFO_SUFFIX=.dll
21700         ;;
21701 esac
21702
21703 if test -n "$TINFO_SUFFIX" ; then
21704         case $TINFO_SUFFIX in
21705         tw*)
21706                 TINFO_NAME="${TINFO_NAME}tw"
21707                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
21708                 ;;
21709         t*)
21710                 TINFO_NAME="${TINFO_NAME}t"
21711                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
21712                 ;;
21713         w*)
21714                 TINFO_NAME="${TINFO_NAME}w"
21715                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
21716                 ;;
21717         esac
21718 fi
21719
21720 for cf_dir in $SRC_SUBDIRS
21721 do
21722         if test ! -d $srcdir/$cf_dir ; then
21723                 continue
21724         elif test -f $srcdir/$cf_dir/modules; then
21725
21726                 SHARED_LIB=
21727                 LIBS_TO_MAKE=
21728                 for cf_item in $cf_LIST_MODELS
21729                 do
21730
21731         case $cf_item in #(vi
21732         libtool) #(vi
21733                 cf_suffix='.la'
21734                 cf_depsuf=$cf_suffix
21735                 ;;
21736         normal) #(vi
21737                 cf_suffix='.a'
21738                 cf_depsuf=$cf_suffix
21739                 ;;
21740         debug) #(vi
21741                 cf_suffix='_g.a'
21742                 cf_depsuf=$cf_suffix
21743                 ;;
21744         profile) #(vi
21745                 cf_suffix='_p.a'
21746                 cf_depsuf=$cf_suffix
21747                 ;;
21748         shared) #(vi
21749                 case $cf_cv_system_name in
21750                 aix[5-7]*) #(vi
21751                         cf_suffix='.a'
21752                         cf_depsuf=$cf_suffix
21753                         ;;
21754                 cygwin*|mingw*) #(vi
21755                         cf_suffix='.dll'
21756                         cf_depsuf='.dll.a'
21757                         ;;
21758                 darwin*) #(vi
21759                         cf_suffix='.dylib'
21760                         cf_depsuf=$cf_suffix
21761                         ;;
21762                 hpux*) #(vi
21763                         case $target in
21764                         ia64*) #(vi
21765                                 cf_suffix='.so'
21766                                 cf_depsuf=$cf_suffix
21767                                 ;;
21768                         *) #(vi
21769                                 cf_suffix='.sl'
21770                                 cf_depsuf=$cf_suffix
21771                                 ;;
21772                         esac
21773                         ;;
21774                 *)      cf_suffix='.so'
21775                         cf_depsuf=$cf_suffix
21776                         ;;
21777                 esac
21778         esac
21779         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21780         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21781
21782                         if test $cf_item = shared ; then
21783                         if test "$cf_cv_do_symlinks" = yes ; then
21784                                 case "$cf_cv_shlib_version" in #(vi
21785                                 rel) #(vi
21786                                         case "$cf_cv_system_name" in #(vi
21787                                         darwin*)
21788                                         case .${LIB_SUFFIX} in
21789                                         .tw*)
21790                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21791                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
21792                                                 ;;
21793                                         .t*)
21794                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21795                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
21796                                                 ;;
21797                                         .w*)
21798                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21799                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
21800                                                 ;;
21801                                         *)
21802                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
21803                                                 ;;
21804                                         esac
21805                                         ;; #(vi
21806                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
21807                                         esac
21808                                         ;;
21809                                 abi)
21810                                         case "$cf_cv_system_name" in #(vi
21811                                         darwin*)
21812                                         case .${LIB_SUFFIX} in
21813                                         .tw*)
21814                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21815                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
21816                                                 ;;
21817                                         .t*)
21818                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21819                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
21820                                                 ;;
21821                                         .w*)
21822                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21823                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
21824                                                 ;;
21825                                         *)
21826                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
21827                                                 ;;
21828                                         esac
21829                                         ;; #(vi
21830                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
21831                                         esac
21832                                         ;;
21833                                 esac
21834                         fi
21835                         # cygwin needs import library, and has unique naming convention
21836                         # use autodetected ${cf_prefix} for import lib and static lib, but
21837                         # use 'cyg' prefix for shared lib.
21838                         case $cf_cv_shlib_version in #(vi
21839                         cygdll) #(vi
21840                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21841                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
21842                                 continue
21843                                 ;;
21844                         mingw)
21845                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21846                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/lib${cf_dir}${cf_cygsuf}"
21847                                 continue
21848                                 ;;
21849                         esac
21850                         fi
21851                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
21852                 done
21853
21854                 if test $cf_dir = ncurses ; then
21855                         cf_subsets="$LIB_SUBSETS"
21856                         cf_r_parts="$cf_subsets"
21857                         cf_liblist="$LIBS_TO_MAKE"
21858
21859                         while test -n "$cf_r_parts"
21860                         do
21861                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
21862                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
21863                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
21864                                         cf_item=
21865                                         case $cf_l_parts in #(vi
21866                                         *termlib*) #(vi
21867                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
21868                                                 ;;
21869                                         *ticlib*)
21870                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
21871                                                 ;;
21872                                         *)
21873                                                 break
21874                                                 ;;
21875                                         esac
21876                                         if test -n "$cf_item"; then
21877                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
21878                                         fi
21879                                 else
21880                                         break
21881                                 fi
21882                         done
21883                 else
21884                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
21885                 fi
21886
21887                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
21888                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
21889                         $cf_dir/Makefile >$cf_dir/Makefile.out
21890                 mv $cf_dir/Makefile.out $cf_dir/Makefile
21891
21892                 $AWK -f $srcdir/mk-0th.awk \
21893                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
21894                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21895
21896                 for cf_subset in $cf_subsets
21897                 do
21898                         cf_subdirs=
21899                         for cf_item in $cf_LIST_MODELS
21900                         do
21901                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
21902
21903 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21904
21905         case $cf_item in #(vi
21906         libtool) #(vi
21907                 cf_suffix='.la'
21908                 cf_depsuf=$cf_suffix
21909                 ;;
21910         normal) #(vi
21911                 cf_suffix='.a'
21912                 cf_depsuf=$cf_suffix
21913                 ;;
21914         debug) #(vi
21915                 cf_suffix='_g.a'
21916                 cf_depsuf=$cf_suffix
21917                 ;;
21918         profile) #(vi
21919                 cf_suffix='_p.a'
21920                 cf_depsuf=$cf_suffix
21921                 ;;
21922         shared) #(vi
21923                 case $cf_cv_system_name in
21924                 aix[5-7]*) #(vi
21925                         cf_suffix='.a'
21926                         cf_depsuf=$cf_suffix
21927                         ;;
21928                 cygwin*|mingw*) #(vi
21929                         cf_suffix='.dll'
21930                         cf_depsuf='.dll.a'
21931                         ;;
21932                 darwin*) #(vi
21933                         cf_suffix='.dylib'
21934                         cf_depsuf=$cf_suffix
21935                         ;;
21936                 hpux*) #(vi
21937                         case $target in
21938                         ia64*) #(vi
21939                                 cf_suffix='.so'
21940                                 cf_depsuf=$cf_suffix
21941                                 ;;
21942                         *) #(vi
21943                                 cf_suffix='.sl'
21944                                 cf_depsuf=$cf_suffix
21945                                 ;;
21946                         esac
21947                         ;;
21948                 *)      cf_suffix='.so'
21949                         cf_depsuf=$cf_suffix
21950                         ;;
21951                 esac
21952         esac
21953         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21954         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21955
21956         case $cf_item in
21957         libtool) cf_subdir='obj_lo'  ;;
21958         normal)  cf_subdir='objects' ;;
21959         debug)   cf_subdir='obj_g' ;;
21960         profile) cf_subdir='obj_p' ;;
21961         shared)
21962                 case $cf_cv_system_name in #(vi
21963                 cygwin) #(vi
21964                         cf_subdir='objects' ;;
21965                 *)
21966                         cf_subdir='obj_s' ;;
21967                 esac
21968         esac
21969
21970                         # Test for case where we build libtinfo with a different name.
21971                         cf_libname=$cf_dir
21972                         if test $cf_dir = ncurses ; then
21973                                 case $cf_subset in
21974                                 *base*)
21975                                         cf_libname=${cf_libname}$LIB_SUFFIX
21976                                         ;;
21977                                 *termlib*)
21978                                         cf_libname=$TINFO_LIB_SUFFIX
21979                                         ;;
21980                                 ticlib*)
21981                                         cf_libname=$TICS_LIB_SUFFIX
21982                                         ;;
21983                                 esac
21984                         else
21985                                 cf_libname=${cf_libname}$LIB_SUFFIX
21986                         fi
21987                         if test -n "${DFT_ARG_SUFFIX}" ; then
21988                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
21989                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
21990                         fi
21991
21992                         # These dependencies really are for development, not
21993                         # builds, but they are useful in porting, too.
21994                         cf_depend="../include/ncurses_cfg.h"
21995                         if test "$srcdir" = "."; then
21996                                 cf_reldir="."
21997                         else
21998                                 cf_reldir="\${srcdir}"
21999                         fi
22000
22001                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
22002                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
22003                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
22004                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
22005                         fi
22006
22007                         cf_dir_suffix=
22008                         old_cf_suffix="$cf_suffix"
22009                         if test "$cf_cv_shlib_version_infix" = yes ; then
22010                         if test -n "$LIB_SUFFIX" ; then
22011                                 case $LIB_SUFFIX in
22012                                 tw*)
22013                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
22014                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
22015                                         cf_dir_suffix=tw
22016                                         ;;
22017                                 t*)
22018                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
22019                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
22020                                         cf_dir_suffix=t
22021                                         ;;
22022                                 w*)
22023                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
22024                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
22025                                         cf_dir_suffix=w
22026                                         ;;
22027                                 esac
22028                         fi
22029                         fi
22030
22031                         $AWK -f $srcdir/mk-1st.awk \
22032                                 name=${cf_libname}${cf_dir_suffix} \
22033                                 traces=$LIB_TRACING \
22034                                 MODEL=$cf_ITEM \
22035                                 model=$cf_subdir \
22036                                 prefix=$cf_prefix \
22037                                 suffix=$cf_suffix \
22038                                 subset=$cf_subset \
22039                                 driver=$cf_cv_term_driver \
22040                                 SymLink="$LN_S" \
22041                                 TermlibRoot=$TINFO_NAME \
22042                                 TermlibSuffix=$TINFO_SUFFIX \
22043                                 ShlibVer=$cf_cv_shlib_version \
22044                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
22045                                 ReLink=${cf_cv_do_relink:-no} \
22046                                 DoLinks=$cf_cv_do_symlinks \
22047                                 rmSoLocs=$cf_cv_rm_so_locs \
22048                                 ldconfig="$LDCONFIG" \
22049                                 overwrite=$WITH_OVERWRITE \
22050                                 depend="$cf_depend" \
22051                                 host="$host" \
22052                                 libtool_version="$LIBTOOL_VERSION" \
22053                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22054
22055                         cf_suffix="$old_cf_suffix"
22056
22057                         for cf_subdir2 in $cf_subdirs lib
22058                         do
22059                                 test $cf_subdir = $cf_subdir2 && break
22060                         done
22061                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
22062                         $AWK -f $srcdir/mk-2nd.awk \
22063                                 name=$cf_dir \
22064                                 traces=$LIB_TRACING \
22065                                 MODEL=$cf_ITEM \
22066                                 model=$cf_subdir \
22067                                 subset=$cf_subset \
22068                                 srcdir=$srcdir \
22069                                 echo=$WITH_ECHO \
22070                                 crenames=$cf_cv_prog_CC_c_o \
22071                                 cxxrenames=$cf_cv_prog_CXX_c_o \
22072                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22073                         cf_subdirs="$cf_subdirs $cf_subdir"
22074                         done
22075                 done
22076         fi
22077
22078         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
22079 done
22080
22081 for cf_dir in $SRC_SUBDIRS
22082 do
22083         if test ! -d $srcdir/$cf_dir ; then
22084                 continue
22085         fi
22086
22087         if test -f $cf_dir/Makefile ; then
22088                 case "$cf_dir" in
22089                 Ada95) #(vi
22090                         echo 'libs \' >> Makefile
22091                         echo 'install.libs \' >> Makefile
22092                         echo 'uninstall.libs ::' >> Makefile
22093                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
22094                         ;;
22095                 esac
22096         fi
22097
22098         if test -f $srcdir/$cf_dir/modules; then
22099                 echo >> Makefile
22100                 if test -f $srcdir/$cf_dir/headers; then
22101 cat >> Makefile <<CF_EOF
22102 install.includes \\
22103 uninstall.includes \\
22104 CF_EOF
22105                 fi
22106 if test "$cf_dir" != "c++" ; then
22107 echo 'lint \' >> Makefile
22108 fi
22109 cat >> Makefile <<CF_EOF
22110 libs \\
22111 lintlib \\
22112 install.libs \\
22113 uninstall.libs \\
22114 install.$cf_dir \\
22115 uninstall.$cf_dir ::
22116         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
22117 CF_EOF
22118         elif test -f $srcdir/$cf_dir/headers; then
22119 cat >> Makefile <<CF_EOF
22120
22121 libs \\
22122 install.libs \\
22123 uninstall.libs \\
22124 install.includes \\
22125 uninstall.includes ::
22126         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
22127 CF_EOF
22128 fi
22129 done
22130
22131 cat >> Makefile <<CF_EOF
22132
22133 install.libs uninstall.libs \\
22134 install.data uninstall.data ::
22135 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
22136 CF_EOF
22137
22138 if test "x$cf_with_manpages" = xyes; then
22139 cat >> Makefile <<CF_EOF
22140
22141 install.man \\
22142 uninstall.man ::
22143         cd man && \${MAKE} \${CF_MFLAGS} \$@
22144 CF_EOF
22145 fi
22146
22147 cat >> Makefile <<CF_EOF
22148
22149 distclean ::
22150         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
22151         rm -f headers.sh headers.sed mk_shared_lib.sh
22152         rm -f edit_man.* man_alias.*
22153         rm -rf \${DIRS_TO_MAKE}
22154 CF_EOF
22155
22156 # Special case: tack's manpage lives in its own directory.
22157 if test "x$cf_with_manpages" = xyes; then
22158 if test -d tack ; then
22159 if test -f $srcdir/$tack.h; then
22160 cat >> Makefile <<CF_EOF
22161
22162 install.man \\
22163 uninstall.man ::
22164         cd tack && \${MAKE} \${CF_MFLAGS} \$@
22165 CF_EOF
22166 fi
22167 fi
22168 fi
22169
22170 rm -f headers.sed headers.sh
22171
22172 echo creating headers.sh
22173 cat >headers.sh <<CF_EOF
22174 #! /bin/sh
22175 # This shell script is generated by the 'configure' script.  It is invoked in a
22176 # subdirectory of the build tree.  It generates a sed-script in the parent
22177 # directory that is used to adjust includes for header files that reside in a
22178 # subdirectory of /usr/include, etc.
22179 PRG=""
22180 while test \$# != 3
22181 do
22182 PRG="\$PRG \$1"; shift
22183 done
22184 DST=\$1
22185 REF=\$2
22186 SRC=\$3
22187 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
22188 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
22189 echo installing \$SRC in \$DST
22190 CF_EOF
22191
22192 if test $WITH_CURSES_H = yes; then
22193         cat >>headers.sh <<CF_EOF
22194 case \$DST in
22195 /*/include/*)
22196         END=\`basename \$DST\`
22197         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22198         do
22199                 NAME=\`basename \$i\`
22200                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22201         done
22202         ;;
22203 *)
22204         echo "" >> \$TMPSED
22205         ;;
22206 esac
22207 CF_EOF
22208
22209 else
22210         cat >>headers.sh <<CF_EOF
22211 case \$DST in
22212 /*/include/*)
22213         END=\`basename \$DST\`
22214         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22215         do
22216                 NAME=\`basename \$i\`
22217                 if test "\$NAME" = "curses.h"
22218                 then
22219                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22220                         NAME=ncurses.h
22221                 fi
22222                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22223         done
22224         ;;
22225 *)
22226         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22227         ;;
22228 esac
22229 CF_EOF
22230 fi
22231 cat >>headers.sh <<CF_EOF
22232 rm -f \$TMPSRC
22233 sed -f \$TMPSED \$SRC > \$TMPSRC
22234 NAME=\`basename \$SRC\`
22235 CF_EOF
22236 if test $WITH_CURSES_H != yes; then
22237         cat >>headers.sh <<CF_EOF
22238 test "\$NAME" = "curses.h" && NAME=ncurses.h
22239 CF_EOF
22240 fi
22241 cat >>headers.sh <<CF_EOF
22242 # Just in case someone gzip'd manpages, remove the conflicting copy.
22243 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22244
22245 eval \$PRG \$TMPSRC \$DST/\$NAME
22246 rm -f \$TMPSRC \$TMPSED
22247 CF_EOF
22248
22249 chmod 0755 headers.sh
22250
22251 for cf_dir in $SRC_SUBDIRS
22252 do
22253         if test ! -d $srcdir/$cf_dir ; then
22254                 continue
22255         fi
22256
22257         if test -f $srcdir/$cf_dir/headers; then
22258                 $AWK -f $srcdir/mk-hdr.awk \
22259                         subset="$LIB_SUBSETS" \
22260                         compat="$WITH_CURSES_H" \
22261                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22262         fi
22263
22264         if test -f $srcdir/$cf_dir/modules; then
22265                 if test "$cf_dir" != "c++" ; then
22266                         cat >>$cf_dir/Makefile <<"CF_EOF"
22267 depend : ${AUTO_SRC}
22268         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22269
22270 # DO NOT DELETE THIS LINE -- make depend depends on it.
22271 CF_EOF
22272                 fi
22273         fi
22274 done
22275
22276 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22277 if test -z "$USE_OLD_MAKERULES" ; then
22278         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22279 fi
22280 fi
22281  ;;
22282   esac
22283 done
22284 EOF
22285
22286 cat >>$CONFIG_STATUS <<\EOF
22287
22288 { (exit 0); exit 0; }
22289 EOF
22290 chmod +x $CONFIG_STATUS
22291 ac_clean_files=$ac_clean_files_save
22292
22293 # configure is writing to config.log, and then calls config.status.
22294 # config.status does its own redirection, appending to config.log.
22295 # Unfortunately, on DOS this fails, as config.log is still kept open
22296 # by configure, so config.status won't be able to write to it; its
22297 # output is simply discarded.  So we exec the FD to /dev/null,
22298 # effectively closing config.log, so it can be properly (re)opened and
22299 # appended to by config.status.  When coming back to configure, we
22300 # need to make the FD available again.
22301 if test "$no_create" != yes; then
22302   ac_cs_success=:
22303   exec 5>/dev/null
22304   $SHELL $CONFIG_STATUS || ac_cs_success=false
22305   exec 5>>config.log
22306   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22307   # would make configure fail if this is the last instruction.
22308   $ac_cs_success || { (exit 1); exit 1; }
22309 fi
22310 ${MAKE:-make} preinstall