]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
bc3c34f86dcf34529976eef5c8f7ce73d6cd7bb9
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.580 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20121002.
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 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
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     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tests         suppress build/install with test-programs
713   --without-curses-h      install curses.h as ncurses.h only
714   --with-pkg-config{=path} enable/disable use of pkg-config
715   --with-pkg-config-libdir=XXX use given directory for installing pc-files
716   --enable-pc-files       generate and install .pc files for pkg-config
717   --enable-mixed-case     tic should assume mixed-case filenames
718   --with-install-prefix   prefixes actual install-location ($DESTDIR)
719 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
720   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
721   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
722   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
723   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
724   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
725   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
726 Options to Specify the Libraries Built/Used:
727   --disable-libtool-version  enable to use libtool's incompatible naming scheme
728   --with-libtool          generate libraries with libtool
729   --with-shared           generate shared-libraries
730   --with-normal           generate normal-libraries (default)
731   --with-debug            generate debug-libraries (default)
732   --with-profile          generate profile-libraries
733   --with-cxx-shared       generate C++ shared-libraries
734   --with-lib-prefix       override library-prefix
735   --with-termlib          generate separate terminfo library
736   --with-ticlib           generate separate tic library
737   --with-gpm              use Alessandro Rubini's GPM library
738   --without-dlsym         do not use dlsym() to load GPM dynamically
739   --with-sysmouse         use sysmouse (FreeBSD console)
740   --enable-rpath          use rpath option when generating shared libraries
741   --disable-relink        relink shared libraries during install
742   --with-shlib-version=X  Specify rel or abi version for shared libs
743   --disable-lib-suffixes  disable library suffixes
744   --disable-rpath-hack    don't add rpath options for additional libraries
745 Fine-Tuning Your Configuration:
746   --disable-overwrite     leave out the link to -lcurses
747   --disable-database      do not use terminfo, only fallbacks/termcap
748   --with-database=XXX     specify terminfo source to install
749   --with-hashed-db        specify hashed-database library
750   --with-fallbacks=XXX    specify list of fallback terminal descriptions
751   --without-xterm-new     specify if xterm terminfo should be old version
752   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
753   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
754   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
755   --disable-big-core      assume machine has little memory
756   --disable-big-strings   assume compiler has only standard-size strings
757   --enable-termcap        compile in termcap fallback support
758   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
759   --enable-getcap         fast termcap load, no xrefs to terminfo
760   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
761   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
762   --disable-root-environ  restrict environment when running as root
763   --enable-symlinks       make tic use symbolic links not hard links
764   --enable-broken_linker  compile with broken-linker support code
765   --enable-bsdpad         recognize BSD-style prefix padding
766   --enable-widec          compile with wide-char/UTF-8 code
767   --disable-lp64          allow chtype to be long (ignore _LP64)
768   --disable-largefile     omit support for large files
769   --disable-tparm-varargs compile tparm() without varargs interface
770   --disable-tic-depends   link tic library without explicit dependency on ncurses library
771   --with-bool=TYPE        override fallback type of bool variable
772   --with-caps=alt         compile with alternate Caps file
773   --with-chtype=TYPE      override type of chtype
774   --with-ospeed=TYPE      override type of ospeed variable
775   --with-mmask-t=TYPE     override type of mmask_t
776   --with-ccharw-max=XXX   override size CCHARW_MAX
777   --with-tparm-arg=TYPE   override parameter type of tparm
778   --with-rcs-ids          compile-in RCS identifiers
779 Options to Specify How Manpages are Installed:
780   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
781                           optionally formatted/catonly, e.g., gzip,formatted
782   --with-manpage-renames  specify manpage-renaming
783   --with-manpage-aliases  specify manpage-aliases using .so
784   --with-manpage-symlinks specify manpage-aliases using symlinks
785   --with-manpage-tbl      specify manpage processing with tbl
786 Extensions:
787   --disable-ext-funcs     disable function-extensions
788   --enable-sp-funcs       enable experimental SCREEN-extensions
789   --enable-term-driver    enable experimental terminal-driver
790   --enable-const          compile with extra/non-standard const
791   --enable-ext-colors     compile for 256-color support
792   --enable-ext-mouse      compile for extended mouse-encoding
793   --enable-no-padding     compile with $NCURSES_NO_PADDING code
794   --enable-signed-char    compile using signed Boolean's in term.h
795   --enable-sigwinch       compile with SIGWINCH handler
796   --enable-tcap-names     compile with user-definable terminal capabilities
797 Development Code:
798   --without-develop       disable development options
799   --enable-hard-tabs      compile with hard-tabs code
800   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
801 Experimental Code:
802   --disable-assumed-color do not assume anything about default-colors
803   --disable-hashmap       compile without hashmap scrolling-optimization
804   --enable-colorfgbg      compile-in experimental $COLORFGBG code
805   --enable-interop        compile-in experimental interop bindings
806   --with-pthread          use POSIX thread library
807   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
808   --enable-weak-symbols   enable weak-symbols for pthreads
809   --enable-reentrant      compile with experimental reentrant code
810   --with-wrap-prefix=XXX  override prefix used for public variables
811   --enable-safe-sprintf   compile with experimental safe-sprintf code
812   --disable-scroll-hints  compile without scroll-hints code
813   --enable-wgetch-events  compile with experimental wgetch-events code
814 Testing/development Options:
815   --disable-echo          do not display "compiling" commands
816   --enable-warnings       build: turn on GCC compiler warnings
817   --enable-string-hacks   work around bogus compiler/loader warnings
818   --enable-assertions     test: turn on generation of assertion code
819   --with-dmalloc          test: use Gray Watson's dmalloc library
820   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
821   --with-valgrind         test: use valgrind
822   --disable-leaks         test: free permanent memory, analyze leaks
823   --enable-expanded       test: generate functions for certain macros
824   --disable-macros        test: use functions rather than macros
825   --with-trace            test: add trace() function to all models of ncurses
826 Ada95 Binding Options:
827   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
828   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
829   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
830   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
831
832 Some influential environment variables:
833   CC          C compiler command
834   CFLAGS      C compiler flags
835   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
836               nonstandard directory <lib dir>
837   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
838               headers in a nonstandard directory <include dir>
839   CPP         C preprocessor
840   CXX         C++ compiler command
841   CXXFLAGS    C++ compiler flags
842   CXXCPP      C++ preprocessor
843
844 Use these variables to override the choices made by `configure' or to help
845 it to find libraries and programs with nonstandard names/locations.
846
847 EOF
848 fi
849
850 if test "$ac_init_help" = "recursive"; then
851   # If there are subdirs, report their specific --help.
852   ac_popdir=`pwd`
853   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
854     cd $ac_subdir
855     # A "../" for each directory in /$ac_subdir.
856     ac_dots=`echo $ac_subdir |
857              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
858
859     case $srcdir in
860     .) # No --srcdir option.  We are building in place.
861       ac_sub_srcdir=$srcdir ;;
862     [\\/]* | ?:[\\/]* ) # Absolute path.
863       ac_sub_srcdir=$srcdir/$ac_subdir ;;
864     *) # Relative path.
865       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
866     esac
867
868     # Check for guested configure; otherwise get Cygnus style configure.
869     if test -f $ac_sub_srcdir/configure.gnu; then
870       echo
871       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
872     elif test -f $ac_sub_srcdir/configure; then
873       echo
874       $SHELL $ac_sub_srcdir/configure  --help=recursive
875     elif test -f $ac_sub_srcdir/configure.ac ||
876            test -f $ac_sub_srcdir/configure.in; then
877       echo
878       $ac_configure --help
879     else
880       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
881     fi
882     cd $ac_popdir
883   done
884 fi
885
886 test -n "$ac_init_help" && exit 0
887 if $ac_init_version; then
888   cat <<\EOF
889
890 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
891 Free Software Foundation, Inc.
892 This configure script is free software; the Free Software Foundation
893 gives unlimited permission to copy, distribute and modify it.
894 EOF
895   exit 0
896 fi
897 exec 5>config.log
898 cat >&5 <<EOF
899 This file contains any messages produced by compilers while
900 running configure, to aid debugging if configure makes a mistake.
901
902 It was created by $as_me, which was
903 generated by GNU Autoconf 2.52.20121002.  Invocation command line was
904
905   $ $0 $@
906
907 EOF
908 {
909 cat <<_ASUNAME
910 ## ---------- ##
911 ## Platform.  ##
912 ## ---------- ##
913
914 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
915 uname -m = `(uname -m) 2>/dev/null || echo unknown`
916 uname -r = `(uname -r) 2>/dev/null || echo unknown`
917 uname -s = `(uname -s) 2>/dev/null || echo unknown`
918 uname -v = `(uname -v) 2>/dev/null || echo unknown`
919
920 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
921 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
922
923 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
924 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
925 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
926 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
927 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
928 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
929 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
930
931 PATH = $PATH
932
933 _ASUNAME
934 } >&5
935
936 cat >&5 <<EOF
937 ## ------------ ##
938 ## Core tests.  ##
939 ## ------------ ##
940
941 EOF
942
943 # Keep a trace of the command line.
944 # Strip out --no-create and --no-recursion so they do not pile up.
945 # Also quote any args containing shell meta-characters.
946 ac_configure_args=
947 ac_sep=
948 for ac_arg
949 do
950   case $ac_arg in
951   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
952   | --no-cr | --no-c) ;;
953   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
954   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
955   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
956     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
957     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
958     ac_sep=" " ;;
959   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
960      ac_sep=" " ;;
961   esac
962   # Get rid of the leading space.
963 done
964
965 # When interrupted or exit'd, cleanup temporary files, and complete
966 # config.log.  We remove comments because anyway the quotes in there
967 # would cause problems or look ugly.
968 trap 'exit_status=$?
969   # Save into config.log some information that might help in debugging.
970   echo >&5
971   echo "## ----------------- ##" >&5
972   echo "## Cache variables.  ##" >&5
973   echo "## ----------------- ##" >&5
974   echo >&5
975   # The following way of writing the cache mishandles newlines in values,
976 {
977   (set) 2>&1 |
978     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
979     *ac_space=\ *)
980       sed -n \
981         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
982           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
983       ;;
984     *)
985       sed -n \
986         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
987       ;;
988     esac;
989 } >&5
990   sed "/^$/d" confdefs.h >conftest.log
991   if test -s conftest.log; then
992     echo >&5
993     echo "## ------------ ##" >&5
994     echo "## confdefs.h.  ##" >&5
995     echo "## ------------ ##" >&5
996     echo >&5
997     cat conftest.log >&5
998   fi
999   (echo; echo) >&5
1000   test "$ac_signal" != 0 &&
1001     echo "$as_me: caught signal $ac_signal" >&5
1002   echo "$as_me: exit $exit_status" >&5
1003   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1004     exit $exit_status
1005      ' 0
1006 for ac_signal in 1 2 13 15; do
1007   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1008 done
1009 ac_signal=0
1010
1011 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1012 rm -rf conftest* confdefs.h
1013 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1014 echo >confdefs.h
1015
1016 # Let the site file select an alternate cache file if it wants to.
1017 # Prefer explicitly selected file to automatically selected ones.
1018 if test -z "$CONFIG_SITE"; then
1019   if test "x$prefix" != xNONE; then
1020     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1021   else
1022     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1023   fi
1024 fi
1025 for ac_site_file in $CONFIG_SITE; do
1026   if test -r "$ac_site_file"; then
1027     { echo "$as_me:1027: loading site script $ac_site_file" >&5
1028 echo "$as_me: loading site script $ac_site_file" >&6;}
1029     cat "$ac_site_file" >&5
1030     . "$ac_site_file"
1031   fi
1032 done
1033
1034 if test -r "$cache_file"; then
1035   # Some versions of bash will fail to source /dev/null (special
1036   # files actually), so we avoid doing that.
1037   if test -f "$cache_file"; then
1038     { echo "$as_me:1038: loading cache $cache_file" >&5
1039 echo "$as_me: loading cache $cache_file" >&6;}
1040     case $cache_file in
1041       [\\/]* | ?:[\\/]* ) . $cache_file;;
1042       *)                      . ./$cache_file;;
1043     esac
1044   fi
1045 else
1046   { echo "$as_me:1046: creating cache $cache_file" >&5
1047 echo "$as_me: creating cache $cache_file" >&6;}
1048   >$cache_file
1049 fi
1050
1051 # Check that the precious variables saved in the cache have kept the same
1052 # value.
1053 ac_cache_corrupted=false
1054 for ac_var in `(set) 2>&1 |
1055                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1056   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1057   eval ac_new_set=\$ac_env_${ac_var}_set
1058   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1059   eval ac_new_val="\$ac_env_${ac_var}_value"
1060   case $ac_old_set,$ac_new_set in
1061     set,)
1062       { echo "$as_me:1062: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1063 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1064       ac_cache_corrupted=: ;;
1065     ,set)
1066       { echo "$as_me:1066: error: \`$ac_var' was not set in the previous run" >&5
1067 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1068       ac_cache_corrupted=: ;;
1069     ,);;
1070     *)
1071       if test "x$ac_old_val" != "x$ac_new_val"; then
1072         { echo "$as_me:1072: error: \`$ac_var' has changed since the previous run:" >&5
1073 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1074         { echo "$as_me:1074:   former value:  $ac_old_val" >&5
1075 echo "$as_me:   former value:  $ac_old_val" >&2;}
1076         { echo "$as_me:1076:   current value: $ac_new_val" >&5
1077 echo "$as_me:   current value: $ac_new_val" >&2;}
1078         ac_cache_corrupted=:
1079       fi;;
1080   esac
1081   # Pass precious variables to config.status.  It doesn't matter if
1082   # we pass some twice (in addition to the command line arguments).
1083   if test "$ac_new_set" = set; then
1084     case $ac_new_val in
1085     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1086       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1087       ac_configure_args="$ac_configure_args '$ac_arg'"
1088       ;;
1089     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1090        ;;
1091     esac
1092   fi
1093 done
1094 if $ac_cache_corrupted; then
1095   { echo "$as_me:1095: error: changes in the environment can compromise the build" >&5
1096 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1097   { { echo "$as_me:1097: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1098 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1099    { (exit 1); exit 1; }; }
1100 fi
1101
1102 ac_ext=c
1103 ac_cpp='$CPP $CPPFLAGS'
1104 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1105 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1106 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1107 ac_main_return=return
1108
1109 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1110   *c*,-n*) ECHO_N= ECHO_C='
1111 ' ECHO_T='      ' ;;
1112   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1113   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1114 esac
1115 echo "#! $SHELL" >conftest.sh
1116 echo  "exit 0"   >>conftest.sh
1117 chmod +x conftest.sh
1118 if { (echo "$as_me:1118: PATH=\".;.\"; conftest.sh") >&5
1119   (PATH=".;."; conftest.sh) 2>&5
1120   ac_status=$?
1121   echo "$as_me:1121: \$? = $ac_status" >&5
1122   (exit $ac_status); }; then
1123   ac_path_separator=';'
1124 else
1125   ac_path_separator=:
1126 fi
1127 PATH_SEPARATOR="$ac_path_separator"
1128 rm -f conftest.sh
1129
1130 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1131
1132 top_builddir=`pwd`
1133
1134 echo "$as_me:1134: checking for egrep" >&5
1135 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1136 if test "${ac_cv_prog_egrep+set}" = set; then
1137   echo $ECHO_N "(cached) $ECHO_C" >&6
1138 else
1139   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1140     then ac_cv_prog_egrep='grep -E'
1141     else ac_cv_prog_egrep='egrep'
1142     fi
1143 fi
1144 echo "$as_me:1144: result: $ac_cv_prog_egrep" >&5
1145 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1146  EGREP=$ac_cv_prog_egrep
1147
1148 test -z "$EGREP" && { { echo "$as_me:1148: error: No egrep program found" >&5
1149 echo "$as_me: error: No egrep program found" >&2;}
1150    { (exit 1); exit 1; }; }
1151
1152 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1153 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1154 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1155 cf_cv_abi_version=${NCURSES_MAJOR}
1156 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1157 cf_cv_timestamp=`date`
1158 echo "$as_me:1158: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1159 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1160
1161 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1162
1163 # Check whether --with-rel-version or --without-rel-version was given.
1164 if test "${with_rel_version+set}" = set; then
1165   withval="$with_rel_version"
1166   { echo "$as_me:1166: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1167 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1168  cf_cv_rel_version=$withval
1169 fi;
1170
1171  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1172  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1173
1174 if test -n "$NCURSES_MAJOR" ; then
1175   case $NCURSES_MAJOR in #(vi
1176   [0-9]*) #(vi
1177         ;;
1178   *)
1179         { { echo "$as_me:1179: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1180 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1181    { (exit 1); exit 1; }; }
1182         ;;
1183   esac
1184 else
1185   { { echo "$as_me:1185: error: Release major-version value is empty" >&5
1186 echo "$as_me: error: Release major-version value is empty" >&2;}
1187    { (exit 1); exit 1; }; }
1188 fi
1189
1190 if test -n "$NCURSES_MINOR" ; then
1191   case $NCURSES_MINOR in #(vi
1192   [0-9]*) #(vi
1193         ;;
1194   *)
1195         { { echo "$as_me:1195: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1196 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1197    { (exit 1); exit 1; }; }
1198         ;;
1199   esac
1200 else
1201   { { echo "$as_me:1201: error: Release minor-version value is empty" >&5
1202 echo "$as_me: error: Release minor-version value is empty" >&2;}
1203    { (exit 1); exit 1; }; }
1204 fi
1205
1206 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1207
1208 # Check whether --with-abi-version or --without-abi-version was given.
1209 if test "${with_abi_version+set}" = set; then
1210   withval="$with_abi_version"
1211   { echo "$as_me:1211: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1212 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1213  cf_cv_abi_version=$withval
1214 fi;
1215
1216 if test -n "$cf_cv_abi_version" ; then
1217   case $cf_cv_abi_version in #(vi
1218   [0-9]*) #(vi
1219         ;;
1220   *)
1221         { { echo "$as_me:1221: error: ABI version is not a number: $cf_cv_abi_version" >&5
1222 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1223    { (exit 1); exit 1; }; }
1224         ;;
1225   esac
1226 else
1227   { { echo "$as_me:1227: error: ABI version value is empty" >&5
1228 echo "$as_me: error: ABI version value is empty" >&2;}
1229    { (exit 1); exit 1; }; }
1230 fi
1231
1232 ac_aux_dir=
1233 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1234   if test -f $ac_dir/install-sh; then
1235     ac_aux_dir=$ac_dir
1236     ac_install_sh="$ac_aux_dir/install-sh -c"
1237     break
1238   elif test -f $ac_dir/install.sh; then
1239     ac_aux_dir=$ac_dir
1240     ac_install_sh="$ac_aux_dir/install.sh -c"
1241     break
1242   elif test -f $ac_dir/shtool; then
1243     ac_aux_dir=$ac_dir
1244     ac_install_sh="$ac_aux_dir/shtool install -c"
1245     break
1246   fi
1247 done
1248 if test -z "$ac_aux_dir"; then
1249   { { echo "$as_me:1249: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1250 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1251    { (exit 1); exit 1; }; }
1252 fi
1253 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1254 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1255 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1256
1257 # Make sure we can run config.sub.
1258 $ac_config_sub sun4 >/dev/null 2>&1 ||
1259   { { echo "$as_me:1259: error: cannot run $ac_config_sub" >&5
1260 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1261    { (exit 1); exit 1; }; }
1262
1263 echo "$as_me:1263: checking build system type" >&5
1264 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1265 if test "${ac_cv_build+set}" = set; then
1266   echo $ECHO_N "(cached) $ECHO_C" >&6
1267 else
1268   ac_cv_build_alias=$build_alias
1269 test -z "$ac_cv_build_alias" &&
1270   ac_cv_build_alias=`$ac_config_guess`
1271 test -z "$ac_cv_build_alias" &&
1272   { { echo "$as_me:1272: error: cannot guess build type; you must specify one" >&5
1273 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1274    { (exit 1); exit 1; }; }
1275 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1276   { { echo "$as_me:1276: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1277 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1278    { (exit 1); exit 1; }; }
1279
1280 fi
1281 echo "$as_me:1281: result: $ac_cv_build" >&5
1282 echo "${ECHO_T}$ac_cv_build" >&6
1283 build=$ac_cv_build
1284 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1285 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1286 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1287
1288 echo "$as_me:1288: checking host system type" >&5
1289 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1290 if test "${ac_cv_host+set}" = set; then
1291   echo $ECHO_N "(cached) $ECHO_C" >&6
1292 else
1293   ac_cv_host_alias=$host_alias
1294 test -z "$ac_cv_host_alias" &&
1295   ac_cv_host_alias=$ac_cv_build_alias
1296 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1297   { { echo "$as_me:1297: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1298 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1299    { (exit 1); exit 1; }; }
1300
1301 fi
1302 echo "$as_me:1302: result: $ac_cv_host" >&5
1303 echo "${ECHO_T}$ac_cv_host" >&6
1304 host=$ac_cv_host
1305 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1306 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1307 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1308
1309 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1310         echo "$as_me:1310: checking target system type" >&5
1311 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1312 if test "${ac_cv_target+set}" = set; then
1313   echo $ECHO_N "(cached) $ECHO_C" >&6
1314 else
1315   ac_cv_target_alias=$target_alias
1316 test "x$ac_cv_target_alias" = "x" &&
1317   ac_cv_target_alias=$ac_cv_host_alias
1318 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1319   { { echo "$as_me:1319: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1320 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1321    { (exit 1); exit 1; }; }
1322
1323 fi
1324 echo "$as_me:1324: result: $ac_cv_target" >&5
1325 echo "${ECHO_T}$ac_cv_target" >&6
1326 target=$ac_cv_target
1327 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1328 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1329 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1330
1331 # The aliases save the names the user supplied, while $host etc.
1332 # will get canonicalized.
1333 test -n "$target_alias" &&
1334   test "$program_prefix$program_suffix$program_transform_name" = \
1335     NONENONEs,x,x, &&
1336   program_prefix=${target_alias}-
1337         system_name="$host_os"
1338 else
1339         system_name="`(uname -s -r) 2>/dev/null`"
1340         if test -z "$system_name" ; then
1341                 system_name="`(hostname) 2>/dev/null`"
1342         fi
1343 fi
1344 test -n "$system_name" &&
1345 cat >>confdefs.h <<EOF
1346 #define SYSTEM_NAME "$system_name"
1347 EOF
1348
1349 if test "${cf_cv_system_name+set}" = set; then
1350   echo $ECHO_N "(cached) $ECHO_C" >&6
1351 else
1352   cf_cv_system_name="$system_name"
1353 fi
1354
1355 test -z "$system_name" && system_name="$cf_cv_system_name"
1356 test -n "$cf_cv_system_name" && echo "$as_me:1356: result: Configuring for $cf_cv_system_name" >&5
1357 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1358
1359 if test ".$system_name" != ".$cf_cv_system_name" ; then
1360         echo "$as_me:1360: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1361 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1362         { { echo "$as_me:1362: error: \"Please remove config.cache and try again.\"" >&5
1363 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1364    { (exit 1); exit 1; }; }
1365 fi
1366
1367 # Check whether --with-system-type or --without-system-type was given.
1368 if test "${with_system_type+set}" = set; then
1369   withval="$with_system_type"
1370   { echo "$as_me:1370: WARNING: overriding system type to $withval" >&5
1371 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1372         cf_cv_system_name=$withval
1373         host_os=$withval
1374
1375 fi;
1376
1377 ###     Save the given $CFLAGS to allow user-override.
1378 cf_user_CFLAGS="$CFLAGS"
1379
1380 ###     Default install-location
1381
1382 echo "$as_me:1382: checking for prefix" >&5
1383 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1384 if test "x$prefix" = "xNONE" ; then
1385         case "$cf_cv_system_name" in
1386                 # non-vendor systems don't have a conflict
1387         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1388                 prefix=/usr
1389                 ;;
1390         *)      prefix=$ac_default_prefix
1391                 ;;
1392         esac
1393 fi
1394 echo "$as_me:1394: result: $prefix" >&5
1395 echo "${ECHO_T}$prefix" >&6
1396
1397 if test "x$prefix" = "xNONE" ; then
1398 echo "$as_me:1398: checking for default include-directory" >&5
1399 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1400 test -n "$verbose" && echo 1>&6
1401 for cf_symbol in \
1402         $includedir \
1403         $includedir/ncurses \
1404         $prefix/include \
1405         $prefix/include/ncurses \
1406         /usr/local/include \
1407         /usr/local/include/ncurses \
1408         /usr/include \
1409         /usr/include/ncurses
1410 do
1411         cf_dir=`eval echo $cf_symbol`
1412         if test -f $cf_dir/curses.h ; then
1413         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1414                 includedir="$cf_symbol"
1415                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1416                 break
1417         fi
1418         fi
1419         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1420 done
1421 echo "$as_me:1421: result: $includedir" >&5
1422 echo "${ECHO_T}$includedir" >&6
1423 fi
1424
1425 ###     Checks for programs.
1426
1427 # Check whether --with-ada or --without-ada was given.
1428 if test "${with_ada+set}" = set; then
1429   withval="$with_ada"
1430   cf_with_ada=$withval
1431 else
1432   cf_with_ada=yes
1433 fi;
1434 if test "x$cf_with_ada" = xyes
1435 then
1436         cf_PROG_CC="gnatgcc gcc cc"
1437 else
1438         cf_PROG_CC="gcc cc"
1439 fi
1440
1441 ac_ext=c
1442 ac_cpp='$CPP $CPPFLAGS'
1443 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1444 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1445 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1446 ac_main_return=return
1447 if test -n "$ac_tool_prefix"; then
1448   for ac_prog in $cf_PROG_CC
1449   do
1450     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1451 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1452 echo "$as_me:1452: checking for $ac_word" >&5
1453 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1454 if test "${ac_cv_prog_CC+set}" = set; then
1455   echo $ECHO_N "(cached) $ECHO_C" >&6
1456 else
1457   if test -n "$CC"; then
1458   ac_cv_prog_CC="$CC" # Let the user override the test.
1459 else
1460   ac_save_IFS=$IFS; IFS=$ac_path_separator
1461 ac_dummy="$PATH"
1462 for ac_dir in $ac_dummy; do
1463   IFS=$ac_save_IFS
1464   test -z "$ac_dir" && ac_dir=.
1465   $as_executable_p "$ac_dir/$ac_word" || continue
1466 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1467 echo "$as_me:1467: found $ac_dir/$ac_word" >&5
1468 break
1469 done
1470
1471 fi
1472 fi
1473 CC=$ac_cv_prog_CC
1474 if test -n "$CC"; then
1475   echo "$as_me:1475: result: $CC" >&5
1476 echo "${ECHO_T}$CC" >&6
1477 else
1478   echo "$as_me:1478: result: no" >&5
1479 echo "${ECHO_T}no" >&6
1480 fi
1481
1482     test -n "$CC" && break
1483   done
1484 fi
1485 if test -z "$CC"; then
1486   ac_ct_CC=$CC
1487   for ac_prog in $cf_PROG_CC
1488 do
1489   # Extract the first word of "$ac_prog", so it can be a program name with args.
1490 set dummy $ac_prog; ac_word=$2
1491 echo "$as_me:1491: checking for $ac_word" >&5
1492 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1493 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1494   echo $ECHO_N "(cached) $ECHO_C" >&6
1495 else
1496   if test -n "$ac_ct_CC"; then
1497   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1498 else
1499   ac_save_IFS=$IFS; IFS=$ac_path_separator
1500 ac_dummy="$PATH"
1501 for ac_dir in $ac_dummy; do
1502   IFS=$ac_save_IFS
1503   test -z "$ac_dir" && ac_dir=.
1504   $as_executable_p "$ac_dir/$ac_word" || continue
1505 ac_cv_prog_ac_ct_CC="$ac_prog"
1506 echo "$as_me:1506: found $ac_dir/$ac_word" >&5
1507 break
1508 done
1509
1510 fi
1511 fi
1512 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1513 if test -n "$ac_ct_CC"; then
1514   echo "$as_me:1514: result: $ac_ct_CC" >&5
1515 echo "${ECHO_T}$ac_ct_CC" >&6
1516 else
1517   echo "$as_me:1517: result: no" >&5
1518 echo "${ECHO_T}no" >&6
1519 fi
1520
1521   test -n "$ac_ct_CC" && break
1522 done
1523
1524   CC=$ac_ct_CC
1525 fi
1526
1527 test -z "$CC" && { { echo "$as_me:1527: error: no acceptable cc found in \$PATH" >&5
1528 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1529    { (exit 1); exit 1; }; }
1530
1531 # Provide some information about the compiler.
1532 echo "$as_me:1532:" \
1533      "checking for C compiler version" >&5
1534 ac_compiler=`set X $ac_compile; echo $2`
1535 { (eval echo "$as_me:1535: \"$ac_compiler --version </dev/null >&5\"") >&5
1536   (eval $ac_compiler --version </dev/null >&5) 2>&5
1537   ac_status=$?
1538   echo "$as_me:1538: \$? = $ac_status" >&5
1539   (exit $ac_status); }
1540 { (eval echo "$as_me:1540: \"$ac_compiler -v </dev/null >&5\"") >&5
1541   (eval $ac_compiler -v </dev/null >&5) 2>&5
1542   ac_status=$?
1543   echo "$as_me:1543: \$? = $ac_status" >&5
1544   (exit $ac_status); }
1545 { (eval echo "$as_me:1545: \"$ac_compiler -V </dev/null >&5\"") >&5
1546   (eval $ac_compiler -V </dev/null >&5) 2>&5
1547   ac_status=$?
1548   echo "$as_me:1548: \$? = $ac_status" >&5
1549   (exit $ac_status); }
1550
1551 cat >conftest.$ac_ext <<_ACEOF
1552 #line 1552 "configure"
1553 #include "confdefs.h"
1554
1555 int
1556 main ()
1557 {
1558
1559   ;
1560   return 0;
1561 }
1562 _ACEOF
1563 ac_clean_files_save=$ac_clean_files
1564 ac_clean_files="$ac_clean_files a.out a.exe"
1565 # Try to create an executable without -o first, disregard a.out.
1566 # It will help us diagnose broken compilers, and finding out an intuition
1567 # of exeext.
1568 echo "$as_me:1568: checking for C compiler default output" >&5
1569 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1570 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1571 if { (eval echo "$as_me:1571: \"$ac_link_default\"") >&5
1572   (eval $ac_link_default) 2>&5
1573   ac_status=$?
1574   echo "$as_me:1574: \$? = $ac_status" >&5
1575   (exit $ac_status); }; then
1576   # Find the output, starting from the most likely.  This scheme is
1577 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1578 # resort.
1579 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1580                 ls a.out conftest 2>/dev/null;
1581                 ls a.* conftest.* 2>/dev/null`; do
1582   case $ac_file in
1583     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1584     a.out ) # We found the default executable, but exeext='' is most
1585             # certainly right.
1586             break;;
1587     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1588           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1589           export ac_cv_exeext
1590           break;;
1591     * ) break;;
1592   esac
1593 done
1594 else
1595   echo "$as_me: failed program was:" >&5
1596 cat conftest.$ac_ext >&5
1597 { { echo "$as_me:1597: error: C compiler cannot create executables" >&5
1598 echo "$as_me: error: C compiler cannot create executables" >&2;}
1599    { (exit 77); exit 77; }; }
1600 fi
1601
1602 ac_exeext=$ac_cv_exeext
1603 echo "$as_me:1603: result: $ac_file" >&5
1604 echo "${ECHO_T}$ac_file" >&6
1605
1606 # Check the compiler produces executables we can run.  If not, either
1607 # the compiler is broken, or we cross compile.
1608 echo "$as_me:1608: checking whether the C compiler works" >&5
1609 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1610 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1611 # If not cross compiling, check that we can run a simple program.
1612 if test "$cross_compiling" != yes; then
1613   if { ac_try='./$ac_file'
1614   { (eval echo "$as_me:1614: \"$ac_try\"") >&5
1615   (eval $ac_try) 2>&5
1616   ac_status=$?
1617   echo "$as_me:1617: \$? = $ac_status" >&5
1618   (exit $ac_status); }; }; then
1619     cross_compiling=no
1620   else
1621     if test "$cross_compiling" = maybe; then
1622         cross_compiling=yes
1623     else
1624         { { echo "$as_me:1624: error: cannot run C compiled programs.
1625 If you meant to cross compile, use \`--host'." >&5
1626 echo "$as_me: error: cannot run C compiled programs.
1627 If you meant to cross compile, use \`--host'." >&2;}
1628    { (exit 1); exit 1; }; }
1629     fi
1630   fi
1631 fi
1632 echo "$as_me:1632: result: yes" >&5
1633 echo "${ECHO_T}yes" >&6
1634
1635 rm -f a.out a.exe conftest$ac_cv_exeext
1636 ac_clean_files=$ac_clean_files_save
1637 # Check the compiler produces executables we can run.  If not, either
1638 # the compiler is broken, or we cross compile.
1639 echo "$as_me:1639: checking whether we are cross compiling" >&5
1640 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1641 echo "$as_me:1641: result: $cross_compiling" >&5
1642 echo "${ECHO_T}$cross_compiling" >&6
1643
1644 echo "$as_me:1644: checking for executable suffix" >&5
1645 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1646 if { (eval echo "$as_me:1646: \"$ac_link\"") >&5
1647   (eval $ac_link) 2>&5
1648   ac_status=$?
1649   echo "$as_me:1649: \$? = $ac_status" >&5
1650   (exit $ac_status); }; then
1651   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1652 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1653 # work properly (i.e., refer to `conftest.exe'), while it won't with
1654 # `rm'.
1655 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1656   case $ac_file in
1657     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1658     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1659           export ac_cv_exeext
1660           break;;
1661     * ) break;;
1662   esac
1663 done
1664 else
1665   { { echo "$as_me:1665: error: cannot compute EXEEXT: cannot compile and link" >&5
1666 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1667    { (exit 1); exit 1; }; }
1668 fi
1669
1670 rm -f conftest$ac_cv_exeext
1671 echo "$as_me:1671: result: $ac_cv_exeext" >&5
1672 echo "${ECHO_T}$ac_cv_exeext" >&6
1673
1674 rm -f conftest.$ac_ext
1675 EXEEXT=$ac_cv_exeext
1676 ac_exeext=$EXEEXT
1677 echo "$as_me:1677: checking for object suffix" >&5
1678 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1679 if test "${ac_cv_objext+set}" = set; then
1680   echo $ECHO_N "(cached) $ECHO_C" >&6
1681 else
1682   cat >conftest.$ac_ext <<_ACEOF
1683 #line 1683 "configure"
1684 #include "confdefs.h"
1685
1686 int
1687 main ()
1688 {
1689
1690   ;
1691   return 0;
1692 }
1693 _ACEOF
1694 rm -f conftest.o conftest.obj
1695 if { (eval echo "$as_me:1695: \"$ac_compile\"") >&5
1696   (eval $ac_compile) 2>&5
1697   ac_status=$?
1698   echo "$as_me:1698: \$? = $ac_status" >&5
1699   (exit $ac_status); }; then
1700   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1701   case $ac_file in
1702     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1703     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1704        break;;
1705   esac
1706 done
1707 else
1708   echo "$as_me: failed program was:" >&5
1709 cat conftest.$ac_ext >&5
1710 { { echo "$as_me:1710: error: cannot compute OBJEXT: cannot compile" >&5
1711 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1712    { (exit 1); exit 1; }; }
1713 fi
1714
1715 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1716 fi
1717 echo "$as_me:1717: result: $ac_cv_objext" >&5
1718 echo "${ECHO_T}$ac_cv_objext" >&6
1719 OBJEXT=$ac_cv_objext
1720 ac_objext=$OBJEXT
1721 echo "$as_me:1721: checking whether we are using the GNU C compiler" >&5
1722 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1723 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1724   echo $ECHO_N "(cached) $ECHO_C" >&6
1725 else
1726   cat >conftest.$ac_ext <<_ACEOF
1727 #line 1727 "configure"
1728 #include "confdefs.h"
1729
1730 int
1731 main ()
1732 {
1733 #ifndef __GNUC__
1734        choke me
1735 #endif
1736
1737   ;
1738   return 0;
1739 }
1740 _ACEOF
1741 rm -f conftest.$ac_objext
1742 if { (eval echo "$as_me:1742: \"$ac_compile\"") >&5
1743   (eval $ac_compile) 2>&5
1744   ac_status=$?
1745   echo "$as_me:1745: \$? = $ac_status" >&5
1746   (exit $ac_status); } &&
1747          { ac_try='test -s conftest.$ac_objext'
1748   { (eval echo "$as_me:1748: \"$ac_try\"") >&5
1749   (eval $ac_try) 2>&5
1750   ac_status=$?
1751   echo "$as_me:1751: \$? = $ac_status" >&5
1752   (exit $ac_status); }; }; then
1753   ac_compiler_gnu=yes
1754 else
1755   echo "$as_me: failed program was:" >&5
1756 cat conftest.$ac_ext >&5
1757 ac_compiler_gnu=no
1758 fi
1759 rm -f conftest.$ac_objext conftest.$ac_ext
1760 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1761
1762 fi
1763 echo "$as_me:1763: result: $ac_cv_c_compiler_gnu" >&5
1764 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1765 GCC=`test $ac_compiler_gnu = yes && echo yes`
1766 ac_test_CFLAGS=${CFLAGS+set}
1767 ac_save_CFLAGS=$CFLAGS
1768 CFLAGS="-g"
1769 echo "$as_me:1769: checking whether $CC accepts -g" >&5
1770 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1771 if test "${ac_cv_prog_cc_g+set}" = set; then
1772   echo $ECHO_N "(cached) $ECHO_C" >&6
1773 else
1774   cat >conftest.$ac_ext <<_ACEOF
1775 #line 1775 "configure"
1776 #include "confdefs.h"
1777
1778 int
1779 main ()
1780 {
1781
1782   ;
1783   return 0;
1784 }
1785 _ACEOF
1786 rm -f conftest.$ac_objext
1787 if { (eval echo "$as_me:1787: \"$ac_compile\"") >&5
1788   (eval $ac_compile) 2>&5
1789   ac_status=$?
1790   echo "$as_me:1790: \$? = $ac_status" >&5
1791   (exit $ac_status); } &&
1792          { ac_try='test -s conftest.$ac_objext'
1793   { (eval echo "$as_me:1793: \"$ac_try\"") >&5
1794   (eval $ac_try) 2>&5
1795   ac_status=$?
1796   echo "$as_me:1796: \$? = $ac_status" >&5
1797   (exit $ac_status); }; }; then
1798   ac_cv_prog_cc_g=yes
1799 else
1800   echo "$as_me: failed program was:" >&5
1801 cat conftest.$ac_ext >&5
1802 ac_cv_prog_cc_g=no
1803 fi
1804 rm -f conftest.$ac_objext conftest.$ac_ext
1805 fi
1806 echo "$as_me:1806: result: $ac_cv_prog_cc_g" >&5
1807 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1808 if test "$ac_test_CFLAGS" = set; then
1809   CFLAGS=$ac_save_CFLAGS
1810 elif test $ac_cv_prog_cc_g = yes; then
1811   if test "$GCC" = yes; then
1812     CFLAGS="-g -O2"
1813   else
1814     CFLAGS="-g"
1815   fi
1816 else
1817   if test "$GCC" = yes; then
1818     CFLAGS="-O2"
1819   else
1820     CFLAGS=
1821   fi
1822 fi
1823 # Some people use a C++ compiler to compile C.  Since we use `exit',
1824 # in C++ we need to declare it.  In case someone uses the same compiler
1825 # for both compiling C and C++ we need to have the C++ compiler decide
1826 # the declaration of exit, since it's the most demanding environment.
1827 cat >conftest.$ac_ext <<_ACEOF
1828 #ifndef __cplusplus
1829   choke me
1830 #endif
1831 _ACEOF
1832 rm -f conftest.$ac_objext
1833 if { (eval echo "$as_me:1833: \"$ac_compile\"") >&5
1834   (eval $ac_compile) 2>&5
1835   ac_status=$?
1836   echo "$as_me:1836: \$? = $ac_status" >&5
1837   (exit $ac_status); } &&
1838          { ac_try='test -s conftest.$ac_objext'
1839   { (eval echo "$as_me:1839: \"$ac_try\"") >&5
1840   (eval $ac_try) 2>&5
1841   ac_status=$?
1842   echo "$as_me:1842: \$? = $ac_status" >&5
1843   (exit $ac_status); }; }; then
1844   for ac_declaration in \
1845    ''\
1846    '#include <stdlib.h>' \
1847    'extern "C" void std::exit (int) throw (); using std::exit;' \
1848    'extern "C" void std::exit (int); using std::exit;' \
1849    'extern "C" void exit (int) throw ();' \
1850    'extern "C" void exit (int);' \
1851    'void exit (int);'
1852 do
1853   cat >conftest.$ac_ext <<_ACEOF
1854 #line 1854 "configure"
1855 #include "confdefs.h"
1856 #include <stdlib.h>
1857 $ac_declaration
1858 int
1859 main ()
1860 {
1861 exit (42);
1862   ;
1863   return 0;
1864 }
1865 _ACEOF
1866 rm -f conftest.$ac_objext
1867 if { (eval echo "$as_me:1867: \"$ac_compile\"") >&5
1868   (eval $ac_compile) 2>&5
1869   ac_status=$?
1870   echo "$as_me:1870: \$? = $ac_status" >&5
1871   (exit $ac_status); } &&
1872          { ac_try='test -s conftest.$ac_objext'
1873   { (eval echo "$as_me:1873: \"$ac_try\"") >&5
1874   (eval $ac_try) 2>&5
1875   ac_status=$?
1876   echo "$as_me:1876: \$? = $ac_status" >&5
1877   (exit $ac_status); }; }; then
1878   :
1879 else
1880   echo "$as_me: failed program was:" >&5
1881 cat conftest.$ac_ext >&5
1882 continue
1883 fi
1884 rm -f conftest.$ac_objext conftest.$ac_ext
1885   cat >conftest.$ac_ext <<_ACEOF
1886 #line 1886 "configure"
1887 #include "confdefs.h"
1888 $ac_declaration
1889 int
1890 main ()
1891 {
1892 exit (42);
1893   ;
1894   return 0;
1895 }
1896 _ACEOF
1897 rm -f conftest.$ac_objext
1898 if { (eval echo "$as_me:1898: \"$ac_compile\"") >&5
1899   (eval $ac_compile) 2>&5
1900   ac_status=$?
1901   echo "$as_me:1901: \$? = $ac_status" >&5
1902   (exit $ac_status); } &&
1903          { ac_try='test -s conftest.$ac_objext'
1904   { (eval echo "$as_me:1904: \"$ac_try\"") >&5
1905   (eval $ac_try) 2>&5
1906   ac_status=$?
1907   echo "$as_me:1907: \$? = $ac_status" >&5
1908   (exit $ac_status); }; }; then
1909   break
1910 else
1911   echo "$as_me: failed program was:" >&5
1912 cat conftest.$ac_ext >&5
1913 fi
1914 rm -f conftest.$ac_objext conftest.$ac_ext
1915 done
1916 rm -rf conftest*
1917 if test -n "$ac_declaration"; then
1918   echo '#ifdef __cplusplus' >>confdefs.h
1919   echo $ac_declaration      >>confdefs.h
1920   echo '#endif'             >>confdefs.h
1921 fi
1922
1923 else
1924   echo "$as_me: failed program was:" >&5
1925 cat conftest.$ac_ext >&5
1926 fi
1927 rm -f conftest.$ac_objext conftest.$ac_ext
1928 ac_ext=c
1929 ac_cpp='$CPP $CPPFLAGS'
1930 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1931 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1932 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1933 ac_main_return=return
1934
1935 GCC_VERSION=none
1936 if test "$GCC" = yes ; then
1937         echo "$as_me:1937: checking version of $CC" >&5
1938 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1939         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1940         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1941         echo "$as_me:1941: result: $GCC_VERSION" >&5
1942 echo "${ECHO_T}$GCC_VERSION" >&6
1943 fi
1944
1945 echo "$as_me:1945: checking for $CC option to accept ANSI C" >&5
1946 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1947 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1948   echo $ECHO_N "(cached) $ECHO_C" >&6
1949 else
1950   ac_cv_prog_cc_stdc=no
1951 ac_save_CC=$CC
1952 cat >conftest.$ac_ext <<_ACEOF
1953 #line 1953 "configure"
1954 #include "confdefs.h"
1955 #include <stdarg.h>
1956 #include <stdio.h>
1957 #include <sys/types.h>
1958 #include <sys/stat.h>
1959 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1960 struct buf { int x; };
1961 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1962 static char *e (p, i)
1963      char **p;
1964      int i;
1965 {
1966   return p[i];
1967 }
1968 static char *f (char * (*g) (char **, int), char **p, ...)
1969 {
1970   char *s;
1971   va_list v;
1972   va_start (v,p);
1973   s = g (p, va_arg (v,int));
1974   va_end (v);
1975   return s;
1976 }
1977 int test (int i, double x);
1978 struct s1 {int (*f) (int a);};
1979 struct s2 {int (*f) (double a);};
1980 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1981 int argc;
1982 char **argv;
1983 int
1984 main ()
1985 {
1986 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1987   ;
1988   return 0;
1989 }
1990 _ACEOF
1991 # Don't try gcc -ansi; that turns off useful extensions and
1992 # breaks some systems' header files.
1993 # AIX                   -qlanglvl=ansi
1994 # Ultrix and OSF/1      -std1
1995 # HP-UX 10.20 and later -Ae
1996 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1997 # SVR4                  -Xc -D__EXTENSIONS__
1998 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1999 do
2000   CC="$ac_save_CC $ac_arg"
2001   rm -f conftest.$ac_objext
2002 if { (eval echo "$as_me:2002: \"$ac_compile\"") >&5
2003   (eval $ac_compile) 2>&5
2004   ac_status=$?
2005   echo "$as_me:2005: \$? = $ac_status" >&5
2006   (exit $ac_status); } &&
2007          { ac_try='test -s conftest.$ac_objext'
2008   { (eval echo "$as_me:2008: \"$ac_try\"") >&5
2009   (eval $ac_try) 2>&5
2010   ac_status=$?
2011   echo "$as_me:2011: \$? = $ac_status" >&5
2012   (exit $ac_status); }; }; then
2013   ac_cv_prog_cc_stdc=$ac_arg
2014 break
2015 else
2016   echo "$as_me: failed program was:" >&5
2017 cat conftest.$ac_ext >&5
2018 fi
2019 rm -f conftest.$ac_objext
2020 done
2021 rm -f conftest.$ac_ext conftest.$ac_objext
2022 CC=$ac_save_CC
2023
2024 fi
2025
2026 case "x$ac_cv_prog_cc_stdc" in
2027   x|xno)
2028     echo "$as_me:2028: result: none needed" >&5
2029 echo "${ECHO_T}none needed" >&6 ;;
2030   *)
2031     echo "$as_me:2031: result: $ac_cv_prog_cc_stdc" >&5
2032 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2033     CC="$CC $ac_cv_prog_cc_stdc" ;;
2034 esac
2035
2036 # This should have been defined by AC_PROG_CC
2037 : ${CC:=cc}
2038
2039 echo "$as_me:2039: checking \$CC variable" >&5
2040 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2041 case "$CC" in #(vi
2042 *[\ \   ]-[IUD]*)
2043         echo "$as_me:2043: result: broken" >&5
2044 echo "${ECHO_T}broken" >&6
2045         { echo "$as_me:2045: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2046 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2047         # humor him...
2048         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2049         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2050
2051 cf_fix_cppflags=no
2052 cf_new_cflags=
2053 cf_new_cppflags=
2054 cf_new_extra_cppflags=
2055
2056 for cf_add_cflags in $cf_flags
2057 do
2058 case $cf_fix_cppflags in
2059 no)
2060         case $cf_add_cflags in #(vi
2061         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2062                 case $cf_add_cflags in
2063                 -D*)
2064                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2065
2066                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2067                                 && test -z "${cf_tst_cflags}" \
2068                                 && cf_fix_cppflags=yes
2069
2070                         if test $cf_fix_cppflags = yes ; then
2071                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2072                                 continue
2073                         elif test "${cf_tst_cflags}" = "\"'" ; then
2074                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2075                                 continue
2076                         fi
2077                         ;;
2078                 esac
2079                 case "$CPPFLAGS" in
2080                 *$cf_add_cflags) #(vi
2081                         ;;
2082                 *) #(vi
2083                         case $cf_add_cflags in #(vi
2084                         -D*)
2085                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2086
2087 CPPFLAGS=`echo "$CPPFLAGS" | \
2088         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2089                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2090
2091                                 ;;
2092                         esac
2093                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2094                         ;;
2095                 esac
2096                 ;;
2097         *)
2098                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2099                 ;;
2100         esac
2101         ;;
2102 yes)
2103         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2104
2105         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2106
2107         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2108                 && test -z "${cf_tst_cflags}" \
2109                 && cf_fix_cppflags=no
2110         ;;
2111 esac
2112 done
2113
2114 if test -n "$cf_new_cflags" ; then
2115
2116         CFLAGS="$CFLAGS $cf_new_cflags"
2117 fi
2118
2119 if test -n "$cf_new_cppflags" ; then
2120
2121         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2122 fi
2123
2124 if test -n "$cf_new_extra_cppflags" ; then
2125
2126         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2127 fi
2128
2129         ;;
2130 *)
2131         echo "$as_me:2131: result: ok" >&5
2132 echo "${ECHO_T}ok" >&6
2133         ;;
2134 esac
2135
2136 ac_ext=c
2137 ac_cpp='$CPP $CPPFLAGS'
2138 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2139 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2140 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2141 ac_main_return=return
2142 echo "$as_me:2142: checking how to run the C preprocessor" >&5
2143 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2144 # On Suns, sometimes $CPP names a directory.
2145 if test -n "$CPP" && test -d "$CPP"; then
2146   CPP=
2147 fi
2148 if test -z "$CPP"; then
2149   if test "${ac_cv_prog_CPP+set}" = set; then
2150   echo $ECHO_N "(cached) $ECHO_C" >&6
2151 else
2152       # Double quotes because CPP needs to be expanded
2153     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2154     do
2155       ac_preproc_ok=false
2156 for ac_c_preproc_warn_flag in '' yes
2157 do
2158   # Use a header file that comes with gcc, so configuring glibc
2159   # with a fresh cross-compiler works.
2160   # On the NeXT, cc -E runs the code through the compiler's parser,
2161   # not just through cpp. "Syntax error" is here to catch this case.
2162   cat >conftest.$ac_ext <<_ACEOF
2163 #line 2163 "configure"
2164 #include "confdefs.h"
2165 #include <assert.h>
2166                      Syntax error
2167 _ACEOF
2168 if { (eval echo "$as_me:2168: \"$ac_cpp conftest.$ac_ext\"") >&5
2169   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2170   ac_status=$?
2171   egrep -v '^ *\+' conftest.er1 >conftest.err
2172   rm -f conftest.er1
2173   cat conftest.err >&5
2174   echo "$as_me:2174: \$? = $ac_status" >&5
2175   (exit $ac_status); } >/dev/null; then
2176   if test -s conftest.err; then
2177     ac_cpp_err=$ac_c_preproc_warn_flag
2178   else
2179     ac_cpp_err=
2180   fi
2181 else
2182   ac_cpp_err=yes
2183 fi
2184 if test -z "$ac_cpp_err"; then
2185   :
2186 else
2187   echo "$as_me: failed program was:" >&5
2188   cat conftest.$ac_ext >&5
2189   # Broken: fails on valid input.
2190 continue
2191 fi
2192 rm -f conftest.err conftest.$ac_ext
2193
2194   # OK, works on sane cases.  Now check whether non-existent headers
2195   # can be detected and how.
2196   cat >conftest.$ac_ext <<_ACEOF
2197 #line 2197 "configure"
2198 #include "confdefs.h"
2199 #include <ac_nonexistent.h>
2200 _ACEOF
2201 if { (eval echo "$as_me:2201: \"$ac_cpp conftest.$ac_ext\"") >&5
2202   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2203   ac_status=$?
2204   egrep -v '^ *\+' conftest.er1 >conftest.err
2205   rm -f conftest.er1
2206   cat conftest.err >&5
2207   echo "$as_me:2207: \$? = $ac_status" >&5
2208   (exit $ac_status); } >/dev/null; then
2209   if test -s conftest.err; then
2210     ac_cpp_err=$ac_c_preproc_warn_flag
2211   else
2212     ac_cpp_err=
2213   fi
2214 else
2215   ac_cpp_err=yes
2216 fi
2217 if test -z "$ac_cpp_err"; then
2218   # Broken: success on invalid input.
2219 continue
2220 else
2221   echo "$as_me: failed program was:" >&5
2222   cat conftest.$ac_ext >&5
2223   # Passes both tests.
2224 ac_preproc_ok=:
2225 break
2226 fi
2227 rm -f conftest.err conftest.$ac_ext
2228
2229 done
2230 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2231 rm -f conftest.err conftest.$ac_ext
2232 if $ac_preproc_ok; then
2233   break
2234 fi
2235
2236     done
2237     ac_cv_prog_CPP=$CPP
2238
2239 fi
2240   CPP=$ac_cv_prog_CPP
2241 else
2242   ac_cv_prog_CPP=$CPP
2243 fi
2244 echo "$as_me:2244: result: $CPP" >&5
2245 echo "${ECHO_T}$CPP" >&6
2246 ac_preproc_ok=false
2247 for ac_c_preproc_warn_flag in '' yes
2248 do
2249   # Use a header file that comes with gcc, so configuring glibc
2250   # with a fresh cross-compiler works.
2251   # On the NeXT, cc -E runs the code through the compiler's parser,
2252   # not just through cpp. "Syntax error" is here to catch this case.
2253   cat >conftest.$ac_ext <<_ACEOF
2254 #line 2254 "configure"
2255 #include "confdefs.h"
2256 #include <assert.h>
2257                      Syntax error
2258 _ACEOF
2259 if { (eval echo "$as_me:2259: \"$ac_cpp conftest.$ac_ext\"") >&5
2260   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2261   ac_status=$?
2262   egrep -v '^ *\+' conftest.er1 >conftest.err
2263   rm -f conftest.er1
2264   cat conftest.err >&5
2265   echo "$as_me:2265: \$? = $ac_status" >&5
2266   (exit $ac_status); } >/dev/null; then
2267   if test -s conftest.err; then
2268     ac_cpp_err=$ac_c_preproc_warn_flag
2269   else
2270     ac_cpp_err=
2271   fi
2272 else
2273   ac_cpp_err=yes
2274 fi
2275 if test -z "$ac_cpp_err"; then
2276   :
2277 else
2278   echo "$as_me: failed program was:" >&5
2279   cat conftest.$ac_ext >&5
2280   # Broken: fails on valid input.
2281 continue
2282 fi
2283 rm -f conftest.err conftest.$ac_ext
2284
2285   # OK, works on sane cases.  Now check whether non-existent headers
2286   # can be detected and how.
2287   cat >conftest.$ac_ext <<_ACEOF
2288 #line 2288 "configure"
2289 #include "confdefs.h"
2290 #include <ac_nonexistent.h>
2291 _ACEOF
2292 if { (eval echo "$as_me:2292: \"$ac_cpp conftest.$ac_ext\"") >&5
2293   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2294   ac_status=$?
2295   egrep -v '^ *\+' conftest.er1 >conftest.err
2296   rm -f conftest.er1
2297   cat conftest.err >&5
2298   echo "$as_me:2298: \$? = $ac_status" >&5
2299   (exit $ac_status); } >/dev/null; then
2300   if test -s conftest.err; then
2301     ac_cpp_err=$ac_c_preproc_warn_flag
2302   else
2303     ac_cpp_err=
2304   fi
2305 else
2306   ac_cpp_err=yes
2307 fi
2308 if test -z "$ac_cpp_err"; then
2309   # Broken: success on invalid input.
2310 continue
2311 else
2312   echo "$as_me: failed program was:" >&5
2313   cat conftest.$ac_ext >&5
2314   # Passes both tests.
2315 ac_preproc_ok=:
2316 break
2317 fi
2318 rm -f conftest.err conftest.$ac_ext
2319
2320 done
2321 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2322 rm -f conftest.err conftest.$ac_ext
2323 if $ac_preproc_ok; then
2324   :
2325 else
2326   { { echo "$as_me:2326: error: C preprocessor \"$CPP\" fails sanity check" >&5
2327 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2328    { (exit 1); exit 1; }; }
2329 fi
2330
2331 ac_ext=c
2332 ac_cpp='$CPP $CPPFLAGS'
2333 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2334 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2335 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2336 ac_main_return=return
2337
2338 if test $ac_cv_c_compiler_gnu = yes; then
2339     echo "$as_me:2339: checking whether $CC needs -traditional" >&5
2340 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2341 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2342   echo $ECHO_N "(cached) $ECHO_C" >&6
2343 else
2344     ac_pattern="Autoconf.*'x'"
2345   cat >conftest.$ac_ext <<_ACEOF
2346 #line 2346 "configure"
2347 #include "confdefs.h"
2348 #include <sgtty.h>
2349 int Autoconf = TIOCGETP;
2350 _ACEOF
2351 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2352   egrep "$ac_pattern" >/dev/null 2>&1; then
2353   ac_cv_prog_gcc_traditional=yes
2354 else
2355   ac_cv_prog_gcc_traditional=no
2356 fi
2357 rm -rf conftest*
2358
2359   if test $ac_cv_prog_gcc_traditional = no; then
2360     cat >conftest.$ac_ext <<_ACEOF
2361 #line 2361 "configure"
2362 #include "confdefs.h"
2363 #include <termio.h>
2364 int Autoconf = TCGETA;
2365 _ACEOF
2366 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2367   egrep "$ac_pattern" >/dev/null 2>&1; then
2368   ac_cv_prog_gcc_traditional=yes
2369 fi
2370 rm -rf conftest*
2371
2372   fi
2373 fi
2374 echo "$as_me:2374: result: $ac_cv_prog_gcc_traditional" >&5
2375 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2376   if test $ac_cv_prog_gcc_traditional = yes; then
2377     CC="$CC -traditional"
2378   fi
2379 fi
2380
2381 echo "$as_me:2381: checking whether $CC understands -c and -o together" >&5
2382 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2383 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2384   echo $ECHO_N "(cached) $ECHO_C" >&6
2385 else
2386
2387 cat > conftest.$ac_ext <<CF_EOF
2388 #include <stdio.h>
2389 int main()
2390 {
2391         ${cf_cv_main_return:-return}(0);
2392 }
2393 CF_EOF
2394 # We do the test twice because some compilers refuse to overwrite an
2395 # existing .o file with -o, though they will create one.
2396 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2397 if { (eval echo "$as_me:2397: \"$ac_try\"") >&5
2398   (eval $ac_try) 2>&5
2399   ac_status=$?
2400   echo "$as_me:2400: \$? = $ac_status" >&5
2401   (exit $ac_status); } &&
2402   test -f conftest2.$ac_objext && { (eval echo "$as_me:2402: \"$ac_try\"") >&5
2403   (eval $ac_try) 2>&5
2404   ac_status=$?
2405   echo "$as_me:2405: \$? = $ac_status" >&5
2406   (exit $ac_status); };
2407 then
2408   eval cf_cv_prog_CC_c_o=yes
2409 else
2410   eval cf_cv_prog_CC_c_o=no
2411 fi
2412 rm -rf conftest*
2413
2414 fi
2415 if test $cf_cv_prog_CC_c_o = yes; then
2416   echo "$as_me:2416: result: yes" >&5
2417 echo "${ECHO_T}yes" >&6
2418 else
2419   echo "$as_me:2419: result: no" >&5
2420 echo "${ECHO_T}no" >&6
2421 fi
2422
2423 if test "$cross_compiling" = yes ; then
2424   LDCONFIG=:
2425 else
2426 case "$cf_cv_system_name" in #(vi
2427 dragonfly*|mirbsd*|freebsd*) #(vi
2428   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2429   ;;
2430 *) LDPATH=$PATH:/sbin:/usr/sbin
2431   # Extract the first word of "ldconfig", so it can be a program name with args.
2432 set dummy ldconfig; ac_word=$2
2433 echo "$as_me:2433: checking for $ac_word" >&5
2434 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2435 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2436   echo $ECHO_N "(cached) $ECHO_C" >&6
2437 else
2438   case $LDCONFIG in
2439   [\\/]* | ?:[\\/]*)
2440   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2441   ;;
2442   *)
2443   ac_save_IFS=$IFS; IFS=$ac_path_separator
2444 ac_dummy="$LDPATH"
2445 for ac_dir in $ac_dummy; do
2446   IFS=$ac_save_IFS
2447   test -z "$ac_dir" && ac_dir=.
2448   if $as_executable_p "$ac_dir/$ac_word"; then
2449    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2450    echo "$as_me:2450: found $ac_dir/$ac_word" >&5
2451    break
2452 fi
2453 done
2454
2455   ;;
2456 esac
2457 fi
2458 LDCONFIG=$ac_cv_path_LDCONFIG
2459
2460 if test -n "$LDCONFIG"; then
2461   echo "$as_me:2461: result: $LDCONFIG" >&5
2462 echo "${ECHO_T}$LDCONFIG" >&6
2463 else
2464   echo "$as_me:2464: result: no" >&5
2465 echo "${ECHO_T}no" >&6
2466 fi
2467
2468   ;;
2469 esac
2470 fi
2471
2472 echo "$as_me:2472: checking if you want to ensure bool is consistent with C++" >&5
2473 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2474
2475 # Check whether --with-cxx or --without-cxx was given.
2476 if test "${with_cxx+set}" = set; then
2477   withval="$with_cxx"
2478   cf_with_cxx=$withval
2479 else
2480   cf_with_cxx=yes
2481 fi;
2482 echo "$as_me:2482: result: $cf_with_cxx" >&5
2483 echo "${ECHO_T}$cf_with_cxx" >&6
2484 if test "X$cf_with_cxx" = Xno ; then
2485         CXX=""
2486         GXX=""
2487 else
2488         # with autoconf 2.13, we can change the error to a warning:
2489                 ac_ext=cc
2490 ac_cpp='$CXXCPP $CPPFLAGS'
2491 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2492 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2493 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2494 ac_main_return=return
2495 if test -n "$ac_tool_prefix"; then
2496   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2497   do
2498     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2499 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2500 echo "$as_me:2500: checking for $ac_word" >&5
2501 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2502 if test "${ac_cv_prog_CXX+set}" = set; then
2503   echo $ECHO_N "(cached) $ECHO_C" >&6
2504 else
2505   if test -n "$CXX"; then
2506   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2507 else
2508   ac_save_IFS=$IFS; IFS=$ac_path_separator
2509 ac_dummy="$PATH"
2510 for ac_dir in $ac_dummy; do
2511   IFS=$ac_save_IFS
2512   test -z "$ac_dir" && ac_dir=.
2513   $as_executable_p "$ac_dir/$ac_word" || continue
2514 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2515 echo "$as_me:2515: found $ac_dir/$ac_word" >&5
2516 break
2517 done
2518
2519 fi
2520 fi
2521 CXX=$ac_cv_prog_CXX
2522 if test -n "$CXX"; then
2523   echo "$as_me:2523: result: $CXX" >&5
2524 echo "${ECHO_T}$CXX" >&6
2525 else
2526   echo "$as_me:2526: result: no" >&5
2527 echo "${ECHO_T}no" >&6
2528 fi
2529
2530     test -n "$CXX" && break
2531   done
2532 fi
2533 if test -z "$CXX"; then
2534   ac_ct_CXX=$CXX
2535   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2536 do
2537   # Extract the first word of "$ac_prog", so it can be a program name with args.
2538 set dummy $ac_prog; ac_word=$2
2539 echo "$as_me:2539: checking for $ac_word" >&5
2540 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2541 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2542   echo $ECHO_N "(cached) $ECHO_C" >&6
2543 else
2544   if test -n "$ac_ct_CXX"; then
2545   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2546 else
2547   ac_save_IFS=$IFS; IFS=$ac_path_separator
2548 ac_dummy="$PATH"
2549 for ac_dir in $ac_dummy; do
2550   IFS=$ac_save_IFS
2551   test -z "$ac_dir" && ac_dir=.
2552   $as_executable_p "$ac_dir/$ac_word" || continue
2553 ac_cv_prog_ac_ct_CXX="$ac_prog"
2554 echo "$as_me:2554: found $ac_dir/$ac_word" >&5
2555 break
2556 done
2557
2558 fi
2559 fi
2560 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2561 if test -n "$ac_ct_CXX"; then
2562   echo "$as_me:2562: result: $ac_ct_CXX" >&5
2563 echo "${ECHO_T}$ac_ct_CXX" >&6
2564 else
2565   echo "$as_me:2565: result: no" >&5
2566 echo "${ECHO_T}no" >&6
2567 fi
2568
2569   test -n "$ac_ct_CXX" && break
2570 done
2571 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2572
2573   CXX=$ac_ct_CXX
2574 fi
2575
2576 # Provide some information about the compiler.
2577 echo "$as_me:2577:" \
2578      "checking for C++ compiler version" >&5
2579 ac_compiler=`set X $ac_compile; echo $2`
2580 { (eval echo "$as_me:2580: \"$ac_compiler --version </dev/null >&5\"") >&5
2581   (eval $ac_compiler --version </dev/null >&5) 2>&5
2582   ac_status=$?
2583   echo "$as_me:2583: \$? = $ac_status" >&5
2584   (exit $ac_status); }
2585 { (eval echo "$as_me:2585: \"$ac_compiler -v </dev/null >&5\"") >&5
2586   (eval $ac_compiler -v </dev/null >&5) 2>&5
2587   ac_status=$?
2588   echo "$as_me:2588: \$? = $ac_status" >&5
2589   (exit $ac_status); }
2590 { (eval echo "$as_me:2590: \"$ac_compiler -V </dev/null >&5\"") >&5
2591   (eval $ac_compiler -V </dev/null >&5) 2>&5
2592   ac_status=$?
2593   echo "$as_me:2593: \$? = $ac_status" >&5
2594   (exit $ac_status); }
2595
2596 echo "$as_me:2596: checking whether we are using the GNU C++ compiler" >&5
2597 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2598 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2599   echo $ECHO_N "(cached) $ECHO_C" >&6
2600 else
2601   cat >conftest.$ac_ext <<_ACEOF
2602 #line 2602 "configure"
2603 #include "confdefs.h"
2604
2605 int
2606 main ()
2607 {
2608 #ifndef __GNUC__
2609        choke me
2610 #endif
2611
2612   ;
2613   return 0;
2614 }
2615 _ACEOF
2616 rm -f conftest.$ac_objext
2617 if { (eval echo "$as_me:2617: \"$ac_compile\"") >&5
2618   (eval $ac_compile) 2>&5
2619   ac_status=$?
2620   echo "$as_me:2620: \$? = $ac_status" >&5
2621   (exit $ac_status); } &&
2622          { ac_try='test -s conftest.$ac_objext'
2623   { (eval echo "$as_me:2623: \"$ac_try\"") >&5
2624   (eval $ac_try) 2>&5
2625   ac_status=$?
2626   echo "$as_me:2626: \$? = $ac_status" >&5
2627   (exit $ac_status); }; }; then
2628   ac_compiler_gnu=yes
2629 else
2630   echo "$as_me: failed program was:" >&5
2631 cat conftest.$ac_ext >&5
2632 ac_compiler_gnu=no
2633 fi
2634 rm -f conftest.$ac_objext conftest.$ac_ext
2635 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2636
2637 fi
2638 echo "$as_me:2638: result: $ac_cv_cxx_compiler_gnu" >&5
2639 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2640 GXX=`test $ac_compiler_gnu = yes && echo yes`
2641 ac_test_CXXFLAGS=${CXXFLAGS+set}
2642 ac_save_CXXFLAGS=$CXXFLAGS
2643 CXXFLAGS="-g"
2644 echo "$as_me:2644: checking whether $CXX accepts -g" >&5
2645 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2646 if test "${ac_cv_prog_cxx_g+set}" = set; then
2647   echo $ECHO_N "(cached) $ECHO_C" >&6
2648 else
2649   cat >conftest.$ac_ext <<_ACEOF
2650 #line 2650 "configure"
2651 #include "confdefs.h"
2652
2653 int
2654 main ()
2655 {
2656
2657   ;
2658   return 0;
2659 }
2660 _ACEOF
2661 rm -f conftest.$ac_objext
2662 if { (eval echo "$as_me:2662: \"$ac_compile\"") >&5
2663   (eval $ac_compile) 2>&5
2664   ac_status=$?
2665   echo "$as_me:2665: \$? = $ac_status" >&5
2666   (exit $ac_status); } &&
2667          { ac_try='test -s conftest.$ac_objext'
2668   { (eval echo "$as_me:2668: \"$ac_try\"") >&5
2669   (eval $ac_try) 2>&5
2670   ac_status=$?
2671   echo "$as_me:2671: \$? = $ac_status" >&5
2672   (exit $ac_status); }; }; then
2673   ac_cv_prog_cxx_g=yes
2674 else
2675   echo "$as_me: failed program was:" >&5
2676 cat conftest.$ac_ext >&5
2677 ac_cv_prog_cxx_g=no
2678 fi
2679 rm -f conftest.$ac_objext conftest.$ac_ext
2680 fi
2681 echo "$as_me:2681: result: $ac_cv_prog_cxx_g" >&5
2682 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2683 if test "$ac_test_CXXFLAGS" = set; then
2684   CXXFLAGS=$ac_save_CXXFLAGS
2685 elif test $ac_cv_prog_cxx_g = yes; then
2686   if test "$GXX" = yes; then
2687     CXXFLAGS="-g -O2"
2688   else
2689     CXXFLAGS="-g"
2690   fi
2691 else
2692   if test "$GXX" = yes; then
2693     CXXFLAGS="-O2"
2694   else
2695     CXXFLAGS=
2696   fi
2697 fi
2698 for ac_declaration in \
2699    ''\
2700    '#include <stdlib.h>' \
2701    'extern "C" void std::exit (int) throw (); using std::exit;' \
2702    'extern "C" void std::exit (int); using std::exit;' \
2703    'extern "C" void exit (int) throw ();' \
2704    'extern "C" void exit (int);' \
2705    'void exit (int);'
2706 do
2707   cat >conftest.$ac_ext <<_ACEOF
2708 #line 2708 "configure"
2709 #include "confdefs.h"
2710 #include <stdlib.h>
2711 $ac_declaration
2712 int
2713 main ()
2714 {
2715 exit (42);
2716   ;
2717   return 0;
2718 }
2719 _ACEOF
2720 rm -f conftest.$ac_objext
2721 if { (eval echo "$as_me:2721: \"$ac_compile\"") >&5
2722   (eval $ac_compile) 2>&5
2723   ac_status=$?
2724   echo "$as_me:2724: \$? = $ac_status" >&5
2725   (exit $ac_status); } &&
2726          { ac_try='test -s conftest.$ac_objext'
2727   { (eval echo "$as_me:2727: \"$ac_try\"") >&5
2728   (eval $ac_try) 2>&5
2729   ac_status=$?
2730   echo "$as_me:2730: \$? = $ac_status" >&5
2731   (exit $ac_status); }; }; then
2732   :
2733 else
2734   echo "$as_me: failed program was:" >&5
2735 cat conftest.$ac_ext >&5
2736 continue
2737 fi
2738 rm -f conftest.$ac_objext conftest.$ac_ext
2739   cat >conftest.$ac_ext <<_ACEOF
2740 #line 2740 "configure"
2741 #include "confdefs.h"
2742 $ac_declaration
2743 int
2744 main ()
2745 {
2746 exit (42);
2747   ;
2748   return 0;
2749 }
2750 _ACEOF
2751 rm -f conftest.$ac_objext
2752 if { (eval echo "$as_me:2752: \"$ac_compile\"") >&5
2753   (eval $ac_compile) 2>&5
2754   ac_status=$?
2755   echo "$as_me:2755: \$? = $ac_status" >&5
2756   (exit $ac_status); } &&
2757          { ac_try='test -s conftest.$ac_objext'
2758   { (eval echo "$as_me:2758: \"$ac_try\"") >&5
2759   (eval $ac_try) 2>&5
2760   ac_status=$?
2761   echo "$as_me:2761: \$? = $ac_status" >&5
2762   (exit $ac_status); }; }; then
2763   break
2764 else
2765   echo "$as_me: failed program was:" >&5
2766 cat conftest.$ac_ext >&5
2767 fi
2768 rm -f conftest.$ac_objext conftest.$ac_ext
2769 done
2770 rm -rf conftest*
2771 if test -n "$ac_declaration"; then
2772   echo '#ifdef __cplusplus' >>confdefs.h
2773   echo $ac_declaration      >>confdefs.h
2774   echo '#endif'             >>confdefs.h
2775 fi
2776
2777 ac_ext=c
2778 ac_cpp='$CPP $CPPFLAGS'
2779 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2780 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2781 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2782 ac_main_return=return
2783
2784                 # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2785         if test "$CXX" = "g++" ; then
2786                 # Extract the first word of "g++", so it can be a program name with args.
2787 set dummy g++; ac_word=$2
2788 echo "$as_me:2788: checking for $ac_word" >&5
2789 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2790 if test "${ac_cv_path_CXX+set}" = set; then
2791   echo $ECHO_N "(cached) $ECHO_C" >&6
2792 else
2793   case $CXX in
2794   [\\/]* | ?:[\\/]*)
2795   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2796   ;;
2797   *)
2798   ac_save_IFS=$IFS; IFS=$ac_path_separator
2799 ac_dummy="$PATH"
2800 for ac_dir in $ac_dummy; do
2801   IFS=$ac_save_IFS
2802   test -z "$ac_dir" && ac_dir=.
2803   if $as_executable_p "$ac_dir/$ac_word"; then
2804    ac_cv_path_CXX="$ac_dir/$ac_word"
2805    echo "$as_me:2805: found $ac_dir/$ac_word" >&5
2806    break
2807 fi
2808 done
2809
2810   ;;
2811 esac
2812 fi
2813 CXX=$ac_cv_path_CXX
2814
2815 if test -n "$CXX"; then
2816   echo "$as_me:2816: result: $CXX" >&5
2817 echo "${ECHO_T}$CXX" >&6
2818 else
2819   echo "$as_me:2819: result: no" >&5
2820 echo "${ECHO_T}no" >&6
2821 fi
2822
2823         fi
2824         case "x$CXX" in #(vi
2825         x|xg++)
2826                 { echo "$as_me:2826: WARNING: You don't have any C++ compiler, too bad" >&5
2827 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2828                 cf_with_cxx=no; CXX=""; GXX="";
2829                 ;;
2830         esac
2831 fi
2832
2833 GXX_VERSION=none
2834 if test "$GXX" = yes; then
2835         echo "$as_me:2835: checking version of ${CXX:-g++}" >&5
2836 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2837         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2838         test -z "$GXX_VERSION" && GXX_VERSION=unknown
2839         echo "$as_me:2839: result: $GXX_VERSION" >&5
2840 echo "${ECHO_T}$GXX_VERSION" >&6
2841 fi
2842
2843 case $GXX_VERSION in
2844 1*|2.[0-6]*)
2845         # GXX=""; CXX=""; ac_cv_prog_gxx=no
2846         # cf_cxx_library=no
2847         { echo "$as_me:2847: WARNING: templates do not work" >&5
2848 echo "$as_me: WARNING: templates do not work" >&2;}
2849         ;;
2850 esac
2851
2852 echo "$as_me:2852: checking if you want to build C++ binding and demo" >&5
2853 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
2854
2855 # Check whether --with-cxx-binding or --without-cxx-binding was given.
2856 if test "${with_cxx_binding+set}" = set; then
2857   withval="$with_cxx_binding"
2858   cf_with_cxx_binding=$withval
2859 else
2860   cf_with_cxx_binding=$cf_with_cxx
2861 fi;
2862 echo "$as_me:2862: result: $cf_with_cxx_binding" >&5
2863 echo "${ECHO_T}$cf_with_cxx_binding" >&6
2864
2865 echo "$as_me:2865: checking if you want to build with Ada95" >&5
2866 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
2867 echo "$as_me:2867: result: $cf_with_ada" >&5
2868 echo "${ECHO_T}$cf_with_ada" >&6
2869
2870 echo "$as_me:2870: checking if you want to install terminal database" >&5
2871 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
2872
2873 # Check whether --enable-db-install or --disable-db-install was given.
2874 if test "${enable_db_install+set}" = set; then
2875   enableval="$enable_db_install"
2876   cf_with_db_install=$enableval
2877 else
2878   cf_with_db_install=yes
2879 fi;
2880 echo "$as_me:2880: result: $cf_with_db_install" >&5
2881 echo "${ECHO_T}$cf_with_db_install" >&6
2882
2883 echo "$as_me:2883: checking if you want to install manpages" >&5
2884 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
2885
2886 # Check whether --with-manpages or --without-manpages was given.
2887 if test "${with_manpages+set}" = set; then
2888   withval="$with_manpages"
2889   cf_with_manpages=$withval
2890 else
2891   cf_with_manpages=yes
2892 fi;
2893 echo "$as_me:2893: result: $cf_with_manpages" >&5
2894 echo "${ECHO_T}$cf_with_manpages" >&6
2895
2896 echo "$as_me:2896: checking if you want to build programs such as tic" >&5
2897 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
2898
2899 # Check whether --with-progs or --without-progs was given.
2900 if test "${with_progs+set}" = set; then
2901   withval="$with_progs"
2902   cf_with_progs=$withval
2903 else
2904   cf_with_progs=yes
2905 fi;
2906 echo "$as_me:2906: result: $cf_with_progs" >&5
2907 echo "${ECHO_T}$cf_with_progs" >&6
2908
2909 echo "$as_me:2909: checking if you want to build test-programs" >&5
2910 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2911
2912 # Check whether --with-tests or --without-tests was given.
2913 if test "${with_tests+set}" = set; then
2914   withval="$with_tests"
2915   cf_with_tests=$withval
2916 else
2917   cf_with_tests=yes
2918 fi;
2919 echo "$as_me:2919: result: $cf_with_tests" >&5
2920 echo "${ECHO_T}$cf_with_tests" >&6
2921
2922 echo "$as_me:2922: checking if you wish to install curses.h" >&5
2923 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
2924
2925 # Check whether --with-curses-h or --without-curses-h was given.
2926 if test "${with_curses_h+set}" = set; then
2927   withval="$with_curses_h"
2928   with_curses_h=$withval
2929 else
2930   with_curses_h=yes
2931 fi;
2932 echo "$as_me:2932: result: $with_curses_h" >&5
2933 echo "${ECHO_T}$with_curses_h" >&6
2934
2935 modules_to_build="ncurses"
2936 if test "X$cf_with_progs" != Xno ; then
2937 modules_to_build="$modules_to_build progs tack"
2938 fi
2939 modules_to_build="$modules_to_build panel menu form"
2940
2941 test "$program_prefix" != NONE &&
2942   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2943 # Use a double $ so make ignores it.
2944 test "$program_suffix" != NONE &&
2945   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2946 # Double any \ or $.  echo might interpret backslashes.
2947 # By default was `s,x,x', remove it if useless.
2948 cat <<\_ACEOF >conftest.sed
2949 s/[\\$]/&&/g;s/;s,x,x,$//
2950 _ACEOF
2951 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2952 rm conftest.sed
2953
2954 for ac_prog in mawk gawk nawk awk
2955 do
2956   # Extract the first word of "$ac_prog", so it can be a program name with args.
2957 set dummy $ac_prog; ac_word=$2
2958 echo "$as_me:2958: checking for $ac_word" >&5
2959 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2960 if test "${ac_cv_prog_AWK+set}" = set; then
2961   echo $ECHO_N "(cached) $ECHO_C" >&6
2962 else
2963   if test -n "$AWK"; then
2964   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2965 else
2966   ac_save_IFS=$IFS; IFS=$ac_path_separator
2967 ac_dummy="$PATH"
2968 for ac_dir in $ac_dummy; do
2969   IFS=$ac_save_IFS
2970   test -z "$ac_dir" && ac_dir=.
2971   $as_executable_p "$ac_dir/$ac_word" || continue
2972 ac_cv_prog_AWK="$ac_prog"
2973 echo "$as_me:2973: found $ac_dir/$ac_word" >&5
2974 break
2975 done
2976
2977 fi
2978 fi
2979 AWK=$ac_cv_prog_AWK
2980 if test -n "$AWK"; then
2981   echo "$as_me:2981: result: $AWK" >&5
2982 echo "${ECHO_T}$AWK" >&6
2983 else
2984   echo "$as_me:2984: result: no" >&5
2985 echo "${ECHO_T}no" >&6
2986 fi
2987
2988   test -n "$AWK" && break
2989 done
2990
2991 test -z "$AWK" && { { echo "$as_me:2991: error: No awk program found" >&5
2992 echo "$as_me: error: No awk program found" >&2;}
2993    { (exit 1); exit 1; }; }
2994
2995 echo "$as_me:2995: checking for egrep" >&5
2996 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2997 if test "${ac_cv_prog_egrep+set}" = set; then
2998   echo $ECHO_N "(cached) $ECHO_C" >&6
2999 else
3000   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3001     then ac_cv_prog_egrep='grep -E'
3002     else ac_cv_prog_egrep='egrep'
3003     fi
3004 fi
3005 echo "$as_me:3005: result: $ac_cv_prog_egrep" >&5
3006 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3007  EGREP=$ac_cv_prog_egrep
3008
3009 test -z "$EGREP" && { { echo "$as_me:3009: error: No egrep program found" >&5
3010 echo "$as_me: error: No egrep program found" >&2;}
3011    { (exit 1); exit 1; }; }
3012
3013 # Find a good install program.  We prefer a C program (faster),
3014 # so one script is as good as another.  But avoid the broken or
3015 # incompatible versions:
3016 # SysV /etc/install, /usr/sbin/install
3017 # SunOS /usr/etc/install
3018 # IRIX /sbin/install
3019 # AIX /bin/install
3020 # AmigaOS /C/install, which installs bootblocks on floppy discs
3021 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3022 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3023 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3024 # ./install, which can be erroneously created by make from ./install.sh.
3025 echo "$as_me:3025: checking for a BSD compatible install" >&5
3026 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3027 if test -z "$INSTALL"; then
3028 if test "${ac_cv_path_install+set}" = set; then
3029   echo $ECHO_N "(cached) $ECHO_C" >&6
3030 else
3031     ac_save_IFS=$IFS; IFS=$ac_path_separator
3032   for ac_dir in $PATH; do
3033     IFS=$ac_save_IFS
3034     # Account for people who put trailing slashes in PATH elements.
3035     case $ac_dir/ in
3036     / | ./ | .// | /cC/* \
3037     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3038     | /usr/ucb/* ) ;;
3039     *)
3040       # OSF1 and SCO ODT 3.0 have their own names for install.
3041       # Don't use installbsd from OSF since it installs stuff as root
3042       # by default.
3043       for ac_prog in ginstall scoinst install; do
3044         if $as_executable_p "$ac_dir/$ac_prog"; then
3045           if test $ac_prog = install &&
3046             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3047             # AIX install.  It has an incompatible calling convention.
3048             :
3049           elif test $ac_prog = install &&
3050             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3051             # program-specific install script used by HP pwplus--don't use.
3052             :
3053           else
3054             ac_cv_path_install="$ac_dir/$ac_prog -c"
3055             break 2
3056           fi
3057         fi
3058       done
3059       ;;
3060     esac
3061   done
3062
3063 fi
3064   if test "${ac_cv_path_install+set}" = set; then
3065     INSTALL=$ac_cv_path_install
3066   else
3067     # As a last resort, use the slow shell script.  We don't cache a
3068     # path for INSTALL within a source directory, because that will
3069     # break other packages using the cache if that directory is
3070     # removed, or if the path is relative.
3071     INSTALL=$ac_install_sh
3072   fi
3073 fi
3074 echo "$as_me:3074: result: $INSTALL" >&5
3075 echo "${ECHO_T}$INSTALL" >&6
3076
3077 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3078 # It thinks the first close brace ends the variable substitution.
3079 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3080
3081 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3082
3083 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3084
3085 case $INSTALL in
3086 /*)
3087   ;;
3088 *)
3089   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3090   test -z "$cf_dir" && cf_dir=.
3091   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3092   ;;
3093 esac
3094
3095 for ac_prog in tdlint lint alint splint lclint
3096 do
3097   # Extract the first word of "$ac_prog", so it can be a program name with args.
3098 set dummy $ac_prog; ac_word=$2
3099 echo "$as_me:3099: checking for $ac_word" >&5
3100 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3101 if test "${ac_cv_prog_LINT+set}" = set; then
3102   echo $ECHO_N "(cached) $ECHO_C" >&6
3103 else
3104   if test -n "$LINT"; then
3105   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3106 else
3107   ac_save_IFS=$IFS; IFS=$ac_path_separator
3108 ac_dummy="$PATH"
3109 for ac_dir in $ac_dummy; do
3110   IFS=$ac_save_IFS
3111   test -z "$ac_dir" && ac_dir=.
3112   $as_executable_p "$ac_dir/$ac_word" || continue
3113 ac_cv_prog_LINT="$ac_prog"
3114 echo "$as_me:3114: found $ac_dir/$ac_word" >&5
3115 break
3116 done
3117
3118 fi
3119 fi
3120 LINT=$ac_cv_prog_LINT
3121 if test -n "$LINT"; then
3122   echo "$as_me:3122: result: $LINT" >&5
3123 echo "${ECHO_T}$LINT" >&6
3124 else
3125   echo "$as_me:3125: result: no" >&5
3126 echo "${ECHO_T}no" >&6
3127 fi
3128
3129   test -n "$LINT" && break
3130 done
3131
3132 echo "$as_me:3132: checking whether ln -s works" >&5
3133 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3134 LN_S=$as_ln_s
3135 if test "$LN_S" = "ln -s"; then
3136   echo "$as_me:3136: result: yes" >&5
3137 echo "${ECHO_T}yes" >&6
3138 else
3139   echo "$as_me:3139: result: no, using $LN_S" >&5
3140 echo "${ECHO_T}no, using $LN_S" >&6
3141 fi
3142
3143 echo "$as_me:3143: checking if $LN_S -f options work" >&5
3144 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3145
3146 rm -f conf$$.src conf$$dst
3147 echo >conf$$.dst
3148 echo first >conf$$.src
3149 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3150         cf_prog_ln_sf=yes
3151 else
3152         cf_prog_ln_sf=no
3153 fi
3154 rm -f conf$$.dst conf$$src
3155 echo "$as_me:3155: result: $cf_prog_ln_sf" >&5
3156 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3157
3158 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3159
3160 echo "$as_me:3160: checking for long file names" >&5
3161 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3162 if test "${ac_cv_sys_long_file_names+set}" = set; then
3163   echo $ECHO_N "(cached) $ECHO_C" >&6
3164 else
3165   ac_cv_sys_long_file_names=yes
3166 # Test for long file names in all the places we know might matter:
3167 #      .                the current directory, where building will happen
3168 #      $prefix/lib      where we will be installing things
3169 #      $exec_prefix/lib likewise
3170 # eval it to expand exec_prefix.
3171 #      $TMPDIR          if set, where it might want to write temporary files
3172 # if $TMPDIR is not set:
3173 #      /tmp             where it might want to write temporary files
3174 #      /var/tmp         likewise
3175 #      /usr/tmp         likewise
3176 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3177   ac_tmpdirs=$TMPDIR
3178 else
3179   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3180 fi
3181 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3182   test -d $ac_dir || continue
3183   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3184   ac_xdir=$ac_dir/cf$$
3185   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3186   ac_tf1=$ac_xdir/conftest9012345
3187   ac_tf2=$ac_xdir/conftest9012346
3188   (echo 1 >$ac_tf1) 2>/dev/null
3189   (echo 2 >$ac_tf2) 2>/dev/null
3190   ac_val=`cat $ac_tf1 2>/dev/null`
3191   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3192     ac_cv_sys_long_file_names=no
3193     rm -rf $ac_xdir 2>/dev/null
3194     break
3195   fi
3196   rm -rf $ac_xdir 2>/dev/null
3197 done
3198 fi
3199 echo "$as_me:3199: result: $ac_cv_sys_long_file_names" >&5
3200 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3201 if test $ac_cv_sys_long_file_names = yes; then
3202
3203 cat >>confdefs.h <<\EOF
3204 #define HAVE_LONG_FILE_NAMES 1
3205 EOF
3206
3207 fi
3208
3209 # if we find pkg-config, check if we should install the ".pc" files.
3210
3211 echo "$as_me:3211: checking if you want to use pkg-config" >&5
3212 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3213
3214 # Check whether --with-pkg-config or --without-pkg-config was given.
3215 if test "${with_pkg_config+set}" = set; then
3216   withval="$with_pkg_config"
3217   cf_pkg_config=$withval
3218 else
3219   cf_pkg_config=yes
3220 fi;
3221 echo "$as_me:3221: result: $cf_pkg_config" >&5
3222 echo "${ECHO_T}$cf_pkg_config" >&6
3223
3224 case $cf_pkg_config in #(vi
3225 no) #(vi
3226         PKG_CONFIG=none
3227         ;;
3228 yes) #(vi
3229
3230 if test -n "$ac_tool_prefix"; then
3231   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3232 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3233 echo "$as_me:3233: checking for $ac_word" >&5
3234 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3235 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3236   echo $ECHO_N "(cached) $ECHO_C" >&6
3237 else
3238   case $PKG_CONFIG in
3239   [\\/]* | ?:[\\/]*)
3240   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3241   ;;
3242   *)
3243   ac_save_IFS=$IFS; IFS=$ac_path_separator
3244 ac_dummy="$PATH"
3245 for ac_dir in $ac_dummy; do
3246   IFS=$ac_save_IFS
3247   test -z "$ac_dir" && ac_dir=.
3248   if $as_executable_p "$ac_dir/$ac_word"; then
3249    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3250    echo "$as_me:3250: found $ac_dir/$ac_word" >&5
3251    break
3252 fi
3253 done
3254
3255   ;;
3256 esac
3257 fi
3258 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3259
3260 if test -n "$PKG_CONFIG"; then
3261   echo "$as_me:3261: result: $PKG_CONFIG" >&5
3262 echo "${ECHO_T}$PKG_CONFIG" >&6
3263 else
3264   echo "$as_me:3264: result: no" >&5
3265 echo "${ECHO_T}no" >&6
3266 fi
3267
3268 fi
3269 if test -z "$ac_cv_path_PKG_CONFIG"; then
3270   ac_pt_PKG_CONFIG=$PKG_CONFIG
3271   # Extract the first word of "pkg-config", so it can be a program name with args.
3272 set dummy pkg-config; ac_word=$2
3273 echo "$as_me:3273: checking for $ac_word" >&5
3274 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3275 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3276   echo $ECHO_N "(cached) $ECHO_C" >&6
3277 else
3278   case $ac_pt_PKG_CONFIG in
3279   [\\/]* | ?:[\\/]*)
3280   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3281   ;;
3282   *)
3283   ac_save_IFS=$IFS; IFS=$ac_path_separator
3284 ac_dummy="$PATH"
3285 for ac_dir in $ac_dummy; do
3286   IFS=$ac_save_IFS
3287   test -z "$ac_dir" && ac_dir=.
3288   if $as_executable_p "$ac_dir/$ac_word"; then
3289    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3290    echo "$as_me:3290: found $ac_dir/$ac_word" >&5
3291    break
3292 fi
3293 done
3294
3295   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3296   ;;
3297 esac
3298 fi
3299 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3300
3301 if test -n "$ac_pt_PKG_CONFIG"; then
3302   echo "$as_me:3302: result: $ac_pt_PKG_CONFIG" >&5
3303 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3304 else
3305   echo "$as_me:3305: result: no" >&5
3306 echo "${ECHO_T}no" >&6
3307 fi
3308
3309   PKG_CONFIG=$ac_pt_PKG_CONFIG
3310 else
3311   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3312 fi
3313
3314         ;;
3315 *)
3316         PKG_CONFIG=$withval
3317         ;;
3318 esac
3319
3320 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3321 if test "$PKG_CONFIG" != none ; then
3322
3323 if test "x$prefix" != xNONE; then
3324   cf_path_syntax="$prefix"
3325 else
3326   cf_path_syntax="$ac_default_prefix"
3327 fi
3328
3329 case ".$PKG_CONFIG" in #(vi
3330 .\$\(*\)*|.\'*\'*) #(vi
3331   ;;
3332 ..|./*|.\\*) #(vi
3333   ;;
3334 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3335   ;;
3336 .\${*prefix}*|.\${*dir}*) #(vi
3337   eval PKG_CONFIG="$PKG_CONFIG"
3338   case ".$PKG_CONFIG" in #(vi
3339   .NONE/*)
3340     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3341     ;;
3342   esac
3343   ;; #(vi
3344 .no|.NONE/*)
3345   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3346   ;;
3347 *)
3348   { { echo "$as_me:3348: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3349 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3350    { (exit 1); exit 1; }; }
3351   ;;
3352 esac
3353
3354 fi
3355
3356 if test "$PKG_CONFIG" != none ; then
3357         echo "$as_me:3357: checking for $PKG_CONFIG library directory" >&5
3358 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3359
3360 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3361 if test "${with_pkg_config_libdir+set}" = set; then
3362   withval="$with_pkg_config_libdir"
3363   PKG_CONFIG_LIBDIR=$withval
3364 else
3365   PKG_CONFIG_LIBDIR=yes
3366 fi;
3367
3368         case x$PKG_CONFIG_LIBDIR in #(vi
3369         x/*) #(vi
3370                 ;;
3371         xyes) #(vi
3372                 # look for the library directory using the same prefix as the executable
3373                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3374                 case x`(arch) 2>/dev/null` in #(vi
3375                 *64) #(vi
3376                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3377                         do
3378                                 if test -d $cf_config/pkgconfig
3379                                 then
3380                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3381                                         break
3382                                 fi
3383                         done
3384                         ;;
3385                 *)
3386                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3387                         ;;
3388                 esac
3389                 ;;
3390         *)
3391                 ;;
3392         esac
3393
3394         echo "$as_me:3394: result: $PKG_CONFIG_LIBDIR" >&5
3395 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3396 fi
3397
3398 if test "$PKG_CONFIG" != none ; then
3399         echo "$as_me:3399: checking if we should install .pc files for $PKG_CONFIG" >&5
3400 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3401
3402 # Check whether --enable-pc-files or --disable-pc-files was given.
3403 if test "${enable_pc_files+set}" = set; then
3404   enableval="$enable_pc_files"
3405   enable_pc_files=$enableval
3406 else
3407   enable_pc_files=no
3408 fi;
3409         echo "$as_me:3409: result: $enable_pc_files" >&5
3410 echo "${ECHO_T}$enable_pc_files" >&6
3411         if test "$enable_pc_files" != no
3412         then
3413
3414 if test "x$prefix" != xNONE; then
3415   cf_path_syntax="$prefix"
3416 else
3417   cf_path_syntax="$ac_default_prefix"
3418 fi
3419
3420 case ".$PKG_CONFIG_LIBDIR" in #(vi
3421 .\$\(*\)*|.\'*\'*) #(vi
3422   ;;
3423 ..|./*|.\\*) #(vi
3424   ;;
3425 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3426   ;;
3427 .\${*prefix}*|.\${*dir}*) #(vi
3428   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3429   case ".$PKG_CONFIG_LIBDIR" in #(vi
3430   .NONE/*)
3431     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3432     ;;
3433   esac
3434   ;; #(vi
3435 .no|.NONE/*)
3436   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3437   ;;
3438 *)
3439   { { echo "$as_me:3439: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3440 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3441    { (exit 1); exit 1; }; }
3442   ;;
3443 esac
3444
3445         fi
3446 else
3447         enable_pc_files=no
3448 fi
3449
3450 echo "$as_me:3450: checking if we should assume mixed-case filenames" >&5
3451 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3452
3453 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3454 if test "${enable_mixed_case+set}" = set; then
3455   enableval="$enable_mixed_case"
3456   enable_mixedcase=$enableval
3457 else
3458   enable_mixedcase=auto
3459 fi;
3460 echo "$as_me:3460: result: $enable_mixedcase" >&5
3461 echo "${ECHO_T}$enable_mixedcase" >&6
3462 if test "$enable_mixedcase" = "auto" ; then
3463
3464 echo "$as_me:3464: checking if filesystem supports mixed-case filenames" >&5
3465 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3466 if test "${cf_cv_mixedcase+set}" = set; then
3467   echo $ECHO_N "(cached) $ECHO_C" >&6
3468 else
3469
3470 if test "$cross_compiling" = yes ; then
3471         case $target_alias in #(vi
3472         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
3473                 cf_cv_mixedcase=no
3474                 ;;
3475         *)
3476                 cf_cv_mixedcase=yes
3477                 ;;
3478         esac
3479 else
3480         rm -f conftest CONFTEST
3481         echo test >conftest
3482         if test -f CONFTEST ; then
3483                 cf_cv_mixedcase=no
3484         else
3485                 cf_cv_mixedcase=yes
3486         fi
3487         rm -f conftest CONFTEST
3488 fi
3489
3490 fi
3491 echo "$as_me:3491: result: $cf_cv_mixedcase" >&5
3492 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3493 test "$cf_cv_mixedcase" = yes &&
3494 cat >>confdefs.h <<\EOF
3495 #define MIXEDCASE_FILENAMES 1
3496 EOF
3497
3498 else
3499     cf_cv_mixedcase=$enable_mixedcase
3500     if test "x$enable_mixedcase" = "xyes" ; then
3501
3502 cat >>confdefs.h <<\EOF
3503 #define MIXEDCASE_FILENAMES 1
3504 EOF
3505
3506     fi
3507 fi
3508
3509 # do this after mixed-case option (tags/TAGS is not as important as tic).
3510 echo "$as_me:3510: checking whether ${MAKE-make} sets \${MAKE}" >&5
3511 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3512 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3513 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3514   echo $ECHO_N "(cached) $ECHO_C" >&6
3515 else
3516   cat >conftest.make <<\EOF
3517 all:
3518         @echo 'ac_maketemp="${MAKE}"'
3519 EOF
3520 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3521 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3522 if test -n "$ac_maketemp"; then
3523   eval ac_cv_prog_make_${ac_make}_set=yes
3524 else
3525   eval ac_cv_prog_make_${ac_make}_set=no
3526 fi
3527 rm -f conftest.make
3528 fi
3529 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3530   echo "$as_me:3530: result: yes" >&5
3531 echo "${ECHO_T}yes" >&6
3532   SET_MAKE=
3533 else
3534   echo "$as_me:3534: result: no" >&5
3535 echo "${ECHO_T}no" >&6
3536   SET_MAKE="MAKE=${MAKE-make}"
3537 fi
3538
3539 for ac_prog in exctags ctags
3540 do
3541   # Extract the first word of "$ac_prog", so it can be a program name with args.
3542 set dummy $ac_prog; ac_word=$2
3543 echo "$as_me:3543: checking for $ac_word" >&5
3544 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3545 if test "${ac_cv_prog_CTAGS+set}" = set; then
3546   echo $ECHO_N "(cached) $ECHO_C" >&6
3547 else
3548   if test -n "$CTAGS"; then
3549   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3550 else
3551   ac_save_IFS=$IFS; IFS=$ac_path_separator
3552 ac_dummy="$PATH"
3553 for ac_dir in $ac_dummy; do
3554   IFS=$ac_save_IFS
3555   test -z "$ac_dir" && ac_dir=.
3556   $as_executable_p "$ac_dir/$ac_word" || continue
3557 ac_cv_prog_CTAGS="$ac_prog"
3558 echo "$as_me:3558: found $ac_dir/$ac_word" >&5
3559 break
3560 done
3561
3562 fi
3563 fi
3564 CTAGS=$ac_cv_prog_CTAGS
3565 if test -n "$CTAGS"; then
3566   echo "$as_me:3566: result: $CTAGS" >&5
3567 echo "${ECHO_T}$CTAGS" >&6
3568 else
3569   echo "$as_me:3569: result: no" >&5
3570 echo "${ECHO_T}no" >&6
3571 fi
3572
3573   test -n "$CTAGS" && break
3574 done
3575
3576 for ac_prog in exetags etags
3577 do
3578   # Extract the first word of "$ac_prog", so it can be a program name with args.
3579 set dummy $ac_prog; ac_word=$2
3580 echo "$as_me:3580: checking for $ac_word" >&5
3581 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3582 if test "${ac_cv_prog_ETAGS+set}" = set; then
3583   echo $ECHO_N "(cached) $ECHO_C" >&6
3584 else
3585   if test -n "$ETAGS"; then
3586   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3587 else
3588   ac_save_IFS=$IFS; IFS=$ac_path_separator
3589 ac_dummy="$PATH"
3590 for ac_dir in $ac_dummy; do
3591   IFS=$ac_save_IFS
3592   test -z "$ac_dir" && ac_dir=.
3593   $as_executable_p "$ac_dir/$ac_word" || continue
3594 ac_cv_prog_ETAGS="$ac_prog"
3595 echo "$as_me:3595: found $ac_dir/$ac_word" >&5
3596 break
3597 done
3598
3599 fi
3600 fi
3601 ETAGS=$ac_cv_prog_ETAGS
3602 if test -n "$ETAGS"; then
3603   echo "$as_me:3603: result: $ETAGS" >&5
3604 echo "${ECHO_T}$ETAGS" >&6
3605 else
3606   echo "$as_me:3606: result: no" >&5
3607 echo "${ECHO_T}no" >&6
3608 fi
3609
3610   test -n "$ETAGS" && break
3611 done
3612
3613 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3614 set dummy ${CTAGS:-ctags}; ac_word=$2
3615 echo "$as_me:3615: checking for $ac_word" >&5
3616 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3617 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3618   echo $ECHO_N "(cached) $ECHO_C" >&6
3619 else
3620   if test -n "$MAKE_LOWER_TAGS"; then
3621   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3622 else
3623   ac_save_IFS=$IFS; IFS=$ac_path_separator
3624 ac_dummy="$PATH"
3625 for ac_dir in $ac_dummy; do
3626   IFS=$ac_save_IFS
3627   test -z "$ac_dir" && ac_dir=.
3628   $as_executable_p "$ac_dir/$ac_word" || continue
3629 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3630 echo "$as_me:3630: found $ac_dir/$ac_word" >&5
3631 break
3632 done
3633
3634   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3635 fi
3636 fi
3637 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3638 if test -n "$MAKE_LOWER_TAGS"; then
3639   echo "$as_me:3639: result: $MAKE_LOWER_TAGS" >&5
3640 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3641 else
3642   echo "$as_me:3642: result: no" >&5
3643 echo "${ECHO_T}no" >&6
3644 fi
3645
3646 if test "$cf_cv_mixedcase" = yes ; then
3647         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3648 set dummy ${ETAGS:-etags}; ac_word=$2
3649 echo "$as_me:3649: checking for $ac_word" >&5
3650 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3651 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3652   echo $ECHO_N "(cached) $ECHO_C" >&6
3653 else
3654   if test -n "$MAKE_UPPER_TAGS"; then
3655   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3656 else
3657   ac_save_IFS=$IFS; IFS=$ac_path_separator
3658 ac_dummy="$PATH"
3659 for ac_dir in $ac_dummy; do
3660   IFS=$ac_save_IFS
3661   test -z "$ac_dir" && ac_dir=.
3662   $as_executable_p "$ac_dir/$ac_word" || continue
3663 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3664 echo "$as_me:3664: found $ac_dir/$ac_word" >&5
3665 break
3666 done
3667
3668   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3669 fi
3670 fi
3671 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3672 if test -n "$MAKE_UPPER_TAGS"; then
3673   echo "$as_me:3673: result: $MAKE_UPPER_TAGS" >&5
3674 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3675 else
3676   echo "$as_me:3676: result: no" >&5
3677 echo "${ECHO_T}no" >&6
3678 fi
3679
3680 else
3681         MAKE_UPPER_TAGS=no
3682 fi
3683
3684 if test "$MAKE_UPPER_TAGS" = yes ; then
3685         MAKE_UPPER_TAGS=
3686 else
3687         MAKE_UPPER_TAGS="#"
3688 fi
3689
3690 if test "$MAKE_LOWER_TAGS" = yes ; then
3691         MAKE_LOWER_TAGS=
3692 else
3693         MAKE_LOWER_TAGS="#"
3694 fi
3695
3696 echo "$as_me:3696: checking for makeflags variable" >&5
3697 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3698 if test "${cf_cv_makeflags+set}" = set; then
3699   echo $ECHO_N "(cached) $ECHO_C" >&6
3700 else
3701
3702         cf_cv_makeflags=''
3703         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3704         do
3705                 cat >cf_makeflags.tmp <<CF_EOF
3706 SHELL = /bin/sh
3707 all :
3708         @ echo '.$cf_option'
3709 CF_EOF
3710                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3711                 case "$cf_result" in
3712                 .*k|.*kw)
3713                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3714                         case "$cf_result" in
3715                         .*CC=*) cf_cv_makeflags=
3716                                 ;;
3717                         *)      cf_cv_makeflags=$cf_option
3718                                 ;;
3719                         esac
3720                         break
3721                         ;;
3722                 .-)     ;;
3723                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3724                         ;;
3725                 esac
3726         done
3727         rm -f cf_makeflags.tmp
3728
3729 fi
3730 echo "$as_me:3730: result: $cf_cv_makeflags" >&5
3731 echo "${ECHO_T}$cf_cv_makeflags" >&6
3732
3733 if test -n "$ac_tool_prefix"; then
3734   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3735 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3736 echo "$as_me:3736: checking for $ac_word" >&5
3737 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3738 if test "${ac_cv_prog_RANLIB+set}" = set; then
3739   echo $ECHO_N "(cached) $ECHO_C" >&6
3740 else
3741   if test -n "$RANLIB"; then
3742   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3743 else
3744   ac_save_IFS=$IFS; IFS=$ac_path_separator
3745 ac_dummy="$PATH"
3746 for ac_dir in $ac_dummy; do
3747   IFS=$ac_save_IFS
3748   test -z "$ac_dir" && ac_dir=.
3749   $as_executable_p "$ac_dir/$ac_word" || continue
3750 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3751 echo "$as_me:3751: found $ac_dir/$ac_word" >&5
3752 break
3753 done
3754
3755 fi
3756 fi
3757 RANLIB=$ac_cv_prog_RANLIB
3758 if test -n "$RANLIB"; then
3759   echo "$as_me:3759: result: $RANLIB" >&5
3760 echo "${ECHO_T}$RANLIB" >&6
3761 else
3762   echo "$as_me:3762: result: no" >&5
3763 echo "${ECHO_T}no" >&6
3764 fi
3765
3766 fi
3767 if test -z "$ac_cv_prog_RANLIB"; then
3768   ac_ct_RANLIB=$RANLIB
3769   # Extract the first word of "ranlib", so it can be a program name with args.
3770 set dummy ranlib; ac_word=$2
3771 echo "$as_me:3771: checking for $ac_word" >&5
3772 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3773 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3774   echo $ECHO_N "(cached) $ECHO_C" >&6
3775 else
3776   if test -n "$ac_ct_RANLIB"; then
3777   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3778 else
3779   ac_save_IFS=$IFS; IFS=$ac_path_separator
3780 ac_dummy="$PATH"
3781 for ac_dir in $ac_dummy; do
3782   IFS=$ac_save_IFS
3783   test -z "$ac_dir" && ac_dir=.
3784   $as_executable_p "$ac_dir/$ac_word" || continue
3785 ac_cv_prog_ac_ct_RANLIB="ranlib"
3786 echo "$as_me:3786: found $ac_dir/$ac_word" >&5
3787 break
3788 done
3789
3790   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3791 fi
3792 fi
3793 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3794 if test -n "$ac_ct_RANLIB"; then
3795   echo "$as_me:3795: result: $ac_ct_RANLIB" >&5
3796 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3797 else
3798   echo "$as_me:3798: result: no" >&5
3799 echo "${ECHO_T}no" >&6
3800 fi
3801
3802   RANLIB=$ac_ct_RANLIB
3803 else
3804   RANLIB="$ac_cv_prog_RANLIB"
3805 fi
3806
3807 if test -n "$ac_tool_prefix"; then
3808   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3809 set dummy ${ac_tool_prefix}ld; ac_word=$2
3810 echo "$as_me:3810: checking for $ac_word" >&5
3811 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3812 if test "${ac_cv_prog_LD+set}" = set; then
3813   echo $ECHO_N "(cached) $ECHO_C" >&6
3814 else
3815   if test -n "$LD"; then
3816   ac_cv_prog_LD="$LD" # Let the user override the test.
3817 else
3818   ac_save_IFS=$IFS; IFS=$ac_path_separator
3819 ac_dummy="$PATH"
3820 for ac_dir in $ac_dummy; do
3821   IFS=$ac_save_IFS
3822   test -z "$ac_dir" && ac_dir=.
3823   $as_executable_p "$ac_dir/$ac_word" || continue
3824 ac_cv_prog_LD="${ac_tool_prefix}ld"
3825 echo "$as_me:3825: found $ac_dir/$ac_word" >&5
3826 break
3827 done
3828
3829 fi
3830 fi
3831 LD=$ac_cv_prog_LD
3832 if test -n "$LD"; then
3833   echo "$as_me:3833: result: $LD" >&5
3834 echo "${ECHO_T}$LD" >&6
3835 else
3836   echo "$as_me:3836: result: no" >&5
3837 echo "${ECHO_T}no" >&6
3838 fi
3839
3840 fi
3841 if test -z "$ac_cv_prog_LD"; then
3842   ac_ct_LD=$LD
3843   # Extract the first word of "ld", so it can be a program name with args.
3844 set dummy ld; ac_word=$2
3845 echo "$as_me:3845: checking for $ac_word" >&5
3846 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3847 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3848   echo $ECHO_N "(cached) $ECHO_C" >&6
3849 else
3850   if test -n "$ac_ct_LD"; then
3851   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3852 else
3853   ac_save_IFS=$IFS; IFS=$ac_path_separator
3854 ac_dummy="$PATH"
3855 for ac_dir in $ac_dummy; do
3856   IFS=$ac_save_IFS
3857   test -z "$ac_dir" && ac_dir=.
3858   $as_executable_p "$ac_dir/$ac_word" || continue
3859 ac_cv_prog_ac_ct_LD="ld"
3860 echo "$as_me:3860: found $ac_dir/$ac_word" >&5
3861 break
3862 done
3863
3864   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3865 fi
3866 fi
3867 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3868 if test -n "$ac_ct_LD"; then
3869   echo "$as_me:3869: result: $ac_ct_LD" >&5
3870 echo "${ECHO_T}$ac_ct_LD" >&6
3871 else
3872   echo "$as_me:3872: result: no" >&5
3873 echo "${ECHO_T}no" >&6
3874 fi
3875
3876   LD=$ac_ct_LD
3877 else
3878   LD="$ac_cv_prog_LD"
3879 fi
3880
3881 if test -n "$ac_tool_prefix"; then
3882   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3883 set dummy ${ac_tool_prefix}ar; ac_word=$2
3884 echo "$as_me:3884: checking for $ac_word" >&5
3885 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3886 if test "${ac_cv_prog_AR+set}" = set; then
3887   echo $ECHO_N "(cached) $ECHO_C" >&6
3888 else
3889   if test -n "$AR"; then
3890   ac_cv_prog_AR="$AR" # Let the user override the test.
3891 else
3892   ac_save_IFS=$IFS; IFS=$ac_path_separator
3893 ac_dummy="$PATH"
3894 for ac_dir in $ac_dummy; do
3895   IFS=$ac_save_IFS
3896   test -z "$ac_dir" && ac_dir=.
3897   $as_executable_p "$ac_dir/$ac_word" || continue
3898 ac_cv_prog_AR="${ac_tool_prefix}ar"
3899 echo "$as_me:3899: found $ac_dir/$ac_word" >&5
3900 break
3901 done
3902
3903 fi
3904 fi
3905 AR=$ac_cv_prog_AR
3906 if test -n "$AR"; then
3907   echo "$as_me:3907: result: $AR" >&5
3908 echo "${ECHO_T}$AR" >&6
3909 else
3910   echo "$as_me:3910: result: no" >&5
3911 echo "${ECHO_T}no" >&6
3912 fi
3913
3914 fi
3915 if test -z "$ac_cv_prog_AR"; then
3916   ac_ct_AR=$AR
3917   # Extract the first word of "ar", so it can be a program name with args.
3918 set dummy ar; ac_word=$2
3919 echo "$as_me:3919: checking for $ac_word" >&5
3920 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3921 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3922   echo $ECHO_N "(cached) $ECHO_C" >&6
3923 else
3924   if test -n "$ac_ct_AR"; then
3925   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3926 else
3927   ac_save_IFS=$IFS; IFS=$ac_path_separator
3928 ac_dummy="$PATH"
3929 for ac_dir in $ac_dummy; do
3930   IFS=$ac_save_IFS
3931   test -z "$ac_dir" && ac_dir=.
3932   $as_executable_p "$ac_dir/$ac_word" || continue
3933 ac_cv_prog_ac_ct_AR="ar"
3934 echo "$as_me:3934: found $ac_dir/$ac_word" >&5
3935 break
3936 done
3937
3938   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3939 fi
3940 fi
3941 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3942 if test -n "$ac_ct_AR"; then
3943   echo "$as_me:3943: result: $ac_ct_AR" >&5
3944 echo "${ECHO_T}$ac_ct_AR" >&6
3945 else
3946   echo "$as_me:3946: result: no" >&5
3947 echo "${ECHO_T}no" >&6
3948 fi
3949
3950   AR=$ac_ct_AR
3951 else
3952   AR="$ac_cv_prog_AR"
3953 fi
3954
3955 if test -n "$ac_tool_prefix"; then
3956   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
3957 set dummy ${ac_tool_prefix}nm; ac_word=$2
3958 echo "$as_me:3958: checking for $ac_word" >&5
3959 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3960 if test "${ac_cv_prog_NM+set}" = set; then
3961   echo $ECHO_N "(cached) $ECHO_C" >&6
3962 else
3963   if test -n "$NM"; then
3964   ac_cv_prog_NM="$NM" # Let the user override the test.
3965 else
3966   ac_save_IFS=$IFS; IFS=$ac_path_separator
3967 ac_dummy="$PATH"
3968 for ac_dir in $ac_dummy; do
3969   IFS=$ac_save_IFS
3970   test -z "$ac_dir" && ac_dir=.
3971   $as_executable_p "$ac_dir/$ac_word" || continue
3972 ac_cv_prog_NM="${ac_tool_prefix}nm"
3973 echo "$as_me:3973: found $ac_dir/$ac_word" >&5
3974 break
3975 done
3976
3977 fi
3978 fi
3979 NM=$ac_cv_prog_NM
3980 if test -n "$NM"; then
3981   echo "$as_me:3981: result: $NM" >&5
3982 echo "${ECHO_T}$NM" >&6
3983 else
3984   echo "$as_me:3984: result: no" >&5
3985 echo "${ECHO_T}no" >&6
3986 fi
3987
3988 fi
3989 if test -z "$ac_cv_prog_NM"; then
3990   ac_ct_NM=$NM
3991   # Extract the first word of "nm", so it can be a program name with args.
3992 set dummy nm; 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_ac_ct_NM+set}" = set; then
3996   echo $ECHO_N "(cached) $ECHO_C" >&6
3997 else
3998   if test -n "$ac_ct_NM"; then
3999   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # 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_ac_ct_NM="nm"
4008 echo "$as_me:4008: found $ac_dir/$ac_word" >&5
4009 break
4010 done
4011
4012   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4013 fi
4014 fi
4015 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4016 if test -n "$ac_ct_NM"; then
4017   echo "$as_me:4017: result: $ac_ct_NM" >&5
4018 echo "${ECHO_T}$ac_ct_NM" >&6
4019 else
4020   echo "$as_me:4020: result: no" >&5
4021 echo "${ECHO_T}no" >&6
4022 fi
4023
4024   NM=$ac_ct_NM
4025 else
4026   NM="$ac_cv_prog_NM"
4027 fi
4028
4029 if test -n "$ac_tool_prefix"; then
4030   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4031 set dummy ${ac_tool_prefix}ar; ac_word=$2
4032 echo "$as_me:4032: checking for $ac_word" >&5
4033 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4034 if test "${ac_cv_prog_AR+set}" = set; then
4035   echo $ECHO_N "(cached) $ECHO_C" >&6
4036 else
4037   if test -n "$AR"; then
4038   ac_cv_prog_AR="$AR" # Let the user override the test.
4039 else
4040   ac_save_IFS=$IFS; IFS=$ac_path_separator
4041 ac_dummy="$PATH"
4042 for ac_dir in $ac_dummy; do
4043   IFS=$ac_save_IFS
4044   test -z "$ac_dir" && ac_dir=.
4045   $as_executable_p "$ac_dir/$ac_word" || continue
4046 ac_cv_prog_AR="${ac_tool_prefix}ar"
4047 echo "$as_me:4047: found $ac_dir/$ac_word" >&5
4048 break
4049 done
4050
4051 fi
4052 fi
4053 AR=$ac_cv_prog_AR
4054 if test -n "$AR"; then
4055   echo "$as_me:4055: result: $AR" >&5
4056 echo "${ECHO_T}$AR" >&6
4057 else
4058   echo "$as_me:4058: result: no" >&5
4059 echo "${ECHO_T}no" >&6
4060 fi
4061
4062 fi
4063 if test -z "$ac_cv_prog_AR"; then
4064   ac_ct_AR=$AR
4065   # Extract the first word of "ar", so it can be a program name with args.
4066 set dummy ar; ac_word=$2
4067 echo "$as_me:4067: checking for $ac_word" >&5
4068 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4069 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4070   echo $ECHO_N "(cached) $ECHO_C" >&6
4071 else
4072   if test -n "$ac_ct_AR"; then
4073   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4074 else
4075   ac_save_IFS=$IFS; IFS=$ac_path_separator
4076 ac_dummy="$PATH"
4077 for ac_dir in $ac_dummy; do
4078   IFS=$ac_save_IFS
4079   test -z "$ac_dir" && ac_dir=.
4080   $as_executable_p "$ac_dir/$ac_word" || continue
4081 ac_cv_prog_ac_ct_AR="ar"
4082 echo "$as_me:4082: found $ac_dir/$ac_word" >&5
4083 break
4084 done
4085
4086   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4087 fi
4088 fi
4089 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4090 if test -n "$ac_ct_AR"; then
4091   echo "$as_me:4091: result: $ac_ct_AR" >&5
4092 echo "${ECHO_T}$ac_ct_AR" >&6
4093 else
4094   echo "$as_me:4094: result: no" >&5
4095 echo "${ECHO_T}no" >&6
4096 fi
4097
4098   AR=$ac_ct_AR
4099 else
4100   AR="$ac_cv_prog_AR"
4101 fi
4102
4103 echo "$as_me:4103: checking for options to update archives" >&5
4104 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4105 if test "${cf_cv_ar_flags+set}" = set; then
4106   echo $ECHO_N "(cached) $ECHO_C" >&6
4107 else
4108
4109         cf_cv_ar_flags=unknown
4110         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4111         do
4112
4113                 # check if $ARFLAGS already contains this choice
4114                 if test "x$ARFLAGS" != "x" ; then
4115                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4116                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4117                                 cf_cv_ar_flags=
4118                                 break
4119                         fi
4120                 fi
4121
4122                 rm -f conftest.$ac_cv_objext
4123                 rm -f conftest.a
4124
4125                 cat >conftest.$ac_ext <<EOF
4126 #line 4126 "configure"
4127 int     testdata[3] = { 123, 456, 789 };
4128 EOF
4129                 if { (eval echo "$as_me:4129: \"$ac_compile\"") >&5
4130   (eval $ac_compile) 2>&5
4131   ac_status=$?
4132   echo "$as_me:4132: \$? = $ac_status" >&5
4133   (exit $ac_status); } ; then
4134                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4135                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4136                         if test -f conftest.a ; then
4137                                 cf_cv_ar_flags=$cf_ar_flags
4138                                 break
4139                         fi
4140                 else
4141                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4142
4143 echo "${as_me:-configure}:4143: testing cannot compile test-program ..." 1>&5
4144
4145                         break
4146                 fi
4147         done
4148         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4149
4150 fi
4151 echo "$as_me:4151: result: $cf_cv_ar_flags" >&5
4152 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4153
4154 if test -n "$ARFLAGS" ; then
4155         if test -n "$cf_cv_ar_flags" ; then
4156                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4157         fi
4158 else
4159         ARFLAGS=$cf_cv_ar_flags
4160 fi
4161
4162 echo "$as_me:4162: checking if you have specified an install-prefix" >&5
4163 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4164
4165 # Check whether --with-install-prefix or --without-install-prefix was given.
4166 if test "${with_install_prefix+set}" = set; then
4167   withval="$with_install_prefix"
4168   case "x$withval" in #(vi
4169         xyes|xno) #(vi
4170                 ;;
4171         *)      DESTDIR="$withval"
4172                 ;;
4173         esac
4174 fi;
4175 echo "$as_me:4175: result: $DESTDIR" >&5
4176 echo "${ECHO_T}$DESTDIR" >&6
4177
4178 ###############################################################################
4179
4180 # If we're cross-compiling, allow the user to override the tools and their
4181 # options.  The configure script is oriented toward identifying the host
4182 # compiler, etc., but we need a build compiler to generate parts of the source.
4183
4184 if test "$cross_compiling" = yes ; then
4185
4186         # defaults that we might want to override
4187         : ${BUILD_CFLAGS:=''}
4188         : ${BUILD_CPPFLAGS:=''}
4189         : ${BUILD_LDFLAGS:=''}
4190         : ${BUILD_LIBS:=''}
4191         : ${BUILD_EXEEXT:='$x'}
4192         : ${BUILD_OBJEXT:='o'}
4193
4194 # Check whether --with-build-cc or --without-build-cc was given.
4195 if test "${with_build_cc+set}" = set; then
4196   withval="$with_build_cc"
4197   BUILD_CC="$withval"
4198 else
4199   for ac_prog in gcc cc cl
4200 do
4201   # Extract the first word of "$ac_prog", so it can be a program name with args.
4202 set dummy $ac_prog; ac_word=$2
4203 echo "$as_me:4203: checking for $ac_word" >&5
4204 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4205 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4206   echo $ECHO_N "(cached) $ECHO_C" >&6
4207 else
4208   if test -n "$BUILD_CC"; then
4209   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4210 else
4211   ac_save_IFS=$IFS; IFS=$ac_path_separator
4212 ac_dummy="$PATH"
4213 for ac_dir in $ac_dummy; do
4214   IFS=$ac_save_IFS
4215   test -z "$ac_dir" && ac_dir=.
4216   $as_executable_p "$ac_dir/$ac_word" || continue
4217 ac_cv_prog_BUILD_CC="$ac_prog"
4218 echo "$as_me:4218: found $ac_dir/$ac_word" >&5
4219 break
4220 done
4221
4222 fi
4223 fi
4224 BUILD_CC=$ac_cv_prog_BUILD_CC
4225 if test -n "$BUILD_CC"; then
4226   echo "$as_me:4226: result: $BUILD_CC" >&5
4227 echo "${ECHO_T}$BUILD_CC" >&6
4228 else
4229   echo "$as_me:4229: result: no" >&5
4230 echo "${ECHO_T}no" >&6
4231 fi
4232
4233   test -n "$BUILD_CC" && break
4234 done
4235
4236 fi;
4237         echo "$as_me:4237: checking for native build C compiler" >&5
4238 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4239         echo "$as_me:4239: result: $BUILD_CC" >&5
4240 echo "${ECHO_T}$BUILD_CC" >&6
4241
4242         echo "$as_me:4242: checking for native build C preprocessor" >&5
4243 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4244
4245 # Check whether --with-build-cpp or --without-build-cpp was given.
4246 if test "${with_build_cpp+set}" = set; then
4247   withval="$with_build_cpp"
4248   BUILD_CPP="$withval"
4249 else
4250   BUILD_CPP='${BUILD_CC} -E'
4251 fi;
4252         echo "$as_me:4252: result: $BUILD_CPP" >&5
4253 echo "${ECHO_T}$BUILD_CPP" >&6
4254
4255         echo "$as_me:4255: checking for native build C flags" >&5
4256 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4257
4258 # Check whether --with-build-cflags or --without-build-cflags was given.
4259 if test "${with_build_cflags+set}" = set; then
4260   withval="$with_build_cflags"
4261   BUILD_CFLAGS="$withval"
4262 fi;
4263         echo "$as_me:4263: result: $BUILD_CFLAGS" >&5
4264 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4265
4266         echo "$as_me:4266: checking for native build C preprocessor-flags" >&5
4267 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4268
4269 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4270 if test "${with_build_cppflags+set}" = set; then
4271   withval="$with_build_cppflags"
4272   BUILD_CPPFLAGS="$withval"
4273 fi;
4274         echo "$as_me:4274: result: $BUILD_CPPFLAGS" >&5
4275 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4276
4277         echo "$as_me:4277: checking for native build linker-flags" >&5
4278 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4279
4280 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4281 if test "${with_build_ldflags+set}" = set; then
4282   withval="$with_build_ldflags"
4283   BUILD_LDFLAGS="$withval"
4284 fi;
4285         echo "$as_me:4285: result: $BUILD_LDFLAGS" >&5
4286 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4287
4288         echo "$as_me:4288: checking for native build linker-libraries" >&5
4289 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4290
4291 # Check whether --with-build-libs or --without-build-libs was given.
4292 if test "${with_build_libs+set}" = set; then
4293   withval="$with_build_libs"
4294   BUILD_LIBS="$withval"
4295 fi;
4296         echo "$as_me:4296: result: $BUILD_LIBS" >&5
4297 echo "${ECHO_T}$BUILD_LIBS" >&6
4298
4299         # this assumes we're on Unix.
4300         BUILD_EXEEXT=
4301         BUILD_OBJEXT=o
4302
4303         : ${BUILD_CC:='${CC}'}
4304
4305         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4306                 { { echo "$as_me:4306: error: Cross-build requires two compilers.
4307 Use --with-build-cc to specify the native compiler." >&5
4308 echo "$as_me: error: Cross-build requires two compilers.
4309 Use --with-build-cc to specify the native compiler." >&2;}
4310    { (exit 1); exit 1; }; }
4311         fi
4312
4313 else
4314         : ${BUILD_CC:='${CC}'}
4315         : ${BUILD_CPP:='${CPP}'}
4316         : ${BUILD_CFLAGS:='${CFLAGS}'}
4317         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4318         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4319         : ${BUILD_LIBS:='${LIBS}'}
4320         : ${BUILD_EXEEXT:='$x'}
4321         : ${BUILD_OBJEXT:='o'}
4322 fi
4323
4324 ###############################################################################
4325
4326 ### Options to allow the user to specify the set of libraries which are used.
4327 ### Use "--without-normal --with-shared" to allow the default model to be
4328 ### shared, for example.
4329 cf_list_models=""
4330
4331 echo "$as_me:4331: checking if libtool -version-number should be used" >&5
4332 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4333
4334 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4335 if test "${enable_libtool_version+set}" = set; then
4336   enableval="$enable_libtool_version"
4337   test "$enableval" != no && enableval=yes
4338   if test "$enableval" != "yes" ; then
4339     cf_libtool_version=no
4340   else
4341     cf_libtool_version=yes
4342   fi
4343 else
4344   enableval=yes
4345   cf_libtool_version=yes
4346
4347 fi;
4348 echo "$as_me:4348: result: $cf_libtool_version" >&5
4349 echo "${ECHO_T}$cf_libtool_version" >&6
4350
4351 if test "$cf_libtool_version" = yes ; then
4352         LIBTOOL_VERSION="-version-number"
4353 else
4354         LIBTOOL_VERSION="-version-info"
4355 fi
4356
4357 LIBTOOL=
4358
4359 # common library maintenance symbols that are convenient for libtool scripts:
4360 LIB_CREATE='${AR} -cr'
4361 LIB_OBJECT='${OBJECTS}'
4362 LIB_SUFFIX=.a
4363 LIB_PREP="$RANLIB"
4364
4365 # symbols used to prop libtool up to enable it to determine what it should be
4366 # doing:
4367 LIB_CLEAN=
4368 LIB_COMPILE=
4369 LIB_LINK='${CC}'
4370 LIB_INSTALL=
4371 LIB_UNINSTALL=
4372
4373 echo "$as_me:4373: checking if you want to build libraries with libtool" >&5
4374 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4375
4376 # Check whether --with-libtool or --without-libtool was given.
4377 if test "${with_libtool+set}" = set; then
4378   withval="$with_libtool"
4379   with_libtool=$withval
4380 else
4381   with_libtool=no
4382 fi;
4383 echo "$as_me:4383: result: $with_libtool" >&5
4384 echo "${ECHO_T}$with_libtool" >&6
4385 if test "$with_libtool" != "no"; then
4386
4387         if test "$with_libtool" != "yes" ; then
4388
4389 if test "x$prefix" != xNONE; then
4390   cf_path_syntax="$prefix"
4391 else
4392   cf_path_syntax="$ac_default_prefix"
4393 fi
4394
4395 case ".$with_libtool" in #(vi
4396 .\$\(*\)*|.\'*\'*) #(vi
4397   ;;
4398 ..|./*|.\\*) #(vi
4399   ;;
4400 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4401   ;;
4402 .\${*prefix}*|.\${*dir}*) #(vi
4403   eval with_libtool="$with_libtool"
4404   case ".$with_libtool" in #(vi
4405   .NONE/*)
4406     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4407     ;;
4408   esac
4409   ;; #(vi
4410 .no|.NONE/*)
4411   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4412   ;;
4413 *)
4414   { { echo "$as_me:4414: error: expected a pathname, not \"$with_libtool\"" >&5
4415 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4416    { (exit 1); exit 1; }; }
4417   ;;
4418 esac
4419
4420                 LIBTOOL=$with_libtool
4421         else
4422                 if test -n "$ac_tool_prefix"; then
4423   for ac_prog in libtool glibtool
4424   do
4425     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4426 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4427 echo "$as_me:4427: checking for $ac_word" >&5
4428 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4429 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4430   echo $ECHO_N "(cached) $ECHO_C" >&6
4431 else
4432   if test -n "$LIBTOOL"; then
4433   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4434 else
4435   ac_save_IFS=$IFS; IFS=$ac_path_separator
4436 ac_dummy="$PATH"
4437 for ac_dir in $ac_dummy; do
4438   IFS=$ac_save_IFS
4439   test -z "$ac_dir" && ac_dir=.
4440   $as_executable_p "$ac_dir/$ac_word" || continue
4441 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4442 echo "$as_me:4442: found $ac_dir/$ac_word" >&5
4443 break
4444 done
4445
4446 fi
4447 fi
4448 LIBTOOL=$ac_cv_prog_LIBTOOL
4449 if test -n "$LIBTOOL"; then
4450   echo "$as_me:4450: result: $LIBTOOL" >&5
4451 echo "${ECHO_T}$LIBTOOL" >&6
4452 else
4453   echo "$as_me:4453: result: no" >&5
4454 echo "${ECHO_T}no" >&6
4455 fi
4456
4457     test -n "$LIBTOOL" && break
4458   done
4459 fi
4460 if test -z "$LIBTOOL"; then
4461   ac_ct_LIBTOOL=$LIBTOOL
4462   for ac_prog in libtool glibtool
4463 do
4464   # Extract the first word of "$ac_prog", so it can be a program name with args.
4465 set dummy $ac_prog; ac_word=$2
4466 echo "$as_me:4466: checking for $ac_word" >&5
4467 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4468 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4469   echo $ECHO_N "(cached) $ECHO_C" >&6
4470 else
4471   if test -n "$ac_ct_LIBTOOL"; then
4472   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4473 else
4474   ac_save_IFS=$IFS; IFS=$ac_path_separator
4475 ac_dummy="$PATH"
4476 for ac_dir in $ac_dummy; do
4477   IFS=$ac_save_IFS
4478   test -z "$ac_dir" && ac_dir=.
4479   $as_executable_p "$ac_dir/$ac_word" || continue
4480 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4481 echo "$as_me:4481: found $ac_dir/$ac_word" >&5
4482 break
4483 done
4484
4485 fi
4486 fi
4487 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4488 if test -n "$ac_ct_LIBTOOL"; then
4489   echo "$as_me:4489: result: $ac_ct_LIBTOOL" >&5
4490 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4491 else
4492   echo "$as_me:4492: result: no" >&5
4493 echo "${ECHO_T}no" >&6
4494 fi
4495
4496   test -n "$ac_ct_LIBTOOL" && break
4497 done
4498 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4499
4500   LIBTOOL=$ac_ct_LIBTOOL
4501 fi
4502
4503 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4504 then
4505         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.].*//'`
4506 else
4507         cf_cv_libtool_version=
4508 fi
4509 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4510
4511                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4512                 then
4513
4514 unset ac_cv_prog_ac_ct_LIBTOOL
4515 unset ac_ct_LIBTOOL
4516 unset LIBTOOL
4517
4518                         if test -n "$ac_tool_prefix"; then
4519   for ac_prog in glibtool
4520   do
4521     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4522 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4523 echo "$as_me:4523: checking for $ac_word" >&5
4524 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4525 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4526   echo $ECHO_N "(cached) $ECHO_C" >&6
4527 else
4528   if test -n "$LIBTOOL"; then
4529   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4530 else
4531   ac_save_IFS=$IFS; IFS=$ac_path_separator
4532 ac_dummy="$PATH"
4533 for ac_dir in $ac_dummy; do
4534   IFS=$ac_save_IFS
4535   test -z "$ac_dir" && ac_dir=.
4536   $as_executable_p "$ac_dir/$ac_word" || continue
4537 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4538 echo "$as_me:4538: found $ac_dir/$ac_word" >&5
4539 break
4540 done
4541
4542 fi
4543 fi
4544 LIBTOOL=$ac_cv_prog_LIBTOOL
4545 if test -n "$LIBTOOL"; then
4546   echo "$as_me:4546: result: $LIBTOOL" >&5
4547 echo "${ECHO_T}$LIBTOOL" >&6
4548 else
4549   echo "$as_me:4549: result: no" >&5
4550 echo "${ECHO_T}no" >&6
4551 fi
4552
4553     test -n "$LIBTOOL" && break
4554   done
4555 fi
4556 if test -z "$LIBTOOL"; then
4557   ac_ct_LIBTOOL=$LIBTOOL
4558   for ac_prog in glibtool
4559 do
4560   # Extract the first word of "$ac_prog", so it can be a program name with args.
4561 set dummy $ac_prog; ac_word=$2
4562 echo "$as_me:4562: checking for $ac_word" >&5
4563 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4564 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4565   echo $ECHO_N "(cached) $ECHO_C" >&6
4566 else
4567   if test -n "$ac_ct_LIBTOOL"; then
4568   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4569 else
4570   ac_save_IFS=$IFS; IFS=$ac_path_separator
4571 ac_dummy="$PATH"
4572 for ac_dir in $ac_dummy; do
4573   IFS=$ac_save_IFS
4574   test -z "$ac_dir" && ac_dir=.
4575   $as_executable_p "$ac_dir/$ac_word" || continue
4576 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4577 echo "$as_me:4577: found $ac_dir/$ac_word" >&5
4578 break
4579 done
4580
4581 fi
4582 fi
4583 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4584 if test -n "$ac_ct_LIBTOOL"; then
4585   echo "$as_me:4585: result: $ac_ct_LIBTOOL" >&5
4586 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4587 else
4588   echo "$as_me:4588: result: no" >&5
4589 echo "${ECHO_T}no" >&6
4590 fi
4591
4592   test -n "$ac_ct_LIBTOOL" && break
4593 done
4594 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4595
4596   LIBTOOL=$ac_ct_LIBTOOL
4597 fi
4598
4599 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4600 then
4601         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.].*//'`
4602 else
4603         cf_cv_libtool_version=
4604 fi
4605 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4606
4607                 fi
4608         fi
4609         if test -z "$LIBTOOL" ; then
4610                 { { echo "$as_me:4610: error: Cannot find libtool" >&5
4611 echo "$as_me: error: Cannot find libtool" >&2;}
4612    { (exit 1); exit 1; }; }
4613         fi
4614         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4615         LIB_OBJECT='${OBJECTS:.o=.lo}'
4616         LIB_SUFFIX=.la
4617         LIB_CLEAN='${LIBTOOL} --mode=clean'
4618         LIB_COMPILE='${LIBTOOL} --mode=compile'
4619         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4620         LIB_INSTALL='${LIBTOOL} --mode=install'
4621         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4622         LIB_PREP=:
4623
4624 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4625 then
4626         echo "$as_me:4626: checking version of $LIBTOOL" >&5
4627 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4628
4629 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4630 then
4631         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.].*//'`
4632 else
4633         cf_cv_libtool_version=
4634 fi
4635 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4636
4637         echo "$as_me:4637: result: $cf_cv_libtool_version" >&5
4638 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4639         if test -z "$cf_cv_libtool_version" ; then
4640                 { { echo "$as_me:4640: error: This is not GNU libtool" >&5
4641 echo "$as_me: error: This is not GNU libtool" >&2;}
4642    { (exit 1); exit 1; }; }
4643         fi
4644 else
4645         { { echo "$as_me:4645: error: GNU libtool has not been found" >&5
4646 echo "$as_me: error: GNU libtool has not been found" >&2;}
4647    { (exit 1); exit 1; }; }
4648 fi
4649
4650         # special hack to add -no-undefined (which libtool should do for itself)
4651         LT_UNDEF=
4652         case "$cf_cv_system_name" in #(vi
4653         cygwin*|msys*|mingw32*|uwin*|aix[4-7]) #(vi
4654                 LT_UNDEF=-no-undefined
4655                 ;;
4656         esac
4657
4658         # special hack to add --tag option for C++ compiler
4659         case $cf_cv_libtool_version in #(vi
4660         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4661                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4662                 LIBTOOL="$LIBTOOL --tag=CC"
4663                 ;;
4664         *)
4665                 LIBTOOL_CXX="$LIBTOOL"
4666                 ;;
4667         esac
4668 else
4669         LIBTOOL=""
4670         LIBTOOL_CXX=""
4671 fi
4672
4673 test -z "$LIBTOOL" && ECHO_LT=
4674
4675 if test "$with_libtool" != "no" ; then
4676
4677 cf_list_models="$cf_list_models libtool"
4678
4679 else
4680
4681 echo "$as_me:4681: checking if you want to build shared libraries" >&5
4682 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4683
4684 # Check whether --with-shared or --without-shared was given.
4685 if test "${with_shared+set}" = set; then
4686   withval="$with_shared"
4687   with_shared=$withval
4688 else
4689   with_shared=no
4690 fi;
4691 echo "$as_me:4691: result: $with_shared" >&5
4692 echo "${ECHO_T}$with_shared" >&6
4693 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4694
4695 echo "$as_me:4695: checking if you want to build static libraries" >&5
4696 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4697
4698 # Check whether --with-normal or --without-normal was given.
4699 if test "${with_normal+set}" = set; then
4700   withval="$with_normal"
4701   with_normal=$withval
4702 else
4703   with_normal=yes
4704 fi;
4705 echo "$as_me:4705: result: $with_normal" >&5
4706 echo "${ECHO_T}$with_normal" >&6
4707 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4708
4709 echo "$as_me:4709: checking if you want to build debug libraries" >&5
4710 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4711
4712 # Check whether --with-debug or --without-debug was given.
4713 if test "${with_debug+set}" = set; then
4714   withval="$with_debug"
4715   with_debug=$withval
4716 else
4717   with_debug=yes
4718 fi;
4719 echo "$as_me:4719: result: $with_debug" >&5
4720 echo "${ECHO_T}$with_debug" >&6
4721 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4722
4723 echo "$as_me:4723: checking if you want to build profiling libraries" >&5
4724 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4725
4726 # Check whether --with-profile or --without-profile was given.
4727 if test "${with_profile+set}" = set; then
4728   withval="$with_profile"
4729   with_profile=$withval
4730 else
4731   with_profile=no
4732 fi;
4733 echo "$as_me:4733: result: $with_profile" >&5
4734 echo "${ECHO_T}$with_profile" >&6
4735 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4736
4737 fi
4738
4739 if test "X$cf_with_cxx_binding" != Xno; then
4740 if test "x$with_shared" = "xyes"; then
4741 echo "$as_me:4741: checking if you want to build C++ shared libraries" >&5
4742 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
4743
4744 # Check whether --with-cxx-shared or --without-cxx-shared was given.
4745 if test "${with_cxx_shared+set}" = set; then
4746   withval="$with_cxx_shared"
4747   with_shared_cxx=$withval
4748 else
4749   with_shared_cxx=no
4750 fi;
4751 echo "$as_me:4751: result: $with_shared_cxx" >&5
4752 echo "${ECHO_T}$with_shared_cxx" >&6
4753 fi
4754 fi
4755
4756 ###############################################################################
4757
4758 echo "$as_me:4758: checking for specified models" >&5
4759 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4760 test -z "$cf_list_models" && cf_list_models=normal
4761 test "$with_libtool" != "no" && cf_list_models=libtool
4762 echo "$as_me:4762: result: $cf_list_models" >&5
4763 echo "${ECHO_T}$cf_list_models" >&6
4764
4765 ### Use the first model as the default, and save its suffix for use in building
4766 ### up test-applications.
4767 echo "$as_me:4767: checking for default model" >&5
4768 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4769 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4770 echo "$as_me:4770: result: $DFT_LWR_MODEL" >&5
4771 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4772
4773 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4774
4775 TICS_NAME=tic
4776
4777 TINFO_NAME=tinfo
4778
4779 LIB_NAME=ncurses
4780
4781 LIB_DIR=../lib
4782 LIB_2ND=../../lib
4783
4784 echo "$as_me:4784: checking if you want to have a library-prefix" >&5
4785 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4786
4787 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4788 if test "${with_lib_prefix+set}" = set; then
4789   withval="$with_lib_prefix"
4790   with_lib_prefix=$withval
4791 else
4792   with_lib_prefix=auto
4793 fi;
4794 echo "$as_me:4794: result: $with_lib_prefix" >&5
4795 echo "${ECHO_T}$with_lib_prefix" >&6
4796
4797 if test $with_lib_prefix = auto
4798 then
4799
4800         case $cf_cv_system_name in #(vi
4801         OS/2*|os2*) #(vi
4802         LIB_PREFIX=''
4803         ;;
4804         *)      LIB_PREFIX='lib'
4805         ;;
4806         esac
4807 cf_prefix=$LIB_PREFIX
4808
4809 elif test $with_lib_prefix = no
4810 then
4811         LIB_PREFIX=
4812 else
4813         LIB_PREFIX=$with_lib_prefix
4814 fi
4815
4816 LIB_SUFFIX=
4817
4818         echo "$as_me:4818: checking for PATH separator" >&5
4819 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4820         case $cf_cv_system_name in
4821         os2*)   PATH_SEPARATOR=';'  ;;
4822         *)      ${PATH_SEPARATOR:=':'}  ;;
4823         esac
4824
4825         echo "$as_me:4825: result: $PATH_SEPARATOR" >&5
4826 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4827
4828 ###############################################################################
4829
4830 echo "$as_me:4830: checking if you want to build a separate terminfo library" >&5
4831 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4832
4833 # Check whether --with-termlib or --without-termlib was given.
4834 if test "${with_termlib+set}" = set; then
4835   withval="$with_termlib"
4836   with_termlib=$withval
4837 else
4838   with_termlib=no
4839 fi;
4840 echo "$as_me:4840: result: $with_termlib" >&5
4841 echo "${ECHO_T}$with_termlib" >&6
4842
4843 echo "$as_me:4843: checking if you want to build a separate tic library" >&5
4844 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4845
4846 # Check whether --with-ticlib or --without-ticlib was given.
4847 if test "${with_ticlib+set}" = set; then
4848   withval="$with_ticlib"
4849   with_ticlib=$withval
4850 else
4851   with_ticlib=no
4852 fi;
4853 echo "$as_me:4853: result: $with_ticlib" >&5
4854 echo "${ECHO_T}$with_ticlib" >&6
4855
4856 ### Checks for special libraries, must be done up-front.
4857 SHLIB_LIST=""
4858
4859 echo "$as_me:4859: checking if you want to link with the GPM mouse library" >&5
4860 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4861
4862 # Check whether --with-gpm or --without-gpm was given.
4863 if test "${with_gpm+set}" = set; then
4864   withval="$with_gpm"
4865   with_gpm=$withval
4866 else
4867   with_gpm=maybe
4868 fi;
4869 echo "$as_me:4869: result: $with_gpm" >&5
4870 echo "${ECHO_T}$with_gpm" >&6
4871
4872 if test "$with_gpm" != no ; then
4873         echo "$as_me:4873: checking for gpm.h" >&5
4874 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4875 if test "${ac_cv_header_gpm_h+set}" = set; then
4876   echo $ECHO_N "(cached) $ECHO_C" >&6
4877 else
4878   cat >conftest.$ac_ext <<_ACEOF
4879 #line 4879 "configure"
4880 #include "confdefs.h"
4881 #include <gpm.h>
4882 _ACEOF
4883 if { (eval echo "$as_me:4883: \"$ac_cpp conftest.$ac_ext\"") >&5
4884   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4885   ac_status=$?
4886   egrep -v '^ *\+' conftest.er1 >conftest.err
4887   rm -f conftest.er1
4888   cat conftest.err >&5
4889   echo "$as_me:4889: \$? = $ac_status" >&5
4890   (exit $ac_status); } >/dev/null; then
4891   if test -s conftest.err; then
4892     ac_cpp_err=$ac_c_preproc_warn_flag
4893   else
4894     ac_cpp_err=
4895   fi
4896 else
4897   ac_cpp_err=yes
4898 fi
4899 if test -z "$ac_cpp_err"; then
4900   ac_cv_header_gpm_h=yes
4901 else
4902   echo "$as_me: failed program was:" >&5
4903   cat conftest.$ac_ext >&5
4904   ac_cv_header_gpm_h=no
4905 fi
4906 rm -f conftest.err conftest.$ac_ext
4907 fi
4908 echo "$as_me:4908: result: $ac_cv_header_gpm_h" >&5
4909 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4910 if test $ac_cv_header_gpm_h = yes; then
4911
4912 cat >>confdefs.h <<\EOF
4913 #define HAVE_GPM_H 1
4914 EOF
4915
4916                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4917                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4918
4919 echo "${as_me:-configure}:4919: testing assuming we really have GPM library ..." 1>&5
4920
4921 cat >>confdefs.h <<\EOF
4922 #define HAVE_LIBGPM 1
4923 EOF
4924
4925                 else
4926                         echo "$as_me:4926: checking for Gpm_Open in -lgpm" >&5
4927 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4928 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4929   echo $ECHO_N "(cached) $ECHO_C" >&6
4930 else
4931   ac_check_lib_save_LIBS=$LIBS
4932 LIBS="-lgpm  $LIBS"
4933 cat >conftest.$ac_ext <<_ACEOF
4934 #line 4934 "configure"
4935 #include "confdefs.h"
4936
4937 /* Override any gcc2 internal prototype to avoid an error.  */
4938 #ifdef __cplusplus
4939 extern "C"
4940 #endif
4941 /* We use char because int might match the return type of a gcc2
4942    builtin and then its argument prototype would still apply.  */
4943 char Gpm_Open ();
4944 int
4945 main ()
4946 {
4947 Gpm_Open ();
4948   ;
4949   return 0;
4950 }
4951 _ACEOF
4952 rm -f conftest.$ac_objext conftest$ac_exeext
4953 if { (eval echo "$as_me:4953: \"$ac_link\"") >&5
4954   (eval $ac_link) 2>&5
4955   ac_status=$?
4956   echo "$as_me:4956: \$? = $ac_status" >&5
4957   (exit $ac_status); } &&
4958          { ac_try='test -s conftest$ac_exeext'
4959   { (eval echo "$as_me:4959: \"$ac_try\"") >&5
4960   (eval $ac_try) 2>&5
4961   ac_status=$?
4962   echo "$as_me:4962: \$? = $ac_status" >&5
4963   (exit $ac_status); }; }; then
4964   ac_cv_lib_gpm_Gpm_Open=yes
4965 else
4966   echo "$as_me: failed program was:" >&5
4967 cat conftest.$ac_ext >&5
4968 ac_cv_lib_gpm_Gpm_Open=no
4969 fi
4970 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4971 LIBS=$ac_check_lib_save_LIBS
4972 fi
4973 echo "$as_me:4973: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4974 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4975 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4976   :
4977 else
4978
4979                                 { { echo "$as_me:4979: error: Cannot link with GPM library" >&5
4980 echo "$as_me: error: Cannot link with GPM library" >&2;}
4981    { (exit 1); exit 1; }; }
4982                 fi
4983                 with_gpm=yes
4984
4985 fi
4986
4987 else
4988
4989                 test "$with_gpm" != maybe && { echo "$as_me:4989: WARNING: Cannot find GPM header" >&5
4990 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4991                 with_gpm=no
4992
4993 fi
4994
4995 fi
4996
4997 if test "$with_gpm" != no ; then
4998         echo "$as_me:4998: checking if you want to load GPM dynamically" >&5
4999 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5000
5001 # Check whether --with-dlsym or --without-dlsym was given.
5002 if test "${with_dlsym+set}" = set; then
5003   withval="$with_dlsym"
5004   with_dlsym=$withval
5005 else
5006   with_dlsym=yes
5007 fi;
5008         echo "$as_me:5008: result: $with_dlsym" >&5
5009 echo "${ECHO_T}$with_dlsym" >&6
5010         if test "x$with_dlsym" = xyes ; then
5011
5012 cf_have_dlsym=no
5013 echo "$as_me:5013: checking for dlsym" >&5
5014 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5015 if test "${ac_cv_func_dlsym+set}" = set; then
5016   echo $ECHO_N "(cached) $ECHO_C" >&6
5017 else
5018   cat >conftest.$ac_ext <<_ACEOF
5019 #line 5019 "configure"
5020 #include "confdefs.h"
5021 /* System header to define __stub macros and hopefully few prototypes,
5022     which can conflict with char dlsym (); below.  */
5023 #include <assert.h>
5024 /* Override any gcc2 internal prototype to avoid an error.  */
5025 #ifdef __cplusplus
5026 extern "C"
5027 #endif
5028 /* We use char because int might match the return type of a gcc2
5029    builtin and then its argument prototype would still apply.  */
5030 char dlsym ();
5031 char (*f) ();
5032
5033 int
5034 main ()
5035 {
5036 /* The GNU C library defines this for functions which it implements
5037     to always fail with ENOSYS.  Some functions are actually named
5038     something starting with __ and the normal name is an alias.  */
5039 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5040 choke me
5041 #else
5042 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5043 #endif
5044
5045   ;
5046   return 0;
5047 }
5048 _ACEOF
5049 rm -f conftest.$ac_objext conftest$ac_exeext
5050 if { (eval echo "$as_me:5050: \"$ac_link\"") >&5
5051   (eval $ac_link) 2>&5
5052   ac_status=$?
5053   echo "$as_me:5053: \$? = $ac_status" >&5
5054   (exit $ac_status); } &&
5055          { ac_try='test -s conftest$ac_exeext'
5056   { (eval echo "$as_me:5056: \"$ac_try\"") >&5
5057   (eval $ac_try) 2>&5
5058   ac_status=$?
5059   echo "$as_me:5059: \$? = $ac_status" >&5
5060   (exit $ac_status); }; }; then
5061   ac_cv_func_dlsym=yes
5062 else
5063   echo "$as_me: failed program was:" >&5
5064 cat conftest.$ac_ext >&5
5065 ac_cv_func_dlsym=no
5066 fi
5067 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5068 fi
5069 echo "$as_me:5069: result: $ac_cv_func_dlsym" >&5
5070 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5071 if test $ac_cv_func_dlsym = yes; then
5072   cf_have_dlsym=yes
5073 else
5074
5075 cf_have_libdl=no
5076 echo "$as_me:5076: checking for dlsym in -ldl" >&5
5077 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5078 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5079   echo $ECHO_N "(cached) $ECHO_C" >&6
5080 else
5081   ac_check_lib_save_LIBS=$LIBS
5082 LIBS="-ldl  $LIBS"
5083 cat >conftest.$ac_ext <<_ACEOF
5084 #line 5084 "configure"
5085 #include "confdefs.h"
5086
5087 /* Override any gcc2 internal prototype to avoid an error.  */
5088 #ifdef __cplusplus
5089 extern "C"
5090 #endif
5091 /* We use char because int might match the return type of a gcc2
5092    builtin and then its argument prototype would still apply.  */
5093 char dlsym ();
5094 int
5095 main ()
5096 {
5097 dlsym ();
5098   ;
5099   return 0;
5100 }
5101 _ACEOF
5102 rm -f conftest.$ac_objext conftest$ac_exeext
5103 if { (eval echo "$as_me:5103: \"$ac_link\"") >&5
5104   (eval $ac_link) 2>&5
5105   ac_status=$?
5106   echo "$as_me:5106: \$? = $ac_status" >&5
5107   (exit $ac_status); } &&
5108          { ac_try='test -s conftest$ac_exeext'
5109   { (eval echo "$as_me:5109: \"$ac_try\"") >&5
5110   (eval $ac_try) 2>&5
5111   ac_status=$?
5112   echo "$as_me:5112: \$? = $ac_status" >&5
5113   (exit $ac_status); }; }; then
5114   ac_cv_lib_dl_dlsym=yes
5115 else
5116   echo "$as_me: failed program was:" >&5
5117 cat conftest.$ac_ext >&5
5118 ac_cv_lib_dl_dlsym=no
5119 fi
5120 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5121 LIBS=$ac_check_lib_save_LIBS
5122 fi
5123 echo "$as_me:5123: result: $ac_cv_lib_dl_dlsym" >&5
5124 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5125 if test $ac_cv_lib_dl_dlsym = yes; then
5126
5127         cf_have_dlsym=yes
5128         cf_have_libdl=yes
5129 fi
5130
5131 fi
5132
5133 if test "$cf_have_dlsym" = yes ; then
5134         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5135
5136         echo "$as_me:5136: checking whether able to link to dl*() functions" >&5
5137 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5138         cat >conftest.$ac_ext <<_ACEOF
5139 #line 5139 "configure"
5140 #include "confdefs.h"
5141 #include <dlfcn.h>
5142 int
5143 main ()
5144 {
5145
5146                 void *obj;
5147                 if ((obj = dlopen("filename", 0)) != 0) {
5148                         if (dlsym(obj, "symbolname") == 0) {
5149                         dlclose(obj);
5150                         }
5151                 }
5152   ;
5153   return 0;
5154 }
5155 _ACEOF
5156 rm -f conftest.$ac_objext conftest$ac_exeext
5157 if { (eval echo "$as_me:5157: \"$ac_link\"") >&5
5158   (eval $ac_link) 2>&5
5159   ac_status=$?
5160   echo "$as_me:5160: \$? = $ac_status" >&5
5161   (exit $ac_status); } &&
5162          { ac_try='test -s conftest$ac_exeext'
5163   { (eval echo "$as_me:5163: \"$ac_try\"") >&5
5164   (eval $ac_try) 2>&5
5165   ac_status=$?
5166   echo "$as_me:5166: \$? = $ac_status" >&5
5167   (exit $ac_status); }; }; then
5168
5169 cat >>confdefs.h <<\EOF
5170 #define HAVE_LIBDL 1
5171 EOF
5172
5173 else
5174   echo "$as_me: failed program was:" >&5
5175 cat conftest.$ac_ext >&5
5176
5177                 { { echo "$as_me:5177: error: Cannot link test program for libdl" >&5
5178 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5179    { (exit 1); exit 1; }; }
5180 fi
5181 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5182         echo "$as_me:5182: result: ok" >&5
5183 echo "${ECHO_T}ok" >&6
5184 else
5185         { { echo "$as_me:5185: error: Cannot find dlsym function" >&5
5186 echo "$as_me: error: Cannot find dlsym function" >&2;}
5187    { (exit 1); exit 1; }; }
5188 fi
5189
5190                 if test "x$with_gpm" != xyes ; then
5191                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5192
5193 echo "${as_me:-configure}:5193: testing assuming soname for gpm is $with_gpm ..." 1>&5
5194
5195                         cf_cv_gpm_soname="$with_gpm"
5196                 else
5197
5198 echo "$as_me:5198: checking for soname of gpm library" >&5
5199 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5200 if test "${cf_cv_gpm_soname+set}" = set; then
5201   echo $ECHO_N "(cached) $ECHO_C" >&6
5202 else
5203
5204 cf_cv_gpm_soname=unknown
5205 if test "$cross_compiling" != yes ; then
5206 cat >conftest.$ac_ext <<CF_EOF
5207 #include <gpm.h>
5208 int main()
5209 {
5210 if (Gpm_Open(0,0)) Gpm_Close();
5211         ${cf_cv_main_return:-return}(0);
5212 }
5213 CF_EOF
5214 cf_save_LIBS="$LIBS"
5215         LIBS="-lgpm $LIBS"
5216         if { (eval echo "$as_me:5216: \"$ac_compile\"") >&5
5217   (eval $ac_compile) 2>&5
5218   ac_status=$?
5219   echo "$as_me:5219: \$? = $ac_status" >&5
5220   (exit $ac_status); } ; then
5221                 if { (eval echo "$as_me:5221: \"$ac_link\"") >&5
5222   (eval $ac_link) 2>&5
5223   ac_status=$?
5224   echo "$as_me:5224: \$? = $ac_status" >&5
5225   (exit $ac_status); } ; then
5226                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5227                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5228                 fi
5229         fi
5230 rm -rf conftest*
5231 LIBS="$cf_save_LIBS"
5232 fi
5233
5234 fi
5235 echo "$as_me:5235: result: $cf_cv_gpm_soname" >&5
5236 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5237
5238                 fi
5239                 test "$cf_cv_gpm_soname" != "unknown" &&
5240 cat >>confdefs.h <<EOF
5241 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5242 EOF
5243
5244                 SHLIB_LIST="-ldl $SHLIB_LIST"
5245         else
5246                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5247                 TEST_LIBS="-lgpm $TEST_LIBS"
5248         fi
5249
5250 cat >>confdefs.h <<\EOF
5251 #define HAVE_LIBGPM 1
5252 EOF
5253
5254 echo "$as_me:5254: checking for Gpm_Wgetch in -lgpm" >&5
5255 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5256 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5257   echo $ECHO_N "(cached) $ECHO_C" >&6
5258 else
5259   ac_check_lib_save_LIBS=$LIBS
5260 LIBS="-lgpm  $LIBS"
5261 cat >conftest.$ac_ext <<_ACEOF
5262 #line 5262 "configure"
5263 #include "confdefs.h"
5264
5265 /* Override any gcc2 internal prototype to avoid an error.  */
5266 #ifdef __cplusplus
5267 extern "C"
5268 #endif
5269 /* We use char because int might match the return type of a gcc2
5270    builtin and then its argument prototype would still apply.  */
5271 char Gpm_Wgetch ();
5272 int
5273 main ()
5274 {
5275 Gpm_Wgetch ();
5276   ;
5277   return 0;
5278 }
5279 _ACEOF
5280 rm -f conftest.$ac_objext conftest$ac_exeext
5281 if { (eval echo "$as_me:5281: \"$ac_link\"") >&5
5282   (eval $ac_link) 2>&5
5283   ac_status=$?
5284   echo "$as_me:5284: \$? = $ac_status" >&5
5285   (exit $ac_status); } &&
5286          { ac_try='test -s conftest$ac_exeext'
5287   { (eval echo "$as_me:5287: \"$ac_try\"") >&5
5288   (eval $ac_try) 2>&5
5289   ac_status=$?
5290   echo "$as_me:5290: \$? = $ac_status" >&5
5291   (exit $ac_status); }; }; then
5292   ac_cv_lib_gpm_Gpm_Wgetch=yes
5293 else
5294   echo "$as_me: failed program was:" >&5
5295 cat conftest.$ac_ext >&5
5296 ac_cv_lib_gpm_Gpm_Wgetch=no
5297 fi
5298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5299 LIBS=$ac_check_lib_save_LIBS
5300 fi
5301 echo "$as_me:5301: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5302 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5303 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5304
5305 echo "$as_me:5305: checking if GPM is weakly bound to curses library" >&5
5306 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5307 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5308   echo $ECHO_N "(cached) $ECHO_C" >&6
5309 else
5310
5311 cf_cv_check_gpm_wgetch=unknown
5312 if test "$cross_compiling" != yes ; then
5313
5314 cat >conftest.$ac_ext <<CF_EOF
5315 #include <gpm.h>
5316 int main()
5317 {
5318         Gpm_Wgetch();
5319         ${cf_cv_main_return:-return}(0);
5320 }
5321 CF_EOF
5322
5323         cf_save_LIBS="$LIBS"
5324         # This only works if we can look at the symbol table.  If a shared
5325         # library is stripped for install, we cannot use that.  So we're forced
5326         # to rely on the static library, noting that some packagers may not
5327         # include it.
5328         LIBS="-static -lgpm -dynamic $LIBS"
5329         if { (eval echo "$as_me:5329: \"$ac_compile\"") >&5
5330   (eval $ac_compile) 2>&5
5331   ac_status=$?
5332   echo "$as_me:5332: \$? = $ac_status" >&5
5333   (exit $ac_status); } ; then
5334                 if { (eval echo "$as_me:5334: \"$ac_link\"") >&5
5335   (eval $ac_link) 2>&5
5336   ac_status=$?
5337   echo "$as_me:5337: \$? = $ac_status" >&5
5338   (exit $ac_status); } ; then
5339                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5340                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5341                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5342                 fi
5343         fi
5344         rm -rf conftest*
5345         LIBS="$cf_save_LIBS"
5346 fi
5347
5348 fi
5349 echo "$as_me:5349: result: $cf_cv_check_gpm_wgetch" >&5
5350 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5351
5352 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5353         { echo "$as_me:5353: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5354 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5355 fi
5356
5357 fi
5358
5359 fi
5360
5361 # not everyone has "test -c"
5362 if test -c /dev/sysmouse 2>/dev/null ; then
5363 echo "$as_me:5363: checking if you want to use sysmouse" >&5
5364 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5365
5366 # Check whether --with-sysmouse or --without-sysmouse was given.
5367 if test "${with_sysmouse+set}" = set; then
5368   withval="$with_sysmouse"
5369   cf_with_sysmouse=$withval
5370 else
5371   cf_with_sysmouse=maybe
5372 fi;
5373         if test "$cf_with_sysmouse" != no ; then
5374         cat >conftest.$ac_ext <<_ACEOF
5375 #line 5375 "configure"
5376 #include "confdefs.h"
5377
5378 #include <osreldate.h>
5379 #if (__FreeBSD_version >= 400017)
5380 #include <sys/consio.h>
5381 #include <sys/fbio.h>
5382 #else
5383 #include <machine/console.h>
5384 #endif
5385
5386 int
5387 main ()
5388 {
5389
5390         struct mouse_info the_mouse;
5391         ioctl(0, CONS_MOUSECTL, &the_mouse);
5392
5393   ;
5394   return 0;
5395 }
5396 _ACEOF
5397 rm -f conftest.$ac_objext
5398 if { (eval echo "$as_me:5398: \"$ac_compile\"") >&5
5399   (eval $ac_compile) 2>&5
5400   ac_status=$?
5401   echo "$as_me:5401: \$? = $ac_status" >&5
5402   (exit $ac_status); } &&
5403          { ac_try='test -s conftest.$ac_objext'
5404   { (eval echo "$as_me:5404: \"$ac_try\"") >&5
5405   (eval $ac_try) 2>&5
5406   ac_status=$?
5407   echo "$as_me:5407: \$? = $ac_status" >&5
5408   (exit $ac_status); }; }; then
5409   cf_with_sysmouse=yes
5410 else
5411   echo "$as_me: failed program was:" >&5
5412 cat conftest.$ac_ext >&5
5413 cf_with_sysmouse=no
5414 fi
5415 rm -f conftest.$ac_objext conftest.$ac_ext
5416         fi
5417 echo "$as_me:5417: result: $cf_with_sysmouse" >&5
5418 echo "${ECHO_T}$cf_with_sysmouse" >&6
5419 test "$cf_with_sysmouse" = yes &&
5420 cat >>confdefs.h <<\EOF
5421 #define USE_SYSMOUSE 1
5422 EOF
5423
5424 fi
5425
5426 if test X"$CC_G_OPT" = X"" ; then
5427         CC_G_OPT='-g'
5428         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5429 fi
5430
5431 if test X"$CXX_G_OPT" = X"" ; then
5432         CXX_G_OPT='-g'
5433         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5434 fi
5435
5436 echo "$as_me:5436: checking for default loader flags" >&5
5437 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5438 case $DFT_LWR_MODEL in
5439 libtool) LD_MODEL=''   ;;
5440 normal)  LD_MODEL=''   ;;
5441 debug)   LD_MODEL=$CC_G_OPT ;;
5442 profile) LD_MODEL='-pg';;
5443 shared)  LD_MODEL=''   ;;
5444 esac
5445 echo "$as_me:5445: result: $LD_MODEL" >&5
5446 echo "${ECHO_T}$LD_MODEL" >&6
5447
5448 case $DFT_LWR_MODEL in
5449 shared)
5450
5451 echo "$as_me:5451: checking if rpath option should be used" >&5
5452 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5453
5454 # Check whether --enable-rpath or --disable-rpath was given.
5455 if test "${enable_rpath+set}" = set; then
5456   enableval="$enable_rpath"
5457   cf_cv_enable_rpath=$enableval
5458 else
5459   cf_cv_enable_rpath=no
5460 fi;
5461 echo "$as_me:5461: result: $cf_cv_enable_rpath" >&5
5462 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5463
5464 echo "$as_me:5464: checking if shared libraries should be relinked during install" >&5
5465 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5466
5467 # Check whether --enable-relink or --disable-relink was given.
5468 if test "${enable_relink+set}" = set; then
5469   enableval="$enable_relink"
5470   cf_cv_do_relink=$enableval
5471 else
5472   cf_cv_do_relink=yes
5473 fi;
5474 echo "$as_me:5474: result: $cf_cv_do_relink" >&5
5475 echo "${ECHO_T}$cf_cv_do_relink" >&6
5476         ;;
5477 esac
5478
5479 # we will build libraries one-level down.
5480 rel_builddir=..
5481
5482 LD_RPATH_OPT=
5483 echo "$as_me:5483: checking for an rpath option" >&5
5484 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5485 case $cf_cv_system_name in #(vi
5486 irix*) #(vi
5487         if test "$GCC" = yes; then
5488                 LD_RPATH_OPT="-Wl,-rpath,"
5489         else
5490                 LD_RPATH_OPT="-rpath "
5491         fi
5492         ;;
5493 linux*|gnu*|k*bsd*-gnu) #(vi
5494         LD_RPATH_OPT="-Wl,-rpath,"
5495         ;;
5496 openbsd[2-9].*|mirbsd*) #(vi
5497         LD_RPATH_OPT="-Wl,-rpath,"
5498         ;;
5499 dragonfly*|freebsd*) #(vi
5500         LD_RPATH_OPT="-rpath "
5501         ;;
5502 netbsd*) #(vi
5503         LD_RPATH_OPT="-Wl,-rpath,"
5504         ;;
5505 osf*|mls+*) #(vi
5506         LD_RPATH_OPT="-rpath "
5507         ;;
5508 solaris2*) #(vi
5509         LD_RPATH_OPT="-R"
5510         ;;
5511 *)
5512         ;;
5513 esac
5514 echo "$as_me:5514: result: $LD_RPATH_OPT" >&5
5515 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5516
5517 case "x$LD_RPATH_OPT" in #(vi
5518 x-R*)
5519         echo "$as_me:5519: checking if we need a space after rpath option" >&5
5520 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5521         cf_save_LIBS="$LIBS"
5522         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5523         cat >conftest.$ac_ext <<_ACEOF
5524 #line 5524 "configure"
5525 #include "confdefs.h"
5526
5527 int
5528 main ()
5529 {
5530
5531   ;
5532   return 0;
5533 }
5534 _ACEOF
5535 rm -f conftest.$ac_objext conftest$ac_exeext
5536 if { (eval echo "$as_me:5536: \"$ac_link\"") >&5
5537   (eval $ac_link) 2>&5
5538   ac_status=$?
5539   echo "$as_me:5539: \$? = $ac_status" >&5
5540   (exit $ac_status); } &&
5541          { ac_try='test -s conftest$ac_exeext'
5542   { (eval echo "$as_me:5542: \"$ac_try\"") >&5
5543   (eval $ac_try) 2>&5
5544   ac_status=$?
5545   echo "$as_me:5545: \$? = $ac_status" >&5
5546   (exit $ac_status); }; }; then
5547   cf_rpath_space=no
5548 else
5549   echo "$as_me: failed program was:" >&5
5550 cat conftest.$ac_ext >&5
5551 cf_rpath_space=yes
5552 fi
5553 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5554         LIBS="$cf_save_LIBS"
5555         echo "$as_me:5555: result: $cf_rpath_space" >&5
5556 echo "${ECHO_T}$cf_rpath_space" >&6
5557         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5558         ;;
5559 esac
5560
5561         RM_SHARED_OPTS=
5562         LOCAL_LDFLAGS=
5563         LOCAL_LDFLAGS2=
5564         LD_SHARED_OPTS=
5565         INSTALL_LIB="-m 644"
5566         : ${rel_builddir:=.}
5567
5568         shlibdir=$libdir
5569
5570         MAKE_DLLS="#"
5571
5572         cf_cv_do_symlinks=no
5573         cf_ld_rpath_opt=
5574         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5575
5576         echo "$as_me:5576: checking if release/abi version should be used for shared libs" >&5
5577 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5578
5579 # Check whether --with-shlib-version or --without-shlib-version was given.
5580 if test "${with_shlib_version+set}" = set; then
5581   withval="$with_shlib_version"
5582   test -z "$withval" && withval=auto
5583         case $withval in #(vi
5584         yes) #(vi
5585                 cf_cv_shlib_version=auto
5586                 ;;
5587         rel|abi|auto|no) #(vi
5588                 cf_cv_shlib_version=$withval
5589                 ;;
5590         *)
5591                 { { echo "$as_me:5591: error: option value must be one of: rel, abi, auto or no" >&5
5592 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5593    { (exit 1); exit 1; }; }
5594                 ;;
5595         esac
5596
5597 else
5598   cf_cv_shlib_version=auto
5599 fi;
5600         echo "$as_me:5600: result: $cf_cv_shlib_version" >&5
5601 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5602
5603         cf_cv_rm_so_locs=no
5604         cf_try_cflags=
5605
5606         # Some less-capable ports of gcc support only -fpic
5607         CC_SHARED_OPTS=
5608         if test "$GCC" = yes
5609         then
5610                 echo "$as_me:5610: checking which $CC option to use" >&5
5611 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5612                 cf_save_CFLAGS="$CFLAGS"
5613                 for CC_SHARED_OPTS in -fPIC -fpic ''
5614                 do
5615                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5616                         cat >conftest.$ac_ext <<_ACEOF
5617 #line 5617 "configure"
5618 #include "confdefs.h"
5619 #include <stdio.h>
5620 int
5621 main ()
5622 {
5623 int x = 1
5624   ;
5625   return 0;
5626 }
5627 _ACEOF
5628 rm -f conftest.$ac_objext
5629 if { (eval echo "$as_me:5629: \"$ac_compile\"") >&5
5630   (eval $ac_compile) 2>&5
5631   ac_status=$?
5632   echo "$as_me:5632: \$? = $ac_status" >&5
5633   (exit $ac_status); } &&
5634          { ac_try='test -s conftest.$ac_objext'
5635   { (eval echo "$as_me:5635: \"$ac_try\"") >&5
5636   (eval $ac_try) 2>&5
5637   ac_status=$?
5638   echo "$as_me:5638: \$? = $ac_status" >&5
5639   (exit $ac_status); }; }; then
5640   break
5641 else
5642   echo "$as_me: failed program was:" >&5
5643 cat conftest.$ac_ext >&5
5644 fi
5645 rm -f conftest.$ac_objext conftest.$ac_ext
5646                 done
5647                 echo "$as_me:5647: result: $CC_SHARED_OPTS" >&5
5648 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5649                 CFLAGS="$cf_save_CFLAGS"
5650         fi
5651
5652         cf_cv_shlib_version_infix=no
5653
5654         case $cf_cv_system_name in #(vi
5655         aix4.3-9*|aix[5-7]*) #(vi
5656                 if test "$GCC" = yes; then
5657                         CC_SHARED_OPTS=
5658                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5659                 else
5660                         # CC_SHARED_OPTS='-qpic=large -G'
5661                         # perhaps "-bM:SRE -bnoentry -bexpall"
5662                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5663                 fi
5664                 ;;
5665         beos*) #(vi
5666                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5667                 ;;
5668         cygwin*) #(vi
5669                 CC_SHARED_OPTS=
5670                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5671                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5672                 cf_cv_shlib_version=cygdll
5673                 cf_cv_shlib_version_infix=cygdll
5674                 shlibdir=$bindir
5675                 MAKE_DLLS=
5676                 cat >mk_shared_lib.sh <<-CF_EOF
5677                 #!/bin/sh
5678                 SHARED_LIB=\$1
5679                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5680                 shift
5681                 cat <<-EOF
5682                 Linking shared library
5683                 ** SHARED_LIB \$SHARED_LIB
5684                 ** IMPORT_LIB \$IMPORT_LIB
5685 EOF
5686                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5687 CF_EOF
5688                 chmod +x mk_shared_lib.sh
5689                 ;;
5690         msys*) #(vi
5691                 CC_SHARED_OPTS=
5692                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5693                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5694                 cf_cv_shlib_version=msysdll
5695                 cf_cv_shlib_version_infix=msysdll
5696                 shlibdir=$bindir
5697                 MAKE_DLLS=
5698                 cat >mk_shared_lib.sh <<-CF_EOF
5699                 #!/bin/sh
5700                 SHARED_LIB=\$1
5701                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5702                 shift
5703                 cat <<-EOF
5704                 Linking shared library
5705                 ** SHARED_LIB \$SHARED_LIB
5706                 ** IMPORT_LIB \$IMPORT_LIB
5707 EOF
5708                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5709 CF_EOF
5710                 chmod +x mk_shared_lib.sh
5711                 ;;
5712         darwin*) #(vi
5713                 cf_try_cflags="no-cpp-precomp"
5714                 CC_SHARED_OPTS="-dynamic"
5715                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5716                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5717                 cf_cv_shlib_version_infix=yes
5718                 echo "$as_me:5718: checking if ld -search_paths_first works" >&5
5719 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5720 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5721   echo $ECHO_N "(cached) $ECHO_C" >&6
5722 else
5723
5724                         cf_save_LDFLAGS=$LDFLAGS
5725                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5726                         cat >conftest.$ac_ext <<_ACEOF
5727 #line 5727 "configure"
5728 #include "confdefs.h"
5729
5730 int
5731 main ()
5732 {
5733 int i;
5734   ;
5735   return 0;
5736 }
5737 _ACEOF
5738 rm -f conftest.$ac_objext conftest$ac_exeext
5739 if { (eval echo "$as_me:5739: \"$ac_link\"") >&5
5740   (eval $ac_link) 2>&5
5741   ac_status=$?
5742   echo "$as_me:5742: \$? = $ac_status" >&5
5743   (exit $ac_status); } &&
5744          { ac_try='test -s conftest$ac_exeext'
5745   { (eval echo "$as_me:5745: \"$ac_try\"") >&5
5746   (eval $ac_try) 2>&5
5747   ac_status=$?
5748   echo "$as_me:5748: \$? = $ac_status" >&5
5749   (exit $ac_status); }; }; then
5750   cf_cv_ldflags_search_paths_first=yes
5751 else
5752   echo "$as_me: failed program was:" >&5
5753 cat conftest.$ac_ext >&5
5754 cf_cv_ldflags_search_paths_first=no
5755 fi
5756 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5757                                 LDFLAGS=$cf_save_LDFLAGS
5758 fi
5759 echo "$as_me:5759: result: $cf_cv_ldflags_search_paths_first" >&5
5760 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5761                 if test $cf_cv_ldflags_search_paths_first = yes; then
5762                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5763                 fi
5764                 ;;
5765         hpux[7-8]*) #(vi
5766                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5767                 if test "$GCC" != yes; then
5768                         CC_SHARED_OPTS='+Z'
5769                 fi
5770                 MK_SHARED_LIB='${LD} -b -o $@'
5771                 INSTALL_LIB="-m 555"
5772                 ;;
5773         hpux*) #(vi
5774                 # (tested with gcc 2.7.2 -- I don't have c89)
5775                 if test "$GCC" = yes; then
5776                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5777                 else
5778                         CC_SHARED_OPTS='+Z'
5779                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5780                 fi
5781                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5782                 # HP-UX shared libraries must be executable, and should be
5783                 # readonly to exploit a quirk in the memory manager.
5784                 INSTALL_LIB="-m 555"
5785                 ;;
5786         interix*)
5787                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5788                 if test "$cf_cv_shlib_version" = rel; then
5789                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5790                 else
5791                         cf_shared_soname='`basename `'
5792                 fi
5793                 CC_SHARED_OPTS=
5794                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5795                 ;;
5796         irix*) #(vi
5797                 if test "$cf_cv_enable_rpath" = yes ; then
5798                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5799                 fi
5800                 # tested with IRIX 5.2 and 'cc'.
5801                 if test "$GCC" != yes; then
5802                         CC_SHARED_OPTS='-KPIC'
5803                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5804                 else
5805                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5806                 fi
5807                 cf_cv_rm_so_locs=yes
5808                 ;;
5809         linux*|gnu*|k*bsd*-gnu) #(vi
5810                 if test "$DFT_LWR_MODEL" = "shared" ; then
5811                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5812                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5813                 fi
5814                 if test "$cf_cv_enable_rpath" = yes ; then
5815                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5816                 fi
5817
5818         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5819         if test "$cf_cv_shlib_version" = rel; then
5820                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5821         else
5822                 cf_cv_shared_soname='`basename $@`'
5823         fi
5824
5825                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5826                 ;;
5827         mingw*) #(vi
5828                 cf_cv_shlib_version=mingw
5829                 cf_cv_shlib_version_infix=mingw
5830                 shlibdir=$bindir
5831                 MAKE_DLLS=
5832                 if test "$DFT_LWR_MODEL" = "shared" ; then
5833                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5834                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5835                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5836                 fi
5837                 CC_SHARED_OPTS=
5838                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5839                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5840                 cat >mk_shared_lib.sh <<-CF_EOF
5841                 #!/bin/sh
5842                 SHARED_LIB=\$1
5843                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5844                 shift
5845                 cat <<-EOF
5846                 Linking shared library
5847                 ** SHARED_LIB \$SHARED_LIB
5848                 ** IMPORT_LIB \$IMPORT_LIB
5849 EOF
5850                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5851 CF_EOF
5852                 chmod +x mk_shared_lib.sh
5853                 ;;
5854         openbsd[2-9].*|mirbsd*) #(vi
5855                 if test "$DFT_LWR_MODEL" = "shared" ; then
5856                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5857                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5858                 fi
5859                 if test "$cf_cv_enable_rpath" = yes ; then
5860                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5861                 fi
5862                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5863
5864         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5865         if test "$cf_cv_shlib_version" = rel; then
5866                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5867         else
5868                 cf_cv_shared_soname='`basename $@`'
5869         fi
5870
5871                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5872                 ;;
5873         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5874                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5875                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5876                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5877                 ;;
5878         dragonfly*|freebsd*) #(vi
5879                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5880                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5881                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5882                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5883                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5884                 fi
5885
5886         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5887         if test "$cf_cv_shlib_version" = rel; then
5888                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5889         else
5890                 cf_cv_shared_soname='`basename $@`'
5891         fi
5892
5893                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5894                 ;;
5895         netbsd*) #(vi
5896                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5897                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5898                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5899                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5900                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5901                         if test "$cf_cv_shlib_version" = auto; then
5902                         if test -f /usr/libexec/ld.elf_so; then
5903                                 cf_cv_shlib_version=abi
5904                         else
5905                                 cf_cv_shlib_version=rel
5906                         fi
5907                         fi
5908
5909         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5910         if test "$cf_cv_shlib_version" = rel; then
5911                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5912         else
5913                 cf_cv_shared_soname='`basename $@`'
5914         fi
5915
5916                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5917                 else
5918                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
5919                 fi
5920                 ;;
5921         osf*|mls+*) #(vi
5922                 # tested with OSF/1 V3.2 and 'cc'
5923                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5924                 # link with shared libs).
5925                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5926                 case $host_os in #(vi
5927                 osf4*)
5928                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5929                         ;;
5930                 esac
5931                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5932                 if test "$DFT_LWR_MODEL" = "shared" ; then
5933                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5934                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5935                 fi
5936                 cf_cv_rm_so_locs=yes
5937                 ;;
5938         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5939                 # tested with osr5.0.5
5940                 if test "$GCC" != yes; then
5941                         CC_SHARED_OPTS='-belf -KPIC'
5942                 fi
5943                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5944                 if test "$cf_cv_enable_rpath" = yes ; then
5945                         # only way is to set LD_RUN_PATH but no switch for it
5946                         RUN_PATH=$libdir
5947                 fi
5948                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5949                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5950                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5951                 ;;
5952         sunos4*) #(vi
5953                 # tested with SunOS 4.1.1 and gcc 2.7.0
5954                 if test "$GCC" != yes; then
5955                         CC_SHARED_OPTS='-KPIC'
5956                 fi
5957                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5958                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5959                 ;;
5960         solaris2*) #(vi
5961                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5962                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5963                 if test "$DFT_LWR_MODEL" = "shared" ; then
5964                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5965                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5966                 fi
5967                 if test "$cf_cv_enable_rpath" = yes ; then
5968                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5969                 fi
5970
5971         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5972         if test "$cf_cv_shlib_version" = rel; then
5973                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5974         else
5975                 cf_cv_shared_soname='`basename $@`'
5976         fi
5977
5978                 if test "$GCC" != yes; then
5979                         cf_save_CFLAGS="$CFLAGS"
5980                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5981                         do
5982                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5983                                 cat >conftest.$ac_ext <<_ACEOF
5984 #line 5984 "configure"
5985 #include "confdefs.h"
5986 #include <stdio.h>
5987 int
5988 main ()
5989 {
5990 printf("Hello\n");
5991   ;
5992   return 0;
5993 }
5994 _ACEOF
5995 rm -f conftest.$ac_objext
5996 if { (eval echo "$as_me:5996: \"$ac_compile\"") >&5
5997   (eval $ac_compile) 2>&5
5998   ac_status=$?
5999   echo "$as_me:5999: \$? = $ac_status" >&5
6000   (exit $ac_status); } &&
6001          { ac_try='test -s conftest.$ac_objext'
6002   { (eval echo "$as_me:6002: \"$ac_try\"") >&5
6003   (eval $ac_try) 2>&5
6004   ac_status=$?
6005   echo "$as_me:6005: \$? = $ac_status" >&5
6006   (exit $ac_status); }; }; then
6007   break
6008 else
6009   echo "$as_me: failed program was:" >&5
6010 cat conftest.$ac_ext >&5
6011 fi
6012 rm -f conftest.$ac_objext conftest.$ac_ext
6013                         done
6014                         CFLAGS="$cf_save_CFLAGS"
6015                         CC_SHARED_OPTS=$cf_shared_opts
6016                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6017                 else
6018                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6019                 fi
6020                 ;;
6021         sysv5uw7*|unix_sv*) #(vi
6022                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6023                 if test "$GCC" != yes; then
6024                         CC_SHARED_OPTS='-KPIC'
6025                 fi
6026                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6027                 ;;
6028         *)
6029                 CC_SHARED_OPTS='unknown'
6030                 MK_SHARED_LIB='echo unknown'
6031                 ;;
6032         esac
6033
6034         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6035         case "$cf_cv_shlib_version" in #(vi
6036         rel|abi)
6037                 case "$MK_SHARED_LIB" in #(vi
6038                 *'-o $@') #(vi
6039                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6040                         ;;
6041                 *)
6042                         { echo "$as_me:6042: WARNING: ignored --with-shlib-version" >&5
6043 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6044                         ;;
6045                 esac
6046                 ;;
6047         esac
6048
6049         if test -n "$cf_try_cflags"
6050         then
6051 cat > conftest.$ac_ext <<EOF
6052 #line 6052 "${as_me:-configure}"
6053 #include <stdio.h>
6054 int main(int argc, char *argv[])
6055 {
6056         printf("hello\n");
6057         return (argv[argc-1] == 0) ;
6058 }
6059 EOF
6060                 cf_save_CFLAGS="$CFLAGS"
6061                 for cf_opt in $cf_try_cflags
6062                 do
6063                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6064                         echo "$as_me:6064: checking if CFLAGS option -$cf_opt works" >&5
6065 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6066                         if { (eval echo "$as_me:6066: \"$ac_compile\"") >&5
6067   (eval $ac_compile) 2>&5
6068   ac_status=$?
6069   echo "$as_me:6069: \$? = $ac_status" >&5
6070   (exit $ac_status); }; then
6071                                 echo "$as_me:6071: result: yes" >&5
6072 echo "${ECHO_T}yes" >&6
6073                                 cf_save_CFLAGS="$CFLAGS"
6074                         else
6075                                 echo "$as_me:6075: result: no" >&5
6076 echo "${ECHO_T}no" >&6
6077                         fi
6078                 done
6079                 CFLAGS="$cf_save_CFLAGS"
6080         fi
6081
6082         # RPATH_LIST is a colon-separated list of directories
6083         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6084         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6085
6086         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6087
6088         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6089
6090 echo "${as_me:-configure}:6090: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6091
6092         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6093
6094 echo "${as_me:-configure}:6094: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6095
6096 if test "$CC_SHARED_OPTS" = "unknown"; then
6097         for model in $cf_list_models; do
6098                 if test "$model" = "shared"; then
6099                         { { echo "$as_me:6099: error: Shared libraries are not supported in this version" >&5
6100 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6101    { (exit 1); exit 1; }; }
6102                 fi
6103         done
6104 fi
6105
6106 # pretend that ncurses==ncursesw==ncursest
6107 echo "$as_me:6107: checking if you want to disable library suffixes" >&5
6108 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6109
6110 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6111 if test "${enable_lib_suffixes+set}" = set; then
6112   enableval="$enable_lib_suffixes"
6113   disable_lib_suffixes=$enableval
6114 else
6115   disable_lib_suffixes=no
6116 fi;
6117 echo "$as_me:6117: result: $disable_lib_suffixes" >&5
6118 echo "${ECHO_T}$disable_lib_suffixes" >&6
6119
6120 ### If we're building with rpath, try to link non-standard libs that way too.
6121 if test "$DFT_LWR_MODEL" = "shared"; then
6122
6123 echo "$as_me:6123: checking if rpath-hack should be disabled" >&5
6124 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6125
6126 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6127 if test "${enable_rpath_hack+set}" = set; then
6128   enableval="$enable_rpath_hack"
6129   test "$enableval" != no && enableval=yes
6130   if test "$enableval" != "yes" ; then
6131     cf_disable_rpath_hack=yes
6132   else
6133     cf_disable_rpath_hack=no
6134   fi
6135 else
6136   enableval=yes
6137   cf_disable_rpath_hack=no
6138
6139 fi;
6140 echo "$as_me:6140: result: $cf_disable_rpath_hack" >&5
6141 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6142 if test "$cf_disable_rpath_hack" = no ; then
6143
6144 echo "$as_me:6144: checking for updated LDFLAGS" >&5
6145 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6146 if test -n "$LD_RPATH_OPT" ; then
6147         echo "$as_me:6147: result: maybe" >&5
6148 echo "${ECHO_T}maybe" >&6
6149
6150         for ac_prog in ldd
6151 do
6152   # Extract the first word of "$ac_prog", so it can be a program name with args.
6153 set dummy $ac_prog; ac_word=$2
6154 echo "$as_me:6154: checking for $ac_word" >&5
6155 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6156 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6157   echo $ECHO_N "(cached) $ECHO_C" >&6
6158 else
6159   if test -n "$cf_ldd_prog"; then
6160   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6161 else
6162   ac_save_IFS=$IFS; IFS=$ac_path_separator
6163 ac_dummy="$PATH"
6164 for ac_dir in $ac_dummy; do
6165   IFS=$ac_save_IFS
6166   test -z "$ac_dir" && ac_dir=.
6167   $as_executable_p "$ac_dir/$ac_word" || continue
6168 ac_cv_prog_cf_ldd_prog="$ac_prog"
6169 echo "$as_me:6169: found $ac_dir/$ac_word" >&5
6170 break
6171 done
6172
6173 fi
6174 fi
6175 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6176 if test -n "$cf_ldd_prog"; then
6177   echo "$as_me:6177: result: $cf_ldd_prog" >&5
6178 echo "${ECHO_T}$cf_ldd_prog" >&6
6179 else
6180   echo "$as_me:6180: result: no" >&5
6181 echo "${ECHO_T}no" >&6
6182 fi
6183
6184   test -n "$cf_ldd_prog" && break
6185 done
6186 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6187
6188         cf_rpath_list="/usr/lib /lib"
6189         if test "$cf_ldd_prog" != no
6190         then
6191                 cf_rpath_oops=
6192
6193 cat >conftest.$ac_ext <<_ACEOF
6194 #line 6194 "configure"
6195 #include "confdefs.h"
6196 #include <stdio.h>
6197 int
6198 main ()
6199 {
6200 printf("Hello");
6201   ;
6202   return 0;
6203 }
6204 _ACEOF
6205 rm -f conftest.$ac_objext conftest$ac_exeext
6206 if { (eval echo "$as_me:6206: \"$ac_link\"") >&5
6207   (eval $ac_link) 2>&5
6208   ac_status=$?
6209   echo "$as_me:6209: \$? = $ac_status" >&5
6210   (exit $ac_status); } &&
6211          { ac_try='test -s conftest$ac_exeext'
6212   { (eval echo "$as_me:6212: \"$ac_try\"") >&5
6213   (eval $ac_try) 2>&5
6214   ac_status=$?
6215   echo "$as_me:6215: \$? = $ac_status" >&5
6216   (exit $ac_status); }; }; then
6217   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6218                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6219 else
6220   echo "$as_me: failed program was:" >&5
6221 cat conftest.$ac_ext >&5
6222 fi
6223 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6224
6225                 # If we passed the link-test, but get a "not found" on a given library,
6226                 # this could be due to inept reconfiguration of gcc to make it only
6227                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6228                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6229                 # /usr/local libraries.
6230                 if test -n "$cf_rpath_oops"
6231                 then
6232                         for cf_rpath_src in $cf_rpath_oops
6233                         do
6234                                 for cf_rpath_dir in \
6235                                         /usr/local \
6236                                         /usr/pkg \
6237                                         /opt/sfw
6238                                 do
6239                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6240                                         then
6241                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6242
6243 echo "${as_me:-configure}:6243: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6244
6245                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6246                                                 break
6247                                         fi
6248                                 done
6249                         done
6250                 fi
6251         fi
6252
6253         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6254
6255 echo "${as_me:-configure}:6255: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6256
6257 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6258
6259 echo "${as_me:-configure}:6259: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6260
6261 cf_rpath_dst=
6262 for cf_rpath_src in $LDFLAGS
6263 do
6264         case $cf_rpath_src in #(vi
6265         -L*) #(vi
6266
6267                 # check if this refers to a directory which we will ignore
6268                 cf_rpath_skip=no
6269                 if test -n "$cf_rpath_list"
6270                 then
6271                         for cf_rpath_item in $cf_rpath_list
6272                         do
6273                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6274                                 then
6275                                         cf_rpath_skip=yes
6276                                         break
6277                                 fi
6278                         done
6279                 fi
6280
6281                 if test "$cf_rpath_skip" = no
6282                 then
6283                         # transform the option
6284                         if test "$LD_RPATH_OPT" = "-R " ; then
6285                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6286                         else
6287                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6288                         fi
6289
6290                         # if we have not already added this, add it now
6291                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6292                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6293                         then
6294                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6295
6296 echo "${as_me:-configure}:6296: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6297
6298                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6299                         fi
6300                 fi
6301                 ;;
6302         esac
6303         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6304 done
6305 LDFLAGS=$cf_rpath_dst
6306
6307 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6308
6309 echo "${as_me:-configure}:6309: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6310
6311 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6312
6313 echo "${as_me:-configure}:6313: testing ...checking LIBS $LIBS ..." 1>&5
6314
6315 cf_rpath_dst=
6316 for cf_rpath_src in $LIBS
6317 do
6318         case $cf_rpath_src in #(vi
6319         -L*) #(vi
6320
6321                 # check if this refers to a directory which we will ignore
6322                 cf_rpath_skip=no
6323                 if test -n "$cf_rpath_list"
6324                 then
6325                         for cf_rpath_item in $cf_rpath_list
6326                         do
6327                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6328                                 then
6329                                         cf_rpath_skip=yes
6330                                         break
6331                                 fi
6332                         done
6333                 fi
6334
6335                 if test "$cf_rpath_skip" = no
6336                 then
6337                         # transform the option
6338                         if test "$LD_RPATH_OPT" = "-R " ; then
6339                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6340                         else
6341                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6342                         fi
6343
6344                         # if we have not already added this, add it now
6345                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6346                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6347                         then
6348                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6349
6350 echo "${as_me:-configure}:6350: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6351
6352                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6353                         fi
6354                 fi
6355                 ;;
6356         esac
6357         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6358 done
6359 LIBS=$cf_rpath_dst
6360
6361 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6362
6363 echo "${as_me:-configure}:6363: testing ...checked LIBS $LIBS ..." 1>&5
6364
6365         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6366
6367 echo "${as_me:-configure}:6367: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6368
6369 else
6370         echo "$as_me:6370: result: no" >&5
6371 echo "${ECHO_T}no" >&6
6372 fi
6373
6374 fi
6375
6376 fi
6377
6378 ###############################################################################
6379
6380 ###     use option --disable-overwrite to leave out the link to -lcurses
6381 echo "$as_me:6381: checking if you wish to install ncurses overwriting curses" >&5
6382 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6383
6384 # Check whether --enable-overwrite or --disable-overwrite was given.
6385 if test "${enable_overwrite+set}" = set; then
6386   enableval="$enable_overwrite"
6387   with_overwrite=$enableval
6388 else
6389   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6390 fi;
6391 echo "$as_me:6391: result: $with_overwrite" >&5
6392 echo "${ECHO_T}$with_overwrite" >&6
6393
6394 echo "$as_me:6394: checking if external terminfo-database is used" >&5
6395 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6396
6397 # Check whether --enable-database or --disable-database was given.
6398 if test "${enable_database+set}" = set; then
6399   enableval="$enable_database"
6400   use_database=$enableval
6401 else
6402   use_database=yes
6403 fi;
6404 echo "$as_me:6404: result: $use_database" >&5
6405 echo "${ECHO_T}$use_database" >&6
6406
6407 case $host_os in #(vi
6408 os2*) #(vi
6409         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6410         ;;
6411 *) #(vi
6412         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6413         ;;
6414 esac
6415
6416 NCURSES_USE_DATABASE=0
6417 if test "$use_database" != no ; then
6418         NCURSES_USE_DATABASE=1
6419
6420         echo "$as_me:6420: checking which terminfo source-file will be installed" >&5
6421 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6422
6423 # Check whether --with-database or --without-database was given.
6424 if test "${with_database+set}" = set; then
6425   withval="$with_database"
6426   TERMINFO_SRC=$withval
6427 fi;
6428         echo "$as_me:6428: result: $TERMINFO_SRC" >&5
6429 echo "${ECHO_T}$TERMINFO_SRC" >&6
6430
6431         echo "$as_me:6431: checking whether to use hashed database instead of directory/tree" >&5
6432 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6433
6434 # Check whether --with-hashed-db or --without-hashed-db was given.
6435 if test "${with_hashed_db+set}" = set; then
6436   withval="$with_hashed_db"
6437
6438 else
6439   with_hashed_db=no
6440 fi;
6441         echo "$as_me:6441: result: $with_hashed_db" >&5
6442 echo "${ECHO_T}$with_hashed_db" >&6
6443 else
6444         with_hashed_db=no
6445 fi
6446
6447 echo "$as_me:6447: checking for list of fallback descriptions" >&5
6448 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6449
6450 # Check whether --with-fallbacks or --without-fallbacks was given.
6451 if test "${with_fallbacks+set}" = set; then
6452   withval="$with_fallbacks"
6453   with_fallback=$withval
6454 else
6455   with_fallback=
6456 fi;
6457 echo "$as_me:6457: result: $with_fallback" >&5
6458 echo "${ECHO_T}$with_fallback" >&6
6459 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6460
6461 echo "$as_me:6461: checking if you want modern xterm or antique" >&5
6462 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6463
6464 # Check whether --with-xterm-new or --without-xterm-new was given.
6465 if test "${with_xterm_new+set}" = set; then
6466   withval="$with_xterm_new"
6467   with_xterm_new=$withval
6468 else
6469   with_xterm_new=yes
6470 fi;
6471 case $with_xterm_new in
6472 no)     with_xterm_new=xterm-old;;
6473 *)      with_xterm_new=xterm-new;;
6474 esac
6475 echo "$as_me:6475: result: $with_xterm_new" >&5
6476 echo "${ECHO_T}$with_xterm_new" >&6
6477 WHICH_XTERM=$with_xterm_new
6478
6479 echo "$as_me:6479: checking if xterm backspace sends BS or DEL" >&5
6480 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6481
6482 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6483 if test "${with_xterm_kbs+set}" = set; then
6484   withval="$with_xterm_kbs"
6485   with_xterm_kbs=$withval
6486 else
6487   with_xterm_kbs=BS
6488 fi;
6489 case x$with_xterm_kbs in
6490 xyes|xno|xBS|xbs|x8)
6491         with_xterm_kbs=BS
6492         ;;
6493 xDEL|xdel|x127)
6494         with_xterm_kbs=DEL
6495         ;;
6496 *)
6497         with_xterm_kbs=$withval
6498         ;;
6499 esac
6500 echo "$as_me:6500: result: $with_xterm_kbs" >&5
6501 echo "${ECHO_T}$with_xterm_kbs" >&6
6502 XTERM_KBS=$with_xterm_kbs
6503
6504 MAKE_TERMINFO=
6505 if test "$use_database" = no ; then
6506         TERMINFO="${datadir}/terminfo"
6507         MAKE_TERMINFO="#"
6508 else
6509
6510 echo "$as_me:6510: checking for list of terminfo directories" >&5
6511 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6512
6513 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6514 if test "${with_terminfo_dirs+set}" = set; then
6515   withval="$with_terminfo_dirs"
6516
6517 else
6518   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6519 fi;
6520 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6521 cf_dst_path=
6522 for cf_src_path in $withval
6523 do
6524
6525 if test "x$prefix" != xNONE; then
6526   cf_path_syntax="$prefix"
6527 else
6528   cf_path_syntax="$ac_default_prefix"
6529 fi
6530
6531 case ".$cf_src_path" in #(vi
6532 .\$\(*\)*|.\'*\'*) #(vi
6533   ;;
6534 ..|./*|.\\*) #(vi
6535   ;;
6536 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6537   ;;
6538 .\${*prefix}*|.\${*dir}*) #(vi
6539   eval cf_src_path="$cf_src_path"
6540   case ".$cf_src_path" in #(vi
6541   .NONE/*)
6542     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6543     ;;
6544   esac
6545   ;; #(vi
6546 .no|.NONE/*)
6547   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6548   ;;
6549 *)
6550   { { echo "$as_me:6550: error: expected a pathname, not \"$cf_src_path\"" >&5
6551 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6552    { (exit 1); exit 1; }; }
6553   ;;
6554 esac
6555
6556   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6557   cf_dst_path="${cf_dst_path}${cf_src_path}"
6558 done
6559 IFS="$ac_save_ifs"
6560
6561 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6562 # so we have to check/work around.  We do prefer the result of "eval"...
6563 eval cf_dst_eval="$cf_dst_path"
6564 case "x$cf_dst_eval" in #(vi
6565 xNONE*) #(vi
6566         TERMINFO_DIRS=$cf_dst_path
6567         ;;
6568 *)
6569         TERMINFO_DIRS="$cf_dst_eval"
6570         ;;
6571 esac
6572
6573 echo "$as_me:6573: result: $TERMINFO_DIRS" >&5
6574 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6575 test -n "$TERMINFO_DIRS" &&
6576 cat >>confdefs.h <<EOF
6577 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6578 EOF
6579
6580 echo "$as_me:6580: checking for default terminfo directory" >&5
6581 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6582
6583 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6584 if test "${with_default_terminfo_dir+set}" = set; then
6585   withval="$with_default_terminfo_dir"
6586
6587 else
6588   withval="${TERMINFO:-${datadir}/terminfo}"
6589 fi; if test -n "${datadir}/terminfo" ; then
6590
6591 if test "x$prefix" != xNONE; then
6592   cf_path_syntax="$prefix"
6593 else
6594   cf_path_syntax="$ac_default_prefix"
6595 fi
6596
6597 case ".$withval" in #(vi
6598 .\$\(*\)*|.\'*\'*) #(vi
6599   ;;
6600 ..|./*|.\\*) #(vi
6601   ;;
6602 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6603   ;;
6604 .\${*prefix}*|.\${*dir}*) #(vi
6605   eval withval="$withval"
6606   case ".$withval" in #(vi
6607   .NONE/*)
6608     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6609     ;;
6610   esac
6611   ;; #(vi
6612 .no|.NONE/*)
6613   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6614   ;;
6615 *)
6616   { { echo "$as_me:6616: error: expected a pathname, not \"$withval\"" >&5
6617 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6618    { (exit 1); exit 1; }; }
6619   ;;
6620 esac
6621
6622 fi
6623 eval TERMINFO="$withval"
6624
6625 echo "$as_me:6625: result: $TERMINFO" >&5
6626 echo "${ECHO_T}$TERMINFO" >&6
6627
6628 cat >>confdefs.h <<EOF
6629 #define TERMINFO "$TERMINFO"
6630 EOF
6631
6632 fi
6633
6634 ###     use option --disable-big-core to make tic run on small machines
6635 ###     We need 4Mb, check if we can allocate 50% more than that.
6636 echo "$as_me:6636: checking if big-core option selected" >&5
6637 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6638
6639 # Check whether --enable-big-core or --disable-big-core was given.
6640 if test "${enable_big_core+set}" = set; then
6641   enableval="$enable_big_core"
6642   with_big_core=$enableval
6643 else
6644   if test "$cross_compiling" = yes; then
6645   with_big_core=no
6646 else
6647   cat >conftest.$ac_ext <<_ACEOF
6648 #line 6648 "configure"
6649 #include "confdefs.h"
6650
6651 #include <stdlib.h>
6652 #include <string.h>
6653 int main() {
6654         unsigned long n = 6000000L;
6655         char *s = malloc(n);
6656         if (s != 0)
6657                 s[0] = s[n-1] = 0;
6658         ${cf_cv_main_return:-return}(s == 0);
6659 }
6660 _ACEOF
6661 rm -f conftest$ac_exeext
6662 if { (eval echo "$as_me:6662: \"$ac_link\"") >&5
6663   (eval $ac_link) 2>&5
6664   ac_status=$?
6665   echo "$as_me:6665: \$? = $ac_status" >&5
6666   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6667   { (eval echo "$as_me:6667: \"$ac_try\"") >&5
6668   (eval $ac_try) 2>&5
6669   ac_status=$?
6670   echo "$as_me:6670: \$? = $ac_status" >&5
6671   (exit $ac_status); }; }; then
6672   with_big_core=yes
6673 else
6674   echo "$as_me: program exited with status $ac_status" >&5
6675 echo "$as_me: failed program was:" >&5
6676 cat conftest.$ac_ext >&5
6677 with_big_core=no
6678 fi
6679 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6680 fi
6681 fi;
6682 echo "$as_me:6682: result: $with_big_core" >&5
6683 echo "${ECHO_T}$with_big_core" >&6
6684 test "x$with_big_core" = "xyes" &&
6685 cat >>confdefs.h <<\EOF
6686 #define HAVE_BIG_CORE 1
6687 EOF
6688
6689 ### ISO C only guarantees 512-char strings, we have tables which load faster
6690 ### when constructed using "big" strings.  More than the C compiler, the awk
6691 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6692 echo "$as_me:6692: checking if big-strings option selected" >&5
6693 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6694
6695 # Check whether --enable-big-strings or --disable-big-strings was given.
6696 if test "${enable_big_strings+set}" = set; then
6697   enableval="$enable_big_strings"
6698   with_big_strings=$enableval
6699 else
6700
6701         case x$AWK in #(vi
6702         x)
6703                 eval with_big_strings=no
6704                 ;;
6705         *) #(vi
6706                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6707                         | $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
6708                         eval with_big_strings=yes
6709                 else
6710                         eval with_big_strings=no
6711                 fi
6712                 ;;
6713         esac
6714
6715 fi;
6716 echo "$as_me:6716: result: $with_big_strings" >&5
6717 echo "${ECHO_T}$with_big_strings" >&6
6718
6719 USE_BIG_STRINGS=0
6720 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
6721
6722 ###     use option --enable-termcap to compile in the termcap fallback support
6723 echo "$as_me:6723: checking if you want termcap-fallback support" >&5
6724 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6725
6726 # Check whether --enable-termcap or --disable-termcap was given.
6727 if test "${enable_termcap+set}" = set; then
6728   enableval="$enable_termcap"
6729   with_termcap=$enableval
6730 else
6731   with_termcap=no
6732 fi;
6733 echo "$as_me:6733: result: $with_termcap" >&5
6734 echo "${ECHO_T}$with_termcap" >&6
6735
6736 NCURSES_USE_TERMCAP=0
6737 if test "x$with_termcap" != "xyes" ; then
6738         if test "$use_database" = no ; then
6739                 if test -z "$with_fallback" ; then
6740                         { { echo "$as_me:6740: error: You have disabled the database w/o specifying fallbacks" >&5
6741 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6742    { (exit 1); exit 1; }; }
6743                 fi
6744         fi
6745
6746 cat >>confdefs.h <<\EOF
6747 #define PURE_TERMINFO 1
6748 EOF
6749
6750 else
6751
6752         if test "$with_ticlib" != no ; then
6753                 { { echo "$as_me:6753: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6754 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6755    { (exit 1); exit 1; }; }
6756         fi
6757
6758         NCURSES_USE_TERMCAP=1
6759         echo "$as_me:6759: checking for list of termcap files" >&5
6760 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6761
6762 # Check whether --with-termpath or --without-termpath was given.
6763 if test "${with_termpath+set}" = set; then
6764   withval="$with_termpath"
6765
6766 else
6767   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6768 fi;
6769 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6770 cf_dst_path=
6771 for cf_src_path in $withval
6772 do
6773
6774 if test "x$prefix" != xNONE; then
6775   cf_path_syntax="$prefix"
6776 else
6777   cf_path_syntax="$ac_default_prefix"
6778 fi
6779
6780 case ".$cf_src_path" in #(vi
6781 .\$\(*\)*|.\'*\'*) #(vi
6782   ;;
6783 ..|./*|.\\*) #(vi
6784   ;;
6785 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6786   ;;
6787 .\${*prefix}*|.\${*dir}*) #(vi
6788   eval cf_src_path="$cf_src_path"
6789   case ".$cf_src_path" in #(vi
6790   .NONE/*)
6791     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6792     ;;
6793   esac
6794   ;; #(vi
6795 .no|.NONE/*)
6796   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6797   ;;
6798 *)
6799   { { echo "$as_me:6799: error: expected a pathname, not \"$cf_src_path\"" >&5
6800 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6801    { (exit 1); exit 1; }; }
6802   ;;
6803 esac
6804
6805   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6806   cf_dst_path="${cf_dst_path}${cf_src_path}"
6807 done
6808 IFS="$ac_save_ifs"
6809
6810 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6811 # so we have to check/work around.  We do prefer the result of "eval"...
6812 eval cf_dst_eval="$cf_dst_path"
6813 case "x$cf_dst_eval" in #(vi
6814 xNONE*) #(vi
6815         TERMPATH=$cf_dst_path
6816         ;;
6817 *)
6818         TERMPATH="$cf_dst_eval"
6819         ;;
6820 esac
6821
6822         echo "$as_me:6822: result: $TERMPATH" >&5
6823 echo "${ECHO_T}$TERMPATH" >&6
6824         test -n "$TERMPATH" &&
6825 cat >>confdefs.h <<EOF
6826 #define TERMPATH "$TERMPATH"
6827 EOF
6828
6829         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6830         echo "$as_me:6830: checking if fast termcap-loader is needed" >&5
6831 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6832
6833 # Check whether --enable-getcap or --disable-getcap was given.
6834 if test "${enable_getcap+set}" = set; then
6835   enableval="$enable_getcap"
6836   with_getcap=$enableval
6837 else
6838   with_getcap=no
6839 fi;
6840         echo "$as_me:6840: result: $with_getcap" >&5
6841 echo "${ECHO_T}$with_getcap" >&6
6842         test "x$with_getcap" = "xyes" &&
6843 cat >>confdefs.h <<\EOF
6844 #define USE_GETCAP 1
6845 EOF
6846
6847         echo "$as_me:6847: checking if translated termcaps will be cached in ~/.terminfo" >&5
6848 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6849
6850 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6851 if test "${enable_getcap_cache+set}" = set; then
6852   enableval="$enable_getcap_cache"
6853   with_getcap_cache=$enableval
6854 else
6855   with_getcap_cache=no
6856 fi;
6857         echo "$as_me:6857: result: $with_getcap_cache" >&5
6858 echo "${ECHO_T}$with_getcap_cache" >&6
6859         test "x$with_getcap_cache" = "xyes" &&
6860 cat >>confdefs.h <<\EOF
6861 #define USE_GETCAP_CACHE 1
6862 EOF
6863
6864 fi
6865
6866 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6867 echo "$as_me:6867: checking if ~/.terminfo is wanted" >&5
6868 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6869
6870 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6871 if test "${enable_home_terminfo+set}" = set; then
6872   enableval="$enable_home_terminfo"
6873   with_home_terminfo=$enableval
6874 else
6875   with_home_terminfo=yes
6876 fi;
6877 echo "$as_me:6877: result: $with_home_terminfo" >&5
6878 echo "${ECHO_T}$with_home_terminfo" >&6
6879 test "x$with_home_terminfo" = "xyes" &&
6880 cat >>confdefs.h <<\EOF
6881 #define USE_HOME_TERMINFO 1
6882 EOF
6883
6884 echo "$as_me:6884: checking if you want to use restricted environment when running as root" >&5
6885 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6886
6887 # Check whether --enable-root-environ or --disable-root-environ was given.
6888 if test "${enable_root_environ+set}" = set; then
6889   enableval="$enable_root_environ"
6890   with_root_environ=$enableval
6891 else
6892   with_root_environ=yes
6893 fi;
6894 echo "$as_me:6894: result: $with_root_environ" >&5
6895 echo "${ECHO_T}$with_root_environ" >&6
6896 test "x$with_root_environ" = xyes &&
6897 cat >>confdefs.h <<\EOF
6898 #define USE_ROOT_ENVIRON 1
6899 EOF
6900
6901 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6902 ###   to reduce storage requirements for the terminfo database.
6903
6904 for ac_func in \
6905         remove \
6906         unlink
6907 do
6908 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6909 echo "$as_me:6909: checking for $ac_func" >&5
6910 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6911 if eval "test \"\${$as_ac_var+set}\" = set"; then
6912   echo $ECHO_N "(cached) $ECHO_C" >&6
6913 else
6914   cat >conftest.$ac_ext <<_ACEOF
6915 #line 6915 "configure"
6916 #include "confdefs.h"
6917 /* System header to define __stub macros and hopefully few prototypes,
6918     which can conflict with char $ac_func (); below.  */
6919 #include <assert.h>
6920 /* Override any gcc2 internal prototype to avoid an error.  */
6921 #ifdef __cplusplus
6922 extern "C"
6923 #endif
6924 /* We use char because int might match the return type of a gcc2
6925    builtin and then its argument prototype would still apply.  */
6926 char $ac_func ();
6927 char (*f) ();
6928
6929 int
6930 main ()
6931 {
6932 /* The GNU C library defines this for functions which it implements
6933     to always fail with ENOSYS.  Some functions are actually named
6934     something starting with __ and the normal name is an alias.  */
6935 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6936 choke me
6937 #else
6938 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6939 #endif
6940
6941   ;
6942   return 0;
6943 }
6944 _ACEOF
6945 rm -f conftest.$ac_objext conftest$ac_exeext
6946 if { (eval echo "$as_me:6946: \"$ac_link\"") >&5
6947   (eval $ac_link) 2>&5
6948   ac_status=$?
6949   echo "$as_me:6949: \$? = $ac_status" >&5
6950   (exit $ac_status); } &&
6951          { ac_try='test -s conftest$ac_exeext'
6952   { (eval echo "$as_me:6952: \"$ac_try\"") >&5
6953   (eval $ac_try) 2>&5
6954   ac_status=$?
6955   echo "$as_me:6955: \$? = $ac_status" >&5
6956   (exit $ac_status); }; }; then
6957   eval "$as_ac_var=yes"
6958 else
6959   echo "$as_me: failed program was:" >&5
6960 cat conftest.$ac_ext >&5
6961 eval "$as_ac_var=no"
6962 fi
6963 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6964 fi
6965 echo "$as_me:6965: result: `eval echo '${'$as_ac_var'}'`" >&5
6966 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6967 if test `eval echo '${'$as_ac_var'}'` = yes; then
6968   cat >>confdefs.h <<EOF
6969 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6970 EOF
6971
6972 fi
6973 done
6974
6975 if test "$cross_compiling" = yes ; then
6976
6977 for ac_func in \
6978                 link \
6979                 symlink
6980 do
6981 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6982 echo "$as_me:6982: checking for $ac_func" >&5
6983 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6984 if eval "test \"\${$as_ac_var+set}\" = set"; then
6985   echo $ECHO_N "(cached) $ECHO_C" >&6
6986 else
6987   cat >conftest.$ac_ext <<_ACEOF
6988 #line 6988 "configure"
6989 #include "confdefs.h"
6990 /* System header to define __stub macros and hopefully few prototypes,
6991     which can conflict with char $ac_func (); below.  */
6992 #include <assert.h>
6993 /* Override any gcc2 internal prototype to avoid an error.  */
6994 #ifdef __cplusplus
6995 extern "C"
6996 #endif
6997 /* We use char because int might match the return type of a gcc2
6998    builtin and then its argument prototype would still apply.  */
6999 char $ac_func ();
7000 char (*f) ();
7001
7002 int
7003 main ()
7004 {
7005 /* The GNU C library defines this for functions which it implements
7006     to always fail with ENOSYS.  Some functions are actually named
7007     something starting with __ and the normal name is an alias.  */
7008 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7009 choke me
7010 #else
7011 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7012 #endif
7013
7014   ;
7015   return 0;
7016 }
7017 _ACEOF
7018 rm -f conftest.$ac_objext conftest$ac_exeext
7019 if { (eval echo "$as_me:7019: \"$ac_link\"") >&5
7020   (eval $ac_link) 2>&5
7021   ac_status=$?
7022   echo "$as_me:7022: \$? = $ac_status" >&5
7023   (exit $ac_status); } &&
7024          { ac_try='test -s conftest$ac_exeext'
7025   { (eval echo "$as_me:7025: \"$ac_try\"") >&5
7026   (eval $ac_try) 2>&5
7027   ac_status=$?
7028   echo "$as_me:7028: \$? = $ac_status" >&5
7029   (exit $ac_status); }; }; then
7030   eval "$as_ac_var=yes"
7031 else
7032   echo "$as_me: failed program was:" >&5
7033 cat conftest.$ac_ext >&5
7034 eval "$as_ac_var=no"
7035 fi
7036 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7037 fi
7038 echo "$as_me:7038: result: `eval echo '${'$as_ac_var'}'`" >&5
7039 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7040 if test `eval echo '${'$as_ac_var'}'` = yes; then
7041   cat >>confdefs.h <<EOF
7042 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7043 EOF
7044
7045 fi
7046 done
7047
7048 else
7049         echo "$as_me:7049: checking if link/symlink functions work" >&5
7050 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7051 if test "${cf_cv_link_funcs+set}" = set; then
7052   echo $ECHO_N "(cached) $ECHO_C" >&6
7053 else
7054
7055                 cf_cv_link_funcs=
7056                 for cf_func in link symlink ; do
7057                         if test "$cross_compiling" = yes; then
7058
7059                         eval 'ac_cv_func_'$cf_func'=error'
7060 else
7061   cat >conftest.$ac_ext <<_ACEOF
7062 #line 7062 "configure"
7063 #include "confdefs.h"
7064
7065 #include <sys/types.h>
7066 #include <sys/stat.h>
7067 #ifdef HAVE_UNISTD_H
7068 #include <unistd.h>
7069 #endif
7070 int main()
7071 {
7072         int fail = 0;
7073         char *src = "config.log";
7074         char *dst = "conftest.chk";
7075         struct stat src_sb;
7076         struct stat dst_sb;
7077
7078         stat(src, &src_sb);
7079         fail = ($cf_func("config.log", "conftest.chk") < 0)
7080             || (stat(dst, &dst_sb) < 0)
7081             || (dst_sb.st_mtime != src_sb.st_mtime);
7082 #ifdef HAVE_UNLINK
7083         unlink(dst);
7084 #else
7085         remove(dst);
7086 #endif
7087         ${cf_cv_main_return:-return} (fail);
7088 }
7089
7090 _ACEOF
7091 rm -f conftest$ac_exeext
7092 if { (eval echo "$as_me:7092: \"$ac_link\"") >&5
7093   (eval $ac_link) 2>&5
7094   ac_status=$?
7095   echo "$as_me:7095: \$? = $ac_status" >&5
7096   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7097   { (eval echo "$as_me:7097: \"$ac_try\"") >&5
7098   (eval $ac_try) 2>&5
7099   ac_status=$?
7100   echo "$as_me:7100: \$? = $ac_status" >&5
7101   (exit $ac_status); }; }; then
7102
7103                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7104                         eval 'ac_cv_func_'$cf_func'=yes'
7105 else
7106   echo "$as_me: program exited with status $ac_status" >&5
7107 echo "$as_me: failed program was:" >&5
7108 cat conftest.$ac_ext >&5
7109
7110                         eval 'ac_cv_func_'$cf_func'=no'
7111 fi
7112 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7113 fi
7114                 done
7115                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7116
7117 fi
7118 echo "$as_me:7118: result: $cf_cv_link_funcs" >&5
7119 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7120         test "$ac_cv_func_link"    = yes &&
7121 cat >>confdefs.h <<\EOF
7122 #define HAVE_LINK 1
7123 EOF
7124
7125         test "$ac_cv_func_symlink" = yes &&
7126 cat >>confdefs.h <<\EOF
7127 #define HAVE_SYMLINK 1
7128 EOF
7129
7130 fi
7131
7132 with_links=no
7133 with_symlinks=no
7134
7135 # soft links (symbolic links) are useful for some systems where hard links do
7136 # not work, or to make it simpler to copy terminfo trees around.
7137 if test "x$ac_cv_func_symlink" = xyes ; then
7138     echo "$as_me:7138: checking if tic should use symbolic links" >&5
7139 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7140
7141 # Check whether --enable-symlinks or --disable-symlinks was given.
7142 if test "${enable_symlinks+set}" = set; then
7143   enableval="$enable_symlinks"
7144   with_symlinks=$enableval
7145 else
7146   with_symlinks=no
7147 fi;
7148     echo "$as_me:7148: result: $with_symlinks" >&5
7149 echo "${ECHO_T}$with_symlinks" >&6
7150 fi
7151
7152 # If we have hard links and did not choose to use soft links instead, there is
7153 # no reason to make this choice optional - use the hard links.
7154 if test "$with_symlinks" = no ; then
7155     echo "$as_me:7155: checking if tic should use hard links" >&5
7156 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7157     if test "x$ac_cv_func_link" = xyes ; then
7158         with_links=yes
7159     else
7160         with_links=no
7161     fi
7162     echo "$as_me:7162: result: $with_links" >&5
7163 echo "${ECHO_T}$with_links" >&6
7164 fi
7165
7166 test "x$with_links" = xyes &&
7167 cat >>confdefs.h <<\EOF
7168 #define USE_LINKS 1
7169 EOF
7170
7171 test "x$with_symlinks" = xyes &&
7172 cat >>confdefs.h <<\EOF
7173 #define USE_SYMLINKS 1
7174 EOF
7175
7176 ###   use option --enable-broken-linker to force on use of broken-linker support
7177 echo "$as_me:7177: checking if you want broken-linker support code" >&5
7178 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7179
7180 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7181 if test "${enable_broken_linker+set}" = set; then
7182   enableval="$enable_broken_linker"
7183   with_broken_linker=$enableval
7184 else
7185   with_broken_linker=${BROKEN_LINKER:-no}
7186 fi;
7187 echo "$as_me:7187: result: $with_broken_linker" >&5
7188 echo "${ECHO_T}$with_broken_linker" >&6
7189
7190 BROKEN_LINKER=0
7191 if test "x$with_broken_linker" = xyes ; then
7192
7193 cat >>confdefs.h <<\EOF
7194 #define BROKEN_LINKER 1
7195 EOF
7196
7197         BROKEN_LINKER=1
7198 elif test "$DFT_LWR_MODEL" = shared ; then
7199         case $cf_cv_system_name in #(vi
7200         cygwin*)
7201
7202 cat >>confdefs.h <<\EOF
7203 #define BROKEN_LINKER 1
7204 EOF
7205
7206                 BROKEN_LINKER=1
7207                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7208
7209 echo "${as_me:-configure}:7209: testing cygwin linker is broken anyway ..." 1>&5
7210
7211                 ;;
7212         esac
7213 fi
7214
7215 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7216 echo "$as_me:7216: checking if tputs should process BSD-style prefix padding" >&5
7217 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7218
7219 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7220 if test "${enable_bsdpad+set}" = set; then
7221   enableval="$enable_bsdpad"
7222   with_bsdpad=$enableval
7223 else
7224   with_bsdpad=no
7225 fi;
7226 echo "$as_me:7226: result: $with_bsdpad" >&5
7227 echo "${ECHO_T}$with_bsdpad" >&6
7228 test "x$with_bsdpad" = xyes &&
7229 cat >>confdefs.h <<\EOF
7230 #define BSD_TPUTS 1
7231 EOF
7232
7233 ###   use option --enable-widec to turn on use of wide-character support
7234 NCURSES_CH_T=chtype
7235 NCURSES_LIBUTF8=0
7236
7237 NEED_WCHAR_H=0
7238 NCURSES_MBSTATE_T=0
7239 NCURSES_WCHAR_T=0
7240 NCURSES_WINT_T=0
7241
7242 # Check to define _XOPEN_SOURCE "automatically"
7243
7244 cf_XOPEN_SOURCE=500
7245 cf_POSIX_C_SOURCE=199506L
7246 cf_xopen_source=
7247
7248 case $host_os in #(vi
7249 aix[4-7]*) #(vi
7250         cf_xopen_source="-D_ALL_SOURCE"
7251         ;;
7252 cygwin|msys) #(vi
7253         cf_XOPEN_SOURCE=600
7254         ;;
7255 darwin[0-8].*) #(vi
7256         cf_xopen_source="-D_APPLE_C_SOURCE"
7257         ;;
7258 darwin*) #(vi
7259         cf_xopen_source="-D_DARWIN_C_SOURCE"
7260         cf_XOPEN_SOURCE=
7261         ;;
7262 freebsd*|dragonfly*) #(vi
7263         # 5.x headers associate
7264         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7265         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7266         cf_POSIX_C_SOURCE=200112L
7267         cf_XOPEN_SOURCE=600
7268         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7269         ;;
7270 hpux11*) #(vi
7271         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7272         ;;
7273 hpux*) #(vi
7274         cf_xopen_source="-D_HPUX_SOURCE"
7275         ;;
7276 irix[56].*) #(vi
7277         cf_xopen_source="-D_SGI_SOURCE"
7278         cf_XOPEN_SOURCE=
7279         ;;
7280 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7281
7282 echo "$as_me:7282: checking if we must define _GNU_SOURCE" >&5
7283 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7284 if test "${cf_cv_gnu_source+set}" = set; then
7285   echo $ECHO_N "(cached) $ECHO_C" >&6
7286 else
7287
7288 cat >conftest.$ac_ext <<_ACEOF
7289 #line 7289 "configure"
7290 #include "confdefs.h"
7291 #include <sys/types.h>
7292 int
7293 main ()
7294 {
7295
7296 #ifndef _XOPEN_SOURCE
7297 make an error
7298 #endif
7299   ;
7300   return 0;
7301 }
7302 _ACEOF
7303 rm -f conftest.$ac_objext
7304 if { (eval echo "$as_me:7304: \"$ac_compile\"") >&5
7305   (eval $ac_compile) 2>&5
7306   ac_status=$?
7307   echo "$as_me:7307: \$? = $ac_status" >&5
7308   (exit $ac_status); } &&
7309          { ac_try='test -s conftest.$ac_objext'
7310   { (eval echo "$as_me:7310: \"$ac_try\"") >&5
7311   (eval $ac_try) 2>&5
7312   ac_status=$?
7313   echo "$as_me:7313: \$? = $ac_status" >&5
7314   (exit $ac_status); }; }; then
7315   cf_cv_gnu_source=no
7316 else
7317   echo "$as_me: failed program was:" >&5
7318 cat conftest.$ac_ext >&5
7319 cf_save="$CPPFLAGS"
7320          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7321          cat >conftest.$ac_ext <<_ACEOF
7322 #line 7322 "configure"
7323 #include "confdefs.h"
7324 #include <sys/types.h>
7325 int
7326 main ()
7327 {
7328
7329 #ifdef _XOPEN_SOURCE
7330 make an error
7331 #endif
7332   ;
7333   return 0;
7334 }
7335 _ACEOF
7336 rm -f conftest.$ac_objext
7337 if { (eval echo "$as_me:7337: \"$ac_compile\"") >&5
7338   (eval $ac_compile) 2>&5
7339   ac_status=$?
7340   echo "$as_me:7340: \$? = $ac_status" >&5
7341   (exit $ac_status); } &&
7342          { ac_try='test -s conftest.$ac_objext'
7343   { (eval echo "$as_me:7343: \"$ac_try\"") >&5
7344   (eval $ac_try) 2>&5
7345   ac_status=$?
7346   echo "$as_me:7346: \$? = $ac_status" >&5
7347   (exit $ac_status); }; }; then
7348   cf_cv_gnu_source=no
7349 else
7350   echo "$as_me: failed program was:" >&5
7351 cat conftest.$ac_ext >&5
7352 cf_cv_gnu_source=yes
7353 fi
7354 rm -f conftest.$ac_objext conftest.$ac_ext
7355         CPPFLAGS="$cf_save"
7356
7357 fi
7358 rm -f conftest.$ac_objext conftest.$ac_ext
7359
7360 fi
7361 echo "$as_me:7361: result: $cf_cv_gnu_source" >&5
7362 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7363 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7364
7365         ;;
7366 mirbsd*) #(vi
7367         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7368         cf_XOPEN_SOURCE=
7369
7370 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7371
7372 cf_save_CFLAGS="$CFLAGS"
7373 cf_save_CPPFLAGS="$CPPFLAGS"
7374
7375 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7376         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7377                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7378
7379 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7380         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7381                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7382
7383 echo "$as_me:7383: checking if we should define _POSIX_C_SOURCE" >&5
7384 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7385 if test "${cf_cv_posix_c_source+set}" = set; then
7386   echo $ECHO_N "(cached) $ECHO_C" >&6
7387 else
7388
7389 echo "${as_me:-configure}:7389: testing if the symbol is already defined go no further ..." 1>&5
7390
7391         cat >conftest.$ac_ext <<_ACEOF
7392 #line 7392 "configure"
7393 #include "confdefs.h"
7394 #include <sys/types.h>
7395 int
7396 main ()
7397 {
7398
7399 #ifndef _POSIX_C_SOURCE
7400 make an error
7401 #endif
7402   ;
7403   return 0;
7404 }
7405 _ACEOF
7406 rm -f conftest.$ac_objext
7407 if { (eval echo "$as_me:7407: \"$ac_compile\"") >&5
7408   (eval $ac_compile) 2>&5
7409   ac_status=$?
7410   echo "$as_me:7410: \$? = $ac_status" >&5
7411   (exit $ac_status); } &&
7412          { ac_try='test -s conftest.$ac_objext'
7413   { (eval echo "$as_me:7413: \"$ac_try\"") >&5
7414   (eval $ac_try) 2>&5
7415   ac_status=$?
7416   echo "$as_me:7416: \$? = $ac_status" >&5
7417   (exit $ac_status); }; }; then
7418   cf_cv_posix_c_source=no
7419 else
7420   echo "$as_me: failed program was:" >&5
7421 cat conftest.$ac_ext >&5
7422 cf_want_posix_source=no
7423          case .$cf_POSIX_C_SOURCE in #(vi
7424          .[12]??*) #(vi
7425                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7426                 ;;
7427          .2) #(vi
7428                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7429                 cf_want_posix_source=yes
7430                 ;;
7431          .*)
7432                 cf_want_posix_source=yes
7433                 ;;
7434          esac
7435          if test "$cf_want_posix_source" = yes ; then
7436                 cat >conftest.$ac_ext <<_ACEOF
7437 #line 7437 "configure"
7438 #include "confdefs.h"
7439 #include <sys/types.h>
7440 int
7441 main ()
7442 {
7443
7444 #ifdef _POSIX_SOURCE
7445 make an error
7446 #endif
7447   ;
7448   return 0;
7449 }
7450 _ACEOF
7451 rm -f conftest.$ac_objext
7452 if { (eval echo "$as_me:7452: \"$ac_compile\"") >&5
7453   (eval $ac_compile) 2>&5
7454   ac_status=$?
7455   echo "$as_me:7455: \$? = $ac_status" >&5
7456   (exit $ac_status); } &&
7457          { ac_try='test -s conftest.$ac_objext'
7458   { (eval echo "$as_me:7458: \"$ac_try\"") >&5
7459   (eval $ac_try) 2>&5
7460   ac_status=$?
7461   echo "$as_me:7461: \$? = $ac_status" >&5
7462   (exit $ac_status); }; }; then
7463   :
7464 else
7465   echo "$as_me: failed program was:" >&5
7466 cat conftest.$ac_ext >&5
7467 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7468 fi
7469 rm -f conftest.$ac_objext conftest.$ac_ext
7470          fi
7471
7472 echo "${as_me:-configure}:7472: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7473
7474          CFLAGS="$cf_trim_CFLAGS"
7475          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7476
7477 echo "${as_me:-configure}:7477: testing if the second compile does not leave our definition intact error ..." 1>&5
7478
7479          cat >conftest.$ac_ext <<_ACEOF
7480 #line 7480 "configure"
7481 #include "confdefs.h"
7482 #include <sys/types.h>
7483 int
7484 main ()
7485 {
7486
7487 #ifndef _POSIX_C_SOURCE
7488 make an error
7489 #endif
7490   ;
7491   return 0;
7492 }
7493 _ACEOF
7494 rm -f conftest.$ac_objext
7495 if { (eval echo "$as_me:7495: \"$ac_compile\"") >&5
7496   (eval $ac_compile) 2>&5
7497   ac_status=$?
7498   echo "$as_me:7498: \$? = $ac_status" >&5
7499   (exit $ac_status); } &&
7500          { ac_try='test -s conftest.$ac_objext'
7501   { (eval echo "$as_me:7501: \"$ac_try\"") >&5
7502   (eval $ac_try) 2>&5
7503   ac_status=$?
7504   echo "$as_me:7504: \$? = $ac_status" >&5
7505   (exit $ac_status); }; }; then
7506   :
7507 else
7508   echo "$as_me: failed program was:" >&5
7509 cat conftest.$ac_ext >&5
7510 cf_cv_posix_c_source=no
7511 fi
7512 rm -f conftest.$ac_objext conftest.$ac_ext
7513          CFLAGS="$cf_save_CFLAGS"
7514          CPPFLAGS="$cf_save_CPPFLAGS"
7515
7516 fi
7517 rm -f conftest.$ac_objext conftest.$ac_ext
7518
7519 fi
7520 echo "$as_me:7520: result: $cf_cv_posix_c_source" >&5
7521 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7522
7523 if test "$cf_cv_posix_c_source" != no ; then
7524         CFLAGS="$cf_trim_CFLAGS"
7525         CPPFLAGS="$cf_trim_CPPFLAGS"
7526
7527 cf_fix_cppflags=no
7528 cf_new_cflags=
7529 cf_new_cppflags=
7530 cf_new_extra_cppflags=
7531
7532 for cf_add_cflags in $cf_cv_posix_c_source
7533 do
7534 case $cf_fix_cppflags in
7535 no)
7536         case $cf_add_cflags in #(vi
7537         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7538                 case $cf_add_cflags in
7539                 -D*)
7540                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7541
7542                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7543                                 && test -z "${cf_tst_cflags}" \
7544                                 && cf_fix_cppflags=yes
7545
7546                         if test $cf_fix_cppflags = yes ; then
7547                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7548                                 continue
7549                         elif test "${cf_tst_cflags}" = "\"'" ; then
7550                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7551                                 continue
7552                         fi
7553                         ;;
7554                 esac
7555                 case "$CPPFLAGS" in
7556                 *$cf_add_cflags) #(vi
7557                         ;;
7558                 *) #(vi
7559                         case $cf_add_cflags in #(vi
7560                         -D*)
7561                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7562
7563 CPPFLAGS=`echo "$CPPFLAGS" | \
7564         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7565                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7566
7567                                 ;;
7568                         esac
7569                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7570                         ;;
7571                 esac
7572                 ;;
7573         *)
7574                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7575                 ;;
7576         esac
7577         ;;
7578 yes)
7579         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7580
7581         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7582
7583         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7584                 && test -z "${cf_tst_cflags}" \
7585                 && cf_fix_cppflags=no
7586         ;;
7587 esac
7588 done
7589
7590 if test -n "$cf_new_cflags" ; then
7591
7592         CFLAGS="$CFLAGS $cf_new_cflags"
7593 fi
7594
7595 if test -n "$cf_new_cppflags" ; then
7596
7597         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7598 fi
7599
7600 if test -n "$cf_new_extra_cppflags" ; then
7601
7602         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7603 fi
7604
7605 fi
7606
7607         ;;
7608 netbsd*) #(vi
7609         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7610         ;;
7611 openbsd[4-9]*) #(vi
7612         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7613         cf_xopen_source="-D_BSD_SOURCE"
7614         cf_XOPEN_SOURCE=600
7615         ;;
7616 openbsd*) #(vi
7617         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7618         ;;
7619 osf[45]*) #(vi
7620         cf_xopen_source="-D_OSF_SOURCE"
7621         ;;
7622 nto-qnx*) #(vi
7623         cf_xopen_source="-D_QNX_SOURCE"
7624         ;;
7625 sco*) #(vi
7626         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7627         ;;
7628 solaris2.*) #(vi
7629         cf_xopen_source="-D__EXTENSIONS__"
7630         cf_cv_xopen_source=broken
7631         ;;
7632 *)
7633
7634 echo "$as_me:7634: checking if we should define _XOPEN_SOURCE" >&5
7635 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7636 if test "${cf_cv_xopen_source+set}" = set; then
7637   echo $ECHO_N "(cached) $ECHO_C" >&6
7638 else
7639
7640         cat >conftest.$ac_ext <<_ACEOF
7641 #line 7641 "configure"
7642 #include "confdefs.h"
7643
7644 #include <stdlib.h>
7645 #include <string.h>
7646 #include <sys/types.h>
7647
7648 int
7649 main ()
7650 {
7651
7652 #ifndef _XOPEN_SOURCE
7653 make an error
7654 #endif
7655   ;
7656   return 0;
7657 }
7658 _ACEOF
7659 rm -f conftest.$ac_objext
7660 if { (eval echo "$as_me:7660: \"$ac_compile\"") >&5
7661   (eval $ac_compile) 2>&5
7662   ac_status=$?
7663   echo "$as_me:7663: \$? = $ac_status" >&5
7664   (exit $ac_status); } &&
7665          { ac_try='test -s conftest.$ac_objext'
7666   { (eval echo "$as_me:7666: \"$ac_try\"") >&5
7667   (eval $ac_try) 2>&5
7668   ac_status=$?
7669   echo "$as_me:7669: \$? = $ac_status" >&5
7670   (exit $ac_status); }; }; then
7671   cf_cv_xopen_source=no
7672 else
7673   echo "$as_me: failed program was:" >&5
7674 cat conftest.$ac_ext >&5
7675 cf_save="$CPPFLAGS"
7676          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7677          cat >conftest.$ac_ext <<_ACEOF
7678 #line 7678 "configure"
7679 #include "confdefs.h"
7680
7681 #include <stdlib.h>
7682 #include <string.h>
7683 #include <sys/types.h>
7684
7685 int
7686 main ()
7687 {
7688
7689 #ifdef _XOPEN_SOURCE
7690 make an error
7691 #endif
7692   ;
7693   return 0;
7694 }
7695 _ACEOF
7696 rm -f conftest.$ac_objext
7697 if { (eval echo "$as_me:7697: \"$ac_compile\"") >&5
7698   (eval $ac_compile) 2>&5
7699   ac_status=$?
7700   echo "$as_me:7700: \$? = $ac_status" >&5
7701   (exit $ac_status); } &&
7702          { ac_try='test -s conftest.$ac_objext'
7703   { (eval echo "$as_me:7703: \"$ac_try\"") >&5
7704   (eval $ac_try) 2>&5
7705   ac_status=$?
7706   echo "$as_me:7706: \$? = $ac_status" >&5
7707   (exit $ac_status); }; }; then
7708   cf_cv_xopen_source=no
7709 else
7710   echo "$as_me: failed program was:" >&5
7711 cat conftest.$ac_ext >&5
7712 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7713 fi
7714 rm -f conftest.$ac_objext conftest.$ac_ext
7715         CPPFLAGS="$cf_save"
7716
7717 fi
7718 rm -f conftest.$ac_objext conftest.$ac_ext
7719
7720 fi
7721 echo "$as_me:7721: result: $cf_cv_xopen_source" >&5
7722 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7723
7724 if test "$cf_cv_xopen_source" != no ; then
7725
7726 CFLAGS=`echo "$CFLAGS" | \
7727         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7728                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7729
7730 CPPFLAGS=`echo "$CPPFLAGS" | \
7731         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7732                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7733
7734         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7735
7736 cf_fix_cppflags=no
7737 cf_new_cflags=
7738 cf_new_cppflags=
7739 cf_new_extra_cppflags=
7740
7741 for cf_add_cflags in $cf_temp_xopen_source
7742 do
7743 case $cf_fix_cppflags in
7744 no)
7745         case $cf_add_cflags in #(vi
7746         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7747                 case $cf_add_cflags in
7748                 -D*)
7749                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7750
7751                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7752                                 && test -z "${cf_tst_cflags}" \
7753                                 && cf_fix_cppflags=yes
7754
7755                         if test $cf_fix_cppflags = yes ; then
7756                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7757                                 continue
7758                         elif test "${cf_tst_cflags}" = "\"'" ; then
7759                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7760                                 continue
7761                         fi
7762                         ;;
7763                 esac
7764                 case "$CPPFLAGS" in
7765                 *$cf_add_cflags) #(vi
7766                         ;;
7767                 *) #(vi
7768                         case $cf_add_cflags in #(vi
7769                         -D*)
7770                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7771
7772 CPPFLAGS=`echo "$CPPFLAGS" | \
7773         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7774                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7775
7776                                 ;;
7777                         esac
7778                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7779                         ;;
7780                 esac
7781                 ;;
7782         *)
7783                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7784                 ;;
7785         esac
7786         ;;
7787 yes)
7788         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7789
7790         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7791
7792         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7793                 && test -z "${cf_tst_cflags}" \
7794                 && cf_fix_cppflags=no
7795         ;;
7796 esac
7797 done
7798
7799 if test -n "$cf_new_cflags" ; then
7800
7801         CFLAGS="$CFLAGS $cf_new_cflags"
7802 fi
7803
7804 if test -n "$cf_new_cppflags" ; then
7805
7806         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7807 fi
7808
7809 if test -n "$cf_new_extra_cppflags" ; then
7810
7811         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7812 fi
7813
7814 fi
7815
7816 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7817
7818 cf_save_CFLAGS="$CFLAGS"
7819 cf_save_CPPFLAGS="$CPPFLAGS"
7820
7821 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7822         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7823                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7824
7825 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7826         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7827                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7828
7829 echo "$as_me:7829: checking if we should define _POSIX_C_SOURCE" >&5
7830 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7831 if test "${cf_cv_posix_c_source+set}" = set; then
7832   echo $ECHO_N "(cached) $ECHO_C" >&6
7833 else
7834
7835 echo "${as_me:-configure}:7835: testing if the symbol is already defined go no further ..." 1>&5
7836
7837         cat >conftest.$ac_ext <<_ACEOF
7838 #line 7838 "configure"
7839 #include "confdefs.h"
7840 #include <sys/types.h>
7841 int
7842 main ()
7843 {
7844
7845 #ifndef _POSIX_C_SOURCE
7846 make an error
7847 #endif
7848   ;
7849   return 0;
7850 }
7851 _ACEOF
7852 rm -f conftest.$ac_objext
7853 if { (eval echo "$as_me:7853: \"$ac_compile\"") >&5
7854   (eval $ac_compile) 2>&5
7855   ac_status=$?
7856   echo "$as_me:7856: \$? = $ac_status" >&5
7857   (exit $ac_status); } &&
7858          { ac_try='test -s conftest.$ac_objext'
7859   { (eval echo "$as_me:7859: \"$ac_try\"") >&5
7860   (eval $ac_try) 2>&5
7861   ac_status=$?
7862   echo "$as_me:7862: \$? = $ac_status" >&5
7863   (exit $ac_status); }; }; then
7864   cf_cv_posix_c_source=no
7865 else
7866   echo "$as_me: failed program was:" >&5
7867 cat conftest.$ac_ext >&5
7868 cf_want_posix_source=no
7869          case .$cf_POSIX_C_SOURCE in #(vi
7870          .[12]??*) #(vi
7871                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7872                 ;;
7873          .2) #(vi
7874                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7875                 cf_want_posix_source=yes
7876                 ;;
7877          .*)
7878                 cf_want_posix_source=yes
7879                 ;;
7880          esac
7881          if test "$cf_want_posix_source" = yes ; then
7882                 cat >conftest.$ac_ext <<_ACEOF
7883 #line 7883 "configure"
7884 #include "confdefs.h"
7885 #include <sys/types.h>
7886 int
7887 main ()
7888 {
7889
7890 #ifdef _POSIX_SOURCE
7891 make an error
7892 #endif
7893   ;
7894   return 0;
7895 }
7896 _ACEOF
7897 rm -f conftest.$ac_objext
7898 if { (eval echo "$as_me:7898: \"$ac_compile\"") >&5
7899   (eval $ac_compile) 2>&5
7900   ac_status=$?
7901   echo "$as_me:7901: \$? = $ac_status" >&5
7902   (exit $ac_status); } &&
7903          { ac_try='test -s conftest.$ac_objext'
7904   { (eval echo "$as_me:7904: \"$ac_try\"") >&5
7905   (eval $ac_try) 2>&5
7906   ac_status=$?
7907   echo "$as_me:7907: \$? = $ac_status" >&5
7908   (exit $ac_status); }; }; then
7909   :
7910 else
7911   echo "$as_me: failed program was:" >&5
7912 cat conftest.$ac_ext >&5
7913 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7914 fi
7915 rm -f conftest.$ac_objext conftest.$ac_ext
7916          fi
7917
7918 echo "${as_me:-configure}:7918: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7919
7920          CFLAGS="$cf_trim_CFLAGS"
7921          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7922
7923 echo "${as_me:-configure}:7923: testing if the second compile does not leave our definition intact error ..." 1>&5
7924
7925          cat >conftest.$ac_ext <<_ACEOF
7926 #line 7926 "configure"
7927 #include "confdefs.h"
7928 #include <sys/types.h>
7929 int
7930 main ()
7931 {
7932
7933 #ifndef _POSIX_C_SOURCE
7934 make an error
7935 #endif
7936   ;
7937   return 0;
7938 }
7939 _ACEOF
7940 rm -f conftest.$ac_objext
7941 if { (eval echo "$as_me:7941: \"$ac_compile\"") >&5
7942   (eval $ac_compile) 2>&5
7943   ac_status=$?
7944   echo "$as_me:7944: \$? = $ac_status" >&5
7945   (exit $ac_status); } &&
7946          { ac_try='test -s conftest.$ac_objext'
7947   { (eval echo "$as_me:7947: \"$ac_try\"") >&5
7948   (eval $ac_try) 2>&5
7949   ac_status=$?
7950   echo "$as_me:7950: \$? = $ac_status" >&5
7951   (exit $ac_status); }; }; then
7952   :
7953 else
7954   echo "$as_me: failed program was:" >&5
7955 cat conftest.$ac_ext >&5
7956 cf_cv_posix_c_source=no
7957 fi
7958 rm -f conftest.$ac_objext conftest.$ac_ext
7959          CFLAGS="$cf_save_CFLAGS"
7960          CPPFLAGS="$cf_save_CPPFLAGS"
7961
7962 fi
7963 rm -f conftest.$ac_objext conftest.$ac_ext
7964
7965 fi
7966 echo "$as_me:7966: result: $cf_cv_posix_c_source" >&5
7967 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7968
7969 if test "$cf_cv_posix_c_source" != no ; then
7970         CFLAGS="$cf_trim_CFLAGS"
7971         CPPFLAGS="$cf_trim_CPPFLAGS"
7972
7973 cf_fix_cppflags=no
7974 cf_new_cflags=
7975 cf_new_cppflags=
7976 cf_new_extra_cppflags=
7977
7978 for cf_add_cflags in $cf_cv_posix_c_source
7979 do
7980 case $cf_fix_cppflags in
7981 no)
7982         case $cf_add_cflags in #(vi
7983         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7984                 case $cf_add_cflags in
7985                 -D*)
7986                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7987
7988                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7989                                 && test -z "${cf_tst_cflags}" \
7990                                 && cf_fix_cppflags=yes
7991
7992                         if test $cf_fix_cppflags = yes ; then
7993                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7994                                 continue
7995                         elif test "${cf_tst_cflags}" = "\"'" ; then
7996                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7997                                 continue
7998                         fi
7999                         ;;
8000                 esac
8001                 case "$CPPFLAGS" in
8002                 *$cf_add_cflags) #(vi
8003                         ;;
8004                 *) #(vi
8005                         case $cf_add_cflags in #(vi
8006                         -D*)
8007                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8008
8009 CPPFLAGS=`echo "$CPPFLAGS" | \
8010         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8011                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8012
8013                                 ;;
8014                         esac
8015                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8016                         ;;
8017                 esac
8018                 ;;
8019         *)
8020                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8021                 ;;
8022         esac
8023         ;;
8024 yes)
8025         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8026
8027         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8028
8029         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8030                 && test -z "${cf_tst_cflags}" \
8031                 && cf_fix_cppflags=no
8032         ;;
8033 esac
8034 done
8035
8036 if test -n "$cf_new_cflags" ; then
8037
8038         CFLAGS="$CFLAGS $cf_new_cflags"
8039 fi
8040
8041 if test -n "$cf_new_cppflags" ; then
8042
8043         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8044 fi
8045
8046 if test -n "$cf_new_extra_cppflags" ; then
8047
8048         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8049 fi
8050
8051 fi
8052
8053         ;;
8054 esac
8055
8056 if test -n "$cf_xopen_source" ; then
8057
8058 cf_fix_cppflags=no
8059 cf_new_cflags=
8060 cf_new_cppflags=
8061 cf_new_extra_cppflags=
8062
8063 for cf_add_cflags in $cf_xopen_source
8064 do
8065 case $cf_fix_cppflags in
8066 no)
8067         case $cf_add_cflags in #(vi
8068         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8069                 case $cf_add_cflags in
8070                 -D*)
8071                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8072
8073                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8074                                 && test -z "${cf_tst_cflags}" \
8075                                 && cf_fix_cppflags=yes
8076
8077                         if test $cf_fix_cppflags = yes ; then
8078                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8079                                 continue
8080                         elif test "${cf_tst_cflags}" = "\"'" ; then
8081                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8082                                 continue
8083                         fi
8084                         ;;
8085                 esac
8086                 case "$CPPFLAGS" in
8087                 *$cf_add_cflags) #(vi
8088                         ;;
8089                 *) #(vi
8090                         case $cf_add_cflags in #(vi
8091                         -D*)
8092                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8093
8094 CPPFLAGS=`echo "$CPPFLAGS" | \
8095         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8096                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8097
8098                                 ;;
8099                         esac
8100                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8101                         ;;
8102                 esac
8103                 ;;
8104         *)
8105                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8106                 ;;
8107         esac
8108         ;;
8109 yes)
8110         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8111
8112         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8113
8114         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8115                 && test -z "${cf_tst_cflags}" \
8116                 && cf_fix_cppflags=no
8117         ;;
8118 esac
8119 done
8120
8121 if test -n "$cf_new_cflags" ; then
8122
8123         CFLAGS="$CFLAGS $cf_new_cflags"
8124 fi
8125
8126 if test -n "$cf_new_cppflags" ; then
8127
8128         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8129 fi
8130
8131 if test -n "$cf_new_extra_cppflags" ; then
8132
8133         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8134 fi
8135
8136 fi
8137
8138 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8139         echo "$as_me:8139: checking if _XOPEN_SOURCE really is set" >&5
8140 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8141         cat >conftest.$ac_ext <<_ACEOF
8142 #line 8142 "configure"
8143 #include "confdefs.h"
8144 #include <stdlib.h>
8145 int
8146 main ()
8147 {
8148
8149 #ifndef _XOPEN_SOURCE
8150 make an error
8151 #endif
8152   ;
8153   return 0;
8154 }
8155 _ACEOF
8156 rm -f conftest.$ac_objext
8157 if { (eval echo "$as_me:8157: \"$ac_compile\"") >&5
8158   (eval $ac_compile) 2>&5
8159   ac_status=$?
8160   echo "$as_me:8160: \$? = $ac_status" >&5
8161   (exit $ac_status); } &&
8162          { ac_try='test -s conftest.$ac_objext'
8163   { (eval echo "$as_me:8163: \"$ac_try\"") >&5
8164   (eval $ac_try) 2>&5
8165   ac_status=$?
8166   echo "$as_me:8166: \$? = $ac_status" >&5
8167   (exit $ac_status); }; }; then
8168   cf_XOPEN_SOURCE_set=yes
8169 else
8170   echo "$as_me: failed program was:" >&5
8171 cat conftest.$ac_ext >&5
8172 cf_XOPEN_SOURCE_set=no
8173 fi
8174 rm -f conftest.$ac_objext conftest.$ac_ext
8175         echo "$as_me:8175: result: $cf_XOPEN_SOURCE_set" >&5
8176 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8177         if test $cf_XOPEN_SOURCE_set = yes
8178         then
8179                 cat >conftest.$ac_ext <<_ACEOF
8180 #line 8180 "configure"
8181 #include "confdefs.h"
8182 #include <stdlib.h>
8183 int
8184 main ()
8185 {
8186
8187 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8188 make an error
8189 #endif
8190   ;
8191   return 0;
8192 }
8193 _ACEOF
8194 rm -f conftest.$ac_objext
8195 if { (eval echo "$as_me:8195: \"$ac_compile\"") >&5
8196   (eval $ac_compile) 2>&5
8197   ac_status=$?
8198   echo "$as_me:8198: \$? = $ac_status" >&5
8199   (exit $ac_status); } &&
8200          { ac_try='test -s conftest.$ac_objext'
8201   { (eval echo "$as_me:8201: \"$ac_try\"") >&5
8202   (eval $ac_try) 2>&5
8203   ac_status=$?
8204   echo "$as_me:8204: \$? = $ac_status" >&5
8205   (exit $ac_status); }; }; then
8206   cf_XOPEN_SOURCE_set_ok=yes
8207 else
8208   echo "$as_me: failed program was:" >&5
8209 cat conftest.$ac_ext >&5
8210 cf_XOPEN_SOURCE_set_ok=no
8211 fi
8212 rm -f conftest.$ac_objext conftest.$ac_ext
8213                 if test $cf_XOPEN_SOURCE_set_ok = no
8214                 then
8215                         { echo "$as_me:8215: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8216 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8217                 fi
8218         else
8219
8220 echo "$as_me:8220: checking if we should define _XOPEN_SOURCE" >&5
8221 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8222 if test "${cf_cv_xopen_source+set}" = set; then
8223   echo $ECHO_N "(cached) $ECHO_C" >&6
8224 else
8225
8226         cat >conftest.$ac_ext <<_ACEOF
8227 #line 8227 "configure"
8228 #include "confdefs.h"
8229
8230 #include <stdlib.h>
8231 #include <string.h>
8232 #include <sys/types.h>
8233
8234 int
8235 main ()
8236 {
8237
8238 #ifndef _XOPEN_SOURCE
8239 make an error
8240 #endif
8241   ;
8242   return 0;
8243 }
8244 _ACEOF
8245 rm -f conftest.$ac_objext
8246 if { (eval echo "$as_me:8246: \"$ac_compile\"") >&5
8247   (eval $ac_compile) 2>&5
8248   ac_status=$?
8249   echo "$as_me:8249: \$? = $ac_status" >&5
8250   (exit $ac_status); } &&
8251          { ac_try='test -s conftest.$ac_objext'
8252   { (eval echo "$as_me:8252: \"$ac_try\"") >&5
8253   (eval $ac_try) 2>&5
8254   ac_status=$?
8255   echo "$as_me:8255: \$? = $ac_status" >&5
8256   (exit $ac_status); }; }; then
8257   cf_cv_xopen_source=no
8258 else
8259   echo "$as_me: failed program was:" >&5
8260 cat conftest.$ac_ext >&5
8261 cf_save="$CPPFLAGS"
8262          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8263          cat >conftest.$ac_ext <<_ACEOF
8264 #line 8264 "configure"
8265 #include "confdefs.h"
8266
8267 #include <stdlib.h>
8268 #include <string.h>
8269 #include <sys/types.h>
8270
8271 int
8272 main ()
8273 {
8274
8275 #ifdef _XOPEN_SOURCE
8276 make an error
8277 #endif
8278   ;
8279   return 0;
8280 }
8281 _ACEOF
8282 rm -f conftest.$ac_objext
8283 if { (eval echo "$as_me:8283: \"$ac_compile\"") >&5
8284   (eval $ac_compile) 2>&5
8285   ac_status=$?
8286   echo "$as_me:8286: \$? = $ac_status" >&5
8287   (exit $ac_status); } &&
8288          { ac_try='test -s conftest.$ac_objext'
8289   { (eval echo "$as_me:8289: \"$ac_try\"") >&5
8290   (eval $ac_try) 2>&5
8291   ac_status=$?
8292   echo "$as_me:8292: \$? = $ac_status" >&5
8293   (exit $ac_status); }; }; then
8294   cf_cv_xopen_source=no
8295 else
8296   echo "$as_me: failed program was:" >&5
8297 cat conftest.$ac_ext >&5
8298 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8299 fi
8300 rm -f conftest.$ac_objext conftest.$ac_ext
8301         CPPFLAGS="$cf_save"
8302
8303 fi
8304 rm -f conftest.$ac_objext conftest.$ac_ext
8305
8306 fi
8307 echo "$as_me:8307: result: $cf_cv_xopen_source" >&5
8308 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8309
8310 if test "$cf_cv_xopen_source" != no ; then
8311
8312 CFLAGS=`echo "$CFLAGS" | \
8313         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8314                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8315
8316 CPPFLAGS=`echo "$CPPFLAGS" | \
8317         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8318                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8319
8320         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8321
8322 cf_fix_cppflags=no
8323 cf_new_cflags=
8324 cf_new_cppflags=
8325 cf_new_extra_cppflags=
8326
8327 for cf_add_cflags in $cf_temp_xopen_source
8328 do
8329 case $cf_fix_cppflags in
8330 no)
8331         case $cf_add_cflags in #(vi
8332         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8333                 case $cf_add_cflags in
8334                 -D*)
8335                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8336
8337                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8338                                 && test -z "${cf_tst_cflags}" \
8339                                 && cf_fix_cppflags=yes
8340
8341                         if test $cf_fix_cppflags = yes ; then
8342                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8343                                 continue
8344                         elif test "${cf_tst_cflags}" = "\"'" ; then
8345                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8346                                 continue
8347                         fi
8348                         ;;
8349                 esac
8350                 case "$CPPFLAGS" in
8351                 *$cf_add_cflags) #(vi
8352                         ;;
8353                 *) #(vi
8354                         case $cf_add_cflags in #(vi
8355                         -D*)
8356                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8357
8358 CPPFLAGS=`echo "$CPPFLAGS" | \
8359         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8360                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8361
8362                                 ;;
8363                         esac
8364                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8365                         ;;
8366                 esac
8367                 ;;
8368         *)
8369                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8370                 ;;
8371         esac
8372         ;;
8373 yes)
8374         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8375
8376         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8377
8378         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8379                 && test -z "${cf_tst_cflags}" \
8380                 && cf_fix_cppflags=no
8381         ;;
8382 esac
8383 done
8384
8385 if test -n "$cf_new_cflags" ; then
8386
8387         CFLAGS="$CFLAGS $cf_new_cflags"
8388 fi
8389
8390 if test -n "$cf_new_cppflags" ; then
8391
8392         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8393 fi
8394
8395 if test -n "$cf_new_extra_cppflags" ; then
8396
8397         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8398 fi
8399
8400 fi
8401
8402         fi
8403 fi
8404
8405 # Work around breakage on OS X
8406
8407 echo "$as_me:8407: checking if SIGWINCH is defined" >&5
8408 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8409 if test "${cf_cv_define_sigwinch+set}" = set; then
8410   echo $ECHO_N "(cached) $ECHO_C" >&6
8411 else
8412
8413         cat >conftest.$ac_ext <<_ACEOF
8414 #line 8414 "configure"
8415 #include "confdefs.h"
8416
8417 #include <sys/types.h>
8418 #include <sys/signal.h>
8419
8420 int
8421 main ()
8422 {
8423 int x = SIGWINCH
8424   ;
8425   return 0;
8426 }
8427 _ACEOF
8428 rm -f conftest.$ac_objext
8429 if { (eval echo "$as_me:8429: \"$ac_compile\"") >&5
8430   (eval $ac_compile) 2>&5
8431   ac_status=$?
8432   echo "$as_me:8432: \$? = $ac_status" >&5
8433   (exit $ac_status); } &&
8434          { ac_try='test -s conftest.$ac_objext'
8435   { (eval echo "$as_me:8435: \"$ac_try\"") >&5
8436   (eval $ac_try) 2>&5
8437   ac_status=$?
8438   echo "$as_me:8438: \$? = $ac_status" >&5
8439   (exit $ac_status); }; }; then
8440   cf_cv_define_sigwinch=yes
8441 else
8442   echo "$as_me: failed program was:" >&5
8443 cat conftest.$ac_ext >&5
8444 cat >conftest.$ac_ext <<_ACEOF
8445 #line 8445 "configure"
8446 #include "confdefs.h"
8447
8448 #undef _XOPEN_SOURCE
8449 #undef _POSIX_SOURCE
8450 #undef _POSIX_C_SOURCE
8451 #include <sys/types.h>
8452 #include <sys/signal.h>
8453
8454 int
8455 main ()
8456 {
8457 int x = SIGWINCH
8458   ;
8459   return 0;
8460 }
8461 _ACEOF
8462 rm -f conftest.$ac_objext
8463 if { (eval echo "$as_me:8463: \"$ac_compile\"") >&5
8464   (eval $ac_compile) 2>&5
8465   ac_status=$?
8466   echo "$as_me:8466: \$? = $ac_status" >&5
8467   (exit $ac_status); } &&
8468          { ac_try='test -s conftest.$ac_objext'
8469   { (eval echo "$as_me:8469: \"$ac_try\"") >&5
8470   (eval $ac_try) 2>&5
8471   ac_status=$?
8472   echo "$as_me:8472: \$? = $ac_status" >&5
8473   (exit $ac_status); }; }; then
8474   cf_cv_define_sigwinch=maybe
8475 else
8476   echo "$as_me: failed program was:" >&5
8477 cat conftest.$ac_ext >&5
8478 cf_cv_define_sigwinch=no
8479 fi
8480 rm -f conftest.$ac_objext conftest.$ac_ext
8481
8482 fi
8483 rm -f conftest.$ac_objext conftest.$ac_ext
8484
8485 fi
8486 echo "$as_me:8486: result: $cf_cv_define_sigwinch" >&5
8487 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8488
8489 if test "$cf_cv_define_sigwinch" = maybe ; then
8490 echo "$as_me:8490: checking for actual SIGWINCH definition" >&5
8491 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8492 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8493   echo $ECHO_N "(cached) $ECHO_C" >&6
8494 else
8495
8496 cf_cv_fixup_sigwinch=unknown
8497 cf_sigwinch=32
8498 while test $cf_sigwinch != 1
8499 do
8500         cat >conftest.$ac_ext <<_ACEOF
8501 #line 8501 "configure"
8502 #include "confdefs.h"
8503
8504 #undef _XOPEN_SOURCE
8505 #undef _POSIX_SOURCE
8506 #undef _POSIX_C_SOURCE
8507 #include <sys/types.h>
8508 #include <sys/signal.h>
8509
8510 int
8511 main ()
8512 {
8513
8514 #if SIGWINCH != $cf_sigwinch
8515 make an error
8516 #endif
8517 int x = SIGWINCH
8518   ;
8519   return 0;
8520 }
8521 _ACEOF
8522 rm -f conftest.$ac_objext
8523 if { (eval echo "$as_me:8523: \"$ac_compile\"") >&5
8524   (eval $ac_compile) 2>&5
8525   ac_status=$?
8526   echo "$as_me:8526: \$? = $ac_status" >&5
8527   (exit $ac_status); } &&
8528          { ac_try='test -s conftest.$ac_objext'
8529   { (eval echo "$as_me:8529: \"$ac_try\"") >&5
8530   (eval $ac_try) 2>&5
8531   ac_status=$?
8532   echo "$as_me:8532: \$? = $ac_status" >&5
8533   (exit $ac_status); }; }; then
8534   cf_cv_fixup_sigwinch=$cf_sigwinch
8535          break
8536 else
8537   echo "$as_me: failed program was:" >&5
8538 cat conftest.$ac_ext >&5
8539 fi
8540 rm -f conftest.$ac_objext conftest.$ac_ext
8541
8542 cf_sigwinch=`expr $cf_sigwinch - 1`
8543 done
8544
8545 fi
8546 echo "$as_me:8546: result: $cf_cv_fixup_sigwinch" >&5
8547 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8548
8549         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8550                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8551         fi
8552 fi
8553
8554 # Checks for CODESET support.
8555
8556   echo "$as_me:8556: checking for nl_langinfo and CODESET" >&5
8557 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8558 if test "${am_cv_langinfo_codeset+set}" = set; then
8559   echo $ECHO_N "(cached) $ECHO_C" >&6
8560 else
8561   cat >conftest.$ac_ext <<_ACEOF
8562 #line 8562 "configure"
8563 #include "confdefs.h"
8564 #include <langinfo.h>
8565 int
8566 main ()
8567 {
8568 char* cs = nl_langinfo(CODESET);
8569   ;
8570   return 0;
8571 }
8572 _ACEOF
8573 rm -f conftest.$ac_objext conftest$ac_exeext
8574 if { (eval echo "$as_me:8574: \"$ac_link\"") >&5
8575   (eval $ac_link) 2>&5
8576   ac_status=$?
8577   echo "$as_me:8577: \$? = $ac_status" >&5
8578   (exit $ac_status); } &&
8579          { ac_try='test -s conftest$ac_exeext'
8580   { (eval echo "$as_me:8580: \"$ac_try\"") >&5
8581   (eval $ac_try) 2>&5
8582   ac_status=$?
8583   echo "$as_me:8583: \$? = $ac_status" >&5
8584   (exit $ac_status); }; }; then
8585   am_cv_langinfo_codeset=yes
8586 else
8587   echo "$as_me: failed program was:" >&5
8588 cat conftest.$ac_ext >&5
8589 am_cv_langinfo_codeset=no
8590 fi
8591 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8592
8593 fi
8594 echo "$as_me:8594: result: $am_cv_langinfo_codeset" >&5
8595 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8596   if test $am_cv_langinfo_codeset = yes; then
8597
8598 cat >>confdefs.h <<\EOF
8599 #define HAVE_LANGINFO_CODESET 1
8600 EOF
8601
8602   fi
8603
8604 # use these variables to work around a defect in gcc's fixincludes.
8605 NCURSES_OK_WCHAR_T=
8606 NCURSES_OK_WINT_T=
8607
8608 echo "$as_me:8608: checking if you want wide-character code" >&5
8609 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8610
8611 # Check whether --enable-widec or --disable-widec was given.
8612 if test "${enable_widec+set}" = set; then
8613   enableval="$enable_widec"
8614   with_widec=$enableval
8615 else
8616   with_widec=no
8617 fi;
8618 echo "$as_me:8618: result: $with_widec" >&5
8619 echo "${ECHO_T}$with_widec" >&6
8620 if test "x$with_widec" = xyes ; then
8621         if test "x$disable_lib_suffixes" = xno ; then
8622                 LIB_SUFFIX="w${LIB_SUFFIX}"
8623         fi
8624
8625 cat >>confdefs.h <<\EOF
8626 #define USE_WIDEC_SUPPORT 1
8627 EOF
8628
8629 cat >>confdefs.h <<\EOF
8630 #define NCURSES_WIDECHAR 1
8631 EOF
8632
8633 echo "$as_me:8633: checking if wchar.h can be used as is" >&5
8634 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8635 if test "${cf_cv_wchar_h_okay+set}" = set; then
8636   echo $ECHO_N "(cached) $ECHO_C" >&6
8637 else
8638
8639 cat >conftest.$ac_ext <<_ACEOF
8640 #line 8640 "configure"
8641 #include "confdefs.h"
8642
8643 #include <stdlib.h>
8644 #include <wchar.h>
8645
8646 int
8647 main ()
8648 {
8649
8650         wint_t foo = 0;
8651         int bar = iswpunct(foo)
8652   ;
8653   return 0;
8654 }
8655 _ACEOF
8656 rm -f conftest.$ac_objext
8657 if { (eval echo "$as_me:8657: \"$ac_compile\"") >&5
8658   (eval $ac_compile) 2>&5
8659   ac_status=$?
8660   echo "$as_me:8660: \$? = $ac_status" >&5
8661   (exit $ac_status); } &&
8662          { ac_try='test -s conftest.$ac_objext'
8663   { (eval echo "$as_me:8663: \"$ac_try\"") >&5
8664   (eval $ac_try) 2>&5
8665   ac_status=$?
8666   echo "$as_me:8666: \$? = $ac_status" >&5
8667   (exit $ac_status); }; }; then
8668   cf_cv_wchar_h_okay=yes
8669 else
8670   echo "$as_me: failed program was:" >&5
8671 cat conftest.$ac_ext >&5
8672 cf_cv_wchar_h_okay=no
8673 fi
8674 rm -f conftest.$ac_objext conftest.$ac_ext
8675 fi
8676 echo "$as_me:8676: result: $cf_cv_wchar_h_okay" >&5
8677 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8678
8679 if test $cf_cv_wchar_h_okay = no
8680 then
8681
8682 echo "$as_me:8682: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8683 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8684 cat >conftest.$ac_ext <<_ACEOF
8685 #line 8685 "configure"
8686 #include "confdefs.h"
8687 #include <sys/types.h>
8688
8689 int
8690 main ()
8691 {
8692
8693 #ifndef _XOPEN_SOURCE_EXTENDED
8694 make an error
8695 #endif
8696   ;
8697   return 0;
8698 }
8699 _ACEOF
8700 rm -f conftest.$ac_objext
8701 if { (eval echo "$as_me:8701: \"$ac_compile\"") >&5
8702   (eval $ac_compile) 2>&5
8703   ac_status=$?
8704   echo "$as_me:8704: \$? = $ac_status" >&5
8705   (exit $ac_status); } &&
8706          { ac_try='test -s conftest.$ac_objext'
8707   { (eval echo "$as_me:8707: \"$ac_try\"") >&5
8708   (eval $ac_try) 2>&5
8709   ac_status=$?
8710   echo "$as_me:8710: \$? = $ac_status" >&5
8711   (exit $ac_status); }; }; then
8712   cf_result=no
8713 else
8714   echo "$as_me: failed program was:" >&5
8715 cat conftest.$ac_ext >&5
8716 cf_result=yes
8717 fi
8718 rm -f conftest.$ac_objext conftest.$ac_ext
8719 echo "$as_me:8719: result: $cf_result" >&5
8720 echo "${ECHO_T}$cf_result" >&6
8721
8722 if test "$cf_result" = yes ; then
8723         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8724 elif test "x" != "x" ; then
8725         echo "$as_me:8725: checking checking for compatible value versus " >&5
8726 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8727         cat >conftest.$ac_ext <<_ACEOF
8728 #line 8728 "configure"
8729 #include "confdefs.h"
8730 #include <sys/types.h>
8731
8732 int
8733 main ()
8734 {
8735
8736 #if _XOPEN_SOURCE_EXTENDED- < 0
8737 make an error
8738 #endif
8739   ;
8740   return 0;
8741 }
8742 _ACEOF
8743 rm -f conftest.$ac_objext
8744 if { (eval echo "$as_me:8744: \"$ac_compile\"") >&5
8745   (eval $ac_compile) 2>&5
8746   ac_status=$?
8747   echo "$as_me:8747: \$? = $ac_status" >&5
8748   (exit $ac_status); } &&
8749          { ac_try='test -s conftest.$ac_objext'
8750   { (eval echo "$as_me:8750: \"$ac_try\"") >&5
8751   (eval $ac_try) 2>&5
8752   ac_status=$?
8753   echo "$as_me:8753: \$? = $ac_status" >&5
8754   (exit $ac_status); }; }; then
8755   cf_result=yes
8756 else
8757   echo "$as_me: failed program was:" >&5
8758 cat conftest.$ac_ext >&5
8759 cf_result=no
8760 fi
8761 rm -f conftest.$ac_objext conftest.$ac_ext
8762         echo "$as_me:8762: result: $cf_result" >&5
8763 echo "${ECHO_T}$cf_result" >&6
8764         if test "$cf_result" = no ; then
8765                 # perhaps we can override it - try...
8766                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8767         fi
8768 fi
8769
8770 fi
8771
8772         # with_overwrite=no
8773         NCURSES_CH_T=cchar_t
8774
8775 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8776 do
8777 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8778 echo "$as_me:8778: checking for $ac_func" >&5
8779 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8780 if eval "test \"\${$as_ac_var+set}\" = set"; then
8781   echo $ECHO_N "(cached) $ECHO_C" >&6
8782 else
8783   cat >conftest.$ac_ext <<_ACEOF
8784 #line 8784 "configure"
8785 #include "confdefs.h"
8786 /* System header to define __stub macros and hopefully few prototypes,
8787     which can conflict with char $ac_func (); below.  */
8788 #include <assert.h>
8789 /* Override any gcc2 internal prototype to avoid an error.  */
8790 #ifdef __cplusplus
8791 extern "C"
8792 #endif
8793 /* We use char because int might match the return type of a gcc2
8794    builtin and then its argument prototype would still apply.  */
8795 char $ac_func ();
8796 char (*f) ();
8797
8798 int
8799 main ()
8800 {
8801 /* The GNU C library defines this for functions which it implements
8802     to always fail with ENOSYS.  Some functions are actually named
8803     something starting with __ and the normal name is an alias.  */
8804 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8805 choke me
8806 #else
8807 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8808 #endif
8809
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   eval "$as_ac_var=yes"
8827 else
8828   echo "$as_me: failed program was:" >&5
8829 cat conftest.$ac_ext >&5
8830 eval "$as_ac_var=no"
8831 fi
8832 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8833 fi
8834 echo "$as_me:8834: result: `eval echo '${'$as_ac_var'}'`" >&5
8835 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8836 if test `eval echo '${'$as_ac_var'}'` = yes; then
8837   cat >>confdefs.h <<EOF
8838 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8839 EOF
8840
8841 fi
8842 done
8843
8844         if test "x$ac_cv_func_putwc" != xyes ; then
8845
8846 echo "$as_me:8846: checking for multibyte character support" >&5
8847 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8848 if test "${cf_cv_utf8_lib+set}" = set; then
8849   echo $ECHO_N "(cached) $ECHO_C" >&6
8850 else
8851
8852         cf_save_LIBS="$LIBS"
8853         cat >conftest.$ac_ext <<_ACEOF
8854 #line 8854 "configure"
8855 #include "confdefs.h"
8856
8857 #include <stdlib.h>
8858 int
8859 main ()
8860 {
8861 putwc(0,0);
8862   ;
8863   return 0;
8864 }
8865 _ACEOF
8866 rm -f conftest.$ac_objext conftest$ac_exeext
8867 if { (eval echo "$as_me:8867: \"$ac_link\"") >&5
8868   (eval $ac_link) 2>&5
8869   ac_status=$?
8870   echo "$as_me:8870: \$? = $ac_status" >&5
8871   (exit $ac_status); } &&
8872          { ac_try='test -s conftest$ac_exeext'
8873   { (eval echo "$as_me:8873: \"$ac_try\"") >&5
8874   (eval $ac_try) 2>&5
8875   ac_status=$?
8876   echo "$as_me:8876: \$? = $ac_status" >&5
8877   (exit $ac_status); }; }; then
8878   cf_cv_utf8_lib=yes
8879 else
8880   echo "$as_me: failed program was:" >&5
8881 cat conftest.$ac_ext >&5
8882
8883 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8884 # will be set on completion of the AC_TRY_LINK below.
8885 cf_cv_header_path_utf8=
8886 cf_cv_library_path_utf8=
8887
8888 echo "${as_me:-configure}:8888: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8889
8890 cf_save_LIBS="$LIBS"
8891
8892 cat >conftest.$ac_ext <<_ACEOF
8893 #line 8893 "configure"
8894 #include "confdefs.h"
8895
8896 #include <libutf8.h>
8897 int
8898 main ()
8899 {
8900 putwc(0,0);
8901   ;
8902   return 0;
8903 }
8904 _ACEOF
8905 rm -f conftest.$ac_objext conftest$ac_exeext
8906 if { (eval echo "$as_me:8906: \"$ac_link\"") >&5
8907   (eval $ac_link) 2>&5
8908   ac_status=$?
8909   echo "$as_me:8909: \$? = $ac_status" >&5
8910   (exit $ac_status); } &&
8911          { ac_try='test -s conftest$ac_exeext'
8912   { (eval echo "$as_me:8912: \"$ac_try\"") >&5
8913   (eval $ac_try) 2>&5
8914   ac_status=$?
8915   echo "$as_me:8915: \$? = $ac_status" >&5
8916   (exit $ac_status); }; }; then
8917
8918         cf_cv_find_linkage_utf8=yes
8919         cf_cv_header_path_utf8=/usr/include
8920         cf_cv_library_path_utf8=/usr/lib
8921
8922 else
8923   echo "$as_me: failed program was:" >&5
8924 cat conftest.$ac_ext >&5
8925
8926 LIBS="-lutf8  $cf_save_LIBS"
8927
8928 cat >conftest.$ac_ext <<_ACEOF
8929 #line 8929 "configure"
8930 #include "confdefs.h"
8931
8932 #include <libutf8.h>
8933 int
8934 main ()
8935 {
8936 putwc(0,0);
8937   ;
8938   return 0;
8939 }
8940 _ACEOF
8941 rm -f conftest.$ac_objext conftest$ac_exeext
8942 if { (eval echo "$as_me:8942: \"$ac_link\"") >&5
8943   (eval $ac_link) 2>&5
8944   ac_status=$?
8945   echo "$as_me:8945: \$? = $ac_status" >&5
8946   (exit $ac_status); } &&
8947          { ac_try='test -s conftest$ac_exeext'
8948   { (eval echo "$as_me:8948: \"$ac_try\"") >&5
8949   (eval $ac_try) 2>&5
8950   ac_status=$?
8951   echo "$as_me:8951: \$? = $ac_status" >&5
8952   (exit $ac_status); }; }; then
8953
8954         cf_cv_find_linkage_utf8=yes
8955         cf_cv_header_path_utf8=/usr/include
8956         cf_cv_library_path_utf8=/usr/lib
8957         cf_cv_library_file_utf8="-lutf8"
8958
8959 else
8960   echo "$as_me: failed program was:" >&5
8961 cat conftest.$ac_ext >&5
8962
8963         cf_cv_find_linkage_utf8=no
8964         LIBS="$cf_save_LIBS"
8965
8966     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8967
8968 echo "${as_me:-configure}:8968: testing find linkage for utf8 library ..." 1>&5
8969
8970 echo "${as_me:-configure}:8970: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8971
8972     cf_save_CPPFLAGS="$CPPFLAGS"
8973     cf_test_CPPFLAGS="$CPPFLAGS"
8974
8975 cf_search=
8976
8977 # collect the current set of include-directories from compiler flags
8978 cf_header_path_list=""
8979 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8980         for cf_header_path in $CPPFLAGS $CFLAGS
8981         do
8982                 case $cf_header_path in #(vi
8983                 -I*)
8984                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8985
8986 test "x$cf_header_path" != "xNONE" && \
8987 test -d "$cf_header_path" && \
8988  {
8989         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8990         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8991         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8992         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8993         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8994         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8995 }
8996
8997                         cf_header_path_list="$cf_header_path_list $cf_search"
8998                         ;;
8999                 esac
9000         done
9001 fi
9002
9003 # add the variations for the package we are looking for
9004
9005 cf_search=
9006
9007 test "x/usr" != "x$prefix" && \
9008 test -d "/usr" && \
9009 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
9010         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
9011         test -d /usr/include &&          cf_search="$cf_search /usr/include"
9012         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
9013         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
9014         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
9015         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
9016 }
9017
9018 test "x$prefix" != "xNONE" && \
9019 test -d "$prefix" && \
9020  {
9021         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9022         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9023         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9024         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9025         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9026         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9027 }
9028
9029 test "x/usr/local" != "x$prefix" && \
9030 test -d "/usr/local" && \
9031 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
9032         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
9033         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
9034         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
9035         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
9036         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
9037         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
9038 }
9039
9040 test "x/opt" != "x$prefix" && \
9041 test -d "/opt" && \
9042 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
9043         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
9044         test -d /opt/include &&          cf_search="$cf_search /opt/include"
9045         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
9046         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
9047         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
9048         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
9049 }
9050
9051 test "x$HOME" != "x$prefix" && \
9052 test -d "$HOME" && \
9053 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
9054         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
9055         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
9056         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
9057         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
9058         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
9059         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
9060 }
9061
9062 test "$includedir" != NONE && \
9063 test "$includedir" != "/usr/include" && \
9064 test -d "$includedir" && {
9065         test -d $includedir &&    cf_search="$cf_search $includedir"
9066         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9067 }
9068
9069 test "$oldincludedir" != NONE && \
9070 test "$oldincludedir" != "/usr/include" && \
9071 test -d "$oldincludedir" && {
9072         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9073         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9074 }
9075
9076 cf_search="$cf_search $cf_header_path_list"
9077
9078     for cf_cv_header_path_utf8 in $cf_search
9079     do
9080       if test -d $cf_cv_header_path_utf8 ; then
9081         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9082
9083 echo "${as_me:-configure}:9083: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9084
9085         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9086         cat >conftest.$ac_ext <<_ACEOF
9087 #line 9087 "configure"
9088 #include "confdefs.h"
9089
9090 #include <libutf8.h>
9091 int
9092 main ()
9093 {
9094 putwc(0,0);
9095   ;
9096   return 0;
9097 }
9098 _ACEOF
9099 rm -f conftest.$ac_objext
9100 if { (eval echo "$as_me:9100: \"$ac_compile\"") >&5
9101   (eval $ac_compile) 2>&5
9102   ac_status=$?
9103   echo "$as_me:9103: \$? = $ac_status" >&5
9104   (exit $ac_status); } &&
9105          { ac_try='test -s conftest.$ac_objext'
9106   { (eval echo "$as_me:9106: \"$ac_try\"") >&5
9107   (eval $ac_try) 2>&5
9108   ac_status=$?
9109   echo "$as_me:9109: \$? = $ac_status" >&5
9110   (exit $ac_status); }; }; then
9111
9112             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9113
9114 echo "${as_me:-configure}:9114: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9115
9116             cf_cv_find_linkage_utf8=maybe
9117             cf_test_CPPFLAGS="$CPPFLAGS"
9118             break
9119 else
9120   echo "$as_me: failed program was:" >&5
9121 cat conftest.$ac_ext >&5
9122
9123             CPPFLAGS="$cf_save_CPPFLAGS"
9124
9125 fi
9126 rm -f conftest.$ac_objext conftest.$ac_ext
9127       fi
9128     done
9129
9130     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9131
9132 echo "${as_me:-configure}:9132: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9133
9134       cf_save_LIBS="$LIBS"
9135       cf_save_LDFLAGS="$LDFLAGS"
9136
9137       if test "$cf_cv_find_linkage_utf8" != yes ; then
9138
9139 cf_search=
9140 cf_library_path_list=""
9141 if test -n "${LDFLAGS}${LIBS}" ; then
9142         for cf_library_path in $LDFLAGS $LIBS
9143         do
9144                 case $cf_library_path in #(vi
9145                 -L*)
9146                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9147
9148 test "x$cf_library_path" != "xNONE" && \
9149 test -d "$cf_library_path" && \
9150  {
9151         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9152         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9153         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9154         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9155         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9156         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9157 }
9158
9159                         cf_library_path_list="$cf_library_path_list $cf_search"
9160                         ;;
9161                 esac
9162         done
9163 fi
9164
9165 cf_search=
9166
9167 test "x/usr" != "x$prefix" && \
9168 test -d "/usr" && \
9169 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
9170         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9171         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9172         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9173         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9174         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9175         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9176 }
9177
9178 test "x$prefix" != "xNONE" && \
9179 test -d "$prefix" && \
9180  {
9181         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9182         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9183         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9184         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9185         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9186         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9187 }
9188
9189 test "x/usr/local" != "x$prefix" && \
9190 test -d "/usr/local" && \
9191 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
9192         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9193         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9194         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9195         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9196         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9197         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9198 }
9199
9200 test "x/opt" != "x$prefix" && \
9201 test -d "/opt" && \
9202 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
9203         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9204         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9205         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9206         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9207         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9208         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9209 }
9210
9211 test "x$HOME" != "x$prefix" && \
9212 test -d "$HOME" && \
9213 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
9214         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9215         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9216         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9217         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9218         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9219         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9220 }
9221
9222 cf_search="$cf_library_path_list $cf_search"
9223
9224         for cf_cv_library_path_utf8 in $cf_search
9225         do
9226           if test -d $cf_cv_library_path_utf8 ; then
9227             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9228
9229 echo "${as_me:-configure}:9229: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9230
9231             CPPFLAGS="$cf_test_CPPFLAGS"
9232             LIBS="-lutf8  $cf_save_LIBS"
9233             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9234             cat >conftest.$ac_ext <<_ACEOF
9235 #line 9235 "configure"
9236 #include "confdefs.h"
9237
9238 #include <libutf8.h>
9239 int
9240 main ()
9241 {
9242 putwc(0,0);
9243   ;
9244   return 0;
9245 }
9246 _ACEOF
9247 rm -f conftest.$ac_objext conftest$ac_exeext
9248 if { (eval echo "$as_me:9248: \"$ac_link\"") >&5
9249   (eval $ac_link) 2>&5
9250   ac_status=$?
9251   echo "$as_me:9251: \$? = $ac_status" >&5
9252   (exit $ac_status); } &&
9253          { ac_try='test -s conftest$ac_exeext'
9254   { (eval echo "$as_me:9254: \"$ac_try\"") >&5
9255   (eval $ac_try) 2>&5
9256   ac_status=$?
9257   echo "$as_me:9257: \$? = $ac_status" >&5
9258   (exit $ac_status); }; }; then
9259
9260                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9261
9262 echo "${as_me:-configure}:9262: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9263
9264                 cf_cv_find_linkage_utf8=yes
9265                 cf_cv_library_file_utf8="-lutf8"
9266                 break
9267 else
9268   echo "$as_me: failed program was:" >&5
9269 cat conftest.$ac_ext >&5
9270
9271                 CPPFLAGS="$cf_save_CPPFLAGS"
9272                 LIBS="$cf_save_LIBS"
9273                 LDFLAGS="$cf_save_LDFLAGS"
9274
9275 fi
9276 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9277           fi
9278         done
9279         CPPFLAGS="$cf_save_CPPFLAGS"
9280         LDFLAGS="$cf_save_LDFLAGS"
9281       fi
9282
9283     else
9284       cf_cv_find_linkage_utf8=no
9285     fi
9286
9287 fi
9288 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9289
9290 fi
9291 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9292
9293 LIBS="$cf_save_LIBS"
9294
9295 if test "$cf_cv_find_linkage_utf8" = yes ; then
9296 cf_cv_utf8_lib=add-on
9297 else
9298 cf_cv_utf8_lib=no
9299 fi
9300
9301 fi
9302 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9303 fi
9304 echo "$as_me:9304: result: $cf_cv_utf8_lib" >&5
9305 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9306
9307 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9308 # ncurses/ncursesw:
9309 if test "$cf_cv_utf8_lib" = "add-on" ; then
9310
9311 cat >>confdefs.h <<\EOF
9312 #define HAVE_LIBUTF8_H 1
9313 EOF
9314
9315 if test -n "$cf_cv_header_path_utf8" ; then
9316   for cf_add_incdir in $cf_cv_header_path_utf8
9317   do
9318         while test $cf_add_incdir != /usr/include
9319         do
9320           if test -d $cf_add_incdir
9321           then
9322                 cf_have_incdir=no
9323                 if test -n "$CFLAGS$CPPFLAGS" ; then
9324                   # a loop is needed to ensure we can add subdirs of existing dirs
9325                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9326                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9327                           cf_have_incdir=yes; break
9328                         fi
9329                   done
9330                 fi
9331
9332                 if test "$cf_have_incdir" = no ; then
9333                   if test "$cf_add_incdir" = /usr/local/include ; then
9334                         if test "$GCC" = yes
9335                         then
9336                           cf_save_CPPFLAGS=$CPPFLAGS
9337                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9338                           cat >conftest.$ac_ext <<_ACEOF
9339 #line 9339 "configure"
9340 #include "confdefs.h"
9341 #include <stdio.h>
9342 int
9343 main ()
9344 {
9345 printf("Hello")
9346   ;
9347   return 0;
9348 }
9349 _ACEOF
9350 rm -f conftest.$ac_objext
9351 if { (eval echo "$as_me:9351: \"$ac_compile\"") >&5
9352   (eval $ac_compile) 2>&5
9353   ac_status=$?
9354   echo "$as_me:9354: \$? = $ac_status" >&5
9355   (exit $ac_status); } &&
9356          { ac_try='test -s conftest.$ac_objext'
9357   { (eval echo "$as_me:9357: \"$ac_try\"") >&5
9358   (eval $ac_try) 2>&5
9359   ac_status=$?
9360   echo "$as_me:9360: \$? = $ac_status" >&5
9361   (exit $ac_status); }; }; then
9362   :
9363 else
9364   echo "$as_me: failed program was:" >&5
9365 cat conftest.$ac_ext >&5
9366 cf_have_incdir=yes
9367 fi
9368 rm -f conftest.$ac_objext conftest.$ac_ext
9369                           CPPFLAGS=$cf_save_CPPFLAGS
9370                         fi
9371                   fi
9372                 fi
9373
9374                 if test "$cf_have_incdir" = no ; then
9375                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9376
9377 echo "${as_me:-configure}:9377: testing adding $cf_add_incdir to include-path ..." 1>&5
9378
9379                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9380
9381                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9382                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9383                   cf_add_incdir="$cf_top_incdir"
9384                 else
9385                   break
9386                 fi
9387           fi
9388         done
9389   done
9390 fi
9391
9392 if test -n "$cf_cv_library_path_utf8" ; then
9393   for cf_add_libdir in $cf_cv_library_path_utf8
9394   do
9395     if test $cf_add_libdir = /usr/lib ; then
9396       :
9397     elif test -d $cf_add_libdir
9398     then
9399       cf_have_libdir=no
9400       if test -n "$LDFLAGS$LIBS" ; then
9401         # a loop is needed to ensure we can add subdirs of existing dirs
9402         for cf_test_libdir in $LDFLAGS $LIBS ; do
9403           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9404             cf_have_libdir=yes; break
9405           fi
9406         done
9407       fi
9408       if test "$cf_have_libdir" = no ; then
9409         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9410
9411 echo "${as_me:-configure}:9411: testing adding $cf_add_libdir to library-path ..." 1>&5
9412
9413         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9414       fi
9415     fi
9416   done
9417 fi
9418
9419         LIBS="$cf_cv_library_file_utf8 $LIBS"
9420 fi
9421
9422                 if test "$cf_cv_utf8_lib" != no ; then
9423                         NCURSES_LIBUTF8=1
9424                 fi
9425         fi
9426
9427 # This is needed on Tru64 5.0 to declare mbstate_t
9428 echo "$as_me:9428: checking if we must include wchar.h to declare mbstate_t" >&5
9429 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9430 if test "${cf_cv_mbstate_t+set}" = set; then
9431   echo $ECHO_N "(cached) $ECHO_C" >&6
9432 else
9433
9434 cat >conftest.$ac_ext <<_ACEOF
9435 #line 9435 "configure"
9436 #include "confdefs.h"
9437
9438 #include <stdlib.h>
9439 #include <stdarg.h>
9440 #include <stdio.h>
9441 #ifdef HAVE_LIBUTF8_H
9442 #include <libutf8.h>
9443 #endif
9444 int
9445 main ()
9446 {
9447 mbstate_t state
9448   ;
9449   return 0;
9450 }
9451 _ACEOF
9452 rm -f conftest.$ac_objext
9453 if { (eval echo "$as_me:9453: \"$ac_compile\"") >&5
9454   (eval $ac_compile) 2>&5
9455   ac_status=$?
9456   echo "$as_me:9456: \$? = $ac_status" >&5
9457   (exit $ac_status); } &&
9458          { ac_try='test -s conftest.$ac_objext'
9459   { (eval echo "$as_me:9459: \"$ac_try\"") >&5
9460   (eval $ac_try) 2>&5
9461   ac_status=$?
9462   echo "$as_me:9462: \$? = $ac_status" >&5
9463   (exit $ac_status); }; }; then
9464   cf_cv_mbstate_t=no
9465 else
9466   echo "$as_me: failed program was:" >&5
9467 cat conftest.$ac_ext >&5
9468 cat >conftest.$ac_ext <<_ACEOF
9469 #line 9469 "configure"
9470 #include "confdefs.h"
9471
9472 #include <stdlib.h>
9473 #include <stdarg.h>
9474 #include <stdio.h>
9475 #include <wchar.h>
9476 #ifdef HAVE_LIBUTF8_H
9477 #include <libutf8.h>
9478 #endif
9479 int
9480 main ()
9481 {
9482 mbstate_t value
9483   ;
9484   return 0;
9485 }
9486 _ACEOF
9487 rm -f conftest.$ac_objext
9488 if { (eval echo "$as_me:9488: \"$ac_compile\"") >&5
9489   (eval $ac_compile) 2>&5
9490   ac_status=$?
9491   echo "$as_me:9491: \$? = $ac_status" >&5
9492   (exit $ac_status); } &&
9493          { ac_try='test -s conftest.$ac_objext'
9494   { (eval echo "$as_me:9494: \"$ac_try\"") >&5
9495   (eval $ac_try) 2>&5
9496   ac_status=$?
9497   echo "$as_me:9497: \$? = $ac_status" >&5
9498   (exit $ac_status); }; }; then
9499   cf_cv_mbstate_t=yes
9500 else
9501   echo "$as_me: failed program was:" >&5
9502 cat conftest.$ac_ext >&5
9503 cf_cv_mbstate_t=unknown
9504 fi
9505 rm -f conftest.$ac_objext conftest.$ac_ext
9506 fi
9507 rm -f conftest.$ac_objext conftest.$ac_ext
9508 fi
9509 echo "$as_me:9509: result: $cf_cv_mbstate_t" >&5
9510 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9511
9512 if test "$cf_cv_mbstate_t" = yes ; then
9513
9514 cat >>confdefs.h <<\EOF
9515 #define NEED_WCHAR_H 1
9516 EOF
9517
9518         NEED_WCHAR_H=1
9519 fi
9520
9521 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9522 if test "$cf_cv_mbstate_t" = unknown ; then
9523         NCURSES_MBSTATE_T=1
9524 fi
9525
9526 # This is needed on Tru64 5.0 to declare wchar_t
9527 echo "$as_me:9527: checking if we must include wchar.h to declare wchar_t" >&5
9528 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9529 if test "${cf_cv_wchar_t+set}" = set; then
9530   echo $ECHO_N "(cached) $ECHO_C" >&6
9531 else
9532
9533 cat >conftest.$ac_ext <<_ACEOF
9534 #line 9534 "configure"
9535 #include "confdefs.h"
9536
9537 #include <stdlib.h>
9538 #include <stdarg.h>
9539 #include <stdio.h>
9540 #ifdef HAVE_LIBUTF8_H
9541 #include <libutf8.h>
9542 #endif
9543 int
9544 main ()
9545 {
9546 wchar_t state
9547   ;
9548   return 0;
9549 }
9550 _ACEOF
9551 rm -f conftest.$ac_objext
9552 if { (eval echo "$as_me:9552: \"$ac_compile\"") >&5
9553   (eval $ac_compile) 2>&5
9554   ac_status=$?
9555   echo "$as_me:9555: \$? = $ac_status" >&5
9556   (exit $ac_status); } &&
9557          { ac_try='test -s conftest.$ac_objext'
9558   { (eval echo "$as_me:9558: \"$ac_try\"") >&5
9559   (eval $ac_try) 2>&5
9560   ac_status=$?
9561   echo "$as_me:9561: \$? = $ac_status" >&5
9562   (exit $ac_status); }; }; then
9563   cf_cv_wchar_t=no
9564 else
9565   echo "$as_me: failed program was:" >&5
9566 cat conftest.$ac_ext >&5
9567 cat >conftest.$ac_ext <<_ACEOF
9568 #line 9568 "configure"
9569 #include "confdefs.h"
9570
9571 #include <stdlib.h>
9572 #include <stdarg.h>
9573 #include <stdio.h>
9574 #include <wchar.h>
9575 #ifdef HAVE_LIBUTF8_H
9576 #include <libutf8.h>
9577 #endif
9578 int
9579 main ()
9580 {
9581 wchar_t value
9582   ;
9583   return 0;
9584 }
9585 _ACEOF
9586 rm -f conftest.$ac_objext
9587 if { (eval echo "$as_me:9587: \"$ac_compile\"") >&5
9588   (eval $ac_compile) 2>&5
9589   ac_status=$?
9590   echo "$as_me:9590: \$? = $ac_status" >&5
9591   (exit $ac_status); } &&
9592          { ac_try='test -s conftest.$ac_objext'
9593   { (eval echo "$as_me:9593: \"$ac_try\"") >&5
9594   (eval $ac_try) 2>&5
9595   ac_status=$?
9596   echo "$as_me:9596: \$? = $ac_status" >&5
9597   (exit $ac_status); }; }; then
9598   cf_cv_wchar_t=yes
9599 else
9600   echo "$as_me: failed program was:" >&5
9601 cat conftest.$ac_ext >&5
9602 cf_cv_wchar_t=unknown
9603 fi
9604 rm -f conftest.$ac_objext conftest.$ac_ext
9605 fi
9606 rm -f conftest.$ac_objext conftest.$ac_ext
9607 fi
9608 echo "$as_me:9608: result: $cf_cv_wchar_t" >&5
9609 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9610
9611 if test "$cf_cv_wchar_t" = yes ; then
9612
9613 cat >>confdefs.h <<\EOF
9614 #define NEED_WCHAR_H 1
9615 EOF
9616
9617         NEED_WCHAR_H=1
9618 fi
9619
9620 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9621 if test "$cf_cv_wchar_t" = unknown ; then
9622         NCURSES_WCHAR_T=1
9623 fi
9624
9625 # if we find wchar_t in either place, use substitution to provide a fallback.
9626 if test "$cf_cv_wchar_t" != unknown ; then
9627         NCURSES_OK_WCHAR_T=1
9628 fi
9629
9630 # This is needed on Tru64 5.0 to declare wint_t
9631 echo "$as_me:9631: checking if we must include wchar.h to declare wint_t" >&5
9632 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9633 if test "${cf_cv_wint_t+set}" = set; then
9634   echo $ECHO_N "(cached) $ECHO_C" >&6
9635 else
9636
9637 cat >conftest.$ac_ext <<_ACEOF
9638 #line 9638 "configure"
9639 #include "confdefs.h"
9640
9641 #include <stdlib.h>
9642 #include <stdarg.h>
9643 #include <stdio.h>
9644 #ifdef HAVE_LIBUTF8_H
9645 #include <libutf8.h>
9646 #endif
9647 int
9648 main ()
9649 {
9650 wint_t state
9651   ;
9652   return 0;
9653 }
9654 _ACEOF
9655 rm -f conftest.$ac_objext
9656 if { (eval echo "$as_me:9656: \"$ac_compile\"") >&5
9657   (eval $ac_compile) 2>&5
9658   ac_status=$?
9659   echo "$as_me:9659: \$? = $ac_status" >&5
9660   (exit $ac_status); } &&
9661          { ac_try='test -s conftest.$ac_objext'
9662   { (eval echo "$as_me:9662: \"$ac_try\"") >&5
9663   (eval $ac_try) 2>&5
9664   ac_status=$?
9665   echo "$as_me:9665: \$? = $ac_status" >&5
9666   (exit $ac_status); }; }; then
9667   cf_cv_wint_t=no
9668 else
9669   echo "$as_me: failed program was:" >&5
9670 cat conftest.$ac_ext >&5
9671 cat >conftest.$ac_ext <<_ACEOF
9672 #line 9672 "configure"
9673 #include "confdefs.h"
9674
9675 #include <stdlib.h>
9676 #include <stdarg.h>
9677 #include <stdio.h>
9678 #include <wchar.h>
9679 #ifdef HAVE_LIBUTF8_H
9680 #include <libutf8.h>
9681 #endif
9682 int
9683 main ()
9684 {
9685 wint_t value
9686   ;
9687   return 0;
9688 }
9689 _ACEOF
9690 rm -f conftest.$ac_objext
9691 if { (eval echo "$as_me:9691: \"$ac_compile\"") >&5
9692   (eval $ac_compile) 2>&5
9693   ac_status=$?
9694   echo "$as_me:9694: \$? = $ac_status" >&5
9695   (exit $ac_status); } &&
9696          { ac_try='test -s conftest.$ac_objext'
9697   { (eval echo "$as_me:9697: \"$ac_try\"") >&5
9698   (eval $ac_try) 2>&5
9699   ac_status=$?
9700   echo "$as_me:9700: \$? = $ac_status" >&5
9701   (exit $ac_status); }; }; then
9702   cf_cv_wint_t=yes
9703 else
9704   echo "$as_me: failed program was:" >&5
9705 cat conftest.$ac_ext >&5
9706 cf_cv_wint_t=unknown
9707 fi
9708 rm -f conftest.$ac_objext conftest.$ac_ext
9709 fi
9710 rm -f conftest.$ac_objext conftest.$ac_ext
9711 fi
9712 echo "$as_me:9712: result: $cf_cv_wint_t" >&5
9713 echo "${ECHO_T}$cf_cv_wint_t" >&6
9714
9715 if test "$cf_cv_wint_t" = yes ; then
9716
9717 cat >>confdefs.h <<\EOF
9718 #define NEED_WCHAR_H 1
9719 EOF
9720
9721         NEED_WCHAR_H=1
9722 fi
9723
9724 # if we do not find wint_t in either place, use substitution to provide a fallback.
9725 if test "$cf_cv_wint_t" = unknown ; then
9726         NCURSES_WINT_T=1
9727 fi
9728
9729 # if we find wint_t in either place, use substitution to provide a fallback.
9730 if test "$cf_cv_wint_t" != unknown ; then
9731         NCURSES_OK_WINT_T=1
9732 fi
9733
9734         if test "$NCURSES_MBSTATE_T" != 0; then
9735
9736 cat >>confdefs.h <<\EOF
9737 #define NEED_MBSTATE_T_DEF 1
9738 EOF
9739
9740         fi
9741 fi
9742
9743 ###   use option --disable-lp64 to allow long chtype
9744 case $cf_cv_abi_version in
9745 [345]*)
9746         default_with_lp64=no
9747         ;;
9748 *)
9749         default_with_lp64=yes
9750         ;;
9751 esac
9752
9753 echo "$as_me:9753: checking whether to enable _LP64 definition in curses.h" >&5
9754 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9755
9756 # Check whether --enable-lp64 or --disable-lp64 was given.
9757 if test "${enable_lp64+set}" = set; then
9758   enableval="$enable_lp64"
9759   with_lp64=$enableval
9760 else
9761   with_lp64=$default_with_lp64
9762 fi;
9763 echo "$as_me:9763: result: $with_lp64" >&5
9764 echo "${ECHO_T}$with_lp64" >&6
9765
9766 if test "x$with_lp64" = xyes ; then
9767         cf_cv_enable_lp64=1
9768 else
9769         cf_cv_enable_lp64=0
9770 fi
9771
9772 # Check whether --enable-largefile or --disable-largefile was given.
9773 if test "${enable_largefile+set}" = set; then
9774   enableval="$enable_largefile"
9775
9776 fi;
9777 if test "$enable_largefile" != no; then
9778
9779   echo "$as_me:9779: checking for special C compiler options needed for large files" >&5
9780 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9781 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9782   echo $ECHO_N "(cached) $ECHO_C" >&6
9783 else
9784   ac_cv_sys_largefile_CC=no
9785      if test "$GCC" != yes; then
9786        ac_save_CC=$CC
9787        while :; do
9788          # IRIX 6.2 and later do not support large files by default,
9789          # so use the C compiler's -n32 option if that helps.
9790          cat >conftest.$ac_ext <<_ACEOF
9791 #line 9791 "configure"
9792 #include "confdefs.h"
9793 #include <sys/types.h>
9794  /* Check that off_t can represent 2**63 - 1 correctly.
9795     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9796     since some C++ compilers masquerading as C compilers
9797     incorrectly reject 9223372036854775807.  */
9798 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9799   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9800                        && LARGE_OFF_T % 2147483647 == 1)
9801                       ? 1 : -1];
9802 int
9803 main ()
9804 {
9805
9806   ;
9807   return 0;
9808 }
9809 _ACEOF
9810          rm -f conftest.$ac_objext
9811 if { (eval echo "$as_me:9811: \"$ac_compile\"") >&5
9812   (eval $ac_compile) 2>&5
9813   ac_status=$?
9814   echo "$as_me:9814: \$? = $ac_status" >&5
9815   (exit $ac_status); } &&
9816          { ac_try='test -s conftest.$ac_objext'
9817   { (eval echo "$as_me:9817: \"$ac_try\"") >&5
9818   (eval $ac_try) 2>&5
9819   ac_status=$?
9820   echo "$as_me:9820: \$? = $ac_status" >&5
9821   (exit $ac_status); }; }; then
9822   break
9823 else
9824   echo "$as_me: failed program was:" >&5
9825 cat conftest.$ac_ext >&5
9826 fi
9827 rm -f conftest.$ac_objext
9828          CC="$CC -n32"
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   ac_cv_sys_largefile_CC=' -n32'; 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
9847          break
9848        done
9849        CC=$ac_save_CC
9850        rm -f conftest.$ac_ext
9851     fi
9852 fi
9853 echo "$as_me:9853: result: $ac_cv_sys_largefile_CC" >&5
9854 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9855   if test "$ac_cv_sys_largefile_CC" != no; then
9856     CC=$CC$ac_cv_sys_largefile_CC
9857   fi
9858
9859   echo "$as_me:9859: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9860 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9861 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9862   echo $ECHO_N "(cached) $ECHO_C" >&6
9863 else
9864   while :; do
9865   ac_cv_sys_file_offset_bits=no
9866   cat >conftest.$ac_ext <<_ACEOF
9867 #line 9867 "configure"
9868 #include "confdefs.h"
9869 #include <sys/types.h>
9870  /* Check that off_t can represent 2**63 - 1 correctly.
9871     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9872     since some C++ compilers masquerading as C compilers
9873     incorrectly reject 9223372036854775807.  */
9874 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9875   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9876                        && LARGE_OFF_T % 2147483647 == 1)
9877                       ? 1 : -1];
9878 int
9879 main ()
9880 {
9881
9882   ;
9883   return 0;
9884 }
9885 _ACEOF
9886 rm -f conftest.$ac_objext
9887 if { (eval echo "$as_me:9887: \"$ac_compile\"") >&5
9888   (eval $ac_compile) 2>&5
9889   ac_status=$?
9890   echo "$as_me:9890: \$? = $ac_status" >&5
9891   (exit $ac_status); } &&
9892          { ac_try='test -s conftest.$ac_objext'
9893   { (eval echo "$as_me:9893: \"$ac_try\"") >&5
9894   (eval $ac_try) 2>&5
9895   ac_status=$?
9896   echo "$as_me:9896: \$? = $ac_status" >&5
9897   (exit $ac_status); }; }; then
9898   break
9899 else
9900   echo "$as_me: failed program was:" >&5
9901 cat conftest.$ac_ext >&5
9902 fi
9903 rm -f conftest.$ac_objext conftest.$ac_ext
9904   cat >conftest.$ac_ext <<_ACEOF
9905 #line 9905 "configure"
9906 #include "confdefs.h"
9907 #define _FILE_OFFSET_BITS 64
9908 #include <sys/types.h>
9909  /* Check that off_t can represent 2**63 - 1 correctly.
9910     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9911     since some C++ compilers masquerading as C compilers
9912     incorrectly reject 9223372036854775807.  */
9913 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9914   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9915                        && LARGE_OFF_T % 2147483647 == 1)
9916                       ? 1 : -1];
9917 int
9918 main ()
9919 {
9920
9921   ;
9922   return 0;
9923 }
9924 _ACEOF
9925 rm -f conftest.$ac_objext
9926 if { (eval echo "$as_me:9926: \"$ac_compile\"") >&5
9927   (eval $ac_compile) 2>&5
9928   ac_status=$?
9929   echo "$as_me:9929: \$? = $ac_status" >&5
9930   (exit $ac_status); } &&
9931          { ac_try='test -s conftest.$ac_objext'
9932   { (eval echo "$as_me:9932: \"$ac_try\"") >&5
9933   (eval $ac_try) 2>&5
9934   ac_status=$?
9935   echo "$as_me:9935: \$? = $ac_status" >&5
9936   (exit $ac_status); }; }; then
9937   ac_cv_sys_file_offset_bits=64; break
9938 else
9939   echo "$as_me: failed program was:" >&5
9940 cat conftest.$ac_ext >&5
9941 fi
9942 rm -f conftest.$ac_objext conftest.$ac_ext
9943   break
9944 done
9945 fi
9946 echo "$as_me:9946: result: $ac_cv_sys_file_offset_bits" >&5
9947 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9948 if test "$ac_cv_sys_file_offset_bits" != no; then
9949
9950 cat >>confdefs.h <<EOF
9951 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9952 EOF
9953
9954 fi
9955 rm -rf conftest*
9956   echo "$as_me:9956: checking for _LARGE_FILES value needed for large files" >&5
9957 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9958 if test "${ac_cv_sys_large_files+set}" = set; then
9959   echo $ECHO_N "(cached) $ECHO_C" >&6
9960 else
9961   while :; do
9962   ac_cv_sys_large_files=no
9963   cat >conftest.$ac_ext <<_ACEOF
9964 #line 9964 "configure"
9965 #include "confdefs.h"
9966 #include <sys/types.h>
9967  /* Check that off_t can represent 2**63 - 1 correctly.
9968     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9969     since some C++ compilers masquerading as C compilers
9970     incorrectly reject 9223372036854775807.  */
9971 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9972   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9973                        && LARGE_OFF_T % 2147483647 == 1)
9974                       ? 1 : -1];
9975 int
9976 main ()
9977 {
9978
9979   ;
9980   return 0;
9981 }
9982 _ACEOF
9983 rm -f conftest.$ac_objext
9984 if { (eval echo "$as_me:9984: \"$ac_compile\"") >&5
9985   (eval $ac_compile) 2>&5
9986   ac_status=$?
9987   echo "$as_me:9987: \$? = $ac_status" >&5
9988   (exit $ac_status); } &&
9989          { ac_try='test -s conftest.$ac_objext'
9990   { (eval echo "$as_me:9990: \"$ac_try\"") >&5
9991   (eval $ac_try) 2>&5
9992   ac_status=$?
9993   echo "$as_me:9993: \$? = $ac_status" >&5
9994   (exit $ac_status); }; }; then
9995   break
9996 else
9997   echo "$as_me: failed program was:" >&5
9998 cat conftest.$ac_ext >&5
9999 fi
10000 rm -f conftest.$ac_objext conftest.$ac_ext
10001   cat >conftest.$ac_ext <<_ACEOF
10002 #line 10002 "configure"
10003 #include "confdefs.h"
10004 #define _LARGE_FILES 1
10005 #include <sys/types.h>
10006  /* Check that off_t can represent 2**63 - 1 correctly.
10007     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10008     since some C++ compilers masquerading as C compilers
10009     incorrectly reject 9223372036854775807.  */
10010 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10011   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10012                        && LARGE_OFF_T % 2147483647 == 1)
10013                       ? 1 : -1];
10014 int
10015 main ()
10016 {
10017
10018   ;
10019   return 0;
10020 }
10021 _ACEOF
10022 rm -f conftest.$ac_objext
10023 if { (eval echo "$as_me:10023: \"$ac_compile\"") >&5
10024   (eval $ac_compile) 2>&5
10025   ac_status=$?
10026   echo "$as_me:10026: \$? = $ac_status" >&5
10027   (exit $ac_status); } &&
10028          { ac_try='test -s conftest.$ac_objext'
10029   { (eval echo "$as_me:10029: \"$ac_try\"") >&5
10030   (eval $ac_try) 2>&5
10031   ac_status=$?
10032   echo "$as_me:10032: \$? = $ac_status" >&5
10033   (exit $ac_status); }; }; then
10034   ac_cv_sys_large_files=1; break
10035 else
10036   echo "$as_me: failed program was:" >&5
10037 cat conftest.$ac_ext >&5
10038 fi
10039 rm -f conftest.$ac_objext conftest.$ac_ext
10040   break
10041 done
10042 fi
10043 echo "$as_me:10043: result: $ac_cv_sys_large_files" >&5
10044 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10045 if test "$ac_cv_sys_large_files" != no; then
10046
10047 cat >>confdefs.h <<EOF
10048 #define _LARGE_FILES $ac_cv_sys_large_files
10049 EOF
10050
10051 fi
10052 rm -rf conftest*
10053 fi
10054
10055     if test "$enable_largefile" != no ; then
10056         echo "$as_me:10056: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10057 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10058 if test "${ac_cv_sys_largefile_source+set}" = set; then
10059   echo $ECHO_N "(cached) $ECHO_C" >&6
10060 else
10061   while :; do
10062   ac_cv_sys_largefile_source=no
10063   cat >conftest.$ac_ext <<_ACEOF
10064 #line 10064 "configure"
10065 #include "confdefs.h"
10066 #include <stdio.h>
10067 int
10068 main ()
10069 {
10070 return !fseeko;
10071   ;
10072   return 0;
10073 }
10074 _ACEOF
10075 rm -f conftest.$ac_objext
10076 if { (eval echo "$as_me:10076: \"$ac_compile\"") >&5
10077   (eval $ac_compile) 2>&5
10078   ac_status=$?
10079   echo "$as_me:10079: \$? = $ac_status" >&5
10080   (exit $ac_status); } &&
10081          { ac_try='test -s conftest.$ac_objext'
10082   { (eval echo "$as_me:10082: \"$ac_try\"") >&5
10083   (eval $ac_try) 2>&5
10084   ac_status=$?
10085   echo "$as_me:10085: \$? = $ac_status" >&5
10086   (exit $ac_status); }; }; then
10087   break
10088 else
10089   echo "$as_me: failed program was:" >&5
10090 cat conftest.$ac_ext >&5
10091 fi
10092 rm -f conftest.$ac_objext conftest.$ac_ext
10093   cat >conftest.$ac_ext <<_ACEOF
10094 #line 10094 "configure"
10095 #include "confdefs.h"
10096 #define _LARGEFILE_SOURCE 1
10097 #include <stdio.h>
10098 int
10099 main ()
10100 {
10101 return !fseeko;
10102   ;
10103   return 0;
10104 }
10105 _ACEOF
10106 rm -f conftest.$ac_objext
10107 if { (eval echo "$as_me:10107: \"$ac_compile\"") >&5
10108   (eval $ac_compile) 2>&5
10109   ac_status=$?
10110   echo "$as_me:10110: \$? = $ac_status" >&5
10111   (exit $ac_status); } &&
10112          { ac_try='test -s conftest.$ac_objext'
10113   { (eval echo "$as_me:10113: \"$ac_try\"") >&5
10114   (eval $ac_try) 2>&5
10115   ac_status=$?
10116   echo "$as_me:10116: \$? = $ac_status" >&5
10117   (exit $ac_status); }; }; then
10118   ac_cv_sys_largefile_source=1; break
10119 else
10120   echo "$as_me: failed program was:" >&5
10121 cat conftest.$ac_ext >&5
10122 fi
10123 rm -f conftest.$ac_objext conftest.$ac_ext
10124   break
10125 done
10126 fi
10127 echo "$as_me:10127: result: $ac_cv_sys_largefile_source" >&5
10128 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10129 if test "$ac_cv_sys_largefile_source" != no; then
10130
10131 cat >>confdefs.h <<EOF
10132 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10133 EOF
10134
10135 fi
10136 rm -rf conftest*
10137
10138 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10139 # in glibc 2.1.3, but that breaks too many other things.
10140 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10141 echo "$as_me:10141: checking for fseeko" >&5
10142 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10143 if test "${ac_cv_func_fseeko+set}" = set; then
10144   echo $ECHO_N "(cached) $ECHO_C" >&6
10145 else
10146   cat >conftest.$ac_ext <<_ACEOF
10147 #line 10147 "configure"
10148 #include "confdefs.h"
10149 #include <stdio.h>
10150 int
10151 main ()
10152 {
10153 return fseeko && fseeko (stdin, 0, 0);
10154   ;
10155   return 0;
10156 }
10157 _ACEOF
10158 rm -f conftest.$ac_objext conftest$ac_exeext
10159 if { (eval echo "$as_me:10159: \"$ac_link\"") >&5
10160   (eval $ac_link) 2>&5
10161   ac_status=$?
10162   echo "$as_me:10162: \$? = $ac_status" >&5
10163   (exit $ac_status); } &&
10164          { ac_try='test -s conftest$ac_exeext'
10165   { (eval echo "$as_me:10165: \"$ac_try\"") >&5
10166   (eval $ac_try) 2>&5
10167   ac_status=$?
10168   echo "$as_me:10168: \$? = $ac_status" >&5
10169   (exit $ac_status); }; }; then
10170   ac_cv_func_fseeko=yes
10171 else
10172   echo "$as_me: failed program was:" >&5
10173 cat conftest.$ac_ext >&5
10174 ac_cv_func_fseeko=no
10175 fi
10176 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10177 fi
10178 echo "$as_me:10178: result: $ac_cv_func_fseeko" >&5
10179 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10180 if test $ac_cv_func_fseeko = yes; then
10181
10182 cat >>confdefs.h <<\EOF
10183 #define HAVE_FSEEKO 1
10184 EOF
10185
10186 fi
10187
10188         # Normally we would collect these definitions in the config.h,
10189         # but (like _XOPEN_SOURCE), some environments rely on having these
10190         # defined before any of the system headers are included.  Another
10191         # case comes up with C++, e.g., on AIX the compiler compiles the
10192         # header files by themselves before looking at the body files it is
10193         # told to compile.  For ncurses, those header files do not include
10194         # the config.h
10195         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10196         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10197         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10198
10199         echo "$as_me:10199: checking whether to use struct dirent64" >&5
10200 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10201 if test "${cf_cv_struct_dirent64+set}" = set; then
10202   echo $ECHO_N "(cached) $ECHO_C" >&6
10203 else
10204
10205                 cat >conftest.$ac_ext <<_ACEOF
10206 #line 10206 "configure"
10207 #include "confdefs.h"
10208
10209 #include <sys/types.h>
10210 #include <dirent.h>
10211
10212 int
10213 main ()
10214 {
10215
10216                 /* if transitional largefile support is setup, this is true */
10217                 extern struct dirent64 * readdir(DIR *);
10218                 struct dirent64 *x = readdir((DIR *)0);
10219                 struct dirent *y = readdir((DIR *)0);
10220                 int z = x - y;
10221
10222   ;
10223   return 0;
10224 }
10225 _ACEOF
10226 rm -f conftest.$ac_objext
10227 if { (eval echo "$as_me:10227: \"$ac_compile\"") >&5
10228   (eval $ac_compile) 2>&5
10229   ac_status=$?
10230   echo "$as_me:10230: \$? = $ac_status" >&5
10231   (exit $ac_status); } &&
10232          { ac_try='test -s conftest.$ac_objext'
10233   { (eval echo "$as_me:10233: \"$ac_try\"") >&5
10234   (eval $ac_try) 2>&5
10235   ac_status=$?
10236   echo "$as_me:10236: \$? = $ac_status" >&5
10237   (exit $ac_status); }; }; then
10238   cf_cv_struct_dirent64=yes
10239 else
10240   echo "$as_me: failed program was:" >&5
10241 cat conftest.$ac_ext >&5
10242 cf_cv_struct_dirent64=no
10243 fi
10244 rm -f conftest.$ac_objext conftest.$ac_ext
10245
10246 fi
10247 echo "$as_me:10247: result: $cf_cv_struct_dirent64" >&5
10248 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10249         test "$cf_cv_struct_dirent64" = yes &&
10250 cat >>confdefs.h <<\EOF
10251 #define HAVE_STRUCT_DIRENT64 1
10252 EOF
10253
10254     fi
10255
10256 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10257 echo "$as_me:10257: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10258 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10259
10260 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10261 if test "${enable_tparm_varargs+set}" = set; then
10262   enableval="$enable_tparm_varargs"
10263   with_tparm_varargs=$enableval
10264 else
10265   with_tparm_varargs=yes
10266 fi;
10267 echo "$as_me:10267: result: $with_tparm_varargs" >&5
10268 echo "${ECHO_T}$with_tparm_varargs" >&6
10269 NCURSES_TPARM_VARARGS=0
10270 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10271
10272 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10273 if test "$with_ticlib" != no ; then
10274 echo "$as_me:10274: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10275 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10276
10277 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10278 if test "${enable_tic_depends+set}" = set; then
10279   enableval="$enable_tic_depends"
10280   with_tic_depends=$enableval
10281 else
10282   with_tic_depends=yes
10283 fi;
10284 echo "$as_me:10284: result: $with_tic_depends" >&5
10285 echo "${ECHO_T}$with_tic_depends" >&6
10286 else
10287         with_tic_depends=no
10288 fi
10289
10290 ###   use option --with-bool to override bool's type
10291 echo "$as_me:10291: checking for type of bool" >&5
10292 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10293
10294 # Check whether --with-bool or --without-bool was given.
10295 if test "${with_bool+set}" = set; then
10296   withval="$with_bool"
10297   NCURSES_BOOL="$withval"
10298 else
10299   NCURSES_BOOL=auto
10300 fi;
10301 echo "$as_me:10301: result: $NCURSES_BOOL" >&5
10302 echo "${ECHO_T}$NCURSES_BOOL" >&6
10303
10304 echo "$as_me:10304: checking for alternate terminal capabilities file" >&5
10305 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10306
10307 # Check whether --with-caps or --without-caps was given.
10308 if test "${with_caps+set}" = set; then
10309   withval="$with_caps"
10310   TERMINFO_CAPS=Caps.$withval
10311 else
10312   TERMINFO_CAPS=Caps
10313 fi;
10314 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10315 echo "$as_me:10315: result: $TERMINFO_CAPS" >&5
10316 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10317
10318 ###   use option --with-chtype to override chtype's type
10319 echo "$as_me:10319: checking for type of chtype" >&5
10320 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10321
10322 # Check whether --with-chtype or --without-chtype was given.
10323 if test "${with_chtype+set}" = set; then
10324   withval="$with_chtype"
10325   NCURSES_CHTYPE="$withval"
10326 else
10327   NCURSES_CHTYPE=auto
10328 fi;
10329 echo "$as_me:10329: result: $NCURSES_CHTYPE" >&5
10330 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10331
10332 ###   use option --with-ospeed to override ospeed's type
10333 echo "$as_me:10333: checking for type of ospeed" >&5
10334 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10335
10336 # Check whether --with-ospeed or --without-ospeed was given.
10337 if test "${with_ospeed+set}" = set; then
10338   withval="$with_ospeed"
10339   NCURSES_OSPEED="$withval"
10340 else
10341   NCURSES_OSPEED=short
10342 fi;
10343 echo "$as_me:10343: result: $NCURSES_OSPEED" >&5
10344 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10345
10346 ###   use option --with-mmask-t to override mmask_t's type
10347 echo "$as_me:10347: checking for type of mmask_t" >&5
10348 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10349
10350 # Check whether --with-mmask-t or --without-mmask-t was given.
10351 if test "${with_mmask_t+set}" = set; then
10352   withval="$with_mmask_t"
10353   NCURSES_MMASK_T="$withval"
10354 else
10355   NCURSES_MMASK_T=auto
10356 fi;
10357 echo "$as_me:10357: result: $NCURSES_MMASK_T" >&5
10358 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10359
10360 ###   use option --with-ccharw-max to override CCHARW_MAX size
10361 echo "$as_me:10361: checking for size CCHARW_MAX" >&5
10362 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10363
10364 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10365 if test "${with_ccharw_max+set}" = set; then
10366   withval="$with_ccharw_max"
10367   NCURSES_CCHARW_MAX="$withval"
10368 else
10369   NCURSES_CCHARW_MAX=5
10370 fi;
10371 echo "$as_me:10371: result: $NCURSES_CCHARW_MAX" >&5
10372 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10373
10374 ###   use option --with-tparm-arg to override tparm's argument type
10375 echo "$as_me:10375: checking for type of tparm args" >&5
10376 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10377
10378 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10379 if test "${with_tparm_arg+set}" = set; then
10380   withval="$with_tparm_arg"
10381   NCURSES_TPARM_ARG="$withval"
10382 else
10383   NCURSES_TPARM_ARG=long
10384 fi;
10385 echo "$as_me:10385: result: $NCURSES_TPARM_ARG" >&5
10386 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10387
10388 ### Enable compiling-in rcs id's
10389 echo "$as_me:10389: checking if RCS identifiers should be compiled-in" >&5
10390 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10391
10392 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10393 if test "${with_rcs_ids+set}" = set; then
10394   withval="$with_rcs_ids"
10395   with_rcs_ids=$withval
10396 else
10397   with_rcs_ids=no
10398 fi;
10399 echo "$as_me:10399: result: $with_rcs_ids" >&5
10400 echo "${ECHO_T}$with_rcs_ids" >&6
10401 test "x$with_rcs_ids" = xyes &&
10402 cat >>confdefs.h <<\EOF
10403 #define USE_RCS_IDS 1
10404 EOF
10405
10406 ###############################################################################
10407
10408 echo "$as_me:10408: checking format of man-pages" >&5
10409 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10410
10411 # Check whether --with-manpage-format or --without-manpage-format was given.
10412 if test "${with_manpage_format+set}" = set; then
10413   withval="$with_manpage_format"
10414   MANPAGE_FORMAT=$withval
10415 else
10416   MANPAGE_FORMAT=unknown
10417 fi;
10418
10419 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10420 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10421
10422 cf_unknown=
10423
10424 case $MANPAGE_FORMAT in
10425 unknown)
10426   if test -z "$MANPATH" ; then
10427     MANPATH="/usr/man:/usr/share/man"
10428   fi
10429
10430   # look for the 'date' man-page (it's most likely to be installed!)
10431   MANPAGE_FORMAT=
10432   cf_preform=no
10433   cf_catonly=yes
10434   cf_example=date
10435
10436   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10437   for cf_dir in $MANPATH; do
10438     test -z "$cf_dir" && cf_dir=/usr/man
10439     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
10440     do
10441       cf_test=`echo $cf_name | sed -e 's/*//'`
10442       if test "x$cf_test" = "x$cf_name" ; then
10443
10444         case "$cf_name" in
10445         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10446         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10447         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10448         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10449         esac
10450
10451         case "$cf_name" in
10452         $cf_dir/man*)
10453           cf_catonly=no
10454           ;;
10455         $cf_dir/cat*)
10456           cf_preform=yes
10457           ;;
10458         esac
10459         break
10460       fi
10461
10462       # if we found a match in either man* or cat*, stop looking
10463       if test -n "$MANPAGE_FORMAT" ; then
10464         cf_found=no
10465         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10466         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10467         case "$cf_name" in
10468         $cf_dir/cat*)
10469           cf_found=yes
10470           ;;
10471         esac
10472         test $cf_found=yes && break
10473       fi
10474     done
10475     # only check the first directory in $MANPATH where we find manpages
10476     if test -n "$MANPAGE_FORMAT" ; then
10477        break
10478     fi
10479   done
10480   # if we did not find the example, just assume it is normal
10481   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10482   IFS="$ac_save_ifs"
10483   ;;
10484 *)
10485   for cf_option in $MANPAGE_FORMAT; do
10486      case $cf_option in #(vi
10487      gzip|compress|BSDI|normal|formatted|catonly)
10488        ;;
10489      *)
10490        cf_unknown="$cf_unknown $cf_option"
10491        ;;
10492      esac
10493   done
10494   ;;
10495 esac
10496
10497 echo "$as_me:10497: result: $MANPAGE_FORMAT" >&5
10498 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10499 if test -n "$cf_unknown" ; then
10500   { echo "$as_me:10500: WARNING: Unexpected manpage-format $cf_unknown" >&5
10501 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10502 fi
10503
10504 echo "$as_me:10504: checking for manpage renaming" >&5
10505 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10506
10507 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10508 if test "${with_manpage_renames+set}" = set; then
10509   withval="$with_manpage_renames"
10510   MANPAGE_RENAMES=$withval
10511 else
10512   MANPAGE_RENAMES=yes
10513 fi;
10514
10515 case ".$MANPAGE_RENAMES" in #(vi
10516 .no) #(vi
10517   ;;
10518 .|.yes)
10519   # Debian 'man' program?
10520   if test -f /etc/debian_version ; then
10521     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10522   else
10523     MANPAGE_RENAMES=no
10524   fi
10525   ;;
10526 esac
10527
10528 if test "$MANPAGE_RENAMES" != no ; then
10529   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10530     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10531   elif test ! -f $MANPAGE_RENAMES ; then
10532     { { echo "$as_me:10532: error: not a filename: $MANPAGE_RENAMES" >&5
10533 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10534    { (exit 1); exit 1; }; }
10535   fi
10536
10537   test ! -d man && mkdir man
10538
10539   # Construct a sed-script to perform renaming within man-pages
10540   if test -n "$MANPAGE_RENAMES" ; then
10541     test ! -d man && mkdir man
10542     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10543   fi
10544 fi
10545
10546 echo "$as_me:10546: result: $MANPAGE_RENAMES" >&5
10547 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10548
10549 echo "$as_me:10549: checking if manpage aliases will be installed" >&5
10550 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10551
10552 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10553 if test "${with_manpage_aliases+set}" = set; then
10554   withval="$with_manpage_aliases"
10555   MANPAGE_ALIASES=$withval
10556 else
10557   MANPAGE_ALIASES=yes
10558 fi;
10559
10560 echo "$as_me:10560: result: $MANPAGE_ALIASES" >&5
10561 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10562
10563 case "x$LN_S" in #(vi
10564 xln*) #(vi
10565         cf_use_symlinks=yes
10566         ;;
10567 *)
10568         cf_use_symlinks=no
10569         ;;
10570 esac
10571
10572 MANPAGE_SYMLINKS=no
10573 if test "$MANPAGE_ALIASES" = yes ; then
10574 echo "$as_me:10574: checking if manpage symlinks should be used" >&5
10575 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10576
10577 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10578 if test "${with_manpage_symlinks+set}" = set; then
10579   withval="$with_manpage_symlinks"
10580   MANPAGE_SYMLINKS=$withval
10581 else
10582   MANPAGE_SYMLINKS=$cf_use_symlinks
10583 fi;
10584
10585 if test "$$cf_use_symlinks" = no; then
10586 if test "$MANPAGE_SYMLINKS" = yes ; then
10587         { echo "$as_me:10587: WARNING: cannot make symlinks" >&5
10588 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10589         MANPAGE_SYMLINKS=no
10590 fi
10591 fi
10592
10593 echo "$as_me:10593: result: $MANPAGE_SYMLINKS" >&5
10594 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10595 fi
10596
10597 echo "$as_me:10597: checking for manpage tbl" >&5
10598 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10599
10600 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10601 if test "${with_manpage_tbl+set}" = set; then
10602   withval="$with_manpage_tbl"
10603   MANPAGE_TBL=$withval
10604 else
10605   MANPAGE_TBL=no
10606 fi;
10607
10608 echo "$as_me:10608: result: $MANPAGE_TBL" >&5
10609 echo "${ECHO_T}$MANPAGE_TBL" >&6
10610
10611   if test "$prefix" = "NONE" ; then
10612      cf_prefix="$ac_default_prefix"
10613   else
10614      cf_prefix="$prefix"
10615   fi
10616
10617   case "$MANPAGE_FORMAT" in # (vi
10618   *catonly*) # (vi
10619     cf_format=yes
10620     cf_inboth=no
10621     ;;
10622   *formatted*) # (vi
10623     cf_format=yes
10624     cf_inboth=yes
10625     ;;
10626   *)
10627     cf_format=no
10628     cf_inboth=no
10629     ;;
10630   esac
10631
10632 test ! -d man && mkdir man
10633
10634 cf_so_strip=
10635 cf_compress=
10636 case "$MANPAGE_FORMAT" in #(vi
10637 *compress*) #(vi
10638         cf_so_strip="Z"
10639         cf_compress=compress
10640   ;;
10641 *gzip*)
10642         cf_so_strip="gz"
10643         cf_compress=gzip
10644   ;;
10645 esac
10646
10647 cf_edit_man=./edit_man.sh
10648 cf_man_alias=`pwd`/man_alias.sed
10649
10650 cat >$cf_edit_man <<CF_EOF
10651 #! /bin/sh
10652 # this script is generated by the configure-script CF_MAN_PAGES macro.
10653
10654 prefix="$cf_prefix"
10655 datarootdir="$datarootdir"
10656 datadir="$datadir"
10657
10658 NCURSES_MAJOR="$NCURSES_MAJOR"
10659 NCURSES_MINOR="$NCURSES_MINOR"
10660 NCURSES_PATCH="$NCURSES_PATCH"
10661
10662 NCURSES_OSPEED="$NCURSES_OSPEED"
10663 TERMINFO="$TERMINFO"
10664
10665 INSTALL="$INSTALL"
10666 INSTALL_DATA="$INSTALL_DATA"
10667
10668 transform="$program_transform_name"
10669
10670 TMP=\${TMPDIR:=/tmp}/man\$\$
10671 trap "rm -f \$TMP" 0 1 2 5 15
10672
10673 form=\$1
10674 shift || exit 1
10675
10676 verb=\$1
10677 shift || exit 1
10678
10679 mandir=\$1
10680 shift || exit 1
10681
10682 srcdir=\$1
10683 top_srcdir=\$srcdir/..
10684 shift || exit 1
10685
10686 if test "\$form" = normal ; then
10687         if test "$cf_format" = yes ; then
10688         if test "$cf_inboth" = no ; then
10689                 sh \$0 format \$verb \$mandir \$srcdir \$*
10690                 exit $?
10691         fi
10692         fi
10693         cf_subdir=\$mandir/man
10694         cf_tables=$MANPAGE_TBL
10695 else
10696         cf_subdir=\$mandir/cat
10697         cf_tables=yes
10698 fi
10699
10700 # process the list of source-files
10701 for i in \$* ; do
10702 case \$i in #(vi
10703 *.orig|*.rej) ;; #(vi
10704 *.[0-9]*)
10705         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10706         if test \$verb = installing ; then
10707         if test ! -d \$cf_subdir\${section} ; then
10708                 mkdir -p \$cf_subdir\$section
10709         fi
10710         fi
10711
10712         # replace variables in man page
10713         if test ! -f $cf_man_alias ; then
10714 cat >>$cf_man_alias <<-CF_EOF2
10715                 s,@DATADIR@,\$datadir,g
10716                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
10717                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
10718                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
10719                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
10720                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
10721                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
10722 CF_EOF
10723
10724         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10725         do
10726                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10727                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10728 cat >>$cf_edit_man <<-CF_EOF
10729                 s,@$cf_NAME@,$cf_name,g
10730 CF_EOF
10731         done
10732
10733 cat >>$cf_edit_man <<CF_EOF
10734 CF_EOF2
10735                 echo "...made $cf_man_alias"
10736         fi
10737
10738         aliases=
10739         cf_source=\`basename \$i\`
10740         inalias=\$cf_source
10741         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10742         if test ! -f \$inalias ; then
10743                 echo .. skipped \$cf_source
10744                 continue
10745         fi
10746 CF_EOF
10747
10748 if test "$MANPAGE_ALIASES" != no ; then
10749 cat >>$cf_edit_man <<CF_EOF
10750         nCurses=ignore.3x
10751         test $with_curses_h = yes && nCurses=ncurses.3x
10752         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10753 CF_EOF
10754 fi
10755
10756 if test "$MANPAGE_RENAMES" = no ; then
10757 cat >>$cf_edit_man <<CF_EOF
10758         # perform program transformations for section 1 man pages
10759         if test \$section = 1 ; then
10760                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10761         else
10762                 cf_target=\$cf_subdir\${section}/\$cf_source
10763         fi
10764 CF_EOF
10765 else
10766 cat >>$cf_edit_man <<CF_EOF
10767         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10768         if test -z "\$cf_target" ; then
10769                 echo '? missing rename for '\$cf_source
10770                 cf_target="\$cf_source"
10771         fi
10772         cf_target="\$cf_subdir\${section}/\${cf_target}"
10773
10774 CF_EOF
10775 fi
10776
10777 cat >>$cf_edit_man <<CF_EOF
10778         sed     -f $cf_man_alias \\
10779 CF_EOF
10780
10781 if test -f $MANPAGE_RENAMES ; then
10782 cat >>$cf_edit_man <<CF_EOF
10783                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10784 CF_EOF
10785 else
10786 cat >>$cf_edit_man <<CF_EOF
10787                 < \$i >\$TMP
10788 CF_EOF
10789 fi
10790
10791 cat >>$cf_edit_man <<CF_EOF
10792 if test \$cf_tables = yes ; then
10793         tbl \$TMP >\$TMP.out
10794         mv \$TMP.out \$TMP
10795 fi
10796 CF_EOF
10797
10798 if test $with_overwrite != yes ; then
10799 cat >>$cf_edit_man <<CF_EOF
10800         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10801         mv \$TMP.out \$TMP
10802 CF_EOF
10803 fi
10804
10805 if test $with_curses_h != yes ; then
10806 cat >>$cf_edit_man <<CF_EOF
10807         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10808         mv \$TMP.out \$TMP
10809 CF_EOF
10810 fi
10811
10812 cat >>$cf_edit_man <<CF_EOF
10813         if test \$form = format ; then
10814                 nroff -man \$TMP >\$TMP.out
10815                 mv \$TMP.out \$TMP
10816         fi
10817 CF_EOF
10818
10819 if test -n "$cf_compress" ; then
10820 cat >>$cf_edit_man <<CF_EOF
10821         if test \$verb = installing ; then
10822         if ( $cf_compress -f \$TMP )
10823         then
10824                 mv \$TMP.$cf_so_strip \$TMP
10825         fi
10826         fi
10827         cf_target="\$cf_target.$cf_so_strip"
10828 CF_EOF
10829 fi
10830
10831 case "$MANPAGE_FORMAT" in #(vi
10832 *BSDI*)
10833 cat >>$cf_edit_man <<CF_EOF
10834         if test \$form = format ; then
10835                 # BSDI installs only .0 suffixes in the cat directories
10836                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10837         fi
10838 CF_EOF
10839   ;;
10840 esac
10841
10842 cat >>$cf_edit_man <<CF_EOF
10843         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10844         if test \$verb = installing ; then
10845                 echo \$verb \$cf_target
10846                 \$INSTALL_DATA \$TMP \$cf_target
10847                 test -d \$cf_subdir\${section} &&
10848                 test -n "\$aliases" && (
10849                         cd \$cf_subdir\${section} && (
10850                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10851                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10852                                 cf_target=\`basename \$cf_target\`
10853                                 for cf_alias in \$aliases
10854                                 do
10855                                         if test \$section = 1 ; then
10856                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10857                                         fi
10858
10859                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10860                                                 if test -f \$cf_alias\${suffix} ; then
10861                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10862                                                         then
10863                                                                 continue
10864                                                         fi
10865                                                 fi
10866                                                 echo .. \$verb alias \$cf_alias\${suffix}
10867 CF_EOF
10868 case "x$LN_S" in #(vi
10869 *-f) #(vi
10870 cat >>$cf_edit_man <<CF_EOF
10871                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10872 CF_EOF
10873         ;;
10874 *)
10875 cat >>$cf_edit_man <<CF_EOF
10876                                                 rm -f \$cf_alias\${suffix}
10877                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10878 CF_EOF
10879         ;;
10880 esac
10881 cat >>$cf_edit_man <<CF_EOF
10882                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10883                                                 echo ".so \$cf_source" >\$TMP
10884 CF_EOF
10885 if test -n "$cf_compress" ; then
10886 cat >>$cf_edit_man <<CF_EOF
10887                                                 if test -n "$cf_so_strip" ; then
10888                                                         $cf_compress -f \$TMP
10889                                                         mv \$TMP.$cf_so_strip \$TMP
10890                                                 fi
10891 CF_EOF
10892 fi
10893 cat >>$cf_edit_man <<CF_EOF
10894                                                 echo .. \$verb alias \$cf_alias\${suffix}
10895                                                 rm -f \$cf_alias\${suffix}
10896                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10897                                         fi
10898                                 done
10899                         )
10900                 )
10901         elif test \$verb = removing ; then
10902                 test -f \$cf_target && (
10903                         echo \$verb \$cf_target
10904                         rm -f \$cf_target
10905                 )
10906                 test -d \$cf_subdir\${section} &&
10907                 test -n "\$aliases" && (
10908                         cd \$cf_subdir\${section} && (
10909                                 for cf_alias in \$aliases
10910                                 do
10911                                         if test \$section = 1 ; then
10912                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10913                                         fi
10914
10915                                         echo .. \$verb alias \$cf_alias\${suffix}
10916                                         rm -f \$cf_alias\${suffix}
10917                                 done
10918                         )
10919                 )
10920         else
10921 #               echo ".hy 0"
10922                 cat \$TMP
10923         fi
10924         ;;
10925 esac
10926 done
10927
10928 if test $cf_inboth = yes ; then
10929 if test \$form != format ; then
10930         sh \$0 format \$verb \$mandir \$srcdir \$*
10931 fi
10932 fi
10933
10934 exit 0
10935 CF_EOF
10936 chmod 755 $cf_edit_man
10937
10938 ###############################################################################
10939
10940 ### Note that some functions (such as const) are normally disabled anyway.
10941 echo "$as_me:10941: checking if you want to build with function extensions" >&5
10942 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10943
10944 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10945 if test "${enable_ext_funcs+set}" = set; then
10946   enableval="$enable_ext_funcs"
10947   with_ext_funcs=$enableval
10948 else
10949   with_ext_funcs=yes
10950 fi;
10951 echo "$as_me:10951: result: $with_ext_funcs" >&5
10952 echo "${ECHO_T}$with_ext_funcs" >&6
10953 if test "x$with_ext_funcs" = xyes ; then
10954         NCURSES_EXT_FUNCS=1
10955
10956 cat >>confdefs.h <<\EOF
10957 #define HAVE_ASSUME_DEFAULT_COLORS 1
10958 EOF
10959
10960 cat >>confdefs.h <<\EOF
10961 #define HAVE_CURSES_VERSION 1
10962 EOF
10963
10964 cat >>confdefs.h <<\EOF
10965 #define HAVE_HAS_KEY 1
10966 EOF
10967
10968 cat >>confdefs.h <<\EOF
10969 #define HAVE_RESIZETERM 1
10970 EOF
10971
10972 cat >>confdefs.h <<\EOF
10973 #define HAVE_RESIZE_TERM 1
10974 EOF
10975
10976 cat >>confdefs.h <<\EOF
10977 #define HAVE_TERM_ENTRY_H 1
10978 EOF
10979
10980 cat >>confdefs.h <<\EOF
10981 #define HAVE_USE_DEFAULT_COLORS 1
10982 EOF
10983
10984 cat >>confdefs.h <<\EOF
10985 #define HAVE_USE_SCREEN 1
10986 EOF
10987
10988 cat >>confdefs.h <<\EOF
10989 #define HAVE_USE_WINDOW 1
10990 EOF
10991
10992 cat >>confdefs.h <<\EOF
10993 #define HAVE_WRESIZE 1
10994 EOF
10995
10996 cat >>confdefs.h <<\EOF
10997 #define NCURSES_EXT_FUNCS 1
10998 EOF
10999
11000         GENERATED_EXT_FUNCS=generated
11001 else
11002         NCURSES_EXT_FUNCS=0
11003         GENERATED_EXT_FUNCS=
11004 fi
11005
11006 echo "$as_me:11006: checking if you want to build with experimental SCREEN extensions" >&5
11007 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
11008
11009 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11010 if test "${enable_sp_funcs+set}" = set; then
11011   enableval="$enable_sp_funcs"
11012   with_sp_funcs=$enableval
11013 else
11014   with_sp_funcs=no
11015 fi;
11016 echo "$as_me:11016: result: $with_sp_funcs" >&5
11017 echo "${ECHO_T}$with_sp_funcs" >&6
11018 if test "x$with_sp_funcs" = xyes ; then
11019         NCURSES_SP_FUNCS=1
11020
11021 cat >>confdefs.h <<\EOF
11022 #define NCURSES_SP_FUNCS 1
11023 EOF
11024
11025         GENERATED_SP_FUNCS=generated
11026 else
11027         NCURSES_SP_FUNCS=0
11028         GENERATED_SP_FUNCS=
11029 fi
11030
11031 echo "$as_me:11031: checking if you want to build with experimental terminal-driver" >&5
11032 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
11033
11034 # Check whether --enable-term-driver or --disable-term-driver was given.
11035 if test "${enable_term_driver+set}" = set; then
11036   enableval="$enable_term_driver"
11037   with_term_driver=$enableval
11038 else
11039   with_term_driver=no
11040 fi;
11041 echo "$as_me:11041: result: $with_term_driver" >&5
11042 echo "${ECHO_T}$with_term_driver" >&6
11043 if test "x$with_term_driver" = xyes ; then
11044
11045 cat >>confdefs.h <<\EOF
11046 #define USE_TERM_DRIVER 1
11047 EOF
11048
11049         if test "x$with_sp_funcs" != xyes ; then
11050                 { { echo "$as_me:11050: error: The term-driver option relies upon sp-funcs" >&5
11051 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11052    { (exit 1); exit 1; }; }
11053         fi
11054 fi
11055
11056 ###   use option --enable-const to turn on use of const beyond that in XSI.
11057 echo "$as_me:11057: checking for extended use of const keyword" >&5
11058 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11059
11060 # Check whether --enable-const or --disable-const was given.
11061 if test "${enable_const+set}" = set; then
11062   enableval="$enable_const"
11063   with_ext_const=$enableval
11064 else
11065   with_ext_const=no
11066 fi;
11067 echo "$as_me:11067: result: $with_ext_const" >&5
11068 echo "${ECHO_T}$with_ext_const" >&6
11069 NCURSES_CONST='/*nothing*/'
11070 if test "x$with_ext_const" = xyes ; then
11071         NCURSES_CONST=const
11072 fi
11073
11074 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11075 echo "$as_me:11075: checking if you want to use extended colors" >&5
11076 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11077
11078 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11079 if test "${enable_ext_colors+set}" = set; then
11080   enableval="$enable_ext_colors"
11081   with_ext_colors=$enableval
11082 else
11083   with_ext_colors=no
11084 fi;
11085 echo "$as_me:11085: result: $with_ext_colors" >&5
11086 echo "${ECHO_T}$with_ext_colors" >&6
11087 NCURSES_EXT_COLORS=0
11088 if test "x$with_ext_colors" = xyes ; then
11089         if test "x$with_widec" != xyes ; then
11090                 { { echo "$as_me:11090: error: This option applies only to wide-character library" >&5
11091 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11092    { (exit 1); exit 1; }; }
11093         else
11094                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11095
11096 if test "${with_abi_version+set}" != set; then
11097         case $cf_cv_rel_version in
11098         5.*)
11099                 cf_cv_rel_version=6.0
11100                 cf_cv_abi_version=6
11101                 { echo "$as_me:11101: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11102 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11103                 ;;
11104         esac
11105 fi
11106
11107         fi
11108         NCURSES_EXT_COLORS=1
11109
11110 cat >>confdefs.h <<\EOF
11111 #define NCURSES_EXT_COLORS 1
11112 EOF
11113
11114 fi
11115
11116 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11117 echo "$as_me:11117: checking if you want to use extended mouse encoding" >&5
11118 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11119
11120 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11121 if test "${enable_ext_mouse+set}" = set; then
11122   enableval="$enable_ext_mouse"
11123   with_ext_mouse=$enableval
11124 else
11125   with_ext_mouse=no
11126 fi;
11127 echo "$as_me:11127: result: $with_ext_mouse" >&5
11128 echo "${ECHO_T}$with_ext_mouse" >&6
11129 NCURSES_MOUSE_VERSION=1
11130 if test "x$with_ext_mouse" = xyes ; then
11131         NCURSES_MOUSE_VERSION=2
11132
11133 if test "${with_abi_version+set}" != set; then
11134         case $cf_cv_rel_version in
11135         5.*)
11136                 cf_cv_rel_version=6.0
11137                 cf_cv_abi_version=6
11138                 { echo "$as_me:11138: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11139 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11140                 ;;
11141         esac
11142 fi
11143
11144 fi
11145
11146 echo "$as_me:11146: checking if you want \$NCURSES_NO_PADDING code" >&5
11147 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11148
11149 # Check whether --enable-no-padding or --disable-no-padding was given.
11150 if test "${enable_no_padding+set}" = set; then
11151   enableval="$enable_no_padding"
11152   with_no_padding=$enableval
11153 else
11154   with_no_padding=$with_ext_funcs
11155 fi;
11156 echo "$as_me:11156: result: $with_no_padding" >&5
11157 echo "${ECHO_T}$with_no_padding" >&6
11158 test "x$with_no_padding" = xyes &&
11159 cat >>confdefs.h <<\EOF
11160 #define NCURSES_NO_PADDING 1
11161 EOF
11162
11163 echo "$as_me:11163: checking for ANSI C header files" >&5
11164 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11165 if test "${ac_cv_header_stdc+set}" = set; then
11166   echo $ECHO_N "(cached) $ECHO_C" >&6
11167 else
11168   cat >conftest.$ac_ext <<_ACEOF
11169 #line 11169 "configure"
11170 #include "confdefs.h"
11171 #include <stdlib.h>
11172 #include <stdarg.h>
11173 #include <string.h>
11174 #include <float.h>
11175
11176 _ACEOF
11177 if { (eval echo "$as_me:11177: \"$ac_cpp conftest.$ac_ext\"") >&5
11178   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11179   ac_status=$?
11180   egrep -v '^ *\+' conftest.er1 >conftest.err
11181   rm -f conftest.er1
11182   cat conftest.err >&5
11183   echo "$as_me:11183: \$? = $ac_status" >&5
11184   (exit $ac_status); } >/dev/null; then
11185   if test -s conftest.err; then
11186     ac_cpp_err=$ac_c_preproc_warn_flag
11187   else
11188     ac_cpp_err=
11189   fi
11190 else
11191   ac_cpp_err=yes
11192 fi
11193 if test -z "$ac_cpp_err"; then
11194   ac_cv_header_stdc=yes
11195 else
11196   echo "$as_me: failed program was:" >&5
11197   cat conftest.$ac_ext >&5
11198   ac_cv_header_stdc=no
11199 fi
11200 rm -f conftest.err conftest.$ac_ext
11201
11202 if test $ac_cv_header_stdc = yes; then
11203   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11204   cat >conftest.$ac_ext <<_ACEOF
11205 #line 11205 "configure"
11206 #include "confdefs.h"
11207 #include <string.h>
11208
11209 _ACEOF
11210 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11211   egrep "memchr" >/dev/null 2>&1; then
11212   :
11213 else
11214   ac_cv_header_stdc=no
11215 fi
11216 rm -rf conftest*
11217
11218 fi
11219
11220 if test $ac_cv_header_stdc = yes; then
11221   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11222   cat >conftest.$ac_ext <<_ACEOF
11223 #line 11223 "configure"
11224 #include "confdefs.h"
11225 #include <stdlib.h>
11226
11227 _ACEOF
11228 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11229   egrep "free" >/dev/null 2>&1; then
11230   :
11231 else
11232   ac_cv_header_stdc=no
11233 fi
11234 rm -rf conftest*
11235
11236 fi
11237
11238 if test $ac_cv_header_stdc = yes; then
11239   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11240   if test "$cross_compiling" = yes; then
11241   :
11242 else
11243   cat >conftest.$ac_ext <<_ACEOF
11244 #line 11244 "configure"
11245 #include "confdefs.h"
11246 #include <ctype.h>
11247 #if ((' ' & 0x0FF) == 0x020)
11248 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11249 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11250 #else
11251 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11252                      || ('j' <= (c) && (c) <= 'r') \
11253                      || ('s' <= (c) && (c) <= 'z'))
11254 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11255 #endif
11256
11257 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11258 int
11259 main ()
11260 {
11261   int i;
11262   for (i = 0; i < 256; i++)
11263     if (XOR (islower (i), ISLOWER (i))
11264         || toupper (i) != TOUPPER (i))
11265       $ac_main_return(2);
11266   $ac_main_return (0);
11267 }
11268 _ACEOF
11269 rm -f conftest$ac_exeext
11270 if { (eval echo "$as_me:11270: \"$ac_link\"") >&5
11271   (eval $ac_link) 2>&5
11272   ac_status=$?
11273   echo "$as_me:11273: \$? = $ac_status" >&5
11274   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11275   { (eval echo "$as_me:11275: \"$ac_try\"") >&5
11276   (eval $ac_try) 2>&5
11277   ac_status=$?
11278   echo "$as_me:11278: \$? = $ac_status" >&5
11279   (exit $ac_status); }; }; then
11280   :
11281 else
11282   echo "$as_me: program exited with status $ac_status" >&5
11283 echo "$as_me: failed program was:" >&5
11284 cat conftest.$ac_ext >&5
11285 ac_cv_header_stdc=no
11286 fi
11287 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11288 fi
11289 fi
11290 fi
11291 echo "$as_me:11291: result: $ac_cv_header_stdc" >&5
11292 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11293 if test $ac_cv_header_stdc = yes; then
11294
11295 cat >>confdefs.h <<\EOF
11296 #define STDC_HEADERS 1
11297 EOF
11298
11299 fi
11300
11301 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11302
11303 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11304                   inttypes.h stdint.h unistd.h
11305 do
11306 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11307 echo "$as_me:11307: checking for $ac_header" >&5
11308 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11309 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11310   echo $ECHO_N "(cached) $ECHO_C" >&6
11311 else
11312   cat >conftest.$ac_ext <<_ACEOF
11313 #line 11313 "configure"
11314 #include "confdefs.h"
11315 $ac_includes_default
11316 #include <$ac_header>
11317 _ACEOF
11318 rm -f conftest.$ac_objext
11319 if { (eval echo "$as_me:11319: \"$ac_compile\"") >&5
11320   (eval $ac_compile) 2>&5
11321   ac_status=$?
11322   echo "$as_me:11322: \$? = $ac_status" >&5
11323   (exit $ac_status); } &&
11324          { ac_try='test -s conftest.$ac_objext'
11325   { (eval echo "$as_me:11325: \"$ac_try\"") >&5
11326   (eval $ac_try) 2>&5
11327   ac_status=$?
11328   echo "$as_me:11328: \$? = $ac_status" >&5
11329   (exit $ac_status); }; }; then
11330   eval "$as_ac_Header=yes"
11331 else
11332   echo "$as_me: failed program was:" >&5
11333 cat conftest.$ac_ext >&5
11334 eval "$as_ac_Header=no"
11335 fi
11336 rm -f conftest.$ac_objext conftest.$ac_ext
11337 fi
11338 echo "$as_me:11338: result: `eval echo '${'$as_ac_Header'}'`" >&5
11339 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11340 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11341   cat >>confdefs.h <<EOF
11342 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11343 EOF
11344
11345 fi
11346 done
11347
11348 echo "$as_me:11348: checking for signed char" >&5
11349 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11350 if test "${ac_cv_type_signed_char+set}" = set; then
11351   echo $ECHO_N "(cached) $ECHO_C" >&6
11352 else
11353   cat >conftest.$ac_ext <<_ACEOF
11354 #line 11354 "configure"
11355 #include "confdefs.h"
11356 $ac_includes_default
11357 int
11358 main ()
11359 {
11360 if ((signed char *) 0)
11361   return 0;
11362 if (sizeof (signed char))
11363   return 0;
11364   ;
11365   return 0;
11366 }
11367 _ACEOF
11368 rm -f conftest.$ac_objext
11369 if { (eval echo "$as_me:11369: \"$ac_compile\"") >&5
11370   (eval $ac_compile) 2>&5
11371   ac_status=$?
11372   echo "$as_me:11372: \$? = $ac_status" >&5
11373   (exit $ac_status); } &&
11374          { ac_try='test -s conftest.$ac_objext'
11375   { (eval echo "$as_me:11375: \"$ac_try\"") >&5
11376   (eval $ac_try) 2>&5
11377   ac_status=$?
11378   echo "$as_me:11378: \$? = $ac_status" >&5
11379   (exit $ac_status); }; }; then
11380   ac_cv_type_signed_char=yes
11381 else
11382   echo "$as_me: failed program was:" >&5
11383 cat conftest.$ac_ext >&5
11384 ac_cv_type_signed_char=no
11385 fi
11386 rm -f conftest.$ac_objext conftest.$ac_ext
11387 fi
11388 echo "$as_me:11388: result: $ac_cv_type_signed_char" >&5
11389 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11390
11391 echo "$as_me:11391: checking size of signed char" >&5
11392 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11393 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11394   echo $ECHO_N "(cached) $ECHO_C" >&6
11395 else
11396   if test "$ac_cv_type_signed_char" = yes; then
11397   if test "$cross_compiling" = yes; then
11398   # Depending upon the size, compute the lo and hi bounds.
11399 cat >conftest.$ac_ext <<_ACEOF
11400 #line 11400 "configure"
11401 #include "confdefs.h"
11402 $ac_includes_default
11403 int
11404 main ()
11405 {
11406 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11407   ;
11408   return 0;
11409 }
11410 _ACEOF
11411 rm -f conftest.$ac_objext
11412 if { (eval echo "$as_me:11412: \"$ac_compile\"") >&5
11413   (eval $ac_compile) 2>&5
11414   ac_status=$?
11415   echo "$as_me:11415: \$? = $ac_status" >&5
11416   (exit $ac_status); } &&
11417          { ac_try='test -s conftest.$ac_objext'
11418   { (eval echo "$as_me:11418: \"$ac_try\"") >&5
11419   (eval $ac_try) 2>&5
11420   ac_status=$?
11421   echo "$as_me:11421: \$? = $ac_status" >&5
11422   (exit $ac_status); }; }; then
11423   ac_lo=0 ac_mid=0
11424   while :; do
11425     cat >conftest.$ac_ext <<_ACEOF
11426 #line 11426 "configure"
11427 #include "confdefs.h"
11428 $ac_includes_default
11429 int
11430 main ()
11431 {
11432 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11433   ;
11434   return 0;
11435 }
11436 _ACEOF
11437 rm -f conftest.$ac_objext
11438 if { (eval echo "$as_me:11438: \"$ac_compile\"") >&5
11439   (eval $ac_compile) 2>&5
11440   ac_status=$?
11441   echo "$as_me:11441: \$? = $ac_status" >&5
11442   (exit $ac_status); } &&
11443          { ac_try='test -s conftest.$ac_objext'
11444   { (eval echo "$as_me:11444: \"$ac_try\"") >&5
11445   (eval $ac_try) 2>&5
11446   ac_status=$?
11447   echo "$as_me:11447: \$? = $ac_status" >&5
11448   (exit $ac_status); }; }; then
11449   ac_hi=$ac_mid; break
11450 else
11451   echo "$as_me: failed program was:" >&5
11452 cat conftest.$ac_ext >&5
11453 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11454 fi
11455 rm -f conftest.$ac_objext conftest.$ac_ext
11456   done
11457 else
11458   echo "$as_me: failed program was:" >&5
11459 cat conftest.$ac_ext >&5
11460 ac_hi=-1 ac_mid=-1
11461   while :; do
11462     cat >conftest.$ac_ext <<_ACEOF
11463 #line 11463 "configure"
11464 #include "confdefs.h"
11465 $ac_includes_default
11466 int
11467 main ()
11468 {
11469 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11470   ;
11471   return 0;
11472 }
11473 _ACEOF
11474 rm -f conftest.$ac_objext
11475 if { (eval echo "$as_me:11475: \"$ac_compile\"") >&5
11476   (eval $ac_compile) 2>&5
11477   ac_status=$?
11478   echo "$as_me:11478: \$? = $ac_status" >&5
11479   (exit $ac_status); } &&
11480          { ac_try='test -s conftest.$ac_objext'
11481   { (eval echo "$as_me:11481: \"$ac_try\"") >&5
11482   (eval $ac_try) 2>&5
11483   ac_status=$?
11484   echo "$as_me:11484: \$? = $ac_status" >&5
11485   (exit $ac_status); }; }; then
11486   ac_lo=$ac_mid; break
11487 else
11488   echo "$as_me: failed program was:" >&5
11489 cat conftest.$ac_ext >&5
11490 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11491 fi
11492 rm -f conftest.$ac_objext conftest.$ac_ext
11493   done
11494 fi
11495 rm -f conftest.$ac_objext conftest.$ac_ext
11496 # Binary search between lo and hi bounds.
11497 while test "x$ac_lo" != "x$ac_hi"; do
11498   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11499   cat >conftest.$ac_ext <<_ACEOF
11500 #line 11500 "configure"
11501 #include "confdefs.h"
11502 $ac_includes_default
11503 int
11504 main ()
11505 {
11506 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11507   ;
11508   return 0;
11509 }
11510 _ACEOF
11511 rm -f conftest.$ac_objext
11512 if { (eval echo "$as_me:11512: \"$ac_compile\"") >&5
11513   (eval $ac_compile) 2>&5
11514   ac_status=$?
11515   echo "$as_me:11515: \$? = $ac_status" >&5
11516   (exit $ac_status); } &&
11517          { ac_try='test -s conftest.$ac_objext'
11518   { (eval echo "$as_me:11518: \"$ac_try\"") >&5
11519   (eval $ac_try) 2>&5
11520   ac_status=$?
11521   echo "$as_me:11521: \$? = $ac_status" >&5
11522   (exit $ac_status); }; }; then
11523   ac_hi=$ac_mid
11524 else
11525   echo "$as_me: failed program was:" >&5
11526 cat conftest.$ac_ext >&5
11527 ac_lo=`expr $ac_mid + 1`
11528 fi
11529 rm -f conftest.$ac_objext conftest.$ac_ext
11530 done
11531 ac_cv_sizeof_signed_char=$ac_lo
11532 else
11533   if test "$cross_compiling" = yes; then
11534   { { echo "$as_me:11534: error: cannot run test program while cross compiling" >&5
11535 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11536    { (exit 1); exit 1; }; }
11537 else
11538   cat >conftest.$ac_ext <<_ACEOF
11539 #line 11539 "configure"
11540 #include "confdefs.h"
11541 $ac_includes_default
11542 int
11543 main ()
11544 {
11545 FILE *f = fopen ("conftest.val", "w");
11546 if (!f)
11547   $ac_main_return (1);
11548 fprintf (f, "%d", (sizeof (signed char)));
11549 fclose (f);
11550   ;
11551   return 0;
11552 }
11553 _ACEOF
11554 rm -f conftest$ac_exeext
11555 if { (eval echo "$as_me:11555: \"$ac_link\"") >&5
11556   (eval $ac_link) 2>&5
11557   ac_status=$?
11558   echo "$as_me:11558: \$? = $ac_status" >&5
11559   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11560   { (eval echo "$as_me:11560: \"$ac_try\"") >&5
11561   (eval $ac_try) 2>&5
11562   ac_status=$?
11563   echo "$as_me:11563: \$? = $ac_status" >&5
11564   (exit $ac_status); }; }; then
11565   ac_cv_sizeof_signed_char=`cat conftest.val`
11566 else
11567   echo "$as_me: program exited with status $ac_status" >&5
11568 echo "$as_me: failed program was:" >&5
11569 cat conftest.$ac_ext >&5
11570 fi
11571 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11572 fi
11573 fi
11574 rm -f conftest.val
11575 else
11576   ac_cv_sizeof_signed_char=0
11577 fi
11578 fi
11579 echo "$as_me:11579: result: $ac_cv_sizeof_signed_char" >&5
11580 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11581 cat >>confdefs.h <<EOF
11582 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11583 EOF
11584
11585 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11586         NCURSES_SBOOL="signed char"
11587 else
11588         NCURSES_SBOOL="char"
11589 fi
11590 echo "$as_me:11590: checking if you want to use signed Boolean array in term.h" >&5
11591 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11592
11593 # Check whether --enable-signed-char or --disable-signed-char was given.
11594 if test "${enable_signed_char+set}" = set; then
11595   enableval="$enable_signed_char"
11596   with_signed_char=$enableval
11597 else
11598   with_signed_char=no
11599 fi;
11600 echo "$as_me:11600: result: $with_signed_char" >&5
11601 echo "${ECHO_T}$with_signed_char" >&6
11602 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11603
11604 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11605 echo "$as_me:11605: checking if you want SIGWINCH handler" >&5
11606 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11607
11608 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11609 if test "${enable_sigwinch+set}" = set; then
11610   enableval="$enable_sigwinch"
11611   with_sigwinch=$enableval
11612 else
11613   with_sigwinch=$with_ext_funcs
11614 fi;
11615 echo "$as_me:11615: result: $with_sigwinch" >&5
11616 echo "${ECHO_T}$with_sigwinch" >&6
11617 test "x$with_sigwinch" = xyes &&
11618 cat >>confdefs.h <<\EOF
11619 #define USE_SIGWINCH 1
11620 EOF
11621
11622 ###   use option --enable-tcap-names to allow user to define new capabilities
11623 echo "$as_me:11623: checking if you want user-definable terminal capabilities like termcap" >&5
11624 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11625
11626 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11627 if test "${enable_tcap_names+set}" = set; then
11628   enableval="$enable_tcap_names"
11629   with_tcap_names=$enableval
11630 else
11631   with_tcap_names=$with_ext_funcs
11632 fi;
11633 echo "$as_me:11633: result: $with_tcap_names" >&5
11634 echo "${ECHO_T}$with_tcap_names" >&6
11635 NCURSES_XNAMES=0
11636 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
11637
11638 ###############################################################################
11639 # These options are relatively safe to experiment with.
11640
11641 echo "$as_me:11641: checking if you want all development code" >&5
11642 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11643
11644 # Check whether --with-develop or --without-develop was given.
11645 if test "${with_develop+set}" = set; then
11646   withval="$with_develop"
11647   with_develop=$withval
11648 else
11649   with_develop=no
11650 fi;
11651 echo "$as_me:11651: result: $with_develop" >&5
11652 echo "${ECHO_T}$with_develop" >&6
11653
11654 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11655 echo "$as_me:11655: checking if you want hard-tabs code" >&5
11656 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11657
11658 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11659 if test "${enable_hard_tabs+set}" = set; then
11660   enableval="$enable_hard_tabs"
11661
11662 else
11663   enable_hard_tabs=$with_develop
11664 fi;
11665 echo "$as_me:11665: result: $enable_hard_tabs" >&5
11666 echo "${ECHO_T}$enable_hard_tabs" >&6
11667 test "x$enable_hard_tabs" = xyes &&
11668 cat >>confdefs.h <<\EOF
11669 #define USE_HARD_TABS 1
11670 EOF
11671
11672 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11673 echo "$as_me:11673: checking if you want limited support for xmc" >&5
11674 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11675
11676 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11677 if test "${enable_xmc_glitch+set}" = set; then
11678   enableval="$enable_xmc_glitch"
11679
11680 else
11681   enable_xmc_glitch=$with_develop
11682 fi;
11683 echo "$as_me:11683: result: $enable_xmc_glitch" >&5
11684 echo "${ECHO_T}$enable_xmc_glitch" >&6
11685 test "x$enable_xmc_glitch" = xyes &&
11686 cat >>confdefs.h <<\EOF
11687 #define USE_XMC_SUPPORT 1
11688 EOF
11689
11690 ###############################################################################
11691 # These are just experimental, probably should not be in a package:
11692
11693 echo "$as_me:11693: checking if you do not want to assume colors are white-on-black" >&5
11694 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11695
11696 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11697 if test "${enable_assumed_color+set}" = set; then
11698   enableval="$enable_assumed_color"
11699   with_assumed_color=$enableval
11700 else
11701   with_assumed_color=yes
11702 fi;
11703 echo "$as_me:11703: result: $with_assumed_color" >&5
11704 echo "${ECHO_T}$with_assumed_color" >&6
11705 test "x$with_assumed_color" = xyes &&
11706 cat >>confdefs.h <<\EOF
11707 #define USE_ASSUMED_COLOR 1
11708 EOF
11709
11710 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11711 echo "$as_me:11711: checking if you want hashmap scrolling-optimization code" >&5
11712 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11713
11714 # Check whether --enable-hashmap or --disable-hashmap was given.
11715 if test "${enable_hashmap+set}" = set; then
11716   enableval="$enable_hashmap"
11717   with_hashmap=$enableval
11718 else
11719   with_hashmap=yes
11720 fi;
11721 echo "$as_me:11721: result: $with_hashmap" >&5
11722 echo "${ECHO_T}$with_hashmap" >&6
11723 test "x$with_hashmap" = xyes &&
11724 cat >>confdefs.h <<\EOF
11725 #define USE_HASHMAP 1
11726 EOF
11727
11728 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11729 echo "$as_me:11729: checking if you want colorfgbg code" >&5
11730 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11731
11732 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11733 if test "${enable_colorfgbg+set}" = set; then
11734   enableval="$enable_colorfgbg"
11735   with_colorfgbg=$enableval
11736 else
11737   with_colorfgbg=no
11738 fi;
11739 echo "$as_me:11739: result: $with_colorfgbg" >&5
11740 echo "${ECHO_T}$with_colorfgbg" >&6
11741 test "x$with_colorfgbg" = xyes &&
11742 cat >>confdefs.h <<\EOF
11743 #define USE_COLORFGBG 1
11744 EOF
11745
11746 ###   use option --enable-interop to turn on use of bindings used for interop
11747 echo "$as_me:11747: checking if you want interop bindings" >&5
11748 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11749
11750 # Check whether --enable-interop or --disable-interop was given.
11751 if test "${enable_interop+set}" = set; then
11752   enableval="$enable_interop"
11753   with_exp_interop=$enableval
11754 else
11755   with_exp_interop=no
11756 fi;
11757 echo "$as_me:11757: result: $with_exp_interop" >&5
11758 echo "${ECHO_T}$with_exp_interop" >&6
11759
11760 NCURSES_INTEROP_FUNCS=0
11761 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
11762
11763 # This is still experimental (20080329), but should ultimately be moved to
11764 # the script-block --with-normal, etc.
11765
11766 echo "$as_me:11766: checking if you want to link with the pthread library" >&5
11767 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11768
11769 # Check whether --with-pthread or --without-pthread was given.
11770 if test "${with_pthread+set}" = set; then
11771   withval="$with_pthread"
11772   with_pthread=$withval
11773 else
11774   with_pthread=no
11775 fi;
11776 echo "$as_me:11776: result: $with_pthread" >&5
11777 echo "${ECHO_T}$with_pthread" >&6
11778
11779 if test "$with_pthread" != no ; then
11780     echo "$as_me:11780: checking for pthread.h" >&5
11781 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11782 if test "${ac_cv_header_pthread_h+set}" = set; then
11783   echo $ECHO_N "(cached) $ECHO_C" >&6
11784 else
11785   cat >conftest.$ac_ext <<_ACEOF
11786 #line 11786 "configure"
11787 #include "confdefs.h"
11788 #include <pthread.h>
11789 _ACEOF
11790 if { (eval echo "$as_me:11790: \"$ac_cpp conftest.$ac_ext\"") >&5
11791   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11792   ac_status=$?
11793   egrep -v '^ *\+' conftest.er1 >conftest.err
11794   rm -f conftest.er1
11795   cat conftest.err >&5
11796   echo "$as_me:11796: \$? = $ac_status" >&5
11797   (exit $ac_status); } >/dev/null; then
11798   if test -s conftest.err; then
11799     ac_cpp_err=$ac_c_preproc_warn_flag
11800   else
11801     ac_cpp_err=
11802   fi
11803 else
11804   ac_cpp_err=yes
11805 fi
11806 if test -z "$ac_cpp_err"; then
11807   ac_cv_header_pthread_h=yes
11808 else
11809   echo "$as_me: failed program was:" >&5
11810   cat conftest.$ac_ext >&5
11811   ac_cv_header_pthread_h=no
11812 fi
11813 rm -f conftest.err conftest.$ac_ext
11814 fi
11815 echo "$as_me:11815: result: $ac_cv_header_pthread_h" >&5
11816 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11817 if test $ac_cv_header_pthread_h = yes; then
11818
11819 cat >>confdefs.h <<\EOF
11820 #define HAVE_PTHREADS_H 1
11821 EOF
11822
11823         for cf_lib_pthread in pthread c_r
11824         do
11825             echo "$as_me:11825: checking if we can link with the $cf_lib_pthread library" >&5
11826 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11827             cf_save_LIBS="$LIBS"
11828             LIBS="-l$cf_lib_pthread $LIBS"
11829             cat >conftest.$ac_ext <<_ACEOF
11830 #line 11830 "configure"
11831 #include "confdefs.h"
11832
11833 #include <pthread.h>
11834
11835 int
11836 main ()
11837 {
11838
11839                 int rc = pthread_create(0,0,0,0);
11840                 int r2 = pthread_mutexattr_settype(0, 0);
11841
11842   ;
11843   return 0;
11844 }
11845 _ACEOF
11846 rm -f conftest.$ac_objext conftest$ac_exeext
11847 if { (eval echo "$as_me:11847: \"$ac_link\"") >&5
11848   (eval $ac_link) 2>&5
11849   ac_status=$?
11850   echo "$as_me:11850: \$? = $ac_status" >&5
11851   (exit $ac_status); } &&
11852          { ac_try='test -s conftest$ac_exeext'
11853   { (eval echo "$as_me:11853: \"$ac_try\"") >&5
11854   (eval $ac_try) 2>&5
11855   ac_status=$?
11856   echo "$as_me:11856: \$? = $ac_status" >&5
11857   (exit $ac_status); }; }; then
11858   with_pthread=yes
11859 else
11860   echo "$as_me: failed program was:" >&5
11861 cat conftest.$ac_ext >&5
11862 with_pthread=no
11863 fi
11864 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11865             LIBS="$cf_save_LIBS"
11866             echo "$as_me:11866: result: $with_pthread" >&5
11867 echo "${ECHO_T}$with_pthread" >&6
11868             test "$with_pthread" = yes && break
11869         done
11870
11871         if test "$with_pthread" = yes ; then
11872             LIBS="-l$cf_lib_pthread $LIBS"
11873
11874 cat >>confdefs.h <<\EOF
11875 #define HAVE_LIBPTHREADS 1
11876 EOF
11877
11878         else
11879             { { echo "$as_me:11879: error: Cannot link with pthread library" >&5
11880 echo "$as_me: error: Cannot link with pthread library" >&2;}
11881    { (exit 1); exit 1; }; }
11882         fi
11883
11884 fi
11885
11886 fi
11887
11888 if test "x$with_pthread" != xno; then
11889         echo "$as_me:11889: checking for pthread_kill" >&5
11890 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11891 if test "${ac_cv_func_pthread_kill+set}" = set; then
11892   echo $ECHO_N "(cached) $ECHO_C" >&6
11893 else
11894   cat >conftest.$ac_ext <<_ACEOF
11895 #line 11895 "configure"
11896 #include "confdefs.h"
11897 /* System header to define __stub macros and hopefully few prototypes,
11898     which can conflict with char pthread_kill (); below.  */
11899 #include <assert.h>
11900 /* Override any gcc2 internal prototype to avoid an error.  */
11901 #ifdef __cplusplus
11902 extern "C"
11903 #endif
11904 /* We use char because int might match the return type of a gcc2
11905    builtin and then its argument prototype would still apply.  */
11906 char pthread_kill ();
11907 char (*f) ();
11908
11909 int
11910 main ()
11911 {
11912 /* The GNU C library defines this for functions which it implements
11913     to always fail with ENOSYS.  Some functions are actually named
11914     something starting with __ and the normal name is an alias.  */
11915 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11916 choke me
11917 #else
11918 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11919 #endif
11920
11921   ;
11922   return 0;
11923 }
11924 _ACEOF
11925 rm -f conftest.$ac_objext conftest$ac_exeext
11926 if { (eval echo "$as_me:11926: \"$ac_link\"") >&5
11927   (eval $ac_link) 2>&5
11928   ac_status=$?
11929   echo "$as_me:11929: \$? = $ac_status" >&5
11930   (exit $ac_status); } &&
11931          { ac_try='test -s conftest$ac_exeext'
11932   { (eval echo "$as_me:11932: \"$ac_try\"") >&5
11933   (eval $ac_try) 2>&5
11934   ac_status=$?
11935   echo "$as_me:11935: \$? = $ac_status" >&5
11936   (exit $ac_status); }; }; then
11937   ac_cv_func_pthread_kill=yes
11938 else
11939   echo "$as_me: failed program was:" >&5
11940 cat conftest.$ac_ext >&5
11941 ac_cv_func_pthread_kill=no
11942 fi
11943 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11944 fi
11945 echo "$as_me:11945: result: $ac_cv_func_pthread_kill" >&5
11946 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11947 if test $ac_cv_func_pthread_kill = yes; then
11948
11949                 echo "$as_me:11949: checking if you want to allow EINTR in wgetch with pthreads" >&5
11950 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11951
11952 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11953 if test "${enable_pthreads_eintr+set}" = set; then
11954   enableval="$enable_pthreads_eintr"
11955   use_pthreads_eintr=$enableval
11956 else
11957   use_pthreads_eintr=no
11958 fi;
11959                 echo "$as_me:11959: result: $use_pthreads_eintr" >&5
11960 echo "${ECHO_T}$use_pthreads_eintr" >&6
11961                 if test "x$use_pthreads_eintr" = xyes ; then
11962
11963 cat >>confdefs.h <<\EOF
11964 #define USE_PTHREADS_EINTR 1
11965 EOF
11966
11967                 fi
11968 fi
11969
11970         echo "$as_me:11970: checking if you want to use weak-symbols for pthreads" >&5
11971 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11972
11973 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11974 if test "${enable_weak_symbols+set}" = set; then
11975   enableval="$enable_weak_symbols"
11976   use_weak_symbols=$enableval
11977 else
11978   use_weak_symbols=no
11979 fi;
11980         echo "$as_me:11980: result: $use_weak_symbols" >&5
11981 echo "${ECHO_T}$use_weak_symbols" >&6
11982         if test "x$use_weak_symbols" = xyes ; then
11983
11984 echo "$as_me:11984: checking if $CC supports weak symbols" >&5
11985 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11986 if test "${cf_cv_weak_symbols+set}" = set; then
11987   echo $ECHO_N "(cached) $ECHO_C" >&6
11988 else
11989
11990 cat >conftest.$ac_ext <<_ACEOF
11991 #line 11991 "configure"
11992 #include "confdefs.h"
11993
11994 #include <stdio.h>
11995 int
11996 main ()
11997 {
11998
11999 #if defined(__GNUC__)
12000 #  if defined __USE_ISOC99
12001 #    define _cat_pragma(exp)    _Pragma(#exp)
12002 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12003 #  else
12004 #    define _weak_pragma(exp)
12005 #  endif
12006 #  define _declare(name)        __extension__ extern __typeof__(name) name
12007 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12008 #endif
12009
12010 weak_symbol(fopen);
12011
12012   ;
12013   return 0;
12014 }
12015 _ACEOF
12016 rm -f conftest.$ac_objext
12017 if { (eval echo "$as_me:12017: \"$ac_compile\"") >&5
12018   (eval $ac_compile) 2>&5
12019   ac_status=$?
12020   echo "$as_me:12020: \$? = $ac_status" >&5
12021   (exit $ac_status); } &&
12022          { ac_try='test -s conftest.$ac_objext'
12023   { (eval echo "$as_me:12023: \"$ac_try\"") >&5
12024   (eval $ac_try) 2>&5
12025   ac_status=$?
12026   echo "$as_me:12026: \$? = $ac_status" >&5
12027   (exit $ac_status); }; }; then
12028   cf_cv_weak_symbols=yes
12029 else
12030   echo "$as_me: failed program was:" >&5
12031 cat conftest.$ac_ext >&5
12032 cf_cv_weak_symbols=no
12033 fi
12034 rm -f conftest.$ac_objext conftest.$ac_ext
12035
12036 fi
12037 echo "$as_me:12037: result: $cf_cv_weak_symbols" >&5
12038 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12039
12040         else
12041                 cf_cv_weak_symbols=no
12042         fi
12043
12044         if test "x$cf_cv_weak_symbols" = xyes ; then
12045
12046 cat >>confdefs.h <<\EOF
12047 #define USE_WEAK_SYMBOLS 1
12048 EOF
12049
12050         fi
12051 fi
12052
12053 PTHREAD=
12054 if test "x$with_pthread" = "xyes" ; then
12055
12056 cat >>confdefs.h <<\EOF
12057 #define USE_PTHREADS 1
12058 EOF
12059
12060     enable_reentrant=yes
12061     if test "x$cf_cv_weak_symbols" = xyes ; then
12062         PTHREAD=-lpthread
12063     fi
12064 fi
12065
12066 # Reentrant code has to be opaque; there's little advantage to making ncurses
12067 # opaque outside of that, so there is no --enable-opaque option.  We can use
12068 # this option without --with-pthreads, but this will be always set for
12069 # pthreads.
12070 echo "$as_me:12070: checking if you want experimental reentrant code" >&5
12071 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12072
12073 # Check whether --enable-reentrant or --disable-reentrant was given.
12074 if test "${enable_reentrant+set}" = set; then
12075   enableval="$enable_reentrant"
12076   with_reentrant=$enableval
12077 else
12078   with_reentrant=no
12079 fi;
12080 echo "$as_me:12080: result: $with_reentrant" >&5
12081 echo "${ECHO_T}$with_reentrant" >&6
12082 if test "x$with_reentrant" = xyes ; then
12083         cf_cv_enable_reentrant=1
12084         cf_cv_enable_opaque="NCURSES_INTERNALS"
12085         NCURSES_OPAQUE=1
12086         NCURSES_SIZE_T=int
12087         if test "x$cf_cv_weak_symbols" = xyes ; then
12088
12089 # remove pthread library from $LIBS
12090 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12091
12092                 TEST_LIBS="-lpthread $TEST_LIBS"
12093                 TEST_LIBS2="-lpthread $TEST_LIBS2"
12094         else
12095                 # when not using weak symbols but with_reentrant,
12096                 # add 't' to the library suffix on all platforms
12097                 # except cygwin, where we only do that if ALSO
12098                 # compiling with full thread support.
12099                 case "$host" in
12100                 *cygwin* | *msys*) #(vi
12101                         if test "$with_pthread" = "yes" ; then
12102                                 if test "x$disable_lib_suffixes" = "xno" ; then
12103                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12104                                 fi
12105                         fi ;;
12106                 *)
12107                         if test "x$disable_lib_suffixes" = "xno" ; then
12108                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12109                         fi
12110                         ;;
12111                 esac
12112         fi
12113
12114 cat >>confdefs.h <<\EOF
12115 #define USE_REENTRANT 1
12116 EOF
12117
12118 if test "${with_abi_version+set}" != set; then
12119         case $cf_cv_rel_version in
12120         5.*)
12121                 cf_cv_rel_version=6.0
12122                 cf_cv_abi_version=6
12123                 { echo "$as_me:12123: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12124 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12125                 ;;
12126         esac
12127 fi
12128
12129 else
12130         cf_cv_enable_reentrant=0
12131         cf_cv_enable_opaque="NCURSES_OPAQUE"
12132         NCURSES_OPAQUE=0
12133         NCURSES_SIZE_T=short
12134 fi
12135
12136 ### Allow using a different wrap-prefix
12137 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12138         echo "$as_me:12138: checking for prefix used to wrap public variables" >&5
12139 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12140
12141 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12142 if test "${with_wrap_prefix+set}" = set; then
12143   withval="$with_wrap_prefix"
12144   NCURSES_WRAP_PREFIX=$withval
12145 else
12146   NCURSES_WRAP_PREFIX=_nc_
12147 fi;
12148         echo "$as_me:12148: result: $NCURSES_WRAP_PREFIX" >&5
12149 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12150 else
12151         NCURSES_WRAP_PREFIX=_nc_
12152 fi
12153
12154 cat >>confdefs.h <<EOF
12155 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12156 EOF
12157
12158 echo "$as_me:12158: checking if you want experimental safe-sprintf code" >&5
12159 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12160
12161 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12162 if test "${enable_safe_sprintf+set}" = set; then
12163   enableval="$enable_safe_sprintf"
12164   with_safe_sprintf=$enableval
12165 else
12166   with_safe_sprintf=no
12167 fi;
12168 echo "$as_me:12168: result: $with_safe_sprintf" >&5
12169 echo "${ECHO_T}$with_safe_sprintf" >&6
12170 test "x$with_safe_sprintf" = xyes &&
12171 cat >>confdefs.h <<\EOF
12172 #define USE_SAFE_SPRINTF 1
12173 EOF
12174
12175 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12176 # when hashmap is used scroll hints are useless
12177 if test "$with_hashmap" = no ; then
12178 echo "$as_me:12178: checking if you want to experiment without scrolling-hints code" >&5
12179 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12180
12181 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12182 if test "${enable_scroll_hints+set}" = set; then
12183   enableval="$enable_scroll_hints"
12184   with_scroll_hints=$enableval
12185 else
12186   with_scroll_hints=yes
12187 fi;
12188 echo "$as_me:12188: result: $with_scroll_hints" >&5
12189 echo "${ECHO_T}$with_scroll_hints" >&6
12190 test "x$with_scroll_hints" = xyes &&
12191 cat >>confdefs.h <<\EOF
12192 #define USE_SCROLL_HINTS 1
12193 EOF
12194
12195 fi
12196
12197 echo "$as_me:12197: checking if you want experimental wgetch-events code" >&5
12198 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12199
12200 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12201 if test "${enable_wgetch_events+set}" = set; then
12202   enableval="$enable_wgetch_events"
12203   with_wgetch_events=$enableval
12204 else
12205   with_wgetch_events=no
12206 fi;
12207 echo "$as_me:12207: result: $with_wgetch_events" >&5
12208 echo "${ECHO_T}$with_wgetch_events" >&6
12209 test "x$with_wgetch_events" = xyes &&
12210 cat >>confdefs.h <<\EOF
12211 #define NCURSES_WGETCH_EVENTS 1
12212 EOF
12213
12214 ###############################################################################
12215
12216 ###     use option --disable-echo to suppress full display compiling commands
12217
12218 echo "$as_me:12218: checking if you want to see long compiling messages" >&5
12219 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12220
12221 # Check whether --enable-echo or --disable-echo was given.
12222 if test "${enable_echo+set}" = set; then
12223   enableval="$enable_echo"
12224   test "$enableval" != no && enableval=yes
12225   if test "$enableval" != "yes" ; then
12226
12227     ECHO_LT='--silent'
12228     ECHO_LD='@echo linking $@;'
12229     RULE_CC='@echo compiling $<'
12230     SHOW_CC='@echo compiling $@'
12231     ECHO_CC='@'
12232
12233   else
12234
12235     ECHO_LT=''
12236     ECHO_LD=''
12237     RULE_CC=''
12238     SHOW_CC=''
12239     ECHO_CC=''
12240
12241   fi
12242 else
12243   enableval=yes
12244
12245     ECHO_LT=''
12246     ECHO_LD=''
12247     RULE_CC=''
12248     SHOW_CC=''
12249     ECHO_CC=''
12250
12251 fi;
12252 echo "$as_me:12252: result: $enableval" >&5
12253 echo "${ECHO_T}$enableval" >&6
12254
12255 if test "x$enable_echo" = xyes; then
12256         ECHO_LINK=
12257 else
12258         ECHO_LINK='@ echo linking $@ ... ;'
12259         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12260         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12261 fi
12262
12263 ###     use option --enable-warnings to turn on all gcc warnings
12264 echo "$as_me:12264: checking if you want to see compiler warnings" >&5
12265 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12266
12267 # Check whether --enable-warnings or --disable-warnings was given.
12268 if test "${enable_warnings+set}" = set; then
12269   enableval="$enable_warnings"
12270   with_warnings=$enableval
12271 fi;
12272 echo "$as_me:12272: result: $with_warnings" >&5
12273 echo "${ECHO_T}$with_warnings" >&6
12274
12275 if test "x$with_warnings" = "xyes"; then
12276
12277         ADAFLAGS="$ADAFLAGS -gnatg"
12278
12279 INTEL_COMPILER=no
12280
12281 if test "$GCC" = yes ; then
12282         case $host_os in
12283         linux*|gnu*)
12284                 echo "$as_me:12284: checking if this is really Intel C compiler" >&5
12285 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12286                 cf_save_CFLAGS="$CFLAGS"
12287                 CFLAGS="$CFLAGS -no-gcc"
12288                 cat >conftest.$ac_ext <<_ACEOF
12289 #line 12289 "configure"
12290 #include "confdefs.h"
12291
12292 int
12293 main ()
12294 {
12295
12296 #ifdef __INTEL_COMPILER
12297 #else
12298 make an error
12299 #endif
12300
12301   ;
12302   return 0;
12303 }
12304 _ACEOF
12305 rm -f conftest.$ac_objext
12306 if { (eval echo "$as_me:12306: \"$ac_compile\"") >&5
12307   (eval $ac_compile) 2>&5
12308   ac_status=$?
12309   echo "$as_me:12309: \$? = $ac_status" >&5
12310   (exit $ac_status); } &&
12311          { ac_try='test -s conftest.$ac_objext'
12312   { (eval echo "$as_me:12312: \"$ac_try\"") >&5
12313   (eval $ac_try) 2>&5
12314   ac_status=$?
12315   echo "$as_me:12315: \$? = $ac_status" >&5
12316   (exit $ac_status); }; }; then
12317   INTEL_COMPILER=yes
12318 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12319
12320 else
12321   echo "$as_me: failed program was:" >&5
12322 cat conftest.$ac_ext >&5
12323 fi
12324 rm -f conftest.$ac_objext conftest.$ac_ext
12325                 CFLAGS="$cf_save_CFLAGS"
12326                 echo "$as_me:12326: result: $INTEL_COMPILER" >&5
12327 echo "${ECHO_T}$INTEL_COMPILER" >&6
12328                 ;;
12329         esac
12330 fi
12331
12332 CLANG_COMPILER=no
12333
12334 if test "$GCC" = yes ; then
12335         echo "$as_me:12335: checking if this is really Clang C compiler" >&5
12336 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12337         cf_save_CFLAGS="$CFLAGS"
12338         CFLAGS="$CFLAGS -Qunused-arguments"
12339         cat >conftest.$ac_ext <<_ACEOF
12340 #line 12340 "configure"
12341 #include "confdefs.h"
12342
12343 int
12344 main ()
12345 {
12346
12347 #ifdef __clang__
12348 #else
12349 make an error
12350 #endif
12351
12352   ;
12353   return 0;
12354 }
12355 _ACEOF
12356 rm -f conftest.$ac_objext
12357 if { (eval echo "$as_me:12357: \"$ac_compile\"") >&5
12358   (eval $ac_compile) 2>&5
12359   ac_status=$?
12360   echo "$as_me:12360: \$? = $ac_status" >&5
12361   (exit $ac_status); } &&
12362          { ac_try='test -s conftest.$ac_objext'
12363   { (eval echo "$as_me:12363: \"$ac_try\"") >&5
12364   (eval $ac_try) 2>&5
12365   ac_status=$?
12366   echo "$as_me:12366: \$? = $ac_status" >&5
12367   (exit $ac_status); }; }; then
12368   CLANG_COMPILER=yes
12369 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12370
12371 else
12372   echo "$as_me: failed program was:" >&5
12373 cat conftest.$ac_ext >&5
12374 fi
12375 rm -f conftest.$ac_objext conftest.$ac_ext
12376         CFLAGS="$cf_save_CFLAGS"
12377         echo "$as_me:12377: result: $CLANG_COMPILER" >&5
12378 echo "${ECHO_T}$CLANG_COMPILER" >&6
12379 fi
12380
12381 cat > conftest.$ac_ext <<EOF
12382 #line 12382 "${as_me:-configure}"
12383 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12384 EOF
12385
12386 if test "$INTEL_COMPILER" = yes
12387 then
12388 # The "-wdXXX" options suppress warnings:
12389 # remark #1419: external declaration in primary source file
12390 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12391 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12392 # remark #193: zero used for undefined preprocessing identifier
12393 # remark #593: variable "curs_sb_left_arrow" was set but never used
12394 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12395 # remark #869: parameter "tw" was never referenced
12396 # remark #981: operands are evaluated in unspecified order
12397 # warning #279: controlling expression is constant
12398
12399         { echo "$as_me:12399: checking for $CC warning options..." >&5
12400 echo "$as_me: checking for $CC warning options..." >&6;}
12401         cf_save_CFLAGS="$CFLAGS"
12402         EXTRA_CFLAGS="-Wall"
12403         for cf_opt in \
12404                 wd1419 \
12405                 wd1683 \
12406                 wd1684 \
12407                 wd193 \
12408                 wd593 \
12409                 wd279 \
12410                 wd810 \
12411                 wd869 \
12412                 wd981
12413         do
12414                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12415                 if { (eval echo "$as_me:12415: \"$ac_compile\"") >&5
12416   (eval $ac_compile) 2>&5
12417   ac_status=$?
12418   echo "$as_me:12418: \$? = $ac_status" >&5
12419   (exit $ac_status); }; then
12420                         test -n "$verbose" && echo "$as_me:12420: result: ... -$cf_opt" >&5
12421 echo "${ECHO_T}... -$cf_opt" >&6
12422                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12423                 fi
12424         done
12425         CFLAGS="$cf_save_CFLAGS"
12426
12427 elif test "$GCC" = yes
12428 then
12429         { echo "$as_me:12429: checking for $CC warning options..." >&5
12430 echo "$as_me: checking for $CC warning options..." >&6;}
12431         cf_save_CFLAGS="$CFLAGS"
12432         EXTRA_CFLAGS=
12433         cf_warn_CONST=""
12434         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12435         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12436         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12437         for cf_opt in W Wall \
12438                 Wbad-function-cast \
12439                 Wcast-align \
12440                 Wcast-qual \
12441                 Wdeclaration-after-statement \
12442                 Wextra \
12443                 Winline \
12444                 Wmissing-declarations \
12445                 Wmissing-prototypes \
12446                 Wnested-externs \
12447                 Wpointer-arith \
12448                 Wshadow \
12449                 Wstrict-prototypes \
12450                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
12451         do
12452                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12453                 if { (eval echo "$as_me:12453: \"$ac_compile\"") >&5
12454   (eval $ac_compile) 2>&5
12455   ac_status=$?
12456   echo "$as_me:12456: \$? = $ac_status" >&5
12457   (exit $ac_status); }; then
12458                         test -n "$verbose" && echo "$as_me:12458: result: ... -$cf_opt" >&5
12459 echo "${ECHO_T}... -$cf_opt" >&6
12460                         case $cf_opt in #(vi
12461                         Wcast-qual) #(vi
12462                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12463                                 ;;
12464                         Winline) #(vi
12465                                 case $GCC_VERSION in
12466                                 [34].*)
12467                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12468
12469 echo "${as_me:-configure}:12469: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12470
12471                                         continue;;
12472                                 esac
12473                                 ;;
12474                         Wpointer-arith) #(vi
12475                                 case $GCC_VERSION in
12476                                 [12].*)
12477                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12478
12479 echo "${as_me:-configure}:12479: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12480
12481                                         continue;;
12482                                 esac
12483                                 ;;
12484                         esac
12485                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12486                 fi
12487         done
12488         CFLAGS="$cf_save_CFLAGS"
12489 fi
12490 rm -rf conftest*
12491
12492         if test "x$cf_with_cxx" = xyes ; then
12493
12494 INTEL_CPLUSPLUS=no
12495
12496 if test "$GCC" = yes ; then
12497         case $host_os in
12498         linux*|gnu*)
12499                 echo "$as_me:12499: checking if this is really Intel C++ compiler" >&5
12500 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12501                 cf_save_CFLAGS="$CXXFLAGS"
12502                 CXXFLAGS="$CXXFLAGS -no-gcc"
12503                 cat >conftest.$ac_ext <<_ACEOF
12504 #line 12504 "configure"
12505 #include "confdefs.h"
12506
12507 int
12508 main ()
12509 {
12510
12511 #ifdef __INTEL_COMPILER
12512 #else
12513 make an error
12514 #endif
12515
12516   ;
12517   return 0;
12518 }
12519 _ACEOF
12520 rm -f conftest.$ac_objext
12521 if { (eval echo "$as_me:12521: \"$ac_compile\"") >&5
12522   (eval $ac_compile) 2>&5
12523   ac_status=$?
12524   echo "$as_me:12524: \$? = $ac_status" >&5
12525   (exit $ac_status); } &&
12526          { ac_try='test -s conftest.$ac_objext'
12527   { (eval echo "$as_me:12527: \"$ac_try\"") >&5
12528   (eval $ac_try) 2>&5
12529   ac_status=$?
12530   echo "$as_me:12530: \$? = $ac_status" >&5
12531   (exit $ac_status); }; }; then
12532   INTEL_CPLUSPLUS=yes
12533 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12534
12535 else
12536   echo "$as_me: failed program was:" >&5
12537 cat conftest.$ac_ext >&5
12538 fi
12539 rm -f conftest.$ac_objext conftest.$ac_ext
12540                 CXXFLAGS="$cf_save_CFLAGS"
12541                 echo "$as_me:12541: result: $INTEL_CPLUSPLUS" >&5
12542 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12543                 ;;
12544         esac
12545 fi
12546
12547 CLANG_CPLUSPLUS=no
12548
12549 if test "$GCC" = yes ; then
12550         echo "$as_me:12550: checking if this is really Clang C++ compiler" >&5
12551 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12552         cf_save_CFLAGS="$CXXFLAGS"
12553         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12554         cat >conftest.$ac_ext <<_ACEOF
12555 #line 12555 "configure"
12556 #include "confdefs.h"
12557
12558 int
12559 main ()
12560 {
12561
12562 #ifdef __clang__
12563 #else
12564 make an error
12565 #endif
12566
12567   ;
12568   return 0;
12569 }
12570 _ACEOF
12571 rm -f conftest.$ac_objext
12572 if { (eval echo "$as_me:12572: \"$ac_compile\"") >&5
12573   (eval $ac_compile) 2>&5
12574   ac_status=$?
12575   echo "$as_me:12575: \$? = $ac_status" >&5
12576   (exit $ac_status); } &&
12577          { ac_try='test -s conftest.$ac_objext'
12578   { (eval echo "$as_me:12578: \"$ac_try\"") >&5
12579   (eval $ac_try) 2>&5
12580   ac_status=$?
12581   echo "$as_me:12581: \$? = $ac_status" >&5
12582   (exit $ac_status); }; }; then
12583   CLANG_CPLUSPLUS=yes
12584 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12585
12586 else
12587   echo "$as_me: failed program was:" >&5
12588 cat conftest.$ac_ext >&5
12589 fi
12590 rm -f conftest.$ac_objext conftest.$ac_ext
12591         CXXFLAGS="$cf_save_CFLAGS"
12592         echo "$as_me:12592: result: $CLANG_CPLUSPLUS" >&5
12593 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12594 fi
12595
12596 ac_ext=cc
12597 ac_cpp='$CXXCPP $CPPFLAGS'
12598 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12599 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12600 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12601 ac_main_return=return
12602
12603 cat > conftest.$ac_ext <<EOF
12604 #line 12604 "configure"
12605 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12606 EOF
12607
12608 if test "$INTEL_CPLUSPLUS" = yes
12609 then
12610 # The "-wdXXX" options suppress warnings:
12611 # remark #1419: external declaration in primary source file
12612 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12613 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12614 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12615 # remark #193: zero used for undefined preprocessing identifier
12616 # remark #593: variable "curs_sb_left_arrow" was set but never used
12617 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12618 # remark #869: parameter "tw" was never referenced
12619 # remark #981: operands are evaluated in unspecified order
12620 # warning #269: invalid format string conversion
12621
12622         { echo "$as_me:12622: checking for $CC warning options..." >&5
12623 echo "$as_me: checking for $CC warning options..." >&6;}
12624         cf_save_CXXFLAGS="$CXXFLAGS"
12625         EXTRA_CXXFLAGS="-Wall"
12626         for cf_opt in \
12627                 wd1419 \
12628                 wd1682 \
12629                 wd1683 \
12630                 wd1684 \
12631                 wd193 \
12632                 wd279 \
12633                 wd593 \
12634                 wd810 \
12635                 wd869 \
12636                 wd981
12637         do
12638                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12639                 if { (eval echo "$as_me:12639: \"$ac_compile\"") >&5
12640   (eval $ac_compile) 2>&5
12641   ac_status=$?
12642   echo "$as_me:12642: \$? = $ac_status" >&5
12643   (exit $ac_status); }; then
12644                         test -n "$verbose" && echo "$as_me:12644: result: ... -$cf_opt" >&5
12645 echo "${ECHO_T}... -$cf_opt" >&6
12646                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12647                 fi
12648         done
12649         CXXFLAGS="$cf_save_CXXFLAGS"
12650
12651 elif test "$GXX" = yes
12652 then
12653         { echo "$as_me:12653: checking for $CXX warning options..." >&5
12654 echo "$as_me: checking for $CXX warning options..." >&6;}
12655         cf_save_CXXFLAGS="$CXXFLAGS"
12656         EXTRA_CXXFLAGS="-W -Wall"
12657         cf_gxx_extra_warnings=""
12658         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12659         case "$GCC_VERSION" in
12660         [1-2].*)
12661                 ;;
12662         *)
12663                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12664                 ;;
12665         esac
12666         for cf_opt in \
12667                 Wabi \
12668                 fabi-version=0 \
12669                 Wextra \
12670                 Wignored-qualifiers \
12671                 Wlogical-op \
12672                 Woverloaded-virtual \
12673                 Wsign-promo \
12674                 Wsynth \
12675                 Wold-style-cast \
12676                 Wcast-align \
12677                 Wcast-qual \
12678                 Wpointer-arith \
12679                 Wshadow \
12680                 Wundef $cf_gxx_extra_warnings Wno-unused
12681         do
12682                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12683                 if { (eval echo "$as_me:12683: \"$ac_compile\"") >&5
12684   (eval $ac_compile) 2>&5
12685   ac_status=$?
12686   echo "$as_me:12686: \$? = $ac_status" >&5
12687   (exit $ac_status); }; then
12688                         test -n "$verbose" && echo "$as_me:12688: result: ... -$cf_opt" >&5
12689 echo "${ECHO_T}... -$cf_opt" >&6
12690                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12691                 else
12692                         test -n "$verbose" && echo "$as_me:12692: result: ... no -$cf_opt" >&5
12693 echo "${ECHO_T}... no -$cf_opt" >&6
12694                 fi
12695         done
12696         CXXFLAGS="$cf_save_CXXFLAGS"
12697 fi
12698
12699 rm -rf conftest*
12700 ac_ext=c
12701 ac_cpp='$CPP $CPPFLAGS'
12702 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12703 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12704 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12705 ac_main_return=return
12706
12707         fi
12708 fi
12709
12710 if test "$GCC" = yes
12711 then
12712 cat > conftest.i <<EOF
12713 #ifndef GCC_PRINTF
12714 #define GCC_PRINTF 0
12715 #endif
12716 #ifndef GCC_SCANF
12717 #define GCC_SCANF 0
12718 #endif
12719 #ifndef GCC_NORETURN
12720 #define GCC_NORETURN /* nothing */
12721 #endif
12722 #ifndef GCC_UNUSED
12723 #define GCC_UNUSED /* nothing */
12724 #endif
12725 EOF
12726 if test "$GCC" = yes
12727 then
12728         { echo "$as_me:12728: checking for $CC __attribute__ directives..." >&5
12729 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12730 cat > conftest.$ac_ext <<EOF
12731 #line 12731 "${as_me:-configure}"
12732 #include "confdefs.h"
12733 #include "conftest.h"
12734 #include "conftest.i"
12735 #if     GCC_PRINTF
12736 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12737 #else
12738 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12739 #endif
12740 #if     GCC_SCANF
12741 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12742 #else
12743 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12744 #endif
12745 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12746 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12747 extern void foo(void) GCC_NORETURN;
12748 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12749 EOF
12750         cf_printf_attribute=no
12751         cf_scanf_attribute=no
12752         for cf_attribute in scanf printf unused noreturn
12753         do
12754
12755 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12756
12757                 cf_directive="__attribute__(($cf_attribute))"
12758                 echo "checking for $CC $cf_directive" 1>&5
12759
12760                 case $cf_attribute in #(vi
12761                 printf) #(vi
12762                         cf_printf_attribute=yes
12763                         cat >conftest.h <<EOF
12764 #define GCC_$cf_ATTRIBUTE 1
12765 EOF
12766                         ;;
12767                 scanf) #(vi
12768                         cf_scanf_attribute=yes
12769                         cat >conftest.h <<EOF
12770 #define GCC_$cf_ATTRIBUTE 1
12771 EOF
12772                         ;;
12773                 *) #(vi
12774                         cat >conftest.h <<EOF
12775 #define GCC_$cf_ATTRIBUTE $cf_directive
12776 EOF
12777                         ;;
12778                 esac
12779
12780                 if { (eval echo "$as_me:12780: \"$ac_compile\"") >&5
12781   (eval $ac_compile) 2>&5
12782   ac_status=$?
12783   echo "$as_me:12783: \$? = $ac_status" >&5
12784   (exit $ac_status); }; then
12785                         test -n "$verbose" && echo "$as_me:12785: result: ... $cf_attribute" >&5
12786 echo "${ECHO_T}... $cf_attribute" >&6
12787                         cat conftest.h >>confdefs.h
12788                         case $cf_attribute in #(vi
12789                         noreturn) #(vi
12790
12791 cat >>confdefs.h <<EOF
12792 #define GCC_NORETURN $cf_directive
12793 EOF
12794
12795                                 ;;
12796                         printf) #(vi
12797                                 cf_value='/* nothing */'
12798                                 if test "$cf_printf_attribute" != no ; then
12799                                         cf_value='__attribute__((format(printf,fmt,var)))'
12800
12801 cat >>confdefs.h <<\EOF
12802 #define GCC_PRINTF 1
12803 EOF
12804
12805                                 fi
12806
12807 cat >>confdefs.h <<EOF
12808 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12809 EOF
12810
12811                                 ;;
12812                         scanf) #(vi
12813                                 cf_value='/* nothing */'
12814                                 if test "$cf_scanf_attribute" != no ; then
12815                                         cf_value='__attribute__((format(scanf,fmt,var)))'
12816
12817 cat >>confdefs.h <<\EOF
12818 #define GCC_SCANF 1
12819 EOF
12820
12821                                 fi
12822
12823 cat >>confdefs.h <<EOF
12824 #define GCC_SCANFLIKE(fmt,var) $cf_value
12825 EOF
12826
12827                                 ;;
12828                         unused) #(vi
12829
12830 cat >>confdefs.h <<EOF
12831 #define GCC_UNUSED $cf_directive
12832 EOF
12833
12834                                 ;;
12835                         esac
12836                 fi
12837         done
12838 else
12839         fgrep define conftest.i >>confdefs.h
12840 fi
12841 rm -rf conftest*
12842 fi
12843
12844 echo "$as_me:12844: checking if you want to work around bogus compiler/loader warnings" >&5
12845 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12846
12847 # Check whether --enable-string-hacks or --disable-string-hacks was given.
12848 if test "${enable_string_hacks+set}" = set; then
12849   enableval="$enable_string_hacks"
12850   with_string_hacks=$enableval
12851 else
12852   with_string_hacks=no
12853 fi;
12854 echo "$as_me:12854: result: $with_string_hacks" >&5
12855 echo "${ECHO_T}$with_string_hacks" >&6
12856
12857 if test "x$with_string_hacks" = "xyes"; then
12858
12859 cat >>confdefs.h <<\EOF
12860 #define USE_STRING_HACKS 1
12861 EOF
12862
12863         { echo "$as_me:12863: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
12864 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
12865
12866 for ac_func in strlcat strlcpy snprintf
12867 do
12868 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12869 echo "$as_me:12869: checking for $ac_func" >&5
12870 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12871 if eval "test \"\${$as_ac_var+set}\" = set"; then
12872   echo $ECHO_N "(cached) $ECHO_C" >&6
12873 else
12874   cat >conftest.$ac_ext <<_ACEOF
12875 #line 12875 "configure"
12876 #include "confdefs.h"
12877 /* System header to define __stub macros and hopefully few prototypes,
12878     which can conflict with char $ac_func (); below.  */
12879 #include <assert.h>
12880 /* Override any gcc2 internal prototype to avoid an error.  */
12881 #ifdef __cplusplus
12882 extern "C"
12883 #endif
12884 /* We use char because int might match the return type of a gcc2
12885    builtin and then its argument prototype would still apply.  */
12886 char $ac_func ();
12887 char (*f) ();
12888
12889 int
12890 main ()
12891 {
12892 /* The GNU C library defines this for functions which it implements
12893     to always fail with ENOSYS.  Some functions are actually named
12894     something starting with __ and the normal name is an alias.  */
12895 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12896 choke me
12897 #else
12898 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12899 #endif
12900
12901   ;
12902   return 0;
12903 }
12904 _ACEOF
12905 rm -f conftest.$ac_objext conftest$ac_exeext
12906 if { (eval echo "$as_me:12906: \"$ac_link\"") >&5
12907   (eval $ac_link) 2>&5
12908   ac_status=$?
12909   echo "$as_me:12909: \$? = $ac_status" >&5
12910   (exit $ac_status); } &&
12911          { ac_try='test -s conftest$ac_exeext'
12912   { (eval echo "$as_me:12912: \"$ac_try\"") >&5
12913   (eval $ac_try) 2>&5
12914   ac_status=$?
12915   echo "$as_me:12915: \$? = $ac_status" >&5
12916   (exit $ac_status); }; }; then
12917   eval "$as_ac_var=yes"
12918 else
12919   echo "$as_me: failed program was:" >&5
12920 cat conftest.$ac_ext >&5
12921 eval "$as_ac_var=no"
12922 fi
12923 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12924 fi
12925 echo "$as_me:12925: result: `eval echo '${'$as_ac_var'}'`" >&5
12926 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12927 if test `eval echo '${'$as_ac_var'}'` = yes; then
12928   cat >>confdefs.h <<EOF
12929 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12930 EOF
12931
12932 fi
12933 done
12934
12935 fi
12936
12937 ###     use option --enable-assertions to turn on generation of assertion code
12938 echo "$as_me:12938: checking if you want to enable runtime assertions" >&5
12939 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12940
12941 # Check whether --enable-assertions or --disable-assertions was given.
12942 if test "${enable_assertions+set}" = set; then
12943   enableval="$enable_assertions"
12944   with_assertions=$enableval
12945 else
12946   with_assertions=no
12947 fi;
12948 echo "$as_me:12948: result: $with_assertions" >&5
12949 echo "${ECHO_T}$with_assertions" >&6
12950 if test -n "$GCC"
12951 then
12952         if test "$with_assertions" = no
12953         then
12954                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12955         else
12956
12957         ADAFLAGS="$ADAFLAGS -gnata"
12958
12959         fi
12960 fi
12961
12962 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12963
12964 echo "$as_me:12964: checking if you want to use dmalloc for testing" >&5
12965 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12966
12967 # Check whether --with-dmalloc or --without-dmalloc was given.
12968 if test "${with_dmalloc+set}" = set; then
12969   withval="$with_dmalloc"
12970
12971 cat >>confdefs.h <<EOF
12972 #define USE_DMALLOC 1
12973 EOF
12974
12975         : ${with_cflags:=-g}
12976         : ${with_no_leaks:=yes}
12977          with_dmalloc=yes
12978 else
12979   with_dmalloc=
12980 fi;
12981 echo "$as_me:12981: result: ${with_dmalloc:-no}" >&5
12982 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12983
12984 case .$with_cflags in #(vi
12985 .*-g*)
12986         case .$CFLAGS in #(vi
12987         .*-g*) #(vi
12988                 ;;
12989         *)
12990
12991 cf_fix_cppflags=no
12992 cf_new_cflags=
12993 cf_new_cppflags=
12994 cf_new_extra_cppflags=
12995
12996 for cf_add_cflags in -g
12997 do
12998 case $cf_fix_cppflags in
12999 no)
13000         case $cf_add_cflags in #(vi
13001         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13002                 case $cf_add_cflags in
13003                 -D*)
13004                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13005
13006                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13007                                 && test -z "${cf_tst_cflags}" \
13008                                 && cf_fix_cppflags=yes
13009
13010                         if test $cf_fix_cppflags = yes ; then
13011                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13012                                 continue
13013                         elif test "${cf_tst_cflags}" = "\"'" ; then
13014                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13015                                 continue
13016                         fi
13017                         ;;
13018                 esac
13019                 case "$CPPFLAGS" in
13020                 *$cf_add_cflags) #(vi
13021                         ;;
13022                 *) #(vi
13023                         case $cf_add_cflags in #(vi
13024                         -D*)
13025                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13026
13027 CPPFLAGS=`echo "$CPPFLAGS" | \
13028         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13029                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13030
13031                                 ;;
13032                         esac
13033                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13034                         ;;
13035                 esac
13036                 ;;
13037         *)
13038                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13039                 ;;
13040         esac
13041         ;;
13042 yes)
13043         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13044
13045         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13046
13047         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13048                 && test -z "${cf_tst_cflags}" \
13049                 && cf_fix_cppflags=no
13050         ;;
13051 esac
13052 done
13053
13054 if test -n "$cf_new_cflags" ; then
13055
13056         CFLAGS="$CFLAGS $cf_new_cflags"
13057 fi
13058
13059 if test -n "$cf_new_cppflags" ; then
13060
13061         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13062 fi
13063
13064 if test -n "$cf_new_extra_cppflags" ; then
13065
13066         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13067 fi
13068
13069                 ;;
13070         esac
13071         ;;
13072 esac
13073
13074 if test "$with_dmalloc" = yes ; then
13075         echo "$as_me:13075: checking for dmalloc.h" >&5
13076 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13077 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13078   echo $ECHO_N "(cached) $ECHO_C" >&6
13079 else
13080   cat >conftest.$ac_ext <<_ACEOF
13081 #line 13081 "configure"
13082 #include "confdefs.h"
13083 #include <dmalloc.h>
13084 _ACEOF
13085 if { (eval echo "$as_me:13085: \"$ac_cpp conftest.$ac_ext\"") >&5
13086   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13087   ac_status=$?
13088   egrep -v '^ *\+' conftest.er1 >conftest.err
13089   rm -f conftest.er1
13090   cat conftest.err >&5
13091   echo "$as_me:13091: \$? = $ac_status" >&5
13092   (exit $ac_status); } >/dev/null; then
13093   if test -s conftest.err; then
13094     ac_cpp_err=$ac_c_preproc_warn_flag
13095   else
13096     ac_cpp_err=
13097   fi
13098 else
13099   ac_cpp_err=yes
13100 fi
13101 if test -z "$ac_cpp_err"; then
13102   ac_cv_header_dmalloc_h=yes
13103 else
13104   echo "$as_me: failed program was:" >&5
13105   cat conftest.$ac_ext >&5
13106   ac_cv_header_dmalloc_h=no
13107 fi
13108 rm -f conftest.err conftest.$ac_ext
13109 fi
13110 echo "$as_me:13110: result: $ac_cv_header_dmalloc_h" >&5
13111 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13112 if test $ac_cv_header_dmalloc_h = yes; then
13113
13114 echo "$as_me:13114: checking for dmalloc_debug in -ldmalloc" >&5
13115 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13116 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13117   echo $ECHO_N "(cached) $ECHO_C" >&6
13118 else
13119   ac_check_lib_save_LIBS=$LIBS
13120 LIBS="-ldmalloc  $LIBS"
13121 cat >conftest.$ac_ext <<_ACEOF
13122 #line 13122 "configure"
13123 #include "confdefs.h"
13124
13125 /* Override any gcc2 internal prototype to avoid an error.  */
13126 #ifdef __cplusplus
13127 extern "C"
13128 #endif
13129 /* We use char because int might match the return type of a gcc2
13130    builtin and then its argument prototype would still apply.  */
13131 char dmalloc_debug ();
13132 int
13133 main ()
13134 {
13135 dmalloc_debug ();
13136   ;
13137   return 0;
13138 }
13139 _ACEOF
13140 rm -f conftest.$ac_objext conftest$ac_exeext
13141 if { (eval echo "$as_me:13141: \"$ac_link\"") >&5
13142   (eval $ac_link) 2>&5
13143   ac_status=$?
13144   echo "$as_me:13144: \$? = $ac_status" >&5
13145   (exit $ac_status); } &&
13146          { ac_try='test -s conftest$ac_exeext'
13147   { (eval echo "$as_me:13147: \"$ac_try\"") >&5
13148   (eval $ac_try) 2>&5
13149   ac_status=$?
13150   echo "$as_me:13150: \$? = $ac_status" >&5
13151   (exit $ac_status); }; }; then
13152   ac_cv_lib_dmalloc_dmalloc_debug=yes
13153 else
13154   echo "$as_me: failed program was:" >&5
13155 cat conftest.$ac_ext >&5
13156 ac_cv_lib_dmalloc_dmalloc_debug=no
13157 fi
13158 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13159 LIBS=$ac_check_lib_save_LIBS
13160 fi
13161 echo "$as_me:13161: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13162 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13163 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13164   cat >>confdefs.h <<EOF
13165 #define HAVE_LIBDMALLOC 1
13166 EOF
13167
13168   LIBS="-ldmalloc $LIBS"
13169
13170 fi
13171
13172 fi
13173
13174 fi
13175
13176 echo "$as_me:13176: checking if you want to use dbmalloc for testing" >&5
13177 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13178
13179 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13180 if test "${with_dbmalloc+set}" = set; then
13181   withval="$with_dbmalloc"
13182
13183 cat >>confdefs.h <<EOF
13184 #define USE_DBMALLOC 1
13185 EOF
13186
13187         : ${with_cflags:=-g}
13188         : ${with_no_leaks:=yes}
13189          with_dbmalloc=yes
13190 else
13191   with_dbmalloc=
13192 fi;
13193 echo "$as_me:13193: result: ${with_dbmalloc:-no}" >&5
13194 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13195
13196 case .$with_cflags in #(vi
13197 .*-g*)
13198         case .$CFLAGS in #(vi
13199         .*-g*) #(vi
13200                 ;;
13201         *)
13202
13203 cf_fix_cppflags=no
13204 cf_new_cflags=
13205 cf_new_cppflags=
13206 cf_new_extra_cppflags=
13207
13208 for cf_add_cflags in -g
13209 do
13210 case $cf_fix_cppflags in
13211 no)
13212         case $cf_add_cflags in #(vi
13213         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13214                 case $cf_add_cflags in
13215                 -D*)
13216                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13217
13218                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13219                                 && test -z "${cf_tst_cflags}" \
13220                                 && cf_fix_cppflags=yes
13221
13222                         if test $cf_fix_cppflags = yes ; then
13223                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13224                                 continue
13225                         elif test "${cf_tst_cflags}" = "\"'" ; then
13226                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13227                                 continue
13228                         fi
13229                         ;;
13230                 esac
13231                 case "$CPPFLAGS" in
13232                 *$cf_add_cflags) #(vi
13233                         ;;
13234                 *) #(vi
13235                         case $cf_add_cflags in #(vi
13236                         -D*)
13237                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13238
13239 CPPFLAGS=`echo "$CPPFLAGS" | \
13240         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13241                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13242
13243                                 ;;
13244                         esac
13245                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13246                         ;;
13247                 esac
13248                 ;;
13249         *)
13250                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13251                 ;;
13252         esac
13253         ;;
13254 yes)
13255         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13256
13257         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13258
13259         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13260                 && test -z "${cf_tst_cflags}" \
13261                 && cf_fix_cppflags=no
13262         ;;
13263 esac
13264 done
13265
13266 if test -n "$cf_new_cflags" ; then
13267
13268         CFLAGS="$CFLAGS $cf_new_cflags"
13269 fi
13270
13271 if test -n "$cf_new_cppflags" ; then
13272
13273         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13274 fi
13275
13276 if test -n "$cf_new_extra_cppflags" ; then
13277
13278         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13279 fi
13280
13281                 ;;
13282         esac
13283         ;;
13284 esac
13285
13286 if test "$with_dbmalloc" = yes ; then
13287         echo "$as_me:13287: checking for dbmalloc.h" >&5
13288 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13289 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13290   echo $ECHO_N "(cached) $ECHO_C" >&6
13291 else
13292   cat >conftest.$ac_ext <<_ACEOF
13293 #line 13293 "configure"
13294 #include "confdefs.h"
13295 #include <dbmalloc.h>
13296 _ACEOF
13297 if { (eval echo "$as_me:13297: \"$ac_cpp conftest.$ac_ext\"") >&5
13298   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13299   ac_status=$?
13300   egrep -v '^ *\+' conftest.er1 >conftest.err
13301   rm -f conftest.er1
13302   cat conftest.err >&5
13303   echo "$as_me:13303: \$? = $ac_status" >&5
13304   (exit $ac_status); } >/dev/null; then
13305   if test -s conftest.err; then
13306     ac_cpp_err=$ac_c_preproc_warn_flag
13307   else
13308     ac_cpp_err=
13309   fi
13310 else
13311   ac_cpp_err=yes
13312 fi
13313 if test -z "$ac_cpp_err"; then
13314   ac_cv_header_dbmalloc_h=yes
13315 else
13316   echo "$as_me: failed program was:" >&5
13317   cat conftest.$ac_ext >&5
13318   ac_cv_header_dbmalloc_h=no
13319 fi
13320 rm -f conftest.err conftest.$ac_ext
13321 fi
13322 echo "$as_me:13322: result: $ac_cv_header_dbmalloc_h" >&5
13323 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13324 if test $ac_cv_header_dbmalloc_h = yes; then
13325
13326 echo "$as_me:13326: checking for debug_malloc in -ldbmalloc" >&5
13327 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13328 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13329   echo $ECHO_N "(cached) $ECHO_C" >&6
13330 else
13331   ac_check_lib_save_LIBS=$LIBS
13332 LIBS="-ldbmalloc  $LIBS"
13333 cat >conftest.$ac_ext <<_ACEOF
13334 #line 13334 "configure"
13335 #include "confdefs.h"
13336
13337 /* Override any gcc2 internal prototype to avoid an error.  */
13338 #ifdef __cplusplus
13339 extern "C"
13340 #endif
13341 /* We use char because int might match the return type of a gcc2
13342    builtin and then its argument prototype would still apply.  */
13343 char debug_malloc ();
13344 int
13345 main ()
13346 {
13347 debug_malloc ();
13348   ;
13349   return 0;
13350 }
13351 _ACEOF
13352 rm -f conftest.$ac_objext conftest$ac_exeext
13353 if { (eval echo "$as_me:13353: \"$ac_link\"") >&5
13354   (eval $ac_link) 2>&5
13355   ac_status=$?
13356   echo "$as_me:13356: \$? = $ac_status" >&5
13357   (exit $ac_status); } &&
13358          { ac_try='test -s conftest$ac_exeext'
13359   { (eval echo "$as_me:13359: \"$ac_try\"") >&5
13360   (eval $ac_try) 2>&5
13361   ac_status=$?
13362   echo "$as_me:13362: \$? = $ac_status" >&5
13363   (exit $ac_status); }; }; then
13364   ac_cv_lib_dbmalloc_debug_malloc=yes
13365 else
13366   echo "$as_me: failed program was:" >&5
13367 cat conftest.$ac_ext >&5
13368 ac_cv_lib_dbmalloc_debug_malloc=no
13369 fi
13370 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13371 LIBS=$ac_check_lib_save_LIBS
13372 fi
13373 echo "$as_me:13373: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13374 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13375 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13376   cat >>confdefs.h <<EOF
13377 #define HAVE_LIBDBMALLOC 1
13378 EOF
13379
13380   LIBS="-ldbmalloc $LIBS"
13381
13382 fi
13383
13384 fi
13385
13386 fi
13387
13388 echo "$as_me:13388: checking if you want to use valgrind for testing" >&5
13389 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13390
13391 # Check whether --with-valgrind or --without-valgrind was given.
13392 if test "${with_valgrind+set}" = set; then
13393   withval="$with_valgrind"
13394
13395 cat >>confdefs.h <<EOF
13396 #define USE_VALGRIND 1
13397 EOF
13398
13399         : ${with_cflags:=-g}
13400         : ${with_no_leaks:=yes}
13401          with_valgrind=yes
13402 else
13403   with_valgrind=
13404 fi;
13405 echo "$as_me:13405: result: ${with_valgrind:-no}" >&5
13406 echo "${ECHO_T}${with_valgrind:-no}" >&6
13407
13408 case .$with_cflags in #(vi
13409 .*-g*)
13410         case .$CFLAGS in #(vi
13411         .*-g*) #(vi
13412                 ;;
13413         *)
13414
13415 cf_fix_cppflags=no
13416 cf_new_cflags=
13417 cf_new_cppflags=
13418 cf_new_extra_cppflags=
13419
13420 for cf_add_cflags in -g
13421 do
13422 case $cf_fix_cppflags in
13423 no)
13424         case $cf_add_cflags in #(vi
13425         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13426                 case $cf_add_cflags in
13427                 -D*)
13428                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13429
13430                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13431                                 && test -z "${cf_tst_cflags}" \
13432                                 && cf_fix_cppflags=yes
13433
13434                         if test $cf_fix_cppflags = yes ; then
13435                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13436                                 continue
13437                         elif test "${cf_tst_cflags}" = "\"'" ; then
13438                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13439                                 continue
13440                         fi
13441                         ;;
13442                 esac
13443                 case "$CPPFLAGS" in
13444                 *$cf_add_cflags) #(vi
13445                         ;;
13446                 *) #(vi
13447                         case $cf_add_cflags in #(vi
13448                         -D*)
13449                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13450
13451 CPPFLAGS=`echo "$CPPFLAGS" | \
13452         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13453                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13454
13455                                 ;;
13456                         esac
13457                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13458                         ;;
13459                 esac
13460                 ;;
13461         *)
13462                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13463                 ;;
13464         esac
13465         ;;
13466 yes)
13467         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13468
13469         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13470
13471         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13472                 && test -z "${cf_tst_cflags}" \
13473                 && cf_fix_cppflags=no
13474         ;;
13475 esac
13476 done
13477
13478 if test -n "$cf_new_cflags" ; then
13479
13480         CFLAGS="$CFLAGS $cf_new_cflags"
13481 fi
13482
13483 if test -n "$cf_new_cppflags" ; then
13484
13485         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13486 fi
13487
13488 if test -n "$cf_new_extra_cppflags" ; then
13489
13490         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13491 fi
13492
13493                 ;;
13494         esac
13495         ;;
13496 esac
13497
13498 echo "$as_me:13498: checking if you want to perform memory-leak testing" >&5
13499 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13500
13501 # Check whether --enable-leaks or --disable-leaks was given.
13502 if test "${enable_leaks+set}" = set; then
13503   enableval="$enable_leaks"
13504   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13505 else
13506   : ${with_no_leaks:=no}
13507 fi;
13508 echo "$as_me:13508: result: $with_no_leaks" >&5
13509 echo "${ECHO_T}$with_no_leaks" >&6
13510
13511 if test "$with_no_leaks" = yes ; then
13512
13513 cat >>confdefs.h <<\EOF
13514 #define NO_LEAKS 1
13515 EOF
13516
13517 cat >>confdefs.h <<\EOF
13518 #define YY_NO_LEAKS 1
13519 EOF
13520
13521 fi
13522
13523 cat >>confdefs.h <<\EOF
13524 #define HAVE_NC_ALLOC_H 1
13525 EOF
13526
13527 ###     use option --enable-expanded to generate certain macros as functions
13528
13529 # Check whether --enable-expanded or --disable-expanded was given.
13530 if test "${enable_expanded+set}" = set; then
13531   enableval="$enable_expanded"
13532   test "x$enableval" = xyes &&
13533 cat >>confdefs.h <<\EOF
13534 #define NCURSES_EXPANDED 1
13535 EOF
13536
13537 fi;
13538
13539 ###     use option --disable-macros to suppress macros in favor of functions
13540
13541 # Check whether --enable-macros or --disable-macros was given.
13542 if test "${enable_macros+set}" = set; then
13543   enableval="$enable_macros"
13544   test "$enableval" = no &&
13545 cat >>confdefs.h <<\EOF
13546 #define NCURSES_NOMACROS 1
13547 EOF
13548
13549 fi;
13550
13551 # Normally we only add trace() to the debug-library.  Allow this to be
13552 # extended to all models of the ncurses library:
13553 cf_all_traces=no
13554 case "$CFLAGS $CPPFLAGS" in
13555 *-DTRACE*)
13556         cf_all_traces=yes
13557         ;;
13558 esac
13559
13560 echo "$as_me:13560: checking whether to add trace feature to all models" >&5
13561 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13562
13563 # Check whether --with-trace or --without-trace was given.
13564 if test "${with_trace+set}" = set; then
13565   withval="$with_trace"
13566   cf_with_trace=$withval
13567 else
13568   cf_with_trace=$cf_all_traces
13569 fi;
13570 echo "$as_me:13570: result: $cf_with_trace" >&5
13571 echo "${ECHO_T}$cf_with_trace" >&6
13572
13573 if test "x$cf_with_trace" = xyes ; then
13574         LIB_TRACING=all
13575         ADA_TRACE=TRUE
13576
13577 cf_fix_cppflags=no
13578 cf_new_cflags=
13579 cf_new_cppflags=
13580 cf_new_extra_cppflags=
13581
13582 for cf_add_cflags in -DTRACE
13583 do
13584 case $cf_fix_cppflags in
13585 no)
13586         case $cf_add_cflags in #(vi
13587         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13588                 case $cf_add_cflags in
13589                 -D*)
13590                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13591
13592                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13593                                 && test -z "${cf_tst_cflags}" \
13594                                 && cf_fix_cppflags=yes
13595
13596                         if test $cf_fix_cppflags = yes ; then
13597                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13598                                 continue
13599                         elif test "${cf_tst_cflags}" = "\"'" ; then
13600                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13601                                 continue
13602                         fi
13603                         ;;
13604                 esac
13605                 case "$CPPFLAGS" in
13606                 *$cf_add_cflags) #(vi
13607                         ;;
13608                 *) #(vi
13609                         case $cf_add_cflags in #(vi
13610                         -D*)
13611                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13612
13613 CPPFLAGS=`echo "$CPPFLAGS" | \
13614         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13615                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13616
13617                                 ;;
13618                         esac
13619                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13620                         ;;
13621                 esac
13622                 ;;
13623         *)
13624                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13625                 ;;
13626         esac
13627         ;;
13628 yes)
13629         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13630
13631         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13632
13633         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13634                 && test -z "${cf_tst_cflags}" \
13635                 && cf_fix_cppflags=no
13636         ;;
13637 esac
13638 done
13639
13640 if test -n "$cf_new_cflags" ; then
13641
13642         CFLAGS="$CFLAGS $cf_new_cflags"
13643 fi
13644
13645 if test -n "$cf_new_cppflags" ; then
13646
13647         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13648 fi
13649
13650 if test -n "$cf_new_extra_cppflags" ; then
13651
13652         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13653 fi
13654
13655 else
13656         LIB_TRACING=DEBUG
13657         ADA_TRACE=FALSE
13658 fi
13659
13660 ###     Checks for libraries.
13661 case $cf_cv_system_name in #(vi
13662 *mingw32*) #(vi
13663         LIBS=" -lpsapi $LIBS"
13664         ;;
13665 *)
13666 echo "$as_me:13666: checking for gettimeofday" >&5
13667 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13668 if test "${ac_cv_func_gettimeofday+set}" = set; then
13669   echo $ECHO_N "(cached) $ECHO_C" >&6
13670 else
13671   cat >conftest.$ac_ext <<_ACEOF
13672 #line 13672 "configure"
13673 #include "confdefs.h"
13674 /* System header to define __stub macros and hopefully few prototypes,
13675     which can conflict with char gettimeofday (); below.  */
13676 #include <assert.h>
13677 /* Override any gcc2 internal prototype to avoid an error.  */
13678 #ifdef __cplusplus
13679 extern "C"
13680 #endif
13681 /* We use char because int might match the return type of a gcc2
13682    builtin and then its argument prototype would still apply.  */
13683 char gettimeofday ();
13684 char (*f) ();
13685
13686 int
13687 main ()
13688 {
13689 /* The GNU C library defines this for functions which it implements
13690     to always fail with ENOSYS.  Some functions are actually named
13691     something starting with __ and the normal name is an alias.  */
13692 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13693 choke me
13694 #else
13695 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13696 #endif
13697
13698   ;
13699   return 0;
13700 }
13701 _ACEOF
13702 rm -f conftest.$ac_objext conftest$ac_exeext
13703 if { (eval echo "$as_me:13703: \"$ac_link\"") >&5
13704   (eval $ac_link) 2>&5
13705   ac_status=$?
13706   echo "$as_me:13706: \$? = $ac_status" >&5
13707   (exit $ac_status); } &&
13708          { ac_try='test -s conftest$ac_exeext'
13709   { (eval echo "$as_me:13709: \"$ac_try\"") >&5
13710   (eval $ac_try) 2>&5
13711   ac_status=$?
13712   echo "$as_me:13712: \$? = $ac_status" >&5
13713   (exit $ac_status); }; }; then
13714   ac_cv_func_gettimeofday=yes
13715 else
13716   echo "$as_me: failed program was:" >&5
13717 cat conftest.$ac_ext >&5
13718 ac_cv_func_gettimeofday=no
13719 fi
13720 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13721 fi
13722 echo "$as_me:13722: result: $ac_cv_func_gettimeofday" >&5
13723 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13724 if test $ac_cv_func_gettimeofday = yes; then
13725
13726 cat >>confdefs.h <<\EOF
13727 #define HAVE_GETTIMEOFDAY 1
13728 EOF
13729
13730 else
13731
13732 echo "$as_me:13732: checking for gettimeofday in -lbsd" >&5
13733 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13734 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13735   echo $ECHO_N "(cached) $ECHO_C" >&6
13736 else
13737   ac_check_lib_save_LIBS=$LIBS
13738 LIBS="-lbsd  $LIBS"
13739 cat >conftest.$ac_ext <<_ACEOF
13740 #line 13740 "configure"
13741 #include "confdefs.h"
13742
13743 /* Override any gcc2 internal prototype to avoid an error.  */
13744 #ifdef __cplusplus
13745 extern "C"
13746 #endif
13747 /* We use char because int might match the return type of a gcc2
13748    builtin and then its argument prototype would still apply.  */
13749 char gettimeofday ();
13750 int
13751 main ()
13752 {
13753 gettimeofday ();
13754   ;
13755   return 0;
13756 }
13757 _ACEOF
13758 rm -f conftest.$ac_objext conftest$ac_exeext
13759 if { (eval echo "$as_me:13759: \"$ac_link\"") >&5
13760   (eval $ac_link) 2>&5
13761   ac_status=$?
13762   echo "$as_me:13762: \$? = $ac_status" >&5
13763   (exit $ac_status); } &&
13764          { ac_try='test -s conftest$ac_exeext'
13765   { (eval echo "$as_me:13765: \"$ac_try\"") >&5
13766   (eval $ac_try) 2>&5
13767   ac_status=$?
13768   echo "$as_me:13768: \$? = $ac_status" >&5
13769   (exit $ac_status); }; }; then
13770   ac_cv_lib_bsd_gettimeofday=yes
13771 else
13772   echo "$as_me: failed program was:" >&5
13773 cat conftest.$ac_ext >&5
13774 ac_cv_lib_bsd_gettimeofday=no
13775 fi
13776 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13777 LIBS=$ac_check_lib_save_LIBS
13778 fi
13779 echo "$as_me:13779: result: $ac_cv_lib_bsd_gettimeofday" >&5
13780 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13781 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13782
13783 cat >>confdefs.h <<\EOF
13784 #define HAVE_GETTIMEOFDAY 1
13785 EOF
13786
13787         LIBS="-lbsd $LIBS"
13788 fi
13789
13790 fi
13791         ;;
13792 esac
13793
13794 echo "$as_me:13794: checking if -lm needed for math functions" >&5
13795 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13796 if test "${cf_cv_need_libm+set}" = set; then
13797   echo $ECHO_N "(cached) $ECHO_C" >&6
13798 else
13799
13800         cat >conftest.$ac_ext <<_ACEOF
13801 #line 13801 "configure"
13802 #include "confdefs.h"
13803
13804         #include <stdio.h>
13805         #include <math.h>
13806
13807 int
13808 main ()
13809 {
13810 double x = rand(); printf("result = %g\n", pow(sin(x),x))
13811   ;
13812   return 0;
13813 }
13814 _ACEOF
13815 rm -f conftest.$ac_objext conftest$ac_exeext
13816 if { (eval echo "$as_me:13816: \"$ac_link\"") >&5
13817   (eval $ac_link) 2>&5
13818   ac_status=$?
13819   echo "$as_me:13819: \$? = $ac_status" >&5
13820   (exit $ac_status); } &&
13821          { ac_try='test -s conftest$ac_exeext'
13822   { (eval echo "$as_me:13822: \"$ac_try\"") >&5
13823   (eval $ac_try) 2>&5
13824   ac_status=$?
13825   echo "$as_me:13825: \$? = $ac_status" >&5
13826   (exit $ac_status); }; }; then
13827   cf_cv_need_libm=no
13828 else
13829   echo "$as_me: failed program was:" >&5
13830 cat conftest.$ac_ext >&5
13831 cf_cv_need_libm=yes
13832 fi
13833 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13834 fi
13835 echo "$as_me:13835: result: $cf_cv_need_libm" >&5
13836 echo "${ECHO_T}$cf_cv_need_libm" >&6
13837 if test "$cf_cv_need_libm" = yes
13838 then
13839 MATH_LIB=-lm
13840 fi
13841
13842 ###     Checks for header files.
13843 echo "$as_me:13843: checking for ANSI C header files" >&5
13844 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13845 if test "${ac_cv_header_stdc+set}" = set; then
13846   echo $ECHO_N "(cached) $ECHO_C" >&6
13847 else
13848   cat >conftest.$ac_ext <<_ACEOF
13849 #line 13849 "configure"
13850 #include "confdefs.h"
13851 #include <stdlib.h>
13852 #include <stdarg.h>
13853 #include <string.h>
13854 #include <float.h>
13855
13856 _ACEOF
13857 if { (eval echo "$as_me:13857: \"$ac_cpp conftest.$ac_ext\"") >&5
13858   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13859   ac_status=$?
13860   egrep -v '^ *\+' conftest.er1 >conftest.err
13861   rm -f conftest.er1
13862   cat conftest.err >&5
13863   echo "$as_me:13863: \$? = $ac_status" >&5
13864   (exit $ac_status); } >/dev/null; then
13865   if test -s conftest.err; then
13866     ac_cpp_err=$ac_c_preproc_warn_flag
13867   else
13868     ac_cpp_err=
13869   fi
13870 else
13871   ac_cpp_err=yes
13872 fi
13873 if test -z "$ac_cpp_err"; then
13874   ac_cv_header_stdc=yes
13875 else
13876   echo "$as_me: failed program was:" >&5
13877   cat conftest.$ac_ext >&5
13878   ac_cv_header_stdc=no
13879 fi
13880 rm -f conftest.err conftest.$ac_ext
13881
13882 if test $ac_cv_header_stdc = yes; then
13883   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13884   cat >conftest.$ac_ext <<_ACEOF
13885 #line 13885 "configure"
13886 #include "confdefs.h"
13887 #include <string.h>
13888
13889 _ACEOF
13890 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13891   egrep "memchr" >/dev/null 2>&1; then
13892   :
13893 else
13894   ac_cv_header_stdc=no
13895 fi
13896 rm -rf conftest*
13897
13898 fi
13899
13900 if test $ac_cv_header_stdc = yes; then
13901   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13902   cat >conftest.$ac_ext <<_ACEOF
13903 #line 13903 "configure"
13904 #include "confdefs.h"
13905 #include <stdlib.h>
13906
13907 _ACEOF
13908 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13909   egrep "free" >/dev/null 2>&1; then
13910   :
13911 else
13912   ac_cv_header_stdc=no
13913 fi
13914 rm -rf conftest*
13915
13916 fi
13917
13918 if test $ac_cv_header_stdc = yes; then
13919   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13920   if test "$cross_compiling" = yes; then
13921   :
13922 else
13923   cat >conftest.$ac_ext <<_ACEOF
13924 #line 13924 "configure"
13925 #include "confdefs.h"
13926 #include <ctype.h>
13927 #if ((' ' & 0x0FF) == 0x020)
13928 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13929 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13930 #else
13931 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13932                      || ('j' <= (c) && (c) <= 'r') \
13933                      || ('s' <= (c) && (c) <= 'z'))
13934 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13935 #endif
13936
13937 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13938 int
13939 main ()
13940 {
13941   int i;
13942   for (i = 0; i < 256; i++)
13943     if (XOR (islower (i), ISLOWER (i))
13944         || toupper (i) != TOUPPER (i))
13945       $ac_main_return(2);
13946   $ac_main_return (0);
13947 }
13948 _ACEOF
13949 rm -f conftest$ac_exeext
13950 if { (eval echo "$as_me:13950: \"$ac_link\"") >&5
13951   (eval $ac_link) 2>&5
13952   ac_status=$?
13953   echo "$as_me:13953: \$? = $ac_status" >&5
13954   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13955   { (eval echo "$as_me:13955: \"$ac_try\"") >&5
13956   (eval $ac_try) 2>&5
13957   ac_status=$?
13958   echo "$as_me:13958: \$? = $ac_status" >&5
13959   (exit $ac_status); }; }; then
13960   :
13961 else
13962   echo "$as_me: program exited with status $ac_status" >&5
13963 echo "$as_me: failed program was:" >&5
13964 cat conftest.$ac_ext >&5
13965 ac_cv_header_stdc=no
13966 fi
13967 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13968 fi
13969 fi
13970 fi
13971 echo "$as_me:13971: result: $ac_cv_header_stdc" >&5
13972 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13973 if test $ac_cv_header_stdc = yes; then
13974
13975 cat >>confdefs.h <<\EOF
13976 #define STDC_HEADERS 1
13977 EOF
13978
13979 fi
13980
13981 ac_header_dirent=no
13982 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13983   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13984 echo "$as_me:13984: checking for $ac_hdr that defines DIR" >&5
13985 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13986 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13987   echo $ECHO_N "(cached) $ECHO_C" >&6
13988 else
13989   cat >conftest.$ac_ext <<_ACEOF
13990 #line 13990 "configure"
13991 #include "confdefs.h"
13992 #include <sys/types.h>
13993 #include <$ac_hdr>
13994
13995 int
13996 main ()
13997 {
13998 if ((DIR *) 0)
13999 return 0;
14000   ;
14001   return 0;
14002 }
14003 _ACEOF
14004 rm -f conftest.$ac_objext
14005 if { (eval echo "$as_me:14005: \"$ac_compile\"") >&5
14006   (eval $ac_compile) 2>&5
14007   ac_status=$?
14008   echo "$as_me:14008: \$? = $ac_status" >&5
14009   (exit $ac_status); } &&
14010          { ac_try='test -s conftest.$ac_objext'
14011   { (eval echo "$as_me:14011: \"$ac_try\"") >&5
14012   (eval $ac_try) 2>&5
14013   ac_status=$?
14014   echo "$as_me:14014: \$? = $ac_status" >&5
14015   (exit $ac_status); }; }; then
14016   eval "$as_ac_Header=yes"
14017 else
14018   echo "$as_me: failed program was:" >&5
14019 cat conftest.$ac_ext >&5
14020 eval "$as_ac_Header=no"
14021 fi
14022 rm -f conftest.$ac_objext conftest.$ac_ext
14023 fi
14024 echo "$as_me:14024: result: `eval echo '${'$as_ac_Header'}'`" >&5
14025 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14026 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14027   cat >>confdefs.h <<EOF
14028 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14029 EOF
14030
14031 ac_header_dirent=$ac_hdr; break
14032 fi
14033
14034 done
14035 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14036 if test $ac_header_dirent = dirent.h; then
14037   echo "$as_me:14037: checking for opendir in -ldir" >&5
14038 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14039 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14040   echo $ECHO_N "(cached) $ECHO_C" >&6
14041 else
14042   ac_check_lib_save_LIBS=$LIBS
14043 LIBS="-ldir  $LIBS"
14044 cat >conftest.$ac_ext <<_ACEOF
14045 #line 14045 "configure"
14046 #include "confdefs.h"
14047
14048 /* Override any gcc2 internal prototype to avoid an error.  */
14049 #ifdef __cplusplus
14050 extern "C"
14051 #endif
14052 /* We use char because int might match the return type of a gcc2
14053    builtin and then its argument prototype would still apply.  */
14054 char opendir ();
14055 int
14056 main ()
14057 {
14058 opendir ();
14059   ;
14060   return 0;
14061 }
14062 _ACEOF
14063 rm -f conftest.$ac_objext conftest$ac_exeext
14064 if { (eval echo "$as_me:14064: \"$ac_link\"") >&5
14065   (eval $ac_link) 2>&5
14066   ac_status=$?
14067   echo "$as_me:14067: \$? = $ac_status" >&5
14068   (exit $ac_status); } &&
14069          { ac_try='test -s conftest$ac_exeext'
14070   { (eval echo "$as_me:14070: \"$ac_try\"") >&5
14071   (eval $ac_try) 2>&5
14072   ac_status=$?
14073   echo "$as_me:14073: \$? = $ac_status" >&5
14074   (exit $ac_status); }; }; then
14075   ac_cv_lib_dir_opendir=yes
14076 else
14077   echo "$as_me: failed program was:" >&5
14078 cat conftest.$ac_ext >&5
14079 ac_cv_lib_dir_opendir=no
14080 fi
14081 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14082 LIBS=$ac_check_lib_save_LIBS
14083 fi
14084 echo "$as_me:14084: result: $ac_cv_lib_dir_opendir" >&5
14085 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14086 if test $ac_cv_lib_dir_opendir = yes; then
14087   LIBS="$LIBS -ldir"
14088 fi
14089
14090 else
14091   echo "$as_me:14091: checking for opendir in -lx" >&5
14092 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14093 if test "${ac_cv_lib_x_opendir+set}" = set; then
14094   echo $ECHO_N "(cached) $ECHO_C" >&6
14095 else
14096   ac_check_lib_save_LIBS=$LIBS
14097 LIBS="-lx  $LIBS"
14098 cat >conftest.$ac_ext <<_ACEOF
14099 #line 14099 "configure"
14100 #include "confdefs.h"
14101
14102 /* Override any gcc2 internal prototype to avoid an error.  */
14103 #ifdef __cplusplus
14104 extern "C"
14105 #endif
14106 /* We use char because int might match the return type of a gcc2
14107    builtin and then its argument prototype would still apply.  */
14108 char opendir ();
14109 int
14110 main ()
14111 {
14112 opendir ();
14113   ;
14114   return 0;
14115 }
14116 _ACEOF
14117 rm -f conftest.$ac_objext conftest$ac_exeext
14118 if { (eval echo "$as_me:14118: \"$ac_link\"") >&5
14119   (eval $ac_link) 2>&5
14120   ac_status=$?
14121   echo "$as_me:14121: \$? = $ac_status" >&5
14122   (exit $ac_status); } &&
14123          { ac_try='test -s conftest$ac_exeext'
14124   { (eval echo "$as_me:14124: \"$ac_try\"") >&5
14125   (eval $ac_try) 2>&5
14126   ac_status=$?
14127   echo "$as_me:14127: \$? = $ac_status" >&5
14128   (exit $ac_status); }; }; then
14129   ac_cv_lib_x_opendir=yes
14130 else
14131   echo "$as_me: failed program was:" >&5
14132 cat conftest.$ac_ext >&5
14133 ac_cv_lib_x_opendir=no
14134 fi
14135 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14136 LIBS=$ac_check_lib_save_LIBS
14137 fi
14138 echo "$as_me:14138: result: $ac_cv_lib_x_opendir" >&5
14139 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14140 if test $ac_cv_lib_x_opendir = yes; then
14141   LIBS="$LIBS -lx"
14142 fi
14143
14144 fi
14145
14146 echo "$as_me:14146: checking whether time.h and sys/time.h may both be included" >&5
14147 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14148 if test "${ac_cv_header_time+set}" = set; then
14149   echo $ECHO_N "(cached) $ECHO_C" >&6
14150 else
14151   cat >conftest.$ac_ext <<_ACEOF
14152 #line 14152 "configure"
14153 #include "confdefs.h"
14154 #include <sys/types.h>
14155 #include <sys/time.h>
14156 #include <time.h>
14157
14158 int
14159 main ()
14160 {
14161 if ((struct tm *) 0)
14162 return 0;
14163   ;
14164   return 0;
14165 }
14166 _ACEOF
14167 rm -f conftest.$ac_objext
14168 if { (eval echo "$as_me:14168: \"$ac_compile\"") >&5
14169   (eval $ac_compile) 2>&5
14170   ac_status=$?
14171   echo "$as_me:14171: \$? = $ac_status" >&5
14172   (exit $ac_status); } &&
14173          { ac_try='test -s conftest.$ac_objext'
14174   { (eval echo "$as_me:14174: \"$ac_try\"") >&5
14175   (eval $ac_try) 2>&5
14176   ac_status=$?
14177   echo "$as_me:14177: \$? = $ac_status" >&5
14178   (exit $ac_status); }; }; then
14179   ac_cv_header_time=yes
14180 else
14181   echo "$as_me: failed program was:" >&5
14182 cat conftest.$ac_ext >&5
14183 ac_cv_header_time=no
14184 fi
14185 rm -f conftest.$ac_objext conftest.$ac_ext
14186 fi
14187 echo "$as_me:14187: result: $ac_cv_header_time" >&5
14188 echo "${ECHO_T}$ac_cv_header_time" >&6
14189 if test $ac_cv_header_time = yes; then
14190
14191 cat >>confdefs.h <<\EOF
14192 #define TIME_WITH_SYS_TIME 1
14193 EOF
14194
14195 fi
14196
14197 cf_regex_func=no
14198
14199 cf_regex_libs="regex re"
14200 case $host_os in #(vi
14201 mingw*)
14202         cf_regex_libs="gnurx $cf_regex_libs"
14203         ;;
14204 esac
14205
14206 echo "$as_me:14206: checking for regcomp" >&5
14207 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14208 if test "${ac_cv_func_regcomp+set}" = set; then
14209   echo $ECHO_N "(cached) $ECHO_C" >&6
14210 else
14211   cat >conftest.$ac_ext <<_ACEOF
14212 #line 14212 "configure"
14213 #include "confdefs.h"
14214 /* System header to define __stub macros and hopefully few prototypes,
14215     which can conflict with char regcomp (); below.  */
14216 #include <assert.h>
14217 /* Override any gcc2 internal prototype to avoid an error.  */
14218 #ifdef __cplusplus
14219 extern "C"
14220 #endif
14221 /* We use char because int might match the return type of a gcc2
14222    builtin and then its argument prototype would still apply.  */
14223 char regcomp ();
14224 char (*f) ();
14225
14226 int
14227 main ()
14228 {
14229 /* The GNU C library defines this for functions which it implements
14230     to always fail with ENOSYS.  Some functions are actually named
14231     something starting with __ and the normal name is an alias.  */
14232 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14233 choke me
14234 #else
14235 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14236 #endif
14237
14238   ;
14239   return 0;
14240 }
14241 _ACEOF
14242 rm -f conftest.$ac_objext conftest$ac_exeext
14243 if { (eval echo "$as_me:14243: \"$ac_link\"") >&5
14244   (eval $ac_link) 2>&5
14245   ac_status=$?
14246   echo "$as_me:14246: \$? = $ac_status" >&5
14247   (exit $ac_status); } &&
14248          { ac_try='test -s conftest$ac_exeext'
14249   { (eval echo "$as_me:14249: \"$ac_try\"") >&5
14250   (eval $ac_try) 2>&5
14251   ac_status=$?
14252   echo "$as_me:14252: \$? = $ac_status" >&5
14253   (exit $ac_status); }; }; then
14254   ac_cv_func_regcomp=yes
14255 else
14256   echo "$as_me: failed program was:" >&5
14257 cat conftest.$ac_ext >&5
14258 ac_cv_func_regcomp=no
14259 fi
14260 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14261 fi
14262 echo "$as_me:14262: result: $ac_cv_func_regcomp" >&5
14263 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14264 if test $ac_cv_func_regcomp = yes; then
14265   cf_regex_func=regcomp
14266 else
14267
14268         for cf_regex_lib in $cf_regex_libs
14269         do
14270                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14271 echo "$as_me:14271: checking for regcomp in -l$cf_regex_lib" >&5
14272 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14273 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14274   echo $ECHO_N "(cached) $ECHO_C" >&6
14275 else
14276   ac_check_lib_save_LIBS=$LIBS
14277 LIBS="-l$cf_regex_lib  $LIBS"
14278 cat >conftest.$ac_ext <<_ACEOF
14279 #line 14279 "configure"
14280 #include "confdefs.h"
14281
14282 /* Override any gcc2 internal prototype to avoid an error.  */
14283 #ifdef __cplusplus
14284 extern "C"
14285 #endif
14286 /* We use char because int might match the return type of a gcc2
14287    builtin and then its argument prototype would still apply.  */
14288 char regcomp ();
14289 int
14290 main ()
14291 {
14292 regcomp ();
14293   ;
14294   return 0;
14295 }
14296 _ACEOF
14297 rm -f conftest.$ac_objext conftest$ac_exeext
14298 if { (eval echo "$as_me:14298: \"$ac_link\"") >&5
14299   (eval $ac_link) 2>&5
14300   ac_status=$?
14301   echo "$as_me:14301: \$? = $ac_status" >&5
14302   (exit $ac_status); } &&
14303          { ac_try='test -s conftest$ac_exeext'
14304   { (eval echo "$as_me:14304: \"$ac_try\"") >&5
14305   (eval $ac_try) 2>&5
14306   ac_status=$?
14307   echo "$as_me:14307: \$? = $ac_status" >&5
14308   (exit $ac_status); }; }; then
14309   eval "$as_ac_Lib=yes"
14310 else
14311   echo "$as_me: failed program was:" >&5
14312 cat conftest.$ac_ext >&5
14313 eval "$as_ac_Lib=no"
14314 fi
14315 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14316 LIBS=$ac_check_lib_save_LIBS
14317 fi
14318 echo "$as_me:14318: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14319 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14320 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14321
14322                                 LIBS="-l$cf_regex_lib $LIBS"
14323                                 cf_regex_func=regcomp
14324                                 break
14325 fi
14326
14327         done
14328
14329 fi
14330
14331 if test "$cf_regex_func" = no ; then
14332         echo "$as_me:14332: checking for compile" >&5
14333 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14334 if test "${ac_cv_func_compile+set}" = set; then
14335   echo $ECHO_N "(cached) $ECHO_C" >&6
14336 else
14337   cat >conftest.$ac_ext <<_ACEOF
14338 #line 14338 "configure"
14339 #include "confdefs.h"
14340 /* System header to define __stub macros and hopefully few prototypes,
14341     which can conflict with char compile (); below.  */
14342 #include <assert.h>
14343 /* Override any gcc2 internal prototype to avoid an error.  */
14344 #ifdef __cplusplus
14345 extern "C"
14346 #endif
14347 /* We use char because int might match the return type of a gcc2
14348    builtin and then its argument prototype would still apply.  */
14349 char compile ();
14350 char (*f) ();
14351
14352 int
14353 main ()
14354 {
14355 /* The GNU C library defines this for functions which it implements
14356     to always fail with ENOSYS.  Some functions are actually named
14357     something starting with __ and the normal name is an alias.  */
14358 #if defined (__stub_compile) || defined (__stub___compile)
14359 choke me
14360 #else
14361 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14362 #endif
14363
14364   ;
14365   return 0;
14366 }
14367 _ACEOF
14368 rm -f conftest.$ac_objext conftest$ac_exeext
14369 if { (eval echo "$as_me:14369: \"$ac_link\"") >&5
14370   (eval $ac_link) 2>&5
14371   ac_status=$?
14372   echo "$as_me:14372: \$? = $ac_status" >&5
14373   (exit $ac_status); } &&
14374          { ac_try='test -s conftest$ac_exeext'
14375   { (eval echo "$as_me:14375: \"$ac_try\"") >&5
14376   (eval $ac_try) 2>&5
14377   ac_status=$?
14378   echo "$as_me:14378: \$? = $ac_status" >&5
14379   (exit $ac_status); }; }; then
14380   ac_cv_func_compile=yes
14381 else
14382   echo "$as_me: failed program was:" >&5
14383 cat conftest.$ac_ext >&5
14384 ac_cv_func_compile=no
14385 fi
14386 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14387 fi
14388 echo "$as_me:14388: result: $ac_cv_func_compile" >&5
14389 echo "${ECHO_T}$ac_cv_func_compile" >&6
14390 if test $ac_cv_func_compile = yes; then
14391   cf_regex_func=compile
14392 else
14393
14394                 echo "$as_me:14394: checking for compile in -lgen" >&5
14395 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14396 if test "${ac_cv_lib_gen_compile+set}" = set; then
14397   echo $ECHO_N "(cached) $ECHO_C" >&6
14398 else
14399   ac_check_lib_save_LIBS=$LIBS
14400 LIBS="-lgen  $LIBS"
14401 cat >conftest.$ac_ext <<_ACEOF
14402 #line 14402 "configure"
14403 #include "confdefs.h"
14404
14405 /* Override any gcc2 internal prototype to avoid an error.  */
14406 #ifdef __cplusplus
14407 extern "C"
14408 #endif
14409 /* We use char because int might match the return type of a gcc2
14410    builtin and then its argument prototype would still apply.  */
14411 char compile ();
14412 int
14413 main ()
14414 {
14415 compile ();
14416   ;
14417   return 0;
14418 }
14419 _ACEOF
14420 rm -f conftest.$ac_objext conftest$ac_exeext
14421 if { (eval echo "$as_me:14421: \"$ac_link\"") >&5
14422   (eval $ac_link) 2>&5
14423   ac_status=$?
14424   echo "$as_me:14424: \$? = $ac_status" >&5
14425   (exit $ac_status); } &&
14426          { ac_try='test -s conftest$ac_exeext'
14427   { (eval echo "$as_me:14427: \"$ac_try\"") >&5
14428   (eval $ac_try) 2>&5
14429   ac_status=$?
14430   echo "$as_me:14430: \$? = $ac_status" >&5
14431   (exit $ac_status); }; }; then
14432   ac_cv_lib_gen_compile=yes
14433 else
14434   echo "$as_me: failed program was:" >&5
14435 cat conftest.$ac_ext >&5
14436 ac_cv_lib_gen_compile=no
14437 fi
14438 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14439 LIBS=$ac_check_lib_save_LIBS
14440 fi
14441 echo "$as_me:14441: result: $ac_cv_lib_gen_compile" >&5
14442 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14443 if test $ac_cv_lib_gen_compile = yes; then
14444
14445                                 LIBS="-lgen $LIBS"
14446                                 cf_regex_func=compile
14447 fi
14448
14449 fi
14450
14451 fi
14452
14453 if test "$cf_regex_func" = no ; then
14454         { echo "$as_me:14454: WARNING: cannot find regular expression library" >&5
14455 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14456 fi
14457
14458 echo "$as_me:14458: checking for regular-expression headers" >&5
14459 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14460 if test "${cf_cv_regex_hdrs+set}" = set; then
14461   echo $ECHO_N "(cached) $ECHO_C" >&6
14462 else
14463
14464 cf_cv_regex_hdrs=no
14465 case $cf_regex_func in #(vi
14466 compile) #(vi
14467         for cf_regex_hdr in regexp.h regexpr.h
14468         do
14469                 cat >conftest.$ac_ext <<_ACEOF
14470 #line 14470 "configure"
14471 #include "confdefs.h"
14472 #include <$cf_regex_hdr>
14473 int
14474 main ()
14475 {
14476
14477                         char *p = compile("", "", "", 0);
14478                         int x = step("", "");
14479
14480   ;
14481   return 0;
14482 }
14483 _ACEOF
14484 rm -f conftest.$ac_objext conftest$ac_exeext
14485 if { (eval echo "$as_me:14485: \"$ac_link\"") >&5
14486   (eval $ac_link) 2>&5
14487   ac_status=$?
14488   echo "$as_me:14488: \$? = $ac_status" >&5
14489   (exit $ac_status); } &&
14490          { ac_try='test -s conftest$ac_exeext'
14491   { (eval echo "$as_me:14491: \"$ac_try\"") >&5
14492   (eval $ac_try) 2>&5
14493   ac_status=$?
14494   echo "$as_me:14494: \$? = $ac_status" >&5
14495   (exit $ac_status); }; }; then
14496
14497                         cf_cv_regex_hdrs=$cf_regex_hdr
14498                         break
14499
14500 else
14501   echo "$as_me: failed program was:" >&5
14502 cat conftest.$ac_ext >&5
14503 fi
14504 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14505         done
14506         ;;
14507 *)
14508         for cf_regex_hdr in regex.h
14509         do
14510                 cat >conftest.$ac_ext <<_ACEOF
14511 #line 14511 "configure"
14512 #include "confdefs.h"
14513 #include <sys/types.h>
14514 #include <$cf_regex_hdr>
14515 int
14516 main ()
14517 {
14518
14519                         regex_t *p;
14520                         int x = regcomp(p, "", 0);
14521                         int y = regexec(p, "", 0, 0, 0);
14522                         regfree(p);
14523
14524   ;
14525   return 0;
14526 }
14527 _ACEOF
14528 rm -f conftest.$ac_objext conftest$ac_exeext
14529 if { (eval echo "$as_me:14529: \"$ac_link\"") >&5
14530   (eval $ac_link) 2>&5
14531   ac_status=$?
14532   echo "$as_me:14532: \$? = $ac_status" >&5
14533   (exit $ac_status); } &&
14534          { ac_try='test -s conftest$ac_exeext'
14535   { (eval echo "$as_me:14535: \"$ac_try\"") >&5
14536   (eval $ac_try) 2>&5
14537   ac_status=$?
14538   echo "$as_me:14538: \$? = $ac_status" >&5
14539   (exit $ac_status); }; }; then
14540
14541                         cf_cv_regex_hdrs=$cf_regex_hdr
14542                         break
14543
14544 else
14545   echo "$as_me: failed program was:" >&5
14546 cat conftest.$ac_ext >&5
14547 fi
14548 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14549         done
14550         ;;
14551 esac
14552
14553 fi
14554 echo "$as_me:14554: result: $cf_cv_regex_hdrs" >&5
14555 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14556
14557 case $cf_cv_regex_hdrs in #(vi
14558     no)        { echo "$as_me:14558: WARNING: no regular expression header found" >&5
14559 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14560     regex.h)
14561 cat >>confdefs.h <<\EOF
14562 #define HAVE_REGEX_H_FUNCS 1
14563 EOF
14564  ;; #(vi
14565     regexp.h)
14566 cat >>confdefs.h <<\EOF
14567 #define HAVE_REGEXP_H_FUNCS 1
14568 EOF
14569  ;; #(vi
14570     regexpr.h)
14571 cat >>confdefs.h <<\EOF
14572 #define HAVE_REGEXPR_H_FUNCS 1
14573 EOF
14574  ;;
14575 esac
14576
14577 for ac_header in \
14578 fcntl.h \
14579 getopt.h \
14580 limits.h \
14581 locale.h \
14582 math.h \
14583 poll.h \
14584 sys/bsdtypes.h \
14585 sys/ioctl.h \
14586 sys/param.h \
14587 sys/poll.h \
14588 sys/select.h \
14589 sys/time.h \
14590 sys/times.h \
14591 ttyent.h \
14592 unistd.h \
14593 wctype.h \
14594
14595 do
14596 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14597 echo "$as_me:14597: checking for $ac_header" >&5
14598 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14599 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14600   echo $ECHO_N "(cached) $ECHO_C" >&6
14601 else
14602   cat >conftest.$ac_ext <<_ACEOF
14603 #line 14603 "configure"
14604 #include "confdefs.h"
14605 #include <$ac_header>
14606 _ACEOF
14607 if { (eval echo "$as_me:14607: \"$ac_cpp conftest.$ac_ext\"") >&5
14608   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14609   ac_status=$?
14610   egrep -v '^ *\+' conftest.er1 >conftest.err
14611   rm -f conftest.er1
14612   cat conftest.err >&5
14613   echo "$as_me:14613: \$? = $ac_status" >&5
14614   (exit $ac_status); } >/dev/null; then
14615   if test -s conftest.err; then
14616     ac_cpp_err=$ac_c_preproc_warn_flag
14617   else
14618     ac_cpp_err=
14619   fi
14620 else
14621   ac_cpp_err=yes
14622 fi
14623 if test -z "$ac_cpp_err"; then
14624   eval "$as_ac_Header=yes"
14625 else
14626   echo "$as_me: failed program was:" >&5
14627   cat conftest.$ac_ext >&5
14628   eval "$as_ac_Header=no"
14629 fi
14630 rm -f conftest.err conftest.$ac_ext
14631 fi
14632 echo "$as_me:14632: result: `eval echo '${'$as_ac_Header'}'`" >&5
14633 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14634 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14635   cat >>confdefs.h <<EOF
14636 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14637 EOF
14638
14639 fi
14640 done
14641
14642 for ac_header in unistd.h getopt.h
14643 do
14644 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14645 echo "$as_me:14645: checking for $ac_header" >&5
14646 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14647 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14648   echo $ECHO_N "(cached) $ECHO_C" >&6
14649 else
14650   cat >conftest.$ac_ext <<_ACEOF
14651 #line 14651 "configure"
14652 #include "confdefs.h"
14653 #include <$ac_header>
14654 _ACEOF
14655 if { (eval echo "$as_me:14655: \"$ac_cpp conftest.$ac_ext\"") >&5
14656   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14657   ac_status=$?
14658   egrep -v '^ *\+' conftest.er1 >conftest.err
14659   rm -f conftest.er1
14660   cat conftest.err >&5
14661   echo "$as_me:14661: \$? = $ac_status" >&5
14662   (exit $ac_status); } >/dev/null; then
14663   if test -s conftest.err; then
14664     ac_cpp_err=$ac_c_preproc_warn_flag
14665   else
14666     ac_cpp_err=
14667   fi
14668 else
14669   ac_cpp_err=yes
14670 fi
14671 if test -z "$ac_cpp_err"; then
14672   eval "$as_ac_Header=yes"
14673 else
14674   echo "$as_me: failed program was:" >&5
14675   cat conftest.$ac_ext >&5
14676   eval "$as_ac_Header=no"
14677 fi
14678 rm -f conftest.err conftest.$ac_ext
14679 fi
14680 echo "$as_me:14680: result: `eval echo '${'$as_ac_Header'}'`" >&5
14681 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14682 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14683   cat >>confdefs.h <<EOF
14684 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14685 EOF
14686
14687 fi
14688 done
14689
14690 echo "$as_me:14690: checking for header declaring getopt variables" >&5
14691 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14692 if test "${cf_cv_getopt_header+set}" = set; then
14693   echo $ECHO_N "(cached) $ECHO_C" >&6
14694 else
14695
14696 cf_cv_getopt_header=none
14697 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14698 do
14699 cat >conftest.$ac_ext <<_ACEOF
14700 #line 14700 "configure"
14701 #include "confdefs.h"
14702
14703 #include <$cf_header>
14704 int
14705 main ()
14706 {
14707 int x = optind; char *y = optarg
14708   ;
14709   return 0;
14710 }
14711 _ACEOF
14712 rm -f conftest.$ac_objext
14713 if { (eval echo "$as_me:14713: \"$ac_compile\"") >&5
14714   (eval $ac_compile) 2>&5
14715   ac_status=$?
14716   echo "$as_me:14716: \$? = $ac_status" >&5
14717   (exit $ac_status); } &&
14718          { ac_try='test -s conftest.$ac_objext'
14719   { (eval echo "$as_me:14719: \"$ac_try\"") >&5
14720   (eval $ac_try) 2>&5
14721   ac_status=$?
14722   echo "$as_me:14722: \$? = $ac_status" >&5
14723   (exit $ac_status); }; }; then
14724   cf_cv_getopt_header=$cf_header
14725  break
14726 else
14727   echo "$as_me: failed program was:" >&5
14728 cat conftest.$ac_ext >&5
14729 fi
14730 rm -f conftest.$ac_objext conftest.$ac_ext
14731 done
14732
14733 fi
14734 echo "$as_me:14734: result: $cf_cv_getopt_header" >&5
14735 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14736 if test $cf_cv_getopt_header != none ; then
14737
14738 cat >>confdefs.h <<\EOF
14739 #define HAVE_GETOPT_HEADER 1
14740 EOF
14741
14742 fi
14743
14744 # check for ISC (this may also define _POSIX_SOURCE)
14745 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14746 if test "x$ISC" = xyes ; then
14747
14748 echo "$as_me:14748: checking for main in -lcposix" >&5
14749 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14750 if test "${ac_cv_lib_cposix_main+set}" = set; then
14751   echo $ECHO_N "(cached) $ECHO_C" >&6
14752 else
14753   ac_check_lib_save_LIBS=$LIBS
14754 LIBS="-lcposix  $LIBS"
14755 cat >conftest.$ac_ext <<_ACEOF
14756 #line 14756 "configure"
14757 #include "confdefs.h"
14758
14759 int
14760 main ()
14761 {
14762 main ();
14763   ;
14764   return 0;
14765 }
14766 _ACEOF
14767 rm -f conftest.$ac_objext conftest$ac_exeext
14768 if { (eval echo "$as_me:14768: \"$ac_link\"") >&5
14769   (eval $ac_link) 2>&5
14770   ac_status=$?
14771   echo "$as_me:14771: \$? = $ac_status" >&5
14772   (exit $ac_status); } &&
14773          { ac_try='test -s conftest$ac_exeext'
14774   { (eval echo "$as_me:14774: \"$ac_try\"") >&5
14775   (eval $ac_try) 2>&5
14776   ac_status=$?
14777   echo "$as_me:14777: \$? = $ac_status" >&5
14778   (exit $ac_status); }; }; then
14779   ac_cv_lib_cposix_main=yes
14780 else
14781   echo "$as_me: failed program was:" >&5
14782 cat conftest.$ac_ext >&5
14783 ac_cv_lib_cposix_main=no
14784 fi
14785 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14786 LIBS=$ac_check_lib_save_LIBS
14787 fi
14788 echo "$as_me:14788: result: $ac_cv_lib_cposix_main" >&5
14789 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14790 if test $ac_cv_lib_cposix_main = yes; then
14791   cat >>confdefs.h <<EOF
14792 #define HAVE_LIBCPOSIX 1
14793 EOF
14794
14795   LIBS="-lcposix $LIBS"
14796
14797 fi
14798
14799         echo "$as_me:14799: checking for bzero in -linet" >&5
14800 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14801 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14802   echo $ECHO_N "(cached) $ECHO_C" >&6
14803 else
14804   ac_check_lib_save_LIBS=$LIBS
14805 LIBS="-linet  $LIBS"
14806 cat >conftest.$ac_ext <<_ACEOF
14807 #line 14807 "configure"
14808 #include "confdefs.h"
14809
14810 /* Override any gcc2 internal prototype to avoid an error.  */
14811 #ifdef __cplusplus
14812 extern "C"
14813 #endif
14814 /* We use char because int might match the return type of a gcc2
14815    builtin and then its argument prototype would still apply.  */
14816 char bzero ();
14817 int
14818 main ()
14819 {
14820 bzero ();
14821   ;
14822   return 0;
14823 }
14824 _ACEOF
14825 rm -f conftest.$ac_objext conftest$ac_exeext
14826 if { (eval echo "$as_me:14826: \"$ac_link\"") >&5
14827   (eval $ac_link) 2>&5
14828   ac_status=$?
14829   echo "$as_me:14829: \$? = $ac_status" >&5
14830   (exit $ac_status); } &&
14831          { ac_try='test -s conftest$ac_exeext'
14832   { (eval echo "$as_me:14832: \"$ac_try\"") >&5
14833   (eval $ac_try) 2>&5
14834   ac_status=$?
14835   echo "$as_me:14835: \$? = $ac_status" >&5
14836   (exit $ac_status); }; }; then
14837   ac_cv_lib_inet_bzero=yes
14838 else
14839   echo "$as_me: failed program was:" >&5
14840 cat conftest.$ac_ext >&5
14841 ac_cv_lib_inet_bzero=no
14842 fi
14843 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14844 LIBS=$ac_check_lib_save_LIBS
14845 fi
14846 echo "$as_me:14846: result: $ac_cv_lib_inet_bzero" >&5
14847 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14848 if test $ac_cv_lib_inet_bzero = yes; then
14849   LIBS="-linet $LIBS"
14850 fi
14851 fi
14852
14853 echo "$as_me:14853: checking if sys/time.h works with sys/select.h" >&5
14854 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14855 if test "${cf_cv_sys_time_select+set}" = set; then
14856   echo $ECHO_N "(cached) $ECHO_C" >&6
14857 else
14858
14859 cat >conftest.$ac_ext <<_ACEOF
14860 #line 14860 "configure"
14861 #include "confdefs.h"
14862
14863 #include <sys/types.h>
14864 #ifdef HAVE_SYS_TIME_H
14865 #include <sys/time.h>
14866 #endif
14867 #ifdef HAVE_SYS_SELECT_H
14868 #include <sys/select.h>
14869 #endif
14870
14871 int
14872 main ()
14873 {
14874
14875   ;
14876   return 0;
14877 }
14878 _ACEOF
14879 rm -f conftest.$ac_objext
14880 if { (eval echo "$as_me:14880: \"$ac_compile\"") >&5
14881   (eval $ac_compile) 2>&5
14882   ac_status=$?
14883   echo "$as_me:14883: \$? = $ac_status" >&5
14884   (exit $ac_status); } &&
14885          { ac_try='test -s conftest.$ac_objext'
14886   { (eval echo "$as_me:14886: \"$ac_try\"") >&5
14887   (eval $ac_try) 2>&5
14888   ac_status=$?
14889   echo "$as_me:14889: \$? = $ac_status" >&5
14890   (exit $ac_status); }; }; then
14891   cf_cv_sys_time_select=yes
14892 else
14893   echo "$as_me: failed program was:" >&5
14894 cat conftest.$ac_ext >&5
14895 cf_cv_sys_time_select=no
14896 fi
14897 rm -f conftest.$ac_objext conftest.$ac_ext
14898
14899 fi
14900
14901 echo "$as_me:14901: result: $cf_cv_sys_time_select" >&5
14902 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14903 test "$cf_cv_sys_time_select" = yes &&
14904 cat >>confdefs.h <<\EOF
14905 #define HAVE_SYS_TIME_SELECT 1
14906 EOF
14907
14908 ###     checks for compiler characteristics
14909 ac_ext=c
14910 ac_cpp='$CPP $CPPFLAGS'
14911 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14912 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14913 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14914 ac_main_return=return
14915
14916 echo "$as_me:14916: checking for an ANSI C-conforming const" >&5
14917 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14918 if test "${ac_cv_c_const+set}" = set; then
14919   echo $ECHO_N "(cached) $ECHO_C" >&6
14920 else
14921   cat >conftest.$ac_ext <<_ACEOF
14922 #line 14922 "configure"
14923 #include "confdefs.h"
14924
14925 int
14926 main ()
14927 {
14928 /* FIXME: Include the comments suggested by Paul. */
14929 #ifndef __cplusplus
14930   /* Ultrix mips cc rejects this.  */
14931   typedef int charset[2];
14932   const charset x;
14933   /* SunOS 4.1.1 cc rejects this.  */
14934   char const *const *ccp;
14935   char **p;
14936   /* NEC SVR4.0.2 mips cc rejects this.  */
14937   struct point {int x, y;};
14938   static struct point const zero = {0,0};
14939   /* AIX XL C 1.02.0.0 rejects this.
14940      It does not let you subtract one const X* pointer from another in
14941      an arm of an if-expression whose if-part is not a constant
14942      expression */
14943   const char *g = "string";
14944   ccp = &g + (g ? g-g : 0);
14945   /* HPUX 7.0 cc rejects these. */
14946   ++ccp;
14947   p = (char**) ccp;
14948   ccp = (char const *const *) p;
14949   { /* SCO 3.2v4 cc rejects this.  */
14950     char *t;
14951     char const *s = 0 ? (char *) 0 : (char const *) 0;
14952
14953     *t++ = 0;
14954   }
14955   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14956     int x[] = {25, 17};
14957     const int *foo = &x[0];
14958     ++foo;
14959   }
14960   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14961     typedef const int *iptr;
14962     iptr p = 0;
14963     ++p;
14964   }
14965   { /* AIX XL C 1.02.0.0 rejects this saying
14966        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14967     struct s { int j; const int *ap[3]; };
14968     struct s *b; b->j = 5;
14969   }
14970   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14971     const int foo = 10;
14972   }
14973 #endif
14974
14975   ;
14976   return 0;
14977 }
14978 _ACEOF
14979 rm -f conftest.$ac_objext
14980 if { (eval echo "$as_me:14980: \"$ac_compile\"") >&5
14981   (eval $ac_compile) 2>&5
14982   ac_status=$?
14983   echo "$as_me:14983: \$? = $ac_status" >&5
14984   (exit $ac_status); } &&
14985          { ac_try='test -s conftest.$ac_objext'
14986   { (eval echo "$as_me:14986: \"$ac_try\"") >&5
14987   (eval $ac_try) 2>&5
14988   ac_status=$?
14989   echo "$as_me:14989: \$? = $ac_status" >&5
14990   (exit $ac_status); }; }; then
14991   ac_cv_c_const=yes
14992 else
14993   echo "$as_me: failed program was:" >&5
14994 cat conftest.$ac_ext >&5
14995 ac_cv_c_const=no
14996 fi
14997 rm -f conftest.$ac_objext conftest.$ac_ext
14998 fi
14999 echo "$as_me:14999: result: $ac_cv_c_const" >&5
15000 echo "${ECHO_T}$ac_cv_c_const" >&6
15001 if test $ac_cv_c_const = no; then
15002
15003 cat >>confdefs.h <<\EOF
15004 #define const
15005 EOF
15006
15007 fi
15008
15009 echo "$as_me:15009: checking for inline" >&5
15010 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15011 if test "${ac_cv_c_inline+set}" = set; then
15012   echo $ECHO_N "(cached) $ECHO_C" >&6
15013 else
15014   ac_cv_c_inline=no
15015 for ac_kw in inline __inline__ __inline; do
15016   cat >conftest.$ac_ext <<_ACEOF
15017 #line 15017 "configure"
15018 #include "confdefs.h"
15019 #ifndef __cplusplus
15020 static $ac_kw int static_foo () {return 0; }
15021 $ac_kw int foo () {return 0; }
15022 #endif
15023
15024 _ACEOF
15025 rm -f conftest.$ac_objext
15026 if { (eval echo "$as_me:15026: \"$ac_compile\"") >&5
15027   (eval $ac_compile) 2>&5
15028   ac_status=$?
15029   echo "$as_me:15029: \$? = $ac_status" >&5
15030   (exit $ac_status); } &&
15031          { ac_try='test -s conftest.$ac_objext'
15032   { (eval echo "$as_me:15032: \"$ac_try\"") >&5
15033   (eval $ac_try) 2>&5
15034   ac_status=$?
15035   echo "$as_me:15035: \$? = $ac_status" >&5
15036   (exit $ac_status); }; }; then
15037   ac_cv_c_inline=$ac_kw; break
15038 else
15039   echo "$as_me: failed program was:" >&5
15040 cat conftest.$ac_ext >&5
15041 fi
15042 rm -f conftest.$ac_objext conftest.$ac_ext
15043 done
15044
15045 fi
15046 echo "$as_me:15046: result: $ac_cv_c_inline" >&5
15047 echo "${ECHO_T}$ac_cv_c_inline" >&6
15048 case $ac_cv_c_inline in
15049   inline | yes) ;;
15050   no)
15051 cat >>confdefs.h <<\EOF
15052 #define inline
15053 EOF
15054  ;;
15055   *)  cat >>confdefs.h <<EOF
15056 #define inline $ac_cv_c_inline
15057 EOF
15058  ;;
15059 esac
15060
15061 NCURSES_INLINE=
15062 if test "$ac_cv_c_inline" != no ; then
15063   NCURSES_INLINE=inline
15064   if test "$INTEL_COMPILER" = yes
15065   then
15066     :
15067   elif test "$CLANG_COMPILER" = yes
15068   then
15069     :
15070   elif test "$GCC" = yes
15071   then
15072     echo "$as_me:15072: checking if $CC supports options to tune inlining" >&5
15073 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15074 if test "${cf_cv_gcc_inline+set}" = set; then
15075   echo $ECHO_N "(cached) $ECHO_C" >&6
15076 else
15077
15078       cf_save_CFLAGS=$CFLAGS
15079       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15080       cat >conftest.$ac_ext <<_ACEOF
15081 #line 15081 "configure"
15082 #include "confdefs.h"
15083 inline int foo(void) { return 1; }
15084 int
15085 main ()
15086 {
15087 ${cf_cv_main_return:-return} foo()
15088   ;
15089   return 0;
15090 }
15091 _ACEOF
15092 rm -f conftest.$ac_objext
15093 if { (eval echo "$as_me:15093: \"$ac_compile\"") >&5
15094   (eval $ac_compile) 2>&5
15095   ac_status=$?
15096   echo "$as_me:15096: \$? = $ac_status" >&5
15097   (exit $ac_status); } &&
15098          { ac_try='test -s conftest.$ac_objext'
15099   { (eval echo "$as_me:15099: \"$ac_try\"") >&5
15100   (eval $ac_try) 2>&5
15101   ac_status=$?
15102   echo "$as_me:15102: \$? = $ac_status" >&5
15103   (exit $ac_status); }; }; then
15104   cf_cv_gcc_inline=yes
15105 else
15106   echo "$as_me: failed program was:" >&5
15107 cat conftest.$ac_ext >&5
15108 cf_cv_gcc_inline=no
15109 fi
15110 rm -f conftest.$ac_objext conftest.$ac_ext
15111       CFLAGS=$cf_save_CFLAGS
15112
15113 fi
15114 echo "$as_me:15114: result: $cf_cv_gcc_inline" >&5
15115 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15116     if test "$cf_cv_gcc_inline" = yes ; then
15117
15118 cf_fix_cppflags=no
15119 cf_new_cflags=
15120 cf_new_cppflags=
15121 cf_new_extra_cppflags=
15122
15123 for cf_add_cflags in --param max-inline-insns-single=1200
15124 do
15125 case $cf_fix_cppflags in
15126 no)
15127         case $cf_add_cflags in #(vi
15128         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15129                 case $cf_add_cflags in
15130                 -D*)
15131                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15132
15133                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15134                                 && test -z "${cf_tst_cflags}" \
15135                                 && cf_fix_cppflags=yes
15136
15137                         if test $cf_fix_cppflags = yes ; then
15138                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15139                                 continue
15140                         elif test "${cf_tst_cflags}" = "\"'" ; then
15141                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15142                                 continue
15143                         fi
15144                         ;;
15145                 esac
15146                 case "$CPPFLAGS" in
15147                 *$cf_add_cflags) #(vi
15148                         ;;
15149                 *) #(vi
15150                         case $cf_add_cflags in #(vi
15151                         -D*)
15152                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15153
15154 CPPFLAGS=`echo "$CPPFLAGS" | \
15155         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15156                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15157
15158                                 ;;
15159                         esac
15160                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15161                         ;;
15162                 esac
15163                 ;;
15164         *)
15165                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15166                 ;;
15167         esac
15168         ;;
15169 yes)
15170         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15171
15172         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15173
15174         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15175                 && test -z "${cf_tst_cflags}" \
15176                 && cf_fix_cppflags=no
15177         ;;
15178 esac
15179 done
15180
15181 if test -n "$cf_new_cflags" ; then
15182
15183         CFLAGS="$CFLAGS $cf_new_cflags"
15184 fi
15185
15186 if test -n "$cf_new_cppflags" ; then
15187
15188         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15189 fi
15190
15191 if test -n "$cf_new_extra_cppflags" ; then
15192
15193         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15194 fi
15195
15196     fi
15197   fi
15198 fi
15199
15200 echo "$as_me:15200: checking for signal global datatype" >&5
15201 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15202 if test "${cf_cv_sig_atomic_t+set}" = set; then
15203   echo $ECHO_N "(cached) $ECHO_C" >&6
15204 else
15205
15206         for cf_type in \
15207                 "volatile sig_atomic_t" \
15208                 "sig_atomic_t" \
15209                 "int"
15210         do
15211         cat >conftest.$ac_ext <<_ACEOF
15212 #line 15212 "configure"
15213 #include "confdefs.h"
15214
15215 #include <sys/types.h>
15216 #include <signal.h>
15217 #include <stdio.h>
15218
15219 extern $cf_type x;
15220 $cf_type x;
15221 static void handler(int sig)
15222 {
15223         x = 5;
15224 }
15225 int
15226 main ()
15227 {
15228 signal(SIGINT, handler);
15229                  x = 1
15230   ;
15231   return 0;
15232 }
15233 _ACEOF
15234 rm -f conftest.$ac_objext
15235 if { (eval echo "$as_me:15235: \"$ac_compile\"") >&5
15236   (eval $ac_compile) 2>&5
15237   ac_status=$?
15238   echo "$as_me:15238: \$? = $ac_status" >&5
15239   (exit $ac_status); } &&
15240          { ac_try='test -s conftest.$ac_objext'
15241   { (eval echo "$as_me:15241: \"$ac_try\"") >&5
15242   (eval $ac_try) 2>&5
15243   ac_status=$?
15244   echo "$as_me:15244: \$? = $ac_status" >&5
15245   (exit $ac_status); }; }; then
15246   cf_cv_sig_atomic_t=$cf_type
15247 else
15248   echo "$as_me: failed program was:" >&5
15249 cat conftest.$ac_ext >&5
15250 cf_cv_sig_atomic_t=no
15251 fi
15252 rm -f conftest.$ac_objext conftest.$ac_ext
15253                 test "$cf_cv_sig_atomic_t" != no && break
15254         done
15255
15256 fi
15257
15258 echo "$as_me:15258: result: $cf_cv_sig_atomic_t" >&5
15259 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15260 test "$cf_cv_sig_atomic_t" != no &&
15261 cat >>confdefs.h <<EOF
15262 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15263 EOF
15264
15265 if test $NCURSES_CHTYPE = auto ; then
15266
15267 echo "$as_me:15267: checking for type of chtype" >&5
15268 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15269 if test "${cf_cv_typeof_chtype+set}" = set; then
15270   echo $ECHO_N "(cached) $ECHO_C" >&6
15271 else
15272
15273                 if test "$cross_compiling" = yes; then
15274   cf_cv_typeof_chtype=long
15275 else
15276   cat >conftest.$ac_ext <<_ACEOF
15277 #line 15277 "configure"
15278 #include "confdefs.h"
15279
15280 #define WANT_BITS 31
15281 #include <stdio.h>
15282 int main()
15283 {
15284         FILE *fp = fopen("cf_test.out", "w");
15285         if (fp != 0) {
15286                 char *result = "long";
15287                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15288                         int n;
15289                         unsigned int x, y;
15290                         for (n = 0; n < WANT_BITS; n++) {
15291                                 x = (1 << n);
15292                                 y = (x >> n);
15293                                 if (y != 1 || x == 0) {
15294                                         x = 0;
15295                                         break;
15296                                 }
15297                         }
15298                         /*
15299                          * If x is nonzero, an int is big enough for the bits
15300                          * that we want.
15301                          */
15302                         result = (x != 0) ? "int" : "long";
15303                 }
15304                 fputs(result, fp);
15305                 fclose(fp);
15306         }
15307         ${cf_cv_main_return:-return}(0);
15308 }
15309
15310 _ACEOF
15311 rm -f conftest$ac_exeext
15312 if { (eval echo "$as_me:15312: \"$ac_link\"") >&5
15313   (eval $ac_link) 2>&5
15314   ac_status=$?
15315   echo "$as_me:15315: \$? = $ac_status" >&5
15316   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15317   { (eval echo "$as_me:15317: \"$ac_try\"") >&5
15318   (eval $ac_try) 2>&5
15319   ac_status=$?
15320   echo "$as_me:15320: \$? = $ac_status" >&5
15321   (exit $ac_status); }; }; then
15322   cf_cv_typeof_chtype=`cat cf_test.out`
15323 else
15324   echo "$as_me: program exited with status $ac_status" >&5
15325 echo "$as_me: failed program was:" >&5
15326 cat conftest.$ac_ext >&5
15327 cf_cv_typeof_chtype=long
15328 fi
15329 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15330 fi
15331                 rm -f cf_test.out
15332
15333 fi
15334
15335 echo "$as_me:15335: result: $cf_cv_typeof_chtype" >&5
15336 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15337
15338 cat >>confdefs.h <<EOF
15339 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15340 EOF
15341
15342 else
15343         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15344 fi
15345 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15346
15347 echo "$as_me:15347: checking if unsigned literals are legal" >&5
15348 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15349 if test "${cf_cv_unsigned_literals+set}" = set; then
15350   echo $ECHO_N "(cached) $ECHO_C" >&6
15351 else
15352
15353         cat >conftest.$ac_ext <<_ACEOF
15354 #line 15354 "configure"
15355 #include "confdefs.h"
15356
15357 int
15358 main ()
15359 {
15360 long x = 1L + 1UL + 1U + 1
15361   ;
15362   return 0;
15363 }
15364 _ACEOF
15365 rm -f conftest.$ac_objext
15366 if { (eval echo "$as_me:15366: \"$ac_compile\"") >&5
15367   (eval $ac_compile) 2>&5
15368   ac_status=$?
15369   echo "$as_me:15369: \$? = $ac_status" >&5
15370   (exit $ac_status); } &&
15371          { ac_try='test -s conftest.$ac_objext'
15372   { (eval echo "$as_me:15372: \"$ac_try\"") >&5
15373   (eval $ac_try) 2>&5
15374   ac_status=$?
15375   echo "$as_me:15375: \$? = $ac_status" >&5
15376   (exit $ac_status); }; }; then
15377   cf_cv_unsigned_literals=yes
15378 else
15379   echo "$as_me: failed program was:" >&5
15380 cat conftest.$ac_ext >&5
15381 cf_cv_unsigned_literals=no
15382 fi
15383 rm -f conftest.$ac_objext conftest.$ac_ext
15384
15385 fi
15386
15387 echo "$as_me:15387: result: $cf_cv_unsigned_literals" >&5
15388 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15389
15390 cf_cv_1UL="1"
15391 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15392 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15393
15394 if test $NCURSES_MMASK_T = auto ; then
15395         cf_cv_typeof_mmask_t=long
15396 else
15397         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15398 fi
15399 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15400
15401 ###     Checks for external-data
15402
15403 echo "$as_me:15403: checking if external errno is declared" >&5
15404 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15405 if test "${cf_cv_dcl_errno+set}" = set; then
15406   echo $ECHO_N "(cached) $ECHO_C" >&6
15407 else
15408
15409     cat >conftest.$ac_ext <<_ACEOF
15410 #line 15410 "configure"
15411 #include "confdefs.h"
15412
15413 #ifdef HAVE_STDLIB_H
15414 #include <stdlib.h>
15415 #endif
15416 #include <stdio.h>
15417 #include <sys/types.h>
15418 #include <errno.h>
15419 int
15420 main ()
15421 {
15422 int x = (int) errno
15423   ;
15424   return 0;
15425 }
15426 _ACEOF
15427 rm -f conftest.$ac_objext
15428 if { (eval echo "$as_me:15428: \"$ac_compile\"") >&5
15429   (eval $ac_compile) 2>&5
15430   ac_status=$?
15431   echo "$as_me:15431: \$? = $ac_status" >&5
15432   (exit $ac_status); } &&
15433          { ac_try='test -s conftest.$ac_objext'
15434   { (eval echo "$as_me:15434: \"$ac_try\"") >&5
15435   (eval $ac_try) 2>&5
15436   ac_status=$?
15437   echo "$as_me:15437: \$? = $ac_status" >&5
15438   (exit $ac_status); }; }; then
15439   cf_cv_dcl_errno=yes
15440 else
15441   echo "$as_me: failed program was:" >&5
15442 cat conftest.$ac_ext >&5
15443 cf_cv_dcl_errno=no
15444 fi
15445 rm -f conftest.$ac_objext conftest.$ac_ext
15446
15447 fi
15448 echo "$as_me:15448: result: $cf_cv_dcl_errno" >&5
15449 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15450
15451 if test "$cf_cv_dcl_errno" = no ; then
15452
15453 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15454
15455     cat >>confdefs.h <<EOF
15456 #define $cf_result 1
15457 EOF
15458
15459 fi
15460
15461 # It's possible (for near-UNIX clones) that the data doesn't exist
15462
15463 echo "$as_me:15463: checking if external errno exists" >&5
15464 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15465 if test "${cf_cv_have_errno+set}" = set; then
15466   echo $ECHO_N "(cached) $ECHO_C" >&6
15467 else
15468
15469     cat >conftest.$ac_ext <<_ACEOF
15470 #line 15470 "configure"
15471 #include "confdefs.h"
15472
15473 #undef errno
15474 extern int errno;
15475
15476 int
15477 main ()
15478 {
15479 errno = 2
15480   ;
15481   return 0;
15482 }
15483 _ACEOF
15484 rm -f conftest.$ac_objext conftest$ac_exeext
15485 if { (eval echo "$as_me:15485: \"$ac_link\"") >&5
15486   (eval $ac_link) 2>&5
15487   ac_status=$?
15488   echo "$as_me:15488: \$? = $ac_status" >&5
15489   (exit $ac_status); } &&
15490          { ac_try='test -s conftest$ac_exeext'
15491   { (eval echo "$as_me:15491: \"$ac_try\"") >&5
15492   (eval $ac_try) 2>&5
15493   ac_status=$?
15494   echo "$as_me:15494: \$? = $ac_status" >&5
15495   (exit $ac_status); }; }; then
15496   cf_cv_have_errno=yes
15497 else
15498   echo "$as_me: failed program was:" >&5
15499 cat conftest.$ac_ext >&5
15500 cf_cv_have_errno=no
15501 fi
15502 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15503
15504 fi
15505 echo "$as_me:15505: result: $cf_cv_have_errno" >&5
15506 echo "${ECHO_T}$cf_cv_have_errno" >&6
15507
15508 if test "$cf_cv_have_errno" = yes ; then
15509
15510 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15511
15512     cat >>confdefs.h <<EOF
15513 #define $cf_result 1
15514 EOF
15515
15516 fi
15517
15518 echo "$as_me:15518: checking if data-only library module links" >&5
15519 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15520 if test "${cf_cv_link_dataonly+set}" = set; then
15521   echo $ECHO_N "(cached) $ECHO_C" >&6
15522 else
15523
15524         rm -f conftest.a
15525         cat >conftest.$ac_ext <<EOF
15526 #line 15526 "configure"
15527 int     testdata[3] = { 123, 456, 789 };
15528 EOF
15529         if { (eval echo "$as_me:15529: \"$ac_compile\"") >&5
15530   (eval $ac_compile) 2>&5
15531   ac_status=$?
15532   echo "$as_me:15532: \$? = $ac_status" >&5
15533   (exit $ac_status); } ; then
15534                 mv conftest.o data.o && \
15535                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15536         fi
15537         rm -f conftest.$ac_ext data.o
15538         cat >conftest.$ac_ext <<EOF
15539 #line 15539 "configure"
15540 int     testfunc()
15541 {
15542 #if defined(NeXT)
15543         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15544 #else
15545         extern int testdata[3];
15546         return testdata[0] == 123
15547            &&  testdata[1] == 456
15548            &&  testdata[2] == 789;
15549 #endif
15550 }
15551 EOF
15552         if { (eval echo "$as_me:15552: \"$ac_compile\"") >&5
15553   (eval $ac_compile) 2>&5
15554   ac_status=$?
15555   echo "$as_me:15555: \$? = $ac_status" >&5
15556   (exit $ac_status); }; then
15557                 mv conftest.o func.o && \
15558                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15559         fi
15560         rm -f conftest.$ac_ext func.o
15561         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15562         cf_saveLIBS="$LIBS"
15563         LIBS="conftest.a $LIBS"
15564         if test "$cross_compiling" = yes; then
15565   cf_cv_link_dataonly=unknown
15566 else
15567   cat >conftest.$ac_ext <<_ACEOF
15568 #line 15568 "configure"
15569 #include "confdefs.h"
15570
15571         int main()
15572         {
15573                 extern int testfunc();
15574                 ${cf_cv_main_return:-return} (!testfunc());
15575         }
15576
15577 _ACEOF
15578 rm -f conftest$ac_exeext
15579 if { (eval echo "$as_me:15579: \"$ac_link\"") >&5
15580   (eval $ac_link) 2>&5
15581   ac_status=$?
15582   echo "$as_me:15582: \$? = $ac_status" >&5
15583   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15584   { (eval echo "$as_me:15584: \"$ac_try\"") >&5
15585   (eval $ac_try) 2>&5
15586   ac_status=$?
15587   echo "$as_me:15587: \$? = $ac_status" >&5
15588   (exit $ac_status); }; }; then
15589   cf_cv_link_dataonly=yes
15590 else
15591   echo "$as_me: program exited with status $ac_status" >&5
15592 echo "$as_me: failed program was:" >&5
15593 cat conftest.$ac_ext >&5
15594 cf_cv_link_dataonly=no
15595 fi
15596 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15597 fi
15598         LIBS="$cf_saveLIBS"
15599
15600 fi
15601
15602 echo "$as_me:15602: result: $cf_cv_link_dataonly" >&5
15603 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15604
15605 if test "$cf_cv_link_dataonly" = no ; then
15606
15607 cat >>confdefs.h <<\EOF
15608 #define BROKEN_LINKER 1
15609 EOF
15610
15611         BROKEN_LINKER=1
15612 fi
15613
15614 ###     Checks for library functions.
15615
15616 for ac_func in \
15617 getcwd \
15618 getegid \
15619 geteuid \
15620 getttynam \
15621 issetugid \
15622 poll \
15623 putenv \
15624 remove \
15625 select \
15626 setbuf \
15627 setbuffer \
15628 setenv \
15629 setvbuf \
15630 sigaction \
15631 sigvec \
15632 strdup \
15633 strstr \
15634 tcgetpgrp \
15635 times \
15636 vsnprintf \
15637
15638 do
15639 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15640 echo "$as_me:15640: checking for $ac_func" >&5
15641 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15642 if eval "test \"\${$as_ac_var+set}\" = set"; then
15643   echo $ECHO_N "(cached) $ECHO_C" >&6
15644 else
15645   cat >conftest.$ac_ext <<_ACEOF
15646 #line 15646 "configure"
15647 #include "confdefs.h"
15648 /* System header to define __stub macros and hopefully few prototypes,
15649     which can conflict with char $ac_func (); below.  */
15650 #include <assert.h>
15651 /* Override any gcc2 internal prototype to avoid an error.  */
15652 #ifdef __cplusplus
15653 extern "C"
15654 #endif
15655 /* We use char because int might match the return type of a gcc2
15656    builtin and then its argument prototype would still apply.  */
15657 char $ac_func ();
15658 char (*f) ();
15659
15660 int
15661 main ()
15662 {
15663 /* The GNU C library defines this for functions which it implements
15664     to always fail with ENOSYS.  Some functions are actually named
15665     something starting with __ and the normal name is an alias.  */
15666 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15667 choke me
15668 #else
15669 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15670 #endif
15671
15672   ;
15673   return 0;
15674 }
15675 _ACEOF
15676 rm -f conftest.$ac_objext conftest$ac_exeext
15677 if { (eval echo "$as_me:15677: \"$ac_link\"") >&5
15678   (eval $ac_link) 2>&5
15679   ac_status=$?
15680   echo "$as_me:15680: \$? = $ac_status" >&5
15681   (exit $ac_status); } &&
15682          { ac_try='test -s conftest$ac_exeext'
15683   { (eval echo "$as_me:15683: \"$ac_try\"") >&5
15684   (eval $ac_try) 2>&5
15685   ac_status=$?
15686   echo "$as_me:15686: \$? = $ac_status" >&5
15687   (exit $ac_status); }; }; then
15688   eval "$as_ac_var=yes"
15689 else
15690   echo "$as_me: failed program was:" >&5
15691 cat conftest.$ac_ext >&5
15692 eval "$as_ac_var=no"
15693 fi
15694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15695 fi
15696 echo "$as_me:15696: result: `eval echo '${'$as_ac_var'}'`" >&5
15697 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15698 if test `eval echo '${'$as_ac_var'}'` = yes; then
15699   cat >>confdefs.h <<EOF
15700 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15701 EOF
15702
15703 fi
15704 done
15705
15706 if test "x$with_getcap" = "xyes" ; then
15707
15708 echo "$as_me:15708: checking for terminal-capability database functions" >&5
15709 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15710 if test "${cf_cv_cgetent+set}" = set; then
15711   echo $ECHO_N "(cached) $ECHO_C" >&6
15712 else
15713
15714 cat >conftest.$ac_ext <<_ACEOF
15715 #line 15715 "configure"
15716 #include "confdefs.h"
15717
15718 #include <stdlib.h>
15719 int
15720 main ()
15721 {
15722
15723         char temp[128];
15724         char *buf = temp;
15725         char *db_array = temp;
15726         cgetent(&buf, &db_array, "vt100");
15727         cgetcap(buf, "tc", '=');
15728         cgetmatch(buf, "tc");
15729
15730   ;
15731   return 0;
15732 }
15733 _ACEOF
15734 rm -f conftest.$ac_objext conftest$ac_exeext
15735 if { (eval echo "$as_me:15735: \"$ac_link\"") >&5
15736   (eval $ac_link) 2>&5
15737   ac_status=$?
15738   echo "$as_me:15738: \$? = $ac_status" >&5
15739   (exit $ac_status); } &&
15740          { ac_try='test -s conftest$ac_exeext'
15741   { (eval echo "$as_me:15741: \"$ac_try\"") >&5
15742   (eval $ac_try) 2>&5
15743   ac_status=$?
15744   echo "$as_me:15744: \$? = $ac_status" >&5
15745   (exit $ac_status); }; }; then
15746   cf_cv_cgetent=yes
15747 else
15748   echo "$as_me: failed program was:" >&5
15749 cat conftest.$ac_ext >&5
15750 cf_cv_cgetent=no
15751 fi
15752 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15753
15754 fi
15755 echo "$as_me:15755: result: $cf_cv_cgetent" >&5
15756 echo "${ECHO_T}$cf_cv_cgetent" >&6
15757
15758 if test "$cf_cv_cgetent" = yes
15759 then
15760
15761 cat >>confdefs.h <<\EOF
15762 #define HAVE_BSD_CGETENT 1
15763 EOF
15764
15765 echo "$as_me:15765: checking if cgetent uses const parameter" >&5
15766 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15767 if test "${cf_cv_cgetent_const+set}" = set; then
15768   echo $ECHO_N "(cached) $ECHO_C" >&6
15769 else
15770
15771 cat >conftest.$ac_ext <<_ACEOF
15772 #line 15772 "configure"
15773 #include "confdefs.h"
15774
15775 #include <stdlib.h>
15776 int
15777 main ()
15778 {
15779
15780         char temp[128];
15781         char *buf = temp;
15782 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15783         const char *db_array = temp;
15784         cgetent(&buf, &db_array, "vt100");
15785 #endif
15786         cgetcap(buf, "tc", '=');
15787         cgetmatch(buf, "tc");
15788
15789   ;
15790   return 0;
15791 }
15792 _ACEOF
15793 rm -f conftest.$ac_objext conftest$ac_exeext
15794 if { (eval echo "$as_me:15794: \"$ac_link\"") >&5
15795   (eval $ac_link) 2>&5
15796   ac_status=$?
15797   echo "$as_me:15797: \$? = $ac_status" >&5
15798   (exit $ac_status); } &&
15799          { ac_try='test -s conftest$ac_exeext'
15800   { (eval echo "$as_me:15800: \"$ac_try\"") >&5
15801   (eval $ac_try) 2>&5
15802   ac_status=$?
15803   echo "$as_me:15803: \$? = $ac_status" >&5
15804   (exit $ac_status); }; }; then
15805   cf_cv_cgetent_const=yes
15806 else
15807   echo "$as_me: failed program was:" >&5
15808 cat conftest.$ac_ext >&5
15809 cf_cv_cgetent_const=no
15810 fi
15811 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15812
15813 fi
15814 echo "$as_me:15814: result: $cf_cv_cgetent_const" >&5
15815 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15816         if test "$cf_cv_cgetent_const" = yes
15817         then
15818
15819 cat >>confdefs.h <<EOF
15820 #define CGETENT_CONST const
15821 EOF
15822
15823         fi
15824 fi
15825
15826 fi
15827
15828 echo "$as_me:15828: checking for isascii" >&5
15829 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15830 if test "${cf_cv_have_isascii+set}" = set; then
15831   echo $ECHO_N "(cached) $ECHO_C" >&6
15832 else
15833
15834         cat >conftest.$ac_ext <<_ACEOF
15835 #line 15835 "configure"
15836 #include "confdefs.h"
15837 #include <ctype.h>
15838 int
15839 main ()
15840 {
15841 int x = isascii(' ')
15842   ;
15843   return 0;
15844 }
15845 _ACEOF
15846 rm -f conftest.$ac_objext conftest$ac_exeext
15847 if { (eval echo "$as_me:15847: \"$ac_link\"") >&5
15848   (eval $ac_link) 2>&5
15849   ac_status=$?
15850   echo "$as_me:15850: \$? = $ac_status" >&5
15851   (exit $ac_status); } &&
15852          { ac_try='test -s conftest$ac_exeext'
15853   { (eval echo "$as_me:15853: \"$ac_try\"") >&5
15854   (eval $ac_try) 2>&5
15855   ac_status=$?
15856   echo "$as_me:15856: \$? = $ac_status" >&5
15857   (exit $ac_status); }; }; then
15858   cf_cv_have_isascii=yes
15859 else
15860   echo "$as_me: failed program was:" >&5
15861 cat conftest.$ac_ext >&5
15862 cf_cv_have_isascii=no
15863 fi
15864 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15865
15866 fi
15867 echo "$as_me:15867: result: $cf_cv_have_isascii" >&5
15868 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15869 test "$cf_cv_have_isascii" = yes &&
15870 cat >>confdefs.h <<\EOF
15871 #define HAVE_ISASCII 1
15872 EOF
15873
15874 if test "$ac_cv_func_sigaction" = yes; then
15875 echo "$as_me:15875: checking whether sigaction needs _POSIX_SOURCE" >&5
15876 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15877 cat >conftest.$ac_ext <<_ACEOF
15878 #line 15878 "configure"
15879 #include "confdefs.h"
15880
15881 #include <sys/types.h>
15882 #include <signal.h>
15883 int
15884 main ()
15885 {
15886 struct sigaction act
15887   ;
15888   return 0;
15889 }
15890 _ACEOF
15891 rm -f conftest.$ac_objext
15892 if { (eval echo "$as_me:15892: \"$ac_compile\"") >&5
15893   (eval $ac_compile) 2>&5
15894   ac_status=$?
15895   echo "$as_me:15895: \$? = $ac_status" >&5
15896   (exit $ac_status); } &&
15897          { ac_try='test -s conftest.$ac_objext'
15898   { (eval echo "$as_me:15898: \"$ac_try\"") >&5
15899   (eval $ac_try) 2>&5
15900   ac_status=$?
15901   echo "$as_me:15901: \$? = $ac_status" >&5
15902   (exit $ac_status); }; }; then
15903   sigact_bad=no
15904 else
15905   echo "$as_me: failed program was:" >&5
15906 cat conftest.$ac_ext >&5
15907
15908 cat >conftest.$ac_ext <<_ACEOF
15909 #line 15909 "configure"
15910 #include "confdefs.h"
15911
15912 #define _POSIX_SOURCE
15913 #include <sys/types.h>
15914 #include <signal.h>
15915 int
15916 main ()
15917 {
15918 struct sigaction act
15919   ;
15920   return 0;
15921 }
15922 _ACEOF
15923 rm -f conftest.$ac_objext
15924 if { (eval echo "$as_me:15924: \"$ac_compile\"") >&5
15925   (eval $ac_compile) 2>&5
15926   ac_status=$?
15927   echo "$as_me:15927: \$? = $ac_status" >&5
15928   (exit $ac_status); } &&
15929          { ac_try='test -s conftest.$ac_objext'
15930   { (eval echo "$as_me:15930: \"$ac_try\"") >&5
15931   (eval $ac_try) 2>&5
15932   ac_status=$?
15933   echo "$as_me:15933: \$? = $ac_status" >&5
15934   (exit $ac_status); }; }; then
15935   sigact_bad=yes
15936
15937 cat >>confdefs.h <<\EOF
15938 #define _POSIX_SOURCE 1
15939 EOF
15940
15941 else
15942   echo "$as_me: failed program was:" >&5
15943 cat conftest.$ac_ext >&5
15944 sigact_bad=unknown
15945 fi
15946 rm -f conftest.$ac_objext conftest.$ac_ext
15947 fi
15948 rm -f conftest.$ac_objext conftest.$ac_ext
15949 echo "$as_me:15949: result: $sigact_bad" >&5
15950 echo "${ECHO_T}$sigact_bad" >&6
15951 fi
15952
15953 echo "$as_me:15953: checking if nanosleep really works" >&5
15954 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15955 if test "${cf_cv_func_nanosleep+set}" = set; then
15956   echo $ECHO_N "(cached) $ECHO_C" >&6
15957 else
15958
15959 if test "$cross_compiling" = yes; then
15960   cf_cv_func_nanosleep=unknown
15961 else
15962   cat >conftest.$ac_ext <<_ACEOF
15963 #line 15963 "configure"
15964 #include "confdefs.h"
15965
15966 #include <stdio.h>
15967 #include <errno.h>
15968 #include <time.h>
15969
15970 #ifdef HAVE_SYS_TIME_H
15971 #include <sys/time.h>
15972 #endif
15973
15974 int main() {
15975         struct timespec ts1, ts2;
15976         int code;
15977         ts1.tv_sec  = 0;
15978         ts1.tv_nsec = 750000000;
15979         ts2.tv_sec  = 0;
15980         ts2.tv_nsec = 0;
15981         errno = 0;
15982         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15983         ${cf_cv_main_return:-return}(code != 0);
15984 }
15985
15986 _ACEOF
15987 rm -f conftest$ac_exeext
15988 if { (eval echo "$as_me:15988: \"$ac_link\"") >&5
15989   (eval $ac_link) 2>&5
15990   ac_status=$?
15991   echo "$as_me:15991: \$? = $ac_status" >&5
15992   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15993   { (eval echo "$as_me:15993: \"$ac_try\"") >&5
15994   (eval $ac_try) 2>&5
15995   ac_status=$?
15996   echo "$as_me:15996: \$? = $ac_status" >&5
15997   (exit $ac_status); }; }; then
15998   cf_cv_func_nanosleep=yes
15999 else
16000   echo "$as_me: program exited with status $ac_status" >&5
16001 echo "$as_me: failed program was:" >&5
16002 cat conftest.$ac_ext >&5
16003 cf_cv_func_nanosleep=no
16004 fi
16005 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16006 fi
16007 fi
16008 echo "$as_me:16008: result: $cf_cv_func_nanosleep" >&5
16009 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16010
16011 test "$cf_cv_func_nanosleep" = "yes" &&
16012 cat >>confdefs.h <<\EOF
16013 #define HAVE_NANOSLEEP 1
16014 EOF
16015
16016 for ac_header in \
16017 termio.h \
16018 termios.h \
16019 unistd.h \
16020
16021 do
16022 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16023 echo "$as_me:16023: checking for $ac_header" >&5
16024 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16025 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16026   echo $ECHO_N "(cached) $ECHO_C" >&6
16027 else
16028   cat >conftest.$ac_ext <<_ACEOF
16029 #line 16029 "configure"
16030 #include "confdefs.h"
16031 #include <$ac_header>
16032 _ACEOF
16033 if { (eval echo "$as_me:16033: \"$ac_cpp conftest.$ac_ext\"") >&5
16034   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16035   ac_status=$?
16036   egrep -v '^ *\+' conftest.er1 >conftest.err
16037   rm -f conftest.er1
16038   cat conftest.err >&5
16039   echo "$as_me:16039: \$? = $ac_status" >&5
16040   (exit $ac_status); } >/dev/null; then
16041   if test -s conftest.err; then
16042     ac_cpp_err=$ac_c_preproc_warn_flag
16043   else
16044     ac_cpp_err=
16045   fi
16046 else
16047   ac_cpp_err=yes
16048 fi
16049 if test -z "$ac_cpp_err"; then
16050   eval "$as_ac_Header=yes"
16051 else
16052   echo "$as_me: failed program was:" >&5
16053   cat conftest.$ac_ext >&5
16054   eval "$as_ac_Header=no"
16055 fi
16056 rm -f conftest.err conftest.$ac_ext
16057 fi
16058 echo "$as_me:16058: result: `eval echo '${'$as_ac_Header'}'`" >&5
16059 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16060 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16061   cat >>confdefs.h <<EOF
16062 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16063 EOF
16064
16065 fi
16066 done
16067
16068 if test "$ISC" = yes ; then
16069
16070 for ac_header in sys/termio.h
16071 do
16072 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16073 echo "$as_me:16073: checking for $ac_header" >&5
16074 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16075 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16076   echo $ECHO_N "(cached) $ECHO_C" >&6
16077 else
16078   cat >conftest.$ac_ext <<_ACEOF
16079 #line 16079 "configure"
16080 #include "confdefs.h"
16081 #include <$ac_header>
16082 _ACEOF
16083 if { (eval echo "$as_me:16083: \"$ac_cpp conftest.$ac_ext\"") >&5
16084   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16085   ac_status=$?
16086   egrep -v '^ *\+' conftest.er1 >conftest.err
16087   rm -f conftest.er1
16088   cat conftest.err >&5
16089   echo "$as_me:16089: \$? = $ac_status" >&5
16090   (exit $ac_status); } >/dev/null; then
16091   if test -s conftest.err; then
16092     ac_cpp_err=$ac_c_preproc_warn_flag
16093   else
16094     ac_cpp_err=
16095   fi
16096 else
16097   ac_cpp_err=yes
16098 fi
16099 if test -z "$ac_cpp_err"; then
16100   eval "$as_ac_Header=yes"
16101 else
16102   echo "$as_me: failed program was:" >&5
16103   cat conftest.$ac_ext >&5
16104   eval "$as_ac_Header=no"
16105 fi
16106 rm -f conftest.err conftest.$ac_ext
16107 fi
16108 echo "$as_me:16108: result: `eval echo '${'$as_ac_Header'}'`" >&5
16109 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16110 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16111   cat >>confdefs.h <<EOF
16112 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16113 EOF
16114
16115 fi
16116 done
16117
16118 fi
16119 if test "$ac_cv_header_termios_h" = yes ; then
16120         case "$CFLAGS $CPPFLAGS" in
16121         *-D_POSIX_SOURCE*)
16122                 termios_bad=dunno ;;
16123         *)      termios_bad=maybe ;;
16124         esac
16125         if test "$termios_bad" = maybe ; then
16126         echo "$as_me:16126: checking whether termios.h needs _POSIX_SOURCE" >&5
16127 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16128         cat >conftest.$ac_ext <<_ACEOF
16129 #line 16129 "configure"
16130 #include "confdefs.h"
16131 #include <termios.h>
16132 int
16133 main ()
16134 {
16135 struct termios foo; int x = foo.c_iflag
16136   ;
16137   return 0;
16138 }
16139 _ACEOF
16140 rm -f conftest.$ac_objext
16141 if { (eval echo "$as_me:16141: \"$ac_compile\"") >&5
16142   (eval $ac_compile) 2>&5
16143   ac_status=$?
16144   echo "$as_me:16144: \$? = $ac_status" >&5
16145   (exit $ac_status); } &&
16146          { ac_try='test -s conftest.$ac_objext'
16147   { (eval echo "$as_me:16147: \"$ac_try\"") >&5
16148   (eval $ac_try) 2>&5
16149   ac_status=$?
16150   echo "$as_me:16150: \$? = $ac_status" >&5
16151   (exit $ac_status); }; }; then
16152   termios_bad=no
16153 else
16154   echo "$as_me: failed program was:" >&5
16155 cat conftest.$ac_ext >&5
16156
16157                 cat >conftest.$ac_ext <<_ACEOF
16158 #line 16158 "configure"
16159 #include "confdefs.h"
16160
16161 #define _POSIX_SOURCE
16162 #include <termios.h>
16163 int
16164 main ()
16165 {
16166 struct termios foo; int x = foo.c_iflag
16167   ;
16168   return 0;
16169 }
16170 _ACEOF
16171 rm -f conftest.$ac_objext
16172 if { (eval echo "$as_me:16172: \"$ac_compile\"") >&5
16173   (eval $ac_compile) 2>&5
16174   ac_status=$?
16175   echo "$as_me:16175: \$? = $ac_status" >&5
16176   (exit $ac_status); } &&
16177          { ac_try='test -s conftest.$ac_objext'
16178   { (eval echo "$as_me:16178: \"$ac_try\"") >&5
16179   (eval $ac_try) 2>&5
16180   ac_status=$?
16181   echo "$as_me:16181: \$? = $ac_status" >&5
16182   (exit $ac_status); }; }; then
16183   termios_bad=unknown
16184 else
16185   echo "$as_me: failed program was:" >&5
16186 cat conftest.$ac_ext >&5
16187 termios_bad=yes
16188 cat >>confdefs.h <<\EOF
16189 #define _POSIX_SOURCE 1
16190 EOF
16191
16192 fi
16193 rm -f conftest.$ac_objext conftest.$ac_ext
16194
16195 fi
16196 rm -f conftest.$ac_objext conftest.$ac_ext
16197         echo "$as_me:16197: result: $termios_bad" >&5
16198 echo "${ECHO_T}$termios_bad" >&6
16199         fi
16200 fi
16201
16202 echo "$as_me:16202: checking for tcgetattr" >&5
16203 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16204 if test "${cf_cv_have_tcgetattr+set}" = set; then
16205   echo $ECHO_N "(cached) $ECHO_C" >&6
16206 else
16207
16208 cat >conftest.$ac_ext <<_ACEOF
16209 #line 16209 "configure"
16210 #include "confdefs.h"
16211
16212 #include <sys/types.h>
16213 #ifdef HAVE_UNISTD_H
16214 #include <unistd.h>
16215 #endif
16216 #ifdef HAVE_TERMIOS_H
16217 #include <termios.h>
16218 #define TTY struct termios
16219 #else
16220 #ifdef HAVE_TERMIO_H
16221 #include <termio.h>
16222 #define TTY struct termio
16223 #endif
16224 #endif
16225
16226 int
16227 main ()
16228 {
16229
16230 TTY foo;
16231 tcgetattr(1, &foo);
16232   ;
16233   return 0;
16234 }
16235 _ACEOF
16236 rm -f conftest.$ac_objext conftest$ac_exeext
16237 if { (eval echo "$as_me:16237: \"$ac_link\"") >&5
16238   (eval $ac_link) 2>&5
16239   ac_status=$?
16240   echo "$as_me:16240: \$? = $ac_status" >&5
16241   (exit $ac_status); } &&
16242          { ac_try='test -s conftest$ac_exeext'
16243   { (eval echo "$as_me:16243: \"$ac_try\"") >&5
16244   (eval $ac_try) 2>&5
16245   ac_status=$?
16246   echo "$as_me:16246: \$? = $ac_status" >&5
16247   (exit $ac_status); }; }; then
16248   cf_cv_have_tcgetattr=yes
16249 else
16250   echo "$as_me: failed program was:" >&5
16251 cat conftest.$ac_ext >&5
16252 cf_cv_have_tcgetattr=no
16253 fi
16254 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16255 fi
16256 echo "$as_me:16256: result: $cf_cv_have_tcgetattr" >&5
16257 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16258 test "$cf_cv_have_tcgetattr" = yes &&
16259 cat >>confdefs.h <<\EOF
16260 #define HAVE_TCGETATTR 1
16261 EOF
16262
16263 echo "$as_me:16263: checking for vsscanf function or workaround" >&5
16264 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16265 if test "${cf_cv_func_vsscanf+set}" = set; then
16266   echo $ECHO_N "(cached) $ECHO_C" >&6
16267 else
16268
16269 cat >conftest.$ac_ext <<_ACEOF
16270 #line 16270 "configure"
16271 #include "confdefs.h"
16272
16273 #include <stdarg.h>
16274 #include <stdio.h>
16275 int
16276 main ()
16277 {
16278
16279         va_list ap;
16280         vsscanf("from", "%d", ap)
16281   ;
16282   return 0;
16283 }
16284 _ACEOF
16285 rm -f conftest.$ac_objext conftest$ac_exeext
16286 if { (eval echo "$as_me:16286: \"$ac_link\"") >&5
16287   (eval $ac_link) 2>&5
16288   ac_status=$?
16289   echo "$as_me:16289: \$? = $ac_status" >&5
16290   (exit $ac_status); } &&
16291          { ac_try='test -s conftest$ac_exeext'
16292   { (eval echo "$as_me:16292: \"$ac_try\"") >&5
16293   (eval $ac_try) 2>&5
16294   ac_status=$?
16295   echo "$as_me:16295: \$? = $ac_status" >&5
16296   (exit $ac_status); }; }; then
16297   cf_cv_func_vsscanf=vsscanf
16298 else
16299   echo "$as_me: failed program was:" >&5
16300 cat conftest.$ac_ext >&5
16301
16302 cat >conftest.$ac_ext <<_ACEOF
16303 #line 16303 "configure"
16304 #include "confdefs.h"
16305
16306 #include <stdarg.h>
16307 #include <stdio.h>
16308 int
16309 main ()
16310 {
16311
16312     FILE strbuf;
16313     char *str = "from";
16314
16315     strbuf._flag = _IOREAD;
16316     strbuf._ptr = strbuf._base = (unsigned char *) str;
16317     strbuf._cnt = strlen(str);
16318     strbuf._file = _NFILE;
16319     return (vfscanf(&strbuf, "%d", ap))
16320   ;
16321   return 0;
16322 }
16323 _ACEOF
16324 rm -f conftest.$ac_objext conftest$ac_exeext
16325 if { (eval echo "$as_me:16325: \"$ac_link\"") >&5
16326   (eval $ac_link) 2>&5
16327   ac_status=$?
16328   echo "$as_me:16328: \$? = $ac_status" >&5
16329   (exit $ac_status); } &&
16330          { ac_try='test -s conftest$ac_exeext'
16331   { (eval echo "$as_me:16331: \"$ac_try\"") >&5
16332   (eval $ac_try) 2>&5
16333   ac_status=$?
16334   echo "$as_me:16334: \$? = $ac_status" >&5
16335   (exit $ac_status); }; }; then
16336   cf_cv_func_vsscanf=vfscanf
16337 else
16338   echo "$as_me: failed program was:" >&5
16339 cat conftest.$ac_ext >&5
16340
16341 cat >conftest.$ac_ext <<_ACEOF
16342 #line 16342 "configure"
16343 #include "confdefs.h"
16344
16345 #include <stdarg.h>
16346 #include <stdio.h>
16347 int
16348 main ()
16349 {
16350
16351     FILE strbuf;
16352     char *str = "from";
16353
16354     strbuf._flag = _IOREAD;
16355     strbuf._ptr = strbuf._base = (unsigned char *) str;
16356     strbuf._cnt = strlen(str);
16357     strbuf._file = _NFILE;
16358     return (_doscan(&strbuf, "%d", ap))
16359   ;
16360   return 0;
16361 }
16362 _ACEOF
16363 rm -f conftest.$ac_objext conftest$ac_exeext
16364 if { (eval echo "$as_me:16364: \"$ac_link\"") >&5
16365   (eval $ac_link) 2>&5
16366   ac_status=$?
16367   echo "$as_me:16367: \$? = $ac_status" >&5
16368   (exit $ac_status); } &&
16369          { ac_try='test -s conftest$ac_exeext'
16370   { (eval echo "$as_me:16370: \"$ac_try\"") >&5
16371   (eval $ac_try) 2>&5
16372   ac_status=$?
16373   echo "$as_me:16373: \$? = $ac_status" >&5
16374   (exit $ac_status); }; }; then
16375   cf_cv_func_vsscanf=_doscan
16376 else
16377   echo "$as_me: failed program was:" >&5
16378 cat conftest.$ac_ext >&5
16379
16380 cf_cv_func_vsscanf=no
16381 fi
16382 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16383 fi
16384 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16385 fi
16386 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16387 fi
16388 echo "$as_me:16388: result: $cf_cv_func_vsscanf" >&5
16389 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16390
16391 case $cf_cv_func_vsscanf in #(vi
16392 vsscanf)
16393 cat >>confdefs.h <<\EOF
16394 #define HAVE_VSSCANF 1
16395 EOF
16396 ;; #(vi
16397 vfscanf)
16398 cat >>confdefs.h <<\EOF
16399 #define HAVE_VFSCANF 1
16400 EOF
16401 ;; #(vi
16402 _doscan)
16403 cat >>confdefs.h <<\EOF
16404 #define HAVE__DOSCAN 1
16405 EOF
16406 ;;
16407 esac
16408
16409 echo "$as_me:16409: checking for working mkstemp" >&5
16410 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16411 if test "${cf_cv_func_mkstemp+set}" = set; then
16412   echo $ECHO_N "(cached) $ECHO_C" >&6
16413 else
16414
16415 rm -rf conftest*
16416 if test "$cross_compiling" = yes; then
16417   cf_cv_func_mkstemp=maybe
16418 else
16419   cat >conftest.$ac_ext <<_ACEOF
16420 #line 16420 "configure"
16421 #include "confdefs.h"
16422
16423 #include <sys/types.h>
16424 #include <stdlib.h>
16425 #include <stdio.h>
16426 #include <string.h>
16427 #include <sys/stat.h>
16428 int main()
16429 {
16430         char *tmpl = "conftestXXXXXX";
16431         char name[2][80];
16432         int n;
16433         int result = 0;
16434         int fd;
16435         struct stat sb;
16436
16437         umask(077);
16438         for (n = 0; n < 2; ++n) {
16439                 strcpy(name[n], tmpl);
16440                 if ((fd = mkstemp(name[n])) >= 0) {
16441                         if (!strcmp(name[n], tmpl)
16442                          || stat(name[n], &sb) != 0
16443                          || (sb.st_mode & S_IFMT) != S_IFREG
16444                          || (sb.st_mode & 077) != 0) {
16445                                 result = 1;
16446                         }
16447                         close(fd);
16448                 }
16449         }
16450         if (result == 0
16451          && !strcmp(name[0], name[1]))
16452                 result = 1;
16453         ${cf_cv_main_return:-return}(result);
16454 }
16455
16456 _ACEOF
16457 rm -f conftest$ac_exeext
16458 if { (eval echo "$as_me:16458: \"$ac_link\"") >&5
16459   (eval $ac_link) 2>&5
16460   ac_status=$?
16461   echo "$as_me:16461: \$? = $ac_status" >&5
16462   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16463   { (eval echo "$as_me:16463: \"$ac_try\"") >&5
16464   (eval $ac_try) 2>&5
16465   ac_status=$?
16466   echo "$as_me:16466: \$? = $ac_status" >&5
16467   (exit $ac_status); }; }; then
16468   cf_cv_func_mkstemp=yes
16469
16470 else
16471   echo "$as_me: program exited with status $ac_status" >&5
16472 echo "$as_me: failed program was:" >&5
16473 cat conftest.$ac_ext >&5
16474 cf_cv_func_mkstemp=no
16475
16476 fi
16477 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16478 fi
16479
16480 fi
16481 echo "$as_me:16481: result: $cf_cv_func_mkstemp" >&5
16482 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16483 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16484         echo "$as_me:16484: checking for mkstemp" >&5
16485 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16486 if test "${ac_cv_func_mkstemp+set}" = set; then
16487   echo $ECHO_N "(cached) $ECHO_C" >&6
16488 else
16489   cat >conftest.$ac_ext <<_ACEOF
16490 #line 16490 "configure"
16491 #include "confdefs.h"
16492 /* System header to define __stub macros and hopefully few prototypes,
16493     which can conflict with char mkstemp (); below.  */
16494 #include <assert.h>
16495 /* Override any gcc2 internal prototype to avoid an error.  */
16496 #ifdef __cplusplus
16497 extern "C"
16498 #endif
16499 /* We use char because int might match the return type of a gcc2
16500    builtin and then its argument prototype would still apply.  */
16501 char mkstemp ();
16502 char (*f) ();
16503
16504 int
16505 main ()
16506 {
16507 /* The GNU C library defines this for functions which it implements
16508     to always fail with ENOSYS.  Some functions are actually named
16509     something starting with __ and the normal name is an alias.  */
16510 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16511 choke me
16512 #else
16513 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16514 #endif
16515
16516   ;
16517   return 0;
16518 }
16519 _ACEOF
16520 rm -f conftest.$ac_objext conftest$ac_exeext
16521 if { (eval echo "$as_me:16521: \"$ac_link\"") >&5
16522   (eval $ac_link) 2>&5
16523   ac_status=$?
16524   echo "$as_me:16524: \$? = $ac_status" >&5
16525   (exit $ac_status); } &&
16526          { ac_try='test -s conftest$ac_exeext'
16527   { (eval echo "$as_me:16527: \"$ac_try\"") >&5
16528   (eval $ac_try) 2>&5
16529   ac_status=$?
16530   echo "$as_me:16530: \$? = $ac_status" >&5
16531   (exit $ac_status); }; }; then
16532   ac_cv_func_mkstemp=yes
16533 else
16534   echo "$as_me: failed program was:" >&5
16535 cat conftest.$ac_ext >&5
16536 ac_cv_func_mkstemp=no
16537 fi
16538 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16539 fi
16540 echo "$as_me:16540: result: $ac_cv_func_mkstemp" >&5
16541 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16542
16543 fi
16544 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16545
16546 cat >>confdefs.h <<\EOF
16547 #define HAVE_MKSTEMP 1
16548 EOF
16549
16550 fi
16551
16552 # setup for prototype of fallback for vsscanf()
16553
16554 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16555         HAVE_VSSCANF=1
16556 else
16557         HAVE_VSSCANF=0
16558 fi
16559
16560 if test "x$cross_compiling" = xyes ; then
16561         { echo "$as_me:16561: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16562 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16563 else
16564         echo "$as_me:16564: checking whether setvbuf arguments are reversed" >&5
16565 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16566 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16567   echo $ECHO_N "(cached) $ECHO_C" >&6
16568 else
16569   if test "$cross_compiling" = yes; then
16570   { { echo "$as_me:16570: error: cannot run test program while cross compiling" >&5
16571 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16572    { (exit 1); exit 1; }; }
16573 else
16574   cat >conftest.$ac_ext <<_ACEOF
16575 #line 16575 "configure"
16576 #include "confdefs.h"
16577 #include <stdio.h>
16578 /* If setvbuf has the reversed format, exit 0. */
16579 int
16580 main ()
16581 {
16582   /* This call has the arguments reversed.
16583      A reversed system may check and see that the address of main
16584      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16585   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16586     $ac_main_return(1);
16587   putc('\r', stdout);
16588   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16589 }
16590 _ACEOF
16591 rm -f conftest$ac_exeext
16592 if { (eval echo "$as_me:16592: \"$ac_link\"") >&5
16593   (eval $ac_link) 2>&5
16594   ac_status=$?
16595   echo "$as_me:16595: \$? = $ac_status" >&5
16596   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16597   { (eval echo "$as_me:16597: \"$ac_try\"") >&5
16598   (eval $ac_try) 2>&5
16599   ac_status=$?
16600   echo "$as_me:16600: \$? = $ac_status" >&5
16601   (exit $ac_status); }; }; then
16602   ac_cv_func_setvbuf_reversed=yes
16603 else
16604   echo "$as_me: program exited with status $ac_status" >&5
16605 echo "$as_me: failed program was:" >&5
16606 cat conftest.$ac_ext >&5
16607 ac_cv_func_setvbuf_reversed=no
16608 fi
16609 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16610 fi
16611 rm -f core core.* *.core
16612 fi
16613 echo "$as_me:16613: result: $ac_cv_func_setvbuf_reversed" >&5
16614 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16615 if test $ac_cv_func_setvbuf_reversed = yes; then
16616
16617 cat >>confdefs.h <<\EOF
16618 #define SETVBUF_REVERSED 1
16619 EOF
16620
16621 fi
16622
16623 fi
16624 echo "$as_me:16624: checking for intptr_t" >&5
16625 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16626 if test "${ac_cv_type_intptr_t+set}" = set; then
16627   echo $ECHO_N "(cached) $ECHO_C" >&6
16628 else
16629   cat >conftest.$ac_ext <<_ACEOF
16630 #line 16630 "configure"
16631 #include "confdefs.h"
16632 $ac_includes_default
16633 int
16634 main ()
16635 {
16636 if ((intptr_t *) 0)
16637   return 0;
16638 if (sizeof (intptr_t))
16639   return 0;
16640   ;
16641   return 0;
16642 }
16643 _ACEOF
16644 rm -f conftest.$ac_objext
16645 if { (eval echo "$as_me:16645: \"$ac_compile\"") >&5
16646   (eval $ac_compile) 2>&5
16647   ac_status=$?
16648   echo "$as_me:16648: \$? = $ac_status" >&5
16649   (exit $ac_status); } &&
16650          { ac_try='test -s conftest.$ac_objext'
16651   { (eval echo "$as_me:16651: \"$ac_try\"") >&5
16652   (eval $ac_try) 2>&5
16653   ac_status=$?
16654   echo "$as_me:16654: \$? = $ac_status" >&5
16655   (exit $ac_status); }; }; then
16656   ac_cv_type_intptr_t=yes
16657 else
16658   echo "$as_me: failed program was:" >&5
16659 cat conftest.$ac_ext >&5
16660 ac_cv_type_intptr_t=no
16661 fi
16662 rm -f conftest.$ac_objext conftest.$ac_ext
16663 fi
16664 echo "$as_me:16664: result: $ac_cv_type_intptr_t" >&5
16665 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16666 if test $ac_cv_type_intptr_t = yes; then
16667   :
16668 else
16669
16670 cat >>confdefs.h <<EOF
16671 #define intptr_t long
16672 EOF
16673
16674 fi
16675
16676 echo "$as_me:16676: checking for type sigaction_t" >&5
16677 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16678 if test "${cf_cv_type_sigaction+set}" = set; then
16679   echo $ECHO_N "(cached) $ECHO_C" >&6
16680 else
16681
16682         cat >conftest.$ac_ext <<_ACEOF
16683 #line 16683 "configure"
16684 #include "confdefs.h"
16685
16686 #include <signal.h>
16687 int
16688 main ()
16689 {
16690 sigaction_t x
16691   ;
16692   return 0;
16693 }
16694 _ACEOF
16695 rm -f conftest.$ac_objext
16696 if { (eval echo "$as_me:16696: \"$ac_compile\"") >&5
16697   (eval $ac_compile) 2>&5
16698   ac_status=$?
16699   echo "$as_me:16699: \$? = $ac_status" >&5
16700   (exit $ac_status); } &&
16701          { ac_try='test -s conftest.$ac_objext'
16702   { (eval echo "$as_me:16702: \"$ac_try\"") >&5
16703   (eval $ac_try) 2>&5
16704   ac_status=$?
16705   echo "$as_me:16705: \$? = $ac_status" >&5
16706   (exit $ac_status); }; }; then
16707   cf_cv_type_sigaction=yes
16708 else
16709   echo "$as_me: failed program was:" >&5
16710 cat conftest.$ac_ext >&5
16711 cf_cv_type_sigaction=no
16712 fi
16713 rm -f conftest.$ac_objext conftest.$ac_ext
16714 fi
16715
16716 echo "$as_me:16716: result: $cf_cv_type_sigaction" >&5
16717 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16718 test "$cf_cv_type_sigaction" = yes &&
16719 cat >>confdefs.h <<\EOF
16720 #define HAVE_TYPE_SIGACTION 1
16721 EOF
16722
16723 echo "$as_me:16723: checking declaration of size-change" >&5
16724 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16725 if test "${cf_cv_sizechange+set}" = set; then
16726   echo $ECHO_N "(cached) $ECHO_C" >&6
16727 else
16728
16729     cf_cv_sizechange=unknown
16730     cf_save_CPPFLAGS="$CPPFLAGS"
16731
16732 for cf_opts in "" "NEED_PTEM_H"
16733 do
16734
16735     CPPFLAGS="$cf_save_CPPFLAGS"
16736     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16737     cat >conftest.$ac_ext <<_ACEOF
16738 #line 16738 "configure"
16739 #include "confdefs.h"
16740 #include <sys/types.h>
16741 #ifdef HAVE_TERMIOS_H
16742 #include <termios.h>
16743 #else
16744 #ifdef HAVE_TERMIO_H
16745 #include <termio.h>
16746 #endif
16747 #endif
16748 #ifdef NEED_PTEM_H
16749 /* This is a workaround for SCO:  they neglected to define struct winsize in
16750  * termios.h -- it's only in termio.h and ptem.h
16751  */
16752 #include        <sys/stream.h>
16753 #include        <sys/ptem.h>
16754 #endif
16755 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16756 #include <sys/ioctl.h>
16757 #endif
16758
16759 int
16760 main ()
16761 {
16762
16763 #ifdef TIOCGSIZE
16764         struct ttysize win;     /* FIXME: what system is this? */
16765         int y = win.ts_lines;
16766         int x = win.ts_cols;
16767 #else
16768 #ifdef TIOCGWINSZ
16769         struct winsize win;
16770         int y = win.ws_row;
16771         int x = win.ws_col;
16772 #else
16773         no TIOCGSIZE or TIOCGWINSZ
16774 #endif /* TIOCGWINSZ */
16775 #endif /* TIOCGSIZE */
16776
16777   ;
16778   return 0;
16779 }
16780 _ACEOF
16781 rm -f conftest.$ac_objext
16782 if { (eval echo "$as_me:16782: \"$ac_compile\"") >&5
16783   (eval $ac_compile) 2>&5
16784   ac_status=$?
16785   echo "$as_me:16785: \$? = $ac_status" >&5
16786   (exit $ac_status); } &&
16787          { ac_try='test -s conftest.$ac_objext'
16788   { (eval echo "$as_me:16788: \"$ac_try\"") >&5
16789   (eval $ac_try) 2>&5
16790   ac_status=$?
16791   echo "$as_me:16791: \$? = $ac_status" >&5
16792   (exit $ac_status); }; }; then
16793   cf_cv_sizechange=yes
16794 else
16795   echo "$as_me: failed program was:" >&5
16796 cat conftest.$ac_ext >&5
16797 cf_cv_sizechange=no
16798 fi
16799 rm -f conftest.$ac_objext conftest.$ac_ext
16800
16801         CPPFLAGS="$cf_save_CPPFLAGS"
16802         if test "$cf_cv_sizechange" = yes ; then
16803                 echo "size-change succeeded ($cf_opts)" >&5
16804                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16805                 break
16806         fi
16807 done
16808
16809 fi
16810 echo "$as_me:16810: result: $cf_cv_sizechange" >&5
16811 echo "${ECHO_T}$cf_cv_sizechange" >&6
16812 if test "$cf_cv_sizechange" != no ; then
16813
16814 cat >>confdefs.h <<\EOF
16815 #define HAVE_SIZECHANGE 1
16816 EOF
16817
16818         case $cf_cv_sizechange in #(vi
16819         NEED*)
16820                 cat >>confdefs.h <<EOF
16821 #define $cf_cv_sizechange  1
16822 EOF
16823
16824                 ;;
16825         esac
16826 fi
16827
16828 echo "$as_me:16828: checking for memmove" >&5
16829 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16830 if test "${ac_cv_func_memmove+set}" = set; then
16831   echo $ECHO_N "(cached) $ECHO_C" >&6
16832 else
16833   cat >conftest.$ac_ext <<_ACEOF
16834 #line 16834 "configure"
16835 #include "confdefs.h"
16836 /* System header to define __stub macros and hopefully few prototypes,
16837     which can conflict with char memmove (); below.  */
16838 #include <assert.h>
16839 /* Override any gcc2 internal prototype to avoid an error.  */
16840 #ifdef __cplusplus
16841 extern "C"
16842 #endif
16843 /* We use char because int might match the return type of a gcc2
16844    builtin and then its argument prototype would still apply.  */
16845 char memmove ();
16846 char (*f) ();
16847
16848 int
16849 main ()
16850 {
16851 /* The GNU C library defines this for functions which it implements
16852     to always fail with ENOSYS.  Some functions are actually named
16853     something starting with __ and the normal name is an alias.  */
16854 #if defined (__stub_memmove) || defined (__stub___memmove)
16855 choke me
16856 #else
16857 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16858 #endif
16859
16860   ;
16861   return 0;
16862 }
16863 _ACEOF
16864 rm -f conftest.$ac_objext conftest$ac_exeext
16865 if { (eval echo "$as_me:16865: \"$ac_link\"") >&5
16866   (eval $ac_link) 2>&5
16867   ac_status=$?
16868   echo "$as_me:16868: \$? = $ac_status" >&5
16869   (exit $ac_status); } &&
16870          { ac_try='test -s conftest$ac_exeext'
16871   { (eval echo "$as_me:16871: \"$ac_try\"") >&5
16872   (eval $ac_try) 2>&5
16873   ac_status=$?
16874   echo "$as_me:16874: \$? = $ac_status" >&5
16875   (exit $ac_status); }; }; then
16876   ac_cv_func_memmove=yes
16877 else
16878   echo "$as_me: failed program was:" >&5
16879 cat conftest.$ac_ext >&5
16880 ac_cv_func_memmove=no
16881 fi
16882 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16883 fi
16884 echo "$as_me:16884: result: $ac_cv_func_memmove" >&5
16885 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16886 if test $ac_cv_func_memmove = yes; then
16887   :
16888 else
16889
16890 echo "$as_me:16890: checking for bcopy" >&5
16891 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16892 if test "${ac_cv_func_bcopy+set}" = set; then
16893   echo $ECHO_N "(cached) $ECHO_C" >&6
16894 else
16895   cat >conftest.$ac_ext <<_ACEOF
16896 #line 16896 "configure"
16897 #include "confdefs.h"
16898 /* System header to define __stub macros and hopefully few prototypes,
16899     which can conflict with char bcopy (); below.  */
16900 #include <assert.h>
16901 /* Override any gcc2 internal prototype to avoid an error.  */
16902 #ifdef __cplusplus
16903 extern "C"
16904 #endif
16905 /* We use char because int might match the return type of a gcc2
16906    builtin and then its argument prototype would still apply.  */
16907 char bcopy ();
16908 char (*f) ();
16909
16910 int
16911 main ()
16912 {
16913 /* The GNU C library defines this for functions which it implements
16914     to always fail with ENOSYS.  Some functions are actually named
16915     something starting with __ and the normal name is an alias.  */
16916 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16917 choke me
16918 #else
16919 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16920 #endif
16921
16922   ;
16923   return 0;
16924 }
16925 _ACEOF
16926 rm -f conftest.$ac_objext conftest$ac_exeext
16927 if { (eval echo "$as_me:16927: \"$ac_link\"") >&5
16928   (eval $ac_link) 2>&5
16929   ac_status=$?
16930   echo "$as_me:16930: \$? = $ac_status" >&5
16931   (exit $ac_status); } &&
16932          { ac_try='test -s conftest$ac_exeext'
16933   { (eval echo "$as_me:16933: \"$ac_try\"") >&5
16934   (eval $ac_try) 2>&5
16935   ac_status=$?
16936   echo "$as_me:16936: \$? = $ac_status" >&5
16937   (exit $ac_status); }; }; then
16938   ac_cv_func_bcopy=yes
16939 else
16940   echo "$as_me: failed program was:" >&5
16941 cat conftest.$ac_ext >&5
16942 ac_cv_func_bcopy=no
16943 fi
16944 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16945 fi
16946 echo "$as_me:16946: result: $ac_cv_func_bcopy" >&5
16947 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16948 if test $ac_cv_func_bcopy = yes; then
16949
16950         echo "$as_me:16950: checking if bcopy does overlapping moves" >&5
16951 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16952 if test "${cf_cv_good_bcopy+set}" = set; then
16953   echo $ECHO_N "(cached) $ECHO_C" >&6
16954 else
16955
16956                 if test "$cross_compiling" = yes; then
16957   cf_cv_good_bcopy=unknown
16958 else
16959   cat >conftest.$ac_ext <<_ACEOF
16960 #line 16960 "configure"
16961 #include "confdefs.h"
16962
16963 int main() {
16964         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16965         char temp[40];
16966         bcopy(data, temp, sizeof(data));
16967         bcopy(temp+10, temp, 15);
16968         bcopy(temp+5, temp+15, 10);
16969         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16970 }
16971
16972 _ACEOF
16973 rm -f conftest$ac_exeext
16974 if { (eval echo "$as_me:16974: \"$ac_link\"") >&5
16975   (eval $ac_link) 2>&5
16976   ac_status=$?
16977   echo "$as_me:16977: \$? = $ac_status" >&5
16978   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16979   { (eval echo "$as_me:16979: \"$ac_try\"") >&5
16980   (eval $ac_try) 2>&5
16981   ac_status=$?
16982   echo "$as_me:16982: \$? = $ac_status" >&5
16983   (exit $ac_status); }; }; then
16984   cf_cv_good_bcopy=yes
16985 else
16986   echo "$as_me: program exited with status $ac_status" >&5
16987 echo "$as_me: failed program was:" >&5
16988 cat conftest.$ac_ext >&5
16989 cf_cv_good_bcopy=no
16990 fi
16991 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16992 fi
16993
16994 fi
16995 echo "$as_me:16995: result: $cf_cv_good_bcopy" >&5
16996 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16997
16998 else
16999   cf_cv_good_bcopy=no
17000 fi
17001
17002         if test "$cf_cv_good_bcopy" = yes ; then
17003
17004 cat >>confdefs.h <<\EOF
17005 #define USE_OK_BCOPY 1
17006 EOF
17007
17008         else
17009
17010 cat >>confdefs.h <<\EOF
17011 #define USE_MY_MEMMOVE 1
17012 EOF
17013
17014         fi
17015
17016 fi
17017
17018 echo "$as_me:17018: checking if poll really works" >&5
17019 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17020 if test "${cf_cv_working_poll+set}" = set; then
17021   echo $ECHO_N "(cached) $ECHO_C" >&6
17022 else
17023
17024 if test "$cross_compiling" = yes; then
17025   cf_cv_working_poll=unknown
17026 else
17027   cat >conftest.$ac_ext <<_ACEOF
17028 #line 17028 "configure"
17029 #include "confdefs.h"
17030
17031 #include <stdlib.h>
17032 #include <stdio.h>
17033 #include <unistd.h>
17034 #include <fcntl.h>
17035 #ifdef HAVE_POLL_H
17036 #include <poll.h>
17037 #else
17038 #include <sys/poll.h>
17039 #endif
17040 int main() {
17041         struct pollfd myfds;
17042         int ret;
17043
17044         /* check for Darwin bug with respect to "devices" */
17045         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17046         if (myfds.fd < 0)
17047                 myfds.fd = 0;
17048         myfds.events = POLLIN;
17049         myfds.revents = 0;
17050
17051         ret = poll(&myfds, 1, 100);
17052
17053         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17054                 ret = -1;
17055         } else {
17056                 int fd = 0;
17057                 if (!isatty(fd)) {
17058                         fd = open("/dev/tty", 2);       /* O_RDWR */
17059                 }
17060
17061                 if (fd >= 0) {
17062                         /* also check with standard input */
17063                         myfds.fd = fd;
17064                         myfds.events = POLLIN;
17065                         myfds.revents = 0;
17066                         ret = poll(&myfds, 1, 100);
17067                 } else {
17068                         ret = -1;
17069                 }
17070         }
17071         ${cf_cv_main_return:-return}(ret < 0);
17072 }
17073 _ACEOF
17074 rm -f conftest$ac_exeext
17075 if { (eval echo "$as_me:17075: \"$ac_link\"") >&5
17076   (eval $ac_link) 2>&5
17077   ac_status=$?
17078   echo "$as_me:17078: \$? = $ac_status" >&5
17079   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17080   { (eval echo "$as_me:17080: \"$ac_try\"") >&5
17081   (eval $ac_try) 2>&5
17082   ac_status=$?
17083   echo "$as_me:17083: \$? = $ac_status" >&5
17084   (exit $ac_status); }; }; then
17085   cf_cv_working_poll=yes
17086 else
17087   echo "$as_me: program exited with status $ac_status" >&5
17088 echo "$as_me: failed program was:" >&5
17089 cat conftest.$ac_ext >&5
17090 cf_cv_working_poll=no
17091 fi
17092 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17093 fi
17094 fi
17095 echo "$as_me:17095: result: $cf_cv_working_poll" >&5
17096 echo "${ECHO_T}$cf_cv_working_poll" >&6
17097 test "$cf_cv_working_poll" = "yes" &&
17098 cat >>confdefs.h <<\EOF
17099 #define HAVE_WORKING_POLL 1
17100 EOF
17101
17102 echo "$as_me:17102: checking for va_copy" >&5
17103 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17104 if test "${cf_cv_have_va_copy+set}" = set; then
17105   echo $ECHO_N "(cached) $ECHO_C" >&6
17106 else
17107
17108 cat >conftest.$ac_ext <<_ACEOF
17109 #line 17109 "configure"
17110 #include "confdefs.h"
17111
17112 #include <stdarg.h>
17113
17114 int
17115 main ()
17116 {
17117
17118         static va_list dst;
17119         static va_list src;
17120         va_copy(dst, src)
17121   ;
17122   return 0;
17123 }
17124 _ACEOF
17125 rm -f conftest.$ac_objext conftest$ac_exeext
17126 if { (eval echo "$as_me:17126: \"$ac_link\"") >&5
17127   (eval $ac_link) 2>&5
17128   ac_status=$?
17129   echo "$as_me:17129: \$? = $ac_status" >&5
17130   (exit $ac_status); } &&
17131          { ac_try='test -s conftest$ac_exeext'
17132   { (eval echo "$as_me:17132: \"$ac_try\"") >&5
17133   (eval $ac_try) 2>&5
17134   ac_status=$?
17135   echo "$as_me:17135: \$? = $ac_status" >&5
17136   (exit $ac_status); }; }; then
17137   cf_cv_have_va_copy=yes
17138 else
17139   echo "$as_me: failed program was:" >&5
17140 cat conftest.$ac_ext >&5
17141 cf_cv_have_va_copy=no
17142 fi
17143 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17144 fi
17145 echo "$as_me:17145: result: $cf_cv_have_va_copy" >&5
17146 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17147
17148 test "$cf_cv_have_va_copy" = yes &&
17149 cat >>confdefs.h <<\EOF
17150 #define HAVE_VA_COPY 1
17151 EOF
17152
17153 echo "$as_me:17153: checking for __va_copy" >&5
17154 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17155 if test "${cf_cv_have___va_copy+set}" = set; then
17156   echo $ECHO_N "(cached) $ECHO_C" >&6
17157 else
17158
17159 cat >conftest.$ac_ext <<_ACEOF
17160 #line 17160 "configure"
17161 #include "confdefs.h"
17162
17163 #include <stdarg.h>
17164
17165 int
17166 main ()
17167 {
17168
17169         static va_list dst;
17170         static va_list src;
17171         __va_copy(dst, src)
17172   ;
17173   return 0;
17174 }
17175 _ACEOF
17176 rm -f conftest.$ac_objext conftest$ac_exeext
17177 if { (eval echo "$as_me:17177: \"$ac_link\"") >&5
17178   (eval $ac_link) 2>&5
17179   ac_status=$?
17180   echo "$as_me:17180: \$? = $ac_status" >&5
17181   (exit $ac_status); } &&
17182          { ac_try='test -s conftest$ac_exeext'
17183   { (eval echo "$as_me:17183: \"$ac_try\"") >&5
17184   (eval $ac_try) 2>&5
17185   ac_status=$?
17186   echo "$as_me:17186: \$? = $ac_status" >&5
17187   (exit $ac_status); }; }; then
17188   cf_cv_have___va_copy=yes
17189 else
17190   echo "$as_me: failed program was:" >&5
17191 cat conftest.$ac_ext >&5
17192 cf_cv_have___va_copy=no
17193 fi
17194 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17195 fi
17196 echo "$as_me:17196: result: $cf_cv_have___va_copy" >&5
17197 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17198
17199 test "$cf_cv_have___va_copy" = yes &&
17200 cat >>confdefs.h <<\EOF
17201 #define HAVE___VA_COPY 1
17202 EOF
17203
17204 echo "$as_me:17204: checking for pid_t" >&5
17205 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17206 if test "${ac_cv_type_pid_t+set}" = set; then
17207   echo $ECHO_N "(cached) $ECHO_C" >&6
17208 else
17209   cat >conftest.$ac_ext <<_ACEOF
17210 #line 17210 "configure"
17211 #include "confdefs.h"
17212 $ac_includes_default
17213 int
17214 main ()
17215 {
17216 if ((pid_t *) 0)
17217   return 0;
17218 if (sizeof (pid_t))
17219   return 0;
17220   ;
17221   return 0;
17222 }
17223 _ACEOF
17224 rm -f conftest.$ac_objext
17225 if { (eval echo "$as_me:17225: \"$ac_compile\"") >&5
17226   (eval $ac_compile) 2>&5
17227   ac_status=$?
17228   echo "$as_me:17228: \$? = $ac_status" >&5
17229   (exit $ac_status); } &&
17230          { ac_try='test -s conftest.$ac_objext'
17231   { (eval echo "$as_me:17231: \"$ac_try\"") >&5
17232   (eval $ac_try) 2>&5
17233   ac_status=$?
17234   echo "$as_me:17234: \$? = $ac_status" >&5
17235   (exit $ac_status); }; }; then
17236   ac_cv_type_pid_t=yes
17237 else
17238   echo "$as_me: failed program was:" >&5
17239 cat conftest.$ac_ext >&5
17240 ac_cv_type_pid_t=no
17241 fi
17242 rm -f conftest.$ac_objext conftest.$ac_ext
17243 fi
17244 echo "$as_me:17244: result: $ac_cv_type_pid_t" >&5
17245 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17246 if test $ac_cv_type_pid_t = yes; then
17247   :
17248 else
17249
17250 cat >>confdefs.h <<EOF
17251 #define pid_t int
17252 EOF
17253
17254 fi
17255
17256 for ac_header in unistd.h vfork.h
17257 do
17258 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17259 echo "$as_me:17259: checking for $ac_header" >&5
17260 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17261 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17262   echo $ECHO_N "(cached) $ECHO_C" >&6
17263 else
17264   cat >conftest.$ac_ext <<_ACEOF
17265 #line 17265 "configure"
17266 #include "confdefs.h"
17267 #include <$ac_header>
17268 _ACEOF
17269 if { (eval echo "$as_me:17269: \"$ac_cpp conftest.$ac_ext\"") >&5
17270   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17271   ac_status=$?
17272   egrep -v '^ *\+' conftest.er1 >conftest.err
17273   rm -f conftest.er1
17274   cat conftest.err >&5
17275   echo "$as_me:17275: \$? = $ac_status" >&5
17276   (exit $ac_status); } >/dev/null; then
17277   if test -s conftest.err; then
17278     ac_cpp_err=$ac_c_preproc_warn_flag
17279   else
17280     ac_cpp_err=
17281   fi
17282 else
17283   ac_cpp_err=yes
17284 fi
17285 if test -z "$ac_cpp_err"; then
17286   eval "$as_ac_Header=yes"
17287 else
17288   echo "$as_me: failed program was:" >&5
17289   cat conftest.$ac_ext >&5
17290   eval "$as_ac_Header=no"
17291 fi
17292 rm -f conftest.err conftest.$ac_ext
17293 fi
17294 echo "$as_me:17294: result: `eval echo '${'$as_ac_Header'}'`" >&5
17295 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17296 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17297   cat >>confdefs.h <<EOF
17298 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17299 EOF
17300
17301 fi
17302 done
17303
17304 for ac_func in fork vfork
17305 do
17306 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17307 echo "$as_me:17307: checking for $ac_func" >&5
17308 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17309 if eval "test \"\${$as_ac_var+set}\" = set"; then
17310   echo $ECHO_N "(cached) $ECHO_C" >&6
17311 else
17312   cat >conftest.$ac_ext <<_ACEOF
17313 #line 17313 "configure"
17314 #include "confdefs.h"
17315 /* System header to define __stub macros and hopefully few prototypes,
17316     which can conflict with char $ac_func (); below.  */
17317 #include <assert.h>
17318 /* Override any gcc2 internal prototype to avoid an error.  */
17319 #ifdef __cplusplus
17320 extern "C"
17321 #endif
17322 /* We use char because int might match the return type of a gcc2
17323    builtin and then its argument prototype would still apply.  */
17324 char $ac_func ();
17325 char (*f) ();
17326
17327 int
17328 main ()
17329 {
17330 /* The GNU C library defines this for functions which it implements
17331     to always fail with ENOSYS.  Some functions are actually named
17332     something starting with __ and the normal name is an alias.  */
17333 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17334 choke me
17335 #else
17336 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17337 #endif
17338
17339   ;
17340   return 0;
17341 }
17342 _ACEOF
17343 rm -f conftest.$ac_objext conftest$ac_exeext
17344 if { (eval echo "$as_me:17344: \"$ac_link\"") >&5
17345   (eval $ac_link) 2>&5
17346   ac_status=$?
17347   echo "$as_me:17347: \$? = $ac_status" >&5
17348   (exit $ac_status); } &&
17349          { ac_try='test -s conftest$ac_exeext'
17350   { (eval echo "$as_me:17350: \"$ac_try\"") >&5
17351   (eval $ac_try) 2>&5
17352   ac_status=$?
17353   echo "$as_me:17353: \$? = $ac_status" >&5
17354   (exit $ac_status); }; }; then
17355   eval "$as_ac_var=yes"
17356 else
17357   echo "$as_me: failed program was:" >&5
17358 cat conftest.$ac_ext >&5
17359 eval "$as_ac_var=no"
17360 fi
17361 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17362 fi
17363 echo "$as_me:17363: result: `eval echo '${'$as_ac_var'}'`" >&5
17364 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17365 if test `eval echo '${'$as_ac_var'}'` = yes; then
17366   cat >>confdefs.h <<EOF
17367 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17368 EOF
17369
17370 fi
17371 done
17372
17373 ac_cv_func_fork_works=$ac_cv_func_fork
17374 if test "x$ac_cv_func_fork" = xyes; then
17375   echo "$as_me:17375: checking for working fork" >&5
17376 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17377 if test "${ac_cv_func_fork_works+set}" = set; then
17378   echo $ECHO_N "(cached) $ECHO_C" >&6
17379 else
17380   if test "$cross_compiling" = yes; then
17381   ac_cv_func_fork_works=cross
17382 else
17383   cat >conftest.$ac_ext <<_ACEOF
17384 /* By Rüdiger Kuhlmann. */
17385       #include <sys/types.h>
17386       #if HAVE_UNISTD_H
17387       # include <unistd.h>
17388       #endif
17389       /* Some systems only have a dummy stub for fork() */
17390       int main ()
17391       {
17392         if (fork() < 0)
17393           $ac_main_return (1);
17394         $ac_main_return (0);
17395       }
17396 _ACEOF
17397 rm -f conftest$ac_exeext
17398 if { (eval echo "$as_me:17398: \"$ac_link\"") >&5
17399   (eval $ac_link) 2>&5
17400   ac_status=$?
17401   echo "$as_me:17401: \$? = $ac_status" >&5
17402   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17403   { (eval echo "$as_me:17403: \"$ac_try\"") >&5
17404   (eval $ac_try) 2>&5
17405   ac_status=$?
17406   echo "$as_me:17406: \$? = $ac_status" >&5
17407   (exit $ac_status); }; }; then
17408   ac_cv_func_fork_works=yes
17409 else
17410   echo "$as_me: program exited with status $ac_status" >&5
17411 echo "$as_me: failed program was:" >&5
17412 cat conftest.$ac_ext >&5
17413 ac_cv_func_fork_works=no
17414 fi
17415 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17416 fi
17417 fi
17418 echo "$as_me:17418: result: $ac_cv_func_fork_works" >&5
17419 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17420
17421 fi
17422 if test "x$ac_cv_func_fork_works" = xcross; then
17423   case $host in
17424     *-*-amigaos* | *-*-msdosdjgpp*)
17425       # Override, as these systems have only a dummy fork() stub
17426       ac_cv_func_fork_works=no
17427       ;;
17428     *)
17429       ac_cv_func_fork_works=yes
17430       ;;
17431   esac
17432   { echo "$as_me:17432: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17433 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17434 fi
17435 ac_cv_func_vfork_works=$ac_cv_func_vfork
17436 if test "x$ac_cv_func_vfork" = xyes; then
17437   echo "$as_me:17437: checking for working vfork" >&5
17438 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17439 if test "${ac_cv_func_vfork_works+set}" = set; then
17440   echo $ECHO_N "(cached) $ECHO_C" >&6
17441 else
17442   if test "$cross_compiling" = yes; then
17443   ac_cv_func_vfork_works=cross
17444 else
17445   cat >conftest.$ac_ext <<_ACEOF
17446 #line 17446 "configure"
17447 #include "confdefs.h"
17448 /* Thanks to Paul Eggert for this test.  */
17449 #include <stdio.h>
17450 #include <sys/types.h>
17451 #include <sys/stat.h>
17452 #if HAVE_UNISTD_H
17453 # include <unistd.h>
17454 #endif
17455 #if HAVE_VFORK_H
17456 # include <vfork.h>
17457 #endif
17458 /* On some sparc systems, changes by the child to local and incoming
17459    argument registers are propagated back to the parent.  The compiler
17460    is told about this with #include <vfork.h>, but some compilers
17461    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17462    static variable whose address is put into a register that is
17463    clobbered by the vfork.  */
17464 static
17465 #ifdef __cplusplus
17466 sparc_address_test (int arg)
17467 # else
17468 sparc_address_test (arg) int arg;
17469 #endif
17470 {
17471   static pid_t child;
17472   if (!child) {
17473     child = vfork ();
17474     if (child < 0) {
17475       perror ("vfork");
17476       _exit(2);
17477     }
17478     if (!child) {
17479       arg = getpid();
17480       write(-1, "", 0);
17481       _exit (arg);
17482     }
17483   }
17484 }
17485
17486 int
17487 main ()
17488 {
17489   pid_t parent = getpid ();
17490   pid_t child;
17491
17492   sparc_address_test ();
17493
17494   child = vfork ();
17495
17496   if (child == 0) {
17497     /* Here is another test for sparc vfork register problems.  This
17498        test uses lots of local variables, at least as many local
17499        variables as main has allocated so far including compiler
17500        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17501        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17502        reuse the register of parent for one of the local variables,
17503        since it will think that parent can't possibly be used any more
17504        in this routine.  Assigning to the local variable will thus
17505        munge parent in the parent process.  */
17506     pid_t
17507       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17508       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17509     /* Convince the compiler that p..p7 are live; otherwise, it might
17510        use the same hardware register for all 8 local variables.  */
17511     if (p != p1 || p != p2 || p != p3 || p != p4
17512         || p != p5 || p != p6 || p != p7)
17513       _exit(1);
17514
17515     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17516        from child file descriptors.  If the child closes a descriptor
17517        before it execs or exits, this munges the parent's descriptor
17518        as well.  Test for this by closing stdout in the child.  */
17519     _exit(close(fileno(stdout)) != 0);
17520   } else {
17521     int status;
17522     struct stat st;
17523
17524     while (wait(&status) != child)
17525       ;
17526     $ac_main_return(
17527          /* Was there some problem with vforking?  */
17528          child < 0
17529
17530          /* Did the child fail?  (This shouldn't happen.)  */
17531          || status
17532
17533          /* Did the vfork/compiler bug occur?  */
17534          || parent != getpid()
17535
17536          /* Did the file descriptor bug occur?  */
17537          || fstat(fileno(stdout), &st) != 0
17538          );
17539   }
17540 }
17541 _ACEOF
17542 rm -f conftest$ac_exeext
17543 if { (eval echo "$as_me:17543: \"$ac_link\"") >&5
17544   (eval $ac_link) 2>&5
17545   ac_status=$?
17546   echo "$as_me:17546: \$? = $ac_status" >&5
17547   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17548   { (eval echo "$as_me:17548: \"$ac_try\"") >&5
17549   (eval $ac_try) 2>&5
17550   ac_status=$?
17551   echo "$as_me:17551: \$? = $ac_status" >&5
17552   (exit $ac_status); }; }; then
17553   ac_cv_func_vfork_works=yes
17554 else
17555   echo "$as_me: program exited with status $ac_status" >&5
17556 echo "$as_me: failed program was:" >&5
17557 cat conftest.$ac_ext >&5
17558 ac_cv_func_vfork_works=no
17559 fi
17560 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17561 fi
17562 fi
17563 echo "$as_me:17563: result: $ac_cv_func_vfork_works" >&5
17564 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17565
17566 fi;
17567 if test "x$ac_cv_func_fork_works" = xcross; then
17568   ac_cv_func_vfork_works=ac_cv_func_vfork
17569   { echo "$as_me:17569: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17570 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17571 fi
17572
17573 if test "x$ac_cv_func_vfork_works" = xyes; then
17574
17575 cat >>confdefs.h <<\EOF
17576 #define HAVE_WORKING_VFORK 1
17577 EOF
17578
17579 else
17580
17581 cat >>confdefs.h <<\EOF
17582 #define vfork fork
17583 EOF
17584
17585 fi
17586 if test "x$ac_cv_func_fork_works" = xyes; then
17587
17588 cat >>confdefs.h <<\EOF
17589 #define HAVE_WORKING_FORK 1
17590 EOF
17591
17592 fi
17593
17594 # special check for test/ditto.c
17595
17596 echo "$as_me:17596: checking for openpty in -lutil" >&5
17597 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17598 if test "${ac_cv_lib_util_openpty+set}" = set; then
17599   echo $ECHO_N "(cached) $ECHO_C" >&6
17600 else
17601   ac_check_lib_save_LIBS=$LIBS
17602 LIBS="-lutil  $LIBS"
17603 cat >conftest.$ac_ext <<_ACEOF
17604 #line 17604 "configure"
17605 #include "confdefs.h"
17606
17607 /* Override any gcc2 internal prototype to avoid an error.  */
17608 #ifdef __cplusplus
17609 extern "C"
17610 #endif
17611 /* We use char because int might match the return type of a gcc2
17612    builtin and then its argument prototype would still apply.  */
17613 char openpty ();
17614 int
17615 main ()
17616 {
17617 openpty ();
17618   ;
17619   return 0;
17620 }
17621 _ACEOF
17622 rm -f conftest.$ac_objext conftest$ac_exeext
17623 if { (eval echo "$as_me:17623: \"$ac_link\"") >&5
17624   (eval $ac_link) 2>&5
17625   ac_status=$?
17626   echo "$as_me:17626: \$? = $ac_status" >&5
17627   (exit $ac_status); } &&
17628          { ac_try='test -s conftest$ac_exeext'
17629   { (eval echo "$as_me:17629: \"$ac_try\"") >&5
17630   (eval $ac_try) 2>&5
17631   ac_status=$?
17632   echo "$as_me:17632: \$? = $ac_status" >&5
17633   (exit $ac_status); }; }; then
17634   ac_cv_lib_util_openpty=yes
17635 else
17636   echo "$as_me: failed program was:" >&5
17637 cat conftest.$ac_ext >&5
17638 ac_cv_lib_util_openpty=no
17639 fi
17640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17641 LIBS=$ac_check_lib_save_LIBS
17642 fi
17643 echo "$as_me:17643: result: $ac_cv_lib_util_openpty" >&5
17644 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17645 if test $ac_cv_lib_util_openpty = yes; then
17646   cf_cv_lib_util=yes
17647 else
17648   cf_cv_lib_util=no
17649 fi
17650
17651 echo "$as_me:17651: checking for openpty header" >&5
17652 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17653 if test "${cf_cv_func_openpty+set}" = set; then
17654   echo $ECHO_N "(cached) $ECHO_C" >&6
17655 else
17656
17657     cf_save_LIBS="$LIBS"
17658     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17659     for cf_header in pty.h libutil.h util.h
17660     do
17661     cat >conftest.$ac_ext <<_ACEOF
17662 #line 17662 "configure"
17663 #include "confdefs.h"
17664
17665 #include <$cf_header>
17666
17667 int
17668 main ()
17669 {
17670
17671     int x = openpty((int *)0, (int *)0, (char *)0,
17672                    (struct termios *)0, (struct winsize *)0);
17673
17674   ;
17675   return 0;
17676 }
17677 _ACEOF
17678 rm -f conftest.$ac_objext conftest$ac_exeext
17679 if { (eval echo "$as_me:17679: \"$ac_link\"") >&5
17680   (eval $ac_link) 2>&5
17681   ac_status=$?
17682   echo "$as_me:17682: \$? = $ac_status" >&5
17683   (exit $ac_status); } &&
17684          { ac_try='test -s conftest$ac_exeext'
17685   { (eval echo "$as_me:17685: \"$ac_try\"") >&5
17686   (eval $ac_try) 2>&5
17687   ac_status=$?
17688   echo "$as_me:17688: \$? = $ac_status" >&5
17689   (exit $ac_status); }; }; then
17690
17691         cf_cv_func_openpty=$cf_header
17692         break
17693
17694 else
17695   echo "$as_me: failed program was:" >&5
17696 cat conftest.$ac_ext >&5
17697
17698         cf_cv_func_openpty=no
17699
17700 fi
17701 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17702     done
17703     LIBS="$cf_save_LIBS"
17704
17705 fi
17706 echo "$as_me:17706: result: $cf_cv_func_openpty" >&5
17707 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17708
17709 if test "$cf_cv_func_openpty" != no ; then
17710
17711 cat >>confdefs.h <<EOF
17712 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17713 EOF
17714
17715 cat >>confdefs.h <<\EOF
17716 #define USE_XTERM_PTY 1
17717 EOF
17718
17719     if test "x$cf_cv_lib_util" = xyes ; then
17720         TEST_LIBS="-lutil $TEST_LIBS"
17721     fi
17722 fi
17723
17724 if test "$with_hashed_db" != no ; then
17725
17726 cat >>confdefs.h <<\EOF
17727 #define USE_HASHED_DB 1
17728 EOF
17729
17730 case $with_hashed_db in #(vi
17731 yes|*able*) #(vi
17732     ;;
17733 *)
17734     if test -d "$with_hashed_db" ; then
17735
17736 if test -n "$with_hashed_db/include" ; then
17737   for cf_add_incdir in $with_hashed_db/include
17738   do
17739         while test $cf_add_incdir != /usr/include
17740         do
17741           if test -d $cf_add_incdir
17742           then
17743                 cf_have_incdir=no
17744                 if test -n "$CFLAGS$CPPFLAGS" ; then
17745                   # a loop is needed to ensure we can add subdirs of existing dirs
17746                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17747                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17748                           cf_have_incdir=yes; break
17749                         fi
17750                   done
17751                 fi
17752
17753                 if test "$cf_have_incdir" = no ; then
17754                   if test "$cf_add_incdir" = /usr/local/include ; then
17755                         if test "$GCC" = yes
17756                         then
17757                           cf_save_CPPFLAGS=$CPPFLAGS
17758                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17759                           cat >conftest.$ac_ext <<_ACEOF
17760 #line 17760 "configure"
17761 #include "confdefs.h"
17762 #include <stdio.h>
17763 int
17764 main ()
17765 {
17766 printf("Hello")
17767   ;
17768   return 0;
17769 }
17770 _ACEOF
17771 rm -f conftest.$ac_objext
17772 if { (eval echo "$as_me:17772: \"$ac_compile\"") >&5
17773   (eval $ac_compile) 2>&5
17774   ac_status=$?
17775   echo "$as_me:17775: \$? = $ac_status" >&5
17776   (exit $ac_status); } &&
17777          { ac_try='test -s conftest.$ac_objext'
17778   { (eval echo "$as_me:17778: \"$ac_try\"") >&5
17779   (eval $ac_try) 2>&5
17780   ac_status=$?
17781   echo "$as_me:17781: \$? = $ac_status" >&5
17782   (exit $ac_status); }; }; then
17783   :
17784 else
17785   echo "$as_me: failed program was:" >&5
17786 cat conftest.$ac_ext >&5
17787 cf_have_incdir=yes
17788 fi
17789 rm -f conftest.$ac_objext conftest.$ac_ext
17790                           CPPFLAGS=$cf_save_CPPFLAGS
17791                         fi
17792                   fi
17793                 fi
17794
17795                 if test "$cf_have_incdir" = no ; then
17796                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17797
17798 echo "${as_me:-configure}:17798: testing adding $cf_add_incdir to include-path ..." 1>&5
17799
17800                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17801
17802                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17803                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17804                   cf_add_incdir="$cf_top_incdir"
17805                 else
17806                   break
17807                 fi
17808           fi
17809         done
17810   done
17811 fi
17812
17813 if test -n "$with_hashed_db/lib" ; then
17814   for cf_add_libdir in $with_hashed_db/lib
17815   do
17816     if test $cf_add_libdir = /usr/lib ; then
17817       :
17818     elif test -d $cf_add_libdir
17819     then
17820       cf_have_libdir=no
17821       if test -n "$LDFLAGS$LIBS" ; then
17822         # a loop is needed to ensure we can add subdirs of existing dirs
17823         for cf_test_libdir in $LDFLAGS $LIBS ; do
17824           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17825             cf_have_libdir=yes; break
17826           fi
17827         done
17828       fi
17829       if test "$cf_have_libdir" = no ; then
17830         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17831
17832 echo "${as_me:-configure}:17832: testing adding $cf_add_libdir to library-path ..." 1>&5
17833
17834         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17835       fi
17836     fi
17837   done
17838 fi
17839
17840         else
17841                 case "$with_hashed_db" in #(vi
17842                 ./*|../*|/*)
17843                         { echo "$as_me:17843: WARNING: no such directory $with_hashed_db" >&5
17844 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
17845                         ;; #(vi
17846                 *)
17847
17848 cf_search=
17849
17850 test "x/usr" != "x$prefix" && \
17851 test -d "/usr" && \
17852 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
17853         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
17854         test -d /usr/include &&          cf_search="$cf_search /usr/include"
17855         test -d /usr/include/$with_hashed_db &&       cf_search="$cf_search /usr/include/$with_hashed_db"
17856         test -d /usr/include/$with_hashed_db/include &&    cf_search="$cf_search /usr/include/$with_hashed_db/include"
17857         test -d /usr/$with_hashed_db/include &&       cf_search="$cf_search /usr/$with_hashed_db/include"
17858         test -d /usr/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /usr/$with_hashed_db/include/$with_hashed_db"
17859 }
17860
17861 test "x$prefix" != "xNONE" && \
17862 test -d "$prefix" && \
17863  {
17864         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
17865         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
17866         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
17867         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
17868         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
17869         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
17870 }
17871
17872 test "x/usr/local" != "x$prefix" && \
17873 test -d "/usr/local" && \
17874 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
17875         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
17876         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
17877         test -d /usr/local/include/$with_hashed_db &&       cf_search="$cf_search /usr/local/include/$with_hashed_db"
17878         test -d /usr/local/include/$with_hashed_db/include &&    cf_search="$cf_search /usr/local/include/$with_hashed_db/include"
17879         test -d /usr/local/$with_hashed_db/include &&       cf_search="$cf_search /usr/local/$with_hashed_db/include"
17880         test -d /usr/local/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /usr/local/$with_hashed_db/include/$with_hashed_db"
17881 }
17882
17883 test "x/opt" != "x$prefix" && \
17884 test -d "/opt" && \
17885 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
17886         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
17887         test -d /opt/include &&          cf_search="$cf_search /opt/include"
17888         test -d /opt/include/$with_hashed_db &&       cf_search="$cf_search /opt/include/$with_hashed_db"
17889         test -d /opt/include/$with_hashed_db/include &&    cf_search="$cf_search /opt/include/$with_hashed_db/include"
17890         test -d /opt/$with_hashed_db/include &&       cf_search="$cf_search /opt/$with_hashed_db/include"
17891         test -d /opt/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /opt/$with_hashed_db/include/$with_hashed_db"
17892 }
17893
17894 test "x$HOME" != "x$prefix" && \
17895 test -d "$HOME" && \
17896 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
17897         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
17898         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
17899         test -d $HOME/include/$with_hashed_db &&       cf_search="$cf_search $HOME/include/$with_hashed_db"
17900         test -d $HOME/include/$with_hashed_db/include &&    cf_search="$cf_search $HOME/include/$with_hashed_db/include"
17901         test -d $HOME/$with_hashed_db/include &&       cf_search="$cf_search $HOME/$with_hashed_db/include"
17902         test -d $HOME/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $HOME/$with_hashed_db/include/$with_hashed_db"
17903 }
17904
17905         for cf_item in $cf_search
17906         do
17907                 case $cf_item in #(vi
17908                 */$with_hashed_db)
17909
17910 if test -n "$cf_item" ; then
17911   for cf_add_incdir in $cf_item
17912   do
17913         while test $cf_add_incdir != /usr/include
17914         do
17915           if test -d $cf_add_incdir
17916           then
17917                 cf_have_incdir=no
17918                 if test -n "$CFLAGS$CPPFLAGS" ; then
17919                   # a loop is needed to ensure we can add subdirs of existing dirs
17920                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17921                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17922                           cf_have_incdir=yes; break
17923                         fi
17924                   done
17925                 fi
17926
17927                 if test "$cf_have_incdir" = no ; then
17928                   if test "$cf_add_incdir" = /usr/local/include ; then
17929                         if test "$GCC" = yes
17930                         then
17931                           cf_save_CPPFLAGS=$CPPFLAGS
17932                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17933                           cat >conftest.$ac_ext <<_ACEOF
17934 #line 17934 "configure"
17935 #include "confdefs.h"
17936 #include <stdio.h>
17937 int
17938 main ()
17939 {
17940 printf("Hello")
17941   ;
17942   return 0;
17943 }
17944 _ACEOF
17945 rm -f conftest.$ac_objext
17946 if { (eval echo "$as_me:17946: \"$ac_compile\"") >&5
17947   (eval $ac_compile) 2>&5
17948   ac_status=$?
17949   echo "$as_me:17949: \$? = $ac_status" >&5
17950   (exit $ac_status); } &&
17951          { ac_try='test -s conftest.$ac_objext'
17952   { (eval echo "$as_me:17952: \"$ac_try\"") >&5
17953   (eval $ac_try) 2>&5
17954   ac_status=$?
17955   echo "$as_me:17955: \$? = $ac_status" >&5
17956   (exit $ac_status); }; }; then
17957   :
17958 else
17959   echo "$as_me: failed program was:" >&5
17960 cat conftest.$ac_ext >&5
17961 cf_have_incdir=yes
17962 fi
17963 rm -f conftest.$ac_objext conftest.$ac_ext
17964                           CPPFLAGS=$cf_save_CPPFLAGS
17965                         fi
17966                   fi
17967                 fi
17968
17969                 if test "$cf_have_incdir" = no ; then
17970                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17971
17972 echo "${as_me:-configure}:17972: testing adding $cf_add_incdir to include-path ..." 1>&5
17973
17974                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17975
17976                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17977                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17978                   cf_add_incdir="$cf_top_incdir"
17979                 else
17980                   break
17981                 fi
17982           fi
17983         done
17984   done
17985 fi
17986
17987                         ;;
17988                 esac
17989         done
17990
17991 cf_search=
17992
17993 test "x/usr" != "x$prefix" && \
17994 test -d "/usr" && \
17995 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
17996         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
17997         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
17998         test -d /usr/lib/$with_hashed_db &&       cf_search="$cf_search /usr/lib/$with_hashed_db"
17999         test -d /usr/lib/$with_hashed_db/lib &&    cf_search="$cf_search /usr/lib/$with_hashed_db/lib"
18000         test -d /usr/$with_hashed_db/lib &&       cf_search="$cf_search /usr/$with_hashed_db/lib"
18001         test -d /usr/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /usr/$with_hashed_db/lib/$with_hashed_db"
18002 }
18003
18004 test "x$prefix" != "xNONE" && \
18005 test -d "$prefix" && \
18006  {
18007         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18008         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18009         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18010         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18011         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18012         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18013 }
18014
18015 test "x/usr/local" != "x$prefix" && \
18016 test -d "/usr/local" && \
18017 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
18018         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
18019         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
18020         test -d /usr/local/lib/$with_hashed_db &&       cf_search="$cf_search /usr/local/lib/$with_hashed_db"
18021         test -d /usr/local/lib/$with_hashed_db/lib &&    cf_search="$cf_search /usr/local/lib/$with_hashed_db/lib"
18022         test -d /usr/local/$with_hashed_db/lib &&       cf_search="$cf_search /usr/local/$with_hashed_db/lib"
18023         test -d /usr/local/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /usr/local/$with_hashed_db/lib/$with_hashed_db"
18024 }
18025
18026 test "x/opt" != "x$prefix" && \
18027 test -d "/opt" && \
18028 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
18029         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
18030         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
18031         test -d /opt/lib/$with_hashed_db &&       cf_search="$cf_search /opt/lib/$with_hashed_db"
18032         test -d /opt/lib/$with_hashed_db/lib &&    cf_search="$cf_search /opt/lib/$with_hashed_db/lib"
18033         test -d /opt/$with_hashed_db/lib &&       cf_search="$cf_search /opt/$with_hashed_db/lib"
18034         test -d /opt/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /opt/$with_hashed_db/lib/$with_hashed_db"
18035 }
18036
18037 test "x$HOME" != "x$prefix" && \
18038 test -d "$HOME" && \
18039 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
18040         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
18041         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
18042         test -d $HOME/lib/$with_hashed_db &&       cf_search="$cf_search $HOME/lib/$with_hashed_db"
18043         test -d $HOME/lib/$with_hashed_db/lib &&    cf_search="$cf_search $HOME/lib/$with_hashed_db/lib"
18044         test -d $HOME/$with_hashed_db/lib &&       cf_search="$cf_search $HOME/$with_hashed_db/lib"
18045         test -d $HOME/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $HOME/$with_hashed_db/lib/$with_hashed_db"
18046 }
18047
18048         for cf_item in $cf_search
18049         do
18050                 case $cf_item in #(vi
18051                 */$with_hashed_db)
18052
18053 if test -n "$cf_item" ; then
18054   for cf_add_libdir in $cf_item
18055   do
18056     if test $cf_add_libdir = /usr/lib ; then
18057       :
18058     elif test -d $cf_add_libdir
18059     then
18060       cf_have_libdir=no
18061       if test -n "$LDFLAGS$LIBS" ; then
18062         # a loop is needed to ensure we can add subdirs of existing dirs
18063         for cf_test_libdir in $LDFLAGS $LIBS ; do
18064           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18065             cf_have_libdir=yes; break
18066           fi
18067         done
18068       fi
18069       if test "$cf_have_libdir" = no ; then
18070         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18071
18072 echo "${as_me:-configure}:18072: testing adding $cf_add_libdir to library-path ..." 1>&5
18073
18074         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18075       fi
18076     fi
18077   done
18078 fi
18079
18080                         ;;
18081                 esac
18082         done
18083
18084                         ;;
18085                 esac
18086     fi
18087 esac
18088
18089 echo "$as_me:18089: checking for db.h" >&5
18090 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18091 if test "${ac_cv_header_db_h+set}" = set; then
18092   echo $ECHO_N "(cached) $ECHO_C" >&6
18093 else
18094   cat >conftest.$ac_ext <<_ACEOF
18095 #line 18095 "configure"
18096 #include "confdefs.h"
18097 #include <db.h>
18098 _ACEOF
18099 if { (eval echo "$as_me:18099: \"$ac_cpp conftest.$ac_ext\"") >&5
18100   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18101   ac_status=$?
18102   egrep -v '^ *\+' conftest.er1 >conftest.err
18103   rm -f conftest.er1
18104   cat conftest.err >&5
18105   echo "$as_me:18105: \$? = $ac_status" >&5
18106   (exit $ac_status); } >/dev/null; then
18107   if test -s conftest.err; then
18108     ac_cpp_err=$ac_c_preproc_warn_flag
18109   else
18110     ac_cpp_err=
18111   fi
18112 else
18113   ac_cpp_err=yes
18114 fi
18115 if test -z "$ac_cpp_err"; then
18116   ac_cv_header_db_h=yes
18117 else
18118   echo "$as_me: failed program was:" >&5
18119   cat conftest.$ac_ext >&5
18120   ac_cv_header_db_h=no
18121 fi
18122 rm -f conftest.err conftest.$ac_ext
18123 fi
18124 echo "$as_me:18124: result: $ac_cv_header_db_h" >&5
18125 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18126 if test $ac_cv_header_db_h = yes; then
18127
18128 echo "$as_me:18128: checking for version of db" >&5
18129 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18130 if test "${cf_cv_hashed_db_version+set}" = set; then
18131   echo $ECHO_N "(cached) $ECHO_C" >&6
18132 else
18133
18134 cf_cv_hashed_db_version=unknown
18135
18136 for cf_db_version in 1 2 3 4 5 6
18137 do
18138
18139 echo "${as_me:-configure}:18139: testing checking for db version $cf_db_version ..." 1>&5
18140
18141         cat >conftest.$ac_ext <<_ACEOF
18142 #line 18142 "configure"
18143 #include "confdefs.h"
18144
18145 $ac_includes_default
18146 #include <db.h>
18147
18148 #ifdef DB_VERSION_MAJOR
18149         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18150 #if $cf_db_version == DB_VERSION_MAJOR
18151         /* ok */
18152 #else
18153         make an error
18154 #endif
18155 #else
18156 #if $cf_db_version == 1
18157         /* ok: assuming this is DB 1.8.5 */
18158 #else
18159         make an error
18160 #endif
18161 #endif
18162
18163 int
18164 main ()
18165 {
18166 DBT *foo = 0
18167   ;
18168   return 0;
18169 }
18170 _ACEOF
18171 rm -f conftest.$ac_objext
18172 if { (eval echo "$as_me:18172: \"$ac_compile\"") >&5
18173   (eval $ac_compile) 2>&5
18174   ac_status=$?
18175   echo "$as_me:18175: \$? = $ac_status" >&5
18176   (exit $ac_status); } &&
18177          { ac_try='test -s conftest.$ac_objext'
18178   { (eval echo "$as_me:18178: \"$ac_try\"") >&5
18179   (eval $ac_try) 2>&5
18180   ac_status=$?
18181   echo "$as_me:18181: \$? = $ac_status" >&5
18182   (exit $ac_status); }; }; then
18183
18184         cf_cv_hashed_db_version=$cf_db_version
18185         break
18186
18187 else
18188   echo "$as_me: failed program was:" >&5
18189 cat conftest.$ac_ext >&5
18190 fi
18191 rm -f conftest.$ac_objext conftest.$ac_ext
18192 done
18193
18194 fi
18195 echo "$as_me:18195: result: $cf_cv_hashed_db_version" >&5
18196 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
18197
18198 if test "$cf_cv_hashed_db_version" = unknown ; then
18199         { { echo "$as_me:18199: error: Cannot determine version of db" >&5
18200 echo "$as_me: error: Cannot determine version of db" >&2;}
18201    { (exit 1); exit 1; }; }
18202 else
18203
18204 echo "$as_me:18204: checking for db libraries" >&5
18205 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
18206 if test "${cf_cv_hashed_db_libs+set}" = set; then
18207   echo $ECHO_N "(cached) $ECHO_C" >&6
18208 else
18209
18210 cf_cv_hashed_db_libs=unknown
18211 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
18212 do
18213         cf_save_libs="$LIBS"
18214         if test -n "$cf_db_libs"; then
18215                 LIBS="-l$cf_db_libs $LIBS"
18216         fi
18217
18218 echo "${as_me:-configure}:18218: testing checking for library "$cf_db_libs" ..." 1>&5
18219
18220         cat >conftest.$ac_ext <<_ACEOF
18221 #line 18221 "configure"
18222 #include "confdefs.h"
18223
18224 $ac_includes_default
18225 #include <db.h>
18226
18227 int
18228 main ()
18229 {
18230
18231         char *path = "/tmp/foo";
18232 #ifdef DB_VERSION_MAJOR
18233 #if DB_VERSION_MAJOR >= 4
18234         DB *result = 0;
18235         db_create(&result, NULL, 0);
18236         result->open(result,
18237                 NULL,
18238                 path,
18239                 path,
18240                 DB_HASH,
18241                 DB_CREATE,
18242                 0644);
18243 #elif DB_VERSION_MAJOR >= 3
18244         DB *result = 0;
18245         db_create(&result, NULL, 0);
18246         result->open(result,
18247                 path,
18248                 path,
18249                 DB_HASH,
18250                 DB_CREATE,
18251                 0644);
18252 #elif DB_VERSION_MAJOR >= 2
18253         DB *result = 0;
18254         db_open(path,
18255                 DB_HASH,
18256                 DB_CREATE,
18257                 0644,
18258                 (DB_ENV *) 0,
18259                 (DB_INFO *) 0,
18260                 &result);
18261 #endif /* DB_VERSION_MAJOR */
18262 #else
18263         DB *result = dbopen(path,
18264                      2,
18265                      0644,
18266                      DB_HASH,
18267                      0);
18268 #endif
18269         ${cf_cv_main_return:-return}(result != 0)
18270
18271   ;
18272   return 0;
18273 }
18274 _ACEOF
18275 rm -f conftest.$ac_objext conftest$ac_exeext
18276 if { (eval echo "$as_me:18276: \"$ac_link\"") >&5
18277   (eval $ac_link) 2>&5
18278   ac_status=$?
18279   echo "$as_me:18279: \$? = $ac_status" >&5
18280   (exit $ac_status); } &&
18281          { ac_try='test -s conftest$ac_exeext'
18282   { (eval echo "$as_me:18282: \"$ac_try\"") >&5
18283   (eval $ac_try) 2>&5
18284   ac_status=$?
18285   echo "$as_me:18285: \$? = $ac_status" >&5
18286   (exit $ac_status); }; }; then
18287
18288         if test -n "$cf_db_libs" ; then
18289                 cf_cv_hashed_db_libs=$cf_db_libs
18290         else
18291                 cf_cv_hashed_db_libs=default
18292         fi
18293         LIBS="$cf_save_libs"
18294         break
18295
18296 else
18297   echo "$as_me: failed program was:" >&5
18298 cat conftest.$ac_ext >&5
18299 fi
18300 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18301         LIBS="$cf_save_libs"
18302 done
18303
18304 fi
18305 echo "$as_me:18305: result: $cf_cv_hashed_db_libs" >&5
18306 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
18307
18308         if test "$cf_cv_hashed_db_libs" = unknown ; then
18309                 { { echo "$as_me:18309: error: Cannot determine library for db" >&5
18310 echo "$as_me: error: Cannot determine library for db" >&2;}
18311    { (exit 1); exit 1; }; }
18312         elif test "$cf_cv_hashed_db_libs" != default ; then
18313                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
18314         fi
18315 fi
18316
18317 else
18318
18319         { { echo "$as_me:18319: error: Cannot find db.h" >&5
18320 echo "$as_me: error: Cannot find db.h" >&2;}
18321    { (exit 1); exit 1; }; }
18322
18323 fi
18324
18325 fi
18326
18327 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
18328         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18329         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18330 fi
18331
18332 # Just in case, check if the C compiler has a bool type.
18333
18334 echo "$as_me:18334: checking if we should include stdbool.h" >&5
18335 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18336
18337 if test "${cf_cv_header_stdbool_h+set}" = set; then
18338   echo $ECHO_N "(cached) $ECHO_C" >&6
18339 else
18340
18341         cat >conftest.$ac_ext <<_ACEOF
18342 #line 18342 "configure"
18343 #include "confdefs.h"
18344
18345 int
18346 main ()
18347 {
18348 bool foo = false
18349   ;
18350   return 0;
18351 }
18352 _ACEOF
18353 rm -f conftest.$ac_objext
18354 if { (eval echo "$as_me:18354: \"$ac_compile\"") >&5
18355   (eval $ac_compile) 2>&5
18356   ac_status=$?
18357   echo "$as_me:18357: \$? = $ac_status" >&5
18358   (exit $ac_status); } &&
18359          { ac_try='test -s conftest.$ac_objext'
18360   { (eval echo "$as_me:18360: \"$ac_try\"") >&5
18361   (eval $ac_try) 2>&5
18362   ac_status=$?
18363   echo "$as_me:18363: \$? = $ac_status" >&5
18364   (exit $ac_status); }; }; then
18365   cf_cv_header_stdbool_h=0
18366 else
18367   echo "$as_me: failed program was:" >&5
18368 cat conftest.$ac_ext >&5
18369 cat >conftest.$ac_ext <<_ACEOF
18370 #line 18370 "configure"
18371 #include "confdefs.h"
18372
18373 #ifndef __BEOS__
18374 #include <stdbool.h>
18375 #endif
18376
18377 int
18378 main ()
18379 {
18380 bool foo = false
18381   ;
18382   return 0;
18383 }
18384 _ACEOF
18385 rm -f conftest.$ac_objext
18386 if { (eval echo "$as_me:18386: \"$ac_compile\"") >&5
18387   (eval $ac_compile) 2>&5
18388   ac_status=$?
18389   echo "$as_me:18389: \$? = $ac_status" >&5
18390   (exit $ac_status); } &&
18391          { ac_try='test -s conftest.$ac_objext'
18392   { (eval echo "$as_me:18392: \"$ac_try\"") >&5
18393   (eval $ac_try) 2>&5
18394   ac_status=$?
18395   echo "$as_me:18395: \$? = $ac_status" >&5
18396   (exit $ac_status); }; }; then
18397   cf_cv_header_stdbool_h=1
18398 else
18399   echo "$as_me: failed program was:" >&5
18400 cat conftest.$ac_ext >&5
18401 cf_cv_header_stdbool_h=0
18402 fi
18403 rm -f conftest.$ac_objext conftest.$ac_ext
18404 fi
18405 rm -f conftest.$ac_objext conftest.$ac_ext
18406 fi
18407
18408 if test "$cf_cv_header_stdbool_h" = 1
18409 then    echo "$as_me:18409: result: yes" >&5
18410 echo "${ECHO_T}yes" >&6
18411 else    echo "$as_me:18411: result: no" >&5
18412 echo "${ECHO_T}no" >&6
18413 fi
18414
18415 echo "$as_me:18415: checking for builtin bool type" >&5
18416 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18417
18418 if test "${cf_cv_cc_bool_type+set}" = set; then
18419   echo $ECHO_N "(cached) $ECHO_C" >&6
18420 else
18421
18422         cat >conftest.$ac_ext <<_ACEOF
18423 #line 18423 "configure"
18424 #include "confdefs.h"
18425
18426 #include <stdio.h>
18427 #include <sys/types.h>
18428
18429 int
18430 main ()
18431 {
18432 bool x = false
18433   ;
18434   return 0;
18435 }
18436 _ACEOF
18437 rm -f conftest.$ac_objext
18438 if { (eval echo "$as_me:18438: \"$ac_compile\"") >&5
18439   (eval $ac_compile) 2>&5
18440   ac_status=$?
18441   echo "$as_me:18441: \$? = $ac_status" >&5
18442   (exit $ac_status); } &&
18443          { ac_try='test -s conftest.$ac_objext'
18444   { (eval echo "$as_me:18444: \"$ac_try\"") >&5
18445   (eval $ac_try) 2>&5
18446   ac_status=$?
18447   echo "$as_me:18447: \$? = $ac_status" >&5
18448   (exit $ac_status); }; }; then
18449   cf_cv_cc_bool_type=1
18450 else
18451   echo "$as_me: failed program was:" >&5
18452 cat conftest.$ac_ext >&5
18453 cf_cv_cc_bool_type=0
18454 fi
18455 rm -f conftest.$ac_objext conftest.$ac_ext
18456
18457 fi
18458
18459 if test "$cf_cv_cc_bool_type" = 1
18460 then    echo "$as_me:18460: result: yes" >&5
18461 echo "${ECHO_T}yes" >&6
18462 else    echo "$as_me:18462: result: no" >&5
18463 echo "${ECHO_T}no" >&6
18464 fi
18465
18466 # Check for C++ compiler characteristics (and ensure that it's there!)
18467 if test -n "$CXX" ; then
18468         ac_ext=cc
18469 ac_cpp='$CXXCPP $CPPFLAGS'
18470 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18471 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18472 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18473 ac_main_return=return
18474
18475 if test -n "$GXX" ; then
18476 case $cf_cv_system_name in #(vi
18477 os2*) #(vi
18478         cf_stdcpp_libname=stdcpp
18479         ;;
18480 *)
18481         cf_stdcpp_libname=stdc++
18482         ;;
18483 esac
18484 echo "$as_me:18484: checking for library $cf_stdcpp_libname" >&5
18485 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
18486 if test "${cf_cv_libstdcpp+set}" = set; then
18487   echo $ECHO_N "(cached) $ECHO_C" >&6
18488 else
18489
18490         cf_save="$LIBS"
18491         LIBS="-l$cf_stdcpp_libname $LIBS"
18492 cat >conftest.$ac_ext <<_ACEOF
18493 #line 18493 "configure"
18494 #include "confdefs.h"
18495
18496 #include <strstream.h>
18497 int
18498 main ()
18499 {
18500
18501 char buf[80];
18502 strstreambuf foo(buf, sizeof(buf))
18503
18504   ;
18505   return 0;
18506 }
18507 _ACEOF
18508 rm -f conftest.$ac_objext conftest$ac_exeext
18509 if { (eval echo "$as_me:18509: \"$ac_link\"") >&5
18510   (eval $ac_link) 2>&5
18511   ac_status=$?
18512   echo "$as_me:18512: \$? = $ac_status" >&5
18513   (exit $ac_status); } &&
18514          { ac_try='test -s conftest$ac_exeext'
18515   { (eval echo "$as_me:18515: \"$ac_try\"") >&5
18516   (eval $ac_try) 2>&5
18517   ac_status=$?
18518   echo "$as_me:18518: \$? = $ac_status" >&5
18519   (exit $ac_status); }; }; then
18520   cf_cv_libstdcpp=yes
18521 else
18522   echo "$as_me: failed program was:" >&5
18523 cat conftest.$ac_ext >&5
18524 cf_cv_libstdcpp=no
18525 fi
18526 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18527         LIBS="$cf_save"
18528
18529 fi
18530 echo "$as_me:18530: result: $cf_cv_libstdcpp" >&5
18531 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18532 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
18533 fi
18534
18535         echo "$as_me:18535: checking whether $CXX understands -c and -o together" >&5
18536 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18537 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18538   echo $ECHO_N "(cached) $ECHO_C" >&6
18539 else
18540
18541 cat > conftest.$ac_ext <<CF_EOF
18542 #include <stdio.h>
18543 int main()
18544 {
18545         ${cf_cv_main_return:-return}(0);
18546 }
18547 CF_EOF
18548 # We do the test twice because some compilers refuse to overwrite an
18549 # existing .o file with -o, though they will create one.
18550 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18551 if { (eval echo "$as_me:18551: \"$ac_try\"") >&5
18552   (eval $ac_try) 2>&5
18553   ac_status=$?
18554   echo "$as_me:18554: \$? = $ac_status" >&5
18555   (exit $ac_status); } &&
18556   test -f conftest2.$ac_objext && { (eval echo "$as_me:18556: \"$ac_try\"") >&5
18557   (eval $ac_try) 2>&5
18558   ac_status=$?
18559   echo "$as_me:18559: \$? = $ac_status" >&5
18560   (exit $ac_status); };
18561 then
18562   eval cf_cv_prog_CXX_c_o=yes
18563 else
18564   eval cf_cv_prog_CXX_c_o=no
18565 fi
18566 rm -rf conftest*
18567
18568 fi
18569 if test $cf_cv_prog_CXX_c_o = yes; then
18570   echo "$as_me:18570: result: yes" >&5
18571 echo "${ECHO_T}yes" >&6
18572 else
18573   echo "$as_me:18573: result: no" >&5
18574 echo "${ECHO_T}no" >&6
18575 fi
18576
18577         case $GXX_VERSION in
18578         1*|2.0-6*)
18579                 cf_cxx_library=yes
18580                 ;;
18581         *-2.7*|2.7*)
18582
18583 cf_cxx_library=unknown
18584 case $cf_cv_system_name in #(vi
18585 os2*) #(vi
18586         cf_gpp_libname=gpp
18587         ;;
18588 *)
18589         cf_gpp_libname=g++
18590         ;;
18591 esac
18592 if test "$GXX" = yes; then
18593         echo "$as_me:18593: checking for lib$cf_gpp_libname" >&5
18594 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18595         cf_save="$LIBS"
18596         LIBS="-l$cf_gpp_libname $LIBS"
18597         cat >conftest.$ac_ext <<_ACEOF
18598 #line 18598 "configure"
18599 #include "confdefs.h"
18600
18601 #include <$cf_gpp_libname/builtin.h>
18602
18603 int
18604 main ()
18605 {
18606 two_arg_error_handler_t foo2 = lib_error_handler
18607   ;
18608   return 0;
18609 }
18610 _ACEOF
18611 rm -f conftest.$ac_objext conftest$ac_exeext
18612 if { (eval echo "$as_me:18612: \"$ac_link\"") >&5
18613   (eval $ac_link) 2>&5
18614   ac_status=$?
18615   echo "$as_me:18615: \$? = $ac_status" >&5
18616   (exit $ac_status); } &&
18617          { ac_try='test -s conftest$ac_exeext'
18618   { (eval echo "$as_me:18618: \"$ac_try\"") >&5
18619   (eval $ac_try) 2>&5
18620   ac_status=$?
18621   echo "$as_me:18621: \$? = $ac_status" >&5
18622   (exit $ac_status); }; }; then
18623   cf_cxx_library=yes
18624          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18625          if test "$cf_gpp_libname" = cpp ; then
18626
18627 cat >>confdefs.h <<\EOF
18628 #define HAVE_GPP_BUILTIN_H 1
18629 EOF
18630
18631          else
18632
18633 cat >>confdefs.h <<\EOF
18634 #define HAVE_GXX_BUILTIN_H 1
18635 EOF
18636
18637          fi
18638 else
18639   echo "$as_me: failed program was:" >&5
18640 cat conftest.$ac_ext >&5
18641 cat >conftest.$ac_ext <<_ACEOF
18642 #line 18642 "configure"
18643 #include "confdefs.h"
18644
18645 #include <builtin.h>
18646
18647 int
18648 main ()
18649 {
18650 two_arg_error_handler_t foo2 = lib_error_handler
18651   ;
18652   return 0;
18653 }
18654 _ACEOF
18655 rm -f conftest.$ac_objext conftest$ac_exeext
18656 if { (eval echo "$as_me:18656: \"$ac_link\"") >&5
18657   (eval $ac_link) 2>&5
18658   ac_status=$?
18659   echo "$as_me:18659: \$? = $ac_status" >&5
18660   (exit $ac_status); } &&
18661          { ac_try='test -s conftest$ac_exeext'
18662   { (eval echo "$as_me:18662: \"$ac_try\"") >&5
18663   (eval $ac_try) 2>&5
18664   ac_status=$?
18665   echo "$as_me:18665: \$? = $ac_status" >&5
18666   (exit $ac_status); }; }; then
18667   cf_cxx_library=yes
18668          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18669
18670 cat >>confdefs.h <<\EOF
18671 #define HAVE_BUILTIN_H 1
18672 EOF
18673
18674 else
18675   echo "$as_me: failed program was:" >&5
18676 cat conftest.$ac_ext >&5
18677 cf_cxx_library=no
18678 fi
18679 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18680 fi
18681 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18682         LIBS="$cf_save"
18683         echo "$as_me:18683: result: $cf_cxx_library" >&5
18684 echo "${ECHO_T}$cf_cxx_library" >&6
18685 fi
18686
18687                 ;;
18688         *)
18689                 cf_cxx_library=no
18690                 ;;
18691         esac
18692
18693         ac_ext=cc
18694 ac_cpp='$CXXCPP $CPPFLAGS'
18695 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18696 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18697 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18698 ac_main_return=return
18699 echo "$as_me:18699: checking how to run the C++ preprocessor" >&5
18700 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18701 if test -z "$CXXCPP"; then
18702   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18703   echo $ECHO_N "(cached) $ECHO_C" >&6
18704 else
18705       # Double quotes because CXXCPP needs to be expanded
18706     for CXXCPP in "$CXX -E" "/lib/cpp"
18707     do
18708       ac_preproc_ok=false
18709 for ac_cxx_preproc_warn_flag in '' yes
18710 do
18711   # Use a header file that comes with gcc, so configuring glibc
18712   # with a fresh cross-compiler works.
18713   # On the NeXT, cc -E runs the code through the compiler's parser,
18714   # not just through cpp. "Syntax error" is here to catch this case.
18715   cat >conftest.$ac_ext <<_ACEOF
18716 #line 18716 "configure"
18717 #include "confdefs.h"
18718 #include <assert.h>
18719                      Syntax error
18720 _ACEOF
18721 if { (eval echo "$as_me:18721: \"$ac_cpp conftest.$ac_ext\"") >&5
18722   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18723   ac_status=$?
18724   egrep -v '^ *\+' conftest.er1 >conftest.err
18725   rm -f conftest.er1
18726   cat conftest.err >&5
18727   echo "$as_me:18727: \$? = $ac_status" >&5
18728   (exit $ac_status); } >/dev/null; then
18729   if test -s conftest.err; then
18730     ac_cpp_err=$ac_cxx_preproc_warn_flag
18731   else
18732     ac_cpp_err=
18733   fi
18734 else
18735   ac_cpp_err=yes
18736 fi
18737 if test -z "$ac_cpp_err"; then
18738   :
18739 else
18740   echo "$as_me: failed program was:" >&5
18741   cat conftest.$ac_ext >&5
18742   # Broken: fails on valid input.
18743 continue
18744 fi
18745 rm -f conftest.err conftest.$ac_ext
18746
18747   # OK, works on sane cases.  Now check whether non-existent headers
18748   # can be detected and how.
18749   cat >conftest.$ac_ext <<_ACEOF
18750 #line 18750 "configure"
18751 #include "confdefs.h"
18752 #include <ac_nonexistent.h>
18753 _ACEOF
18754 if { (eval echo "$as_me:18754: \"$ac_cpp conftest.$ac_ext\"") >&5
18755   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18756   ac_status=$?
18757   egrep -v '^ *\+' conftest.er1 >conftest.err
18758   rm -f conftest.er1
18759   cat conftest.err >&5
18760   echo "$as_me:18760: \$? = $ac_status" >&5
18761   (exit $ac_status); } >/dev/null; then
18762   if test -s conftest.err; then
18763     ac_cpp_err=$ac_cxx_preproc_warn_flag
18764   else
18765     ac_cpp_err=
18766   fi
18767 else
18768   ac_cpp_err=yes
18769 fi
18770 if test -z "$ac_cpp_err"; then
18771   # Broken: success on invalid input.
18772 continue
18773 else
18774   echo "$as_me: failed program was:" >&5
18775   cat conftest.$ac_ext >&5
18776   # Passes both tests.
18777 ac_preproc_ok=:
18778 break
18779 fi
18780 rm -f conftest.err conftest.$ac_ext
18781
18782 done
18783 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18784 rm -f conftest.err conftest.$ac_ext
18785 if $ac_preproc_ok; then
18786   break
18787 fi
18788
18789     done
18790     ac_cv_prog_CXXCPP=$CXXCPP
18791
18792 fi
18793   CXXCPP=$ac_cv_prog_CXXCPP
18794 else
18795   ac_cv_prog_CXXCPP=$CXXCPP
18796 fi
18797 echo "$as_me:18797: result: $CXXCPP" >&5
18798 echo "${ECHO_T}$CXXCPP" >&6
18799 ac_preproc_ok=false
18800 for ac_cxx_preproc_warn_flag in '' yes
18801 do
18802   # Use a header file that comes with gcc, so configuring glibc
18803   # with a fresh cross-compiler works.
18804   # On the NeXT, cc -E runs the code through the compiler's parser,
18805   # not just through cpp. "Syntax error" is here to catch this case.
18806   cat >conftest.$ac_ext <<_ACEOF
18807 #line 18807 "configure"
18808 #include "confdefs.h"
18809 #include <assert.h>
18810                      Syntax error
18811 _ACEOF
18812 if { (eval echo "$as_me:18812: \"$ac_cpp conftest.$ac_ext\"") >&5
18813   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18814   ac_status=$?
18815   egrep -v '^ *\+' conftest.er1 >conftest.err
18816   rm -f conftest.er1
18817   cat conftest.err >&5
18818   echo "$as_me:18818: \$? = $ac_status" >&5
18819   (exit $ac_status); } >/dev/null; then
18820   if test -s conftest.err; then
18821     ac_cpp_err=$ac_cxx_preproc_warn_flag
18822   else
18823     ac_cpp_err=
18824   fi
18825 else
18826   ac_cpp_err=yes
18827 fi
18828 if test -z "$ac_cpp_err"; then
18829   :
18830 else
18831   echo "$as_me: failed program was:" >&5
18832   cat conftest.$ac_ext >&5
18833   # Broken: fails on valid input.
18834 continue
18835 fi
18836 rm -f conftest.err conftest.$ac_ext
18837
18838   # OK, works on sane cases.  Now check whether non-existent headers
18839   # can be detected and how.
18840   cat >conftest.$ac_ext <<_ACEOF
18841 #line 18841 "configure"
18842 #include "confdefs.h"
18843 #include <ac_nonexistent.h>
18844 _ACEOF
18845 if { (eval echo "$as_me:18845: \"$ac_cpp conftest.$ac_ext\"") >&5
18846   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18847   ac_status=$?
18848   egrep -v '^ *\+' conftest.er1 >conftest.err
18849   rm -f conftest.er1
18850   cat conftest.err >&5
18851   echo "$as_me:18851: \$? = $ac_status" >&5
18852   (exit $ac_status); } >/dev/null; then
18853   if test -s conftest.err; then
18854     ac_cpp_err=$ac_cxx_preproc_warn_flag
18855   else
18856     ac_cpp_err=
18857   fi
18858 else
18859   ac_cpp_err=yes
18860 fi
18861 if test -z "$ac_cpp_err"; then
18862   # Broken: success on invalid input.
18863 continue
18864 else
18865   echo "$as_me: failed program was:" >&5
18866   cat conftest.$ac_ext >&5
18867   # Passes both tests.
18868 ac_preproc_ok=:
18869 break
18870 fi
18871 rm -f conftest.err conftest.$ac_ext
18872
18873 done
18874 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18875 rm -f conftest.err conftest.$ac_ext
18876 if $ac_preproc_ok; then
18877   :
18878 else
18879   { { echo "$as_me:18879: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18880 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18881    { (exit 1); exit 1; }; }
18882 fi
18883
18884 ac_ext=cc
18885 ac_cpp='$CXXCPP $CPPFLAGS'
18886 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18887 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18888 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18889 ac_main_return=return
18890
18891 for ac_header in typeinfo
18892 do
18893 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18894 echo "$as_me:18894: checking for $ac_header" >&5
18895 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18896 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18897   echo $ECHO_N "(cached) $ECHO_C" >&6
18898 else
18899   cat >conftest.$ac_ext <<_ACEOF
18900 #line 18900 "configure"
18901 #include "confdefs.h"
18902 #include <$ac_header>
18903 _ACEOF
18904 if { (eval echo "$as_me:18904: \"$ac_cpp conftest.$ac_ext\"") >&5
18905   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18906   ac_status=$?
18907   egrep -v '^ *\+' conftest.er1 >conftest.err
18908   rm -f conftest.er1
18909   cat conftest.err >&5
18910   echo "$as_me:18910: \$? = $ac_status" >&5
18911   (exit $ac_status); } >/dev/null; then
18912   if test -s conftest.err; then
18913     ac_cpp_err=$ac_cxx_preproc_warn_flag
18914   else
18915     ac_cpp_err=
18916   fi
18917 else
18918   ac_cpp_err=yes
18919 fi
18920 if test -z "$ac_cpp_err"; then
18921   eval "$as_ac_Header=yes"
18922 else
18923   echo "$as_me: failed program was:" >&5
18924   cat conftest.$ac_ext >&5
18925   eval "$as_ac_Header=no"
18926 fi
18927 rm -f conftest.err conftest.$ac_ext
18928 fi
18929 echo "$as_me:18929: result: `eval echo '${'$as_ac_Header'}'`" >&5
18930 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18931 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18932   cat >>confdefs.h <<EOF
18933 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18934 EOF
18935
18936 fi
18937 done
18938
18939 for ac_header in iostream
18940 do
18941 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18942 echo "$as_me:18942: checking for $ac_header" >&5
18943 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18944 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18945   echo $ECHO_N "(cached) $ECHO_C" >&6
18946 else
18947   cat >conftest.$ac_ext <<_ACEOF
18948 #line 18948 "configure"
18949 #include "confdefs.h"
18950 #include <$ac_header>
18951 _ACEOF
18952 if { (eval echo "$as_me:18952: \"$ac_cpp conftest.$ac_ext\"") >&5
18953   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18954   ac_status=$?
18955   egrep -v '^ *\+' conftest.er1 >conftest.err
18956   rm -f conftest.er1
18957   cat conftest.err >&5
18958   echo "$as_me:18958: \$? = $ac_status" >&5
18959   (exit $ac_status); } >/dev/null; then
18960   if test -s conftest.err; then
18961     ac_cpp_err=$ac_cxx_preproc_warn_flag
18962   else
18963     ac_cpp_err=
18964   fi
18965 else
18966   ac_cpp_err=yes
18967 fi
18968 if test -z "$ac_cpp_err"; then
18969   eval "$as_ac_Header=yes"
18970 else
18971   echo "$as_me: failed program was:" >&5
18972   cat conftest.$ac_ext >&5
18973   eval "$as_ac_Header=no"
18974 fi
18975 rm -f conftest.err conftest.$ac_ext
18976 fi
18977 echo "$as_me:18977: result: `eval echo '${'$as_ac_Header'}'`" >&5
18978 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18979 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18980   cat >>confdefs.h <<EOF
18981 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18982 EOF
18983
18984 fi
18985 done
18986
18987 if test x"$ac_cv_header_iostream" = xyes ; then
18988         echo "$as_me:18988: checking if iostream uses std-namespace" >&5
18989 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18990         cat >conftest.$ac_ext <<_ACEOF
18991 #line 18991 "configure"
18992 #include "confdefs.h"
18993
18994 #include <iostream>
18995 using std::endl;
18996 using std::cerr;
18997 int
18998 main ()
18999 {
19000
19001 cerr << "testing" << endl;
19002
19003   ;
19004   return 0;
19005 }
19006 _ACEOF
19007 rm -f conftest.$ac_objext
19008 if { (eval echo "$as_me:19008: \"$ac_compile\"") >&5
19009   (eval $ac_compile) 2>&5
19010   ac_status=$?
19011   echo "$as_me:19011: \$? = $ac_status" >&5
19012   (exit $ac_status); } &&
19013          { ac_try='test -s conftest.$ac_objext'
19014   { (eval echo "$as_me:19014: \"$ac_try\"") >&5
19015   (eval $ac_try) 2>&5
19016   ac_status=$?
19017   echo "$as_me:19017: \$? = $ac_status" >&5
19018   (exit $ac_status); }; }; then
19019   cf_iostream_namespace=yes
19020 else
19021   echo "$as_me: failed program was:" >&5
19022 cat conftest.$ac_ext >&5
19023 cf_iostream_namespace=no
19024 fi
19025 rm -f conftest.$ac_objext conftest.$ac_ext
19026         echo "$as_me:19026: result: $cf_iostream_namespace" >&5
19027 echo "${ECHO_T}$cf_iostream_namespace" >&6
19028         if test "$cf_iostream_namespace" = yes ; then
19029
19030 cat >>confdefs.h <<\EOF
19031 #define IOSTREAM_NAMESPACE 1
19032 EOF
19033
19034         fi
19035 fi
19036
19037 echo "$as_me:19037: checking if we should include stdbool.h" >&5
19038 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19039
19040 if test "${cf_cv_header_stdbool_h+set}" = set; then
19041   echo $ECHO_N "(cached) $ECHO_C" >&6
19042 else
19043
19044         cat >conftest.$ac_ext <<_ACEOF
19045 #line 19045 "configure"
19046 #include "confdefs.h"
19047
19048 int
19049 main ()
19050 {
19051 bool foo = false
19052   ;
19053   return 0;
19054 }
19055 _ACEOF
19056 rm -f conftest.$ac_objext
19057 if { (eval echo "$as_me:19057: \"$ac_compile\"") >&5
19058   (eval $ac_compile) 2>&5
19059   ac_status=$?
19060   echo "$as_me:19060: \$? = $ac_status" >&5
19061   (exit $ac_status); } &&
19062          { ac_try='test -s conftest.$ac_objext'
19063   { (eval echo "$as_me:19063: \"$ac_try\"") >&5
19064   (eval $ac_try) 2>&5
19065   ac_status=$?
19066   echo "$as_me:19066: \$? = $ac_status" >&5
19067   (exit $ac_status); }; }; then
19068   cf_cv_header_stdbool_h=0
19069 else
19070   echo "$as_me: failed program was:" >&5
19071 cat conftest.$ac_ext >&5
19072 cat >conftest.$ac_ext <<_ACEOF
19073 #line 19073 "configure"
19074 #include "confdefs.h"
19075
19076 #ifndef __BEOS__
19077 #include <stdbool.h>
19078 #endif
19079
19080 int
19081 main ()
19082 {
19083 bool foo = false
19084   ;
19085   return 0;
19086 }
19087 _ACEOF
19088 rm -f conftest.$ac_objext
19089 if { (eval echo "$as_me:19089: \"$ac_compile\"") >&5
19090   (eval $ac_compile) 2>&5
19091   ac_status=$?
19092   echo "$as_me:19092: \$? = $ac_status" >&5
19093   (exit $ac_status); } &&
19094          { ac_try='test -s conftest.$ac_objext'
19095   { (eval echo "$as_me:19095: \"$ac_try\"") >&5
19096   (eval $ac_try) 2>&5
19097   ac_status=$?
19098   echo "$as_me:19098: \$? = $ac_status" >&5
19099   (exit $ac_status); }; }; then
19100   cf_cv_header_stdbool_h=1
19101 else
19102   echo "$as_me: failed program was:" >&5
19103 cat conftest.$ac_ext >&5
19104 cf_cv_header_stdbool_h=0
19105 fi
19106 rm -f conftest.$ac_objext conftest.$ac_ext
19107 fi
19108 rm -f conftest.$ac_objext conftest.$ac_ext
19109 fi
19110
19111 if test "$cf_cv_header_stdbool_h" = 1
19112 then    echo "$as_me:19112: result: yes" >&5
19113 echo "${ECHO_T}yes" >&6
19114 else    echo "$as_me:19114: result: no" >&5
19115 echo "${ECHO_T}no" >&6
19116 fi
19117
19118 echo "$as_me:19118: checking for builtin bool type" >&5
19119 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19120
19121 if test "${cf_cv_builtin_bool+set}" = set; then
19122   echo $ECHO_N "(cached) $ECHO_C" >&6
19123 else
19124
19125         cat >conftest.$ac_ext <<_ACEOF
19126 #line 19126 "configure"
19127 #include "confdefs.h"
19128
19129 #include <stdio.h>
19130 #include <sys/types.h>
19131
19132 int
19133 main ()
19134 {
19135 bool x = false
19136   ;
19137   return 0;
19138 }
19139 _ACEOF
19140 rm -f conftest.$ac_objext
19141 if { (eval echo "$as_me:19141: \"$ac_compile\"") >&5
19142   (eval $ac_compile) 2>&5
19143   ac_status=$?
19144   echo "$as_me:19144: \$? = $ac_status" >&5
19145   (exit $ac_status); } &&
19146          { ac_try='test -s conftest.$ac_objext'
19147   { (eval echo "$as_me:19147: \"$ac_try\"") >&5
19148   (eval $ac_try) 2>&5
19149   ac_status=$?
19150   echo "$as_me:19150: \$? = $ac_status" >&5
19151   (exit $ac_status); }; }; then
19152   cf_cv_builtin_bool=1
19153 else
19154   echo "$as_me: failed program was:" >&5
19155 cat conftest.$ac_ext >&5
19156 cf_cv_builtin_bool=0
19157 fi
19158 rm -f conftest.$ac_objext conftest.$ac_ext
19159
19160 fi
19161
19162 if test "$cf_cv_builtin_bool" = 1
19163 then    echo "$as_me:19163: result: yes" >&5
19164 echo "${ECHO_T}yes" >&6
19165 else    echo "$as_me:19165: result: no" >&5
19166 echo "${ECHO_T}no" >&6
19167 fi
19168
19169 echo "$as_me:19169: checking for size of bool" >&5
19170 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19171 if test "${cf_cv_type_of_bool+set}" = set; then
19172   echo $ECHO_N "(cached) $ECHO_C" >&6
19173 else
19174
19175         rm -f cf_test.out
19176         if test "$cross_compiling" = yes; then
19177   cf_cv_type_of_bool=unknown
19178 else
19179   cat >conftest.$ac_ext <<_ACEOF
19180 #line 19180 "configure"
19181 #include "confdefs.h"
19182
19183 #include <stdlib.h>
19184 #include <stdio.h>
19185
19186 #if defined(__cplusplus)
19187
19188 #ifdef HAVE_GXX_BUILTIN_H
19189 #include <g++/builtin.h>
19190 #elif HAVE_GPP_BUILTIN_H
19191 #include <gpp/builtin.h>
19192 #elif HAVE_BUILTIN_H
19193 #include <builtin.h>
19194 #endif
19195
19196 #else
19197
19198 #if $cf_cv_header_stdbool_h
19199 #include <stdbool.h>
19200 #endif
19201
19202 #endif
19203
19204 int main()
19205 {
19206         FILE *fp = fopen("cf_test.out", "w");
19207         if (fp != 0) {
19208                 bool x = true;
19209                 if ((bool)(-x) >= 0)
19210                         fputs("unsigned ", fp);
19211                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19212                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19213                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19214                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19215                 fclose(fp);
19216         }
19217         ${cf_cv_main_return:-return}(0);
19218 }
19219
19220 _ACEOF
19221 rm -f conftest$ac_exeext
19222 if { (eval echo "$as_me:19222: \"$ac_link\"") >&5
19223   (eval $ac_link) 2>&5
19224   ac_status=$?
19225   echo "$as_me:19225: \$? = $ac_status" >&5
19226   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19227   { (eval echo "$as_me:19227: \"$ac_try\"") >&5
19228   (eval $ac_try) 2>&5
19229   ac_status=$?
19230   echo "$as_me:19230: \$? = $ac_status" >&5
19231   (exit $ac_status); }; }; then
19232   cf_cv_type_of_bool=`cat cf_test.out`
19233                  if test -z "$cf_cv_type_of_bool"; then
19234                    cf_cv_type_of_bool=unknown
19235                  fi
19236 else
19237   echo "$as_me: program exited with status $ac_status" >&5
19238 echo "$as_me: failed program was:" >&5
19239 cat conftest.$ac_ext >&5
19240 cf_cv_type_of_bool=unknown
19241 fi
19242 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19243 fi
19244
19245 fi
19246
19247         rm -f cf_test.out
19248 echo "$as_me:19248: result: $cf_cv_type_of_bool" >&5
19249 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19250 if test "$cf_cv_type_of_bool" = unknown ; then
19251         case .$NCURSES_BOOL in #(vi
19252         .auto|.) NCURSES_BOOL=unsigned;;
19253         esac
19254         { echo "$as_me:19254: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19255 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19256         cf_cv_type_of_bool=$NCURSES_BOOL
19257 fi
19258
19259 echo "$as_me:19259: checking for special defines needed for etip.h" >&5
19260 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
19261 cf_save_CXXFLAGS="$CXXFLAGS"
19262 cf_result="none"
19263
19264 # etip.h includes ncurses.h which includes ncurses_dll.h
19265 # But ncurses_dll.h is generated - fix here.
19266 test -d include || mkdir include
19267 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
19268
19269 for cf_math in "" MATH_H
19270 do
19271 for cf_excp in "" MATH_EXCEPTION
19272 do
19273         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
19274         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
19275         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
19276 cat >conftest.$ac_ext <<_ACEOF
19277 #line 19277 "configure"
19278 #include "confdefs.h"
19279
19280 #include <etip.h.in>
19281
19282 int
19283 main ()
19284 {
19285
19286   ;
19287   return 0;
19288 }
19289 _ACEOF
19290 rm -f conftest.$ac_objext
19291 if { (eval echo "$as_me:19291: \"$ac_compile\"") >&5
19292   (eval $ac_compile) 2>&5
19293   ac_status=$?
19294   echo "$as_me:19294: \$? = $ac_status" >&5
19295   (exit $ac_status); } &&
19296          { ac_try='test -s conftest.$ac_objext'
19297   { (eval echo "$as_me:19297: \"$ac_try\"") >&5
19298   (eval $ac_try) 2>&5
19299   ac_status=$?
19300   echo "$as_me:19300: \$? = $ac_status" >&5
19301   (exit $ac_status); }; }; then
19302
19303         test -n "$cf_math" && cat >>confdefs.h <<EOF
19304 #define ETIP_NEEDS_${cf_math} 1
19305 EOF
19306
19307         test -n "$cf_excp" && cat >>confdefs.h <<EOF
19308 #define ETIP_NEEDS_${cf_excp} 1
19309 EOF
19310
19311         cf_result="$cf_math $cf_excp"
19312         break 2
19313
19314 else
19315   echo "$as_me: failed program was:" >&5
19316 cat conftest.$ac_ext >&5
19317 fi
19318 rm -f conftest.$ac_objext conftest.$ac_ext
19319 done
19320 done
19321 echo "$as_me:19321: result: $cf_result" >&5
19322 echo "${ECHO_T}$cf_result" >&6
19323 CXXFLAGS="$cf_save_CXXFLAGS"
19324
19325 if test -n "$CXX"; then
19326 echo "$as_me:19326: checking if $CXX accepts parameter initialization" >&5
19327 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
19328 if test "${cf_cv_cpp_param_init+set}" = set; then
19329   echo $ECHO_N "(cached) $ECHO_C" >&6
19330 else
19331
19332         ac_ext=cc
19333 ac_cpp='$CXXCPP $CPPFLAGS'
19334 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19335 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19336 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19337 ac_main_return=return
19338
19339         if test "$cross_compiling" = yes; then
19340   cf_cv_cpp_param_init=unknown
19341 else
19342   cat >conftest.$ac_ext <<_ACEOF
19343 #line 19343 "configure"
19344 #include "confdefs.h"
19345
19346 class TEST {
19347 private:
19348         int value;
19349 public:
19350         TEST(int x = 1);
19351         ~TEST();
19352 };
19353
19354 TEST::TEST(int x = 1)   // some compilers do not like second initializer
19355 {
19356         value = x;
19357 }
19358 int main() { }
19359
19360 _ACEOF
19361 rm -f conftest$ac_exeext
19362 if { (eval echo "$as_me:19362: \"$ac_link\"") >&5
19363   (eval $ac_link) 2>&5
19364   ac_status=$?
19365   echo "$as_me:19365: \$? = $ac_status" >&5
19366   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19367   { (eval echo "$as_me:19367: \"$ac_try\"") >&5
19368   (eval $ac_try) 2>&5
19369   ac_status=$?
19370   echo "$as_me:19370: \$? = $ac_status" >&5
19371   (exit $ac_status); }; }; then
19372   cf_cv_cpp_param_init=yes
19373 else
19374   echo "$as_me: program exited with status $ac_status" >&5
19375 echo "$as_me: failed program was:" >&5
19376 cat conftest.$ac_ext >&5
19377 cf_cv_cpp_param_init=no
19378 fi
19379 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19380 fi
19381         ac_ext=cc
19382 ac_cpp='$CXXCPP $CPPFLAGS'
19383 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19384 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19385 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19386 ac_main_return=return
19387
19388 fi
19389 echo "$as_me:19389: result: $cf_cv_cpp_param_init" >&5
19390 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
19391 fi
19392 test "$cf_cv_cpp_param_init" = yes &&
19393 cat >>confdefs.h <<\EOF
19394 #define CPP_HAS_PARAM_INIT 1
19395 EOF
19396
19397 if test -n "$CXX"; then
19398
19399 echo "$as_me:19399: checking if $CXX accepts static_cast" >&5
19400 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
19401 if test "${cf_cv_cpp_static_cast+set}" = set; then
19402   echo $ECHO_N "(cached) $ECHO_C" >&6
19403 else
19404
19405         ac_ext=cc
19406 ac_cpp='$CXXCPP $CPPFLAGS'
19407 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19408 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19409 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19410 ac_main_return=return
19411
19412         cat >conftest.$ac_ext <<_ACEOF
19413 #line 19413 "configure"
19414 #include "confdefs.h"
19415
19416 class NCursesPanel
19417 {
19418 public:
19419   NCursesPanel(int nlines,
19420                int ncols,
19421                int begin_y = 0,
19422                int begin_x = 0)
19423   {
19424   }
19425   NCursesPanel();
19426   ~NCursesPanel();
19427 };
19428
19429 template<class T> class NCursesUserPanel : public NCursesPanel
19430 {
19431 public:
19432   NCursesUserPanel (int nlines,
19433                     int ncols,
19434                     int begin_y = 0,
19435                     int begin_x = 0,
19436                     const T* p_UserData = static_cast<T*>(0))
19437     : NCursesPanel (nlines, ncols, begin_y, begin_x)
19438   {
19439   };
19440   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
19441   {
19442   };
19443
19444   virtual ~NCursesUserPanel() {};
19445 };
19446
19447 int
19448 main ()
19449 {
19450
19451         const char* p_UserData = static_cast<char*>(0)
19452   ;
19453   return 0;
19454 }
19455 _ACEOF
19456 rm -f conftest.$ac_objext
19457 if { (eval echo "$as_me:19457: \"$ac_compile\"") >&5
19458   (eval $ac_compile) 2>&5
19459   ac_status=$?
19460   echo "$as_me:19460: \$? = $ac_status" >&5
19461   (exit $ac_status); } &&
19462          { ac_try='test -s conftest.$ac_objext'
19463   { (eval echo "$as_me:19463: \"$ac_try\"") >&5
19464   (eval $ac_try) 2>&5
19465   ac_status=$?
19466   echo "$as_me:19466: \$? = $ac_status" >&5
19467   (exit $ac_status); }; }; then
19468   cf_cv_cpp_static_cast=yes
19469 else
19470   echo "$as_me: failed program was:" >&5
19471 cat conftest.$ac_ext >&5
19472 cf_cv_cpp_static_cast=no
19473 fi
19474 rm -f conftest.$ac_objext conftest.$ac_ext
19475
19476         ac_ext=cc
19477 ac_cpp='$CXXCPP $CPPFLAGS'
19478 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19479 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19480 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19481 ac_main_return=return
19482
19483 fi
19484 echo "$as_me:19484: result: $cf_cv_cpp_static_cast" >&5
19485 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
19486
19487 fi
19488
19489 test "$cf_cv_cpp_static_cast" = yes &&
19490 cat >>confdefs.h <<\EOF
19491 #define CPP_HAS_STATIC_CAST 1
19492 EOF
19493
19494         CXX_AR='$(AR)'
19495         CXX_ARFLAGS='$(ARFLAGS)'
19496         case $cf_cv_system_name in #(vi
19497         irix*) #(vi
19498             if test "$GXX" != yes ; then
19499                 CXX_AR='$(CXX)'
19500                 CXX_ARFLAGS='-ar -o'
19501             fi
19502             ;;
19503         sco3.2v5*) #(vi
19504             CXXLDFLAGS="-u main"
19505             ;;
19506         solaris2*)
19507             if test "$GXX" != yes ; then
19508                 CXX_AR='$(CXX)'
19509                 CXX_ARFLAGS='-xar -o'
19510             fi
19511             ;;
19512         esac
19513
19514 else
19515         cf_cxx_library=no
19516         cf_cv_builtin_bool=1
19517
19518         # Just because we are not configuring against C++ right now does not
19519         # mean that a user will not want to use C++.  Some distributors disable
19520         # the C++ portion of this configuration as a shortcut (or just to avoid
19521         # compiling the demo in the c++ directory).  So we need a reasonable
19522         # default for the 'bool' type.
19523         #
19524         # Caveat: since the storage of the bool type is not standardized, it
19525         # may change.
19526
19527         if test "$NCURSES_BOOL" != auto ; then
19528                 cf_cv_type_of_bool=$NCURSES_BOOL
19529                 cf_cv_header_stdbool_h=0
19530         else
19531                 if test "$cf_cv_header_stdbool_h" = 1 ; then
19532
19533 echo "$as_me:19533: checking for size of bool" >&5
19534 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19535 if test "${cf_cv_type_of_bool+set}" = set; then
19536   echo $ECHO_N "(cached) $ECHO_C" >&6
19537 else
19538
19539         rm -f cf_test.out
19540         if test "$cross_compiling" = yes; then
19541   cf_cv_type_of_bool=unknown
19542 else
19543   cat >conftest.$ac_ext <<_ACEOF
19544 #line 19544 "configure"
19545 #include "confdefs.h"
19546
19547 #include <stdlib.h>
19548 #include <stdio.h>
19549
19550 #if defined(__cplusplus)
19551
19552 #ifdef HAVE_GXX_BUILTIN_H
19553 #include <g++/builtin.h>
19554 #elif HAVE_GPP_BUILTIN_H
19555 #include <gpp/builtin.h>
19556 #elif HAVE_BUILTIN_H
19557 #include <builtin.h>
19558 #endif
19559
19560 #else
19561
19562 #if $cf_cv_header_stdbool_h
19563 #include <stdbool.h>
19564 #endif
19565
19566 #endif
19567
19568 int main()
19569 {
19570         FILE *fp = fopen("cf_test.out", "w");
19571         if (fp != 0) {
19572                 bool x = true;
19573                 if ((bool)(-x) >= 0)
19574                         fputs("unsigned ", fp);
19575                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19576                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19577                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19578                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19579                 fclose(fp);
19580         }
19581         ${cf_cv_main_return:-return}(0);
19582 }
19583
19584 _ACEOF
19585 rm -f conftest$ac_exeext
19586 if { (eval echo "$as_me:19586: \"$ac_link\"") >&5
19587   (eval $ac_link) 2>&5
19588   ac_status=$?
19589   echo "$as_me:19589: \$? = $ac_status" >&5
19590   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19591   { (eval echo "$as_me:19591: \"$ac_try\"") >&5
19592   (eval $ac_try) 2>&5
19593   ac_status=$?
19594   echo "$as_me:19594: \$? = $ac_status" >&5
19595   (exit $ac_status); }; }; then
19596   cf_cv_type_of_bool=`cat cf_test.out`
19597                  if test -z "$cf_cv_type_of_bool"; then
19598                    cf_cv_type_of_bool=unknown
19599                  fi
19600 else
19601   echo "$as_me: program exited with status $ac_status" >&5
19602 echo "$as_me: failed program was:" >&5
19603 cat conftest.$ac_ext >&5
19604 cf_cv_type_of_bool=unknown
19605 fi
19606 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19607 fi
19608
19609 fi
19610
19611         rm -f cf_test.out
19612 echo "$as_me:19612: result: $cf_cv_type_of_bool" >&5
19613 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19614 if test "$cf_cv_type_of_bool" = unknown ; then
19615         case .$NCURSES_BOOL in #(vi
19616         .auto|.) NCURSES_BOOL=unsigned;;
19617         esac
19618         { echo "$as_me:19618: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19619 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19620         cf_cv_type_of_bool=$NCURSES_BOOL
19621 fi
19622
19623                 else
19624                         echo "$as_me:19624: checking for fallback type of bool" >&5
19625 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19626                         case "$host_cpu" in #(vi
19627                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19628                         *)      cf_cv_type_of_bool=int  ;;
19629                         esac
19630                         echo "$as_me:19630: result: $cf_cv_type_of_bool" >&5
19631 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19632                 fi
19633         fi
19634 fi
19635
19636 # If the C compiler did not declare bool, and we did not determine that the C++
19637 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19638 # ncurses library use the same type as C++ bool.  Note that this allows one to
19639 # specify the type of bool in a configure-script option and postpone
19640 # integration with the C++ compiler provided that the types are compatible.
19641 USE_CXX_BOOL=1
19642 if test $cf_cv_cc_bool_type = 1
19643 then
19644         # oops: C has a bool.  Unlikely, but C++ could differ.
19645         USE_CXX_BOOL=0
19646 elif test $cf_cv_builtin_bool = 0
19647 then
19648         # C++ has no bool
19649         USE_CXX_BOOL=0
19650 else
19651         # this is the normal case
19652         USE_CXX_BOOL='defined(__cplusplus)'
19653 fi
19654
19655 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19656
19657         if test "$cf_with_ada" != "no" ; then
19658                 if test "$with_libtool" != "no"; then
19659                         { echo "$as_me:19659: WARNING: libtool does not support Ada - disabling feature" >&5
19660 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19661                         cf_with_ada=no
19662                 fi
19663         fi
19664
19665         if test "$cf_with_ada" != "no" ; then
19666
19667 cf_ada_make=gnatmake
19668 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19669 set dummy $cf_ada_make; ac_word=$2
19670 echo "$as_me:19670: checking for $ac_word" >&5
19671 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19672 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19673   echo $ECHO_N "(cached) $ECHO_C" >&6
19674 else
19675   if test -n "$gnat_exists"; then
19676   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19677 else
19678   ac_save_IFS=$IFS; IFS=$ac_path_separator
19679 ac_dummy="$PATH"
19680 for ac_dir in $ac_dummy; do
19681   IFS=$ac_save_IFS
19682   test -z "$ac_dir" && ac_dir=.
19683   $as_executable_p "$ac_dir/$ac_word" || continue
19684 ac_cv_prog_gnat_exists="yes"
19685 echo "$as_me:19685: found $ac_dir/$ac_word" >&5
19686 break
19687 done
19688
19689   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19690 fi
19691 fi
19692 gnat_exists=$ac_cv_prog_gnat_exists
19693 if test -n "$gnat_exists"; then
19694   echo "$as_me:19694: result: $gnat_exists" >&5
19695 echo "${ECHO_T}$gnat_exists" >&6
19696 else
19697   echo "$as_me:19697: result: no" >&5
19698 echo "${ECHO_T}no" >&6
19699 fi
19700
19701 if test "$ac_cv_prog_gnat_exists" = no; then
19702    cf_ada_make=
19703    cf_cv_prog_gnat_correct=no
19704 else
19705
19706 echo "$as_me:19706: checking for gnat version" >&5
19707 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19708 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19709         grep '[0-9].[0-9][0-9]*' |\
19710     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19711 echo "$as_me:19711: result: $cf_gnat_version" >&5
19712 echo "${ECHO_T}$cf_gnat_version" >&6
19713
19714 case $cf_gnat_version in #(vi
19715 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19716         cf_cv_prog_gnat_correct=yes
19717         ;;
19718 *)
19719         { echo "$as_me:19719: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19720 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19721         cf_cv_prog_gnat_correct=no
19722         ;;
19723 esac
19724
19725    # Extract the first word of "m4", so it can be a program name with args.
19726 set dummy m4; ac_word=$2
19727 echo "$as_me:19727: checking for $ac_word" >&5
19728 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19729 if test "${ac_cv_prog_M4_exists+set}" = set; then
19730   echo $ECHO_N "(cached) $ECHO_C" >&6
19731 else
19732   if test -n "$M4_exists"; then
19733   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19734 else
19735   ac_save_IFS=$IFS; IFS=$ac_path_separator
19736 ac_dummy="$PATH"
19737 for ac_dir in $ac_dummy; do
19738   IFS=$ac_save_IFS
19739   test -z "$ac_dir" && ac_dir=.
19740   $as_executable_p "$ac_dir/$ac_word" || continue
19741 ac_cv_prog_M4_exists="yes"
19742 echo "$as_me:19742: found $ac_dir/$ac_word" >&5
19743 break
19744 done
19745
19746   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19747 fi
19748 fi
19749 M4_exists=$ac_cv_prog_M4_exists
19750 if test -n "$M4_exists"; then
19751   echo "$as_me:19751: result: $M4_exists" >&5
19752 echo "${ECHO_T}$M4_exists" >&6
19753 else
19754   echo "$as_me:19754: result: no" >&5
19755 echo "${ECHO_T}no" >&6
19756 fi
19757
19758    if test "$ac_cv_prog_M4_exists" = no; then
19759       cf_cv_prog_gnat_correct=no
19760       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19761    fi
19762    if test "$cf_cv_prog_gnat_correct" = yes; then
19763       echo "$as_me:19763: checking if GNAT works" >&5
19764 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19765
19766 rm -rf conftest* *~conftest*
19767 cat >>conftest.ads <<CF_EOF
19768 procedure conftest;
19769 CF_EOF
19770 cat >>conftest.adb <<CF_EOF
19771 with Text_IO;
19772 with GNAT.OS_Lib;
19773 procedure conftest is
19774 begin
19775    Text_IO.Put ("Hello World");
19776    Text_IO.New_Line;
19777    GNAT.OS_Lib.OS_Exit (0);
19778 end conftest;
19779 CF_EOF
19780 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19781    if ( ./conftest 1>&5 2>&1 ) ; then
19782       cf_cv_prog_gnat_correct=yes
19783    else
19784       cf_cv_prog_gnat_correct=no
19785    fi
19786 else
19787    cf_cv_prog_gnat_correct=no
19788 fi
19789 rm -rf conftest* *~conftest*
19790
19791       echo "$as_me:19791: result: $cf_cv_prog_gnat_correct" >&5
19792 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19793    fi
19794 fi
19795
19796                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
19797
19798         ADAFLAGS="$ADAFLAGS -gnatpn"
19799
19800         echo "$as_me:19800: checking optimization options for ADAFLAGS" >&5
19801 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
19802         case "$CFLAGS" in
19803         *-g*)
19804
19805         ADAFLAGS="$ADAFLAGS -g"
19806
19807                 ;;
19808         esac
19809         case "$CFLAGS" in
19810         *-O*)
19811                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
19812
19813         ADAFLAGS="$ADAFLAGS $cf_O_flag"
19814
19815                 ;;
19816         esac
19817         echo "$as_me:19817: result: $ADAFLAGS" >&5
19818 echo "${ECHO_T}$ADAFLAGS" >&6
19819
19820 echo "$as_me:19820: checking if GNAT supports generics" >&5
19821 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19822 case $cf_gnat_version in #(vi
19823 3.[1-9]*|[4-9].*) #(vi
19824         cf_gnat_generics=yes
19825         ;;
19826 *)
19827         cf_gnat_generics=no
19828         ;;
19829 esac
19830 echo "$as_me:19830: result: $cf_gnat_generics" >&5
19831 echo "${ECHO_T}$cf_gnat_generics" >&6
19832
19833 if test "$cf_gnat_generics" = yes
19834 then
19835         cf_compile_generics=generics
19836         cf_generic_objects="\${GENOBJS}"
19837 else
19838         cf_compile_generics=
19839         cf_generic_objects=
19840 fi
19841
19842 echo "$as_me:19842: checking if GNAT supports SIGINT" >&5
19843 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19844 if test "${cf_cv_gnat_sigint+set}" = set; then
19845   echo $ECHO_N "(cached) $ECHO_C" >&6
19846 else
19847
19848 rm -rf conftest* *~conftest*
19849 cat >>conftest.ads <<CF_EOF
19850 with Ada.Interrupts.Names;
19851
19852 package ConfTest is
19853
19854    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19855    pragma Unreserve_All_Interrupts;
19856    pragma Warnings (On);
19857
19858    protected Process is
19859       procedure Stop;
19860       function Continue return Boolean;
19861       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19862    private
19863       Done : Boolean := False;
19864    end Process;
19865
19866 end ConfTest;
19867 CF_EOF
19868 cat >>conftest.adb <<CF_EOF
19869 package body ConfTest is
19870    protected body Process is
19871       procedure Stop is
19872       begin
19873          Done := True;
19874       end Stop;
19875       function Continue return Boolean is
19876       begin
19877          return not Done;
19878       end Continue;
19879    end Process;
19880 end ConfTest;
19881 CF_EOF
19882 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19883       cf_cv_gnat_sigint=yes
19884 else
19885    cf_cv_gnat_sigint=no
19886 fi
19887 rm -rf conftest* *~conftest*
19888
19889 fi
19890 echo "$as_me:19890: result: $cf_cv_gnat_sigint" >&5
19891 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19892
19893 if test $cf_cv_gnat_sigint = yes ; then
19894         USE_GNAT_SIGINT=""
19895 else
19896         USE_GNAT_SIGINT="#"
19897 fi
19898
19899 echo "$as_me:19899: checking for ada-compiler" >&5
19900 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19901
19902 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19903 if test "${with_ada_compiler+set}" = set; then
19904   withval="$with_ada_compiler"
19905   cf_ada_compiler=$withval
19906 else
19907   cf_ada_compiler=gnatmake
19908 fi;
19909
19910 echo "$as_me:19910: result: $cf_ada_compiler" >&5
19911 echo "${ECHO_T}$cf_ada_compiler" >&6
19912
19913                         cf_ada_package=terminal_interface
19914
19915 echo "$as_me:19915: checking for ada-include" >&5
19916 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19917
19918 # Check whether --with-ada-include or --without-ada-include was given.
19919 if test "${with_ada_include+set}" = set; then
19920   withval="$with_ada_include"
19921
19922 else
19923   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19924 fi; if test -n "$prefix/share/ada/adainclude" ; then
19925
19926 if test "x$prefix" != xNONE; then
19927   cf_path_syntax="$prefix"
19928 else
19929   cf_path_syntax="$ac_default_prefix"
19930 fi
19931
19932 case ".$withval" in #(vi
19933 .\$\(*\)*|.\'*\'*) #(vi
19934   ;;
19935 ..|./*|.\\*) #(vi
19936   ;;
19937 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19938   ;;
19939 .\${*prefix}*|.\${*dir}*) #(vi
19940   eval withval="$withval"
19941   case ".$withval" in #(vi
19942   .NONE/*)
19943     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19944     ;;
19945   esac
19946   ;; #(vi
19947 .no|.NONE/*)
19948   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19949   ;;
19950 *)
19951   { { echo "$as_me:19951: error: expected a pathname, not \"$withval\"" >&5
19952 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19953    { (exit 1); exit 1; }; }
19954   ;;
19955 esac
19956
19957 fi
19958 eval ADA_INCLUDE="$withval"
19959
19960 echo "$as_me:19960: result: $ADA_INCLUDE" >&5
19961 echo "${ECHO_T}$ADA_INCLUDE" >&6
19962
19963 echo "$as_me:19963: checking for ada-objects" >&5
19964 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19965
19966 # Check whether --with-ada-objects or --without-ada-objects was given.
19967 if test "${with_ada_objects+set}" = set; then
19968   withval="$with_ada_objects"
19969
19970 else
19971   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19972 fi; if test -n "$prefix/lib/ada/adalib" ; then
19973
19974 if test "x$prefix" != xNONE; then
19975   cf_path_syntax="$prefix"
19976 else
19977   cf_path_syntax="$ac_default_prefix"
19978 fi
19979
19980 case ".$withval" in #(vi
19981 .\$\(*\)*|.\'*\'*) #(vi
19982   ;;
19983 ..|./*|.\\*) #(vi
19984   ;;
19985 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19986   ;;
19987 .\${*prefix}*|.\${*dir}*) #(vi
19988   eval withval="$withval"
19989   case ".$withval" in #(vi
19990   .NONE/*)
19991     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19992     ;;
19993   esac
19994   ;; #(vi
19995 .no|.NONE/*)
19996   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19997   ;;
19998 *)
19999   { { echo "$as_me:19999: error: expected a pathname, not \"$withval\"" >&5
20000 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20001    { (exit 1); exit 1; }; }
20002   ;;
20003 esac
20004
20005 fi
20006 eval ADA_OBJECTS="$withval"
20007
20008 echo "$as_me:20008: result: $ADA_OBJECTS" >&5
20009 echo "${ECHO_T}$ADA_OBJECTS" >&6
20010
20011 cf_gnat_projects=no
20012
20013 echo "$as_me:20013: checking if GNAT supports project files" >&5
20014 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20015 case $cf_gnat_version in #(vi
20016 3.[0-9]*) #(vi
20017         ;;
20018 *)
20019         case $cf_cv_system_name in #(vi
20020         cygwin*|msys*) #(vi
20021                 ;;
20022         *)
20023                 mkdir conftest
20024                 cd conftest
20025                 mkdir lib obj
20026                 cat >>library.gpr <<CF_EOF
20027 project Library is
20028   for Library_Name use "ConfTest";
20029   for Object_Dir use "obj";
20030   for Library_Version use "libConfTest.so.1";
20031   for Library_Kind use "dynamic";
20032   for Library_Dir use "lib";
20033   for Source_Dirs use (".");
20034 end Library;
20035 CF_EOF
20036                 cat >>confpackage.ads <<CF_EOF
20037 package ConfPackage is
20038    procedure conftest;
20039 end ConfPackage;
20040 CF_EOF
20041                 cat >>confpackage.adb <<CF_EOF
20042 with Text_IO;
20043 package body ConfPackage is
20044    procedure conftest is
20045    begin
20046       Text_IO.Put ("Hello World");
20047       Text_IO.New_Line;
20048    end conftest;
20049 end ConfPackage;
20050 CF_EOF
20051                 if ( $cf_ada_make -Plibrary.gpr 1>&5 2>&1 ); then
20052                         cf_gnat_projects=yes
20053                 fi
20054                 cd ..
20055                 rm -rf conftest
20056                 ;;
20057         esac
20058         ;;
20059 esac
20060 echo "$as_me:20060: result: $cf_gnat_projects" >&5
20061 echo "${ECHO_T}$cf_gnat_projects" >&6
20062
20063 echo "$as_me:20063: checking if an Ada95 shared-library should be built" >&5
20064 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
20065
20066 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
20067 if test "${with_ada_sharedlib+set}" = set; then
20068   withval="$with_ada_sharedlib"
20069   with_ada_sharedlib=$withval
20070 else
20071   with_ada_sharedlib=no
20072 fi;
20073 echo "$as_me:20073: result: $with_ada_sharedlib" >&5
20074 echo "${ECHO_T}$with_ada_sharedlib" >&6
20075
20076 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
20077 MAKE_ADA_SHAREDLIB="#"
20078
20079 if test "x$with_ada_sharedlib" != xno
20080 then
20081         if test "$cf_gnat_projects" != yes
20082         then
20083                 { { echo "$as_me:20083: error: ada-sharedlib requires GNAT support for shared library projects" >&5
20084 echo "$as_me: error: ada-sharedlib requires GNAT support for shared library projects" >&2;}
20085    { (exit 1); exit 1; }; }
20086         fi
20087         MAKE_ADA_SHAREDLIB=
20088         if test "x$with_ada_sharedlib" != xyes
20089         then
20090                 ADA_SHAREDLIB="$with_ada_sharedlib"
20091         fi
20092 fi
20093
20094                 fi
20095         fi
20096 else
20097         cf_with_ada=no
20098 fi
20099
20100 # do this "late" to avoid conflict with header-checks
20101 if test "x$with_widec" = xyes ; then
20102         echo "$as_me:20102: checking for wchar_t" >&5
20103 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
20104 if test "${ac_cv_type_wchar_t+set}" = set; then
20105   echo $ECHO_N "(cached) $ECHO_C" >&6
20106 else
20107   cat >conftest.$ac_ext <<_ACEOF
20108 #line 20108 "configure"
20109 #include "confdefs.h"
20110 $ac_includes_default
20111 int
20112 main ()
20113 {
20114 if ((wchar_t *) 0)
20115   return 0;
20116 if (sizeof (wchar_t))
20117   return 0;
20118   ;
20119   return 0;
20120 }
20121 _ACEOF
20122 rm -f conftest.$ac_objext
20123 if { (eval echo "$as_me:20123: \"$ac_compile\"") >&5
20124   (eval $ac_compile) 2>&5
20125   ac_status=$?
20126   echo "$as_me:20126: \$? = $ac_status" >&5
20127   (exit $ac_status); } &&
20128          { ac_try='test -s conftest.$ac_objext'
20129   { (eval echo "$as_me:20129: \"$ac_try\"") >&5
20130   (eval $ac_try) 2>&5
20131   ac_status=$?
20132   echo "$as_me:20132: \$? = $ac_status" >&5
20133   (exit $ac_status); }; }; then
20134   ac_cv_type_wchar_t=yes
20135 else
20136   echo "$as_me: failed program was:" >&5
20137 cat conftest.$ac_ext >&5
20138 ac_cv_type_wchar_t=no
20139 fi
20140 rm -f conftest.$ac_objext conftest.$ac_ext
20141 fi
20142 echo "$as_me:20142: result: $ac_cv_type_wchar_t" >&5
20143 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
20144
20145 echo "$as_me:20145: checking size of wchar_t" >&5
20146 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
20147 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
20148   echo $ECHO_N "(cached) $ECHO_C" >&6
20149 else
20150   if test "$ac_cv_type_wchar_t" = yes; then
20151   if test "$cross_compiling" = yes; then
20152   # Depending upon the size, compute the lo and hi bounds.
20153 cat >conftest.$ac_ext <<_ACEOF
20154 #line 20154 "configure"
20155 #include "confdefs.h"
20156 $ac_includes_default
20157 int
20158 main ()
20159 {
20160 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
20161   ;
20162   return 0;
20163 }
20164 _ACEOF
20165 rm -f conftest.$ac_objext
20166 if { (eval echo "$as_me:20166: \"$ac_compile\"") >&5
20167   (eval $ac_compile) 2>&5
20168   ac_status=$?
20169   echo "$as_me:20169: \$? = $ac_status" >&5
20170   (exit $ac_status); } &&
20171          { ac_try='test -s conftest.$ac_objext'
20172   { (eval echo "$as_me:20172: \"$ac_try\"") >&5
20173   (eval $ac_try) 2>&5
20174   ac_status=$?
20175   echo "$as_me:20175: \$? = $ac_status" >&5
20176   (exit $ac_status); }; }; then
20177   ac_lo=0 ac_mid=0
20178   while :; do
20179     cat >conftest.$ac_ext <<_ACEOF
20180 #line 20180 "configure"
20181 #include "confdefs.h"
20182 $ac_includes_default
20183 int
20184 main ()
20185 {
20186 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20187   ;
20188   return 0;
20189 }
20190 _ACEOF
20191 rm -f conftest.$ac_objext
20192 if { (eval echo "$as_me:20192: \"$ac_compile\"") >&5
20193   (eval $ac_compile) 2>&5
20194   ac_status=$?
20195   echo "$as_me:20195: \$? = $ac_status" >&5
20196   (exit $ac_status); } &&
20197          { ac_try='test -s conftest.$ac_objext'
20198   { (eval echo "$as_me:20198: \"$ac_try\"") >&5
20199   (eval $ac_try) 2>&5
20200   ac_status=$?
20201   echo "$as_me:20201: \$? = $ac_status" >&5
20202   (exit $ac_status); }; }; then
20203   ac_hi=$ac_mid; break
20204 else
20205   echo "$as_me: failed program was:" >&5
20206 cat conftest.$ac_ext >&5
20207 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
20208 fi
20209 rm -f conftest.$ac_objext conftest.$ac_ext
20210   done
20211 else
20212   echo "$as_me: failed program was:" >&5
20213 cat conftest.$ac_ext >&5
20214 ac_hi=-1 ac_mid=-1
20215   while :; do
20216     cat >conftest.$ac_ext <<_ACEOF
20217 #line 20217 "configure"
20218 #include "confdefs.h"
20219 $ac_includes_default
20220 int
20221 main ()
20222 {
20223 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
20224   ;
20225   return 0;
20226 }
20227 _ACEOF
20228 rm -f conftest.$ac_objext
20229 if { (eval echo "$as_me:20229: \"$ac_compile\"") >&5
20230   (eval $ac_compile) 2>&5
20231   ac_status=$?
20232   echo "$as_me:20232: \$? = $ac_status" >&5
20233   (exit $ac_status); } &&
20234          { ac_try='test -s conftest.$ac_objext'
20235   { (eval echo "$as_me:20235: \"$ac_try\"") >&5
20236   (eval $ac_try) 2>&5
20237   ac_status=$?
20238   echo "$as_me:20238: \$? = $ac_status" >&5
20239   (exit $ac_status); }; }; then
20240   ac_lo=$ac_mid; break
20241 else
20242   echo "$as_me: failed program was:" >&5
20243 cat conftest.$ac_ext >&5
20244 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
20245 fi
20246 rm -f conftest.$ac_objext conftest.$ac_ext
20247   done
20248 fi
20249 rm -f conftest.$ac_objext conftest.$ac_ext
20250 # Binary search between lo and hi bounds.
20251 while test "x$ac_lo" != "x$ac_hi"; do
20252   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20253   cat >conftest.$ac_ext <<_ACEOF
20254 #line 20254 "configure"
20255 #include "confdefs.h"
20256 $ac_includes_default
20257 int
20258 main ()
20259 {
20260 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20261   ;
20262   return 0;
20263 }
20264 _ACEOF
20265 rm -f conftest.$ac_objext
20266 if { (eval echo "$as_me:20266: \"$ac_compile\"") >&5
20267   (eval $ac_compile) 2>&5
20268   ac_status=$?
20269   echo "$as_me:20269: \$? = $ac_status" >&5
20270   (exit $ac_status); } &&
20271          { ac_try='test -s conftest.$ac_objext'
20272   { (eval echo "$as_me:20272: \"$ac_try\"") >&5
20273   (eval $ac_try) 2>&5
20274   ac_status=$?
20275   echo "$as_me:20275: \$? = $ac_status" >&5
20276   (exit $ac_status); }; }; then
20277   ac_hi=$ac_mid
20278 else
20279   echo "$as_me: failed program was:" >&5
20280 cat conftest.$ac_ext >&5
20281 ac_lo=`expr $ac_mid + 1`
20282 fi
20283 rm -f conftest.$ac_objext conftest.$ac_ext
20284 done
20285 ac_cv_sizeof_wchar_t=$ac_lo
20286 else
20287   if test "$cross_compiling" = yes; then
20288   { { echo "$as_me:20288: error: cannot run test program while cross compiling" >&5
20289 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20290    { (exit 1); exit 1; }; }
20291 else
20292   cat >conftest.$ac_ext <<_ACEOF
20293 #line 20293 "configure"
20294 #include "confdefs.h"
20295 $ac_includes_default
20296 int
20297 main ()
20298 {
20299 FILE *f = fopen ("conftest.val", "w");
20300 if (!f)
20301   $ac_main_return (1);
20302 fprintf (f, "%d", (sizeof (wchar_t)));
20303 fclose (f);
20304   ;
20305   return 0;
20306 }
20307 _ACEOF
20308 rm -f conftest$ac_exeext
20309 if { (eval echo "$as_me:20309: \"$ac_link\"") >&5
20310   (eval $ac_link) 2>&5
20311   ac_status=$?
20312   echo "$as_me:20312: \$? = $ac_status" >&5
20313   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20314   { (eval echo "$as_me:20314: \"$ac_try\"") >&5
20315   (eval $ac_try) 2>&5
20316   ac_status=$?
20317   echo "$as_me:20317: \$? = $ac_status" >&5
20318   (exit $ac_status); }; }; then
20319   ac_cv_sizeof_wchar_t=`cat conftest.val`
20320 else
20321   echo "$as_me: program exited with status $ac_status" >&5
20322 echo "$as_me: failed program was:" >&5
20323 cat conftest.$ac_ext >&5
20324 fi
20325 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20326 fi
20327 fi
20328 rm -f conftest.val
20329 else
20330   ac_cv_sizeof_wchar_t=0
20331 fi
20332 fi
20333 echo "$as_me:20333: result: $ac_cv_sizeof_wchar_t" >&5
20334 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
20335 cat >>confdefs.h <<EOF
20336 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
20337 EOF
20338
20339 fi
20340
20341 ### Construct the ncurses library-subsets, if any, from this set of keywords:
20342 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
20343 ###
20344 ### ticlib modules may be a separate library, otherwise contained in termlib.
20345 ### termlib modules may be a separate library, otherwise contained in ncurses.
20346 ###
20347 ### The of "+" or " " between the tokens controls the way the script
20348 ### chooses to split module lists into libraries.
20349 ###
20350 ### (see CF_LIB_RULES).
20351 echo "$as_me:20351: checking for library subsets" >&5
20352 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
20353 LIB_SUBSETS=
20354
20355 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
20356         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
20357         if test "$with_ticlib" != no ; then
20358                 LIB_SUBSETS="${LIB_SUBSETS} "
20359         else
20360                 LIB_SUBSETS="${LIB_SUBSETS}+"
20361         fi
20362 fi
20363
20364 LIB_SUBSETS="${LIB_SUBSETS}termlib"
20365 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
20366
20367 if test "$with_termlib" != no ; then
20368         LIB_SUBSETS="${LIB_SUBSETS} "
20369 else
20370         LIB_SUBSETS="${LIB_SUBSETS}+"
20371 fi
20372
20373 LIB_SUBSETS="${LIB_SUBSETS}base"
20374
20375 # Most term-driver calls are to tinfo, but some like init_pair are to the
20376 # base library (so it resides in base).
20377 if test "$with_term_driver" != no ; then
20378         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
20379         case $cf_cv_system_name in #(vi
20380         *mingw32*) #(vi
20381                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
20382                 ;;
20383         *) #(vi
20384                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
20385                 ;;
20386         esac
20387 fi
20388
20389 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
20390 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
20391
20392 echo "$as_me:20392: result: $LIB_SUBSETS" >&5
20393 echo "${ECHO_T}$LIB_SUBSETS" >&6
20394
20395 ### Construct the list of include-directories to be generated
20396
20397 if test "$GCC" != yes; then
20398         CPPFLAGS="-I\${includedir} $CPPFLAGS"
20399 elif test "$includedir" != "/usr/include"; then
20400         if test "$includedir" = '${prefix}/include' ; then
20401                 if test x$prefix != x/usr ; then
20402                         CPPFLAGS="-I\${includedir} $CPPFLAGS"
20403                 fi
20404         else
20405                 CPPFLAGS="-I\${includedir} $CPPFLAGS"
20406         fi
20407 fi
20408 if test "$srcdir" != "."; then
20409         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
20410 fi
20411 CPPFLAGS="-I. -I../include $CPPFLAGS"
20412
20413 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
20414 if test "$srcdir" != "."; then
20415         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
20416 fi
20417 if test "$GCC" != yes; then
20418         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20419 elif test "$includedir" != "/usr/include"; then
20420         if test "$includedir" = '${prefix}/include' ; then
20421                 if test x$prefix != x/usr ; then
20422                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20423                 fi
20424         else
20425                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20426         fi
20427 fi
20428
20429 ### Build up pieces for makefile rules
20430 echo "$as_me:20430: checking default library suffix" >&5
20431 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
20432
20433         case $DFT_LWR_MODEL in
20434         libtool) DFT_ARG_SUFFIX=''   ;;
20435         normal)  DFT_ARG_SUFFIX=''   ;;
20436         debug)   DFT_ARG_SUFFIX='_g' ;;
20437         profile) DFT_ARG_SUFFIX='_p' ;;
20438         shared)  DFT_ARG_SUFFIX=''   ;;
20439         esac
20440         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
20441 echo "$as_me:20441: result: $DFT_ARG_SUFFIX" >&5
20442 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
20443
20444 echo "$as_me:20444: checking default library-dependency suffix" >&5
20445 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
20446
20447         case X$DFT_LWR_MODEL in #(vi
20448         Xlibtool) #(vi
20449                 DFT_LIB_SUFFIX='.la'
20450                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20451                 ;;
20452         Xdebug) #(vi
20453                 DFT_LIB_SUFFIX='_g.a'
20454                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20455                 ;;
20456         Xprofile) #(vi
20457                 DFT_LIB_SUFFIX='_p.a'
20458                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20459                 ;;
20460         Xshared) #(vi
20461                 case $cf_cv_system_name in
20462                 aix[5-7]*) #(vi
20463                         DFT_LIB_SUFFIX='.a'
20464                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20465                         ;;
20466                 cygwin*|msys*|mingw*) #(vi
20467                         DFT_LIB_SUFFIX='.dll'
20468                         DFT_DEP_SUFFIX='.dll.a'
20469                         ;;
20470                 darwin*) #(vi
20471                         DFT_LIB_SUFFIX='.dylib'
20472                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20473                         ;;
20474                 hpux*) #(vi
20475                         case $target in
20476                         ia64*) #(vi
20477                                 DFT_LIB_SUFFIX='.so'
20478                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20479                                 ;;
20480                         *) #(vi
20481                                 DFT_LIB_SUFFIX='.sl'
20482                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20483                                 ;;
20484                         esac
20485                         ;;
20486                 *) #(vi
20487                         DFT_LIB_SUFFIX='.so'
20488                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20489                         ;;
20490                 esac
20491                 ;;
20492         *)
20493                 DFT_LIB_SUFFIX='.a'
20494                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20495                 ;;
20496         esac
20497         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
20498         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
20499 echo "$as_me:20499: result: $DFT_DEP_SUFFIX" >&5
20500 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
20501
20502 echo "$as_me:20502: checking default object directory" >&5
20503 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
20504
20505         case $DFT_LWR_MODEL in
20506         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
20507         normal)  DFT_OBJ_SUBDIR='objects' ;;
20508         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
20509         profile) DFT_OBJ_SUBDIR='obj_p' ;;
20510         shared)
20511                 case $cf_cv_system_name in #(vi
20512                 cygwin|msys) #(vi
20513                         DFT_OBJ_SUBDIR='objects' ;;
20514                 *)
20515                         DFT_OBJ_SUBDIR='obj_s' ;;
20516                 esac
20517         esac
20518 echo "$as_me:20518: result: $DFT_OBJ_SUBDIR" >&5
20519 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
20520
20521 if test "x$cf_with_cxx" = xyes ; then
20522 echo "$as_me:20522: checking c++ library-dependency suffix" >&5
20523 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
20524 if test "$with_libtool" != "no"; then
20525         # libtool thinks it can make c++ shared libraries (perhaps only g++)
20526         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20527 elif test "$with_shared_cxx" != "no"; then
20528         # also for g++ users...
20529         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20530 else
20531         # we normally make a static library because C/C++ library rules differ
20532
20533         case Xnormal in #(vi
20534         Xlibtool) #(vi
20535                 CXX_LIB_SUFFIX='.la'
20536                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20537                 ;;
20538         Xdebug) #(vi
20539                 CXX_LIB_SUFFIX='_g.a'
20540                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20541                 ;;
20542         Xprofile) #(vi
20543                 CXX_LIB_SUFFIX='_p.a'
20544                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20545                 ;;
20546         Xshared) #(vi
20547                 case $cf_cv_system_name in
20548                 aix[5-7]*) #(vi
20549                         CXX_LIB_SUFFIX='.a'
20550                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20551                         ;;
20552                 cygwin*|msys*|mingw*) #(vi
20553                         CXX_LIB_SUFFIX='.dll'
20554                         CXX_DEP_SUFFIX='.dll.a'
20555                         ;;
20556                 darwin*) #(vi
20557                         CXX_LIB_SUFFIX='.dylib'
20558                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20559                         ;;
20560                 hpux*) #(vi
20561                         case $target in
20562                         ia64*) #(vi
20563                                 CXX_LIB_SUFFIX='.so'
20564                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20565                                 ;;
20566                         *) #(vi
20567                                 CXX_LIB_SUFFIX='.sl'
20568                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20569                                 ;;
20570                         esac
20571                         ;;
20572                 *) #(vi
20573                         CXX_LIB_SUFFIX='.so'
20574                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20575                         ;;
20576                 esac
20577                 ;;
20578         *)
20579                 CXX_LIB_SUFFIX='.a'
20580                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20581                 ;;
20582         esac
20583         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
20584         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
20585
20586 fi
20587 echo "$as_me:20587: result: $CXX_LIB_SUFFIX" >&5
20588 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
20589
20590 fi
20591
20592 # do not want -ldl in build except as needed for -lncurses dependency
20593 if test "x$with_dlsym" = xyes ; then
20594 if test $DFT_LWR_MODEL = shared || \
20595    test $DFT_LWR_MODEL = libtool ; then
20596
20597 # remove dl library from $LIBS
20598 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
20599
20600 fi
20601 fi
20602 ### Set up low-level terminfo dependencies for makefiles.
20603
20604 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
20605 # do not need libdl
20606 TICS_LIST=
20607 if test "x$with_dlsym" = xyes ; then
20608
20609 # remove dl library from $SHLIB_LIST
20610 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
20611
20612 fi
20613
20614 if test "$with_ticlib" != no ; then
20615
20616         if test "x$with_ticlib" != xyes ; then
20617                 TICS_NAME=$with_ticlib
20618                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20619                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20620                 TICS_LIB_SUFFIX="${with_ticlib}"
20621         else
20622                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
20623                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
20624                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
20625         fi
20626         TICS_LDFLAGS="-L${LIB_DIR}"
20627         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
20628 else
20629         TICS_LDFLAGS="-L${LIB_DIR}"
20630         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20631 fi
20632
20633 if test "$with_termlib" != no ; then
20634
20635         if test "x$with_termlib" != xyes ; then
20636                 TINFO_NAME=$with_termlib
20637                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20638                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20639                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20640                 TINFO_LIB_SUFFIX="${with_termlib}"
20641         else
20642                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20643                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
20644                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
20645                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
20646         fi
20647
20648         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20649         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20650         if test "$DFT_LWR_MODEL" = "libtool"; then
20651                 TEST_ARGS="${TEST_DEPS}"
20652                 TEST_ARG2="${TEST_DEP2}"
20653                 TINFO_LDFLAGS="-L${LIB_DIR}"
20654                 TINFO_LIBS="$TEST_ARGS"
20655                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
20656                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
20657         else
20658                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
20659                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
20660                 if test "x$with_term_driver" != xno ; then
20661                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20662                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20663                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20664                 else
20665                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20666                         TINFO_LIBS="$TEST_ARGS"
20667                 fi
20668                 TINFO_LDFLAGS="-L${LIB_DIR}"
20669                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20670         fi
20671 else
20672         # the next lines are needed for linking libtic over libncurses
20673         TINFO_NAME=${LIB_NAME}
20674         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20675         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
20676         if test "x$with_tic_depends" = xyes ; then
20677                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20678         else
20679                 TICS_LIST="$SHLIB_LIST"
20680         fi
20681
20682         TINFO_LDFLAGS="-L${LIB_DIR}"
20683         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20684 fi
20685
20686 if test "$DFT_LWR_MODEL" = shared ; then
20687         case $cf_cv_system_name in #(vi
20688         cygwin*|msys*)
20689                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
20690                 TINFO_SUFFIX=.dll
20691                 ;;
20692         esac
20693 fi
20694
20695 if test "x$with_dlsym" = xyes ; then
20696
20697 # remove dl library from $TICS_LIST
20698 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
20699
20700 fi
20701
20702 if test "$DFT_LWR_MODEL" = "libtool"; then
20703     OBJEXT=lo
20704 fi
20705
20706 # needed for Ada95
20707 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
20708
20709 case $DFT_LWR_MODEL in
20710 normal|debug|profile)
20711
20712 if test "$GCC" = yes ; then
20713         case $cf_cv_system_name in #(
20714         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
20715                 LDFLAGS_STATIC=
20716                 LDFLAGS_SHARED=
20717                 ;;
20718     *)  #( normally, except when broken
20719         LDFLAGS_STATIC=-static
20720         LDFLAGS_SHARED=-dynamic
20721         ;;
20722     esac
20723 else
20724         case $cf_cv_system_name in #(
20725         aix[4-7]*)      #( from ld manpage
20726                 LDFLAGS_STATIC=-bstatic
20727                 LDFLAGS_SHARED=-bdynamic
20728                 ;;
20729         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
20730                 # We could also use just "archive" and "shared".
20731                 LDFLAGS_STATIC=-Wl,-a,archive_shared
20732                 LDFLAGS_SHARED=-Wl,-a,shared_archive
20733                 ;;
20734         irix*)          #( from ld manpage IRIX64
20735                 LDFLAGS_STATIC=-Bstatic
20736                 LDFLAGS_SHARED=-Bdynamic
20737                 ;;
20738         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
20739                 # alternative "-oldstyle_liblookup" (not in cc manpage)
20740                 LDFLAGS_STATIC=-noso
20741                 LDFLAGS_SHARED=-so_archive
20742                 ;;
20743         solaris2*)
20744                 LDFLAGS_STATIC=-Bstatic
20745                 LDFLAGS_SHARED=-Bdynamic
20746                 ;;
20747         esac
20748 fi
20749
20750 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
20751 then
20752         echo "$as_me:20752: checking if linker supports switching between static/dynamic" >&5
20753 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
20754
20755         rm -f libconftest.a
20756         cat >conftest.$ac_ext <<EOF
20757 #line 20757 "configure"
20758 #include <stdio.h>
20759 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
20760 EOF
20761         if { (eval echo "$as_me:20761: \"$ac_compile\"") >&5
20762   (eval $ac_compile) 2>&5
20763   ac_status=$?
20764   echo "$as_me:20764: \$? = $ac_status" >&5
20765   (exit $ac_status); } ; then
20766                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
20767                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
20768         fi
20769         rm -f conftest.*
20770
20771         cf_save_LIBS="$LIBS"
20772
20773         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20774         cat >conftest.$ac_ext <<_ACEOF
20775 #line 20775 "configure"
20776 #include "confdefs.h"
20777
20778 #line 20778 "configure"
20779 #include <stdio.h>
20780 int cf_ldflags_static(FILE *fp);
20781
20782 int
20783 main ()
20784 {
20785
20786         return cf_ldflags_static(stdin);
20787
20788   ;
20789   return 0;
20790 }
20791 _ACEOF
20792 rm -f conftest.$ac_objext conftest$ac_exeext
20793 if { (eval echo "$as_me:20793: \"$ac_link\"") >&5
20794   (eval $ac_link) 2>&5
20795   ac_status=$?
20796   echo "$as_me:20796: \$? = $ac_status" >&5
20797   (exit $ac_status); } &&
20798          { ac_try='test -s conftest$ac_exeext'
20799   { (eval echo "$as_me:20799: \"$ac_try\"") >&5
20800   (eval $ac_try) 2>&5
20801   ac_status=$?
20802   echo "$as_me:20802: \$? = $ac_status" >&5
20803   (exit $ac_status); }; }; then
20804
20805         # some linkers simply ignore the -dynamic
20806         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20807         *static*) # (vi
20808                 cf_ldflags_static=no
20809                 ;;
20810         *)
20811                 cf_ldflags_static=yes
20812                 ;;
20813         esac
20814
20815 else
20816   echo "$as_me: failed program was:" >&5
20817 cat conftest.$ac_ext >&5
20818 cf_ldflags_static=no
20819 fi
20820 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20821
20822         rm -f libconftest.*
20823         LIBS="$cf_save_LIBS"
20824
20825         echo "$as_me:20825: result: $cf_ldflags_static" >&5
20826 echo "${ECHO_T}$cf_ldflags_static" >&6
20827
20828         if test $cf_ldflags_static != yes
20829         then
20830                 LDFLAGS_STATIC=
20831                 LDFLAGS_SHARED=
20832         fi
20833 else
20834         LDFLAGS_STATIC=
20835         LDFLAGS_SHARED=
20836 fi
20837
20838         ;;
20839 esac
20840
20841 echo "$as_me:20841: checking where we will install curses.h" >&5
20842 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20843
20844 includesubdir=
20845 if test "$with_overwrite" = no && \
20846  ( test "x$includedir" = 'x${prefix}/include' || \
20847    test "x$includedir" = "x${prefix}/include" )
20848 then
20849         includesubdir="/ncurses${LIB_SUFFIX}"
20850 fi
20851 echo "$as_me:20851: result: ${includedir}${includesubdir}" >&5
20852 echo "${ECHO_T}${includedir}${includesubdir}" >&6
20853
20854 ### Resolve a conflict between normal and wide-curses by forcing applications
20855 ### that will need libutf8 to add it to their configure script.
20856 if test "$with_overwrite" != no ; then
20857 if test "$NCURSES_LIBUTF8" = 1 ; then
20858         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20859         { echo "$as_me:20859: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20860 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20861 fi
20862 fi
20863 WITH_OVERWRITE=$with_overwrite
20864
20865 # used to separate tack out of the tree
20866 NCURSES_TREE=
20867
20868 ### predefined stuff for the test programs
20869
20870 cat >>confdefs.h <<\EOF
20871 #define HAVE_SLK_COLOR 1
20872 EOF
20873
20874 ### Construct the list of subdirectories for which we'll customize makefiles
20875 ### with the appropriate compile-rules.
20876
20877 echo "$as_me:20877: checking for src modules" >&5
20878 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20879
20880 # dependencies and linker-arguments for test-programs
20881 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20882 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20883 if test "$DFT_LWR_MODEL" = "libtool"; then
20884         TEST_ARGS="${TEST_DEPS}"
20885         TEST_ARG2="${TEST_DEP2}"
20886 else
20887         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20888         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20889 fi
20890
20891 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20892 cf_cv_src_modules=
20893 for cf_dir in $modules_to_build
20894 do
20895         if test -f $srcdir/$cf_dir/modules; then
20896
20897                 # We may/may not have tack in the distribution, though the
20898                 # makefile is.
20899                 if test $cf_dir = tack ; then
20900                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20901                                 continue
20902                         fi
20903                 fi
20904
20905                 if test -z "$cf_cv_src_modules"; then
20906                         cf_cv_src_modules=$cf_dir
20907                 else
20908                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20909                 fi
20910
20911                 # Make the ncurses_cfg.h file record the library interface files as
20912                 # well.  These are header files that are the same name as their
20913                 # directory.  Ncurses is the only library that does not follow
20914                 # that pattern.
20915                 if test $cf_dir = tack ; then
20916                         continue
20917                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20918
20919 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20920
20921                         cat >>confdefs.h <<EOF
20922 #define HAVE_${cf_have_include}_H 1
20923 EOF
20924
20925                         cat >>confdefs.h <<EOF
20926 #define HAVE_LIB${cf_have_include} 1
20927 EOF
20928
20929                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20930                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20931                         if test "$DFT_LWR_MODEL" = "libtool"; then
20932                                 TEST_ARGS="${TEST_DEPS}"
20933                                 TEST_ARG2="${TEST_DEP2}"
20934                         else
20935                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20936                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20937                         fi
20938                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20939                 fi
20940         fi
20941 done
20942 echo "$as_me:20942: result: $cf_cv_src_modules" >&5
20943 echo "${ECHO_T}$cf_cv_src_modules" >&6
20944
20945 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20946 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20947
20948 SRC_SUBDIRS=
20949 if test "x$cf_with_manpages" != xno ; then
20950         SRC_SUBDIRS="$SRC_SUBDIRS man"
20951 fi
20952 SRC_SUBDIRS="$SRC_SUBDIRS include"
20953 for cf_dir in $cf_cv_src_modules
20954 do
20955         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20956 done
20957 if test "x$cf_with_tests" != "xno" ; then
20958         SRC_SUBDIRS="$SRC_SUBDIRS test"
20959 fi
20960 if test "x$cf_with_db_install" = xyes; then
20961         test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20962 fi
20963 if test "$cf_with_cxx_binding" != no; then
20964         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20965         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20966 fi
20967
20968 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20969 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20970
20971 ADA_SUBDIRS=
20972 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20973         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20974         ADA_SUBDIRS="gen src"
20975         if test "x$cf_with_tests" != "xno" ; then
20976                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20977         fi
20978 fi
20979
20980 SUB_MAKEFILES=
20981 for cf_dir in $SRC_SUBDIRS
20982 do
20983         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20984 done
20985
20986 if test -n "$ADA_SUBDIRS"; then
20987         for cf_dir in $ADA_SUBDIRS
20988         do
20989                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20990         done
20991
20992 fi
20993
20994 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20995    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20996    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20997 fi
20998
20999 DIRS_TO_MAKE="lib"
21000 for cf_item in $cf_list_models
21001 do
21002
21003         case $cf_item in
21004         libtool) cf_subdir='obj_lo'  ;;
21005         normal)  cf_subdir='objects' ;;
21006         debug)   cf_subdir='obj_g' ;;
21007         profile) cf_subdir='obj_p' ;;
21008         shared)
21009                 case $cf_cv_system_name in #(vi
21010                 cygwin|msys) #(vi
21011                         cf_subdir='objects' ;;
21012                 *)
21013                         cf_subdir='obj_s' ;;
21014                 esac
21015         esac
21016
21017         for cf_item2 in $DIRS_TO_MAKE
21018         do
21019                 test $cf_item2 = $cf_subdir && break
21020         done
21021         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21022 done
21023 for cf_dir in $DIRS_TO_MAKE
21024 do
21025         test ! -d $cf_dir && mkdir $cf_dir
21026 done
21027
21028 # symbols that differ when compiling Ada95 by itself.
21029 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
21030
21031 # values to use as strings
21032
21033 cat >>confdefs.h <<EOF
21034 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
21035 EOF
21036
21037 cat >>confdefs.h <<EOF
21038 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
21039 EOF
21040
21041 ### Now that we're done running tests, add the compiler-warnings, if any
21042
21043 cf_fix_cppflags=no
21044 cf_new_cflags=
21045 cf_new_cppflags=
21046 cf_new_extra_cppflags=
21047
21048 for cf_add_cflags in $EXTRA_CFLAGS
21049 do
21050 case $cf_fix_cppflags in
21051 no)
21052         case $cf_add_cflags in #(vi
21053         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
21054                 case $cf_add_cflags in
21055                 -D*)
21056                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21057
21058                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
21059                                 && test -z "${cf_tst_cflags}" \
21060                                 && cf_fix_cppflags=yes
21061
21062                         if test $cf_fix_cppflags = yes ; then
21063                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21064                                 continue
21065                         elif test "${cf_tst_cflags}" = "\"'" ; then
21066                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21067                                 continue
21068                         fi
21069                         ;;
21070                 esac
21071                 case "$CPPFLAGS" in
21072                 *$cf_add_cflags) #(vi
21073                         ;;
21074                 *) #(vi
21075                         case $cf_add_cflags in #(vi
21076                         -D*)
21077                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21078
21079 CPPFLAGS=`echo "$CPPFLAGS" | \
21080         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21081                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21082
21083                                 ;;
21084                         esac
21085                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
21086                         ;;
21087                 esac
21088                 ;;
21089         *)
21090                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
21091                 ;;
21092         esac
21093         ;;
21094 yes)
21095         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21096
21097         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21098
21099         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
21100                 && test -z "${cf_tst_cflags}" \
21101                 && cf_fix_cppflags=no
21102         ;;
21103 esac
21104 done
21105
21106 if test -n "$cf_new_cflags" ; then
21107
21108         CFLAGS="$CFLAGS $cf_new_cflags"
21109 fi
21110
21111 if test -n "$cf_new_cppflags" ; then
21112
21113         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
21114 fi
21115
21116 if test -n "$cf_new_extra_cppflags" ; then
21117
21118         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
21119 fi
21120
21121 ### Define substitutions for header files to avoid name-pollution
21122
21123 if test "x$cf_cv_have_tcgetattr" = xyes ; then
21124         HAVE_TCGETATTR=1
21125 else
21126         HAVE_TCGETATTR=0
21127 fi
21128
21129 if test "x$ac_cv_header_stdint_h" = xyes ; then
21130         HAVE_STDINT_H=1
21131 else
21132         HAVE_STDINT_H=0
21133 fi
21134
21135 if test "x$ac_cv_header_termio_h" = xyes ; then
21136         HAVE_TERMIO_H=1
21137 else
21138         HAVE_TERMIO_H=0
21139 fi
21140
21141 if test "x$ac_cv_header_termios_h" = xyes ; then
21142         HAVE_TERMIOS_H=1
21143 else
21144         HAVE_TERMIOS_H=0
21145 fi
21146
21147 ################################################################################
21148 test "x$use_database" = xyes && \
21149 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
21150
21151 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
21152 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
21153
21154 if test "x$enable_pc_files" = xyes ; then \
21155 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
21156 MAKE_PC_FILES=
21157 else
21158 MAKE_PC_FILES="#"
21159 fi
21160
21161 # Extract the first word of "tic", so it can be a program name with args.
21162 set dummy tic; ac_word=$2
21163 echo "$as_me:21163: checking for $ac_word" >&5
21164 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21165 if test "${ac_cv_path_TIC_PATH+set}" = set; then
21166   echo $ECHO_N "(cached) $ECHO_C" >&6
21167 else
21168   case $TIC_PATH in
21169   [\\/]* | ?:[\\/]*)
21170   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
21171   ;;
21172   *)
21173   ac_save_IFS=$IFS; IFS=$ac_path_separator
21174 ac_dummy="$PATH:/usr/local/ncurses/bin"
21175 for ac_dir in $ac_dummy; do
21176   IFS=$ac_save_IFS
21177   test -z "$ac_dir" && ac_dir=.
21178   if $as_executable_p "$ac_dir/$ac_word"; then
21179    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
21180    echo "$as_me:21180: found $ac_dir/$ac_word" >&5
21181    break
21182 fi
21183 done
21184
21185   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
21186   ;;
21187 esac
21188 fi
21189 TIC_PATH=$ac_cv_path_TIC_PATH
21190
21191 if test -n "$TIC_PATH"; then
21192   echo "$as_me:21192: result: $TIC_PATH" >&5
21193 echo "${ECHO_T}$TIC_PATH" >&6
21194 else
21195   echo "$as_me:21195: result: no" >&5
21196 echo "${ECHO_T}no" >&6
21197 fi
21198
21199 if test -n "$FALLBACK_LIST"
21200 then
21201         if test "$TIC_PATH" = unknown
21202         then
21203                 { echo "$as_me:21203: WARNING: no tic program found for fallbacks" >&5
21204 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
21205         fi
21206 fi
21207
21208 if test "x$cf_with_tests" != xno ; then
21209         MAKE_TESTS=
21210 else
21211         MAKE_TESTS="#"
21212 fi
21213
21214 ADAHTML_DIR=../../doc/html/ada
21215
21216 # these could be configurable, but are not currently
21217 PANEL_NAME=panel
21218 MENU_NAME=menu
21219 FORM_NAME=form
21220 CXX_NAME=ncurses++
21221
21222 # workaround for g++ versus Solaris (20131116)
21223 case $cf_cv_system_name in #(vi
21224 solaris2*) #(vi
21225         case "x$CPPFLAGS" in #(vi
21226         *-D_XOPEN_SOURCE_EXTENDED*)
21227                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
21228
21229 echo "${as_me:-configure}:21229: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
21230
21231                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
21232                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
21233                 ;;
21234         esac
21235         ;;
21236 esac
21237
21238 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
21239 case "x$NCURSES_OSPEED" in #(vi
21240 *short*) #(vi
21241         cf_compatible=1
21242         ;;
21243 *)
21244         cf_compatible=0
21245         ;;
21246 esac
21247
21248 cat >>confdefs.h <<EOF
21249 #define NCURSES_OSPEED_COMPAT $cf_compatible
21250 EOF
21251
21252 case "x$cf_cv_typeof_chtype" in
21253 xshort|xint|xlong)
21254         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
21255         ;;
21256 esac
21257
21258 case "x$cf_cv_typeof_mmask_t" in
21259 xshort|xint|xlong)
21260         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
21261         ;;
21262 esac
21263
21264 SUB_SCRIPTS=
21265
21266 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"
21267 ac_config_commands="$ac_config_commands default"
21268 cat >confcache <<\_ACEOF
21269 # This file is a shell script that caches the results of configure
21270 # tests run on this system so they can be shared between configure
21271 # scripts and configure runs, see configure's option --config-cache.
21272 # It is not useful on other systems.  If it contains results you don't
21273 # want to keep, you may remove or edit it.
21274 #
21275 # config.status only pays attention to the cache file if you give it
21276 # the --recheck option to rerun configure.
21277 #
21278 # `ac_cv_env_foo' variables (set or unset) will be overriden when
21279 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21280 # following values.
21281
21282 _ACEOF
21283
21284 # The following way of writing the cache mishandles newlines in values,
21285 # but we know of no workaround that is simple, portable, and efficient.
21286 # So, don't put newlines in cache variables' values.
21287 # Ultrix sh set writes to stderr and can't be redirected directly,
21288 # and sets the high bit in the cache file unless we assign to the vars.
21289 {
21290   (set) 2>&1 |
21291     case `(ac_space=' '; set | grep ac_space) 2>&1` in
21292     *ac_space=\ *)
21293       # `set' does not quote correctly, so add quotes (double-quote
21294       # substitution turns \\\\ into \\, and sed turns \\ into \).
21295       sed -n \
21296         "s/'/'\\\\''/g;
21297           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21298       ;;
21299     *)
21300       # `set' quotes correctly as required by POSIX, so do not add quotes.
21301       sed -n \
21302         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
21303       ;;
21304     esac;
21305 } |
21306   sed '
21307      t clear
21308      : clear
21309      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21310      t end
21311      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21312      : end' >>confcache
21313 if cmp -s $cache_file confcache; then :; else
21314   if test -w $cache_file; then
21315     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21316     cat confcache >$cache_file
21317   else
21318     echo "not updating unwritable cache $cache_file"
21319   fi
21320 fi
21321 rm -f confcache
21322
21323 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21324 # Let make expand exec_prefix.
21325 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21326
21327 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21328 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21329 # trailing colons and then remove the whole line if VPATH becomes empty
21330 # (actually we leave an empty line to preserve line numbers).
21331 if test "x$srcdir" = x.; then
21332   ac_vpsub='/^[         ]*VPATH[        ]*=/{
21333 s/:*\$(srcdir):*/:/;
21334 s/:*\${srcdir}:*/:/;
21335 s/:*@srcdir@:*/:/;
21336 s/^\([^=]*=[    ]*\):*/\1/;
21337 s/:*$//;
21338 s/^[^=]*=[      ]*$//;
21339 }'
21340 fi
21341
21342 DEFS=-DHAVE_CONFIG_H
21343
21344 : ${CONFIG_STATUS=./config.status}
21345 ac_clean_files_save=$ac_clean_files
21346 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21347 { echo "$as_me:21347: creating $CONFIG_STATUS" >&5
21348 echo "$as_me: creating $CONFIG_STATUS" >&6;}
21349 cat >$CONFIG_STATUS <<_ACEOF
21350 #! $SHELL
21351 # Generated automatically by configure.
21352 # Run this file to recreate the current configuration.
21353 # Compiler output produced by configure, useful for debugging
21354 # configure, is in config.log if it exists.
21355
21356 debug=false
21357 SHELL=\${CONFIG_SHELL-$SHELL}
21358 ac_cs_invocation="\$0 \$@"
21359
21360 _ACEOF
21361
21362 cat >>$CONFIG_STATUS <<\_ACEOF
21363 # Be Bourne compatible
21364 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21365   emulate sh
21366   NULLCMD=:
21367 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21368   set -o posix
21369 fi
21370
21371 # Name of the executable.
21372 as_me=`echo "$0" |sed 's,.*[\\/],,'`
21373
21374 if expr a : '\(a\)' >/dev/null 2>&1; then
21375   as_expr=expr
21376 else
21377   as_expr=false
21378 fi
21379
21380 rm -f conf$$ conf$$.exe conf$$.file
21381 echo >conf$$.file
21382 if ln -s conf$$.file conf$$ 2>/dev/null; then
21383   # We could just check for DJGPP; but this test a) works b) is more generic
21384   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21385   if test -f conf$$.exe; then
21386     # Don't use ln at all; we don't have any links
21387     as_ln_s='cp -p'
21388   else
21389     as_ln_s='ln -s'
21390   fi
21391 elif ln conf$$.file conf$$ 2>/dev/null; then
21392   as_ln_s=ln
21393 else
21394   as_ln_s='cp -p'
21395 fi
21396 rm -f conf$$ conf$$.exe conf$$.file
21397
21398 as_executable_p="test -f"
21399
21400 # Support unset when possible.
21401 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
21402   as_unset=unset
21403 else
21404   as_unset=false
21405 fi
21406
21407 # NLS nuisances.
21408 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
21409 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
21410 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
21411 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
21412 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
21413 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
21414 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
21415 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
21416
21417 # IFS
21418 # We need space, tab and new line, in precisely that order.
21419 as_nl='
21420 '
21421 IFS="   $as_nl"
21422
21423 # CDPATH.
21424 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
21425
21426 exec 6>&1
21427
21428 _ACEOF
21429
21430 # Files that config.status was made for.
21431 if test -n "$ac_config_files"; then
21432   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21433 fi
21434
21435 if test -n "$ac_config_headers"; then
21436   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21437 fi
21438
21439 if test -n "$ac_config_links"; then
21440   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21441 fi
21442
21443 if test -n "$ac_config_commands"; then
21444   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21445 fi
21446
21447 cat >>$CONFIG_STATUS <<\EOF
21448
21449 ac_cs_usage="\
21450 \`$as_me' instantiates files from templates according to the
21451 current configuration.
21452
21453 Usage: $0 [OPTIONS] [FILE]...
21454
21455   -h, --help       print this help, then exit
21456   -V, --version    print version number, then exit
21457   -d, --debug      don't remove temporary files
21458       --recheck    update $as_me by reconfiguring in the same conditions
21459   --file=FILE[:TEMPLATE]
21460                    instantiate the configuration file FILE
21461   --header=FILE[:TEMPLATE]
21462                    instantiate the configuration header FILE
21463
21464 Configuration files:
21465 $config_files
21466
21467 Configuration headers:
21468 $config_headers
21469
21470 Configuration commands:
21471 $config_commands
21472
21473 Report bugs to <dickey@invisible-island.net>."
21474 EOF
21475
21476 cat >>$CONFIG_STATUS <<EOF
21477 ac_cs_version="\\
21478 config.status
21479 configured by $0, generated by GNU Autoconf 2.52.20121002,
21480   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21481
21482 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
21483 Free Software Foundation, Inc.
21484 This config.status script is free software; the Free Software Foundation
21485 gives unlimited permission to copy, distribute and modify it."
21486 srcdir=$srcdir
21487 INSTALL="$INSTALL"
21488 EOF
21489
21490 cat >>$CONFIG_STATUS <<\EOF
21491 # If no file are specified by the user, then we need to provide default
21492 # value.  By we need to know if files were specified by the user.
21493 ac_need_defaults=:
21494 while test $# != 0
21495 do
21496   case $1 in
21497   --*=*)
21498     ac_option=`expr "x$1" : 'x\([^=]*\)='`
21499     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
21500     shift
21501     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
21502     shift
21503     ;;
21504   -*);;
21505   *) # This is not an option, so the user has probably given explicit
21506      # arguments.
21507      ac_need_defaults=false;;
21508   esac
21509
21510   case $1 in
21511   # Handling of the options.
21512 EOF
21513 cat >>$CONFIG_STATUS <<EOF
21514   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21515     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
21516     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
21517 EOF
21518 cat >>$CONFIG_STATUS <<\EOF
21519   --version | --vers* | -V )
21520     echo "$ac_cs_version"; exit 0 ;;
21521   --he | --h)
21522     # Conflict between --help and --header
21523     { { echo "$as_me:21523: error: ambiguous option: $1
21524 Try \`$0 --help' for more information." >&5
21525 echo "$as_me: error: ambiguous option: $1
21526 Try \`$0 --help' for more information." >&2;}
21527    { (exit 1); exit 1; }; };;
21528   --help | --hel | -h )
21529     echo "$ac_cs_usage"; exit 0 ;;
21530   --debug | --d* | -d )
21531     debug=: ;;
21532   --file | --fil | --fi | --f )
21533     shift
21534     CONFIG_FILES="$CONFIG_FILES $1"
21535     ac_need_defaults=false;;
21536   --header | --heade | --head | --hea )
21537     shift
21538     CONFIG_HEADERS="$CONFIG_HEADERS $1"
21539     ac_need_defaults=false;;
21540
21541   # This is an error.
21542   -*) { { echo "$as_me:21542: error: unrecognized option: $1
21543 Try \`$0 --help' for more information." >&5
21544 echo "$as_me: error: unrecognized option: $1
21545 Try \`$0 --help' for more information." >&2;}
21546    { (exit 1); exit 1; }; } ;;
21547
21548   *) ac_config_targets="$ac_config_targets $1" ;;
21549
21550   esac
21551   shift
21552 done
21553
21554 exec 5>>config.log
21555 cat >&5 << _ACEOF
21556
21557 ## ----------------------- ##
21558 ## Running config.status.  ##
21559 ## ----------------------- ##
21560
21561 This file was extended by $as_me 2.52.20121002, executed with
21562   CONFIG_FILES    = $CONFIG_FILES
21563   CONFIG_HEADERS  = $CONFIG_HEADERS
21564   CONFIG_LINKS    = $CONFIG_LINKS
21565   CONFIG_COMMANDS = $CONFIG_COMMANDS
21566   > $ac_cs_invocation
21567 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21568
21569 _ACEOF
21570 EOF
21571
21572 cat >>$CONFIG_STATUS <<EOF
21573 #
21574 # INIT-COMMANDS section.
21575 #
21576
21577 ### Special initialization commands, used to pass information from the
21578 ### configuration-run into config.status
21579
21580 AWK="$AWK"
21581 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
21582 DFT_LWR_MODEL="$DFT_LWR_MODEL"
21583 ECHO_LD="$ECHO_LD"
21584 LDCONFIG="$LDCONFIG"
21585 LIBTOOL_VERSION="$LIBTOOL_VERSION"
21586 LIB_NAME="$LIB_NAME"
21587 LIB_PREFIX="$LIB_PREFIX"
21588 LIB_SUBSETS="$LIB_SUBSETS"
21589 LIB_SUFFIX="$LIB_SUFFIX"
21590 LIB_TRACING="$LIB_TRACING"
21591 LN_S="$LN_S"
21592 MAKE_TERMINFO="$MAKE_TERMINFO"
21593 NCURSES_MAJOR="$NCURSES_MAJOR"
21594 NCURSES_MINOR="$NCURSES_MINOR"
21595 NCURSES_OSPEED="$NCURSES_OSPEED"
21596 NCURSES_PATCH="$NCURSES_PATCH"
21597 SRC_SUBDIRS="$SRC_SUBDIRS"
21598 TERMINFO="$TERMINFO"
21599 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
21600 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
21601 TICS_NAME="$TICS_NAME"
21602 TIC_PATH="$TIC_PATH"
21603 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
21604 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
21605 TINFO_NAME="$TINFO_NAME"
21606 TINFO_SUFFIX="$TINFO_SUFFIX"
21607 WITH_CURSES_H="$with_curses_h"
21608 WITH_ECHO="${enable_echo:=yes}"
21609 WITH_OVERWRITE="$with_overwrite"
21610 cf_LIST_MODELS="$cf_list_models"
21611 cf_cv_abi_version="$cf_cv_abi_version"
21612 cf_cv_do_relink="$cf_cv_do_relink"
21613 cf_cv_do_symlinks="$cf_cv_do_symlinks"
21614 cf_cv_enable_lp64="$cf_cv_enable_lp64"
21615 cf_cv_enable_opaque="$cf_cv_enable_opaque"
21616 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
21617 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
21618 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
21619 cf_cv_rel_version="$cf_cv_rel_version"
21620 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
21621 cf_cv_shared_soname='$cf_cv_shared_soname'
21622 cf_cv_shlib_version="$cf_cv_shlib_version"
21623 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
21624 cf_cv_system_name="$cf_cv_system_name"
21625 cf_cv_term_driver="$with_term_driver"
21626 cf_with_ada="$cf_with_ada"
21627 cf_with_cxx_binding="$cf_with_cxx_binding"
21628 cf_with_db_install="$cf_with_db_install"
21629 cf_with_manpages="$cf_with_manpages"
21630 cf_with_tests="$cf_with_tests"
21631 with_shared_cxx="$with_shared_cxx"
21632 host="$host"
21633 target="$target"
21634
21635 EOF
21636
21637 cat >>$CONFIG_STATUS <<\EOF
21638 for ac_config_target in $ac_config_targets
21639 do
21640   case "$ac_config_target" in
21641   # Handling of arguments.
21642   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
21643   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
21644   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
21645   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
21646   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
21647   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
21648   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
21649   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21650   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21651   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
21652   *) { { echo "$as_me:21652: error: invalid argument: $ac_config_target" >&5
21653 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21654    { (exit 1); exit 1; }; };;
21655   esac
21656 done
21657
21658 # If the user did not use the arguments to specify the items to instantiate,
21659 # then the envvar interface is used.  Set only those that are not.
21660 # We use the long form for the default assignment because of an extremely
21661 # bizarre bug on SunOS 4.1.3.
21662 if $ac_need_defaults; then
21663   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21664   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21665   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21666 fi
21667
21668 # Create a temporary directory, and hook for its removal unless debugging.
21669 $debug ||
21670 {
21671   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21672   trap '{ (exit 1); exit 1; }' 1 2 13 15
21673 }
21674
21675 # Create a (secure) tmp directory for tmp files.
21676 : ${TMPDIR=/tmp}
21677 {
21678   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
21679   test -n "$tmp" && test -d "$tmp"
21680 }  ||
21681 {
21682   tmp=$TMPDIR/cs$$-$RANDOM
21683   (umask 077 && mkdir $tmp)
21684 } ||
21685 {
21686    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
21687    { (exit 1); exit 1; }
21688 }
21689
21690 EOF
21691
21692 cat >>$CONFIG_STATUS <<EOF
21693
21694 #
21695 # CONFIG_FILES section.
21696 #
21697
21698 # No need to generate the scripts if there are no CONFIG_FILES.
21699 # This happens for instance when ./config.status config.h
21700 if test -n "\$CONFIG_FILES"; then
21701   # Protect against being on the right side of a sed subst in config.status.
21702   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21703    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21704 s,@SHELL@,$SHELL,;t t
21705 s,@exec_prefix@,$exec_prefix,;t t
21706 s,@prefix@,$prefix,;t t
21707 s,@program_transform_name@,$program_transform_name,;t t
21708 s,@bindir@,$bindir,;t t
21709 s,@sbindir@,$sbindir,;t t
21710 s,@libexecdir@,$libexecdir,;t t
21711 s,@datarootdir@,$datarootdir,;t t
21712 s,@datadir@,$datadir,;t t
21713 s,@sysconfdir@,$sysconfdir,;t t
21714 s,@sharedstatedir@,$sharedstatedir,;t t
21715 s,@localstatedir@,$localstatedir,;t t
21716 s,@libdir@,$libdir,;t t
21717 s,@includedir@,$includedir,;t t
21718 s,@oldincludedir@,$oldincludedir,;t t
21719 s,@infodir@,$infodir,;t t
21720 s,@mandir@,$mandir,;t t
21721 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21722 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21723 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21724 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21725 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21726 s,@build_alias@,$build_alias,;t t
21727 s,@host_alias@,$host_alias,;t t
21728 s,@target_alias@,$target_alias,;t t
21729 s,@ECHO_C@,$ECHO_C,;t t
21730 s,@ECHO_N@,$ECHO_N,;t t
21731 s,@ECHO_T@,$ECHO_T,;t t
21732 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21733 s,@DEFS@,$DEFS,;t t
21734 s,@LIBS@,$LIBS,;t t
21735 s,@top_builddir@,$top_builddir,;t t
21736 s,@EGREP@,$EGREP,;t t
21737 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
21738 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
21739 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
21740 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21741 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21742 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
21743 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
21744 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
21745 s,@build@,$build,;t t
21746 s,@build_cpu@,$build_cpu,;t t
21747 s,@build_vendor@,$build_vendor,;t t
21748 s,@build_os@,$build_os,;t t
21749 s,@host@,$host,;t t
21750 s,@host_cpu@,$host_cpu,;t t
21751 s,@host_vendor@,$host_vendor,;t t
21752 s,@host_os@,$host_os,;t t
21753 s,@target@,$target,;t t
21754 s,@target_cpu@,$target_cpu,;t t
21755 s,@target_vendor@,$target_vendor,;t t
21756 s,@target_os@,$target_os,;t t
21757 s,@CC@,$CC,;t t
21758 s,@CFLAGS@,$CFLAGS,;t t
21759 s,@LDFLAGS@,$LDFLAGS,;t t
21760 s,@CPPFLAGS@,$CPPFLAGS,;t t
21761 s,@ac_ct_CC@,$ac_ct_CC,;t t
21762 s,@EXEEXT@,$EXEEXT,;t t
21763 s,@OBJEXT@,$OBJEXT,;t t
21764 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21765 s,@CPP@,$CPP,;t t
21766 s,@LDCONFIG@,$LDCONFIG,;t t
21767 s,@CXX@,$CXX,;t t
21768 s,@CXXFLAGS@,$CXXFLAGS,;t t
21769 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
21770 s,@AWK@,$AWK,;t t
21771 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21772 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21773 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21774 s,@LINT@,$LINT,;t t
21775 s,@LINT_OPTS@,$LINT_OPTS,;t t
21776 s,@LN_S@,$LN_S,;t t
21777 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21778 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21779 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
21780 s,@SET_MAKE@,$SET_MAKE,;t t
21781 s,@CTAGS@,$CTAGS,;t t
21782 s,@ETAGS@,$ETAGS,;t t
21783 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21784 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21785 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
21786 s,@RANLIB@,$RANLIB,;t t
21787 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21788 s,@LD@,$LD,;t t
21789 s,@ac_ct_LD@,$ac_ct_LD,;t t
21790 s,@AR@,$AR,;t t
21791 s,@ac_ct_AR@,$ac_ct_AR,;t t
21792 s,@NM@,$NM,;t t
21793 s,@ac_ct_NM@,$ac_ct_NM,;t t
21794 s,@ARFLAGS@,$ARFLAGS,;t t
21795 s,@DESTDIR@,$DESTDIR,;t t
21796 s,@BUILD_CC@,$BUILD_CC,;t t
21797 s,@BUILD_CPP@,$BUILD_CPP,;t t
21798 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
21799 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
21800 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
21801 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
21802 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
21803 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
21804 s,@cf_list_models@,$cf_list_models,;t t
21805 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
21806 s,@LIBTOOL@,$LIBTOOL,;t t
21807 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
21808 s,@LT_UNDEF@,$LT_UNDEF,;t t
21809 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
21810 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21811 s,@LIB_CREATE@,$LIB_CREATE,;t t
21812 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
21813 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
21814 s,@LIB_PREP@,$LIB_PREP,;t t
21815 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21816 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21817 s,@LIB_LINK@,$LIB_LINK,;t t
21818 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
21819 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
21820 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
21821 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21822 s,@TICS_NAME@,$TICS_NAME,;t t
21823 s,@TINFO_NAME@,$TINFO_NAME,;t t
21824 s,@LIB_NAME@,$LIB_NAME,;t t
21825 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
21826 s,@CC_G_OPT@,$CC_G_OPT,;t t
21827 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
21828 s,@LD_MODEL@,$LD_MODEL,;t t
21829 s,@shlibdir@,$shlibdir,;t t
21830 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
21831 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21832 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
21833 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21834 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
21835 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
21836 s,@LINK_PROGS@,$LINK_PROGS,;t t
21837 s,@LINK_TESTS@,$LINK_TESTS,;t t
21838 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21839 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21840 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21841 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21842 s,@RPATH_LIST@,$RPATH_LIST,;t t
21843 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21844 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21845 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
21846 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21847 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21848 s,@XTERM_KBS@,$XTERM_KBS,;t t
21849 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21850 s,@TERMINFO@,$TERMINFO,;t t
21851 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21852 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21853 s,@TERMPATH@,$TERMPATH,;t t
21854 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
21855 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21856 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21857 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21858 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21859 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21860 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21861 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21862 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21863 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21864 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21865 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21866 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21867 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21868 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21869 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21870 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
21871 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21872 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21873 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21874 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21875 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21876 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21877 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21878 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21879 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21880 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21881 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21882 s,@PTHREAD@,$PTHREAD,;t t
21883 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21884 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21885 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21886 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21887 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21888 s,@ECHO_LT@,$ECHO_LT,;t t
21889 s,@ECHO_LD@,$ECHO_LD,;t t
21890 s,@RULE_CC@,$RULE_CC,;t t
21891 s,@SHOW_CC@,$SHOW_CC,;t t
21892 s,@ECHO_CC@,$ECHO_CC,;t t
21893 s,@ECHO_LINK@,$ECHO_LINK,;t t
21894 s,@ADAFLAGS@,$ADAFLAGS,;t t
21895 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21896 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21897 s,@ADA_TRACE@,$ADA_TRACE,;t t
21898 s,@MATH_LIB@,$MATH_LIB,;t t
21899 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21900 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21901 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21902 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21903 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21904 s,@TEST_LIBS@,$TEST_LIBS,;t t
21905 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21906 s,@CXXCPP@,$CXXCPP,;t t
21907 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21908 s,@CXX_AR@,$CXX_AR,;t t
21909 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21910 s,@CXXLIBS@,$CXXLIBS,;t t
21911 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21912 s,@gnat_exists@,$gnat_exists,;t t
21913 s,@M4_exists@,$M4_exists,;t t
21914 s,@cf_ada_make@,$cf_ada_make,;t t
21915 s,@cf_compile_generics@,$cf_compile_generics,;t t
21916 s,@cf_generic_objects@,$cf_generic_objects,;t t
21917 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21918 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21919 s,@cf_ada_package@,$cf_ada_package,;t t
21920 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21921 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21922 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21923 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21924 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21925 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21926 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21927 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21928 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21929 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21930 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21931 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21932 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21933 s,@TICS_LIBS@,$TICS_LIBS,;t t
21934 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21935 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21936 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21937 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21938 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21939 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21940 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21941 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21942 s,@includesubdir@,$includesubdir,;t t
21943 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21944 s,@TICS_LIST@,$TICS_LIST,;t t
21945 s,@TINFO_LIST@,$TINFO_LIST,;t t
21946 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21947 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21948 s,@TEST_ARGS@,$TEST_ARGS,;t t
21949 s,@TEST_DEPS@,$TEST_DEPS,;t t
21950 s,@TEST_ARG2@,$TEST_ARG2,;t t
21951 s,@TEST_DEP2@,$TEST_DEP2,;t t
21952 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21953 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21954 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21955 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21956 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21957 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
21958 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21959 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21960 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21961 s,@cross_compiling@,$cross_compiling,;t t
21962 s,@TIC_PATH@,$TIC_PATH,;t t
21963 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21964 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21965 s,@PANEL_NAME@,$PANEL_NAME,;t t
21966 s,@MENU_NAME@,$MENU_NAME,;t t
21967 s,@FORM_NAME@,$FORM_NAME,;t t
21968 s,@CXX_NAME@,$CXX_NAME,;t t
21969 CEOF
21970
21971 EOF
21972
21973   cat >>$CONFIG_STATUS <<\EOF
21974   # Split the substitutions into bite-sized pieces for seds with
21975   # small command number limits, like on Digital OSF/1 and HP-UX.
21976   ac_max_sed_lines=48
21977   ac_sed_frag=1 # Number of current file.
21978   ac_beg=1 # First line for current file.
21979   ac_end=$ac_max_sed_lines # Line after last line for current file.
21980   ac_more_lines=:
21981   ac_sed_cmds=
21982   while $ac_more_lines; do
21983     if test $ac_beg -gt 1; then
21984       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21985     else
21986       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21987     fi
21988     if test ! -s $tmp/subs.frag; then
21989       ac_more_lines=false
21990     else
21991       # The purpose of the label and of the branching condition is to
21992       # speed up the sed processing (if there are no `@' at all, there
21993       # is no need to browse any of the substitutions).
21994       # These are the two extra sed commands mentioned above.
21995       (echo ':t
21996   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21997       if test -z "$ac_sed_cmds"; then
21998         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21999       else
22000         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22001       fi
22002       ac_sed_frag=`expr $ac_sed_frag + 1`
22003       ac_beg=$ac_end
22004       ac_end=`expr $ac_end + $ac_max_sed_lines`
22005     fi
22006   done
22007   if test -z "$ac_sed_cmds"; then
22008     ac_sed_cmds=cat
22009   fi
22010 fi # test -n "$CONFIG_FILES"
22011
22012 EOF
22013 cat >>$CONFIG_STATUS <<\EOF
22014 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22015   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22016   case $ac_file in
22017   - | *:- | *:-:* ) # input from stdin
22018         cat >$tmp/stdin
22019         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22020         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22021   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22022         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22023   * )   ac_file_in=$ac_file.in ;;
22024   esac
22025
22026   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22027   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22028          X"$ac_file" : 'X\(//\)[^/]' \| \
22029          X"$ac_file" : 'X\(//\)$' \| \
22030          X"$ac_file" : 'X\(/\)' \| \
22031          .     : '\(.\)' 2>/dev/null ||
22032 echo X"$ac_file" |
22033     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22034           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22035           /^X\(\/\/\)$/{ s//\1/; q; }
22036           /^X\(\/\).*/{ s//\1/; q; }
22037           s/.*/./; q'`
22038   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22039     { case "$ac_dir" in
22040   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22041   *)                      as_incr_dir=.;;
22042 esac
22043 as_dummy="$ac_dir"
22044 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22045   case $as_mkdir_dir in
22046     # Skip DOS drivespec
22047     ?:) as_incr_dir=$as_mkdir_dir ;;
22048     *)
22049       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22050       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22051     ;;
22052   esac
22053 done; }
22054
22055     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
22056     # A "../" for each directory in $ac_dir_suffix.
22057     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
22058   else
22059     ac_dir_suffix= ac_dots=
22060   fi
22061
22062   case $srcdir in
22063   .)  ac_srcdir=.
22064       if test -z "$ac_dots"; then
22065          ac_top_srcdir=.
22066       else
22067          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
22068       fi ;;
22069   [\\/]* | ?:[\\/]* )
22070       ac_srcdir=$srcdir$ac_dir_suffix;
22071       ac_top_srcdir=$srcdir ;;
22072   *) # Relative path.
22073     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
22074     ac_top_srcdir=$ac_dots$srcdir ;;
22075   esac
22076
22077   case $INSTALL in
22078   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22079   *) ac_INSTALL=$ac_dots$INSTALL ;;
22080   esac
22081
22082   if test x"$ac_file" != x-; then
22083     { echo "$as_me:22083: creating $ac_file" >&5
22084 echo "$as_me: creating $ac_file" >&6;}
22085     rm -f "$ac_file"
22086   fi
22087   # Let's still pretend it is `configure' which instantiates (i.e., don't
22088   # use $as_me), people would be surprised to read:
22089   #    /* config.h.  Generated automatically by config.status.  */
22090   configure_input="Generated automatically from `echo $ac_file_in |
22091                                                  sed 's,.*/,,'` by configure."
22092
22093   # First look for the input files in the build tree, otherwise in the
22094   # src tree.
22095   ac_file_inputs=`IFS=:
22096     for f in $ac_file_in; do
22097       case $f in
22098       -) echo $tmp/stdin ;;
22099       [\\/$]*)
22100          # Absolute (can't be DOS-style, as IFS=:)
22101          test -f "$f" || { { echo "$as_me:22101: error: cannot find input file: $f" >&5
22102 echo "$as_me: error: cannot find input file: $f" >&2;}
22103    { (exit 1); exit 1; }; }
22104          echo $f;;
22105       *) # Relative
22106          if test -f "$f"; then
22107            # Build tree
22108            echo $f
22109          elif test -f "$srcdir/$f"; then
22110            # Source tree
22111            echo $srcdir/$f
22112          else
22113            # /dev/null tree
22114            { { echo "$as_me:22114: error: cannot find input file: $f" >&5
22115 echo "$as_me: error: cannot find input file: $f" >&2;}
22116    { (exit 1); exit 1; }; }
22117          fi;;
22118       esac
22119     done` || { (exit 1); exit 1; }
22120 EOF
22121 cat >>$CONFIG_STATUS <<\EOF
22122   ac_warn_datarootdir=no
22123   if test x"$ac_file" != x-; then
22124     for ac_item in $ac_file_inputs
22125     do
22126       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
22127       if test -n "$ac_seen"; then
22128         ac_used=`grep '@datarootdir@' $ac_item`
22129         if test -z "$ac_used"; then
22130           { echo "$as_me:22130: WARNING: datarootdir was used implicitly but not set:
22131 $ac_seen" >&5
22132 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
22133 $ac_seen" >&2;}
22134           ac_warn_datarootdir=yes
22135         fi
22136       fi
22137       ac_seen=`grep '${datarootdir}' $ac_item`
22138       if test -n "$ac_seen"; then
22139         { echo "$as_me:22139: WARNING: datarootdir was used explicitly but not set:
22140 $ac_seen" >&5
22141 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
22142 $ac_seen" >&2;}
22143         ac_warn_datarootdir=yes
22144       fi
22145     done
22146   fi
22147
22148 if test "x$ac_warn_datarootdir" = xyes; then
22149   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
22150 fi
22151
22152 EOF
22153 cat >>$CONFIG_STATUS <<EOF
22154   sed "$ac_vpsub
22155 $extrasub
22156 EOF
22157 cat >>$CONFIG_STATUS <<\EOF
22158 :t
22159 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22160 s,@configure_input@,$configure_input,;t t
22161 s,@srcdir@,$ac_srcdir,;t t
22162 s,@top_srcdir@,$ac_top_srcdir,;t t
22163 s,@INSTALL@,$ac_INSTALL,;t t
22164 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22165   rm -f $tmp/stdin
22166   if test x"$ac_file" != x-; then
22167     cp $tmp/out $ac_file
22168
22169     for ac_name in prefix exec_prefix datarootdir
22170     do
22171         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
22172         if test -n "$ac_seen"; then
22173             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
22174             if test -z "$ac_init"; then
22175               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
22176               { echo "$as_me:22176: WARNING: Variable $ac_name is used but was not set:
22177 $ac_seen" >&5
22178 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
22179 $ac_seen" >&2;}
22180             fi
22181         fi
22182     done
22183     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
22184     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
22185     if test -s $tmp/out; then
22186       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
22187       { echo "$as_me:22187: WARNING: Some variables may not be substituted:
22188 $ac_seen" >&5
22189 echo "$as_me: WARNING: Some variables may not be substituted:
22190 $ac_seen" >&2;}
22191     fi
22192   else
22193     cat $tmp/out
22194   fi
22195   rm -f $tmp/out
22196
22197 done
22198 EOF
22199 cat >>$CONFIG_STATUS <<\EOF
22200
22201 #
22202 # CONFIG_HEADER section.
22203 #
22204
22205 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22206 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22207 #
22208 # ac_d sets the value in "#define NAME VALUE" lines.
22209 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22210 ac_dB='[        ].*$,\1#\2'
22211 ac_dC=' '
22212 ac_dD=',;t'
22213 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22214 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22215 ac_iB='\([      ]\),\1#\2define\3'
22216 ac_iC=' '
22217 ac_iD='\4,;t'
22218 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22219 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22220 ac_uB='$,\1#\2define\3'
22221 ac_uC=' '
22222 ac_uD=',;t'
22223
22224 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22225   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22226   case $ac_file in
22227   - | *:- | *:-:* ) # input from stdin
22228         cat >$tmp/stdin
22229         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22230         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22231   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22232         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22233   * )   ac_file_in=$ac_file.in ;;
22234   esac
22235
22236   test x"$ac_file" != x- && { echo "$as_me:22236: creating $ac_file" >&5
22237 echo "$as_me: creating $ac_file" >&6;}
22238
22239   # First look for the input files in the build tree, otherwise in the
22240   # src tree.
22241   ac_file_inputs=`IFS=:
22242     for f in $ac_file_in; do
22243       case $f in
22244       -) echo $tmp/stdin ;;
22245       [\\/$]*)
22246          # Absolute (can't be DOS-style, as IFS=:)
22247          test -f "$f" || { { echo "$as_me:22247: error: cannot find input file: $f" >&5
22248 echo "$as_me: error: cannot find input file: $f" >&2;}
22249    { (exit 1); exit 1; }; }
22250          echo $f;;
22251       *) # Relative
22252          if test -f "$f"; then
22253            # Build tree
22254            echo $f
22255          elif test -f "$srcdir/$f"; then
22256            # Source tree
22257            echo $srcdir/$f
22258          else
22259            # /dev/null tree
22260            { { echo "$as_me:22260: error: cannot find input file: $f" >&5
22261 echo "$as_me: error: cannot find input file: $f" >&2;}
22262    { (exit 1); exit 1; }; }
22263          fi;;
22264       esac
22265     done` || { (exit 1); exit 1; }
22266   # Remove the trailing spaces.
22267   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
22268
22269 EOF
22270
22271 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
22272 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
22273 # be either 'cat' or 'sort'.
22274 cat confdefs.h | uniq >conftest.vals
22275
22276 # Break up conftest.vals because some shells have a limit on
22277 # the size of here documents, and old seds have small limits too.
22278
22279 rm -f conftest.tail
22280 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
22281 while grep . conftest.vals >/dev/null
22282 do
22283   # Write chunks of a limited-size here document to conftest.frag.
22284   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
22285   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
22286   echo 'CEOF' >> $CONFIG_STATUS
22287   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22288   rm -f conftest.vals
22289   mv conftest.tail conftest.vals
22290 done
22291 rm -f conftest.vals
22292
22293 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
22294 # marker @DEFS@.
22295 echo '  cat >> conftest.edit <<CEOF
22296 /@DEFS@/r conftest.frag
22297 /@DEFS@/d
22298 CEOF
22299 sed -f conftest.edit $tmp/in > $tmp/out
22300 rm -f $tmp/in
22301 mv $tmp/out $tmp/in
22302 rm -f conftest.edit conftest.frag
22303 ' >> $CONFIG_STATUS
22304
22305 cat >>$CONFIG_STATUS <<\EOF
22306   # Let's still pretend it is `configure' which instantiates (i.e., don't
22307   # use $as_me), people would be surprised to read:
22308   #    /* config.h.  Generated automatically by config.status.  */
22309   if test x"$ac_file" = x-; then
22310     echo "/* Generated automatically by configure.  */" >$tmp/config.h
22311   else
22312     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
22313   fi
22314   cat $tmp/in >>$tmp/config.h
22315   rm -f $tmp/in
22316   if test x"$ac_file" != x-; then
22317     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
22318       { echo "$as_me:22318: $ac_file is unchanged" >&5
22319 echo "$as_me: $ac_file is unchanged" >&6;}
22320     else
22321       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22322          X"$ac_file" : 'X\(//\)[^/]' \| \
22323          X"$ac_file" : 'X\(//\)$' \| \
22324          X"$ac_file" : 'X\(/\)' \| \
22325          .     : '\(.\)' 2>/dev/null ||
22326 echo X"$ac_file" |
22327     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22328           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22329           /^X\(\/\/\)$/{ s//\1/; q; }
22330           /^X\(\/\).*/{ s//\1/; q; }
22331           s/.*/./; q'`
22332       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22333         { case "$ac_dir" in
22334   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22335   *)                      as_incr_dir=.;;
22336 esac
22337 as_dummy="$ac_dir"
22338 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22339   case $as_mkdir_dir in
22340     # Skip DOS drivespec
22341     ?:) as_incr_dir=$as_mkdir_dir ;;
22342     *)
22343       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22344       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22345     ;;
22346   esac
22347 done; }
22348
22349       fi
22350       rm -f $ac_file
22351       mv $tmp/config.h $ac_file
22352     fi
22353   else
22354     cat $tmp/config.h
22355     rm -f $tmp/config.h
22356   fi
22357 done
22358 EOF
22359 cat >>$CONFIG_STATUS <<\EOF
22360 #
22361 # CONFIG_COMMANDS section.
22362 #
22363 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22364   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22365   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22366
22367   case $ac_dest in
22368     default )
22369 if test "x$cf_with_tests" != xno ; then
22370
22371 for cf_dir in test
22372 do
22373         if test ! -d $srcdir/$cf_dir; then
22374                 continue
22375         elif test -f $srcdir/$cf_dir/programs; then
22376                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
22377         fi
22378 done
22379
22380 fi
22381
22382 cf_prefix=$LIB_PREFIX
22383
22384 case $cf_cv_shlib_version in #(vi
22385 cygdll|msysdll|mingw)
22386         TINFO_NAME=$TINFO_ARG_SUFFIX
22387         TINFO_SUFFIX=.dll
22388         ;;
22389 esac
22390
22391 if test -n "$TINFO_SUFFIX" ; then
22392         case $TINFO_SUFFIX in
22393         tw*)
22394                 TINFO_NAME="${TINFO_NAME}tw"
22395                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
22396                 ;;
22397         t*)
22398                 TINFO_NAME="${TINFO_NAME}t"
22399                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
22400                 ;;
22401         w*)
22402                 TINFO_NAME="${TINFO_NAME}w"
22403                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
22404                 ;;
22405         esac
22406 fi
22407
22408 for cf_dir in $SRC_SUBDIRS
22409 do
22410         if test ! -d $srcdir/$cf_dir ; then
22411                 continue
22412         elif test -f $srcdir/$cf_dir/modules; then
22413
22414                 SHARED_LIB=
22415                 Libs_To_Make=
22416                 for cf_item in $cf_LIST_MODELS
22417                 do
22418
22419         case X$cf_item in #(vi
22420         Xlibtool) #(vi
22421                 cf_suffix='.la'
22422                 cf_depsuf=$cf_suffix
22423                 ;;
22424         Xdebug) #(vi
22425                 cf_suffix='_g.a'
22426                 cf_depsuf=$cf_suffix
22427                 ;;
22428         Xprofile) #(vi
22429                 cf_suffix='_p.a'
22430                 cf_depsuf=$cf_suffix
22431                 ;;
22432         Xshared) #(vi
22433                 case $cf_cv_system_name in
22434                 aix[5-7]*) #(vi
22435                         cf_suffix='.a'
22436                         cf_depsuf=$cf_suffix
22437                         ;;
22438                 cygwin*|msys*|mingw*) #(vi
22439                         cf_suffix='.dll'
22440                         cf_depsuf='.dll.a'
22441                         ;;
22442                 darwin*) #(vi
22443                         cf_suffix='.dylib'
22444                         cf_depsuf=$cf_suffix
22445                         ;;
22446                 hpux*) #(vi
22447                         case $target in
22448                         ia64*) #(vi
22449                                 cf_suffix='.so'
22450                                 cf_depsuf=$cf_suffix
22451                                 ;;
22452                         *) #(vi
22453                                 cf_suffix='.sl'
22454                                 cf_depsuf=$cf_suffix
22455                                 ;;
22456                         esac
22457                         ;;
22458                 *) #(vi
22459                         cf_suffix='.so'
22460                         cf_depsuf=$cf_suffix
22461                         ;;
22462                 esac
22463                 ;;
22464         *)
22465                 cf_suffix='.a'
22466                 cf_depsuf=$cf_suffix
22467                 ;;
22468         esac
22469         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22470         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22471
22472                         cf_libname=$cf_dir
22473                         test "$cf_dir" = c++ && cf_libname=ncurses++
22474                         if test $cf_item = shared ; then
22475                                 if test -n "${LIB_SUFFIX}"
22476                                 then
22477                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
22478                                 else
22479                                         cf_shared_suffix="$cf_suffix"
22480                                 fi
22481                                 if test "$cf_cv_do_symlinks" = yes ; then
22482                                         cf_version_name=
22483
22484                                         case "$cf_cv_shlib_version" in #(vi
22485                                         rel) #(vi
22486                                                 cf_version_name=REL_VERSION
22487                                                 ;;
22488                                         abi)
22489                                                 cf_version_name=ABI_VERSION
22490                                                 ;;
22491                                         esac
22492
22493                                         if test -n "$cf_version_name"
22494                                         then
22495                                                 case "$cf_cv_system_name" in #(vi
22496                                                 darwin*)
22497                                                         # "w", etc?
22498                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
22499                                                         ;; #(vi
22500                                                 *)
22501                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
22502                                                         ;;
22503                                                 esac
22504                                         fi
22505                                         if test -n "${LIB_SUFFIX}"
22506                                         then
22507                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
22508                                         else
22509                                                 cf_shared_suffix="$cf_suffix"
22510                                         fi
22511                                 fi
22512                                 # cygwin needs import library, and has unique naming convention
22513                                 # use autodetected ${cf_prefix} for import lib and static lib, but
22514                                 # use 'cyg' prefix for shared lib.
22515                                 case $cf_cv_shlib_version in #(vi
22516                                 cygdll) #(vi
22517                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22518                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
22519                                         continue
22520                                         ;;
22521                                 msysdll) #(vi
22522                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22523                                         Libs_To_Make="$Libs_To_Make ../lib/msys-${cf_libname}${cf_cygsuf}"
22524                                         continue
22525                                         ;;
22526                                 mingw)
22527                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22528                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
22529                                         continue
22530                                         ;;
22531                                 esac
22532                         fi
22533                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
22534                 done
22535
22536                 if test $cf_dir = ncurses ; then
22537                         cf_subsets="$LIB_SUBSETS"
22538                         cf_r_parts="$cf_subsets"
22539                         cf_liblist="$Libs_To_Make"
22540
22541                         while test -n "$cf_r_parts"
22542                         do
22543                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
22544                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
22545                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
22546                                         cf_item=
22547                                         case $cf_l_parts in #(vi
22548                                         *termlib*) #(vi
22549                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
22550                                                 ;;
22551                                         *ticlib*)
22552                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
22553                                                 ;;
22554                                         *)
22555                                                 break
22556                                                 ;;
22557                                         esac
22558                                         if test -n "$cf_item"; then
22559                                                 Libs_To_Make="$cf_item $Libs_To_Make"
22560                                         fi
22561                                 else
22562                                         break
22563                                 fi
22564                         done
22565                 else
22566                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
22567                 fi
22568
22569                 if test $cf_dir = c++; then
22570                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
22571                                 cf_list=
22572                                 for cf_item in $Libs_To_Make
22573                                 do
22574                                         case $cf_item in
22575                                         *.a)
22576                                                 ;;
22577                                         *)
22578                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
22579                                                 ;;
22580                                         esac
22581                                         for cf_test in $cf_list
22582                                         do
22583                                                 if test "$cf_test" = "$cf_item"
22584                                                 then
22585                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
22586                                                         cf_item=
22587                                                         break
22588                                                 fi
22589                                         done
22590                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
22591                                 done
22592                                 Libs_To_Make="$cf_list"
22593                         fi
22594                 fi
22595
22596                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
22597                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
22598                         $cf_dir/Makefile >$cf_dir/Makefile.out
22599                 mv $cf_dir/Makefile.out $cf_dir/Makefile
22600
22601                 $AWK -f $srcdir/mk-0th.awk \
22602                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
22603                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22604
22605                 for cf_subset in $cf_subsets
22606                 do
22607                         cf_subdirs=
22608                         for cf_item in $cf_LIST_MODELS
22609                         do
22610
22611                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
22612
22613 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22614
22615                         CXX_MODEL=$cf_ITEM
22616                         if test "$CXX_MODEL" = SHARED; then
22617                                 case $cf_cv_shlib_version in #(vi
22618                                 cygdll|msysdll|mingw) #(vi
22619                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
22620
22621 echo "${as_me:-configure}:22621: testing overriding CXX_MODEL to SHARED ..." 1>&5
22622
22623                                         with_shared_cxx=yes
22624                                         ;;
22625                                 *)
22626                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
22627                                         ;;
22628                                 esac
22629                         fi
22630
22631         case X$cf_item in #(vi
22632         Xlibtool) #(vi
22633                 cf_suffix='.la'
22634                 cf_depsuf=$cf_suffix
22635                 ;;
22636         Xdebug) #(vi
22637                 cf_suffix='_g.a'
22638                 cf_depsuf=$cf_suffix
22639                 ;;
22640         Xprofile) #(vi
22641                 cf_suffix='_p.a'
22642                 cf_depsuf=$cf_suffix
22643                 ;;
22644         Xshared) #(vi
22645                 case $cf_cv_system_name in
22646                 aix[5-7]*) #(vi
22647                         cf_suffix='.a'
22648                         cf_depsuf=$cf_suffix
22649                         ;;
22650                 cygwin*|msys*|mingw*) #(vi
22651                         cf_suffix='.dll'
22652                         cf_depsuf='.dll.a'
22653                         ;;
22654                 darwin*) #(vi
22655                         cf_suffix='.dylib'
22656                         cf_depsuf=$cf_suffix
22657                         ;;
22658                 hpux*) #(vi
22659                         case $target in
22660                         ia64*) #(vi
22661                                 cf_suffix='.so'
22662                                 cf_depsuf=$cf_suffix
22663                                 ;;
22664                         *) #(vi
22665                                 cf_suffix='.sl'
22666                                 cf_depsuf=$cf_suffix
22667                                 ;;
22668                         esac
22669                         ;;
22670                 *) #(vi
22671                         cf_suffix='.so'
22672                         cf_depsuf=$cf_suffix
22673                         ;;
22674                 esac
22675                 ;;
22676         *)
22677                 cf_suffix='.a'
22678                 cf_depsuf=$cf_suffix
22679                 ;;
22680         esac
22681         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22682         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22683
22684         case $cf_item in
22685         libtool) cf_subdir='obj_lo'  ;;
22686         normal)  cf_subdir='objects' ;;
22687         debug)   cf_subdir='obj_g' ;;
22688         profile) cf_subdir='obj_p' ;;
22689         shared)
22690                 case $cf_cv_system_name in #(vi
22691                 cygwin|msys) #(vi
22692                         cf_subdir='objects' ;;
22693                 *)
22694                         cf_subdir='obj_s' ;;
22695                 esac
22696         esac
22697
22698                         # Test for case where we build libtinfo with a different name.
22699                         cf_libname=$cf_dir
22700                         if test $cf_dir = ncurses ; then
22701                                 case $cf_subset in
22702                                 *base*)
22703                                         cf_libname=${cf_libname}$LIB_SUFFIX
22704                                         ;;
22705                                 *termlib*)
22706                                         cf_libname=$TINFO_LIB_SUFFIX
22707                                         ;;
22708                                 ticlib*)
22709                                         cf_libname=$TICS_LIB_SUFFIX
22710                                         ;;
22711                                 esac
22712                         elif test $cf_dir = c++ ; then
22713                                 cf_libname=ncurses++$LIB_SUFFIX
22714                         else
22715                                 cf_libname=${cf_libname}$LIB_SUFFIX
22716                         fi
22717                         if test -n "${DFT_ARG_SUFFIX}" ; then
22718                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
22719                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
22720                         fi
22721
22722                         # These dependencies really are for development, not
22723                         # builds, but they are useful in porting, too.
22724                         cf_depend="../include/ncurses_cfg.h"
22725                         if test "$srcdir" = "."; then
22726                                 cf_reldir="."
22727                         else
22728                                 cf_reldir="\${srcdir}"
22729                         fi
22730
22731                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
22732                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
22733                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
22734                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
22735                         fi
22736
22737                         cf_dir_suffix=
22738                         old_cf_suffix="$cf_suffix"
22739                         if test "$cf_cv_shlib_version_infix" = yes ; then
22740                         if test -n "$LIB_SUFFIX" ; then
22741                                 case $LIB_SUFFIX in
22742                                 tw*)
22743                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
22744                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
22745                                         cf_dir_suffix=tw
22746                                         ;;
22747                                 t*)
22748                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
22749                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
22750                                         cf_dir_suffix=t
22751                                         ;;
22752                                 w*)
22753                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
22754                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
22755                                         cf_dir_suffix=w
22756                                         ;;
22757                                 esac
22758                         fi
22759                         fi
22760
22761                         $AWK -f $srcdir/mk-1st.awk \
22762                                 name=${cf_libname}${cf_dir_suffix} \
22763                                 traces=$LIB_TRACING \
22764                                 MODEL=$cf_ITEM \
22765                                 CXX_MODEL=$CXX_MODEL \
22766                                 model=$cf_subdir \
22767                                 prefix=$cf_prefix \
22768                                 suffix=$cf_suffix \
22769                                 subset=$cf_subset \
22770                                 driver=$cf_cv_term_driver \
22771                                 SymLink="$LN_S" \
22772                                 TermlibRoot=$TINFO_NAME \
22773                                 TermlibSuffix=$TINFO_SUFFIX \
22774                                 ShlibVer=$cf_cv_shlib_version \
22775                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
22776                                 ReLink=${cf_cv_do_relink:-no} \
22777                                 DoLinks=$cf_cv_do_symlinks \
22778                                 rmSoLocs=$cf_cv_rm_so_locs \
22779                                 ldconfig="$LDCONFIG" \
22780                                 overwrite=$WITH_OVERWRITE \
22781                                 depend="$cf_depend" \
22782                                 host="$host" \
22783                                 libtool_version="$LIBTOOL_VERSION" \
22784                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22785
22786                         cf_suffix="$old_cf_suffix"
22787
22788                         for cf_subdir2 in $cf_subdirs lib
22789                         do
22790                                 test $cf_subdir = $cf_subdir2 && break
22791                         done
22792                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
22793                         $AWK -f $srcdir/mk-2nd.awk \
22794                                 name=$cf_dir \
22795                                 traces=$LIB_TRACING \
22796                                 MODEL=$cf_ITEM \
22797                                 model=$cf_subdir \
22798                                 subset=$cf_subset \
22799                                 srcdir=$srcdir \
22800                                 echo=$WITH_ECHO \
22801                                 crenames=$cf_cv_prog_CC_c_o \
22802                                 cxxrenames=$cf_cv_prog_CXX_c_o \
22803                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22804                         cf_subdirs="$cf_subdirs $cf_subdir"
22805                         done
22806                 done
22807         fi
22808
22809         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
22810 done
22811
22812 for cf_dir in $SRC_SUBDIRS
22813 do
22814         if test ! -d $srcdir/$cf_dir ; then
22815                 continue
22816         fi
22817
22818         if test -f $cf_dir/Makefile ; then
22819                 case "$cf_dir" in
22820                 Ada95) #(vi
22821                         echo 'libs \' >> Makefile
22822                         echo 'install.libs \' >> Makefile
22823                         echo 'uninstall.libs ::' >> Makefile
22824                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
22825                         ;;
22826                 esac
22827         fi
22828
22829         if test -f $srcdir/$cf_dir/modules; then
22830                 echo >> Makefile
22831                 if test -f $srcdir/$cf_dir/headers; then
22832 cat >> Makefile <<CF_EOF
22833 install.includes \\
22834 uninstall.includes \\
22835 CF_EOF
22836                 fi
22837 if test "$cf_dir" != "c++" ; then
22838 echo 'lint \' >> Makefile
22839 fi
22840 cat >> Makefile <<CF_EOF
22841 libs \\
22842 lintlib \\
22843 install.libs \\
22844 uninstall.libs \\
22845 install.$cf_dir \\
22846 uninstall.$cf_dir ::
22847         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22848 CF_EOF
22849         elif test -f $srcdir/$cf_dir/headers; then
22850 cat >> Makefile <<CF_EOF
22851
22852 libs \\
22853 install.libs \\
22854 uninstall.libs \\
22855 install.includes \\
22856 uninstall.includes ::
22857         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22858 CF_EOF
22859 fi
22860 done
22861
22862 if test "x$cf_with_db_install" = xyes; then
22863 cat >> Makefile <<CF_EOF
22864
22865 install.libs uninstall.libs \\
22866 install.data uninstall.data ::
22867 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
22868 CF_EOF
22869 fi
22870
22871 if test "x$cf_with_manpages" = xyes; then
22872 cat >> Makefile <<CF_EOF
22873
22874 install.man \\
22875 uninstall.man ::
22876         cd man && \${MAKE} \${TOP_MFLAGS} \$@
22877 CF_EOF
22878 fi
22879
22880 cat >> Makefile <<CF_EOF
22881
22882 distclean ::
22883         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
22884         rm -f headers.sh headers.sed mk_shared_lib.sh
22885         rm -f edit_man.* man_alias.*
22886         rm -rf \${DIRS_TO_MAKE}
22887 CF_EOF
22888
22889 # Special case: tack's manpage lives in its own directory.
22890 if test "x$cf_with_manpages" = xyes; then
22891 if test -d tack ; then
22892 if test -f $srcdir/$tack.h; then
22893 cat >> Makefile <<CF_EOF
22894
22895 install.man \\
22896 uninstall.man ::
22897         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
22898 CF_EOF
22899 fi
22900 fi
22901 fi
22902
22903 rm -f headers.sed headers.sh
22904
22905 echo creating headers.sh
22906 cat >headers.sh <<CF_EOF
22907 #! /bin/sh
22908 # This shell script is generated by the 'configure' script.  It is invoked in a
22909 # subdirectory of the build tree.  It generates a sed-script in the parent
22910 # directory that is used to adjust includes for header files that reside in a
22911 # subdirectory of /usr/include, etc.
22912 PRG=""
22913 while test \$# != 3
22914 do
22915 PRG="\$PRG \$1"; shift
22916 done
22917 DST=\$1
22918 REF=\$2
22919 SRC=\$3
22920 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
22921 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
22922 echo installing \$SRC in \$DST
22923 CF_EOF
22924
22925 if test $WITH_CURSES_H = yes; then
22926         cat >>headers.sh <<CF_EOF
22927 case \$DST in
22928 /*/include/*)
22929         END=\`basename \$DST\`
22930         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22931         do
22932                 NAME=\`basename \$i\`
22933                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22934         done
22935         ;;
22936 *)
22937         echo "" >> \$TMPSED
22938         ;;
22939 esac
22940 CF_EOF
22941
22942 else
22943         cat >>headers.sh <<CF_EOF
22944 case \$DST in
22945 /*/include/*)
22946         END=\`basename \$DST\`
22947         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22948         do
22949                 NAME=\`basename \$i\`
22950                 if test "\$NAME" = "curses.h"
22951                 then
22952                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22953                         NAME=ncurses.h
22954                 fi
22955                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22956         done
22957         ;;
22958 *)
22959         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22960         ;;
22961 esac
22962 CF_EOF
22963 fi
22964 cat >>headers.sh <<CF_EOF
22965 rm -f \$TMPSRC
22966 sed -f \$TMPSED \$SRC > \$TMPSRC
22967 NAME=\`basename \$SRC\`
22968 CF_EOF
22969 if test $WITH_CURSES_H != yes; then
22970         cat >>headers.sh <<CF_EOF
22971 test "\$NAME" = "curses.h" && NAME=ncurses.h
22972 CF_EOF
22973 fi
22974 cat >>headers.sh <<CF_EOF
22975 # Just in case someone gzip'd manpages, remove the conflicting copy.
22976 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22977
22978 eval \$PRG \$TMPSRC \$DST/\$NAME
22979 rm -f \$TMPSRC \$TMPSED
22980 CF_EOF
22981
22982 chmod 0755 headers.sh
22983
22984 for cf_dir in $SRC_SUBDIRS
22985 do
22986         if test ! -d $srcdir/$cf_dir ; then
22987                 continue
22988         fi
22989
22990         if test -f $srcdir/$cf_dir/headers; then
22991                 $AWK -f $srcdir/mk-hdr.awk \
22992                         subset="$LIB_SUBSETS" \
22993                         compat="$WITH_CURSES_H" \
22994                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22995         fi
22996
22997         if test -f $srcdir/$cf_dir/modules; then
22998                 if test "$cf_dir" != "c++" ; then
22999                         cat >>$cf_dir/Makefile <<"CF_EOF"
23000 depend : ${AUTO_SRC}
23001         makedepend -- ${CPPFLAGS} -- ${C_SRC}
23002
23003 # DO NOT DELETE THIS LINE -- make depend depends on it.
23004 CF_EOF
23005                 fi
23006         fi
23007 done
23008
23009 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23010         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
23011 fi
23012  ;;
23013   esac
23014 done
23015 EOF
23016
23017 cat >>$CONFIG_STATUS <<\EOF
23018
23019 { (exit 0); exit 0; }
23020 EOF
23021 chmod +x $CONFIG_STATUS
23022 ac_clean_files=$ac_clean_files_save
23023
23024 # configure is writing to config.log, and then calls config.status.
23025 # config.status does its own redirection, appending to config.log.
23026 # Unfortunately, on DOS this fails, as config.log is still kept open
23027 # by configure, so config.status won't be able to write to it; its
23028 # output is simply discarded.  So we exec the FD to /dev/null,
23029 # effectively closing config.log, so it can be properly (re)opened and
23030 # appended to by config.status.  When coming back to configure, we
23031 # need to make the FD available again.
23032 if test "$no_create" != yes; then
23033   ac_cs_success=:
23034   exec 5>/dev/null
23035   $SHELL $CONFIG_STATUS || ac_cs_success=false
23036   exec 5>>config.log
23037   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23038   # would make configure fail if this is the last instruction.
23039   $ac_cs_success || { (exit 1); exit 1; }
23040 fi
23041 ${MAKE:-make} preinstall