]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20140629
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.582 .
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   --disable-gnat-projects test: disable GNAT projects even if usable
827 Ada95 Binding Options:
828   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
829   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
830   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
831   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
832
833 Some influential environment variables:
834   CC          C compiler command
835   CFLAGS      C compiler flags
836   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
837               nonstandard directory <lib dir>
838   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
839               headers in a nonstandard directory <include dir>
840   CPP         C preprocessor
841   CXX         C++ compiler command
842   CXXFLAGS    C++ compiler flags
843   CXXCPP      C++ preprocessor
844
845 Use these variables to override the choices made by `configure' or to help
846 it to find libraries and programs with nonstandard names/locations.
847
848 EOF
849 fi
850
851 if test "$ac_init_help" = "recursive"; then
852   # If there are subdirs, report their specific --help.
853   ac_popdir=`pwd`
854   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
855     cd $ac_subdir
856     # A "../" for each directory in /$ac_subdir.
857     ac_dots=`echo $ac_subdir |
858              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
859
860     case $srcdir in
861     .) # No --srcdir option.  We are building in place.
862       ac_sub_srcdir=$srcdir ;;
863     [\\/]* | ?:[\\/]* ) # Absolute path.
864       ac_sub_srcdir=$srcdir/$ac_subdir ;;
865     *) # Relative path.
866       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
867     esac
868
869     # Check for guested configure; otherwise get Cygnus style configure.
870     if test -f $ac_sub_srcdir/configure.gnu; then
871       echo
872       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
873     elif test -f $ac_sub_srcdir/configure; then
874       echo
875       $SHELL $ac_sub_srcdir/configure  --help=recursive
876     elif test -f $ac_sub_srcdir/configure.ac ||
877            test -f $ac_sub_srcdir/configure.in; then
878       echo
879       $ac_configure --help
880     else
881       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
882     fi
883     cd $ac_popdir
884   done
885 fi
886
887 test -n "$ac_init_help" && exit 0
888 if $ac_init_version; then
889   cat <<\EOF
890
891 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
892 Free Software Foundation, Inc.
893 This configure script is free software; the Free Software Foundation
894 gives unlimited permission to copy, distribute and modify it.
895 EOF
896   exit 0
897 fi
898 exec 5>config.log
899 cat >&5 <<EOF
900 This file contains any messages produced by compilers while
901 running configure, to aid debugging if configure makes a mistake.
902
903 It was created by $as_me, which was
904 generated by GNU Autoconf 2.52.20121002.  Invocation command line was
905
906   $ $0 $@
907
908 EOF
909 {
910 cat <<_ASUNAME
911 ## ---------- ##
912 ## Platform.  ##
913 ## ---------- ##
914
915 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
916 uname -m = `(uname -m) 2>/dev/null || echo unknown`
917 uname -r = `(uname -r) 2>/dev/null || echo unknown`
918 uname -s = `(uname -s) 2>/dev/null || echo unknown`
919 uname -v = `(uname -v) 2>/dev/null || echo unknown`
920
921 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
922 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
923
924 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
925 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
926 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
927 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
928 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
929 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
930 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
931
932 PATH = $PATH
933
934 _ASUNAME
935 } >&5
936
937 cat >&5 <<EOF
938 ## ------------ ##
939 ## Core tests.  ##
940 ## ------------ ##
941
942 EOF
943
944 # Keep a trace of the command line.
945 # Strip out --no-create and --no-recursion so they do not pile up.
946 # Also quote any args containing shell meta-characters.
947 ac_configure_args=
948 ac_sep=
949 for ac_arg
950 do
951   case $ac_arg in
952   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
953   | --no-cr | --no-c) ;;
954   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
955   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
956   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
957     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
958     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
959     ac_sep=" " ;;
960   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
961      ac_sep=" " ;;
962   esac
963   # Get rid of the leading space.
964 done
965
966 # When interrupted or exit'd, cleanup temporary files, and complete
967 # config.log.  We remove comments because anyway the quotes in there
968 # would cause problems or look ugly.
969 trap 'exit_status=$?
970   # Save into config.log some information that might help in debugging.
971   echo >&5
972   echo "## ----------------- ##" >&5
973   echo "## Cache variables.  ##" >&5
974   echo "## ----------------- ##" >&5
975   echo >&5
976   # The following way of writing the cache mishandles newlines in values,
977 {
978   (set) 2>&1 |
979     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
980     *ac_space=\ *)
981       sed -n \
982         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
983           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
984       ;;
985     *)
986       sed -n \
987         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
988       ;;
989     esac;
990 } >&5
991   sed "/^$/d" confdefs.h >conftest.log
992   if test -s conftest.log; then
993     echo >&5
994     echo "## ------------ ##" >&5
995     echo "## confdefs.h.  ##" >&5
996     echo "## ------------ ##" >&5
997     echo >&5
998     cat conftest.log >&5
999   fi
1000   (echo; echo) >&5
1001   test "$ac_signal" != 0 &&
1002     echo "$as_me: caught signal $ac_signal" >&5
1003   echo "$as_me: exit $exit_status" >&5
1004   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1005     exit $exit_status
1006      ' 0
1007 for ac_signal in 1 2 13 15; do
1008   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1009 done
1010 ac_signal=0
1011
1012 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1013 rm -rf conftest* confdefs.h
1014 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1015 echo >confdefs.h
1016
1017 # Let the site file select an alternate cache file if it wants to.
1018 # Prefer explicitly selected file to automatically selected ones.
1019 if test -z "$CONFIG_SITE"; then
1020   if test "x$prefix" != xNONE; then
1021     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1022   else
1023     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1024   fi
1025 fi
1026 for ac_site_file in $CONFIG_SITE; do
1027   if test -r "$ac_site_file"; then
1028     { echo "$as_me:1028: loading site script $ac_site_file" >&5
1029 echo "$as_me: loading site script $ac_site_file" >&6;}
1030     cat "$ac_site_file" >&5
1031     . "$ac_site_file"
1032   fi
1033 done
1034
1035 if test -r "$cache_file"; then
1036   # Some versions of bash will fail to source /dev/null (special
1037   # files actually), so we avoid doing that.
1038   if test -f "$cache_file"; then
1039     { echo "$as_me:1039: loading cache $cache_file" >&5
1040 echo "$as_me: loading cache $cache_file" >&6;}
1041     case $cache_file in
1042       [\\/]* | ?:[\\/]* ) . $cache_file;;
1043       *)                      . ./$cache_file;;
1044     esac
1045   fi
1046 else
1047   { echo "$as_me:1047: creating cache $cache_file" >&5
1048 echo "$as_me: creating cache $cache_file" >&6;}
1049   >$cache_file
1050 fi
1051
1052 # Check that the precious variables saved in the cache have kept the same
1053 # value.
1054 ac_cache_corrupted=false
1055 for ac_var in `(set) 2>&1 |
1056                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1057   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1058   eval ac_new_set=\$ac_env_${ac_var}_set
1059   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1060   eval ac_new_val="\$ac_env_${ac_var}_value"
1061   case $ac_old_set,$ac_new_set in
1062     set,)
1063       { echo "$as_me:1063: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1064 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1065       ac_cache_corrupted=: ;;
1066     ,set)
1067       { echo "$as_me:1067: error: \`$ac_var' was not set in the previous run" >&5
1068 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1069       ac_cache_corrupted=: ;;
1070     ,);;
1071     *)
1072       if test "x$ac_old_val" != "x$ac_new_val"; then
1073         { echo "$as_me:1073: error: \`$ac_var' has changed since the previous run:" >&5
1074 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1075         { echo "$as_me:1075:   former value:  $ac_old_val" >&5
1076 echo "$as_me:   former value:  $ac_old_val" >&2;}
1077         { echo "$as_me:1077:   current value: $ac_new_val" >&5
1078 echo "$as_me:   current value: $ac_new_val" >&2;}
1079         ac_cache_corrupted=:
1080       fi;;
1081   esac
1082   # Pass precious variables to config.status.  It doesn't matter if
1083   # we pass some twice (in addition to the command line arguments).
1084   if test "$ac_new_set" = set; then
1085     case $ac_new_val in
1086     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1087       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1088       ac_configure_args="$ac_configure_args '$ac_arg'"
1089       ;;
1090     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1091        ;;
1092     esac
1093   fi
1094 done
1095 if $ac_cache_corrupted; then
1096   { echo "$as_me:1096: error: changes in the environment can compromise the build" >&5
1097 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1098   { { echo "$as_me:1098: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1099 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1100    { (exit 1); exit 1; }; }
1101 fi
1102
1103 ac_ext=c
1104 ac_cpp='$CPP $CPPFLAGS'
1105 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1106 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1107 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1108 ac_main_return=return
1109
1110 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1111   *c*,-n*) ECHO_N= ECHO_C='
1112 ' ECHO_T='      ' ;;
1113   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1114   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1115 esac
1116 echo "#! $SHELL" >conftest.sh
1117 echo  "exit 0"   >>conftest.sh
1118 chmod +x conftest.sh
1119 if { (echo "$as_me:1119: PATH=\".;.\"; conftest.sh") >&5
1120   (PATH=".;."; conftest.sh) 2>&5
1121   ac_status=$?
1122   echo "$as_me:1122: \$? = $ac_status" >&5
1123   (exit $ac_status); }; then
1124   ac_path_separator=';'
1125 else
1126   ac_path_separator=:
1127 fi
1128 PATH_SEPARATOR="$ac_path_separator"
1129 rm -f conftest.sh
1130
1131 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1132
1133 top_builddir=`pwd`
1134
1135 echo "$as_me:1135: checking for egrep" >&5
1136 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1137 if test "${ac_cv_prog_egrep+set}" = set; then
1138   echo $ECHO_N "(cached) $ECHO_C" >&6
1139 else
1140   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1141     then ac_cv_prog_egrep='grep -E'
1142     else ac_cv_prog_egrep='egrep'
1143     fi
1144 fi
1145 echo "$as_me:1145: result: $ac_cv_prog_egrep" >&5
1146 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1147  EGREP=$ac_cv_prog_egrep
1148
1149 test -z "$EGREP" && { { echo "$as_me:1149: error: No egrep program found" >&5
1150 echo "$as_me: error: No egrep program found" >&2;}
1151    { (exit 1); exit 1; }; }
1152
1153 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1154 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1155 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1156 cf_cv_abi_version=${NCURSES_MAJOR}
1157 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1158 cf_cv_timestamp=`date`
1159 echo "$as_me:1159: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1160 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1161
1162 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1163
1164 # Check whether --with-rel-version or --without-rel-version was given.
1165 if test "${with_rel_version+set}" = set; then
1166   withval="$with_rel_version"
1167   { echo "$as_me:1167: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1168 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1169  cf_cv_rel_version=$withval
1170 fi;
1171
1172  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1173  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1174
1175 if test -n "$NCURSES_MAJOR" ; then
1176   case $NCURSES_MAJOR in #(vi
1177   [0-9]*) #(vi
1178         ;;
1179   *)
1180         { { echo "$as_me:1180: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1181 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1182    { (exit 1); exit 1; }; }
1183         ;;
1184   esac
1185 else
1186   { { echo "$as_me:1186: error: Release major-version value is empty" >&5
1187 echo "$as_me: error: Release major-version value is empty" >&2;}
1188    { (exit 1); exit 1; }; }
1189 fi
1190
1191 if test -n "$NCURSES_MINOR" ; then
1192   case $NCURSES_MINOR in #(vi
1193   [0-9]*) #(vi
1194         ;;
1195   *)
1196         { { echo "$as_me:1196: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1197 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1198    { (exit 1); exit 1; }; }
1199         ;;
1200   esac
1201 else
1202   { { echo "$as_me:1202: error: Release minor-version value is empty" >&5
1203 echo "$as_me: error: Release minor-version value is empty" >&2;}
1204    { (exit 1); exit 1; }; }
1205 fi
1206
1207 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1208
1209 # Check whether --with-abi-version or --without-abi-version was given.
1210 if test "${with_abi_version+set}" = set; then
1211   withval="$with_abi_version"
1212   { echo "$as_me:1212: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1213 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1214  cf_cv_abi_version=$withval
1215 fi;
1216
1217 if test -n "$cf_cv_abi_version" ; then
1218   case $cf_cv_abi_version in #(vi
1219   [0-9]*) #(vi
1220         ;;
1221   *)
1222         { { echo "$as_me:1222: error: ABI version is not a number: $cf_cv_abi_version" >&5
1223 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1224    { (exit 1); exit 1; }; }
1225         ;;
1226   esac
1227 else
1228   { { echo "$as_me:1228: error: ABI version value is empty" >&5
1229 echo "$as_me: error: ABI version value is empty" >&2;}
1230    { (exit 1); exit 1; }; }
1231 fi
1232
1233 ac_aux_dir=
1234 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1235   if test -f $ac_dir/install-sh; then
1236     ac_aux_dir=$ac_dir
1237     ac_install_sh="$ac_aux_dir/install-sh -c"
1238     break
1239   elif test -f $ac_dir/install.sh; then
1240     ac_aux_dir=$ac_dir
1241     ac_install_sh="$ac_aux_dir/install.sh -c"
1242     break
1243   elif test -f $ac_dir/shtool; then
1244     ac_aux_dir=$ac_dir
1245     ac_install_sh="$ac_aux_dir/shtool install -c"
1246     break
1247   fi
1248 done
1249 if test -z "$ac_aux_dir"; then
1250   { { echo "$as_me:1250: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1251 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1252    { (exit 1); exit 1; }; }
1253 fi
1254 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1255 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1256 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1257
1258 # Make sure we can run config.sub.
1259 $ac_config_sub sun4 >/dev/null 2>&1 ||
1260   { { echo "$as_me:1260: error: cannot run $ac_config_sub" >&5
1261 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1262    { (exit 1); exit 1; }; }
1263
1264 echo "$as_me:1264: checking build system type" >&5
1265 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1266 if test "${ac_cv_build+set}" = set; then
1267   echo $ECHO_N "(cached) $ECHO_C" >&6
1268 else
1269   ac_cv_build_alias=$build_alias
1270 test -z "$ac_cv_build_alias" &&
1271   ac_cv_build_alias=`$ac_config_guess`
1272 test -z "$ac_cv_build_alias" &&
1273   { { echo "$as_me:1273: error: cannot guess build type; you must specify one" >&5
1274 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1275    { (exit 1); exit 1; }; }
1276 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1277   { { echo "$as_me:1277: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1278 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1279    { (exit 1); exit 1; }; }
1280
1281 fi
1282 echo "$as_me:1282: result: $ac_cv_build" >&5
1283 echo "${ECHO_T}$ac_cv_build" >&6
1284 build=$ac_cv_build
1285 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1286 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1287 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1288
1289 echo "$as_me:1289: checking host system type" >&5
1290 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1291 if test "${ac_cv_host+set}" = set; then
1292   echo $ECHO_N "(cached) $ECHO_C" >&6
1293 else
1294   ac_cv_host_alias=$host_alias
1295 test -z "$ac_cv_host_alias" &&
1296   ac_cv_host_alias=$ac_cv_build_alias
1297 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1298   { { echo "$as_me:1298: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1299 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1300    { (exit 1); exit 1; }; }
1301
1302 fi
1303 echo "$as_me:1303: result: $ac_cv_host" >&5
1304 echo "${ECHO_T}$ac_cv_host" >&6
1305 host=$ac_cv_host
1306 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1307 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1308 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1309
1310 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1311         echo "$as_me:1311: checking target system type" >&5
1312 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1313 if test "${ac_cv_target+set}" = set; then
1314   echo $ECHO_N "(cached) $ECHO_C" >&6
1315 else
1316   ac_cv_target_alias=$target_alias
1317 test "x$ac_cv_target_alias" = "x" &&
1318   ac_cv_target_alias=$ac_cv_host_alias
1319 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1320   { { echo "$as_me:1320: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1321 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1322    { (exit 1); exit 1; }; }
1323
1324 fi
1325 echo "$as_me:1325: result: $ac_cv_target" >&5
1326 echo "${ECHO_T}$ac_cv_target" >&6
1327 target=$ac_cv_target
1328 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1329 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1330 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1331
1332 # The aliases save the names the user supplied, while $host etc.
1333 # will get canonicalized.
1334 test -n "$target_alias" &&
1335   test "$program_prefix$program_suffix$program_transform_name" = \
1336     NONENONEs,x,x, &&
1337   program_prefix=${target_alias}-
1338         system_name="$host_os"
1339 else
1340         system_name="`(uname -s -r) 2>/dev/null`"
1341         if test -z "$system_name" ; then
1342                 system_name="`(hostname) 2>/dev/null`"
1343         fi
1344 fi
1345 test -n "$system_name" &&
1346 cat >>confdefs.h <<EOF
1347 #define SYSTEM_NAME "$system_name"
1348 EOF
1349
1350 if test "${cf_cv_system_name+set}" = set; then
1351   echo $ECHO_N "(cached) $ECHO_C" >&6
1352 else
1353   cf_cv_system_name="$system_name"
1354 fi
1355
1356 test -z "$system_name" && system_name="$cf_cv_system_name"
1357 test -n "$cf_cv_system_name" && echo "$as_me:1357: result: Configuring for $cf_cv_system_name" >&5
1358 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1359
1360 if test ".$system_name" != ".$cf_cv_system_name" ; then
1361         echo "$as_me:1361: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1362 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1363         { { echo "$as_me:1363: error: \"Please remove config.cache and try again.\"" >&5
1364 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1365    { (exit 1); exit 1; }; }
1366 fi
1367
1368 # Check whether --with-system-type or --without-system-type was given.
1369 if test "${with_system_type+set}" = set; then
1370   withval="$with_system_type"
1371   { echo "$as_me:1371: WARNING: overriding system type to $withval" >&5
1372 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1373         cf_cv_system_name=$withval
1374         host_os=$withval
1375
1376 fi;
1377
1378 ###     Save the given $CFLAGS to allow user-override.
1379 cf_user_CFLAGS="$CFLAGS"
1380
1381 ###     Default install-location
1382
1383 echo "$as_me:1383: checking for prefix" >&5
1384 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1385 if test "x$prefix" = "xNONE" ; then
1386         case "$cf_cv_system_name" in
1387                 # non-vendor systems don't have a conflict
1388         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1389                 prefix=/usr
1390                 ;;
1391         *)      prefix=$ac_default_prefix
1392                 ;;
1393         esac
1394 fi
1395 echo "$as_me:1395: result: $prefix" >&5
1396 echo "${ECHO_T}$prefix" >&6
1397
1398 if test "x$prefix" = "xNONE" ; then
1399 echo "$as_me:1399: checking for default include-directory" >&5
1400 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1401 test -n "$verbose" && echo 1>&6
1402 for cf_symbol in \
1403         $includedir \
1404         $includedir/ncurses \
1405         $prefix/include \
1406         $prefix/include/ncurses \
1407         /usr/local/include \
1408         /usr/local/include/ncurses \
1409         /usr/include \
1410         /usr/include/ncurses
1411 do
1412         cf_dir=`eval echo $cf_symbol`
1413         if test -f $cf_dir/curses.h ; then
1414         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1415                 includedir="$cf_symbol"
1416                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1417                 break
1418         fi
1419         fi
1420         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1421 done
1422 echo "$as_me:1422: result: $includedir" >&5
1423 echo "${ECHO_T}$includedir" >&6
1424 fi
1425
1426 ###     Checks for programs.
1427
1428 # Check whether --with-ada or --without-ada was given.
1429 if test "${with_ada+set}" = set; then
1430   withval="$with_ada"
1431   cf_with_ada=$withval
1432 else
1433   cf_with_ada=yes
1434 fi;
1435 if test "x$cf_with_ada" = xyes
1436 then
1437         cf_PROG_CC="gnatgcc gcc cc"
1438 else
1439         cf_PROG_CC="gcc cc"
1440 fi
1441
1442 ac_ext=c
1443 ac_cpp='$CPP $CPPFLAGS'
1444 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1445 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1446 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1447 ac_main_return=return
1448 if test -n "$ac_tool_prefix"; then
1449   for ac_prog in $cf_PROG_CC
1450   do
1451     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1452 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1453 echo "$as_me:1453: checking for $ac_word" >&5
1454 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1455 if test "${ac_cv_prog_CC+set}" = set; then
1456   echo $ECHO_N "(cached) $ECHO_C" >&6
1457 else
1458   if test -n "$CC"; then
1459   ac_cv_prog_CC="$CC" # Let the user override the test.
1460 else
1461   ac_save_IFS=$IFS; IFS=$ac_path_separator
1462 ac_dummy="$PATH"
1463 for ac_dir in $ac_dummy; do
1464   IFS=$ac_save_IFS
1465   test -z "$ac_dir" && ac_dir=.
1466   $as_executable_p "$ac_dir/$ac_word" || continue
1467 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1468 echo "$as_me:1468: found $ac_dir/$ac_word" >&5
1469 break
1470 done
1471
1472 fi
1473 fi
1474 CC=$ac_cv_prog_CC
1475 if test -n "$CC"; then
1476   echo "$as_me:1476: result: $CC" >&5
1477 echo "${ECHO_T}$CC" >&6
1478 else
1479   echo "$as_me:1479: result: no" >&5
1480 echo "${ECHO_T}no" >&6
1481 fi
1482
1483     test -n "$CC" && break
1484   done
1485 fi
1486 if test -z "$CC"; then
1487   ac_ct_CC=$CC
1488   for ac_prog in $cf_PROG_CC
1489 do
1490   # Extract the first word of "$ac_prog", so it can be a program name with args.
1491 set dummy $ac_prog; ac_word=$2
1492 echo "$as_me:1492: checking for $ac_word" >&5
1493 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1494 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1495   echo $ECHO_N "(cached) $ECHO_C" >&6
1496 else
1497   if test -n "$ac_ct_CC"; then
1498   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1499 else
1500   ac_save_IFS=$IFS; IFS=$ac_path_separator
1501 ac_dummy="$PATH"
1502 for ac_dir in $ac_dummy; do
1503   IFS=$ac_save_IFS
1504   test -z "$ac_dir" && ac_dir=.
1505   $as_executable_p "$ac_dir/$ac_word" || continue
1506 ac_cv_prog_ac_ct_CC="$ac_prog"
1507 echo "$as_me:1507: found $ac_dir/$ac_word" >&5
1508 break
1509 done
1510
1511 fi
1512 fi
1513 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1514 if test -n "$ac_ct_CC"; then
1515   echo "$as_me:1515: result: $ac_ct_CC" >&5
1516 echo "${ECHO_T}$ac_ct_CC" >&6
1517 else
1518   echo "$as_me:1518: result: no" >&5
1519 echo "${ECHO_T}no" >&6
1520 fi
1521
1522   test -n "$ac_ct_CC" && break
1523 done
1524
1525   CC=$ac_ct_CC
1526 fi
1527
1528 test -z "$CC" && { { echo "$as_me:1528: error: no acceptable cc found in \$PATH" >&5
1529 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1530    { (exit 1); exit 1; }; }
1531
1532 # Provide some information about the compiler.
1533 echo "$as_me:1533:" \
1534      "checking for C compiler version" >&5
1535 ac_compiler=`set X $ac_compile; echo $2`
1536 { (eval echo "$as_me:1536: \"$ac_compiler --version </dev/null >&5\"") >&5
1537   (eval $ac_compiler --version </dev/null >&5) 2>&5
1538   ac_status=$?
1539   echo "$as_me:1539: \$? = $ac_status" >&5
1540   (exit $ac_status); }
1541 { (eval echo "$as_me:1541: \"$ac_compiler -v </dev/null >&5\"") >&5
1542   (eval $ac_compiler -v </dev/null >&5) 2>&5
1543   ac_status=$?
1544   echo "$as_me:1544: \$? = $ac_status" >&5
1545   (exit $ac_status); }
1546 { (eval echo "$as_me:1546: \"$ac_compiler -V </dev/null >&5\"") >&5
1547   (eval $ac_compiler -V </dev/null >&5) 2>&5
1548   ac_status=$?
1549   echo "$as_me:1549: \$? = $ac_status" >&5
1550   (exit $ac_status); }
1551
1552 cat >conftest.$ac_ext <<_ACEOF
1553 #line 1553 "configure"
1554 #include "confdefs.h"
1555
1556 int
1557 main ()
1558 {
1559
1560   ;
1561   return 0;
1562 }
1563 _ACEOF
1564 ac_clean_files_save=$ac_clean_files
1565 ac_clean_files="$ac_clean_files a.out a.exe"
1566 # Try to create an executable without -o first, disregard a.out.
1567 # It will help us diagnose broken compilers, and finding out an intuition
1568 # of exeext.
1569 echo "$as_me:1569: checking for C compiler default output" >&5
1570 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1571 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1572 if { (eval echo "$as_me:1572: \"$ac_link_default\"") >&5
1573   (eval $ac_link_default) 2>&5
1574   ac_status=$?
1575   echo "$as_me:1575: \$? = $ac_status" >&5
1576   (exit $ac_status); }; then
1577   # Find the output, starting from the most likely.  This scheme is
1578 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1579 # resort.
1580 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1581                 ls a.out conftest 2>/dev/null;
1582                 ls a.* conftest.* 2>/dev/null`; do
1583   case $ac_file in
1584     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1585     a.out ) # We found the default executable, but exeext='' is most
1586             # certainly right.
1587             break;;
1588     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1589           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1590           export ac_cv_exeext
1591           break;;
1592     * ) break;;
1593   esac
1594 done
1595 else
1596   echo "$as_me: failed program was:" >&5
1597 cat conftest.$ac_ext >&5
1598 { { echo "$as_me:1598: error: C compiler cannot create executables" >&5
1599 echo "$as_me: error: C compiler cannot create executables" >&2;}
1600    { (exit 77); exit 77; }; }
1601 fi
1602
1603 ac_exeext=$ac_cv_exeext
1604 echo "$as_me:1604: result: $ac_file" >&5
1605 echo "${ECHO_T}$ac_file" >&6
1606
1607 # Check the compiler produces executables we can run.  If not, either
1608 # the compiler is broken, or we cross compile.
1609 echo "$as_me:1609: checking whether the C compiler works" >&5
1610 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1611 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1612 # If not cross compiling, check that we can run a simple program.
1613 if test "$cross_compiling" != yes; then
1614   if { ac_try='./$ac_file'
1615   { (eval echo "$as_me:1615: \"$ac_try\"") >&5
1616   (eval $ac_try) 2>&5
1617   ac_status=$?
1618   echo "$as_me:1618: \$? = $ac_status" >&5
1619   (exit $ac_status); }; }; then
1620     cross_compiling=no
1621   else
1622     if test "$cross_compiling" = maybe; then
1623         cross_compiling=yes
1624     else
1625         { { echo "$as_me:1625: error: cannot run C compiled programs.
1626 If you meant to cross compile, use \`--host'." >&5
1627 echo "$as_me: error: cannot run C compiled programs.
1628 If you meant to cross compile, use \`--host'." >&2;}
1629    { (exit 1); exit 1; }; }
1630     fi
1631   fi
1632 fi
1633 echo "$as_me:1633: result: yes" >&5
1634 echo "${ECHO_T}yes" >&6
1635
1636 rm -f a.out a.exe conftest$ac_cv_exeext
1637 ac_clean_files=$ac_clean_files_save
1638 # Check the compiler produces executables we can run.  If not, either
1639 # the compiler is broken, or we cross compile.
1640 echo "$as_me:1640: checking whether we are cross compiling" >&5
1641 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1642 echo "$as_me:1642: result: $cross_compiling" >&5
1643 echo "${ECHO_T}$cross_compiling" >&6
1644
1645 echo "$as_me:1645: checking for executable suffix" >&5
1646 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1647 if { (eval echo "$as_me:1647: \"$ac_link\"") >&5
1648   (eval $ac_link) 2>&5
1649   ac_status=$?
1650   echo "$as_me:1650: \$? = $ac_status" >&5
1651   (exit $ac_status); }; then
1652   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1653 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1654 # work properly (i.e., refer to `conftest.exe'), while it won't with
1655 # `rm'.
1656 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1657   case $ac_file in
1658     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1659     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1660           export ac_cv_exeext
1661           break;;
1662     * ) break;;
1663   esac
1664 done
1665 else
1666   { { echo "$as_me:1666: error: cannot compute EXEEXT: cannot compile and link" >&5
1667 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1668    { (exit 1); exit 1; }; }
1669 fi
1670
1671 rm -f conftest$ac_cv_exeext
1672 echo "$as_me:1672: result: $ac_cv_exeext" >&5
1673 echo "${ECHO_T}$ac_cv_exeext" >&6
1674
1675 rm -f conftest.$ac_ext
1676 EXEEXT=$ac_cv_exeext
1677 ac_exeext=$EXEEXT
1678 echo "$as_me:1678: checking for object suffix" >&5
1679 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1680 if test "${ac_cv_objext+set}" = set; then
1681   echo $ECHO_N "(cached) $ECHO_C" >&6
1682 else
1683   cat >conftest.$ac_ext <<_ACEOF
1684 #line 1684 "configure"
1685 #include "confdefs.h"
1686
1687 int
1688 main ()
1689 {
1690
1691   ;
1692   return 0;
1693 }
1694 _ACEOF
1695 rm -f conftest.o conftest.obj
1696 if { (eval echo "$as_me:1696: \"$ac_compile\"") >&5
1697   (eval $ac_compile) 2>&5
1698   ac_status=$?
1699   echo "$as_me:1699: \$? = $ac_status" >&5
1700   (exit $ac_status); }; then
1701   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1702   case $ac_file in
1703     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1704     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1705        break;;
1706   esac
1707 done
1708 else
1709   echo "$as_me: failed program was:" >&5
1710 cat conftest.$ac_ext >&5
1711 { { echo "$as_me:1711: error: cannot compute OBJEXT: cannot compile" >&5
1712 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1713    { (exit 1); exit 1; }; }
1714 fi
1715
1716 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1717 fi
1718 echo "$as_me:1718: result: $ac_cv_objext" >&5
1719 echo "${ECHO_T}$ac_cv_objext" >&6
1720 OBJEXT=$ac_cv_objext
1721 ac_objext=$OBJEXT
1722 echo "$as_me:1722: checking whether we are using the GNU C compiler" >&5
1723 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1724 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1725   echo $ECHO_N "(cached) $ECHO_C" >&6
1726 else
1727   cat >conftest.$ac_ext <<_ACEOF
1728 #line 1728 "configure"
1729 #include "confdefs.h"
1730
1731 int
1732 main ()
1733 {
1734 #ifndef __GNUC__
1735        choke me
1736 #endif
1737
1738   ;
1739   return 0;
1740 }
1741 _ACEOF
1742 rm -f conftest.$ac_objext
1743 if { (eval echo "$as_me:1743: \"$ac_compile\"") >&5
1744   (eval $ac_compile) 2>&5
1745   ac_status=$?
1746   echo "$as_me:1746: \$? = $ac_status" >&5
1747   (exit $ac_status); } &&
1748          { ac_try='test -s conftest.$ac_objext'
1749   { (eval echo "$as_me:1749: \"$ac_try\"") >&5
1750   (eval $ac_try) 2>&5
1751   ac_status=$?
1752   echo "$as_me:1752: \$? = $ac_status" >&5
1753   (exit $ac_status); }; }; then
1754   ac_compiler_gnu=yes
1755 else
1756   echo "$as_me: failed program was:" >&5
1757 cat conftest.$ac_ext >&5
1758 ac_compiler_gnu=no
1759 fi
1760 rm -f conftest.$ac_objext conftest.$ac_ext
1761 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1762
1763 fi
1764 echo "$as_me:1764: result: $ac_cv_c_compiler_gnu" >&5
1765 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1766 GCC=`test $ac_compiler_gnu = yes && echo yes`
1767 ac_test_CFLAGS=${CFLAGS+set}
1768 ac_save_CFLAGS=$CFLAGS
1769 CFLAGS="-g"
1770 echo "$as_me:1770: checking whether $CC accepts -g" >&5
1771 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1772 if test "${ac_cv_prog_cc_g+set}" = set; then
1773   echo $ECHO_N "(cached) $ECHO_C" >&6
1774 else
1775   cat >conftest.$ac_ext <<_ACEOF
1776 #line 1776 "configure"
1777 #include "confdefs.h"
1778
1779 int
1780 main ()
1781 {
1782
1783   ;
1784   return 0;
1785 }
1786 _ACEOF
1787 rm -f conftest.$ac_objext
1788 if { (eval echo "$as_me:1788: \"$ac_compile\"") >&5
1789   (eval $ac_compile) 2>&5
1790   ac_status=$?
1791   echo "$as_me:1791: \$? = $ac_status" >&5
1792   (exit $ac_status); } &&
1793          { ac_try='test -s conftest.$ac_objext'
1794   { (eval echo "$as_me:1794: \"$ac_try\"") >&5
1795   (eval $ac_try) 2>&5
1796   ac_status=$?
1797   echo "$as_me:1797: \$? = $ac_status" >&5
1798   (exit $ac_status); }; }; then
1799   ac_cv_prog_cc_g=yes
1800 else
1801   echo "$as_me: failed program was:" >&5
1802 cat conftest.$ac_ext >&5
1803 ac_cv_prog_cc_g=no
1804 fi
1805 rm -f conftest.$ac_objext conftest.$ac_ext
1806 fi
1807 echo "$as_me:1807: result: $ac_cv_prog_cc_g" >&5
1808 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1809 if test "$ac_test_CFLAGS" = set; then
1810   CFLAGS=$ac_save_CFLAGS
1811 elif test $ac_cv_prog_cc_g = yes; then
1812   if test "$GCC" = yes; then
1813     CFLAGS="-g -O2"
1814   else
1815     CFLAGS="-g"
1816   fi
1817 else
1818   if test "$GCC" = yes; then
1819     CFLAGS="-O2"
1820   else
1821     CFLAGS=
1822   fi
1823 fi
1824 # Some people use a C++ compiler to compile C.  Since we use `exit',
1825 # in C++ we need to declare it.  In case someone uses the same compiler
1826 # for both compiling C and C++ we need to have the C++ compiler decide
1827 # the declaration of exit, since it's the most demanding environment.
1828 cat >conftest.$ac_ext <<_ACEOF
1829 #ifndef __cplusplus
1830   choke me
1831 #endif
1832 _ACEOF
1833 rm -f conftest.$ac_objext
1834 if { (eval echo "$as_me:1834: \"$ac_compile\"") >&5
1835   (eval $ac_compile) 2>&5
1836   ac_status=$?
1837   echo "$as_me:1837: \$? = $ac_status" >&5
1838   (exit $ac_status); } &&
1839          { ac_try='test -s conftest.$ac_objext'
1840   { (eval echo "$as_me:1840: \"$ac_try\"") >&5
1841   (eval $ac_try) 2>&5
1842   ac_status=$?
1843   echo "$as_me:1843: \$? = $ac_status" >&5
1844   (exit $ac_status); }; }; then
1845   for ac_declaration in \
1846    ''\
1847    '#include <stdlib.h>' \
1848    'extern "C" void std::exit (int) throw (); using std::exit;' \
1849    'extern "C" void std::exit (int); using std::exit;' \
1850    'extern "C" void exit (int) throw ();' \
1851    'extern "C" void exit (int);' \
1852    'void exit (int);'
1853 do
1854   cat >conftest.$ac_ext <<_ACEOF
1855 #line 1855 "configure"
1856 #include "confdefs.h"
1857 #include <stdlib.h>
1858 $ac_declaration
1859 int
1860 main ()
1861 {
1862 exit (42);
1863   ;
1864   return 0;
1865 }
1866 _ACEOF
1867 rm -f conftest.$ac_objext
1868 if { (eval echo "$as_me:1868: \"$ac_compile\"") >&5
1869   (eval $ac_compile) 2>&5
1870   ac_status=$?
1871   echo "$as_me:1871: \$? = $ac_status" >&5
1872   (exit $ac_status); } &&
1873          { ac_try='test -s conftest.$ac_objext'
1874   { (eval echo "$as_me:1874: \"$ac_try\"") >&5
1875   (eval $ac_try) 2>&5
1876   ac_status=$?
1877   echo "$as_me:1877: \$? = $ac_status" >&5
1878   (exit $ac_status); }; }; then
1879   :
1880 else
1881   echo "$as_me: failed program was:" >&5
1882 cat conftest.$ac_ext >&5
1883 continue
1884 fi
1885 rm -f conftest.$ac_objext conftest.$ac_ext
1886   cat >conftest.$ac_ext <<_ACEOF
1887 #line 1887 "configure"
1888 #include "confdefs.h"
1889 $ac_declaration
1890 int
1891 main ()
1892 {
1893 exit (42);
1894   ;
1895   return 0;
1896 }
1897 _ACEOF
1898 rm -f conftest.$ac_objext
1899 if { (eval echo "$as_me:1899: \"$ac_compile\"") >&5
1900   (eval $ac_compile) 2>&5
1901   ac_status=$?
1902   echo "$as_me:1902: \$? = $ac_status" >&5
1903   (exit $ac_status); } &&
1904          { ac_try='test -s conftest.$ac_objext'
1905   { (eval echo "$as_me:1905: \"$ac_try\"") >&5
1906   (eval $ac_try) 2>&5
1907   ac_status=$?
1908   echo "$as_me:1908: \$? = $ac_status" >&5
1909   (exit $ac_status); }; }; then
1910   break
1911 else
1912   echo "$as_me: failed program was:" >&5
1913 cat conftest.$ac_ext >&5
1914 fi
1915 rm -f conftest.$ac_objext conftest.$ac_ext
1916 done
1917 rm -rf conftest*
1918 if test -n "$ac_declaration"; then
1919   echo '#ifdef __cplusplus' >>confdefs.h
1920   echo $ac_declaration      >>confdefs.h
1921   echo '#endif'             >>confdefs.h
1922 fi
1923
1924 else
1925   echo "$as_me: failed program was:" >&5
1926 cat conftest.$ac_ext >&5
1927 fi
1928 rm -f conftest.$ac_objext conftest.$ac_ext
1929 ac_ext=c
1930 ac_cpp='$CPP $CPPFLAGS'
1931 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1932 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1933 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1934 ac_main_return=return
1935
1936 GCC_VERSION=none
1937 if test "$GCC" = yes ; then
1938         echo "$as_me:1938: checking version of $CC" >&5
1939 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1940         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.].*//'`"
1941         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1942         echo "$as_me:1942: result: $GCC_VERSION" >&5
1943 echo "${ECHO_T}$GCC_VERSION" >&6
1944 fi
1945
1946 echo "$as_me:1946: checking for $CC option to accept ANSI C" >&5
1947 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1948 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1949   echo $ECHO_N "(cached) $ECHO_C" >&6
1950 else
1951   ac_cv_prog_cc_stdc=no
1952 ac_save_CC=$CC
1953 cat >conftest.$ac_ext <<_ACEOF
1954 #line 1954 "configure"
1955 #include "confdefs.h"
1956 #include <stdarg.h>
1957 #include <stdio.h>
1958 #include <sys/types.h>
1959 #include <sys/stat.h>
1960 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1961 struct buf { int x; };
1962 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1963 static char *e (p, i)
1964      char **p;
1965      int i;
1966 {
1967   return p[i];
1968 }
1969 static char *f (char * (*g) (char **, int), char **p, ...)
1970 {
1971   char *s;
1972   va_list v;
1973   va_start (v,p);
1974   s = g (p, va_arg (v,int));
1975   va_end (v);
1976   return s;
1977 }
1978 int test (int i, double x);
1979 struct s1 {int (*f) (int a);};
1980 struct s2 {int (*f) (double a);};
1981 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1982 int argc;
1983 char **argv;
1984 int
1985 main ()
1986 {
1987 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1988   ;
1989   return 0;
1990 }
1991 _ACEOF
1992 # Don't try gcc -ansi; that turns off useful extensions and
1993 # breaks some systems' header files.
1994 # AIX                   -qlanglvl=ansi
1995 # Ultrix and OSF/1      -std1
1996 # HP-UX 10.20 and later -Ae
1997 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1998 # SVR4                  -Xc -D__EXTENSIONS__
1999 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2000 do
2001   CC="$ac_save_CC $ac_arg"
2002   rm -f conftest.$ac_objext
2003 if { (eval echo "$as_me:2003: \"$ac_compile\"") >&5
2004   (eval $ac_compile) 2>&5
2005   ac_status=$?
2006   echo "$as_me:2006: \$? = $ac_status" >&5
2007   (exit $ac_status); } &&
2008          { ac_try='test -s conftest.$ac_objext'
2009   { (eval echo "$as_me:2009: \"$ac_try\"") >&5
2010   (eval $ac_try) 2>&5
2011   ac_status=$?
2012   echo "$as_me:2012: \$? = $ac_status" >&5
2013   (exit $ac_status); }; }; then
2014   ac_cv_prog_cc_stdc=$ac_arg
2015 break
2016 else
2017   echo "$as_me: failed program was:" >&5
2018 cat conftest.$ac_ext >&5
2019 fi
2020 rm -f conftest.$ac_objext
2021 done
2022 rm -f conftest.$ac_ext conftest.$ac_objext
2023 CC=$ac_save_CC
2024
2025 fi
2026
2027 case "x$ac_cv_prog_cc_stdc" in
2028   x|xno)
2029     echo "$as_me:2029: result: none needed" >&5
2030 echo "${ECHO_T}none needed" >&6 ;;
2031   *)
2032     echo "$as_me:2032: result: $ac_cv_prog_cc_stdc" >&5
2033 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2034     CC="$CC $ac_cv_prog_cc_stdc" ;;
2035 esac
2036
2037 # This should have been defined by AC_PROG_CC
2038 : ${CC:=cc}
2039
2040 echo "$as_me:2040: checking \$CC variable" >&5
2041 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2042 case "$CC" in #(vi
2043 *[\ \   ]-[IUD]*)
2044         echo "$as_me:2044: result: broken" >&5
2045 echo "${ECHO_T}broken" >&6
2046         { echo "$as_me:2046: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2047 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2048         # humor him...
2049         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2050         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2051
2052 cf_fix_cppflags=no
2053 cf_new_cflags=
2054 cf_new_cppflags=
2055 cf_new_extra_cppflags=
2056
2057 for cf_add_cflags in $cf_flags
2058 do
2059 case $cf_fix_cppflags in
2060 no)
2061         case $cf_add_cflags in #(vi
2062         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2063                 case $cf_add_cflags in
2064                 -D*)
2065                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2066
2067                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2068                                 && test -z "${cf_tst_cflags}" \
2069                                 && cf_fix_cppflags=yes
2070
2071                         if test $cf_fix_cppflags = yes ; then
2072                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2073                                 continue
2074                         elif test "${cf_tst_cflags}" = "\"'" ; then
2075                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2076                                 continue
2077                         fi
2078                         ;;
2079                 esac
2080                 case "$CPPFLAGS" in
2081                 *$cf_add_cflags) #(vi
2082                         ;;
2083                 *) #(vi
2084                         case $cf_add_cflags in #(vi
2085                         -D*)
2086                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2087
2088 CPPFLAGS=`echo "$CPPFLAGS" | \
2089         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2090                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2091
2092                                 ;;
2093                         esac
2094                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2095                         ;;
2096                 esac
2097                 ;;
2098         *)
2099                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2100                 ;;
2101         esac
2102         ;;
2103 yes)
2104         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2105
2106         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2107
2108         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2109                 && test -z "${cf_tst_cflags}" \
2110                 && cf_fix_cppflags=no
2111         ;;
2112 esac
2113 done
2114
2115 if test -n "$cf_new_cflags" ; then
2116
2117         CFLAGS="$CFLAGS $cf_new_cflags"
2118 fi
2119
2120 if test -n "$cf_new_cppflags" ; then
2121
2122         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2123 fi
2124
2125 if test -n "$cf_new_extra_cppflags" ; then
2126
2127         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2128 fi
2129
2130         ;;
2131 *)
2132         echo "$as_me:2132: result: ok" >&5
2133 echo "${ECHO_T}ok" >&6
2134         ;;
2135 esac
2136
2137 ac_ext=c
2138 ac_cpp='$CPP $CPPFLAGS'
2139 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2140 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2141 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2142 ac_main_return=return
2143 echo "$as_me:2143: checking how to run the C preprocessor" >&5
2144 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2145 # On Suns, sometimes $CPP names a directory.
2146 if test -n "$CPP" && test -d "$CPP"; then
2147   CPP=
2148 fi
2149 if test -z "$CPP"; then
2150   if test "${ac_cv_prog_CPP+set}" = set; then
2151   echo $ECHO_N "(cached) $ECHO_C" >&6
2152 else
2153       # Double quotes because CPP needs to be expanded
2154     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2155     do
2156       ac_preproc_ok=false
2157 for ac_c_preproc_warn_flag in '' yes
2158 do
2159   # Use a header file that comes with gcc, so configuring glibc
2160   # with a fresh cross-compiler works.
2161   # On the NeXT, cc -E runs the code through the compiler's parser,
2162   # not just through cpp. "Syntax error" is here to catch this case.
2163   cat >conftest.$ac_ext <<_ACEOF
2164 #line 2164 "configure"
2165 #include "confdefs.h"
2166 #include <assert.h>
2167                      Syntax error
2168 _ACEOF
2169 if { (eval echo "$as_me:2169: \"$ac_cpp conftest.$ac_ext\"") >&5
2170   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2171   ac_status=$?
2172   egrep -v '^ *\+' conftest.er1 >conftest.err
2173   rm -f conftest.er1
2174   cat conftest.err >&5
2175   echo "$as_me:2175: \$? = $ac_status" >&5
2176   (exit $ac_status); } >/dev/null; then
2177   if test -s conftest.err; then
2178     ac_cpp_err=$ac_c_preproc_warn_flag
2179   else
2180     ac_cpp_err=
2181   fi
2182 else
2183   ac_cpp_err=yes
2184 fi
2185 if test -z "$ac_cpp_err"; then
2186   :
2187 else
2188   echo "$as_me: failed program was:" >&5
2189   cat conftest.$ac_ext >&5
2190   # Broken: fails on valid input.
2191 continue
2192 fi
2193 rm -f conftest.err conftest.$ac_ext
2194
2195   # OK, works on sane cases.  Now check whether non-existent headers
2196   # can be detected and how.
2197   cat >conftest.$ac_ext <<_ACEOF
2198 #line 2198 "configure"
2199 #include "confdefs.h"
2200 #include <ac_nonexistent.h>
2201 _ACEOF
2202 if { (eval echo "$as_me:2202: \"$ac_cpp conftest.$ac_ext\"") >&5
2203   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2204   ac_status=$?
2205   egrep -v '^ *\+' conftest.er1 >conftest.err
2206   rm -f conftest.er1
2207   cat conftest.err >&5
2208   echo "$as_me:2208: \$? = $ac_status" >&5
2209   (exit $ac_status); } >/dev/null; then
2210   if test -s conftest.err; then
2211     ac_cpp_err=$ac_c_preproc_warn_flag
2212   else
2213     ac_cpp_err=
2214   fi
2215 else
2216   ac_cpp_err=yes
2217 fi
2218 if test -z "$ac_cpp_err"; then
2219   # Broken: success on invalid input.
2220 continue
2221 else
2222   echo "$as_me: failed program was:" >&5
2223   cat conftest.$ac_ext >&5
2224   # Passes both tests.
2225 ac_preproc_ok=:
2226 break
2227 fi
2228 rm -f conftest.err conftest.$ac_ext
2229
2230 done
2231 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2232 rm -f conftest.err conftest.$ac_ext
2233 if $ac_preproc_ok; then
2234   break
2235 fi
2236
2237     done
2238     ac_cv_prog_CPP=$CPP
2239
2240 fi
2241   CPP=$ac_cv_prog_CPP
2242 else
2243   ac_cv_prog_CPP=$CPP
2244 fi
2245 echo "$as_me:2245: result: $CPP" >&5
2246 echo "${ECHO_T}$CPP" >&6
2247 ac_preproc_ok=false
2248 for ac_c_preproc_warn_flag in '' yes
2249 do
2250   # Use a header file that comes with gcc, so configuring glibc
2251   # with a fresh cross-compiler works.
2252   # On the NeXT, cc -E runs the code through the compiler's parser,
2253   # not just through cpp. "Syntax error" is here to catch this case.
2254   cat >conftest.$ac_ext <<_ACEOF
2255 #line 2255 "configure"
2256 #include "confdefs.h"
2257 #include <assert.h>
2258                      Syntax error
2259 _ACEOF
2260 if { (eval echo "$as_me:2260: \"$ac_cpp conftest.$ac_ext\"") >&5
2261   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2262   ac_status=$?
2263   egrep -v '^ *\+' conftest.er1 >conftest.err
2264   rm -f conftest.er1
2265   cat conftest.err >&5
2266   echo "$as_me:2266: \$? = $ac_status" >&5
2267   (exit $ac_status); } >/dev/null; then
2268   if test -s conftest.err; then
2269     ac_cpp_err=$ac_c_preproc_warn_flag
2270   else
2271     ac_cpp_err=
2272   fi
2273 else
2274   ac_cpp_err=yes
2275 fi
2276 if test -z "$ac_cpp_err"; then
2277   :
2278 else
2279   echo "$as_me: failed program was:" >&5
2280   cat conftest.$ac_ext >&5
2281   # Broken: fails on valid input.
2282 continue
2283 fi
2284 rm -f conftest.err conftest.$ac_ext
2285
2286   # OK, works on sane cases.  Now check whether non-existent headers
2287   # can be detected and how.
2288   cat >conftest.$ac_ext <<_ACEOF
2289 #line 2289 "configure"
2290 #include "confdefs.h"
2291 #include <ac_nonexistent.h>
2292 _ACEOF
2293 if { (eval echo "$as_me:2293: \"$ac_cpp conftest.$ac_ext\"") >&5
2294   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2295   ac_status=$?
2296   egrep -v '^ *\+' conftest.er1 >conftest.err
2297   rm -f conftest.er1
2298   cat conftest.err >&5
2299   echo "$as_me:2299: \$? = $ac_status" >&5
2300   (exit $ac_status); } >/dev/null; then
2301   if test -s conftest.err; then
2302     ac_cpp_err=$ac_c_preproc_warn_flag
2303   else
2304     ac_cpp_err=
2305   fi
2306 else
2307   ac_cpp_err=yes
2308 fi
2309 if test -z "$ac_cpp_err"; then
2310   # Broken: success on invalid input.
2311 continue
2312 else
2313   echo "$as_me: failed program was:" >&5
2314   cat conftest.$ac_ext >&5
2315   # Passes both tests.
2316 ac_preproc_ok=:
2317 break
2318 fi
2319 rm -f conftest.err conftest.$ac_ext
2320
2321 done
2322 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2323 rm -f conftest.err conftest.$ac_ext
2324 if $ac_preproc_ok; then
2325   :
2326 else
2327   { { echo "$as_me:2327: error: C preprocessor \"$CPP\" fails sanity check" >&5
2328 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2329    { (exit 1); exit 1; }; }
2330 fi
2331
2332 ac_ext=c
2333 ac_cpp='$CPP $CPPFLAGS'
2334 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2335 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2336 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2337 ac_main_return=return
2338
2339 if test $ac_cv_c_compiler_gnu = yes; then
2340     echo "$as_me:2340: checking whether $CC needs -traditional" >&5
2341 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2342 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2343   echo $ECHO_N "(cached) $ECHO_C" >&6
2344 else
2345     ac_pattern="Autoconf.*'x'"
2346   cat >conftest.$ac_ext <<_ACEOF
2347 #line 2347 "configure"
2348 #include "confdefs.h"
2349 #include <sgtty.h>
2350 int Autoconf = TIOCGETP;
2351 _ACEOF
2352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2353   egrep "$ac_pattern" >/dev/null 2>&1; then
2354   ac_cv_prog_gcc_traditional=yes
2355 else
2356   ac_cv_prog_gcc_traditional=no
2357 fi
2358 rm -rf conftest*
2359
2360   if test $ac_cv_prog_gcc_traditional = no; then
2361     cat >conftest.$ac_ext <<_ACEOF
2362 #line 2362 "configure"
2363 #include "confdefs.h"
2364 #include <termio.h>
2365 int Autoconf = TCGETA;
2366 _ACEOF
2367 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2368   egrep "$ac_pattern" >/dev/null 2>&1; then
2369   ac_cv_prog_gcc_traditional=yes
2370 fi
2371 rm -rf conftest*
2372
2373   fi
2374 fi
2375 echo "$as_me:2375: result: $ac_cv_prog_gcc_traditional" >&5
2376 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2377   if test $ac_cv_prog_gcc_traditional = yes; then
2378     CC="$CC -traditional"
2379   fi
2380 fi
2381
2382 echo "$as_me:2382: checking whether $CC understands -c and -o together" >&5
2383 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2384 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2385   echo $ECHO_N "(cached) $ECHO_C" >&6
2386 else
2387
2388 cat > conftest.$ac_ext <<CF_EOF
2389 #include <stdio.h>
2390 int main()
2391 {
2392         ${cf_cv_main_return:-return}(0);
2393 }
2394 CF_EOF
2395 # We do the test twice because some compilers refuse to overwrite an
2396 # existing .o file with -o, though they will create one.
2397 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2398 if { (eval echo "$as_me:2398: \"$ac_try\"") >&5
2399   (eval $ac_try) 2>&5
2400   ac_status=$?
2401   echo "$as_me:2401: \$? = $ac_status" >&5
2402   (exit $ac_status); } &&
2403   test -f conftest2.$ac_objext && { (eval echo "$as_me:2403: \"$ac_try\"") >&5
2404   (eval $ac_try) 2>&5
2405   ac_status=$?
2406   echo "$as_me:2406: \$? = $ac_status" >&5
2407   (exit $ac_status); };
2408 then
2409   eval cf_cv_prog_CC_c_o=yes
2410 else
2411   eval cf_cv_prog_CC_c_o=no
2412 fi
2413 rm -rf conftest*
2414
2415 fi
2416 if test $cf_cv_prog_CC_c_o = yes; then
2417   echo "$as_me:2417: result: yes" >&5
2418 echo "${ECHO_T}yes" >&6
2419 else
2420   echo "$as_me:2420: result: no" >&5
2421 echo "${ECHO_T}no" >&6
2422 fi
2423
2424 if test "$cross_compiling" = yes ; then
2425   LDCONFIG=:
2426 else
2427 case "$cf_cv_system_name" in #(vi
2428 dragonfly*|mirbsd*|freebsd*) #(vi
2429   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2430   ;;
2431 *) LDPATH=$PATH:/sbin:/usr/sbin
2432   # Extract the first word of "ldconfig", so it can be a program name with args.
2433 set dummy ldconfig; ac_word=$2
2434 echo "$as_me:2434: checking for $ac_word" >&5
2435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2436 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2437   echo $ECHO_N "(cached) $ECHO_C" >&6
2438 else
2439   case $LDCONFIG in
2440   [\\/]* | ?:[\\/]*)
2441   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2442   ;;
2443   *)
2444   ac_save_IFS=$IFS; IFS=$ac_path_separator
2445 ac_dummy="$LDPATH"
2446 for ac_dir in $ac_dummy; do
2447   IFS=$ac_save_IFS
2448   test -z "$ac_dir" && ac_dir=.
2449   if $as_executable_p "$ac_dir/$ac_word"; then
2450    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2451    echo "$as_me:2451: found $ac_dir/$ac_word" >&5
2452    break
2453 fi
2454 done
2455
2456   ;;
2457 esac
2458 fi
2459 LDCONFIG=$ac_cv_path_LDCONFIG
2460
2461 if test -n "$LDCONFIG"; then
2462   echo "$as_me:2462: result: $LDCONFIG" >&5
2463 echo "${ECHO_T}$LDCONFIG" >&6
2464 else
2465   echo "$as_me:2465: result: no" >&5
2466 echo "${ECHO_T}no" >&6
2467 fi
2468
2469   ;;
2470 esac
2471 fi
2472
2473 echo "$as_me:2473: checking if you want to ensure bool is consistent with C++" >&5
2474 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2475
2476 # Check whether --with-cxx or --without-cxx was given.
2477 if test "${with_cxx+set}" = set; then
2478   withval="$with_cxx"
2479   cf_with_cxx=$withval
2480 else
2481   cf_with_cxx=yes
2482 fi;
2483 echo "$as_me:2483: result: $cf_with_cxx" >&5
2484 echo "${ECHO_T}$cf_with_cxx" >&6
2485 if test "X$cf_with_cxx" = Xno ; then
2486         CXX=""
2487         GXX=""
2488 else
2489         # with autoconf 2.13, we can change the error to a warning:
2490                 ac_ext=cc
2491 ac_cpp='$CXXCPP $CPPFLAGS'
2492 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2493 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2494 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2495 ac_main_return=return
2496 if test -n "$ac_tool_prefix"; then
2497   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2498   do
2499     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2500 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2501 echo "$as_me:2501: checking for $ac_word" >&5
2502 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2503 if test "${ac_cv_prog_CXX+set}" = set; then
2504   echo $ECHO_N "(cached) $ECHO_C" >&6
2505 else
2506   if test -n "$CXX"; then
2507   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2508 else
2509   ac_save_IFS=$IFS; IFS=$ac_path_separator
2510 ac_dummy="$PATH"
2511 for ac_dir in $ac_dummy; do
2512   IFS=$ac_save_IFS
2513   test -z "$ac_dir" && ac_dir=.
2514   $as_executable_p "$ac_dir/$ac_word" || continue
2515 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2516 echo "$as_me:2516: found $ac_dir/$ac_word" >&5
2517 break
2518 done
2519
2520 fi
2521 fi
2522 CXX=$ac_cv_prog_CXX
2523 if test -n "$CXX"; then
2524   echo "$as_me:2524: result: $CXX" >&5
2525 echo "${ECHO_T}$CXX" >&6
2526 else
2527   echo "$as_me:2527: result: no" >&5
2528 echo "${ECHO_T}no" >&6
2529 fi
2530
2531     test -n "$CXX" && break
2532   done
2533 fi
2534 if test -z "$CXX"; then
2535   ac_ct_CXX=$CXX
2536   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2537 do
2538   # Extract the first word of "$ac_prog", so it can be a program name with args.
2539 set dummy $ac_prog; ac_word=$2
2540 echo "$as_me:2540: checking for $ac_word" >&5
2541 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2542 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2543   echo $ECHO_N "(cached) $ECHO_C" >&6
2544 else
2545   if test -n "$ac_ct_CXX"; then
2546   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2547 else
2548   ac_save_IFS=$IFS; IFS=$ac_path_separator
2549 ac_dummy="$PATH"
2550 for ac_dir in $ac_dummy; do
2551   IFS=$ac_save_IFS
2552   test -z "$ac_dir" && ac_dir=.
2553   $as_executable_p "$ac_dir/$ac_word" || continue
2554 ac_cv_prog_ac_ct_CXX="$ac_prog"
2555 echo "$as_me:2555: found $ac_dir/$ac_word" >&5
2556 break
2557 done
2558
2559 fi
2560 fi
2561 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2562 if test -n "$ac_ct_CXX"; then
2563   echo "$as_me:2563: result: $ac_ct_CXX" >&5
2564 echo "${ECHO_T}$ac_ct_CXX" >&6
2565 else
2566   echo "$as_me:2566: result: no" >&5
2567 echo "${ECHO_T}no" >&6
2568 fi
2569
2570   test -n "$ac_ct_CXX" && break
2571 done
2572 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2573
2574   CXX=$ac_ct_CXX
2575 fi
2576
2577 # Provide some information about the compiler.
2578 echo "$as_me:2578:" \
2579      "checking for C++ compiler version" >&5
2580 ac_compiler=`set X $ac_compile; echo $2`
2581 { (eval echo "$as_me:2581: \"$ac_compiler --version </dev/null >&5\"") >&5
2582   (eval $ac_compiler --version </dev/null >&5) 2>&5
2583   ac_status=$?
2584   echo "$as_me:2584: \$? = $ac_status" >&5
2585   (exit $ac_status); }
2586 { (eval echo "$as_me:2586: \"$ac_compiler -v </dev/null >&5\"") >&5
2587   (eval $ac_compiler -v </dev/null >&5) 2>&5
2588   ac_status=$?
2589   echo "$as_me:2589: \$? = $ac_status" >&5
2590   (exit $ac_status); }
2591 { (eval echo "$as_me:2591: \"$ac_compiler -V </dev/null >&5\"") >&5
2592   (eval $ac_compiler -V </dev/null >&5) 2>&5
2593   ac_status=$?
2594   echo "$as_me:2594: \$? = $ac_status" >&5
2595   (exit $ac_status); }
2596
2597 echo "$as_me:2597: checking whether we are using the GNU C++ compiler" >&5
2598 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2599 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2600   echo $ECHO_N "(cached) $ECHO_C" >&6
2601 else
2602   cat >conftest.$ac_ext <<_ACEOF
2603 #line 2603 "configure"
2604 #include "confdefs.h"
2605
2606 int
2607 main ()
2608 {
2609 #ifndef __GNUC__
2610        choke me
2611 #endif
2612
2613   ;
2614   return 0;
2615 }
2616 _ACEOF
2617 rm -f conftest.$ac_objext
2618 if { (eval echo "$as_me:2618: \"$ac_compile\"") >&5
2619   (eval $ac_compile) 2>&5
2620   ac_status=$?
2621   echo "$as_me:2621: \$? = $ac_status" >&5
2622   (exit $ac_status); } &&
2623          { ac_try='test -s conftest.$ac_objext'
2624   { (eval echo "$as_me:2624: \"$ac_try\"") >&5
2625   (eval $ac_try) 2>&5
2626   ac_status=$?
2627   echo "$as_me:2627: \$? = $ac_status" >&5
2628   (exit $ac_status); }; }; then
2629   ac_compiler_gnu=yes
2630 else
2631   echo "$as_me: failed program was:" >&5
2632 cat conftest.$ac_ext >&5
2633 ac_compiler_gnu=no
2634 fi
2635 rm -f conftest.$ac_objext conftest.$ac_ext
2636 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2637
2638 fi
2639 echo "$as_me:2639: result: $ac_cv_cxx_compiler_gnu" >&5
2640 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2641 GXX=`test $ac_compiler_gnu = yes && echo yes`
2642 ac_test_CXXFLAGS=${CXXFLAGS+set}
2643 ac_save_CXXFLAGS=$CXXFLAGS
2644 CXXFLAGS="-g"
2645 echo "$as_me:2645: checking whether $CXX accepts -g" >&5
2646 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2647 if test "${ac_cv_prog_cxx_g+set}" = set; then
2648   echo $ECHO_N "(cached) $ECHO_C" >&6
2649 else
2650   cat >conftest.$ac_ext <<_ACEOF
2651 #line 2651 "configure"
2652 #include "confdefs.h"
2653
2654 int
2655 main ()
2656 {
2657
2658   ;
2659   return 0;
2660 }
2661 _ACEOF
2662 rm -f conftest.$ac_objext
2663 if { (eval echo "$as_me:2663: \"$ac_compile\"") >&5
2664   (eval $ac_compile) 2>&5
2665   ac_status=$?
2666   echo "$as_me:2666: \$? = $ac_status" >&5
2667   (exit $ac_status); } &&
2668          { ac_try='test -s conftest.$ac_objext'
2669   { (eval echo "$as_me:2669: \"$ac_try\"") >&5
2670   (eval $ac_try) 2>&5
2671   ac_status=$?
2672   echo "$as_me:2672: \$? = $ac_status" >&5
2673   (exit $ac_status); }; }; then
2674   ac_cv_prog_cxx_g=yes
2675 else
2676   echo "$as_me: failed program was:" >&5
2677 cat conftest.$ac_ext >&5
2678 ac_cv_prog_cxx_g=no
2679 fi
2680 rm -f conftest.$ac_objext conftest.$ac_ext
2681 fi
2682 echo "$as_me:2682: result: $ac_cv_prog_cxx_g" >&5
2683 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2684 if test "$ac_test_CXXFLAGS" = set; then
2685   CXXFLAGS=$ac_save_CXXFLAGS
2686 elif test $ac_cv_prog_cxx_g = yes; then
2687   if test "$GXX" = yes; then
2688     CXXFLAGS="-g -O2"
2689   else
2690     CXXFLAGS="-g"
2691   fi
2692 else
2693   if test "$GXX" = yes; then
2694     CXXFLAGS="-O2"
2695   else
2696     CXXFLAGS=
2697   fi
2698 fi
2699 for ac_declaration in \
2700    ''\
2701    '#include <stdlib.h>' \
2702    'extern "C" void std::exit (int) throw (); using std::exit;' \
2703    'extern "C" void std::exit (int); using std::exit;' \
2704    'extern "C" void exit (int) throw ();' \
2705    'extern "C" void exit (int);' \
2706    'void exit (int);'
2707 do
2708   cat >conftest.$ac_ext <<_ACEOF
2709 #line 2709 "configure"
2710 #include "confdefs.h"
2711 #include <stdlib.h>
2712 $ac_declaration
2713 int
2714 main ()
2715 {
2716 exit (42);
2717   ;
2718   return 0;
2719 }
2720 _ACEOF
2721 rm -f conftest.$ac_objext
2722 if { (eval echo "$as_me:2722: \"$ac_compile\"") >&5
2723   (eval $ac_compile) 2>&5
2724   ac_status=$?
2725   echo "$as_me:2725: \$? = $ac_status" >&5
2726   (exit $ac_status); } &&
2727          { ac_try='test -s conftest.$ac_objext'
2728   { (eval echo "$as_me:2728: \"$ac_try\"") >&5
2729   (eval $ac_try) 2>&5
2730   ac_status=$?
2731   echo "$as_me:2731: \$? = $ac_status" >&5
2732   (exit $ac_status); }; }; then
2733   :
2734 else
2735   echo "$as_me: failed program was:" >&5
2736 cat conftest.$ac_ext >&5
2737 continue
2738 fi
2739 rm -f conftest.$ac_objext conftest.$ac_ext
2740   cat >conftest.$ac_ext <<_ACEOF
2741 #line 2741 "configure"
2742 #include "confdefs.h"
2743 $ac_declaration
2744 int
2745 main ()
2746 {
2747 exit (42);
2748   ;
2749   return 0;
2750 }
2751 _ACEOF
2752 rm -f conftest.$ac_objext
2753 if { (eval echo "$as_me:2753: \"$ac_compile\"") >&5
2754   (eval $ac_compile) 2>&5
2755   ac_status=$?
2756   echo "$as_me:2756: \$? = $ac_status" >&5
2757   (exit $ac_status); } &&
2758          { ac_try='test -s conftest.$ac_objext'
2759   { (eval echo "$as_me:2759: \"$ac_try\"") >&5
2760   (eval $ac_try) 2>&5
2761   ac_status=$?
2762   echo "$as_me:2762: \$? = $ac_status" >&5
2763   (exit $ac_status); }; }; then
2764   break
2765 else
2766   echo "$as_me: failed program was:" >&5
2767 cat conftest.$ac_ext >&5
2768 fi
2769 rm -f conftest.$ac_objext conftest.$ac_ext
2770 done
2771 rm -rf conftest*
2772 if test -n "$ac_declaration"; then
2773   echo '#ifdef __cplusplus' >>confdefs.h
2774   echo $ac_declaration      >>confdefs.h
2775   echo '#endif'             >>confdefs.h
2776 fi
2777
2778 ac_ext=c
2779 ac_cpp='$CPP $CPPFLAGS'
2780 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2781 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2782 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2783 ac_main_return=return
2784
2785                 # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2786         if test "$CXX" = "g++" ; then
2787                 # Extract the first word of "g++", so it can be a program name with args.
2788 set dummy g++; ac_word=$2
2789 echo "$as_me:2789: checking for $ac_word" >&5
2790 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2791 if test "${ac_cv_path_CXX+set}" = set; then
2792   echo $ECHO_N "(cached) $ECHO_C" >&6
2793 else
2794   case $CXX in
2795   [\\/]* | ?:[\\/]*)
2796   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2797   ;;
2798   *)
2799   ac_save_IFS=$IFS; IFS=$ac_path_separator
2800 ac_dummy="$PATH"
2801 for ac_dir in $ac_dummy; do
2802   IFS=$ac_save_IFS
2803   test -z "$ac_dir" && ac_dir=.
2804   if $as_executable_p "$ac_dir/$ac_word"; then
2805    ac_cv_path_CXX="$ac_dir/$ac_word"
2806    echo "$as_me:2806: found $ac_dir/$ac_word" >&5
2807    break
2808 fi
2809 done
2810
2811   ;;
2812 esac
2813 fi
2814 CXX=$ac_cv_path_CXX
2815
2816 if test -n "$CXX"; then
2817   echo "$as_me:2817: result: $CXX" >&5
2818 echo "${ECHO_T}$CXX" >&6
2819 else
2820   echo "$as_me:2820: result: no" >&5
2821 echo "${ECHO_T}no" >&6
2822 fi
2823
2824         fi
2825         case "x$CXX" in #(vi
2826         x|xg++)
2827                 { echo "$as_me:2827: WARNING: You don't have any C++ compiler, too bad" >&5
2828 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2829                 cf_with_cxx=no; CXX=""; GXX="";
2830                 ;;
2831         esac
2832 fi
2833
2834 GXX_VERSION=none
2835 if test "$GXX" = yes; then
2836         echo "$as_me:2836: checking version of ${CXX:-g++}" >&5
2837 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2838         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2839         test -z "$GXX_VERSION" && GXX_VERSION=unknown
2840         echo "$as_me:2840: result: $GXX_VERSION" >&5
2841 echo "${ECHO_T}$GXX_VERSION" >&6
2842 fi
2843
2844 case $GXX_VERSION in
2845 1*|2.[0-6]*)
2846         # GXX=""; CXX=""; ac_cv_prog_gxx=no
2847         # cf_cxx_library=no
2848         { echo "$as_me:2848: WARNING: templates do not work" >&5
2849 echo "$as_me: WARNING: templates do not work" >&2;}
2850         ;;
2851 esac
2852
2853 echo "$as_me:2853: checking if you want to build C++ binding and demo" >&5
2854 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
2855
2856 # Check whether --with-cxx-binding or --without-cxx-binding was given.
2857 if test "${with_cxx_binding+set}" = set; then
2858   withval="$with_cxx_binding"
2859   cf_with_cxx_binding=$withval
2860 else
2861   cf_with_cxx_binding=$cf_with_cxx
2862 fi;
2863 echo "$as_me:2863: result: $cf_with_cxx_binding" >&5
2864 echo "${ECHO_T}$cf_with_cxx_binding" >&6
2865
2866 echo "$as_me:2866: checking if you want to build with Ada95" >&5
2867 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
2868 echo "$as_me:2868: result: $cf_with_ada" >&5
2869 echo "${ECHO_T}$cf_with_ada" >&6
2870
2871 echo "$as_me:2871: checking if you want to install terminal database" >&5
2872 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
2873
2874 # Check whether --enable-db-install or --disable-db-install was given.
2875 if test "${enable_db_install+set}" = set; then
2876   enableval="$enable_db_install"
2877   cf_with_db_install=$enableval
2878 else
2879   cf_with_db_install=yes
2880 fi;
2881 echo "$as_me:2881: result: $cf_with_db_install" >&5
2882 echo "${ECHO_T}$cf_with_db_install" >&6
2883
2884 echo "$as_me:2884: checking if you want to install manpages" >&5
2885 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
2886
2887 # Check whether --with-manpages or --without-manpages was given.
2888 if test "${with_manpages+set}" = set; then
2889   withval="$with_manpages"
2890   cf_with_manpages=$withval
2891 else
2892   cf_with_manpages=yes
2893 fi;
2894 echo "$as_me:2894: result: $cf_with_manpages" >&5
2895 echo "${ECHO_T}$cf_with_manpages" >&6
2896
2897 echo "$as_me:2897: checking if you want to build programs such as tic" >&5
2898 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
2899
2900 # Check whether --with-progs or --without-progs was given.
2901 if test "${with_progs+set}" = set; then
2902   withval="$with_progs"
2903   cf_with_progs=$withval
2904 else
2905   cf_with_progs=yes
2906 fi;
2907 echo "$as_me:2907: result: $cf_with_progs" >&5
2908 echo "${ECHO_T}$cf_with_progs" >&6
2909
2910 echo "$as_me:2910: checking if you want to build test-programs" >&5
2911 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2912
2913 # Check whether --with-tests or --without-tests was given.
2914 if test "${with_tests+set}" = set; then
2915   withval="$with_tests"
2916   cf_with_tests=$withval
2917 else
2918   cf_with_tests=yes
2919 fi;
2920 echo "$as_me:2920: result: $cf_with_tests" >&5
2921 echo "${ECHO_T}$cf_with_tests" >&6
2922
2923 echo "$as_me:2923: checking if you wish to install curses.h" >&5
2924 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
2925
2926 # Check whether --with-curses-h or --without-curses-h was given.
2927 if test "${with_curses_h+set}" = set; then
2928   withval="$with_curses_h"
2929   with_curses_h=$withval
2930 else
2931   with_curses_h=yes
2932 fi;
2933 echo "$as_me:2933: result: $with_curses_h" >&5
2934 echo "${ECHO_T}$with_curses_h" >&6
2935
2936 modules_to_build="ncurses"
2937 if test "X$cf_with_progs" != Xno ; then
2938 modules_to_build="$modules_to_build progs tack"
2939 fi
2940 modules_to_build="$modules_to_build panel menu form"
2941
2942 test "$program_prefix" != NONE &&
2943   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2944 # Use a double $ so make ignores it.
2945 test "$program_suffix" != NONE &&
2946   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2947 # Double any \ or $.  echo might interpret backslashes.
2948 # By default was `s,x,x', remove it if useless.
2949 cat <<\_ACEOF >conftest.sed
2950 s/[\\$]/&&/g;s/;s,x,x,$//
2951 _ACEOF
2952 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2953 rm conftest.sed
2954
2955 for ac_prog in mawk gawk nawk awk
2956 do
2957   # Extract the first word of "$ac_prog", so it can be a program name with args.
2958 set dummy $ac_prog; ac_word=$2
2959 echo "$as_me:2959: checking for $ac_word" >&5
2960 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2961 if test "${ac_cv_prog_AWK+set}" = set; then
2962   echo $ECHO_N "(cached) $ECHO_C" >&6
2963 else
2964   if test -n "$AWK"; then
2965   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2966 else
2967   ac_save_IFS=$IFS; IFS=$ac_path_separator
2968 ac_dummy="$PATH"
2969 for ac_dir in $ac_dummy; do
2970   IFS=$ac_save_IFS
2971   test -z "$ac_dir" && ac_dir=.
2972   $as_executable_p "$ac_dir/$ac_word" || continue
2973 ac_cv_prog_AWK="$ac_prog"
2974 echo "$as_me:2974: found $ac_dir/$ac_word" >&5
2975 break
2976 done
2977
2978 fi
2979 fi
2980 AWK=$ac_cv_prog_AWK
2981 if test -n "$AWK"; then
2982   echo "$as_me:2982: result: $AWK" >&5
2983 echo "${ECHO_T}$AWK" >&6
2984 else
2985   echo "$as_me:2985: result: no" >&5
2986 echo "${ECHO_T}no" >&6
2987 fi
2988
2989   test -n "$AWK" && break
2990 done
2991
2992 test -z "$AWK" && { { echo "$as_me:2992: error: No awk program found" >&5
2993 echo "$as_me: error: No awk program found" >&2;}
2994    { (exit 1); exit 1; }; }
2995
2996 echo "$as_me:2996: checking for egrep" >&5
2997 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2998 if test "${ac_cv_prog_egrep+set}" = set; then
2999   echo $ECHO_N "(cached) $ECHO_C" >&6
3000 else
3001   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3002     then ac_cv_prog_egrep='grep -E'
3003     else ac_cv_prog_egrep='egrep'
3004     fi
3005 fi
3006 echo "$as_me:3006: result: $ac_cv_prog_egrep" >&5
3007 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3008  EGREP=$ac_cv_prog_egrep
3009
3010 test -z "$EGREP" && { { echo "$as_me:3010: error: No egrep program found" >&5
3011 echo "$as_me: error: No egrep program found" >&2;}
3012    { (exit 1); exit 1; }; }
3013
3014 # Find a good install program.  We prefer a C program (faster),
3015 # so one script is as good as another.  But avoid the broken or
3016 # incompatible versions:
3017 # SysV /etc/install, /usr/sbin/install
3018 # SunOS /usr/etc/install
3019 # IRIX /sbin/install
3020 # AIX /bin/install
3021 # AmigaOS /C/install, which installs bootblocks on floppy discs
3022 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3023 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3024 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3025 # ./install, which can be erroneously created by make from ./install.sh.
3026 echo "$as_me:3026: checking for a BSD compatible install" >&5
3027 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3028 if test -z "$INSTALL"; then
3029 if test "${ac_cv_path_install+set}" = set; then
3030   echo $ECHO_N "(cached) $ECHO_C" >&6
3031 else
3032     ac_save_IFS=$IFS; IFS=$ac_path_separator
3033   for ac_dir in $PATH; do
3034     IFS=$ac_save_IFS
3035     # Account for people who put trailing slashes in PATH elements.
3036     case $ac_dir/ in
3037     / | ./ | .// | /cC/* \
3038     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3039     | /usr/ucb/* ) ;;
3040     *)
3041       # OSF1 and SCO ODT 3.0 have their own names for install.
3042       # Don't use installbsd from OSF since it installs stuff as root
3043       # by default.
3044       for ac_prog in ginstall scoinst install; do
3045         if $as_executable_p "$ac_dir/$ac_prog"; then
3046           if test $ac_prog = install &&
3047             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3048             # AIX install.  It has an incompatible calling convention.
3049             :
3050           elif test $ac_prog = install &&
3051             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3052             # program-specific install script used by HP pwplus--don't use.
3053             :
3054           else
3055             ac_cv_path_install="$ac_dir/$ac_prog -c"
3056             break 2
3057           fi
3058         fi
3059       done
3060       ;;
3061     esac
3062   done
3063
3064 fi
3065   if test "${ac_cv_path_install+set}" = set; then
3066     INSTALL=$ac_cv_path_install
3067   else
3068     # As a last resort, use the slow shell script.  We don't cache a
3069     # path for INSTALL within a source directory, because that will
3070     # break other packages using the cache if that directory is
3071     # removed, or if the path is relative.
3072     INSTALL=$ac_install_sh
3073   fi
3074 fi
3075 echo "$as_me:3075: result: $INSTALL" >&5
3076 echo "${ECHO_T}$INSTALL" >&6
3077
3078 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3079 # It thinks the first close brace ends the variable substitution.
3080 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3081
3082 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3083
3084 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3085
3086 case $INSTALL in
3087 /*)
3088   ;;
3089 *)
3090   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3091   test -z "$cf_dir" && cf_dir=.
3092   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3093   ;;
3094 esac
3095
3096 for ac_prog in tdlint lint alint splint lclint
3097 do
3098   # Extract the first word of "$ac_prog", so it can be a program name with args.
3099 set dummy $ac_prog; ac_word=$2
3100 echo "$as_me:3100: checking for $ac_word" >&5
3101 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3102 if test "${ac_cv_prog_LINT+set}" = set; then
3103   echo $ECHO_N "(cached) $ECHO_C" >&6
3104 else
3105   if test -n "$LINT"; then
3106   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3107 else
3108   ac_save_IFS=$IFS; IFS=$ac_path_separator
3109 ac_dummy="$PATH"
3110 for ac_dir in $ac_dummy; do
3111   IFS=$ac_save_IFS
3112   test -z "$ac_dir" && ac_dir=.
3113   $as_executable_p "$ac_dir/$ac_word" || continue
3114 ac_cv_prog_LINT="$ac_prog"
3115 echo "$as_me:3115: found $ac_dir/$ac_word" >&5
3116 break
3117 done
3118
3119 fi
3120 fi
3121 LINT=$ac_cv_prog_LINT
3122 if test -n "$LINT"; then
3123   echo "$as_me:3123: result: $LINT" >&5
3124 echo "${ECHO_T}$LINT" >&6
3125 else
3126   echo "$as_me:3126: result: no" >&5
3127 echo "${ECHO_T}no" >&6
3128 fi
3129
3130   test -n "$LINT" && break
3131 done
3132
3133 echo "$as_me:3133: checking whether ln -s works" >&5
3134 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3135 LN_S=$as_ln_s
3136 if test "$LN_S" = "ln -s"; then
3137   echo "$as_me:3137: result: yes" >&5
3138 echo "${ECHO_T}yes" >&6
3139 else
3140   echo "$as_me:3140: result: no, using $LN_S" >&5
3141 echo "${ECHO_T}no, using $LN_S" >&6
3142 fi
3143
3144 echo "$as_me:3144: checking if $LN_S -f options work" >&5
3145 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3146
3147 rm -f conf$$.src conf$$dst
3148 echo >conf$$.dst
3149 echo first >conf$$.src
3150 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3151         cf_prog_ln_sf=yes
3152 else
3153         cf_prog_ln_sf=no
3154 fi
3155 rm -f conf$$.dst conf$$src
3156 echo "$as_me:3156: result: $cf_prog_ln_sf" >&5
3157 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3158
3159 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3160
3161 echo "$as_me:3161: checking for long file names" >&5
3162 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3163 if test "${ac_cv_sys_long_file_names+set}" = set; then
3164   echo $ECHO_N "(cached) $ECHO_C" >&6
3165 else
3166   ac_cv_sys_long_file_names=yes
3167 # Test for long file names in all the places we know might matter:
3168 #      .                the current directory, where building will happen
3169 #      $prefix/lib      where we will be installing things
3170 #      $exec_prefix/lib likewise
3171 # eval it to expand exec_prefix.
3172 #      $TMPDIR          if set, where it might want to write temporary files
3173 # if $TMPDIR is not set:
3174 #      /tmp             where it might want to write temporary files
3175 #      /var/tmp         likewise
3176 #      /usr/tmp         likewise
3177 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3178   ac_tmpdirs=$TMPDIR
3179 else
3180   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3181 fi
3182 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3183   test -d $ac_dir || continue
3184   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3185   ac_xdir=$ac_dir/cf$$
3186   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3187   ac_tf1=$ac_xdir/conftest9012345
3188   ac_tf2=$ac_xdir/conftest9012346
3189   (echo 1 >$ac_tf1) 2>/dev/null
3190   (echo 2 >$ac_tf2) 2>/dev/null
3191   ac_val=`cat $ac_tf1 2>/dev/null`
3192   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3193     ac_cv_sys_long_file_names=no
3194     rm -rf $ac_xdir 2>/dev/null
3195     break
3196   fi
3197   rm -rf $ac_xdir 2>/dev/null
3198 done
3199 fi
3200 echo "$as_me:3200: result: $ac_cv_sys_long_file_names" >&5
3201 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3202 if test $ac_cv_sys_long_file_names = yes; then
3203
3204 cat >>confdefs.h <<\EOF
3205 #define HAVE_LONG_FILE_NAMES 1
3206 EOF
3207
3208 fi
3209
3210 # if we find pkg-config, check if we should install the ".pc" files.
3211
3212 echo "$as_me:3212: checking if you want to use pkg-config" >&5
3213 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3214
3215 # Check whether --with-pkg-config or --without-pkg-config was given.
3216 if test "${with_pkg_config+set}" = set; then
3217   withval="$with_pkg_config"
3218   cf_pkg_config=$withval
3219 else
3220   cf_pkg_config=yes
3221 fi;
3222 echo "$as_me:3222: result: $cf_pkg_config" >&5
3223 echo "${ECHO_T}$cf_pkg_config" >&6
3224
3225 case $cf_pkg_config in #(vi
3226 no) #(vi
3227         PKG_CONFIG=none
3228         ;;
3229 yes) #(vi
3230
3231 if test -n "$ac_tool_prefix"; then
3232   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3233 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3234 echo "$as_me:3234: checking for $ac_word" >&5
3235 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3236 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3237   echo $ECHO_N "(cached) $ECHO_C" >&6
3238 else
3239   case $PKG_CONFIG in
3240   [\\/]* | ?:[\\/]*)
3241   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3242   ;;
3243   *)
3244   ac_save_IFS=$IFS; IFS=$ac_path_separator
3245 ac_dummy="$PATH"
3246 for ac_dir in $ac_dummy; do
3247   IFS=$ac_save_IFS
3248   test -z "$ac_dir" && ac_dir=.
3249   if $as_executable_p "$ac_dir/$ac_word"; then
3250    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3251    echo "$as_me:3251: found $ac_dir/$ac_word" >&5
3252    break
3253 fi
3254 done
3255
3256   ;;
3257 esac
3258 fi
3259 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3260
3261 if test -n "$PKG_CONFIG"; then
3262   echo "$as_me:3262: result: $PKG_CONFIG" >&5
3263 echo "${ECHO_T}$PKG_CONFIG" >&6
3264 else
3265   echo "$as_me:3265: result: no" >&5
3266 echo "${ECHO_T}no" >&6
3267 fi
3268
3269 fi
3270 if test -z "$ac_cv_path_PKG_CONFIG"; then
3271   ac_pt_PKG_CONFIG=$PKG_CONFIG
3272   # Extract the first word of "pkg-config", so it can be a program name with args.
3273 set dummy pkg-config; ac_word=$2
3274 echo "$as_me:3274: checking for $ac_word" >&5
3275 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3276 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3277   echo $ECHO_N "(cached) $ECHO_C" >&6
3278 else
3279   case $ac_pt_PKG_CONFIG in
3280   [\\/]* | ?:[\\/]*)
3281   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3282   ;;
3283   *)
3284   ac_save_IFS=$IFS; IFS=$ac_path_separator
3285 ac_dummy="$PATH"
3286 for ac_dir in $ac_dummy; do
3287   IFS=$ac_save_IFS
3288   test -z "$ac_dir" && ac_dir=.
3289   if $as_executable_p "$ac_dir/$ac_word"; then
3290    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3291    echo "$as_me:3291: found $ac_dir/$ac_word" >&5
3292    break
3293 fi
3294 done
3295
3296   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3297   ;;
3298 esac
3299 fi
3300 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3301
3302 if test -n "$ac_pt_PKG_CONFIG"; then
3303   echo "$as_me:3303: result: $ac_pt_PKG_CONFIG" >&5
3304 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3305 else
3306   echo "$as_me:3306: result: no" >&5
3307 echo "${ECHO_T}no" >&6
3308 fi
3309
3310   PKG_CONFIG=$ac_pt_PKG_CONFIG
3311 else
3312   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3313 fi
3314
3315         ;;
3316 *)
3317         PKG_CONFIG=$withval
3318         ;;
3319 esac
3320
3321 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3322 if test "$PKG_CONFIG" != none ; then
3323
3324 if test "x$prefix" != xNONE; then
3325   cf_path_syntax="$prefix"
3326 else
3327   cf_path_syntax="$ac_default_prefix"
3328 fi
3329
3330 case ".$PKG_CONFIG" in #(vi
3331 .\$\(*\)*|.\'*\'*) #(vi
3332   ;;
3333 ..|./*|.\\*) #(vi
3334   ;;
3335 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3336   ;;
3337 .\${*prefix}*|.\${*dir}*) #(vi
3338   eval PKG_CONFIG="$PKG_CONFIG"
3339   case ".$PKG_CONFIG" in #(vi
3340   .NONE/*)
3341     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3342     ;;
3343   esac
3344   ;; #(vi
3345 .no|.NONE/*)
3346   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3347   ;;
3348 *)
3349   { { echo "$as_me:3349: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3350 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3351    { (exit 1); exit 1; }; }
3352   ;;
3353 esac
3354
3355 fi
3356
3357 if test "$PKG_CONFIG" != none ; then
3358         echo "$as_me:3358: checking for $PKG_CONFIG library directory" >&5
3359 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3360
3361 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3362 if test "${with_pkg_config_libdir+set}" = set; then
3363   withval="$with_pkg_config_libdir"
3364   PKG_CONFIG_LIBDIR=$withval
3365 else
3366   PKG_CONFIG_LIBDIR=yes
3367 fi;
3368
3369         case x$PKG_CONFIG_LIBDIR in #(vi
3370         x/*) #(vi
3371                 ;;
3372         xyes) #(vi
3373                 # look for the library directory using the same prefix as the executable
3374                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3375                 case x`(arch) 2>/dev/null` in #(vi
3376                 *64) #(vi
3377                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3378                         do
3379                                 if test -d $cf_config/pkgconfig
3380                                 then
3381                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3382                                         break
3383                                 fi
3384                         done
3385                         ;;
3386                 *)
3387                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3388                         ;;
3389                 esac
3390                 ;;
3391         *)
3392                 ;;
3393         esac
3394
3395         echo "$as_me:3395: result: $PKG_CONFIG_LIBDIR" >&5
3396 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3397 fi
3398
3399 if test "$PKG_CONFIG" != none ; then
3400         echo "$as_me:3400: checking if we should install .pc files for $PKG_CONFIG" >&5
3401 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3402
3403 # Check whether --enable-pc-files or --disable-pc-files was given.
3404 if test "${enable_pc_files+set}" = set; then
3405   enableval="$enable_pc_files"
3406   enable_pc_files=$enableval
3407 else
3408   enable_pc_files=no
3409 fi;
3410         echo "$as_me:3410: result: $enable_pc_files" >&5
3411 echo "${ECHO_T}$enable_pc_files" >&6
3412         if test "$enable_pc_files" != no
3413         then
3414
3415 if test "x$prefix" != xNONE; then
3416   cf_path_syntax="$prefix"
3417 else
3418   cf_path_syntax="$ac_default_prefix"
3419 fi
3420
3421 case ".$PKG_CONFIG_LIBDIR" in #(vi
3422 .\$\(*\)*|.\'*\'*) #(vi
3423   ;;
3424 ..|./*|.\\*) #(vi
3425   ;;
3426 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3427   ;;
3428 .\${*prefix}*|.\${*dir}*) #(vi
3429   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3430   case ".$PKG_CONFIG_LIBDIR" in #(vi
3431   .NONE/*)
3432     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3433     ;;
3434   esac
3435   ;; #(vi
3436 .no|.NONE/*)
3437   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3438   ;;
3439 *)
3440   { { echo "$as_me:3440: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3441 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3442    { (exit 1); exit 1; }; }
3443   ;;
3444 esac
3445
3446         fi
3447 else
3448         enable_pc_files=no
3449 fi
3450
3451 echo "$as_me:3451: checking if we should assume mixed-case filenames" >&5
3452 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3453
3454 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3455 if test "${enable_mixed_case+set}" = set; then
3456   enableval="$enable_mixed_case"
3457   enable_mixedcase=$enableval
3458 else
3459   enable_mixedcase=auto
3460 fi;
3461 echo "$as_me:3461: result: $enable_mixedcase" >&5
3462 echo "${ECHO_T}$enable_mixedcase" >&6
3463 if test "$enable_mixedcase" = "auto" ; then
3464
3465 echo "$as_me:3465: checking if filesystem supports mixed-case filenames" >&5
3466 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3467 if test "${cf_cv_mixedcase+set}" = set; then
3468   echo $ECHO_N "(cached) $ECHO_C" >&6
3469 else
3470
3471 if test "$cross_compiling" = yes ; then
3472         case $target_alias in #(vi
3473         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
3474                 cf_cv_mixedcase=no
3475                 ;;
3476         *)
3477                 cf_cv_mixedcase=yes
3478                 ;;
3479         esac
3480 else
3481         rm -f conftest CONFTEST
3482         echo test >conftest
3483         if test -f CONFTEST ; then
3484                 cf_cv_mixedcase=no
3485         else
3486                 cf_cv_mixedcase=yes
3487         fi
3488         rm -f conftest CONFTEST
3489 fi
3490
3491 fi
3492 echo "$as_me:3492: result: $cf_cv_mixedcase" >&5
3493 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3494 test "$cf_cv_mixedcase" = yes &&
3495 cat >>confdefs.h <<\EOF
3496 #define MIXEDCASE_FILENAMES 1
3497 EOF
3498
3499 else
3500     cf_cv_mixedcase=$enable_mixedcase
3501     if test "x$enable_mixedcase" = "xyes" ; then
3502
3503 cat >>confdefs.h <<\EOF
3504 #define MIXEDCASE_FILENAMES 1
3505 EOF
3506
3507     fi
3508 fi
3509
3510 # do this after mixed-case option (tags/TAGS is not as important as tic).
3511 echo "$as_me:3511: checking whether ${MAKE-make} sets \${MAKE}" >&5
3512 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3513 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3514 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3515   echo $ECHO_N "(cached) $ECHO_C" >&6
3516 else
3517   cat >conftest.make <<\EOF
3518 all:
3519         @echo 'ac_maketemp="${MAKE}"'
3520 EOF
3521 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3522 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3523 if test -n "$ac_maketemp"; then
3524   eval ac_cv_prog_make_${ac_make}_set=yes
3525 else
3526   eval ac_cv_prog_make_${ac_make}_set=no
3527 fi
3528 rm -f conftest.make
3529 fi
3530 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3531   echo "$as_me:3531: result: yes" >&5
3532 echo "${ECHO_T}yes" >&6
3533   SET_MAKE=
3534 else
3535   echo "$as_me:3535: result: no" >&5
3536 echo "${ECHO_T}no" >&6
3537   SET_MAKE="MAKE=${MAKE-make}"
3538 fi
3539
3540 for ac_prog in exctags ctags
3541 do
3542   # Extract the first word of "$ac_prog", so it can be a program name with args.
3543 set dummy $ac_prog; ac_word=$2
3544 echo "$as_me:3544: checking for $ac_word" >&5
3545 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3546 if test "${ac_cv_prog_CTAGS+set}" = set; then
3547   echo $ECHO_N "(cached) $ECHO_C" >&6
3548 else
3549   if test -n "$CTAGS"; then
3550   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3551 else
3552   ac_save_IFS=$IFS; IFS=$ac_path_separator
3553 ac_dummy="$PATH"
3554 for ac_dir in $ac_dummy; do
3555   IFS=$ac_save_IFS
3556   test -z "$ac_dir" && ac_dir=.
3557   $as_executable_p "$ac_dir/$ac_word" || continue
3558 ac_cv_prog_CTAGS="$ac_prog"
3559 echo "$as_me:3559: found $ac_dir/$ac_word" >&5
3560 break
3561 done
3562
3563 fi
3564 fi
3565 CTAGS=$ac_cv_prog_CTAGS
3566 if test -n "$CTAGS"; then
3567   echo "$as_me:3567: result: $CTAGS" >&5
3568 echo "${ECHO_T}$CTAGS" >&6
3569 else
3570   echo "$as_me:3570: result: no" >&5
3571 echo "${ECHO_T}no" >&6
3572 fi
3573
3574   test -n "$CTAGS" && break
3575 done
3576
3577 for ac_prog in exetags etags
3578 do
3579   # Extract the first word of "$ac_prog", so it can be a program name with args.
3580 set dummy $ac_prog; ac_word=$2
3581 echo "$as_me:3581: checking for $ac_word" >&5
3582 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3583 if test "${ac_cv_prog_ETAGS+set}" = set; then
3584   echo $ECHO_N "(cached) $ECHO_C" >&6
3585 else
3586   if test -n "$ETAGS"; then
3587   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3588 else
3589   ac_save_IFS=$IFS; IFS=$ac_path_separator
3590 ac_dummy="$PATH"
3591 for ac_dir in $ac_dummy; do
3592   IFS=$ac_save_IFS
3593   test -z "$ac_dir" && ac_dir=.
3594   $as_executable_p "$ac_dir/$ac_word" || continue
3595 ac_cv_prog_ETAGS="$ac_prog"
3596 echo "$as_me:3596: found $ac_dir/$ac_word" >&5
3597 break
3598 done
3599
3600 fi
3601 fi
3602 ETAGS=$ac_cv_prog_ETAGS
3603 if test -n "$ETAGS"; then
3604   echo "$as_me:3604: result: $ETAGS" >&5
3605 echo "${ECHO_T}$ETAGS" >&6
3606 else
3607   echo "$as_me:3607: result: no" >&5
3608 echo "${ECHO_T}no" >&6
3609 fi
3610
3611   test -n "$ETAGS" && break
3612 done
3613
3614 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3615 set dummy ${CTAGS:-ctags}; ac_word=$2
3616 echo "$as_me:3616: checking for $ac_word" >&5
3617 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3618 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3619   echo $ECHO_N "(cached) $ECHO_C" >&6
3620 else
3621   if test -n "$MAKE_LOWER_TAGS"; then
3622   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3623 else
3624   ac_save_IFS=$IFS; IFS=$ac_path_separator
3625 ac_dummy="$PATH"
3626 for ac_dir in $ac_dummy; do
3627   IFS=$ac_save_IFS
3628   test -z "$ac_dir" && ac_dir=.
3629   $as_executable_p "$ac_dir/$ac_word" || continue
3630 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3631 echo "$as_me:3631: found $ac_dir/$ac_word" >&5
3632 break
3633 done
3634
3635   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3636 fi
3637 fi
3638 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3639 if test -n "$MAKE_LOWER_TAGS"; then
3640   echo "$as_me:3640: result: $MAKE_LOWER_TAGS" >&5
3641 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3642 else
3643   echo "$as_me:3643: result: no" >&5
3644 echo "${ECHO_T}no" >&6
3645 fi
3646
3647 if test "$cf_cv_mixedcase" = yes ; then
3648         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3649 set dummy ${ETAGS:-etags}; ac_word=$2
3650 echo "$as_me:3650: checking for $ac_word" >&5
3651 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3652 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3653   echo $ECHO_N "(cached) $ECHO_C" >&6
3654 else
3655   if test -n "$MAKE_UPPER_TAGS"; then
3656   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3657 else
3658   ac_save_IFS=$IFS; IFS=$ac_path_separator
3659 ac_dummy="$PATH"
3660 for ac_dir in $ac_dummy; do
3661   IFS=$ac_save_IFS
3662   test -z "$ac_dir" && ac_dir=.
3663   $as_executable_p "$ac_dir/$ac_word" || continue
3664 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3665 echo "$as_me:3665: found $ac_dir/$ac_word" >&5
3666 break
3667 done
3668
3669   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3670 fi
3671 fi
3672 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3673 if test -n "$MAKE_UPPER_TAGS"; then
3674   echo "$as_me:3674: result: $MAKE_UPPER_TAGS" >&5
3675 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3676 else
3677   echo "$as_me:3677: result: no" >&5
3678 echo "${ECHO_T}no" >&6
3679 fi
3680
3681 else
3682         MAKE_UPPER_TAGS=no
3683 fi
3684
3685 if test "$MAKE_UPPER_TAGS" = yes ; then
3686         MAKE_UPPER_TAGS=
3687 else
3688         MAKE_UPPER_TAGS="#"
3689 fi
3690
3691 if test "$MAKE_LOWER_TAGS" = yes ; then
3692         MAKE_LOWER_TAGS=
3693 else
3694         MAKE_LOWER_TAGS="#"
3695 fi
3696
3697 echo "$as_me:3697: checking for makeflags variable" >&5
3698 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3699 if test "${cf_cv_makeflags+set}" = set; then
3700   echo $ECHO_N "(cached) $ECHO_C" >&6
3701 else
3702
3703         cf_cv_makeflags=''
3704         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3705         do
3706                 cat >cf_makeflags.tmp <<CF_EOF
3707 SHELL = /bin/sh
3708 all :
3709         @ echo '.$cf_option'
3710 CF_EOF
3711                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3712                 case "$cf_result" in
3713                 .*k|.*kw)
3714                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3715                         case "$cf_result" in
3716                         .*CC=*) cf_cv_makeflags=
3717                                 ;;
3718                         *)      cf_cv_makeflags=$cf_option
3719                                 ;;
3720                         esac
3721                         break
3722                         ;;
3723                 .-)     ;;
3724                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3725                         ;;
3726                 esac
3727         done
3728         rm -f cf_makeflags.tmp
3729
3730 fi
3731 echo "$as_me:3731: result: $cf_cv_makeflags" >&5
3732 echo "${ECHO_T}$cf_cv_makeflags" >&6
3733
3734 if test -n "$ac_tool_prefix"; then
3735   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3736 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3737 echo "$as_me:3737: checking for $ac_word" >&5
3738 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3739 if test "${ac_cv_prog_RANLIB+set}" = set; then
3740   echo $ECHO_N "(cached) $ECHO_C" >&6
3741 else
3742   if test -n "$RANLIB"; then
3743   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3744 else
3745   ac_save_IFS=$IFS; IFS=$ac_path_separator
3746 ac_dummy="$PATH"
3747 for ac_dir in $ac_dummy; do
3748   IFS=$ac_save_IFS
3749   test -z "$ac_dir" && ac_dir=.
3750   $as_executable_p "$ac_dir/$ac_word" || continue
3751 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3752 echo "$as_me:3752: found $ac_dir/$ac_word" >&5
3753 break
3754 done
3755
3756 fi
3757 fi
3758 RANLIB=$ac_cv_prog_RANLIB
3759 if test -n "$RANLIB"; then
3760   echo "$as_me:3760: result: $RANLIB" >&5
3761 echo "${ECHO_T}$RANLIB" >&6
3762 else
3763   echo "$as_me:3763: result: no" >&5
3764 echo "${ECHO_T}no" >&6
3765 fi
3766
3767 fi
3768 if test -z "$ac_cv_prog_RANLIB"; then
3769   ac_ct_RANLIB=$RANLIB
3770   # Extract the first word of "ranlib", so it can be a program name with args.
3771 set dummy ranlib; ac_word=$2
3772 echo "$as_me:3772: checking for $ac_word" >&5
3773 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3774 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3775   echo $ECHO_N "(cached) $ECHO_C" >&6
3776 else
3777   if test -n "$ac_ct_RANLIB"; then
3778   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3779 else
3780   ac_save_IFS=$IFS; IFS=$ac_path_separator
3781 ac_dummy="$PATH"
3782 for ac_dir in $ac_dummy; do
3783   IFS=$ac_save_IFS
3784   test -z "$ac_dir" && ac_dir=.
3785   $as_executable_p "$ac_dir/$ac_word" || continue
3786 ac_cv_prog_ac_ct_RANLIB="ranlib"
3787 echo "$as_me:3787: found $ac_dir/$ac_word" >&5
3788 break
3789 done
3790
3791   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3792 fi
3793 fi
3794 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3795 if test -n "$ac_ct_RANLIB"; then
3796   echo "$as_me:3796: result: $ac_ct_RANLIB" >&5
3797 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3798 else
3799   echo "$as_me:3799: result: no" >&5
3800 echo "${ECHO_T}no" >&6
3801 fi
3802
3803   RANLIB=$ac_ct_RANLIB
3804 else
3805   RANLIB="$ac_cv_prog_RANLIB"
3806 fi
3807
3808 if test -n "$ac_tool_prefix"; then
3809   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3810 set dummy ${ac_tool_prefix}ld; ac_word=$2
3811 echo "$as_me:3811: checking for $ac_word" >&5
3812 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3813 if test "${ac_cv_prog_LD+set}" = set; then
3814   echo $ECHO_N "(cached) $ECHO_C" >&6
3815 else
3816   if test -n "$LD"; then
3817   ac_cv_prog_LD="$LD" # Let the user override the test.
3818 else
3819   ac_save_IFS=$IFS; IFS=$ac_path_separator
3820 ac_dummy="$PATH"
3821 for ac_dir in $ac_dummy; do
3822   IFS=$ac_save_IFS
3823   test -z "$ac_dir" && ac_dir=.
3824   $as_executable_p "$ac_dir/$ac_word" || continue
3825 ac_cv_prog_LD="${ac_tool_prefix}ld"
3826 echo "$as_me:3826: found $ac_dir/$ac_word" >&5
3827 break
3828 done
3829
3830 fi
3831 fi
3832 LD=$ac_cv_prog_LD
3833 if test -n "$LD"; then
3834   echo "$as_me:3834: result: $LD" >&5
3835 echo "${ECHO_T}$LD" >&6
3836 else
3837   echo "$as_me:3837: result: no" >&5
3838 echo "${ECHO_T}no" >&6
3839 fi
3840
3841 fi
3842 if test -z "$ac_cv_prog_LD"; then
3843   ac_ct_LD=$LD
3844   # Extract the first word of "ld", so it can be a program name with args.
3845 set dummy ld; ac_word=$2
3846 echo "$as_me:3846: checking for $ac_word" >&5
3847 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3848 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3849   echo $ECHO_N "(cached) $ECHO_C" >&6
3850 else
3851   if test -n "$ac_ct_LD"; then
3852   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3853 else
3854   ac_save_IFS=$IFS; IFS=$ac_path_separator
3855 ac_dummy="$PATH"
3856 for ac_dir in $ac_dummy; do
3857   IFS=$ac_save_IFS
3858   test -z "$ac_dir" && ac_dir=.
3859   $as_executable_p "$ac_dir/$ac_word" || continue
3860 ac_cv_prog_ac_ct_LD="ld"
3861 echo "$as_me:3861: found $ac_dir/$ac_word" >&5
3862 break
3863 done
3864
3865   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3866 fi
3867 fi
3868 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3869 if test -n "$ac_ct_LD"; then
3870   echo "$as_me:3870: result: $ac_ct_LD" >&5
3871 echo "${ECHO_T}$ac_ct_LD" >&6
3872 else
3873   echo "$as_me:3873: result: no" >&5
3874 echo "${ECHO_T}no" >&6
3875 fi
3876
3877   LD=$ac_ct_LD
3878 else
3879   LD="$ac_cv_prog_LD"
3880 fi
3881
3882 if test -n "$ac_tool_prefix"; then
3883   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3884 set dummy ${ac_tool_prefix}ar; ac_word=$2
3885 echo "$as_me:3885: checking for $ac_word" >&5
3886 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3887 if test "${ac_cv_prog_AR+set}" = set; then
3888   echo $ECHO_N "(cached) $ECHO_C" >&6
3889 else
3890   if test -n "$AR"; then
3891   ac_cv_prog_AR="$AR" # Let the user override the test.
3892 else
3893   ac_save_IFS=$IFS; IFS=$ac_path_separator
3894 ac_dummy="$PATH"
3895 for ac_dir in $ac_dummy; do
3896   IFS=$ac_save_IFS
3897   test -z "$ac_dir" && ac_dir=.
3898   $as_executable_p "$ac_dir/$ac_word" || continue
3899 ac_cv_prog_AR="${ac_tool_prefix}ar"
3900 echo "$as_me:3900: found $ac_dir/$ac_word" >&5
3901 break
3902 done
3903
3904 fi
3905 fi
3906 AR=$ac_cv_prog_AR
3907 if test -n "$AR"; then
3908   echo "$as_me:3908: result: $AR" >&5
3909 echo "${ECHO_T}$AR" >&6
3910 else
3911   echo "$as_me:3911: result: no" >&5
3912 echo "${ECHO_T}no" >&6
3913 fi
3914
3915 fi
3916 if test -z "$ac_cv_prog_AR"; then
3917   ac_ct_AR=$AR
3918   # Extract the first word of "ar", so it can be a program name with args.
3919 set dummy ar; ac_word=$2
3920 echo "$as_me:3920: checking for $ac_word" >&5
3921 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3922 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3923   echo $ECHO_N "(cached) $ECHO_C" >&6
3924 else
3925   if test -n "$ac_ct_AR"; then
3926   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3927 else
3928   ac_save_IFS=$IFS; IFS=$ac_path_separator
3929 ac_dummy="$PATH"
3930 for ac_dir in $ac_dummy; do
3931   IFS=$ac_save_IFS
3932   test -z "$ac_dir" && ac_dir=.
3933   $as_executable_p "$ac_dir/$ac_word" || continue
3934 ac_cv_prog_ac_ct_AR="ar"
3935 echo "$as_me:3935: found $ac_dir/$ac_word" >&5
3936 break
3937 done
3938
3939   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3940 fi
3941 fi
3942 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3943 if test -n "$ac_ct_AR"; then
3944   echo "$as_me:3944: result: $ac_ct_AR" >&5
3945 echo "${ECHO_T}$ac_ct_AR" >&6
3946 else
3947   echo "$as_me:3947: result: no" >&5
3948 echo "${ECHO_T}no" >&6
3949 fi
3950
3951   AR=$ac_ct_AR
3952 else
3953   AR="$ac_cv_prog_AR"
3954 fi
3955
3956 if test -n "$ac_tool_prefix"; then
3957   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
3958 set dummy ${ac_tool_prefix}nm; ac_word=$2
3959 echo "$as_me:3959: checking for $ac_word" >&5
3960 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3961 if test "${ac_cv_prog_NM+set}" = set; then
3962   echo $ECHO_N "(cached) $ECHO_C" >&6
3963 else
3964   if test -n "$NM"; then
3965   ac_cv_prog_NM="$NM" # Let the user override the test.
3966 else
3967   ac_save_IFS=$IFS; IFS=$ac_path_separator
3968 ac_dummy="$PATH"
3969 for ac_dir in $ac_dummy; do
3970   IFS=$ac_save_IFS
3971   test -z "$ac_dir" && ac_dir=.
3972   $as_executable_p "$ac_dir/$ac_word" || continue
3973 ac_cv_prog_NM="${ac_tool_prefix}nm"
3974 echo "$as_me:3974: found $ac_dir/$ac_word" >&5
3975 break
3976 done
3977
3978 fi
3979 fi
3980 NM=$ac_cv_prog_NM
3981 if test -n "$NM"; then
3982   echo "$as_me:3982: result: $NM" >&5
3983 echo "${ECHO_T}$NM" >&6
3984 else
3985   echo "$as_me:3985: result: no" >&5
3986 echo "${ECHO_T}no" >&6
3987 fi
3988
3989 fi
3990 if test -z "$ac_cv_prog_NM"; then
3991   ac_ct_NM=$NM
3992   # Extract the first word of "nm", so it can be a program name with args.
3993 set dummy nm; ac_word=$2
3994 echo "$as_me:3994: checking for $ac_word" >&5
3995 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3996 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
3997   echo $ECHO_N "(cached) $ECHO_C" >&6
3998 else
3999   if test -n "$ac_ct_NM"; then
4000   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4001 else
4002   ac_save_IFS=$IFS; IFS=$ac_path_separator
4003 ac_dummy="$PATH"
4004 for ac_dir in $ac_dummy; do
4005   IFS=$ac_save_IFS
4006   test -z "$ac_dir" && ac_dir=.
4007   $as_executable_p "$ac_dir/$ac_word" || continue
4008 ac_cv_prog_ac_ct_NM="nm"
4009 echo "$as_me:4009: found $ac_dir/$ac_word" >&5
4010 break
4011 done
4012
4013   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4014 fi
4015 fi
4016 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4017 if test -n "$ac_ct_NM"; then
4018   echo "$as_me:4018: result: $ac_ct_NM" >&5
4019 echo "${ECHO_T}$ac_ct_NM" >&6
4020 else
4021   echo "$as_me:4021: result: no" >&5
4022 echo "${ECHO_T}no" >&6
4023 fi
4024
4025   NM=$ac_ct_NM
4026 else
4027   NM="$ac_cv_prog_NM"
4028 fi
4029
4030 if test -n "$ac_tool_prefix"; then
4031   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4032 set dummy ${ac_tool_prefix}ar; ac_word=$2
4033 echo "$as_me:4033: checking for $ac_word" >&5
4034 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4035 if test "${ac_cv_prog_AR+set}" = set; then
4036   echo $ECHO_N "(cached) $ECHO_C" >&6
4037 else
4038   if test -n "$AR"; then
4039   ac_cv_prog_AR="$AR" # Let the user override the test.
4040 else
4041   ac_save_IFS=$IFS; IFS=$ac_path_separator
4042 ac_dummy="$PATH"
4043 for ac_dir in $ac_dummy; do
4044   IFS=$ac_save_IFS
4045   test -z "$ac_dir" && ac_dir=.
4046   $as_executable_p "$ac_dir/$ac_word" || continue
4047 ac_cv_prog_AR="${ac_tool_prefix}ar"
4048 echo "$as_me:4048: found $ac_dir/$ac_word" >&5
4049 break
4050 done
4051
4052 fi
4053 fi
4054 AR=$ac_cv_prog_AR
4055 if test -n "$AR"; then
4056   echo "$as_me:4056: result: $AR" >&5
4057 echo "${ECHO_T}$AR" >&6
4058 else
4059   echo "$as_me:4059: result: no" >&5
4060 echo "${ECHO_T}no" >&6
4061 fi
4062
4063 fi
4064 if test -z "$ac_cv_prog_AR"; then
4065   ac_ct_AR=$AR
4066   # Extract the first word of "ar", so it can be a program name with args.
4067 set dummy ar; ac_word=$2
4068 echo "$as_me:4068: checking for $ac_word" >&5
4069 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4070 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4071   echo $ECHO_N "(cached) $ECHO_C" >&6
4072 else
4073   if test -n "$ac_ct_AR"; then
4074   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4075 else
4076   ac_save_IFS=$IFS; IFS=$ac_path_separator
4077 ac_dummy="$PATH"
4078 for ac_dir in $ac_dummy; do
4079   IFS=$ac_save_IFS
4080   test -z "$ac_dir" && ac_dir=.
4081   $as_executable_p "$ac_dir/$ac_word" || continue
4082 ac_cv_prog_ac_ct_AR="ar"
4083 echo "$as_me:4083: found $ac_dir/$ac_word" >&5
4084 break
4085 done
4086
4087   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4088 fi
4089 fi
4090 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4091 if test -n "$ac_ct_AR"; then
4092   echo "$as_me:4092: result: $ac_ct_AR" >&5
4093 echo "${ECHO_T}$ac_ct_AR" >&6
4094 else
4095   echo "$as_me:4095: result: no" >&5
4096 echo "${ECHO_T}no" >&6
4097 fi
4098
4099   AR=$ac_ct_AR
4100 else
4101   AR="$ac_cv_prog_AR"
4102 fi
4103
4104 echo "$as_me:4104: checking for options to update archives" >&5
4105 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4106 if test "${cf_cv_ar_flags+set}" = set; then
4107   echo $ECHO_N "(cached) $ECHO_C" >&6
4108 else
4109
4110         cf_cv_ar_flags=unknown
4111         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4112         do
4113
4114                 # check if $ARFLAGS already contains this choice
4115                 if test "x$ARFLAGS" != "x" ; then
4116                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4117                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4118                                 cf_cv_ar_flags=
4119                                 break
4120                         fi
4121                 fi
4122
4123                 rm -f conftest.$ac_cv_objext
4124                 rm -f conftest.a
4125
4126                 cat >conftest.$ac_ext <<EOF
4127 #line 4127 "configure"
4128 int     testdata[3] = { 123, 456, 789 };
4129 EOF
4130                 if { (eval echo "$as_me:4130: \"$ac_compile\"") >&5
4131   (eval $ac_compile) 2>&5
4132   ac_status=$?
4133   echo "$as_me:4133: \$? = $ac_status" >&5
4134   (exit $ac_status); } ; then
4135                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4136                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4137                         if test -f conftest.a ; then
4138                                 cf_cv_ar_flags=$cf_ar_flags
4139                                 break
4140                         fi
4141                 else
4142                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4143
4144 echo "${as_me:-configure}:4144: testing cannot compile test-program ..." 1>&5
4145
4146                         break
4147                 fi
4148         done
4149         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4150
4151 fi
4152 echo "$as_me:4152: result: $cf_cv_ar_flags" >&5
4153 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4154
4155 if test -n "$ARFLAGS" ; then
4156         if test -n "$cf_cv_ar_flags" ; then
4157                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4158         fi
4159 else
4160         ARFLAGS=$cf_cv_ar_flags
4161 fi
4162
4163 echo "$as_me:4163: checking if you have specified an install-prefix" >&5
4164 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4165
4166 # Check whether --with-install-prefix or --without-install-prefix was given.
4167 if test "${with_install_prefix+set}" = set; then
4168   withval="$with_install_prefix"
4169   case "x$withval" in #(vi
4170         xyes|xno) #(vi
4171                 ;;
4172         *)      DESTDIR="$withval"
4173                 ;;
4174         esac
4175 fi;
4176 echo "$as_me:4176: result: $DESTDIR" >&5
4177 echo "${ECHO_T}$DESTDIR" >&6
4178
4179 ###############################################################################
4180
4181 # If we're cross-compiling, allow the user to override the tools and their
4182 # options.  The configure script is oriented toward identifying the host
4183 # compiler, etc., but we need a build compiler to generate parts of the source.
4184
4185 if test "$cross_compiling" = yes ; then
4186
4187         # defaults that we might want to override
4188         : ${BUILD_CFLAGS:=''}
4189         : ${BUILD_CPPFLAGS:=''}
4190         : ${BUILD_LDFLAGS:=''}
4191         : ${BUILD_LIBS:=''}
4192         : ${BUILD_EXEEXT:='$x'}
4193         : ${BUILD_OBJEXT:='o'}
4194
4195 # Check whether --with-build-cc or --without-build-cc was given.
4196 if test "${with_build_cc+set}" = set; then
4197   withval="$with_build_cc"
4198   BUILD_CC="$withval"
4199 else
4200   for ac_prog in gcc cc cl
4201 do
4202   # Extract the first word of "$ac_prog", so it can be a program name with args.
4203 set dummy $ac_prog; ac_word=$2
4204 echo "$as_me:4204: checking for $ac_word" >&5
4205 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4206 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4207   echo $ECHO_N "(cached) $ECHO_C" >&6
4208 else
4209   if test -n "$BUILD_CC"; then
4210   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4211 else
4212   ac_save_IFS=$IFS; IFS=$ac_path_separator
4213 ac_dummy="$PATH"
4214 for ac_dir in $ac_dummy; do
4215   IFS=$ac_save_IFS
4216   test -z "$ac_dir" && ac_dir=.
4217   $as_executable_p "$ac_dir/$ac_word" || continue
4218 ac_cv_prog_BUILD_CC="$ac_prog"
4219 echo "$as_me:4219: found $ac_dir/$ac_word" >&5
4220 break
4221 done
4222
4223 fi
4224 fi
4225 BUILD_CC=$ac_cv_prog_BUILD_CC
4226 if test -n "$BUILD_CC"; then
4227   echo "$as_me:4227: result: $BUILD_CC" >&5
4228 echo "${ECHO_T}$BUILD_CC" >&6
4229 else
4230   echo "$as_me:4230: result: no" >&5
4231 echo "${ECHO_T}no" >&6
4232 fi
4233
4234   test -n "$BUILD_CC" && break
4235 done
4236
4237 fi;
4238         echo "$as_me:4238: checking for native build C compiler" >&5
4239 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4240         echo "$as_me:4240: result: $BUILD_CC" >&5
4241 echo "${ECHO_T}$BUILD_CC" >&6
4242
4243         echo "$as_me:4243: checking for native build C preprocessor" >&5
4244 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4245
4246 # Check whether --with-build-cpp or --without-build-cpp was given.
4247 if test "${with_build_cpp+set}" = set; then
4248   withval="$with_build_cpp"
4249   BUILD_CPP="$withval"
4250 else
4251   BUILD_CPP='${BUILD_CC} -E'
4252 fi;
4253         echo "$as_me:4253: result: $BUILD_CPP" >&5
4254 echo "${ECHO_T}$BUILD_CPP" >&6
4255
4256         echo "$as_me:4256: checking for native build C flags" >&5
4257 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4258
4259 # Check whether --with-build-cflags or --without-build-cflags was given.
4260 if test "${with_build_cflags+set}" = set; then
4261   withval="$with_build_cflags"
4262   BUILD_CFLAGS="$withval"
4263 fi;
4264         echo "$as_me:4264: result: $BUILD_CFLAGS" >&5
4265 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4266
4267         echo "$as_me:4267: checking for native build C preprocessor-flags" >&5
4268 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4269
4270 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4271 if test "${with_build_cppflags+set}" = set; then
4272   withval="$with_build_cppflags"
4273   BUILD_CPPFLAGS="$withval"
4274 fi;
4275         echo "$as_me:4275: result: $BUILD_CPPFLAGS" >&5
4276 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4277
4278         echo "$as_me:4278: checking for native build linker-flags" >&5
4279 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4280
4281 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4282 if test "${with_build_ldflags+set}" = set; then
4283   withval="$with_build_ldflags"
4284   BUILD_LDFLAGS="$withval"
4285 fi;
4286         echo "$as_me:4286: result: $BUILD_LDFLAGS" >&5
4287 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4288
4289         echo "$as_me:4289: checking for native build linker-libraries" >&5
4290 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4291
4292 # Check whether --with-build-libs or --without-build-libs was given.
4293 if test "${with_build_libs+set}" = set; then
4294   withval="$with_build_libs"
4295   BUILD_LIBS="$withval"
4296 fi;
4297         echo "$as_me:4297: result: $BUILD_LIBS" >&5
4298 echo "${ECHO_T}$BUILD_LIBS" >&6
4299
4300         # this assumes we're on Unix.
4301         BUILD_EXEEXT=
4302         BUILD_OBJEXT=o
4303
4304         : ${BUILD_CC:='${CC}'}
4305
4306         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4307                 { { echo "$as_me:4307: error: Cross-build requires two compilers.
4308 Use --with-build-cc to specify the native compiler." >&5
4309 echo "$as_me: error: Cross-build requires two compilers.
4310 Use --with-build-cc to specify the native compiler." >&2;}
4311    { (exit 1); exit 1; }; }
4312         fi
4313
4314 else
4315         : ${BUILD_CC:='${CC}'}
4316         : ${BUILD_CPP:='${CPP}'}
4317         : ${BUILD_CFLAGS:='${CFLAGS}'}
4318         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4319         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4320         : ${BUILD_LIBS:='${LIBS}'}
4321         : ${BUILD_EXEEXT:='$x'}
4322         : ${BUILD_OBJEXT:='o'}
4323 fi
4324
4325 ###############################################################################
4326
4327 ### Options to allow the user to specify the set of libraries which are used.
4328 ### Use "--without-normal --with-shared" to allow the default model to be
4329 ### shared, for example.
4330 cf_list_models=""
4331
4332 echo "$as_me:4332: checking if libtool -version-number should be used" >&5
4333 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4334
4335 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4336 if test "${enable_libtool_version+set}" = set; then
4337   enableval="$enable_libtool_version"
4338   test "$enableval" != no && enableval=yes
4339   if test "$enableval" != "yes" ; then
4340     cf_libtool_version=no
4341   else
4342     cf_libtool_version=yes
4343   fi
4344 else
4345   enableval=yes
4346   cf_libtool_version=yes
4347
4348 fi;
4349 echo "$as_me:4349: result: $cf_libtool_version" >&5
4350 echo "${ECHO_T}$cf_libtool_version" >&6
4351
4352 if test "$cf_libtool_version" = yes ; then
4353         LIBTOOL_VERSION="-version-number"
4354 else
4355         LIBTOOL_VERSION="-version-info"
4356 fi
4357
4358 LIBTOOL=
4359
4360 # common library maintenance symbols that are convenient for libtool scripts:
4361 LIB_CREATE='${AR} -cr'
4362 LIB_OBJECT='${OBJECTS}'
4363 LIB_SUFFIX=.a
4364 LIB_PREP="$RANLIB"
4365
4366 # symbols used to prop libtool up to enable it to determine what it should be
4367 # doing:
4368 LIB_CLEAN=
4369 LIB_COMPILE=
4370 LIB_LINK='${CC}'
4371 LIB_INSTALL=
4372 LIB_UNINSTALL=
4373
4374 echo "$as_me:4374: checking if you want to build libraries with libtool" >&5
4375 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4376
4377 # Check whether --with-libtool or --without-libtool was given.
4378 if test "${with_libtool+set}" = set; then
4379   withval="$with_libtool"
4380   with_libtool=$withval
4381 else
4382   with_libtool=no
4383 fi;
4384 echo "$as_me:4384: result: $with_libtool" >&5
4385 echo "${ECHO_T}$with_libtool" >&6
4386 if test "$with_libtool" != "no"; then
4387
4388         if test "$with_libtool" != "yes" ; then
4389
4390 if test "x$prefix" != xNONE; then
4391   cf_path_syntax="$prefix"
4392 else
4393   cf_path_syntax="$ac_default_prefix"
4394 fi
4395
4396 case ".$with_libtool" in #(vi
4397 .\$\(*\)*|.\'*\'*) #(vi
4398   ;;
4399 ..|./*|.\\*) #(vi
4400   ;;
4401 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4402   ;;
4403 .\${*prefix}*|.\${*dir}*) #(vi
4404   eval with_libtool="$with_libtool"
4405   case ".$with_libtool" in #(vi
4406   .NONE/*)
4407     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4408     ;;
4409   esac
4410   ;; #(vi
4411 .no|.NONE/*)
4412   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4413   ;;
4414 *)
4415   { { echo "$as_me:4415: error: expected a pathname, not \"$with_libtool\"" >&5
4416 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4417    { (exit 1); exit 1; }; }
4418   ;;
4419 esac
4420
4421                 LIBTOOL=$with_libtool
4422         else
4423                 if test -n "$ac_tool_prefix"; then
4424   for ac_prog in libtool glibtool
4425   do
4426     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4427 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4428 echo "$as_me:4428: checking for $ac_word" >&5
4429 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4430 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4431   echo $ECHO_N "(cached) $ECHO_C" >&6
4432 else
4433   if test -n "$LIBTOOL"; then
4434   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4435 else
4436   ac_save_IFS=$IFS; IFS=$ac_path_separator
4437 ac_dummy="$PATH"
4438 for ac_dir in $ac_dummy; do
4439   IFS=$ac_save_IFS
4440   test -z "$ac_dir" && ac_dir=.
4441   $as_executable_p "$ac_dir/$ac_word" || continue
4442 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4443 echo "$as_me:4443: found $ac_dir/$ac_word" >&5
4444 break
4445 done
4446
4447 fi
4448 fi
4449 LIBTOOL=$ac_cv_prog_LIBTOOL
4450 if test -n "$LIBTOOL"; then
4451   echo "$as_me:4451: result: $LIBTOOL" >&5
4452 echo "${ECHO_T}$LIBTOOL" >&6
4453 else
4454   echo "$as_me:4454: result: no" >&5
4455 echo "${ECHO_T}no" >&6
4456 fi
4457
4458     test -n "$LIBTOOL" && break
4459   done
4460 fi
4461 if test -z "$LIBTOOL"; then
4462   ac_ct_LIBTOOL=$LIBTOOL
4463   for ac_prog in libtool glibtool
4464 do
4465   # Extract the first word of "$ac_prog", so it can be a program name with args.
4466 set dummy $ac_prog; ac_word=$2
4467 echo "$as_me:4467: checking for $ac_word" >&5
4468 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4469 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4470   echo $ECHO_N "(cached) $ECHO_C" >&6
4471 else
4472   if test -n "$ac_ct_LIBTOOL"; then
4473   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4474 else
4475   ac_save_IFS=$IFS; IFS=$ac_path_separator
4476 ac_dummy="$PATH"
4477 for ac_dir in $ac_dummy; do
4478   IFS=$ac_save_IFS
4479   test -z "$ac_dir" && ac_dir=.
4480   $as_executable_p "$ac_dir/$ac_word" || continue
4481 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4482 echo "$as_me:4482: found $ac_dir/$ac_word" >&5
4483 break
4484 done
4485
4486 fi
4487 fi
4488 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4489 if test -n "$ac_ct_LIBTOOL"; then
4490   echo "$as_me:4490: result: $ac_ct_LIBTOOL" >&5
4491 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4492 else
4493   echo "$as_me:4493: result: no" >&5
4494 echo "${ECHO_T}no" >&6
4495 fi
4496
4497   test -n "$ac_ct_LIBTOOL" && break
4498 done
4499 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4500
4501   LIBTOOL=$ac_ct_LIBTOOL
4502 fi
4503
4504 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4505 then
4506         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.].*//'`
4507 else
4508         cf_cv_libtool_version=
4509 fi
4510 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4511
4512                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4513                 then
4514
4515 unset ac_cv_prog_ac_ct_LIBTOOL
4516 unset ac_ct_LIBTOOL
4517 unset LIBTOOL
4518
4519                         if test -n "$ac_tool_prefix"; then
4520   for ac_prog in glibtool
4521   do
4522     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4523 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4524 echo "$as_me:4524: checking for $ac_word" >&5
4525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4526 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4527   echo $ECHO_N "(cached) $ECHO_C" >&6
4528 else
4529   if test -n "$LIBTOOL"; then
4530   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4531 else
4532   ac_save_IFS=$IFS; IFS=$ac_path_separator
4533 ac_dummy="$PATH"
4534 for ac_dir in $ac_dummy; do
4535   IFS=$ac_save_IFS
4536   test -z "$ac_dir" && ac_dir=.
4537   $as_executable_p "$ac_dir/$ac_word" || continue
4538 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4539 echo "$as_me:4539: found $ac_dir/$ac_word" >&5
4540 break
4541 done
4542
4543 fi
4544 fi
4545 LIBTOOL=$ac_cv_prog_LIBTOOL
4546 if test -n "$LIBTOOL"; then
4547   echo "$as_me:4547: result: $LIBTOOL" >&5
4548 echo "${ECHO_T}$LIBTOOL" >&6
4549 else
4550   echo "$as_me:4550: result: no" >&5
4551 echo "${ECHO_T}no" >&6
4552 fi
4553
4554     test -n "$LIBTOOL" && break
4555   done
4556 fi
4557 if test -z "$LIBTOOL"; then
4558   ac_ct_LIBTOOL=$LIBTOOL
4559   for ac_prog in glibtool
4560 do
4561   # Extract the first word of "$ac_prog", so it can be a program name with args.
4562 set dummy $ac_prog; ac_word=$2
4563 echo "$as_me:4563: checking for $ac_word" >&5
4564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4565 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4566   echo $ECHO_N "(cached) $ECHO_C" >&6
4567 else
4568   if test -n "$ac_ct_LIBTOOL"; then
4569   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4570 else
4571   ac_save_IFS=$IFS; IFS=$ac_path_separator
4572 ac_dummy="$PATH"
4573 for ac_dir in $ac_dummy; do
4574   IFS=$ac_save_IFS
4575   test -z "$ac_dir" && ac_dir=.
4576   $as_executable_p "$ac_dir/$ac_word" || continue
4577 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4578 echo "$as_me:4578: found $ac_dir/$ac_word" >&5
4579 break
4580 done
4581
4582 fi
4583 fi
4584 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4585 if test -n "$ac_ct_LIBTOOL"; then
4586   echo "$as_me:4586: result: $ac_ct_LIBTOOL" >&5
4587 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4588 else
4589   echo "$as_me:4589: result: no" >&5
4590 echo "${ECHO_T}no" >&6
4591 fi
4592
4593   test -n "$ac_ct_LIBTOOL" && break
4594 done
4595 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4596
4597   LIBTOOL=$ac_ct_LIBTOOL
4598 fi
4599
4600 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4601 then
4602         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.].*//'`
4603 else
4604         cf_cv_libtool_version=
4605 fi
4606 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4607
4608                 fi
4609         fi
4610         if test -z "$LIBTOOL" ; then
4611                 { { echo "$as_me:4611: error: Cannot find libtool" >&5
4612 echo "$as_me: error: Cannot find libtool" >&2;}
4613    { (exit 1); exit 1; }; }
4614         fi
4615         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4616         LIB_OBJECT='${OBJECTS:.o=.lo}'
4617         LIB_SUFFIX=.la
4618         LIB_CLEAN='${LIBTOOL} --mode=clean'
4619         LIB_COMPILE='${LIBTOOL} --mode=compile'
4620         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4621         LIB_INSTALL='${LIBTOOL} --mode=install'
4622         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4623         LIB_PREP=:
4624
4625 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4626 then
4627         echo "$as_me:4627: checking version of $LIBTOOL" >&5
4628 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4629
4630 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4631 then
4632         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.].*//'`
4633 else
4634         cf_cv_libtool_version=
4635 fi
4636 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4637
4638         echo "$as_me:4638: result: $cf_cv_libtool_version" >&5
4639 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4640         if test -z "$cf_cv_libtool_version" ; then
4641                 { { echo "$as_me:4641: error: This is not GNU libtool" >&5
4642 echo "$as_me: error: This is not GNU libtool" >&2;}
4643    { (exit 1); exit 1; }; }
4644         fi
4645 else
4646         { { echo "$as_me:4646: error: GNU libtool has not been found" >&5
4647 echo "$as_me: error: GNU libtool has not been found" >&2;}
4648    { (exit 1); exit 1; }; }
4649 fi
4650
4651         # special hack to add -no-undefined (which libtool should do for itself)
4652         LT_UNDEF=
4653         case "$cf_cv_system_name" in #(vi
4654         cygwin*|msys*|mingw32*|uwin*|aix[4-7]) #(vi
4655                 LT_UNDEF=-no-undefined
4656                 ;;
4657         esac
4658
4659         # special hack to add --tag option for C++ compiler
4660         case $cf_cv_libtool_version in #(vi
4661         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4662                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4663                 LIBTOOL="$LIBTOOL --tag=CC"
4664                 ;;
4665         *)
4666                 LIBTOOL_CXX="$LIBTOOL"
4667                 ;;
4668         esac
4669 else
4670         LIBTOOL=""
4671         LIBTOOL_CXX=""
4672 fi
4673
4674 test -z "$LIBTOOL" && ECHO_LT=
4675
4676 if test "$with_libtool" != "no" ; then
4677
4678 cf_list_models="$cf_list_models libtool"
4679
4680 else
4681
4682 echo "$as_me:4682: checking if you want to build shared libraries" >&5
4683 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4684
4685 # Check whether --with-shared or --without-shared was given.
4686 if test "${with_shared+set}" = set; then
4687   withval="$with_shared"
4688   with_shared=$withval
4689 else
4690   with_shared=no
4691 fi;
4692 echo "$as_me:4692: result: $with_shared" >&5
4693 echo "${ECHO_T}$with_shared" >&6
4694 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4695
4696 echo "$as_me:4696: checking if you want to build static libraries" >&5
4697 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4698
4699 # Check whether --with-normal or --without-normal was given.
4700 if test "${with_normal+set}" = set; then
4701   withval="$with_normal"
4702   with_normal=$withval
4703 else
4704   with_normal=yes
4705 fi;
4706 echo "$as_me:4706: result: $with_normal" >&5
4707 echo "${ECHO_T}$with_normal" >&6
4708 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4709
4710 echo "$as_me:4710: checking if you want to build debug libraries" >&5
4711 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4712
4713 # Check whether --with-debug or --without-debug was given.
4714 if test "${with_debug+set}" = set; then
4715   withval="$with_debug"
4716   with_debug=$withval
4717 else
4718   with_debug=yes
4719 fi;
4720 echo "$as_me:4720: result: $with_debug" >&5
4721 echo "${ECHO_T}$with_debug" >&6
4722 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4723
4724 echo "$as_me:4724: checking if you want to build profiling libraries" >&5
4725 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4726
4727 # Check whether --with-profile or --without-profile was given.
4728 if test "${with_profile+set}" = set; then
4729   withval="$with_profile"
4730   with_profile=$withval
4731 else
4732   with_profile=no
4733 fi;
4734 echo "$as_me:4734: result: $with_profile" >&5
4735 echo "${ECHO_T}$with_profile" >&6
4736 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4737
4738 fi
4739
4740 if test "X$cf_with_cxx_binding" != Xno; then
4741 if test "x$with_shared" = "xyes"; then
4742 echo "$as_me:4742: checking if you want to build C++ shared libraries" >&5
4743 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
4744
4745 # Check whether --with-cxx-shared or --without-cxx-shared was given.
4746 if test "${with_cxx_shared+set}" = set; then
4747   withval="$with_cxx_shared"
4748   with_shared_cxx=$withval
4749 else
4750   with_shared_cxx=no
4751 fi;
4752 echo "$as_me:4752: result: $with_shared_cxx" >&5
4753 echo "${ECHO_T}$with_shared_cxx" >&6
4754 fi
4755 fi
4756
4757 ###############################################################################
4758
4759 echo "$as_me:4759: checking for specified models" >&5
4760 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4761 test -z "$cf_list_models" && cf_list_models=normal
4762 test "$with_libtool" != "no" && cf_list_models=libtool
4763 echo "$as_me:4763: result: $cf_list_models" >&5
4764 echo "${ECHO_T}$cf_list_models" >&6
4765
4766 ### Use the first model as the default, and save its suffix for use in building
4767 ### up test-applications.
4768 echo "$as_me:4768: checking for default model" >&5
4769 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4770 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4771 echo "$as_me:4771: result: $DFT_LWR_MODEL" >&5
4772 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4773
4774 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4775
4776 TICS_NAME=tic
4777
4778 TINFO_NAME=tinfo
4779
4780 LIB_NAME=ncurses
4781
4782 LIB_DIR=../lib
4783 LIB_2ND=../../lib
4784
4785 echo "$as_me:4785: checking if you want to have a library-prefix" >&5
4786 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4787
4788 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4789 if test "${with_lib_prefix+set}" = set; then
4790   withval="$with_lib_prefix"
4791   with_lib_prefix=$withval
4792 else
4793   with_lib_prefix=auto
4794 fi;
4795 echo "$as_me:4795: result: $with_lib_prefix" >&5
4796 echo "${ECHO_T}$with_lib_prefix" >&6
4797
4798 if test $with_lib_prefix = auto
4799 then
4800
4801         case $cf_cv_system_name in #(vi
4802         OS/2*|os2*) #(vi
4803         LIB_PREFIX=''
4804         ;;
4805         *)      LIB_PREFIX='lib'
4806         ;;
4807         esac
4808 cf_prefix=$LIB_PREFIX
4809
4810 elif test $with_lib_prefix = no
4811 then
4812         LIB_PREFIX=
4813 else
4814         LIB_PREFIX=$with_lib_prefix
4815 fi
4816
4817 LIB_SUFFIX=
4818
4819         echo "$as_me:4819: checking for PATH separator" >&5
4820 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4821         case $cf_cv_system_name in
4822         os2*)   PATH_SEPARATOR=';'  ;;
4823         *)      ${PATH_SEPARATOR:=':'}  ;;
4824         esac
4825
4826         echo "$as_me:4826: result: $PATH_SEPARATOR" >&5
4827 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4828
4829 ###############################################################################
4830
4831 echo "$as_me:4831: checking if you want to build a separate terminfo library" >&5
4832 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4833
4834 # Check whether --with-termlib or --without-termlib was given.
4835 if test "${with_termlib+set}" = set; then
4836   withval="$with_termlib"
4837   with_termlib=$withval
4838 else
4839   with_termlib=no
4840 fi;
4841 echo "$as_me:4841: result: $with_termlib" >&5
4842 echo "${ECHO_T}$with_termlib" >&6
4843
4844 echo "$as_me:4844: checking if you want to build a separate tic library" >&5
4845 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4846
4847 # Check whether --with-ticlib or --without-ticlib was given.
4848 if test "${with_ticlib+set}" = set; then
4849   withval="$with_ticlib"
4850   with_ticlib=$withval
4851 else
4852   with_ticlib=no
4853 fi;
4854 echo "$as_me:4854: result: $with_ticlib" >&5
4855 echo "${ECHO_T}$with_ticlib" >&6
4856
4857 ### Checks for special libraries, must be done up-front.
4858 SHLIB_LIST=""
4859
4860 echo "$as_me:4860: checking if you want to link with the GPM mouse library" >&5
4861 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4862
4863 # Check whether --with-gpm or --without-gpm was given.
4864 if test "${with_gpm+set}" = set; then
4865   withval="$with_gpm"
4866   with_gpm=$withval
4867 else
4868   with_gpm=maybe
4869 fi;
4870 echo "$as_me:4870: result: $with_gpm" >&5
4871 echo "${ECHO_T}$with_gpm" >&6
4872
4873 if test "$with_gpm" != no ; then
4874         echo "$as_me:4874: checking for gpm.h" >&5
4875 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4876 if test "${ac_cv_header_gpm_h+set}" = set; then
4877   echo $ECHO_N "(cached) $ECHO_C" >&6
4878 else
4879   cat >conftest.$ac_ext <<_ACEOF
4880 #line 4880 "configure"
4881 #include "confdefs.h"
4882 #include <gpm.h>
4883 _ACEOF
4884 if { (eval echo "$as_me:4884: \"$ac_cpp conftest.$ac_ext\"") >&5
4885   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4886   ac_status=$?
4887   egrep -v '^ *\+' conftest.er1 >conftest.err
4888   rm -f conftest.er1
4889   cat conftest.err >&5
4890   echo "$as_me:4890: \$? = $ac_status" >&5
4891   (exit $ac_status); } >/dev/null; then
4892   if test -s conftest.err; then
4893     ac_cpp_err=$ac_c_preproc_warn_flag
4894   else
4895     ac_cpp_err=
4896   fi
4897 else
4898   ac_cpp_err=yes
4899 fi
4900 if test -z "$ac_cpp_err"; then
4901   ac_cv_header_gpm_h=yes
4902 else
4903   echo "$as_me: failed program was:" >&5
4904   cat conftest.$ac_ext >&5
4905   ac_cv_header_gpm_h=no
4906 fi
4907 rm -f conftest.err conftest.$ac_ext
4908 fi
4909 echo "$as_me:4909: result: $ac_cv_header_gpm_h" >&5
4910 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4911 if test $ac_cv_header_gpm_h = yes; then
4912
4913 cat >>confdefs.h <<\EOF
4914 #define HAVE_GPM_H 1
4915 EOF
4916
4917                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4918                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4919
4920 echo "${as_me:-configure}:4920: testing assuming we really have GPM library ..." 1>&5
4921
4922 cat >>confdefs.h <<\EOF
4923 #define HAVE_LIBGPM 1
4924 EOF
4925
4926                 else
4927                         echo "$as_me:4927: checking for Gpm_Open in -lgpm" >&5
4928 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4929 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4930   echo $ECHO_N "(cached) $ECHO_C" >&6
4931 else
4932   ac_check_lib_save_LIBS=$LIBS
4933 LIBS="-lgpm  $LIBS"
4934 cat >conftest.$ac_ext <<_ACEOF
4935 #line 4935 "configure"
4936 #include "confdefs.h"
4937
4938 /* Override any gcc2 internal prototype to avoid an error.  */
4939 #ifdef __cplusplus
4940 extern "C"
4941 #endif
4942 /* We use char because int might match the return type of a gcc2
4943    builtin and then its argument prototype would still apply.  */
4944 char Gpm_Open ();
4945 int
4946 main ()
4947 {
4948 Gpm_Open ();
4949   ;
4950   return 0;
4951 }
4952 _ACEOF
4953 rm -f conftest.$ac_objext conftest$ac_exeext
4954 if { (eval echo "$as_me:4954: \"$ac_link\"") >&5
4955   (eval $ac_link) 2>&5
4956   ac_status=$?
4957   echo "$as_me:4957: \$? = $ac_status" >&5
4958   (exit $ac_status); } &&
4959          { ac_try='test -s conftest$ac_exeext'
4960   { (eval echo "$as_me:4960: \"$ac_try\"") >&5
4961   (eval $ac_try) 2>&5
4962   ac_status=$?
4963   echo "$as_me:4963: \$? = $ac_status" >&5
4964   (exit $ac_status); }; }; then
4965   ac_cv_lib_gpm_Gpm_Open=yes
4966 else
4967   echo "$as_me: failed program was:" >&5
4968 cat conftest.$ac_ext >&5
4969 ac_cv_lib_gpm_Gpm_Open=no
4970 fi
4971 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4972 LIBS=$ac_check_lib_save_LIBS
4973 fi
4974 echo "$as_me:4974: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4975 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4976 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4977   :
4978 else
4979
4980                                 { { echo "$as_me:4980: error: Cannot link with GPM library" >&5
4981 echo "$as_me: error: Cannot link with GPM library" >&2;}
4982    { (exit 1); exit 1; }; }
4983                 fi
4984                 with_gpm=yes
4985
4986 fi
4987
4988 else
4989
4990                 test "$with_gpm" != maybe && { echo "$as_me:4990: WARNING: Cannot find GPM header" >&5
4991 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4992                 with_gpm=no
4993
4994 fi
4995
4996 fi
4997
4998 if test "$with_gpm" != no ; then
4999         echo "$as_me:4999: checking if you want to load GPM dynamically" >&5
5000 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5001
5002 # Check whether --with-dlsym or --without-dlsym was given.
5003 if test "${with_dlsym+set}" = set; then
5004   withval="$with_dlsym"
5005   with_dlsym=$withval
5006 else
5007   with_dlsym=yes
5008 fi;
5009         echo "$as_me:5009: result: $with_dlsym" >&5
5010 echo "${ECHO_T}$with_dlsym" >&6
5011         if test "x$with_dlsym" = xyes ; then
5012
5013 cf_have_dlsym=no
5014 echo "$as_me:5014: checking for dlsym" >&5
5015 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5016 if test "${ac_cv_func_dlsym+set}" = set; then
5017   echo $ECHO_N "(cached) $ECHO_C" >&6
5018 else
5019   cat >conftest.$ac_ext <<_ACEOF
5020 #line 5020 "configure"
5021 #include "confdefs.h"
5022 /* System header to define __stub macros and hopefully few prototypes,
5023     which can conflict with char dlsym (); below.  */
5024 #include <assert.h>
5025 /* Override any gcc2 internal prototype to avoid an error.  */
5026 #ifdef __cplusplus
5027 extern "C"
5028 #endif
5029 /* We use char because int might match the return type of a gcc2
5030    builtin and then its argument prototype would still apply.  */
5031 char dlsym ();
5032 char (*f) ();
5033
5034 int
5035 main ()
5036 {
5037 /* The GNU C library defines this for functions which it implements
5038     to always fail with ENOSYS.  Some functions are actually named
5039     something starting with __ and the normal name is an alias.  */
5040 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5041 choke me
5042 #else
5043 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5044 #endif
5045
5046   ;
5047   return 0;
5048 }
5049 _ACEOF
5050 rm -f conftest.$ac_objext conftest$ac_exeext
5051 if { (eval echo "$as_me:5051: \"$ac_link\"") >&5
5052   (eval $ac_link) 2>&5
5053   ac_status=$?
5054   echo "$as_me:5054: \$? = $ac_status" >&5
5055   (exit $ac_status); } &&
5056          { ac_try='test -s conftest$ac_exeext'
5057   { (eval echo "$as_me:5057: \"$ac_try\"") >&5
5058   (eval $ac_try) 2>&5
5059   ac_status=$?
5060   echo "$as_me:5060: \$? = $ac_status" >&5
5061   (exit $ac_status); }; }; then
5062   ac_cv_func_dlsym=yes
5063 else
5064   echo "$as_me: failed program was:" >&5
5065 cat conftest.$ac_ext >&5
5066 ac_cv_func_dlsym=no
5067 fi
5068 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5069 fi
5070 echo "$as_me:5070: result: $ac_cv_func_dlsym" >&5
5071 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5072 if test $ac_cv_func_dlsym = yes; then
5073   cf_have_dlsym=yes
5074 else
5075
5076 cf_have_libdl=no
5077 echo "$as_me:5077: checking for dlsym in -ldl" >&5
5078 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5079 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5080   echo $ECHO_N "(cached) $ECHO_C" >&6
5081 else
5082   ac_check_lib_save_LIBS=$LIBS
5083 LIBS="-ldl  $LIBS"
5084 cat >conftest.$ac_ext <<_ACEOF
5085 #line 5085 "configure"
5086 #include "confdefs.h"
5087
5088 /* Override any gcc2 internal prototype to avoid an error.  */
5089 #ifdef __cplusplus
5090 extern "C"
5091 #endif
5092 /* We use char because int might match the return type of a gcc2
5093    builtin and then its argument prototype would still apply.  */
5094 char dlsym ();
5095 int
5096 main ()
5097 {
5098 dlsym ();
5099   ;
5100   return 0;
5101 }
5102 _ACEOF
5103 rm -f conftest.$ac_objext conftest$ac_exeext
5104 if { (eval echo "$as_me:5104: \"$ac_link\"") >&5
5105   (eval $ac_link) 2>&5
5106   ac_status=$?
5107   echo "$as_me:5107: \$? = $ac_status" >&5
5108   (exit $ac_status); } &&
5109          { ac_try='test -s conftest$ac_exeext'
5110   { (eval echo "$as_me:5110: \"$ac_try\"") >&5
5111   (eval $ac_try) 2>&5
5112   ac_status=$?
5113   echo "$as_me:5113: \$? = $ac_status" >&5
5114   (exit $ac_status); }; }; then
5115   ac_cv_lib_dl_dlsym=yes
5116 else
5117   echo "$as_me: failed program was:" >&5
5118 cat conftest.$ac_ext >&5
5119 ac_cv_lib_dl_dlsym=no
5120 fi
5121 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5122 LIBS=$ac_check_lib_save_LIBS
5123 fi
5124 echo "$as_me:5124: result: $ac_cv_lib_dl_dlsym" >&5
5125 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5126 if test $ac_cv_lib_dl_dlsym = yes; then
5127
5128         cf_have_dlsym=yes
5129         cf_have_libdl=yes
5130 fi
5131
5132 fi
5133
5134 if test "$cf_have_dlsym" = yes ; then
5135         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5136
5137         echo "$as_me:5137: checking whether able to link to dl*() functions" >&5
5138 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5139         cat >conftest.$ac_ext <<_ACEOF
5140 #line 5140 "configure"
5141 #include "confdefs.h"
5142 #include <dlfcn.h>
5143 int
5144 main ()
5145 {
5146
5147                 void *obj;
5148                 if ((obj = dlopen("filename", 0)) != 0) {
5149                         if (dlsym(obj, "symbolname") == 0) {
5150                         dlclose(obj);
5151                         }
5152                 }
5153   ;
5154   return 0;
5155 }
5156 _ACEOF
5157 rm -f conftest.$ac_objext conftest$ac_exeext
5158 if { (eval echo "$as_me:5158: \"$ac_link\"") >&5
5159   (eval $ac_link) 2>&5
5160   ac_status=$?
5161   echo "$as_me:5161: \$? = $ac_status" >&5
5162   (exit $ac_status); } &&
5163          { ac_try='test -s conftest$ac_exeext'
5164   { (eval echo "$as_me:5164: \"$ac_try\"") >&5
5165   (eval $ac_try) 2>&5
5166   ac_status=$?
5167   echo "$as_me:5167: \$? = $ac_status" >&5
5168   (exit $ac_status); }; }; then
5169
5170 cat >>confdefs.h <<\EOF
5171 #define HAVE_LIBDL 1
5172 EOF
5173
5174 else
5175   echo "$as_me: failed program was:" >&5
5176 cat conftest.$ac_ext >&5
5177
5178                 { { echo "$as_me:5178: error: Cannot link test program for libdl" >&5
5179 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5180    { (exit 1); exit 1; }; }
5181 fi
5182 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5183         echo "$as_me:5183: result: ok" >&5
5184 echo "${ECHO_T}ok" >&6
5185 else
5186         { { echo "$as_me:5186: error: Cannot find dlsym function" >&5
5187 echo "$as_me: error: Cannot find dlsym function" >&2;}
5188    { (exit 1); exit 1; }; }
5189 fi
5190
5191                 if test "x$with_gpm" != xyes ; then
5192                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5193
5194 echo "${as_me:-configure}:5194: testing assuming soname for gpm is $with_gpm ..." 1>&5
5195
5196                         cf_cv_gpm_soname="$with_gpm"
5197                 else
5198
5199 echo "$as_me:5199: checking for soname of gpm library" >&5
5200 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5201 if test "${cf_cv_gpm_soname+set}" = set; then
5202   echo $ECHO_N "(cached) $ECHO_C" >&6
5203 else
5204
5205 cf_cv_gpm_soname=unknown
5206 if test "$cross_compiling" != yes ; then
5207 cat >conftest.$ac_ext <<CF_EOF
5208 #include <gpm.h>
5209 int main()
5210 {
5211 if (Gpm_Open(0,0)) Gpm_Close();
5212         ${cf_cv_main_return:-return}(0);
5213 }
5214 CF_EOF
5215 cf_save_LIBS="$LIBS"
5216         LIBS="-lgpm $LIBS"
5217         if { (eval echo "$as_me:5217: \"$ac_compile\"") >&5
5218   (eval $ac_compile) 2>&5
5219   ac_status=$?
5220   echo "$as_me:5220: \$? = $ac_status" >&5
5221   (exit $ac_status); } ; then
5222                 if { (eval echo "$as_me:5222: \"$ac_link\"") >&5
5223   (eval $ac_link) 2>&5
5224   ac_status=$?
5225   echo "$as_me:5225: \$? = $ac_status" >&5
5226   (exit $ac_status); } ; then
5227                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5228                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5229                 fi
5230         fi
5231 rm -rf conftest*
5232 LIBS="$cf_save_LIBS"
5233 fi
5234
5235 fi
5236 echo "$as_me:5236: result: $cf_cv_gpm_soname" >&5
5237 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5238
5239                 fi
5240                 test "$cf_cv_gpm_soname" != "unknown" &&
5241 cat >>confdefs.h <<EOF
5242 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5243 EOF
5244
5245                 SHLIB_LIST="-ldl $SHLIB_LIST"
5246         else
5247                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5248                 TEST_LIBS="-lgpm $TEST_LIBS"
5249         fi
5250
5251 cat >>confdefs.h <<\EOF
5252 #define HAVE_LIBGPM 1
5253 EOF
5254
5255 echo "$as_me:5255: checking for Gpm_Wgetch in -lgpm" >&5
5256 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5257 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5258   echo $ECHO_N "(cached) $ECHO_C" >&6
5259 else
5260   ac_check_lib_save_LIBS=$LIBS
5261 LIBS="-lgpm  $LIBS"
5262 cat >conftest.$ac_ext <<_ACEOF
5263 #line 5263 "configure"
5264 #include "confdefs.h"
5265
5266 /* Override any gcc2 internal prototype to avoid an error.  */
5267 #ifdef __cplusplus
5268 extern "C"
5269 #endif
5270 /* We use char because int might match the return type of a gcc2
5271    builtin and then its argument prototype would still apply.  */
5272 char Gpm_Wgetch ();
5273 int
5274 main ()
5275 {
5276 Gpm_Wgetch ();
5277   ;
5278   return 0;
5279 }
5280 _ACEOF
5281 rm -f conftest.$ac_objext conftest$ac_exeext
5282 if { (eval echo "$as_me:5282: \"$ac_link\"") >&5
5283   (eval $ac_link) 2>&5
5284   ac_status=$?
5285   echo "$as_me:5285: \$? = $ac_status" >&5
5286   (exit $ac_status); } &&
5287          { ac_try='test -s conftest$ac_exeext'
5288   { (eval echo "$as_me:5288: \"$ac_try\"") >&5
5289   (eval $ac_try) 2>&5
5290   ac_status=$?
5291   echo "$as_me:5291: \$? = $ac_status" >&5
5292   (exit $ac_status); }; }; then
5293   ac_cv_lib_gpm_Gpm_Wgetch=yes
5294 else
5295   echo "$as_me: failed program was:" >&5
5296 cat conftest.$ac_ext >&5
5297 ac_cv_lib_gpm_Gpm_Wgetch=no
5298 fi
5299 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5300 LIBS=$ac_check_lib_save_LIBS
5301 fi
5302 echo "$as_me:5302: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5303 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5304 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5305
5306 echo "$as_me:5306: checking if GPM is weakly bound to curses library" >&5
5307 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5308 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5309   echo $ECHO_N "(cached) $ECHO_C" >&6
5310 else
5311
5312 cf_cv_check_gpm_wgetch=unknown
5313 if test "$cross_compiling" != yes ; then
5314
5315 cat >conftest.$ac_ext <<CF_EOF
5316 #include <gpm.h>
5317 int main()
5318 {
5319         Gpm_Wgetch();
5320         ${cf_cv_main_return:-return}(0);
5321 }
5322 CF_EOF
5323
5324         cf_save_LIBS="$LIBS"
5325         # This only works if we can look at the symbol table.  If a shared
5326         # library is stripped for install, we cannot use that.  So we're forced
5327         # to rely on the static library, noting that some packagers may not
5328         # include it.
5329         LIBS="-static -lgpm -dynamic $LIBS"
5330         if { (eval echo "$as_me:5330: \"$ac_compile\"") >&5
5331   (eval $ac_compile) 2>&5
5332   ac_status=$?
5333   echo "$as_me:5333: \$? = $ac_status" >&5
5334   (exit $ac_status); } ; then
5335                 if { (eval echo "$as_me:5335: \"$ac_link\"") >&5
5336   (eval $ac_link) 2>&5
5337   ac_status=$?
5338   echo "$as_me:5338: \$? = $ac_status" >&5
5339   (exit $ac_status); } ; then
5340                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5341                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5342                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5343                 fi
5344         fi
5345         rm -rf conftest*
5346         LIBS="$cf_save_LIBS"
5347 fi
5348
5349 fi
5350 echo "$as_me:5350: result: $cf_cv_check_gpm_wgetch" >&5
5351 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5352
5353 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5354         { echo "$as_me:5354: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5355 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5356 fi
5357
5358 fi
5359
5360 fi
5361
5362 # not everyone has "test -c"
5363 if test -c /dev/sysmouse 2>/dev/null ; then
5364 echo "$as_me:5364: checking if you want to use sysmouse" >&5
5365 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5366
5367 # Check whether --with-sysmouse or --without-sysmouse was given.
5368 if test "${with_sysmouse+set}" = set; then
5369   withval="$with_sysmouse"
5370   cf_with_sysmouse=$withval
5371 else
5372   cf_with_sysmouse=maybe
5373 fi;
5374         if test "$cf_with_sysmouse" != no ; then
5375         cat >conftest.$ac_ext <<_ACEOF
5376 #line 5376 "configure"
5377 #include "confdefs.h"
5378
5379 #include <osreldate.h>
5380 #if (__FreeBSD_version >= 400017)
5381 #include <sys/consio.h>
5382 #include <sys/fbio.h>
5383 #else
5384 #include <machine/console.h>
5385 #endif
5386
5387 int
5388 main ()
5389 {
5390
5391         struct mouse_info the_mouse;
5392         ioctl(0, CONS_MOUSECTL, &the_mouse);
5393
5394   ;
5395   return 0;
5396 }
5397 _ACEOF
5398 rm -f conftest.$ac_objext
5399 if { (eval echo "$as_me:5399: \"$ac_compile\"") >&5
5400   (eval $ac_compile) 2>&5
5401   ac_status=$?
5402   echo "$as_me:5402: \$? = $ac_status" >&5
5403   (exit $ac_status); } &&
5404          { ac_try='test -s conftest.$ac_objext'
5405   { (eval echo "$as_me:5405: \"$ac_try\"") >&5
5406   (eval $ac_try) 2>&5
5407   ac_status=$?
5408   echo "$as_me:5408: \$? = $ac_status" >&5
5409   (exit $ac_status); }; }; then
5410   cf_with_sysmouse=yes
5411 else
5412   echo "$as_me: failed program was:" >&5
5413 cat conftest.$ac_ext >&5
5414 cf_with_sysmouse=no
5415 fi
5416 rm -f conftest.$ac_objext conftest.$ac_ext
5417         fi
5418 echo "$as_me:5418: result: $cf_with_sysmouse" >&5
5419 echo "${ECHO_T}$cf_with_sysmouse" >&6
5420 test "$cf_with_sysmouse" = yes &&
5421 cat >>confdefs.h <<\EOF
5422 #define USE_SYSMOUSE 1
5423 EOF
5424
5425 fi
5426
5427 if test X"$CC_G_OPT" = X"" ; then
5428         CC_G_OPT='-g'
5429         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5430 fi
5431
5432 if test X"$CXX_G_OPT" = X"" ; then
5433         CXX_G_OPT='-g'
5434         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5435 fi
5436
5437 echo "$as_me:5437: checking for default loader flags" >&5
5438 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5439 case $DFT_LWR_MODEL in
5440 libtool) LD_MODEL=''   ;;
5441 normal)  LD_MODEL=''   ;;
5442 debug)   LD_MODEL=$CC_G_OPT ;;
5443 profile) LD_MODEL='-pg';;
5444 shared)  LD_MODEL=''   ;;
5445 esac
5446 echo "$as_me:5446: result: $LD_MODEL" >&5
5447 echo "${ECHO_T}$LD_MODEL" >&6
5448
5449 case $DFT_LWR_MODEL in
5450 shared)
5451
5452 echo "$as_me:5452: checking if rpath option should be used" >&5
5453 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5454
5455 # Check whether --enable-rpath or --disable-rpath was given.
5456 if test "${enable_rpath+set}" = set; then
5457   enableval="$enable_rpath"
5458   cf_cv_enable_rpath=$enableval
5459 else
5460   cf_cv_enable_rpath=no
5461 fi;
5462 echo "$as_me:5462: result: $cf_cv_enable_rpath" >&5
5463 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5464
5465 echo "$as_me:5465: checking if shared libraries should be relinked during install" >&5
5466 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5467
5468 # Check whether --enable-relink or --disable-relink was given.
5469 if test "${enable_relink+set}" = set; then
5470   enableval="$enable_relink"
5471   cf_cv_do_relink=$enableval
5472 else
5473   cf_cv_do_relink=yes
5474 fi;
5475 echo "$as_me:5475: result: $cf_cv_do_relink" >&5
5476 echo "${ECHO_T}$cf_cv_do_relink" >&6
5477         ;;
5478 esac
5479
5480 # we will build libraries one-level down.
5481 rel_builddir=..
5482
5483 LD_RPATH_OPT=
5484 echo "$as_me:5484: checking for an rpath option" >&5
5485 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5486 case $cf_cv_system_name in #(vi
5487 irix*) #(vi
5488         if test "$GCC" = yes; then
5489                 LD_RPATH_OPT="-Wl,-rpath,"
5490         else
5491                 LD_RPATH_OPT="-rpath "
5492         fi
5493         ;;
5494 linux*|gnu*|k*bsd*-gnu) #(vi
5495         LD_RPATH_OPT="-Wl,-rpath,"
5496         ;;
5497 openbsd[2-9].*|mirbsd*) #(vi
5498         LD_RPATH_OPT="-Wl,-rpath,"
5499         ;;
5500 dragonfly*|freebsd*) #(vi
5501         LD_RPATH_OPT="-rpath "
5502         ;;
5503 netbsd*) #(vi
5504         LD_RPATH_OPT="-Wl,-rpath,"
5505         ;;
5506 osf*|mls+*) #(vi
5507         LD_RPATH_OPT="-rpath "
5508         ;;
5509 solaris2*) #(vi
5510         LD_RPATH_OPT="-R"
5511         ;;
5512 *)
5513         ;;
5514 esac
5515 echo "$as_me:5515: result: $LD_RPATH_OPT" >&5
5516 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5517
5518 case "x$LD_RPATH_OPT" in #(vi
5519 x-R*)
5520         echo "$as_me:5520: checking if we need a space after rpath option" >&5
5521 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5522         cf_save_LIBS="$LIBS"
5523         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5524         cat >conftest.$ac_ext <<_ACEOF
5525 #line 5525 "configure"
5526 #include "confdefs.h"
5527
5528 int
5529 main ()
5530 {
5531
5532   ;
5533   return 0;
5534 }
5535 _ACEOF
5536 rm -f conftest.$ac_objext conftest$ac_exeext
5537 if { (eval echo "$as_me:5537: \"$ac_link\"") >&5
5538   (eval $ac_link) 2>&5
5539   ac_status=$?
5540   echo "$as_me:5540: \$? = $ac_status" >&5
5541   (exit $ac_status); } &&
5542          { ac_try='test -s conftest$ac_exeext'
5543   { (eval echo "$as_me:5543: \"$ac_try\"") >&5
5544   (eval $ac_try) 2>&5
5545   ac_status=$?
5546   echo "$as_me:5546: \$? = $ac_status" >&5
5547   (exit $ac_status); }; }; then
5548   cf_rpath_space=no
5549 else
5550   echo "$as_me: failed program was:" >&5
5551 cat conftest.$ac_ext >&5
5552 cf_rpath_space=yes
5553 fi
5554 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5555         LIBS="$cf_save_LIBS"
5556         echo "$as_me:5556: result: $cf_rpath_space" >&5
5557 echo "${ECHO_T}$cf_rpath_space" >&6
5558         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5559         ;;
5560 esac
5561
5562         RM_SHARED_OPTS=
5563         LOCAL_LDFLAGS=
5564         LOCAL_LDFLAGS2=
5565         LD_SHARED_OPTS=
5566         INSTALL_LIB="-m 644"
5567         : ${rel_builddir:=.}
5568
5569         shlibdir=$libdir
5570
5571         MAKE_DLLS="#"
5572
5573         cf_cv_do_symlinks=no
5574         cf_ld_rpath_opt=
5575         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5576
5577         echo "$as_me:5577: checking if release/abi version should be used for shared libs" >&5
5578 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5579
5580 # Check whether --with-shlib-version or --without-shlib-version was given.
5581 if test "${with_shlib_version+set}" = set; then
5582   withval="$with_shlib_version"
5583   test -z "$withval" && withval=auto
5584         case $withval in #(vi
5585         yes) #(vi
5586                 cf_cv_shlib_version=auto
5587                 ;;
5588         rel|abi|auto|no) #(vi
5589                 cf_cv_shlib_version=$withval
5590                 ;;
5591         *)
5592                 { { echo "$as_me:5592: error: option value must be one of: rel, abi, auto or no" >&5
5593 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5594    { (exit 1); exit 1; }; }
5595                 ;;
5596         esac
5597
5598 else
5599   cf_cv_shlib_version=auto
5600 fi;
5601         echo "$as_me:5601: result: $cf_cv_shlib_version" >&5
5602 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5603
5604         cf_cv_rm_so_locs=no
5605         cf_try_cflags=
5606
5607         # Some less-capable ports of gcc support only -fpic
5608         CC_SHARED_OPTS=
5609         if test "$GCC" = yes
5610         then
5611                 echo "$as_me:5611: checking which $CC option to use" >&5
5612 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5613                 cf_save_CFLAGS="$CFLAGS"
5614                 for CC_SHARED_OPTS in -fPIC -fpic ''
5615                 do
5616                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5617                         cat >conftest.$ac_ext <<_ACEOF
5618 #line 5618 "configure"
5619 #include "confdefs.h"
5620 #include <stdio.h>
5621 int
5622 main ()
5623 {
5624 int x = 1
5625   ;
5626   return 0;
5627 }
5628 _ACEOF
5629 rm -f conftest.$ac_objext
5630 if { (eval echo "$as_me:5630: \"$ac_compile\"") >&5
5631   (eval $ac_compile) 2>&5
5632   ac_status=$?
5633   echo "$as_me:5633: \$? = $ac_status" >&5
5634   (exit $ac_status); } &&
5635          { ac_try='test -s conftest.$ac_objext'
5636   { (eval echo "$as_me:5636: \"$ac_try\"") >&5
5637   (eval $ac_try) 2>&5
5638   ac_status=$?
5639   echo "$as_me:5639: \$? = $ac_status" >&5
5640   (exit $ac_status); }; }; then
5641   break
5642 else
5643   echo "$as_me: failed program was:" >&5
5644 cat conftest.$ac_ext >&5
5645 fi
5646 rm -f conftest.$ac_objext conftest.$ac_ext
5647                 done
5648                 echo "$as_me:5648: result: $CC_SHARED_OPTS" >&5
5649 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5650                 CFLAGS="$cf_save_CFLAGS"
5651         fi
5652
5653         cf_cv_shlib_version_infix=no
5654
5655         case $cf_cv_system_name in #(vi
5656         aix4.3-9*|aix[5-7]*) #(vi
5657                 if test "$GCC" = yes; then
5658                         CC_SHARED_OPTS=
5659                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5660                 else
5661                         # CC_SHARED_OPTS='-qpic=large -G'
5662                         # perhaps "-bM:SRE -bnoentry -bexpall"
5663                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5664                 fi
5665                 ;;
5666         beos*) #(vi
5667                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5668                 ;;
5669         cygwin*) #(vi
5670                 CC_SHARED_OPTS=
5671                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5672                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5673                 cf_cv_shlib_version=cygdll
5674                 cf_cv_shlib_version_infix=cygdll
5675                 shlibdir=$bindir
5676                 MAKE_DLLS=
5677                 cat >mk_shared_lib.sh <<-CF_EOF
5678                 #!/bin/sh
5679                 SHARED_LIB=\$1
5680                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5681                 shift
5682                 cat <<-EOF
5683                 Linking shared library
5684                 ** SHARED_LIB \$SHARED_LIB
5685                 ** IMPORT_LIB \$IMPORT_LIB
5686 EOF
5687                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5688 CF_EOF
5689                 chmod +x mk_shared_lib.sh
5690                 ;;
5691         msys*) #(vi
5692                 CC_SHARED_OPTS=
5693                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5694                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5695                 cf_cv_shlib_version=msysdll
5696                 cf_cv_shlib_version_infix=msysdll
5697                 shlibdir=$bindir
5698                 MAKE_DLLS=
5699                 cat >mk_shared_lib.sh <<-CF_EOF
5700                 #!/bin/sh
5701                 SHARED_LIB=\$1
5702                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5703                 shift
5704                 cat <<-EOF
5705                 Linking shared library
5706                 ** SHARED_LIB \$SHARED_LIB
5707                 ** IMPORT_LIB \$IMPORT_LIB
5708 EOF
5709                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5710 CF_EOF
5711                 chmod +x mk_shared_lib.sh
5712                 ;;
5713         darwin*) #(vi
5714                 cf_try_cflags="no-cpp-precomp"
5715                 CC_SHARED_OPTS="-dynamic"
5716                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5717                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5718                 cf_cv_shlib_version_infix=yes
5719                 echo "$as_me:5719: checking if ld -search_paths_first works" >&5
5720 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5721 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5722   echo $ECHO_N "(cached) $ECHO_C" >&6
5723 else
5724
5725                         cf_save_LDFLAGS=$LDFLAGS
5726                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5727                         cat >conftest.$ac_ext <<_ACEOF
5728 #line 5728 "configure"
5729 #include "confdefs.h"
5730
5731 int
5732 main ()
5733 {
5734 int i;
5735   ;
5736   return 0;
5737 }
5738 _ACEOF
5739 rm -f conftest.$ac_objext conftest$ac_exeext
5740 if { (eval echo "$as_me:5740: \"$ac_link\"") >&5
5741   (eval $ac_link) 2>&5
5742   ac_status=$?
5743   echo "$as_me:5743: \$? = $ac_status" >&5
5744   (exit $ac_status); } &&
5745          { ac_try='test -s conftest$ac_exeext'
5746   { (eval echo "$as_me:5746: \"$ac_try\"") >&5
5747   (eval $ac_try) 2>&5
5748   ac_status=$?
5749   echo "$as_me:5749: \$? = $ac_status" >&5
5750   (exit $ac_status); }; }; then
5751   cf_cv_ldflags_search_paths_first=yes
5752 else
5753   echo "$as_me: failed program was:" >&5
5754 cat conftest.$ac_ext >&5
5755 cf_cv_ldflags_search_paths_first=no
5756 fi
5757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5758                                 LDFLAGS=$cf_save_LDFLAGS
5759 fi
5760 echo "$as_me:5760: result: $cf_cv_ldflags_search_paths_first" >&5
5761 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5762                 if test $cf_cv_ldflags_search_paths_first = yes; then
5763                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5764                 fi
5765                 ;;
5766         hpux[7-8]*) #(vi
5767                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5768                 if test "$GCC" != yes; then
5769                         CC_SHARED_OPTS='+Z'
5770                 fi
5771                 MK_SHARED_LIB='${LD} -b -o $@'
5772                 INSTALL_LIB="-m 555"
5773                 ;;
5774         hpux*) #(vi
5775                 # (tested with gcc 2.7.2 -- I don't have c89)
5776                 if test "$GCC" = yes; then
5777                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5778                 else
5779                         CC_SHARED_OPTS='+Z'
5780                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5781                 fi
5782                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5783                 # HP-UX shared libraries must be executable, and should be
5784                 # readonly to exploit a quirk in the memory manager.
5785                 INSTALL_LIB="-m 555"
5786                 ;;
5787         interix*)
5788                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5789                 if test "$cf_cv_shlib_version" = rel; then
5790                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5791                 else
5792                         cf_shared_soname='`basename `'
5793                 fi
5794                 CC_SHARED_OPTS=
5795                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5796                 ;;
5797         irix*) #(vi
5798                 if test "$cf_cv_enable_rpath" = yes ; then
5799                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5800                 fi
5801                 # tested with IRIX 5.2 and 'cc'.
5802                 if test "$GCC" != yes; then
5803                         CC_SHARED_OPTS='-KPIC'
5804                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5805                 else
5806                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5807                 fi
5808                 cf_cv_rm_so_locs=yes
5809                 ;;
5810         linux*|gnu*|k*bsd*-gnu) #(vi
5811                 if test "$DFT_LWR_MODEL" = "shared" ; then
5812                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5813                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5814                 fi
5815                 if test "$cf_cv_enable_rpath" = yes ; then
5816                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5817                 fi
5818
5819         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5820         if test "$cf_cv_shlib_version" = rel; then
5821                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5822         else
5823                 cf_cv_shared_soname='`basename $@`'
5824         fi
5825
5826                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5827                 ;;
5828         mingw*) #(vi
5829                 cf_cv_shlib_version=mingw
5830                 cf_cv_shlib_version_infix=mingw
5831                 shlibdir=$bindir
5832                 MAKE_DLLS=
5833                 if test "$DFT_LWR_MODEL" = "shared" ; then
5834                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5835                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5836                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5837                 fi
5838                 CC_SHARED_OPTS=
5839                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5840                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5841                 cat >mk_shared_lib.sh <<-CF_EOF
5842                 #!/bin/sh
5843                 SHARED_LIB=\$1
5844                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5845                 shift
5846                 cat <<-EOF
5847                 Linking shared library
5848                 ** SHARED_LIB \$SHARED_LIB
5849                 ** IMPORT_LIB \$IMPORT_LIB
5850 EOF
5851                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5852 CF_EOF
5853                 chmod +x mk_shared_lib.sh
5854                 ;;
5855         openbsd[2-9].*|mirbsd*) #(vi
5856                 if test "$DFT_LWR_MODEL" = "shared" ; then
5857                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5858                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5859                 fi
5860                 if test "$cf_cv_enable_rpath" = yes ; then
5861                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5862                 fi
5863                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5864
5865         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5866         if test "$cf_cv_shlib_version" = rel; then
5867                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5868         else
5869                 cf_cv_shared_soname='`basename $@`'
5870         fi
5871
5872                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5873                 ;;
5874         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5875                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5876                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5877                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5878                 ;;
5879         dragonfly*|freebsd*) #(vi
5880                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5881                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5882                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5883                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5884                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5885                 fi
5886
5887         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5888         if test "$cf_cv_shlib_version" = rel; then
5889                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5890         else
5891                 cf_cv_shared_soname='`basename $@`'
5892         fi
5893
5894                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5895                 ;;
5896         netbsd*) #(vi
5897                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5898                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5899                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5900                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5901                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5902                         if test "$cf_cv_shlib_version" = auto; then
5903                         if test -f /usr/libexec/ld.elf_so; then
5904                                 cf_cv_shlib_version=abi
5905                         else
5906                                 cf_cv_shlib_version=rel
5907                         fi
5908                         fi
5909
5910         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5911         if test "$cf_cv_shlib_version" = rel; then
5912                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5913         else
5914                 cf_cv_shared_soname='`basename $@`'
5915         fi
5916
5917                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5918                 else
5919                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
5920                 fi
5921                 ;;
5922         osf*|mls+*) #(vi
5923                 # tested with OSF/1 V3.2 and 'cc'
5924                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5925                 # link with shared libs).
5926                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5927                 case $host_os in #(vi
5928                 osf4*)
5929                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5930                         ;;
5931                 esac
5932                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5933                 if test "$DFT_LWR_MODEL" = "shared" ; then
5934                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5935                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5936                 fi
5937                 cf_cv_rm_so_locs=yes
5938                 ;;
5939         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5940                 # tested with osr5.0.5
5941                 if test "$GCC" != yes; then
5942                         CC_SHARED_OPTS='-belf -KPIC'
5943                 fi
5944                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5945                 if test "$cf_cv_enable_rpath" = yes ; then
5946                         # only way is to set LD_RUN_PATH but no switch for it
5947                         RUN_PATH=$libdir
5948                 fi
5949                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5950                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5951                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5952                 ;;
5953         sunos4*) #(vi
5954                 # tested with SunOS 4.1.1 and gcc 2.7.0
5955                 if test "$GCC" != yes; then
5956                         CC_SHARED_OPTS='-KPIC'
5957                 fi
5958                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5959                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5960                 ;;
5961         solaris2*) #(vi
5962                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5963                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5964                 if test "$DFT_LWR_MODEL" = "shared" ; then
5965                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5966                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5967                 fi
5968                 if test "$cf_cv_enable_rpath" = yes ; then
5969                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5970                 fi
5971
5972         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5973         if test "$cf_cv_shlib_version" = rel; then
5974                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5975         else
5976                 cf_cv_shared_soname='`basename $@`'
5977         fi
5978
5979                 if test "$GCC" != yes; then
5980                         cf_save_CFLAGS="$CFLAGS"
5981                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5982                         do
5983                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5984                                 cat >conftest.$ac_ext <<_ACEOF
5985 #line 5985 "configure"
5986 #include "confdefs.h"
5987 #include <stdio.h>
5988 int
5989 main ()
5990 {
5991 printf("Hello\n");
5992   ;
5993   return 0;
5994 }
5995 _ACEOF
5996 rm -f conftest.$ac_objext
5997 if { (eval echo "$as_me:5997: \"$ac_compile\"") >&5
5998   (eval $ac_compile) 2>&5
5999   ac_status=$?
6000   echo "$as_me:6000: \$? = $ac_status" >&5
6001   (exit $ac_status); } &&
6002          { ac_try='test -s conftest.$ac_objext'
6003   { (eval echo "$as_me:6003: \"$ac_try\"") >&5
6004   (eval $ac_try) 2>&5
6005   ac_status=$?
6006   echo "$as_me:6006: \$? = $ac_status" >&5
6007   (exit $ac_status); }; }; then
6008   break
6009 else
6010   echo "$as_me: failed program was:" >&5
6011 cat conftest.$ac_ext >&5
6012 fi
6013 rm -f conftest.$ac_objext conftest.$ac_ext
6014                         done
6015                         CFLAGS="$cf_save_CFLAGS"
6016                         CC_SHARED_OPTS=$cf_shared_opts
6017                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6018                 else
6019                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6020                 fi
6021                 ;;
6022         sysv5uw7*|unix_sv*) #(vi
6023                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6024                 if test "$GCC" != yes; then
6025                         CC_SHARED_OPTS='-KPIC'
6026                 fi
6027                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6028                 ;;
6029         *)
6030                 CC_SHARED_OPTS='unknown'
6031                 MK_SHARED_LIB='echo unknown'
6032                 ;;
6033         esac
6034
6035         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6036         case "$cf_cv_shlib_version" in #(vi
6037         rel|abi)
6038                 case "$MK_SHARED_LIB" in #(vi
6039                 *'-o $@') #(vi
6040                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6041                         ;;
6042                 *)
6043                         { echo "$as_me:6043: WARNING: ignored --with-shlib-version" >&5
6044 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6045                         ;;
6046                 esac
6047                 ;;
6048         esac
6049
6050         if test -n "$cf_try_cflags"
6051         then
6052 cat > conftest.$ac_ext <<EOF
6053 #line 6053 "${as_me:-configure}"
6054 #include <stdio.h>
6055 int main(int argc, char *argv[])
6056 {
6057         printf("hello\n");
6058         return (argv[argc-1] == 0) ;
6059 }
6060 EOF
6061                 cf_save_CFLAGS="$CFLAGS"
6062                 for cf_opt in $cf_try_cflags
6063                 do
6064                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6065                         echo "$as_me:6065: checking if CFLAGS option -$cf_opt works" >&5
6066 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6067                         if { (eval echo "$as_me:6067: \"$ac_compile\"") >&5
6068   (eval $ac_compile) 2>&5
6069   ac_status=$?
6070   echo "$as_me:6070: \$? = $ac_status" >&5
6071   (exit $ac_status); }; then
6072                                 echo "$as_me:6072: result: yes" >&5
6073 echo "${ECHO_T}yes" >&6
6074                                 cf_save_CFLAGS="$CFLAGS"
6075                         else
6076                                 echo "$as_me:6076: result: no" >&5
6077 echo "${ECHO_T}no" >&6
6078                         fi
6079                 done
6080                 CFLAGS="$cf_save_CFLAGS"
6081         fi
6082
6083         # RPATH_LIST is a colon-separated list of directories
6084         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6085         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6086
6087         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6088
6089         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6090
6091 echo "${as_me:-configure}:6091: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6092
6093         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6094
6095 echo "${as_me:-configure}:6095: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6096
6097 if test "$CC_SHARED_OPTS" = "unknown"; then
6098         for model in $cf_list_models; do
6099                 if test "$model" = "shared"; then
6100                         { { echo "$as_me:6100: error: Shared libraries are not supported in this version" >&5
6101 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6102    { (exit 1); exit 1; }; }
6103                 fi
6104         done
6105 fi
6106
6107 # pretend that ncurses==ncursesw==ncursest
6108 echo "$as_me:6108: checking if you want to disable library suffixes" >&5
6109 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6110
6111 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6112 if test "${enable_lib_suffixes+set}" = set; then
6113   enableval="$enable_lib_suffixes"
6114   disable_lib_suffixes=$enableval
6115 else
6116   disable_lib_suffixes=no
6117 fi;
6118 echo "$as_me:6118: result: $disable_lib_suffixes" >&5
6119 echo "${ECHO_T}$disable_lib_suffixes" >&6
6120
6121 ### If we're building with rpath, try to link non-standard libs that way too.
6122 if test "$DFT_LWR_MODEL" = "shared"; then
6123
6124 echo "$as_me:6124: checking if rpath-hack should be disabled" >&5
6125 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6126
6127 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6128 if test "${enable_rpath_hack+set}" = set; then
6129   enableval="$enable_rpath_hack"
6130   test "$enableval" != no && enableval=yes
6131   if test "$enableval" != "yes" ; then
6132     cf_disable_rpath_hack=yes
6133   else
6134     cf_disable_rpath_hack=no
6135   fi
6136 else
6137   enableval=yes
6138   cf_disable_rpath_hack=no
6139
6140 fi;
6141 echo "$as_me:6141: result: $cf_disable_rpath_hack" >&5
6142 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6143 if test "$cf_disable_rpath_hack" = no ; then
6144
6145 echo "$as_me:6145: checking for updated LDFLAGS" >&5
6146 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6147 if test -n "$LD_RPATH_OPT" ; then
6148         echo "$as_me:6148: result: maybe" >&5
6149 echo "${ECHO_T}maybe" >&6
6150
6151         for ac_prog in ldd
6152 do
6153   # Extract the first word of "$ac_prog", so it can be a program name with args.
6154 set dummy $ac_prog; ac_word=$2
6155 echo "$as_me:6155: checking for $ac_word" >&5
6156 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6157 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6158   echo $ECHO_N "(cached) $ECHO_C" >&6
6159 else
6160   if test -n "$cf_ldd_prog"; then
6161   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6162 else
6163   ac_save_IFS=$IFS; IFS=$ac_path_separator
6164 ac_dummy="$PATH"
6165 for ac_dir in $ac_dummy; do
6166   IFS=$ac_save_IFS
6167   test -z "$ac_dir" && ac_dir=.
6168   $as_executable_p "$ac_dir/$ac_word" || continue
6169 ac_cv_prog_cf_ldd_prog="$ac_prog"
6170 echo "$as_me:6170: found $ac_dir/$ac_word" >&5
6171 break
6172 done
6173
6174 fi
6175 fi
6176 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6177 if test -n "$cf_ldd_prog"; then
6178   echo "$as_me:6178: result: $cf_ldd_prog" >&5
6179 echo "${ECHO_T}$cf_ldd_prog" >&6
6180 else
6181   echo "$as_me:6181: result: no" >&5
6182 echo "${ECHO_T}no" >&6
6183 fi
6184
6185   test -n "$cf_ldd_prog" && break
6186 done
6187 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6188
6189         cf_rpath_list="/usr/lib /lib"
6190         if test "$cf_ldd_prog" != no
6191         then
6192                 cf_rpath_oops=
6193
6194 cat >conftest.$ac_ext <<_ACEOF
6195 #line 6195 "configure"
6196 #include "confdefs.h"
6197 #include <stdio.h>
6198 int
6199 main ()
6200 {
6201 printf("Hello");
6202   ;
6203   return 0;
6204 }
6205 _ACEOF
6206 rm -f conftest.$ac_objext conftest$ac_exeext
6207 if { (eval echo "$as_me:6207: \"$ac_link\"") >&5
6208   (eval $ac_link) 2>&5
6209   ac_status=$?
6210   echo "$as_me:6210: \$? = $ac_status" >&5
6211   (exit $ac_status); } &&
6212          { ac_try='test -s conftest$ac_exeext'
6213   { (eval echo "$as_me:6213: \"$ac_try\"") >&5
6214   (eval $ac_try) 2>&5
6215   ac_status=$?
6216   echo "$as_me:6216: \$? = $ac_status" >&5
6217   (exit $ac_status); }; }; then
6218   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6219                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6220 else
6221   echo "$as_me: failed program was:" >&5
6222 cat conftest.$ac_ext >&5
6223 fi
6224 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6225
6226                 # If we passed the link-test, but get a "not found" on a given library,
6227                 # this could be due to inept reconfiguration of gcc to make it only
6228                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6229                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6230                 # /usr/local libraries.
6231                 if test -n "$cf_rpath_oops"
6232                 then
6233                         for cf_rpath_src in $cf_rpath_oops
6234                         do
6235                                 for cf_rpath_dir in \
6236                                         /usr/local \
6237                                         /usr/pkg \
6238                                         /opt/sfw
6239                                 do
6240                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6241                                         then
6242                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6243
6244 echo "${as_me:-configure}:6244: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6245
6246                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6247                                                 break
6248                                         fi
6249                                 done
6250                         done
6251                 fi
6252         fi
6253
6254         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6255
6256 echo "${as_me:-configure}:6256: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6257
6258 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6259
6260 echo "${as_me:-configure}:6260: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6261
6262 cf_rpath_dst=
6263 for cf_rpath_src in $LDFLAGS
6264 do
6265         case $cf_rpath_src in #(vi
6266         -L*) #(vi
6267
6268                 # check if this refers to a directory which we will ignore
6269                 cf_rpath_skip=no
6270                 if test -n "$cf_rpath_list"
6271                 then
6272                         for cf_rpath_item in $cf_rpath_list
6273                         do
6274                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6275                                 then
6276                                         cf_rpath_skip=yes
6277                                         break
6278                                 fi
6279                         done
6280                 fi
6281
6282                 if test "$cf_rpath_skip" = no
6283                 then
6284                         # transform the option
6285                         if test "$LD_RPATH_OPT" = "-R " ; then
6286                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6287                         else
6288                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6289                         fi
6290
6291                         # if we have not already added this, add it now
6292                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6293                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6294                         then
6295                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6296
6297 echo "${as_me:-configure}:6297: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6298
6299                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6300                         fi
6301                 fi
6302                 ;;
6303         esac
6304         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6305 done
6306 LDFLAGS=$cf_rpath_dst
6307
6308 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6309
6310 echo "${as_me:-configure}:6310: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6311
6312 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6313
6314 echo "${as_me:-configure}:6314: testing ...checking LIBS $LIBS ..." 1>&5
6315
6316 cf_rpath_dst=
6317 for cf_rpath_src in $LIBS
6318 do
6319         case $cf_rpath_src in #(vi
6320         -L*) #(vi
6321
6322                 # check if this refers to a directory which we will ignore
6323                 cf_rpath_skip=no
6324                 if test -n "$cf_rpath_list"
6325                 then
6326                         for cf_rpath_item in $cf_rpath_list
6327                         do
6328                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6329                                 then
6330                                         cf_rpath_skip=yes
6331                                         break
6332                                 fi
6333                         done
6334                 fi
6335
6336                 if test "$cf_rpath_skip" = no
6337                 then
6338                         # transform the option
6339                         if test "$LD_RPATH_OPT" = "-R " ; then
6340                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6341                         else
6342                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6343                         fi
6344
6345                         # if we have not already added this, add it now
6346                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6347                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6348                         then
6349                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6350
6351 echo "${as_me:-configure}:6351: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6352
6353                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6354                         fi
6355                 fi
6356                 ;;
6357         esac
6358         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6359 done
6360 LIBS=$cf_rpath_dst
6361
6362 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6363
6364 echo "${as_me:-configure}:6364: testing ...checked LIBS $LIBS ..." 1>&5
6365
6366         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6367
6368 echo "${as_me:-configure}:6368: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6369
6370 else
6371         echo "$as_me:6371: result: no" >&5
6372 echo "${ECHO_T}no" >&6
6373 fi
6374
6375 fi
6376
6377 fi
6378
6379 ###############################################################################
6380
6381 ###     use option --disable-overwrite to leave out the link to -lcurses
6382 echo "$as_me:6382: checking if you wish to install ncurses overwriting curses" >&5
6383 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6384
6385 # Check whether --enable-overwrite or --disable-overwrite was given.
6386 if test "${enable_overwrite+set}" = set; then
6387   enableval="$enable_overwrite"
6388   with_overwrite=$enableval
6389 else
6390   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6391 fi;
6392 echo "$as_me:6392: result: $with_overwrite" >&5
6393 echo "${ECHO_T}$with_overwrite" >&6
6394
6395 echo "$as_me:6395: checking if external terminfo-database is used" >&5
6396 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6397
6398 # Check whether --enable-database or --disable-database was given.
6399 if test "${enable_database+set}" = set; then
6400   enableval="$enable_database"
6401   use_database=$enableval
6402 else
6403   use_database=yes
6404 fi;
6405 echo "$as_me:6405: result: $use_database" >&5
6406 echo "${ECHO_T}$use_database" >&6
6407
6408 case $host_os in #(vi
6409 os2*) #(vi
6410         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6411         ;;
6412 *) #(vi
6413         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6414         ;;
6415 esac
6416
6417 NCURSES_USE_DATABASE=0
6418 if test "$use_database" != no ; then
6419         NCURSES_USE_DATABASE=1
6420
6421         echo "$as_me:6421: checking which terminfo source-file will be installed" >&5
6422 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6423
6424 # Check whether --with-database or --without-database was given.
6425 if test "${with_database+set}" = set; then
6426   withval="$with_database"
6427   TERMINFO_SRC=$withval
6428 fi;
6429         echo "$as_me:6429: result: $TERMINFO_SRC" >&5
6430 echo "${ECHO_T}$TERMINFO_SRC" >&6
6431
6432         echo "$as_me:6432: checking whether to use hashed database instead of directory/tree" >&5
6433 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6434
6435 # Check whether --with-hashed-db or --without-hashed-db was given.
6436 if test "${with_hashed_db+set}" = set; then
6437   withval="$with_hashed_db"
6438
6439 else
6440   with_hashed_db=no
6441 fi;
6442         echo "$as_me:6442: result: $with_hashed_db" >&5
6443 echo "${ECHO_T}$with_hashed_db" >&6
6444 else
6445         with_hashed_db=no
6446 fi
6447
6448 echo "$as_me:6448: checking for list of fallback descriptions" >&5
6449 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6450
6451 # Check whether --with-fallbacks or --without-fallbacks was given.
6452 if test "${with_fallbacks+set}" = set; then
6453   withval="$with_fallbacks"
6454   with_fallback=$withval
6455 else
6456   with_fallback=
6457 fi;
6458 echo "$as_me:6458: result: $with_fallback" >&5
6459 echo "${ECHO_T}$with_fallback" >&6
6460 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6461
6462 echo "$as_me:6462: checking if you want modern xterm or antique" >&5
6463 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6464
6465 # Check whether --with-xterm-new or --without-xterm-new was given.
6466 if test "${with_xterm_new+set}" = set; then
6467   withval="$with_xterm_new"
6468   with_xterm_new=$withval
6469 else
6470   with_xterm_new=yes
6471 fi;
6472 case $with_xterm_new in
6473 no)     with_xterm_new=xterm-old;;
6474 *)      with_xterm_new=xterm-new;;
6475 esac
6476 echo "$as_me:6476: result: $with_xterm_new" >&5
6477 echo "${ECHO_T}$with_xterm_new" >&6
6478 WHICH_XTERM=$with_xterm_new
6479
6480 echo "$as_me:6480: checking if xterm backspace sends BS or DEL" >&5
6481 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6482
6483 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6484 if test "${with_xterm_kbs+set}" = set; then
6485   withval="$with_xterm_kbs"
6486   with_xterm_kbs=$withval
6487 else
6488   with_xterm_kbs=BS
6489 fi;
6490 case x$with_xterm_kbs in
6491 xyes|xno|xBS|xbs|x8)
6492         with_xterm_kbs=BS
6493         ;;
6494 xDEL|xdel|x127)
6495         with_xterm_kbs=DEL
6496         ;;
6497 *)
6498         with_xterm_kbs=$withval
6499         ;;
6500 esac
6501 echo "$as_me:6501: result: $with_xterm_kbs" >&5
6502 echo "${ECHO_T}$with_xterm_kbs" >&6
6503 XTERM_KBS=$with_xterm_kbs
6504
6505 MAKE_TERMINFO=
6506 if test "$use_database" = no ; then
6507         TERMINFO="${datadir}/terminfo"
6508         MAKE_TERMINFO="#"
6509 else
6510
6511 echo "$as_me:6511: checking for list of terminfo directories" >&5
6512 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6513
6514 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6515 if test "${with_terminfo_dirs+set}" = set; then
6516   withval="$with_terminfo_dirs"
6517
6518 else
6519   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6520 fi;
6521 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6522 cf_dst_path=
6523 for cf_src_path in $withval
6524 do
6525
6526 if test "x$prefix" != xNONE; then
6527   cf_path_syntax="$prefix"
6528 else
6529   cf_path_syntax="$ac_default_prefix"
6530 fi
6531
6532 case ".$cf_src_path" in #(vi
6533 .\$\(*\)*|.\'*\'*) #(vi
6534   ;;
6535 ..|./*|.\\*) #(vi
6536   ;;
6537 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6538   ;;
6539 .\${*prefix}*|.\${*dir}*) #(vi
6540   eval cf_src_path="$cf_src_path"
6541   case ".$cf_src_path" in #(vi
6542   .NONE/*)
6543     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6544     ;;
6545   esac
6546   ;; #(vi
6547 .no|.NONE/*)
6548   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6549   ;;
6550 *)
6551   { { echo "$as_me:6551: error: expected a pathname, not \"$cf_src_path\"" >&5
6552 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6553    { (exit 1); exit 1; }; }
6554   ;;
6555 esac
6556
6557   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6558   cf_dst_path="${cf_dst_path}${cf_src_path}"
6559 done
6560 IFS="$ac_save_ifs"
6561
6562 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6563 # so we have to check/work around.  We do prefer the result of "eval"...
6564 eval cf_dst_eval="$cf_dst_path"
6565 case "x$cf_dst_eval" in #(vi
6566 xNONE*) #(vi
6567         TERMINFO_DIRS=$cf_dst_path
6568         ;;
6569 *)
6570         TERMINFO_DIRS="$cf_dst_eval"
6571         ;;
6572 esac
6573
6574 echo "$as_me:6574: result: $TERMINFO_DIRS" >&5
6575 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6576 test -n "$TERMINFO_DIRS" &&
6577 cat >>confdefs.h <<EOF
6578 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6579 EOF
6580
6581 echo "$as_me:6581: checking for default terminfo directory" >&5
6582 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6583
6584 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6585 if test "${with_default_terminfo_dir+set}" = set; then
6586   withval="$with_default_terminfo_dir"
6587
6588 else
6589   withval="${TERMINFO:-${datadir}/terminfo}"
6590 fi; if test -n "${datadir}/terminfo" ; then
6591
6592 if test "x$prefix" != xNONE; then
6593   cf_path_syntax="$prefix"
6594 else
6595   cf_path_syntax="$ac_default_prefix"
6596 fi
6597
6598 case ".$withval" in #(vi
6599 .\$\(*\)*|.\'*\'*) #(vi
6600   ;;
6601 ..|./*|.\\*) #(vi
6602   ;;
6603 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6604   ;;
6605 .\${*prefix}*|.\${*dir}*) #(vi
6606   eval withval="$withval"
6607   case ".$withval" in #(vi
6608   .NONE/*)
6609     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6610     ;;
6611   esac
6612   ;; #(vi
6613 .no|.NONE/*)
6614   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6615   ;;
6616 *)
6617   { { echo "$as_me:6617: error: expected a pathname, not \"$withval\"" >&5
6618 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6619    { (exit 1); exit 1; }; }
6620   ;;
6621 esac
6622
6623 fi
6624 eval TERMINFO="$withval"
6625
6626 echo "$as_me:6626: result: $TERMINFO" >&5
6627 echo "${ECHO_T}$TERMINFO" >&6
6628
6629 cat >>confdefs.h <<EOF
6630 #define TERMINFO "$TERMINFO"
6631 EOF
6632
6633 fi
6634
6635 ###     use option --disable-big-core to make tic run on small machines
6636 ###     We need 4Mb, check if we can allocate 50% more than that.
6637 echo "$as_me:6637: checking if big-core option selected" >&5
6638 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6639
6640 # Check whether --enable-big-core or --disable-big-core was given.
6641 if test "${enable_big_core+set}" = set; then
6642   enableval="$enable_big_core"
6643   with_big_core=$enableval
6644 else
6645   if test "$cross_compiling" = yes; then
6646   with_big_core=no
6647 else
6648   cat >conftest.$ac_ext <<_ACEOF
6649 #line 6649 "configure"
6650 #include "confdefs.h"
6651
6652 #include <stdlib.h>
6653 #include <string.h>
6654 int main() {
6655         unsigned long n = 6000000L;
6656         char *s = malloc(n);
6657         if (s != 0)
6658                 s[0] = s[n-1] = 0;
6659         ${cf_cv_main_return:-return}(s == 0);
6660 }
6661 _ACEOF
6662 rm -f conftest$ac_exeext
6663 if { (eval echo "$as_me:6663: \"$ac_link\"") >&5
6664   (eval $ac_link) 2>&5
6665   ac_status=$?
6666   echo "$as_me:6666: \$? = $ac_status" >&5
6667   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6668   { (eval echo "$as_me:6668: \"$ac_try\"") >&5
6669   (eval $ac_try) 2>&5
6670   ac_status=$?
6671   echo "$as_me:6671: \$? = $ac_status" >&5
6672   (exit $ac_status); }; }; then
6673   with_big_core=yes
6674 else
6675   echo "$as_me: program exited with status $ac_status" >&5
6676 echo "$as_me: failed program was:" >&5
6677 cat conftest.$ac_ext >&5
6678 with_big_core=no
6679 fi
6680 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6681 fi
6682 fi;
6683 echo "$as_me:6683: result: $with_big_core" >&5
6684 echo "${ECHO_T}$with_big_core" >&6
6685 test "x$with_big_core" = "xyes" &&
6686 cat >>confdefs.h <<\EOF
6687 #define HAVE_BIG_CORE 1
6688 EOF
6689
6690 ### ISO C only guarantees 512-char strings, we have tables which load faster
6691 ### when constructed using "big" strings.  More than the C compiler, the awk
6692 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6693 echo "$as_me:6693: checking if big-strings option selected" >&5
6694 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6695
6696 # Check whether --enable-big-strings or --disable-big-strings was given.
6697 if test "${enable_big_strings+set}" = set; then
6698   enableval="$enable_big_strings"
6699   with_big_strings=$enableval
6700 else
6701
6702         case x$AWK in #(vi
6703         x)
6704                 eval with_big_strings=no
6705                 ;;
6706         *) #(vi
6707                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6708                         | $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
6709                         eval with_big_strings=yes
6710                 else
6711                         eval with_big_strings=no
6712                 fi
6713                 ;;
6714         esac
6715
6716 fi;
6717 echo "$as_me:6717: result: $with_big_strings" >&5
6718 echo "${ECHO_T}$with_big_strings" >&6
6719
6720 USE_BIG_STRINGS=0
6721 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
6722
6723 ###     use option --enable-termcap to compile in the termcap fallback support
6724 echo "$as_me:6724: checking if you want termcap-fallback support" >&5
6725 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6726
6727 # Check whether --enable-termcap or --disable-termcap was given.
6728 if test "${enable_termcap+set}" = set; then
6729   enableval="$enable_termcap"
6730   with_termcap=$enableval
6731 else
6732   with_termcap=no
6733 fi;
6734 echo "$as_me:6734: result: $with_termcap" >&5
6735 echo "${ECHO_T}$with_termcap" >&6
6736
6737 NCURSES_USE_TERMCAP=0
6738 if test "x$with_termcap" != "xyes" ; then
6739         if test "$use_database" = no ; then
6740                 if test -z "$with_fallback" ; then
6741                         { { echo "$as_me:6741: error: You have disabled the database w/o specifying fallbacks" >&5
6742 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6743    { (exit 1); exit 1; }; }
6744                 fi
6745         fi
6746
6747 cat >>confdefs.h <<\EOF
6748 #define PURE_TERMINFO 1
6749 EOF
6750
6751 else
6752
6753         if test "$with_ticlib" != no ; then
6754                 { { echo "$as_me:6754: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6755 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6756    { (exit 1); exit 1; }; }
6757         fi
6758
6759         NCURSES_USE_TERMCAP=1
6760         echo "$as_me:6760: checking for list of termcap files" >&5
6761 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6762
6763 # Check whether --with-termpath or --without-termpath was given.
6764 if test "${with_termpath+set}" = set; then
6765   withval="$with_termpath"
6766
6767 else
6768   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6769 fi;
6770 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6771 cf_dst_path=
6772 for cf_src_path in $withval
6773 do
6774
6775 if test "x$prefix" != xNONE; then
6776   cf_path_syntax="$prefix"
6777 else
6778   cf_path_syntax="$ac_default_prefix"
6779 fi
6780
6781 case ".$cf_src_path" in #(vi
6782 .\$\(*\)*|.\'*\'*) #(vi
6783   ;;
6784 ..|./*|.\\*) #(vi
6785   ;;
6786 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6787   ;;
6788 .\${*prefix}*|.\${*dir}*) #(vi
6789   eval cf_src_path="$cf_src_path"
6790   case ".$cf_src_path" in #(vi
6791   .NONE/*)
6792     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6793     ;;
6794   esac
6795   ;; #(vi
6796 .no|.NONE/*)
6797   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6798   ;;
6799 *)
6800   { { echo "$as_me:6800: error: expected a pathname, not \"$cf_src_path\"" >&5
6801 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6802    { (exit 1); exit 1; }; }
6803   ;;
6804 esac
6805
6806   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6807   cf_dst_path="${cf_dst_path}${cf_src_path}"
6808 done
6809 IFS="$ac_save_ifs"
6810
6811 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6812 # so we have to check/work around.  We do prefer the result of "eval"...
6813 eval cf_dst_eval="$cf_dst_path"
6814 case "x$cf_dst_eval" in #(vi
6815 xNONE*) #(vi
6816         TERMPATH=$cf_dst_path
6817         ;;
6818 *)
6819         TERMPATH="$cf_dst_eval"
6820         ;;
6821 esac
6822
6823         echo "$as_me:6823: result: $TERMPATH" >&5
6824 echo "${ECHO_T}$TERMPATH" >&6
6825         test -n "$TERMPATH" &&
6826 cat >>confdefs.h <<EOF
6827 #define TERMPATH "$TERMPATH"
6828 EOF
6829
6830         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6831         echo "$as_me:6831: checking if fast termcap-loader is needed" >&5
6832 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6833
6834 # Check whether --enable-getcap or --disable-getcap was given.
6835 if test "${enable_getcap+set}" = set; then
6836   enableval="$enable_getcap"
6837   with_getcap=$enableval
6838 else
6839   with_getcap=no
6840 fi;
6841         echo "$as_me:6841: result: $with_getcap" >&5
6842 echo "${ECHO_T}$with_getcap" >&6
6843         test "x$with_getcap" = "xyes" &&
6844 cat >>confdefs.h <<\EOF
6845 #define USE_GETCAP 1
6846 EOF
6847
6848         echo "$as_me:6848: checking if translated termcaps will be cached in ~/.terminfo" >&5
6849 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6850
6851 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6852 if test "${enable_getcap_cache+set}" = set; then
6853   enableval="$enable_getcap_cache"
6854   with_getcap_cache=$enableval
6855 else
6856   with_getcap_cache=no
6857 fi;
6858         echo "$as_me:6858: result: $with_getcap_cache" >&5
6859 echo "${ECHO_T}$with_getcap_cache" >&6
6860         test "x$with_getcap_cache" = "xyes" &&
6861 cat >>confdefs.h <<\EOF
6862 #define USE_GETCAP_CACHE 1
6863 EOF
6864
6865 fi
6866
6867 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6868 echo "$as_me:6868: checking if ~/.terminfo is wanted" >&5
6869 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6870
6871 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6872 if test "${enable_home_terminfo+set}" = set; then
6873   enableval="$enable_home_terminfo"
6874   with_home_terminfo=$enableval
6875 else
6876   with_home_terminfo=yes
6877 fi;
6878 echo "$as_me:6878: result: $with_home_terminfo" >&5
6879 echo "${ECHO_T}$with_home_terminfo" >&6
6880 test "x$with_home_terminfo" = "xyes" &&
6881 cat >>confdefs.h <<\EOF
6882 #define USE_HOME_TERMINFO 1
6883 EOF
6884
6885 echo "$as_me:6885: checking if you want to use restricted environment when running as root" >&5
6886 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6887
6888 # Check whether --enable-root-environ or --disable-root-environ was given.
6889 if test "${enable_root_environ+set}" = set; then
6890   enableval="$enable_root_environ"
6891   with_root_environ=$enableval
6892 else
6893   with_root_environ=yes
6894 fi;
6895 echo "$as_me:6895: result: $with_root_environ" >&5
6896 echo "${ECHO_T}$with_root_environ" >&6
6897 test "x$with_root_environ" = xyes &&
6898 cat >>confdefs.h <<\EOF
6899 #define USE_ROOT_ENVIRON 1
6900 EOF
6901
6902 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6903 ###   to reduce storage requirements for the terminfo database.
6904
6905 for ac_func in \
6906         remove \
6907         unlink
6908 do
6909 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6910 echo "$as_me:6910: checking for $ac_func" >&5
6911 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6912 if eval "test \"\${$as_ac_var+set}\" = set"; then
6913   echo $ECHO_N "(cached) $ECHO_C" >&6
6914 else
6915   cat >conftest.$ac_ext <<_ACEOF
6916 #line 6916 "configure"
6917 #include "confdefs.h"
6918 /* System header to define __stub macros and hopefully few prototypes,
6919     which can conflict with char $ac_func (); below.  */
6920 #include <assert.h>
6921 /* Override any gcc2 internal prototype to avoid an error.  */
6922 #ifdef __cplusplus
6923 extern "C"
6924 #endif
6925 /* We use char because int might match the return type of a gcc2
6926    builtin and then its argument prototype would still apply.  */
6927 char $ac_func ();
6928 char (*f) ();
6929
6930 int
6931 main ()
6932 {
6933 /* The GNU C library defines this for functions which it implements
6934     to always fail with ENOSYS.  Some functions are actually named
6935     something starting with __ and the normal name is an alias.  */
6936 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6937 choke me
6938 #else
6939 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6940 #endif
6941
6942   ;
6943   return 0;
6944 }
6945 _ACEOF
6946 rm -f conftest.$ac_objext conftest$ac_exeext
6947 if { (eval echo "$as_me:6947: \"$ac_link\"") >&5
6948   (eval $ac_link) 2>&5
6949   ac_status=$?
6950   echo "$as_me:6950: \$? = $ac_status" >&5
6951   (exit $ac_status); } &&
6952          { ac_try='test -s conftest$ac_exeext'
6953   { (eval echo "$as_me:6953: \"$ac_try\"") >&5
6954   (eval $ac_try) 2>&5
6955   ac_status=$?
6956   echo "$as_me:6956: \$? = $ac_status" >&5
6957   (exit $ac_status); }; }; then
6958   eval "$as_ac_var=yes"
6959 else
6960   echo "$as_me: failed program was:" >&5
6961 cat conftest.$ac_ext >&5
6962 eval "$as_ac_var=no"
6963 fi
6964 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6965 fi
6966 echo "$as_me:6966: result: `eval echo '${'$as_ac_var'}'`" >&5
6967 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6968 if test `eval echo '${'$as_ac_var'}'` = yes; then
6969   cat >>confdefs.h <<EOF
6970 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6971 EOF
6972
6973 fi
6974 done
6975
6976 if test "$cross_compiling" = yes ; then
6977
6978 for ac_func in \
6979                 link \
6980                 symlink
6981 do
6982 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6983 echo "$as_me:6983: checking for $ac_func" >&5
6984 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6985 if eval "test \"\${$as_ac_var+set}\" = set"; then
6986   echo $ECHO_N "(cached) $ECHO_C" >&6
6987 else
6988   cat >conftest.$ac_ext <<_ACEOF
6989 #line 6989 "configure"
6990 #include "confdefs.h"
6991 /* System header to define __stub macros and hopefully few prototypes,
6992     which can conflict with char $ac_func (); below.  */
6993 #include <assert.h>
6994 /* Override any gcc2 internal prototype to avoid an error.  */
6995 #ifdef __cplusplus
6996 extern "C"
6997 #endif
6998 /* We use char because int might match the return type of a gcc2
6999    builtin and then its argument prototype would still apply.  */
7000 char $ac_func ();
7001 char (*f) ();
7002
7003 int
7004 main ()
7005 {
7006 /* The GNU C library defines this for functions which it implements
7007     to always fail with ENOSYS.  Some functions are actually named
7008     something starting with __ and the normal name is an alias.  */
7009 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7010 choke me
7011 #else
7012 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7013 #endif
7014
7015   ;
7016   return 0;
7017 }
7018 _ACEOF
7019 rm -f conftest.$ac_objext conftest$ac_exeext
7020 if { (eval echo "$as_me:7020: \"$ac_link\"") >&5
7021   (eval $ac_link) 2>&5
7022   ac_status=$?
7023   echo "$as_me:7023: \$? = $ac_status" >&5
7024   (exit $ac_status); } &&
7025          { ac_try='test -s conftest$ac_exeext'
7026   { (eval echo "$as_me:7026: \"$ac_try\"") >&5
7027   (eval $ac_try) 2>&5
7028   ac_status=$?
7029   echo "$as_me:7029: \$? = $ac_status" >&5
7030   (exit $ac_status); }; }; then
7031   eval "$as_ac_var=yes"
7032 else
7033   echo "$as_me: failed program was:" >&5
7034 cat conftest.$ac_ext >&5
7035 eval "$as_ac_var=no"
7036 fi
7037 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7038 fi
7039 echo "$as_me:7039: result: `eval echo '${'$as_ac_var'}'`" >&5
7040 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7041 if test `eval echo '${'$as_ac_var'}'` = yes; then
7042   cat >>confdefs.h <<EOF
7043 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7044 EOF
7045
7046 fi
7047 done
7048
7049 else
7050         echo "$as_me:7050: checking if link/symlink functions work" >&5
7051 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7052 if test "${cf_cv_link_funcs+set}" = set; then
7053   echo $ECHO_N "(cached) $ECHO_C" >&6
7054 else
7055
7056                 cf_cv_link_funcs=
7057                 for cf_func in link symlink ; do
7058                         if test "$cross_compiling" = yes; then
7059
7060                         eval 'ac_cv_func_'$cf_func'=error'
7061 else
7062   cat >conftest.$ac_ext <<_ACEOF
7063 #line 7063 "configure"
7064 #include "confdefs.h"
7065
7066 #include <sys/types.h>
7067 #include <sys/stat.h>
7068 #ifdef HAVE_UNISTD_H
7069 #include <unistd.h>
7070 #endif
7071 int main()
7072 {
7073         int fail = 0;
7074         char *src = "config.log";
7075         char *dst = "conftest.chk";
7076         struct stat src_sb;
7077         struct stat dst_sb;
7078
7079         stat(src, &src_sb);
7080         fail = ($cf_func("config.log", "conftest.chk") < 0)
7081             || (stat(dst, &dst_sb) < 0)
7082             || (dst_sb.st_mtime != src_sb.st_mtime);
7083 #ifdef HAVE_UNLINK
7084         unlink(dst);
7085 #else
7086         remove(dst);
7087 #endif
7088         ${cf_cv_main_return:-return} (fail);
7089 }
7090
7091 _ACEOF
7092 rm -f conftest$ac_exeext
7093 if { (eval echo "$as_me:7093: \"$ac_link\"") >&5
7094   (eval $ac_link) 2>&5
7095   ac_status=$?
7096   echo "$as_me:7096: \$? = $ac_status" >&5
7097   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7098   { (eval echo "$as_me:7098: \"$ac_try\"") >&5
7099   (eval $ac_try) 2>&5
7100   ac_status=$?
7101   echo "$as_me:7101: \$? = $ac_status" >&5
7102   (exit $ac_status); }; }; then
7103
7104                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7105                         eval 'ac_cv_func_'$cf_func'=yes'
7106 else
7107   echo "$as_me: program exited with status $ac_status" >&5
7108 echo "$as_me: failed program was:" >&5
7109 cat conftest.$ac_ext >&5
7110
7111                         eval 'ac_cv_func_'$cf_func'=no'
7112 fi
7113 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7114 fi
7115                 done
7116                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7117
7118 fi
7119 echo "$as_me:7119: result: $cf_cv_link_funcs" >&5
7120 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7121         test "$ac_cv_func_link"    = yes &&
7122 cat >>confdefs.h <<\EOF
7123 #define HAVE_LINK 1
7124 EOF
7125
7126         test "$ac_cv_func_symlink" = yes &&
7127 cat >>confdefs.h <<\EOF
7128 #define HAVE_SYMLINK 1
7129 EOF
7130
7131 fi
7132
7133 with_links=no
7134 with_symlinks=no
7135
7136 # soft links (symbolic links) are useful for some systems where hard links do
7137 # not work, or to make it simpler to copy terminfo trees around.
7138 if test "x$ac_cv_func_symlink" = xyes ; then
7139     echo "$as_me:7139: checking if tic should use symbolic links" >&5
7140 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7141
7142 # Check whether --enable-symlinks or --disable-symlinks was given.
7143 if test "${enable_symlinks+set}" = set; then
7144   enableval="$enable_symlinks"
7145   with_symlinks=$enableval
7146 else
7147   with_symlinks=no
7148 fi;
7149     echo "$as_me:7149: result: $with_symlinks" >&5
7150 echo "${ECHO_T}$with_symlinks" >&6
7151 fi
7152
7153 # If we have hard links and did not choose to use soft links instead, there is
7154 # no reason to make this choice optional - use the hard links.
7155 if test "$with_symlinks" = no ; then
7156     echo "$as_me:7156: checking if tic should use hard links" >&5
7157 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7158     if test "x$ac_cv_func_link" = xyes ; then
7159         with_links=yes
7160     else
7161         with_links=no
7162     fi
7163     echo "$as_me:7163: result: $with_links" >&5
7164 echo "${ECHO_T}$with_links" >&6
7165 fi
7166
7167 test "x$with_links" = xyes &&
7168 cat >>confdefs.h <<\EOF
7169 #define USE_LINKS 1
7170 EOF
7171
7172 test "x$with_symlinks" = xyes &&
7173 cat >>confdefs.h <<\EOF
7174 #define USE_SYMLINKS 1
7175 EOF
7176
7177 ###   use option --enable-broken-linker to force on use of broken-linker support
7178 echo "$as_me:7178: checking if you want broken-linker support code" >&5
7179 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7180
7181 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7182 if test "${enable_broken_linker+set}" = set; then
7183   enableval="$enable_broken_linker"
7184   with_broken_linker=$enableval
7185 else
7186   with_broken_linker=${BROKEN_LINKER:-no}
7187 fi;
7188 echo "$as_me:7188: result: $with_broken_linker" >&5
7189 echo "${ECHO_T}$with_broken_linker" >&6
7190
7191 BROKEN_LINKER=0
7192 if test "x$with_broken_linker" = xyes ; then
7193
7194 cat >>confdefs.h <<\EOF
7195 #define BROKEN_LINKER 1
7196 EOF
7197
7198         BROKEN_LINKER=1
7199 elif test "$DFT_LWR_MODEL" = shared ; then
7200         case $cf_cv_system_name in #(vi
7201         cygwin*)
7202
7203 cat >>confdefs.h <<\EOF
7204 #define BROKEN_LINKER 1
7205 EOF
7206
7207                 BROKEN_LINKER=1
7208                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7209
7210 echo "${as_me:-configure}:7210: testing cygwin linker is broken anyway ..." 1>&5
7211
7212                 ;;
7213         esac
7214 fi
7215
7216 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7217 echo "$as_me:7217: checking if tputs should process BSD-style prefix padding" >&5
7218 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7219
7220 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7221 if test "${enable_bsdpad+set}" = set; then
7222   enableval="$enable_bsdpad"
7223   with_bsdpad=$enableval
7224 else
7225   with_bsdpad=no
7226 fi;
7227 echo "$as_me:7227: result: $with_bsdpad" >&5
7228 echo "${ECHO_T}$with_bsdpad" >&6
7229 test "x$with_bsdpad" = xyes &&
7230 cat >>confdefs.h <<\EOF
7231 #define BSD_TPUTS 1
7232 EOF
7233
7234 ###   use option --enable-widec to turn on use of wide-character support
7235 NCURSES_CH_T=chtype
7236 NCURSES_LIBUTF8=0
7237
7238 NEED_WCHAR_H=0
7239 NCURSES_MBSTATE_T=0
7240 NCURSES_WCHAR_T=0
7241 NCURSES_WINT_T=0
7242
7243 # Check to define _XOPEN_SOURCE "automatically"
7244
7245 cf_XOPEN_SOURCE=500
7246 cf_POSIX_C_SOURCE=199506L
7247 cf_xopen_source=
7248
7249 case $host_os in #(vi
7250 aix[4-7]*) #(vi
7251         cf_xopen_source="-D_ALL_SOURCE"
7252         ;;
7253 cygwin|msys) #(vi
7254         cf_XOPEN_SOURCE=600
7255         ;;
7256 darwin[0-8].*) #(vi
7257         cf_xopen_source="-D_APPLE_C_SOURCE"
7258         ;;
7259 darwin*) #(vi
7260         cf_xopen_source="-D_DARWIN_C_SOURCE"
7261         cf_XOPEN_SOURCE=
7262         ;;
7263 freebsd*|dragonfly*) #(vi
7264         # 5.x headers associate
7265         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7266         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7267         cf_POSIX_C_SOURCE=200112L
7268         cf_XOPEN_SOURCE=600
7269         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7270         ;;
7271 hpux11*) #(vi
7272         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7273         ;;
7274 hpux*) #(vi
7275         cf_xopen_source="-D_HPUX_SOURCE"
7276         ;;
7277 irix[56].*) #(vi
7278         cf_xopen_source="-D_SGI_SOURCE"
7279         cf_XOPEN_SOURCE=
7280         ;;
7281 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7282
7283 echo "$as_me:7283: checking if we must define _GNU_SOURCE" >&5
7284 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7285 if test "${cf_cv_gnu_source+set}" = set; then
7286   echo $ECHO_N "(cached) $ECHO_C" >&6
7287 else
7288
7289 cat >conftest.$ac_ext <<_ACEOF
7290 #line 7290 "configure"
7291 #include "confdefs.h"
7292 #include <sys/types.h>
7293 int
7294 main ()
7295 {
7296
7297 #ifndef _XOPEN_SOURCE
7298 make an error
7299 #endif
7300   ;
7301   return 0;
7302 }
7303 _ACEOF
7304 rm -f conftest.$ac_objext
7305 if { (eval echo "$as_me:7305: \"$ac_compile\"") >&5
7306   (eval $ac_compile) 2>&5
7307   ac_status=$?
7308   echo "$as_me:7308: \$? = $ac_status" >&5
7309   (exit $ac_status); } &&
7310          { ac_try='test -s conftest.$ac_objext'
7311   { (eval echo "$as_me:7311: \"$ac_try\"") >&5
7312   (eval $ac_try) 2>&5
7313   ac_status=$?
7314   echo "$as_me:7314: \$? = $ac_status" >&5
7315   (exit $ac_status); }; }; then
7316   cf_cv_gnu_source=no
7317 else
7318   echo "$as_me: failed program was:" >&5
7319 cat conftest.$ac_ext >&5
7320 cf_save="$CPPFLAGS"
7321          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7322          cat >conftest.$ac_ext <<_ACEOF
7323 #line 7323 "configure"
7324 #include "confdefs.h"
7325 #include <sys/types.h>
7326 int
7327 main ()
7328 {
7329
7330 #ifdef _XOPEN_SOURCE
7331 make an error
7332 #endif
7333   ;
7334   return 0;
7335 }
7336 _ACEOF
7337 rm -f conftest.$ac_objext
7338 if { (eval echo "$as_me:7338: \"$ac_compile\"") >&5
7339   (eval $ac_compile) 2>&5
7340   ac_status=$?
7341   echo "$as_me:7341: \$? = $ac_status" >&5
7342   (exit $ac_status); } &&
7343          { ac_try='test -s conftest.$ac_objext'
7344   { (eval echo "$as_me:7344: \"$ac_try\"") >&5
7345   (eval $ac_try) 2>&5
7346   ac_status=$?
7347   echo "$as_me:7347: \$? = $ac_status" >&5
7348   (exit $ac_status); }; }; then
7349   cf_cv_gnu_source=no
7350 else
7351   echo "$as_me: failed program was:" >&5
7352 cat conftest.$ac_ext >&5
7353 cf_cv_gnu_source=yes
7354 fi
7355 rm -f conftest.$ac_objext conftest.$ac_ext
7356         CPPFLAGS="$cf_save"
7357
7358 fi
7359 rm -f conftest.$ac_objext conftest.$ac_ext
7360
7361 fi
7362 echo "$as_me:7362: result: $cf_cv_gnu_source" >&5
7363 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7364 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7365
7366         ;;
7367 mirbsd*) #(vi
7368         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7369         cf_XOPEN_SOURCE=
7370
7371 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7372
7373 cf_save_CFLAGS="$CFLAGS"
7374 cf_save_CPPFLAGS="$CPPFLAGS"
7375
7376 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7377         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7378                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7379
7380 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7381         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7382                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7383
7384 echo "$as_me:7384: checking if we should define _POSIX_C_SOURCE" >&5
7385 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7386 if test "${cf_cv_posix_c_source+set}" = set; then
7387   echo $ECHO_N "(cached) $ECHO_C" >&6
7388 else
7389
7390 echo "${as_me:-configure}:7390: testing if the symbol is already defined go no further ..." 1>&5
7391
7392         cat >conftest.$ac_ext <<_ACEOF
7393 #line 7393 "configure"
7394 #include "confdefs.h"
7395 #include <sys/types.h>
7396 int
7397 main ()
7398 {
7399
7400 #ifndef _POSIX_C_SOURCE
7401 make an error
7402 #endif
7403   ;
7404   return 0;
7405 }
7406 _ACEOF
7407 rm -f conftest.$ac_objext
7408 if { (eval echo "$as_me:7408: \"$ac_compile\"") >&5
7409   (eval $ac_compile) 2>&5
7410   ac_status=$?
7411   echo "$as_me:7411: \$? = $ac_status" >&5
7412   (exit $ac_status); } &&
7413          { ac_try='test -s conftest.$ac_objext'
7414   { (eval echo "$as_me:7414: \"$ac_try\"") >&5
7415   (eval $ac_try) 2>&5
7416   ac_status=$?
7417   echo "$as_me:7417: \$? = $ac_status" >&5
7418   (exit $ac_status); }; }; then
7419   cf_cv_posix_c_source=no
7420 else
7421   echo "$as_me: failed program was:" >&5
7422 cat conftest.$ac_ext >&5
7423 cf_want_posix_source=no
7424          case .$cf_POSIX_C_SOURCE in #(vi
7425          .[12]??*) #(vi
7426                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7427                 ;;
7428          .2) #(vi
7429                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7430                 cf_want_posix_source=yes
7431                 ;;
7432          .*)
7433                 cf_want_posix_source=yes
7434                 ;;
7435          esac
7436          if test "$cf_want_posix_source" = yes ; then
7437                 cat >conftest.$ac_ext <<_ACEOF
7438 #line 7438 "configure"
7439 #include "confdefs.h"
7440 #include <sys/types.h>
7441 int
7442 main ()
7443 {
7444
7445 #ifdef _POSIX_SOURCE
7446 make an error
7447 #endif
7448   ;
7449   return 0;
7450 }
7451 _ACEOF
7452 rm -f conftest.$ac_objext
7453 if { (eval echo "$as_me:7453: \"$ac_compile\"") >&5
7454   (eval $ac_compile) 2>&5
7455   ac_status=$?
7456   echo "$as_me:7456: \$? = $ac_status" >&5
7457   (exit $ac_status); } &&
7458          { ac_try='test -s conftest.$ac_objext'
7459   { (eval echo "$as_me:7459: \"$ac_try\"") >&5
7460   (eval $ac_try) 2>&5
7461   ac_status=$?
7462   echo "$as_me:7462: \$? = $ac_status" >&5
7463   (exit $ac_status); }; }; then
7464   :
7465 else
7466   echo "$as_me: failed program was:" >&5
7467 cat conftest.$ac_ext >&5
7468 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7469 fi
7470 rm -f conftest.$ac_objext conftest.$ac_ext
7471          fi
7472
7473 echo "${as_me:-configure}:7473: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7474
7475          CFLAGS="$cf_trim_CFLAGS"
7476          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7477
7478 echo "${as_me:-configure}:7478: testing if the second compile does not leave our definition intact error ..." 1>&5
7479
7480          cat >conftest.$ac_ext <<_ACEOF
7481 #line 7481 "configure"
7482 #include "confdefs.h"
7483 #include <sys/types.h>
7484 int
7485 main ()
7486 {
7487
7488 #ifndef _POSIX_C_SOURCE
7489 make an error
7490 #endif
7491   ;
7492   return 0;
7493 }
7494 _ACEOF
7495 rm -f conftest.$ac_objext
7496 if { (eval echo "$as_me:7496: \"$ac_compile\"") >&5
7497   (eval $ac_compile) 2>&5
7498   ac_status=$?
7499   echo "$as_me:7499: \$? = $ac_status" >&5
7500   (exit $ac_status); } &&
7501          { ac_try='test -s conftest.$ac_objext'
7502   { (eval echo "$as_me:7502: \"$ac_try\"") >&5
7503   (eval $ac_try) 2>&5
7504   ac_status=$?
7505   echo "$as_me:7505: \$? = $ac_status" >&5
7506   (exit $ac_status); }; }; then
7507   :
7508 else
7509   echo "$as_me: failed program was:" >&5
7510 cat conftest.$ac_ext >&5
7511 cf_cv_posix_c_source=no
7512 fi
7513 rm -f conftest.$ac_objext conftest.$ac_ext
7514          CFLAGS="$cf_save_CFLAGS"
7515          CPPFLAGS="$cf_save_CPPFLAGS"
7516
7517 fi
7518 rm -f conftest.$ac_objext conftest.$ac_ext
7519
7520 fi
7521 echo "$as_me:7521: result: $cf_cv_posix_c_source" >&5
7522 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7523
7524 if test "$cf_cv_posix_c_source" != no ; then
7525         CFLAGS="$cf_trim_CFLAGS"
7526         CPPFLAGS="$cf_trim_CPPFLAGS"
7527
7528 cf_fix_cppflags=no
7529 cf_new_cflags=
7530 cf_new_cppflags=
7531 cf_new_extra_cppflags=
7532
7533 for cf_add_cflags in $cf_cv_posix_c_source
7534 do
7535 case $cf_fix_cppflags in
7536 no)
7537         case $cf_add_cflags in #(vi
7538         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7539                 case $cf_add_cflags in
7540                 -D*)
7541                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7542
7543                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7544                                 && test -z "${cf_tst_cflags}" \
7545                                 && cf_fix_cppflags=yes
7546
7547                         if test $cf_fix_cppflags = yes ; then
7548                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7549                                 continue
7550                         elif test "${cf_tst_cflags}" = "\"'" ; then
7551                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7552                                 continue
7553                         fi
7554                         ;;
7555                 esac
7556                 case "$CPPFLAGS" in
7557                 *$cf_add_cflags) #(vi
7558                         ;;
7559                 *) #(vi
7560                         case $cf_add_cflags in #(vi
7561                         -D*)
7562                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7563
7564 CPPFLAGS=`echo "$CPPFLAGS" | \
7565         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7566                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7567
7568                                 ;;
7569                         esac
7570                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7571                         ;;
7572                 esac
7573                 ;;
7574         *)
7575                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7576                 ;;
7577         esac
7578         ;;
7579 yes)
7580         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7581
7582         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7583
7584         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7585                 && test -z "${cf_tst_cflags}" \
7586                 && cf_fix_cppflags=no
7587         ;;
7588 esac
7589 done
7590
7591 if test -n "$cf_new_cflags" ; then
7592
7593         CFLAGS="$CFLAGS $cf_new_cflags"
7594 fi
7595
7596 if test -n "$cf_new_cppflags" ; then
7597
7598         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7599 fi
7600
7601 if test -n "$cf_new_extra_cppflags" ; then
7602
7603         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7604 fi
7605
7606 fi
7607
7608         ;;
7609 netbsd*) #(vi
7610         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7611         ;;
7612 openbsd[4-9]*) #(vi
7613         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7614         cf_xopen_source="-D_BSD_SOURCE"
7615         cf_XOPEN_SOURCE=600
7616         ;;
7617 openbsd*) #(vi
7618         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7619         ;;
7620 osf[45]*) #(vi
7621         cf_xopen_source="-D_OSF_SOURCE"
7622         ;;
7623 nto-qnx*) #(vi
7624         cf_xopen_source="-D_QNX_SOURCE"
7625         ;;
7626 sco*) #(vi
7627         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7628         ;;
7629 solaris2.*) #(vi
7630         cf_xopen_source="-D__EXTENSIONS__"
7631         cf_cv_xopen_source=broken
7632         ;;
7633 *)
7634
7635 echo "$as_me:7635: checking if we should define _XOPEN_SOURCE" >&5
7636 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7637 if test "${cf_cv_xopen_source+set}" = set; then
7638   echo $ECHO_N "(cached) $ECHO_C" >&6
7639 else
7640
7641         cat >conftest.$ac_ext <<_ACEOF
7642 #line 7642 "configure"
7643 #include "confdefs.h"
7644
7645 #include <stdlib.h>
7646 #include <string.h>
7647 #include <sys/types.h>
7648
7649 int
7650 main ()
7651 {
7652
7653 #ifndef _XOPEN_SOURCE
7654 make an error
7655 #endif
7656   ;
7657   return 0;
7658 }
7659 _ACEOF
7660 rm -f conftest.$ac_objext
7661 if { (eval echo "$as_me:7661: \"$ac_compile\"") >&5
7662   (eval $ac_compile) 2>&5
7663   ac_status=$?
7664   echo "$as_me:7664: \$? = $ac_status" >&5
7665   (exit $ac_status); } &&
7666          { ac_try='test -s conftest.$ac_objext'
7667   { (eval echo "$as_me:7667: \"$ac_try\"") >&5
7668   (eval $ac_try) 2>&5
7669   ac_status=$?
7670   echo "$as_me:7670: \$? = $ac_status" >&5
7671   (exit $ac_status); }; }; then
7672   cf_cv_xopen_source=no
7673 else
7674   echo "$as_me: failed program was:" >&5
7675 cat conftest.$ac_ext >&5
7676 cf_save="$CPPFLAGS"
7677          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7678          cat >conftest.$ac_ext <<_ACEOF
7679 #line 7679 "configure"
7680 #include "confdefs.h"
7681
7682 #include <stdlib.h>
7683 #include <string.h>
7684 #include <sys/types.h>
7685
7686 int
7687 main ()
7688 {
7689
7690 #ifdef _XOPEN_SOURCE
7691 make an error
7692 #endif
7693   ;
7694   return 0;
7695 }
7696 _ACEOF
7697 rm -f conftest.$ac_objext
7698 if { (eval echo "$as_me:7698: \"$ac_compile\"") >&5
7699   (eval $ac_compile) 2>&5
7700   ac_status=$?
7701   echo "$as_me:7701: \$? = $ac_status" >&5
7702   (exit $ac_status); } &&
7703          { ac_try='test -s conftest.$ac_objext'
7704   { (eval echo "$as_me:7704: \"$ac_try\"") >&5
7705   (eval $ac_try) 2>&5
7706   ac_status=$?
7707   echo "$as_me:7707: \$? = $ac_status" >&5
7708   (exit $ac_status); }; }; then
7709   cf_cv_xopen_source=no
7710 else
7711   echo "$as_me: failed program was:" >&5
7712 cat conftest.$ac_ext >&5
7713 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7714 fi
7715 rm -f conftest.$ac_objext conftest.$ac_ext
7716         CPPFLAGS="$cf_save"
7717
7718 fi
7719 rm -f conftest.$ac_objext conftest.$ac_ext
7720
7721 fi
7722 echo "$as_me:7722: result: $cf_cv_xopen_source" >&5
7723 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7724
7725 if test "$cf_cv_xopen_source" != no ; then
7726
7727 CFLAGS=`echo "$CFLAGS" | \
7728         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7729                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7730
7731 CPPFLAGS=`echo "$CPPFLAGS" | \
7732         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7733                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7734
7735         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7736
7737 cf_fix_cppflags=no
7738 cf_new_cflags=
7739 cf_new_cppflags=
7740 cf_new_extra_cppflags=
7741
7742 for cf_add_cflags in $cf_temp_xopen_source
7743 do
7744 case $cf_fix_cppflags in
7745 no)
7746         case $cf_add_cflags in #(vi
7747         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7748                 case $cf_add_cflags in
7749                 -D*)
7750                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7751
7752                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7753                                 && test -z "${cf_tst_cflags}" \
7754                                 && cf_fix_cppflags=yes
7755
7756                         if test $cf_fix_cppflags = yes ; then
7757                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7758                                 continue
7759                         elif test "${cf_tst_cflags}" = "\"'" ; then
7760                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7761                                 continue
7762                         fi
7763                         ;;
7764                 esac
7765                 case "$CPPFLAGS" in
7766                 *$cf_add_cflags) #(vi
7767                         ;;
7768                 *) #(vi
7769                         case $cf_add_cflags in #(vi
7770                         -D*)
7771                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7772
7773 CPPFLAGS=`echo "$CPPFLAGS" | \
7774         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7775                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7776
7777                                 ;;
7778                         esac
7779                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7780                         ;;
7781                 esac
7782                 ;;
7783         *)
7784                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7785                 ;;
7786         esac
7787         ;;
7788 yes)
7789         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7790
7791         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7792
7793         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7794                 && test -z "${cf_tst_cflags}" \
7795                 && cf_fix_cppflags=no
7796         ;;
7797 esac
7798 done
7799
7800 if test -n "$cf_new_cflags" ; then
7801
7802         CFLAGS="$CFLAGS $cf_new_cflags"
7803 fi
7804
7805 if test -n "$cf_new_cppflags" ; then
7806
7807         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7808 fi
7809
7810 if test -n "$cf_new_extra_cppflags" ; then
7811
7812         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7813 fi
7814
7815 fi
7816
7817 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7818
7819 cf_save_CFLAGS="$CFLAGS"
7820 cf_save_CPPFLAGS="$CPPFLAGS"
7821
7822 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7823         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7824                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7825
7826 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7827         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7828                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7829
7830 echo "$as_me:7830: checking if we should define _POSIX_C_SOURCE" >&5
7831 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7832 if test "${cf_cv_posix_c_source+set}" = set; then
7833   echo $ECHO_N "(cached) $ECHO_C" >&6
7834 else
7835
7836 echo "${as_me:-configure}:7836: testing if the symbol is already defined go no further ..." 1>&5
7837
7838         cat >conftest.$ac_ext <<_ACEOF
7839 #line 7839 "configure"
7840 #include "confdefs.h"
7841 #include <sys/types.h>
7842 int
7843 main ()
7844 {
7845
7846 #ifndef _POSIX_C_SOURCE
7847 make an error
7848 #endif
7849   ;
7850   return 0;
7851 }
7852 _ACEOF
7853 rm -f conftest.$ac_objext
7854 if { (eval echo "$as_me:7854: \"$ac_compile\"") >&5
7855   (eval $ac_compile) 2>&5
7856   ac_status=$?
7857   echo "$as_me:7857: \$? = $ac_status" >&5
7858   (exit $ac_status); } &&
7859          { ac_try='test -s conftest.$ac_objext'
7860   { (eval echo "$as_me:7860: \"$ac_try\"") >&5
7861   (eval $ac_try) 2>&5
7862   ac_status=$?
7863   echo "$as_me:7863: \$? = $ac_status" >&5
7864   (exit $ac_status); }; }; then
7865   cf_cv_posix_c_source=no
7866 else
7867   echo "$as_me: failed program was:" >&5
7868 cat conftest.$ac_ext >&5
7869 cf_want_posix_source=no
7870          case .$cf_POSIX_C_SOURCE in #(vi
7871          .[12]??*) #(vi
7872                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7873                 ;;
7874          .2) #(vi
7875                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7876                 cf_want_posix_source=yes
7877                 ;;
7878          .*)
7879                 cf_want_posix_source=yes
7880                 ;;
7881          esac
7882          if test "$cf_want_posix_source" = yes ; then
7883                 cat >conftest.$ac_ext <<_ACEOF
7884 #line 7884 "configure"
7885 #include "confdefs.h"
7886 #include <sys/types.h>
7887 int
7888 main ()
7889 {
7890
7891 #ifdef _POSIX_SOURCE
7892 make an error
7893 #endif
7894   ;
7895   return 0;
7896 }
7897 _ACEOF
7898 rm -f conftest.$ac_objext
7899 if { (eval echo "$as_me:7899: \"$ac_compile\"") >&5
7900   (eval $ac_compile) 2>&5
7901   ac_status=$?
7902   echo "$as_me:7902: \$? = $ac_status" >&5
7903   (exit $ac_status); } &&
7904          { ac_try='test -s conftest.$ac_objext'
7905   { (eval echo "$as_me:7905: \"$ac_try\"") >&5
7906   (eval $ac_try) 2>&5
7907   ac_status=$?
7908   echo "$as_me:7908: \$? = $ac_status" >&5
7909   (exit $ac_status); }; }; then
7910   :
7911 else
7912   echo "$as_me: failed program was:" >&5
7913 cat conftest.$ac_ext >&5
7914 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7915 fi
7916 rm -f conftest.$ac_objext conftest.$ac_ext
7917          fi
7918
7919 echo "${as_me:-configure}:7919: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7920
7921          CFLAGS="$cf_trim_CFLAGS"
7922          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7923
7924 echo "${as_me:-configure}:7924: testing if the second compile does not leave our definition intact error ..." 1>&5
7925
7926          cat >conftest.$ac_ext <<_ACEOF
7927 #line 7927 "configure"
7928 #include "confdefs.h"
7929 #include <sys/types.h>
7930 int
7931 main ()
7932 {
7933
7934 #ifndef _POSIX_C_SOURCE
7935 make an error
7936 #endif
7937   ;
7938   return 0;
7939 }
7940 _ACEOF
7941 rm -f conftest.$ac_objext
7942 if { (eval echo "$as_me:7942: \"$ac_compile\"") >&5
7943   (eval $ac_compile) 2>&5
7944   ac_status=$?
7945   echo "$as_me:7945: \$? = $ac_status" >&5
7946   (exit $ac_status); } &&
7947          { ac_try='test -s conftest.$ac_objext'
7948   { (eval echo "$as_me:7948: \"$ac_try\"") >&5
7949   (eval $ac_try) 2>&5
7950   ac_status=$?
7951   echo "$as_me:7951: \$? = $ac_status" >&5
7952   (exit $ac_status); }; }; then
7953   :
7954 else
7955   echo "$as_me: failed program was:" >&5
7956 cat conftest.$ac_ext >&5
7957 cf_cv_posix_c_source=no
7958 fi
7959 rm -f conftest.$ac_objext conftest.$ac_ext
7960          CFLAGS="$cf_save_CFLAGS"
7961          CPPFLAGS="$cf_save_CPPFLAGS"
7962
7963 fi
7964 rm -f conftest.$ac_objext conftest.$ac_ext
7965
7966 fi
7967 echo "$as_me:7967: result: $cf_cv_posix_c_source" >&5
7968 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7969
7970 if test "$cf_cv_posix_c_source" != no ; then
7971         CFLAGS="$cf_trim_CFLAGS"
7972         CPPFLAGS="$cf_trim_CPPFLAGS"
7973
7974 cf_fix_cppflags=no
7975 cf_new_cflags=
7976 cf_new_cppflags=
7977 cf_new_extra_cppflags=
7978
7979 for cf_add_cflags in $cf_cv_posix_c_source
7980 do
7981 case $cf_fix_cppflags in
7982 no)
7983         case $cf_add_cflags in #(vi
7984         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7985                 case $cf_add_cflags in
7986                 -D*)
7987                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7988
7989                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7990                                 && test -z "${cf_tst_cflags}" \
7991                                 && cf_fix_cppflags=yes
7992
7993                         if test $cf_fix_cppflags = yes ; then
7994                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7995                                 continue
7996                         elif test "${cf_tst_cflags}" = "\"'" ; then
7997                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7998                                 continue
7999                         fi
8000                         ;;
8001                 esac
8002                 case "$CPPFLAGS" in
8003                 *$cf_add_cflags) #(vi
8004                         ;;
8005                 *) #(vi
8006                         case $cf_add_cflags in #(vi
8007                         -D*)
8008                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8009
8010 CPPFLAGS=`echo "$CPPFLAGS" | \
8011         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8012                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8013
8014                                 ;;
8015                         esac
8016                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8017                         ;;
8018                 esac
8019                 ;;
8020         *)
8021                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8022                 ;;
8023         esac
8024         ;;
8025 yes)
8026         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8027
8028         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8029
8030         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8031                 && test -z "${cf_tst_cflags}" \
8032                 && cf_fix_cppflags=no
8033         ;;
8034 esac
8035 done
8036
8037 if test -n "$cf_new_cflags" ; then
8038
8039         CFLAGS="$CFLAGS $cf_new_cflags"
8040 fi
8041
8042 if test -n "$cf_new_cppflags" ; then
8043
8044         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8045 fi
8046
8047 if test -n "$cf_new_extra_cppflags" ; then
8048
8049         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8050 fi
8051
8052 fi
8053
8054         ;;
8055 esac
8056
8057 if test -n "$cf_xopen_source" ; then
8058
8059 cf_fix_cppflags=no
8060 cf_new_cflags=
8061 cf_new_cppflags=
8062 cf_new_extra_cppflags=
8063
8064 for cf_add_cflags in $cf_xopen_source
8065 do
8066 case $cf_fix_cppflags in
8067 no)
8068         case $cf_add_cflags in #(vi
8069         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8070                 case $cf_add_cflags in
8071                 -D*)
8072                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8073
8074                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8075                                 && test -z "${cf_tst_cflags}" \
8076                                 && cf_fix_cppflags=yes
8077
8078                         if test $cf_fix_cppflags = yes ; then
8079                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8080                                 continue
8081                         elif test "${cf_tst_cflags}" = "\"'" ; then
8082                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8083                                 continue
8084                         fi
8085                         ;;
8086                 esac
8087                 case "$CPPFLAGS" in
8088                 *$cf_add_cflags) #(vi
8089                         ;;
8090                 *) #(vi
8091                         case $cf_add_cflags in #(vi
8092                         -D*)
8093                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8094
8095 CPPFLAGS=`echo "$CPPFLAGS" | \
8096         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8097                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8098
8099                                 ;;
8100                         esac
8101                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8102                         ;;
8103                 esac
8104                 ;;
8105         *)
8106                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8107                 ;;
8108         esac
8109         ;;
8110 yes)
8111         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8112
8113         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8114
8115         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8116                 && test -z "${cf_tst_cflags}" \
8117                 && cf_fix_cppflags=no
8118         ;;
8119 esac
8120 done
8121
8122 if test -n "$cf_new_cflags" ; then
8123
8124         CFLAGS="$CFLAGS $cf_new_cflags"
8125 fi
8126
8127 if test -n "$cf_new_cppflags" ; then
8128
8129         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8130 fi
8131
8132 if test -n "$cf_new_extra_cppflags" ; then
8133
8134         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8135 fi
8136
8137 fi
8138
8139 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8140         echo "$as_me:8140: checking if _XOPEN_SOURCE really is set" >&5
8141 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8142         cat >conftest.$ac_ext <<_ACEOF
8143 #line 8143 "configure"
8144 #include "confdefs.h"
8145 #include <stdlib.h>
8146 int
8147 main ()
8148 {
8149
8150 #ifndef _XOPEN_SOURCE
8151 make an error
8152 #endif
8153   ;
8154   return 0;
8155 }
8156 _ACEOF
8157 rm -f conftest.$ac_objext
8158 if { (eval echo "$as_me:8158: \"$ac_compile\"") >&5
8159   (eval $ac_compile) 2>&5
8160   ac_status=$?
8161   echo "$as_me:8161: \$? = $ac_status" >&5
8162   (exit $ac_status); } &&
8163          { ac_try='test -s conftest.$ac_objext'
8164   { (eval echo "$as_me:8164: \"$ac_try\"") >&5
8165   (eval $ac_try) 2>&5
8166   ac_status=$?
8167   echo "$as_me:8167: \$? = $ac_status" >&5
8168   (exit $ac_status); }; }; then
8169   cf_XOPEN_SOURCE_set=yes
8170 else
8171   echo "$as_me: failed program was:" >&5
8172 cat conftest.$ac_ext >&5
8173 cf_XOPEN_SOURCE_set=no
8174 fi
8175 rm -f conftest.$ac_objext conftest.$ac_ext
8176         echo "$as_me:8176: result: $cf_XOPEN_SOURCE_set" >&5
8177 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8178         if test $cf_XOPEN_SOURCE_set = yes
8179         then
8180                 cat >conftest.$ac_ext <<_ACEOF
8181 #line 8181 "configure"
8182 #include "confdefs.h"
8183 #include <stdlib.h>
8184 int
8185 main ()
8186 {
8187
8188 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8189 make an error
8190 #endif
8191   ;
8192   return 0;
8193 }
8194 _ACEOF
8195 rm -f conftest.$ac_objext
8196 if { (eval echo "$as_me:8196: \"$ac_compile\"") >&5
8197   (eval $ac_compile) 2>&5
8198   ac_status=$?
8199   echo "$as_me:8199: \$? = $ac_status" >&5
8200   (exit $ac_status); } &&
8201          { ac_try='test -s conftest.$ac_objext'
8202   { (eval echo "$as_me:8202: \"$ac_try\"") >&5
8203   (eval $ac_try) 2>&5
8204   ac_status=$?
8205   echo "$as_me:8205: \$? = $ac_status" >&5
8206   (exit $ac_status); }; }; then
8207   cf_XOPEN_SOURCE_set_ok=yes
8208 else
8209   echo "$as_me: failed program was:" >&5
8210 cat conftest.$ac_ext >&5
8211 cf_XOPEN_SOURCE_set_ok=no
8212 fi
8213 rm -f conftest.$ac_objext conftest.$ac_ext
8214                 if test $cf_XOPEN_SOURCE_set_ok = no
8215                 then
8216                         { echo "$as_me:8216: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8217 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8218                 fi
8219         else
8220
8221 echo "$as_me:8221: checking if we should define _XOPEN_SOURCE" >&5
8222 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8223 if test "${cf_cv_xopen_source+set}" = set; then
8224   echo $ECHO_N "(cached) $ECHO_C" >&6
8225 else
8226
8227         cat >conftest.$ac_ext <<_ACEOF
8228 #line 8228 "configure"
8229 #include "confdefs.h"
8230
8231 #include <stdlib.h>
8232 #include <string.h>
8233 #include <sys/types.h>
8234
8235 int
8236 main ()
8237 {
8238
8239 #ifndef _XOPEN_SOURCE
8240 make an error
8241 #endif
8242   ;
8243   return 0;
8244 }
8245 _ACEOF
8246 rm -f conftest.$ac_objext
8247 if { (eval echo "$as_me:8247: \"$ac_compile\"") >&5
8248   (eval $ac_compile) 2>&5
8249   ac_status=$?
8250   echo "$as_me:8250: \$? = $ac_status" >&5
8251   (exit $ac_status); } &&
8252          { ac_try='test -s conftest.$ac_objext'
8253   { (eval echo "$as_me:8253: \"$ac_try\"") >&5
8254   (eval $ac_try) 2>&5
8255   ac_status=$?
8256   echo "$as_me:8256: \$? = $ac_status" >&5
8257   (exit $ac_status); }; }; then
8258   cf_cv_xopen_source=no
8259 else
8260   echo "$as_me: failed program was:" >&5
8261 cat conftest.$ac_ext >&5
8262 cf_save="$CPPFLAGS"
8263          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8264          cat >conftest.$ac_ext <<_ACEOF
8265 #line 8265 "configure"
8266 #include "confdefs.h"
8267
8268 #include <stdlib.h>
8269 #include <string.h>
8270 #include <sys/types.h>
8271
8272 int
8273 main ()
8274 {
8275
8276 #ifdef _XOPEN_SOURCE
8277 make an error
8278 #endif
8279   ;
8280   return 0;
8281 }
8282 _ACEOF
8283 rm -f conftest.$ac_objext
8284 if { (eval echo "$as_me:8284: \"$ac_compile\"") >&5
8285   (eval $ac_compile) 2>&5
8286   ac_status=$?
8287   echo "$as_me:8287: \$? = $ac_status" >&5
8288   (exit $ac_status); } &&
8289          { ac_try='test -s conftest.$ac_objext'
8290   { (eval echo "$as_me:8290: \"$ac_try\"") >&5
8291   (eval $ac_try) 2>&5
8292   ac_status=$?
8293   echo "$as_me:8293: \$? = $ac_status" >&5
8294   (exit $ac_status); }; }; then
8295   cf_cv_xopen_source=no
8296 else
8297   echo "$as_me: failed program was:" >&5
8298 cat conftest.$ac_ext >&5
8299 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8300 fi
8301 rm -f conftest.$ac_objext conftest.$ac_ext
8302         CPPFLAGS="$cf_save"
8303
8304 fi
8305 rm -f conftest.$ac_objext conftest.$ac_ext
8306
8307 fi
8308 echo "$as_me:8308: result: $cf_cv_xopen_source" >&5
8309 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8310
8311 if test "$cf_cv_xopen_source" != no ; then
8312
8313 CFLAGS=`echo "$CFLAGS" | \
8314         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8315                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8316
8317 CPPFLAGS=`echo "$CPPFLAGS" | \
8318         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8319                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8320
8321         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8322
8323 cf_fix_cppflags=no
8324 cf_new_cflags=
8325 cf_new_cppflags=
8326 cf_new_extra_cppflags=
8327
8328 for cf_add_cflags in $cf_temp_xopen_source
8329 do
8330 case $cf_fix_cppflags in
8331 no)
8332         case $cf_add_cflags in #(vi
8333         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8334                 case $cf_add_cflags in
8335                 -D*)
8336                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8337
8338                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8339                                 && test -z "${cf_tst_cflags}" \
8340                                 && cf_fix_cppflags=yes
8341
8342                         if test $cf_fix_cppflags = yes ; then
8343                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8344                                 continue
8345                         elif test "${cf_tst_cflags}" = "\"'" ; then
8346                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8347                                 continue
8348                         fi
8349                         ;;
8350                 esac
8351                 case "$CPPFLAGS" in
8352                 *$cf_add_cflags) #(vi
8353                         ;;
8354                 *) #(vi
8355                         case $cf_add_cflags in #(vi
8356                         -D*)
8357                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8358
8359 CPPFLAGS=`echo "$CPPFLAGS" | \
8360         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8361                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8362
8363                                 ;;
8364                         esac
8365                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8366                         ;;
8367                 esac
8368                 ;;
8369         *)
8370                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8371                 ;;
8372         esac
8373         ;;
8374 yes)
8375         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8376
8377         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8378
8379         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8380                 && test -z "${cf_tst_cflags}" \
8381                 && cf_fix_cppflags=no
8382         ;;
8383 esac
8384 done
8385
8386 if test -n "$cf_new_cflags" ; then
8387
8388         CFLAGS="$CFLAGS $cf_new_cflags"
8389 fi
8390
8391 if test -n "$cf_new_cppflags" ; then
8392
8393         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8394 fi
8395
8396 if test -n "$cf_new_extra_cppflags" ; then
8397
8398         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8399 fi
8400
8401 fi
8402
8403         fi
8404 fi
8405
8406 # Work around breakage on OS X
8407
8408 echo "$as_me:8408: checking if SIGWINCH is defined" >&5
8409 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8410 if test "${cf_cv_define_sigwinch+set}" = set; then
8411   echo $ECHO_N "(cached) $ECHO_C" >&6
8412 else
8413
8414         cat >conftest.$ac_ext <<_ACEOF
8415 #line 8415 "configure"
8416 #include "confdefs.h"
8417
8418 #include <sys/types.h>
8419 #include <sys/signal.h>
8420
8421 int
8422 main ()
8423 {
8424 int x = SIGWINCH
8425   ;
8426   return 0;
8427 }
8428 _ACEOF
8429 rm -f conftest.$ac_objext
8430 if { (eval echo "$as_me:8430: \"$ac_compile\"") >&5
8431   (eval $ac_compile) 2>&5
8432   ac_status=$?
8433   echo "$as_me:8433: \$? = $ac_status" >&5
8434   (exit $ac_status); } &&
8435          { ac_try='test -s conftest.$ac_objext'
8436   { (eval echo "$as_me:8436: \"$ac_try\"") >&5
8437   (eval $ac_try) 2>&5
8438   ac_status=$?
8439   echo "$as_me:8439: \$? = $ac_status" >&5
8440   (exit $ac_status); }; }; then
8441   cf_cv_define_sigwinch=yes
8442 else
8443   echo "$as_me: failed program was:" >&5
8444 cat conftest.$ac_ext >&5
8445 cat >conftest.$ac_ext <<_ACEOF
8446 #line 8446 "configure"
8447 #include "confdefs.h"
8448
8449 #undef _XOPEN_SOURCE
8450 #undef _POSIX_SOURCE
8451 #undef _POSIX_C_SOURCE
8452 #include <sys/types.h>
8453 #include <sys/signal.h>
8454
8455 int
8456 main ()
8457 {
8458 int x = SIGWINCH
8459   ;
8460   return 0;
8461 }
8462 _ACEOF
8463 rm -f conftest.$ac_objext
8464 if { (eval echo "$as_me:8464: \"$ac_compile\"") >&5
8465   (eval $ac_compile) 2>&5
8466   ac_status=$?
8467   echo "$as_me:8467: \$? = $ac_status" >&5
8468   (exit $ac_status); } &&
8469          { ac_try='test -s conftest.$ac_objext'
8470   { (eval echo "$as_me:8470: \"$ac_try\"") >&5
8471   (eval $ac_try) 2>&5
8472   ac_status=$?
8473   echo "$as_me:8473: \$? = $ac_status" >&5
8474   (exit $ac_status); }; }; then
8475   cf_cv_define_sigwinch=maybe
8476 else
8477   echo "$as_me: failed program was:" >&5
8478 cat conftest.$ac_ext >&5
8479 cf_cv_define_sigwinch=no
8480 fi
8481 rm -f conftest.$ac_objext conftest.$ac_ext
8482
8483 fi
8484 rm -f conftest.$ac_objext conftest.$ac_ext
8485
8486 fi
8487 echo "$as_me:8487: result: $cf_cv_define_sigwinch" >&5
8488 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8489
8490 if test "$cf_cv_define_sigwinch" = maybe ; then
8491 echo "$as_me:8491: checking for actual SIGWINCH definition" >&5
8492 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8493 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8494   echo $ECHO_N "(cached) $ECHO_C" >&6
8495 else
8496
8497 cf_cv_fixup_sigwinch=unknown
8498 cf_sigwinch=32
8499 while test $cf_sigwinch != 1
8500 do
8501         cat >conftest.$ac_ext <<_ACEOF
8502 #line 8502 "configure"
8503 #include "confdefs.h"
8504
8505 #undef _XOPEN_SOURCE
8506 #undef _POSIX_SOURCE
8507 #undef _POSIX_C_SOURCE
8508 #include <sys/types.h>
8509 #include <sys/signal.h>
8510
8511 int
8512 main ()
8513 {
8514
8515 #if SIGWINCH != $cf_sigwinch
8516 make an error
8517 #endif
8518 int x = SIGWINCH
8519   ;
8520   return 0;
8521 }
8522 _ACEOF
8523 rm -f conftest.$ac_objext
8524 if { (eval echo "$as_me:8524: \"$ac_compile\"") >&5
8525   (eval $ac_compile) 2>&5
8526   ac_status=$?
8527   echo "$as_me:8527: \$? = $ac_status" >&5
8528   (exit $ac_status); } &&
8529          { ac_try='test -s conftest.$ac_objext'
8530   { (eval echo "$as_me:8530: \"$ac_try\"") >&5
8531   (eval $ac_try) 2>&5
8532   ac_status=$?
8533   echo "$as_me:8533: \$? = $ac_status" >&5
8534   (exit $ac_status); }; }; then
8535   cf_cv_fixup_sigwinch=$cf_sigwinch
8536          break
8537 else
8538   echo "$as_me: failed program was:" >&5
8539 cat conftest.$ac_ext >&5
8540 fi
8541 rm -f conftest.$ac_objext conftest.$ac_ext
8542
8543 cf_sigwinch=`expr $cf_sigwinch - 1`
8544 done
8545
8546 fi
8547 echo "$as_me:8547: result: $cf_cv_fixup_sigwinch" >&5
8548 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8549
8550         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8551                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8552         fi
8553 fi
8554
8555 # Checks for CODESET support.
8556
8557   echo "$as_me:8557: checking for nl_langinfo and CODESET" >&5
8558 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8559 if test "${am_cv_langinfo_codeset+set}" = set; then
8560   echo $ECHO_N "(cached) $ECHO_C" >&6
8561 else
8562   cat >conftest.$ac_ext <<_ACEOF
8563 #line 8563 "configure"
8564 #include "confdefs.h"
8565 #include <langinfo.h>
8566 int
8567 main ()
8568 {
8569 char* cs = nl_langinfo(CODESET);
8570   ;
8571   return 0;
8572 }
8573 _ACEOF
8574 rm -f conftest.$ac_objext conftest$ac_exeext
8575 if { (eval echo "$as_me:8575: \"$ac_link\"") >&5
8576   (eval $ac_link) 2>&5
8577   ac_status=$?
8578   echo "$as_me:8578: \$? = $ac_status" >&5
8579   (exit $ac_status); } &&
8580          { ac_try='test -s conftest$ac_exeext'
8581   { (eval echo "$as_me:8581: \"$ac_try\"") >&5
8582   (eval $ac_try) 2>&5
8583   ac_status=$?
8584   echo "$as_me:8584: \$? = $ac_status" >&5
8585   (exit $ac_status); }; }; then
8586   am_cv_langinfo_codeset=yes
8587 else
8588   echo "$as_me: failed program was:" >&5
8589 cat conftest.$ac_ext >&5
8590 am_cv_langinfo_codeset=no
8591 fi
8592 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8593
8594 fi
8595 echo "$as_me:8595: result: $am_cv_langinfo_codeset" >&5
8596 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8597   if test $am_cv_langinfo_codeset = yes; then
8598
8599 cat >>confdefs.h <<\EOF
8600 #define HAVE_LANGINFO_CODESET 1
8601 EOF
8602
8603   fi
8604
8605 # use these variables to work around a defect in gcc's fixincludes.
8606 NCURSES_OK_WCHAR_T=
8607 NCURSES_OK_WINT_T=
8608
8609 echo "$as_me:8609: checking if you want wide-character code" >&5
8610 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8611
8612 # Check whether --enable-widec or --disable-widec was given.
8613 if test "${enable_widec+set}" = set; then
8614   enableval="$enable_widec"
8615   with_widec=$enableval
8616 else
8617   with_widec=no
8618 fi;
8619 echo "$as_me:8619: result: $with_widec" >&5
8620 echo "${ECHO_T}$with_widec" >&6
8621 if test "x$with_widec" = xyes ; then
8622         if test "x$disable_lib_suffixes" = xno ; then
8623                 LIB_SUFFIX="w${LIB_SUFFIX}"
8624         fi
8625
8626 cat >>confdefs.h <<\EOF
8627 #define USE_WIDEC_SUPPORT 1
8628 EOF
8629
8630 cat >>confdefs.h <<\EOF
8631 #define NCURSES_WIDECHAR 1
8632 EOF
8633
8634 echo "$as_me:8634: checking if wchar.h can be used as is" >&5
8635 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8636 if test "${cf_cv_wchar_h_okay+set}" = set; then
8637   echo $ECHO_N "(cached) $ECHO_C" >&6
8638 else
8639
8640 cat >conftest.$ac_ext <<_ACEOF
8641 #line 8641 "configure"
8642 #include "confdefs.h"
8643
8644 #include <stdlib.h>
8645 #include <wchar.h>
8646
8647 int
8648 main ()
8649 {
8650
8651         wint_t foo = 0;
8652         int bar = iswpunct(foo)
8653   ;
8654   return 0;
8655 }
8656 _ACEOF
8657 rm -f conftest.$ac_objext
8658 if { (eval echo "$as_me:8658: \"$ac_compile\"") >&5
8659   (eval $ac_compile) 2>&5
8660   ac_status=$?
8661   echo "$as_me:8661: \$? = $ac_status" >&5
8662   (exit $ac_status); } &&
8663          { ac_try='test -s conftest.$ac_objext'
8664   { (eval echo "$as_me:8664: \"$ac_try\"") >&5
8665   (eval $ac_try) 2>&5
8666   ac_status=$?
8667   echo "$as_me:8667: \$? = $ac_status" >&5
8668   (exit $ac_status); }; }; then
8669   cf_cv_wchar_h_okay=yes
8670 else
8671   echo "$as_me: failed program was:" >&5
8672 cat conftest.$ac_ext >&5
8673 cf_cv_wchar_h_okay=no
8674 fi
8675 rm -f conftest.$ac_objext conftest.$ac_ext
8676 fi
8677 echo "$as_me:8677: result: $cf_cv_wchar_h_okay" >&5
8678 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8679
8680 if test $cf_cv_wchar_h_okay = no
8681 then
8682
8683 echo "$as_me:8683: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8684 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8685 cat >conftest.$ac_ext <<_ACEOF
8686 #line 8686 "configure"
8687 #include "confdefs.h"
8688 #include <sys/types.h>
8689
8690 int
8691 main ()
8692 {
8693
8694 #ifndef _XOPEN_SOURCE_EXTENDED
8695 make an error
8696 #endif
8697   ;
8698   return 0;
8699 }
8700 _ACEOF
8701 rm -f conftest.$ac_objext
8702 if { (eval echo "$as_me:8702: \"$ac_compile\"") >&5
8703   (eval $ac_compile) 2>&5
8704   ac_status=$?
8705   echo "$as_me:8705: \$? = $ac_status" >&5
8706   (exit $ac_status); } &&
8707          { ac_try='test -s conftest.$ac_objext'
8708   { (eval echo "$as_me:8708: \"$ac_try\"") >&5
8709   (eval $ac_try) 2>&5
8710   ac_status=$?
8711   echo "$as_me:8711: \$? = $ac_status" >&5
8712   (exit $ac_status); }; }; then
8713   cf_result=no
8714 else
8715   echo "$as_me: failed program was:" >&5
8716 cat conftest.$ac_ext >&5
8717 cf_result=yes
8718 fi
8719 rm -f conftest.$ac_objext conftest.$ac_ext
8720 echo "$as_me:8720: result: $cf_result" >&5
8721 echo "${ECHO_T}$cf_result" >&6
8722
8723 if test "$cf_result" = yes ; then
8724         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8725 elif test "x" != "x" ; then
8726         echo "$as_me:8726: checking checking for compatible value versus " >&5
8727 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8728         cat >conftest.$ac_ext <<_ACEOF
8729 #line 8729 "configure"
8730 #include "confdefs.h"
8731 #include <sys/types.h>
8732
8733 int
8734 main ()
8735 {
8736
8737 #if _XOPEN_SOURCE_EXTENDED- < 0
8738 make an error
8739 #endif
8740   ;
8741   return 0;
8742 }
8743 _ACEOF
8744 rm -f conftest.$ac_objext
8745 if { (eval echo "$as_me:8745: \"$ac_compile\"") >&5
8746   (eval $ac_compile) 2>&5
8747   ac_status=$?
8748   echo "$as_me:8748: \$? = $ac_status" >&5
8749   (exit $ac_status); } &&
8750          { ac_try='test -s conftest.$ac_objext'
8751   { (eval echo "$as_me:8751: \"$ac_try\"") >&5
8752   (eval $ac_try) 2>&5
8753   ac_status=$?
8754   echo "$as_me:8754: \$? = $ac_status" >&5
8755   (exit $ac_status); }; }; then
8756   cf_result=yes
8757 else
8758   echo "$as_me: failed program was:" >&5
8759 cat conftest.$ac_ext >&5
8760 cf_result=no
8761 fi
8762 rm -f conftest.$ac_objext conftest.$ac_ext
8763         echo "$as_me:8763: result: $cf_result" >&5
8764 echo "${ECHO_T}$cf_result" >&6
8765         if test "$cf_result" = no ; then
8766                 # perhaps we can override it - try...
8767                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8768         fi
8769 fi
8770
8771 fi
8772
8773         # with_overwrite=no
8774         NCURSES_CH_T=cchar_t
8775
8776 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8777 do
8778 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8779 echo "$as_me:8779: checking for $ac_func" >&5
8780 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8781 if eval "test \"\${$as_ac_var+set}\" = set"; then
8782   echo $ECHO_N "(cached) $ECHO_C" >&6
8783 else
8784   cat >conftest.$ac_ext <<_ACEOF
8785 #line 8785 "configure"
8786 #include "confdefs.h"
8787 /* System header to define __stub macros and hopefully few prototypes,
8788     which can conflict with char $ac_func (); below.  */
8789 #include <assert.h>
8790 /* Override any gcc2 internal prototype to avoid an error.  */
8791 #ifdef __cplusplus
8792 extern "C"
8793 #endif
8794 /* We use char because int might match the return type of a gcc2
8795    builtin and then its argument prototype would still apply.  */
8796 char $ac_func ();
8797 char (*f) ();
8798
8799 int
8800 main ()
8801 {
8802 /* The GNU C library defines this for functions which it implements
8803     to always fail with ENOSYS.  Some functions are actually named
8804     something starting with __ and the normal name is an alias.  */
8805 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8806 choke me
8807 #else
8808 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8809 #endif
8810
8811   ;
8812   return 0;
8813 }
8814 _ACEOF
8815 rm -f conftest.$ac_objext conftest$ac_exeext
8816 if { (eval echo "$as_me:8816: \"$ac_link\"") >&5
8817   (eval $ac_link) 2>&5
8818   ac_status=$?
8819   echo "$as_me:8819: \$? = $ac_status" >&5
8820   (exit $ac_status); } &&
8821          { ac_try='test -s conftest$ac_exeext'
8822   { (eval echo "$as_me:8822: \"$ac_try\"") >&5
8823   (eval $ac_try) 2>&5
8824   ac_status=$?
8825   echo "$as_me:8825: \$? = $ac_status" >&5
8826   (exit $ac_status); }; }; then
8827   eval "$as_ac_var=yes"
8828 else
8829   echo "$as_me: failed program was:" >&5
8830 cat conftest.$ac_ext >&5
8831 eval "$as_ac_var=no"
8832 fi
8833 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8834 fi
8835 echo "$as_me:8835: result: `eval echo '${'$as_ac_var'}'`" >&5
8836 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8837 if test `eval echo '${'$as_ac_var'}'` = yes; then
8838   cat >>confdefs.h <<EOF
8839 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8840 EOF
8841
8842 fi
8843 done
8844
8845         if test "x$ac_cv_func_putwc" != xyes ; then
8846
8847 echo "$as_me:8847: checking for multibyte character support" >&5
8848 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8849 if test "${cf_cv_utf8_lib+set}" = set; then
8850   echo $ECHO_N "(cached) $ECHO_C" >&6
8851 else
8852
8853         cf_save_LIBS="$LIBS"
8854         cat >conftest.$ac_ext <<_ACEOF
8855 #line 8855 "configure"
8856 #include "confdefs.h"
8857
8858 #include <stdlib.h>
8859 int
8860 main ()
8861 {
8862 putwc(0,0);
8863   ;
8864   return 0;
8865 }
8866 _ACEOF
8867 rm -f conftest.$ac_objext conftest$ac_exeext
8868 if { (eval echo "$as_me:8868: \"$ac_link\"") >&5
8869   (eval $ac_link) 2>&5
8870   ac_status=$?
8871   echo "$as_me:8871: \$? = $ac_status" >&5
8872   (exit $ac_status); } &&
8873          { ac_try='test -s conftest$ac_exeext'
8874   { (eval echo "$as_me:8874: \"$ac_try\"") >&5
8875   (eval $ac_try) 2>&5
8876   ac_status=$?
8877   echo "$as_me:8877: \$? = $ac_status" >&5
8878   (exit $ac_status); }; }; then
8879   cf_cv_utf8_lib=yes
8880 else
8881   echo "$as_me: failed program was:" >&5
8882 cat conftest.$ac_ext >&5
8883
8884 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8885 # will be set on completion of the AC_TRY_LINK below.
8886 cf_cv_header_path_utf8=
8887 cf_cv_library_path_utf8=
8888
8889 echo "${as_me:-configure}:8889: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8890
8891 cf_save_LIBS="$LIBS"
8892
8893 cat >conftest.$ac_ext <<_ACEOF
8894 #line 8894 "configure"
8895 #include "confdefs.h"
8896
8897 #include <libutf8.h>
8898 int
8899 main ()
8900 {
8901 putwc(0,0);
8902   ;
8903   return 0;
8904 }
8905 _ACEOF
8906 rm -f conftest.$ac_objext conftest$ac_exeext
8907 if { (eval echo "$as_me:8907: \"$ac_link\"") >&5
8908   (eval $ac_link) 2>&5
8909   ac_status=$?
8910   echo "$as_me:8910: \$? = $ac_status" >&5
8911   (exit $ac_status); } &&
8912          { ac_try='test -s conftest$ac_exeext'
8913   { (eval echo "$as_me:8913: \"$ac_try\"") >&5
8914   (eval $ac_try) 2>&5
8915   ac_status=$?
8916   echo "$as_me:8916: \$? = $ac_status" >&5
8917   (exit $ac_status); }; }; then
8918
8919         cf_cv_find_linkage_utf8=yes
8920         cf_cv_header_path_utf8=/usr/include
8921         cf_cv_library_path_utf8=/usr/lib
8922
8923 else
8924   echo "$as_me: failed program was:" >&5
8925 cat conftest.$ac_ext >&5
8926
8927 LIBS="-lutf8  $cf_save_LIBS"
8928
8929 cat >conftest.$ac_ext <<_ACEOF
8930 #line 8930 "configure"
8931 #include "confdefs.h"
8932
8933 #include <libutf8.h>
8934 int
8935 main ()
8936 {
8937 putwc(0,0);
8938   ;
8939   return 0;
8940 }
8941 _ACEOF
8942 rm -f conftest.$ac_objext conftest$ac_exeext
8943 if { (eval echo "$as_me:8943: \"$ac_link\"") >&5
8944   (eval $ac_link) 2>&5
8945   ac_status=$?
8946   echo "$as_me:8946: \$? = $ac_status" >&5
8947   (exit $ac_status); } &&
8948          { ac_try='test -s conftest$ac_exeext'
8949   { (eval echo "$as_me:8949: \"$ac_try\"") >&5
8950   (eval $ac_try) 2>&5
8951   ac_status=$?
8952   echo "$as_me:8952: \$? = $ac_status" >&5
8953   (exit $ac_status); }; }; then
8954
8955         cf_cv_find_linkage_utf8=yes
8956         cf_cv_header_path_utf8=/usr/include
8957         cf_cv_library_path_utf8=/usr/lib
8958         cf_cv_library_file_utf8="-lutf8"
8959
8960 else
8961   echo "$as_me: failed program was:" >&5
8962 cat conftest.$ac_ext >&5
8963
8964         cf_cv_find_linkage_utf8=no
8965         LIBS="$cf_save_LIBS"
8966
8967     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8968
8969 echo "${as_me:-configure}:8969: testing find linkage for utf8 library ..." 1>&5
8970
8971 echo "${as_me:-configure}:8971: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8972
8973     cf_save_CPPFLAGS="$CPPFLAGS"
8974     cf_test_CPPFLAGS="$CPPFLAGS"
8975
8976 cf_search=
8977
8978 # collect the current set of include-directories from compiler flags
8979 cf_header_path_list=""
8980 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8981         for cf_header_path in $CPPFLAGS $CFLAGS
8982         do
8983                 case $cf_header_path in #(vi
8984                 -I*)
8985                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8986
8987 test "x$cf_header_path" != "xNONE" && \
8988 test -d "$cf_header_path" && \
8989  {
8990         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8991         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8992         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8993         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8994         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8995         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8996 }
8997
8998                         cf_header_path_list="$cf_header_path_list $cf_search"
8999                         ;;
9000                 esac
9001         done
9002 fi
9003
9004 # add the variations for the package we are looking for
9005
9006 cf_search=
9007
9008 test "x/usr" != "x$prefix" && \
9009 test -d "/usr" && \
9010 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
9011         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
9012         test -d /usr/include &&          cf_search="$cf_search /usr/include"
9013         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
9014         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
9015         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
9016         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
9017 }
9018
9019 test "x$prefix" != "xNONE" && \
9020 test -d "$prefix" && \
9021  {
9022         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9023         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9024         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9025         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9026         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9027         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9028 }
9029
9030 test "x/usr/local" != "x$prefix" && \
9031 test -d "/usr/local" && \
9032 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
9033         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
9034         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
9035         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
9036         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
9037         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
9038         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
9039 }
9040
9041 test "x/opt" != "x$prefix" && \
9042 test -d "/opt" && \
9043 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
9044         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
9045         test -d /opt/include &&          cf_search="$cf_search /opt/include"
9046         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
9047         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
9048         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
9049         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
9050 }
9051
9052 test "x$HOME" != "x$prefix" && \
9053 test -d "$HOME" && \
9054 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
9055         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
9056         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
9057         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
9058         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
9059         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
9060         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
9061 }
9062
9063 test "$includedir" != NONE && \
9064 test "$includedir" != "/usr/include" && \
9065 test -d "$includedir" && {
9066         test -d $includedir &&    cf_search="$cf_search $includedir"
9067         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9068 }
9069
9070 test "$oldincludedir" != NONE && \
9071 test "$oldincludedir" != "/usr/include" && \
9072 test -d "$oldincludedir" && {
9073         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9074         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9075 }
9076
9077 cf_search="$cf_search $cf_header_path_list"
9078
9079     for cf_cv_header_path_utf8 in $cf_search
9080     do
9081       if test -d $cf_cv_header_path_utf8 ; then
9082         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9083
9084 echo "${as_me:-configure}:9084: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9085
9086         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9087         cat >conftest.$ac_ext <<_ACEOF
9088 #line 9088 "configure"
9089 #include "confdefs.h"
9090
9091 #include <libutf8.h>
9092 int
9093 main ()
9094 {
9095 putwc(0,0);
9096   ;
9097   return 0;
9098 }
9099 _ACEOF
9100 rm -f conftest.$ac_objext
9101 if { (eval echo "$as_me:9101: \"$ac_compile\"") >&5
9102   (eval $ac_compile) 2>&5
9103   ac_status=$?
9104   echo "$as_me:9104: \$? = $ac_status" >&5
9105   (exit $ac_status); } &&
9106          { ac_try='test -s conftest.$ac_objext'
9107   { (eval echo "$as_me:9107: \"$ac_try\"") >&5
9108   (eval $ac_try) 2>&5
9109   ac_status=$?
9110   echo "$as_me:9110: \$? = $ac_status" >&5
9111   (exit $ac_status); }; }; then
9112
9113             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9114
9115 echo "${as_me:-configure}:9115: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9116
9117             cf_cv_find_linkage_utf8=maybe
9118             cf_test_CPPFLAGS="$CPPFLAGS"
9119             break
9120 else
9121   echo "$as_me: failed program was:" >&5
9122 cat conftest.$ac_ext >&5
9123
9124             CPPFLAGS="$cf_save_CPPFLAGS"
9125
9126 fi
9127 rm -f conftest.$ac_objext conftest.$ac_ext
9128       fi
9129     done
9130
9131     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9132
9133 echo "${as_me:-configure}:9133: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9134
9135       cf_save_LIBS="$LIBS"
9136       cf_save_LDFLAGS="$LDFLAGS"
9137
9138       if test "$cf_cv_find_linkage_utf8" != yes ; then
9139
9140 cf_search=
9141 cf_library_path_list=""
9142 if test -n "${LDFLAGS}${LIBS}" ; then
9143         for cf_library_path in $LDFLAGS $LIBS
9144         do
9145                 case $cf_library_path in #(vi
9146                 -L*)
9147                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9148
9149 test "x$cf_library_path" != "xNONE" && \
9150 test -d "$cf_library_path" && \
9151  {
9152         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9153         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9154         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9155         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9156         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9157         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9158 }
9159
9160                         cf_library_path_list="$cf_library_path_list $cf_search"
9161                         ;;
9162                 esac
9163         done
9164 fi
9165
9166 cf_search=
9167
9168 test "x/usr" != "x$prefix" && \
9169 test -d "/usr" && \
9170 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
9171         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9172         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9173         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9174         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9175         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9176         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9177 }
9178
9179 test "x$prefix" != "xNONE" && \
9180 test -d "$prefix" && \
9181  {
9182         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9183         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9184         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9185         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9186         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9187         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9188 }
9189
9190 test "x/usr/local" != "x$prefix" && \
9191 test -d "/usr/local" && \
9192 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
9193         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9194         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9195         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9196         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9197         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9198         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9199 }
9200
9201 test "x/opt" != "x$prefix" && \
9202 test -d "/opt" && \
9203 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
9204         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9205         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9206         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9207         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9208         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9209         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9210 }
9211
9212 test "x$HOME" != "x$prefix" && \
9213 test -d "$HOME" && \
9214 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
9215         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9216         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9217         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9218         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9219         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9220         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9221 }
9222
9223 cf_search="$cf_library_path_list $cf_search"
9224
9225         for cf_cv_library_path_utf8 in $cf_search
9226         do
9227           if test -d $cf_cv_library_path_utf8 ; then
9228             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9229
9230 echo "${as_me:-configure}:9230: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9231
9232             CPPFLAGS="$cf_test_CPPFLAGS"
9233             LIBS="-lutf8  $cf_save_LIBS"
9234             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9235             cat >conftest.$ac_ext <<_ACEOF
9236 #line 9236 "configure"
9237 #include "confdefs.h"
9238
9239 #include <libutf8.h>
9240 int
9241 main ()
9242 {
9243 putwc(0,0);
9244   ;
9245   return 0;
9246 }
9247 _ACEOF
9248 rm -f conftest.$ac_objext conftest$ac_exeext
9249 if { (eval echo "$as_me:9249: \"$ac_link\"") >&5
9250   (eval $ac_link) 2>&5
9251   ac_status=$?
9252   echo "$as_me:9252: \$? = $ac_status" >&5
9253   (exit $ac_status); } &&
9254          { ac_try='test -s conftest$ac_exeext'
9255   { (eval echo "$as_me:9255: \"$ac_try\"") >&5
9256   (eval $ac_try) 2>&5
9257   ac_status=$?
9258   echo "$as_me:9258: \$? = $ac_status" >&5
9259   (exit $ac_status); }; }; then
9260
9261                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9262
9263 echo "${as_me:-configure}:9263: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9264
9265                 cf_cv_find_linkage_utf8=yes
9266                 cf_cv_library_file_utf8="-lutf8"
9267                 break
9268 else
9269   echo "$as_me: failed program was:" >&5
9270 cat conftest.$ac_ext >&5
9271
9272                 CPPFLAGS="$cf_save_CPPFLAGS"
9273                 LIBS="$cf_save_LIBS"
9274                 LDFLAGS="$cf_save_LDFLAGS"
9275
9276 fi
9277 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9278           fi
9279         done
9280         CPPFLAGS="$cf_save_CPPFLAGS"
9281         LDFLAGS="$cf_save_LDFLAGS"
9282       fi
9283
9284     else
9285       cf_cv_find_linkage_utf8=no
9286     fi
9287
9288 fi
9289 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9290
9291 fi
9292 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9293
9294 LIBS="$cf_save_LIBS"
9295
9296 if test "$cf_cv_find_linkage_utf8" = yes ; then
9297 cf_cv_utf8_lib=add-on
9298 else
9299 cf_cv_utf8_lib=no
9300 fi
9301
9302 fi
9303 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9304 fi
9305 echo "$as_me:9305: result: $cf_cv_utf8_lib" >&5
9306 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9307
9308 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9309 # ncurses/ncursesw:
9310 if test "$cf_cv_utf8_lib" = "add-on" ; then
9311
9312 cat >>confdefs.h <<\EOF
9313 #define HAVE_LIBUTF8_H 1
9314 EOF
9315
9316 if test -n "$cf_cv_header_path_utf8" ; then
9317   for cf_add_incdir in $cf_cv_header_path_utf8
9318   do
9319         while test $cf_add_incdir != /usr/include
9320         do
9321           if test -d $cf_add_incdir
9322           then
9323                 cf_have_incdir=no
9324                 if test -n "$CFLAGS$CPPFLAGS" ; then
9325                   # a loop is needed to ensure we can add subdirs of existing dirs
9326                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9327                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9328                           cf_have_incdir=yes; break
9329                         fi
9330                   done
9331                 fi
9332
9333                 if test "$cf_have_incdir" = no ; then
9334                   if test "$cf_add_incdir" = /usr/local/include ; then
9335                         if test "$GCC" = yes
9336                         then
9337                           cf_save_CPPFLAGS=$CPPFLAGS
9338                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9339                           cat >conftest.$ac_ext <<_ACEOF
9340 #line 9340 "configure"
9341 #include "confdefs.h"
9342 #include <stdio.h>
9343 int
9344 main ()
9345 {
9346 printf("Hello")
9347   ;
9348   return 0;
9349 }
9350 _ACEOF
9351 rm -f conftest.$ac_objext
9352 if { (eval echo "$as_me:9352: \"$ac_compile\"") >&5
9353   (eval $ac_compile) 2>&5
9354   ac_status=$?
9355   echo "$as_me:9355: \$? = $ac_status" >&5
9356   (exit $ac_status); } &&
9357          { ac_try='test -s conftest.$ac_objext'
9358   { (eval echo "$as_me:9358: \"$ac_try\"") >&5
9359   (eval $ac_try) 2>&5
9360   ac_status=$?
9361   echo "$as_me:9361: \$? = $ac_status" >&5
9362   (exit $ac_status); }; }; then
9363   :
9364 else
9365   echo "$as_me: failed program was:" >&5
9366 cat conftest.$ac_ext >&5
9367 cf_have_incdir=yes
9368 fi
9369 rm -f conftest.$ac_objext conftest.$ac_ext
9370                           CPPFLAGS=$cf_save_CPPFLAGS
9371                         fi
9372                   fi
9373                 fi
9374
9375                 if test "$cf_have_incdir" = no ; then
9376                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9377
9378 echo "${as_me:-configure}:9378: testing adding $cf_add_incdir to include-path ..." 1>&5
9379
9380                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9381
9382                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9383                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9384                   cf_add_incdir="$cf_top_incdir"
9385                 else
9386                   break
9387                 fi
9388           fi
9389         done
9390   done
9391 fi
9392
9393 if test -n "$cf_cv_library_path_utf8" ; then
9394   for cf_add_libdir in $cf_cv_library_path_utf8
9395   do
9396     if test $cf_add_libdir = /usr/lib ; then
9397       :
9398     elif test -d $cf_add_libdir
9399     then
9400       cf_have_libdir=no
9401       if test -n "$LDFLAGS$LIBS" ; then
9402         # a loop is needed to ensure we can add subdirs of existing dirs
9403         for cf_test_libdir in $LDFLAGS $LIBS ; do
9404           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9405             cf_have_libdir=yes; break
9406           fi
9407         done
9408       fi
9409       if test "$cf_have_libdir" = no ; then
9410         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9411
9412 echo "${as_me:-configure}:9412: testing adding $cf_add_libdir to library-path ..." 1>&5
9413
9414         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9415       fi
9416     fi
9417   done
9418 fi
9419
9420         LIBS="$cf_cv_library_file_utf8 $LIBS"
9421 fi
9422
9423                 if test "$cf_cv_utf8_lib" != no ; then
9424                         NCURSES_LIBUTF8=1
9425                 fi
9426         fi
9427
9428 # This is needed on Tru64 5.0 to declare mbstate_t
9429 echo "$as_me:9429: checking if we must include wchar.h to declare mbstate_t" >&5
9430 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9431 if test "${cf_cv_mbstate_t+set}" = set; then
9432   echo $ECHO_N "(cached) $ECHO_C" >&6
9433 else
9434
9435 cat >conftest.$ac_ext <<_ACEOF
9436 #line 9436 "configure"
9437 #include "confdefs.h"
9438
9439 #include <stdlib.h>
9440 #include <stdarg.h>
9441 #include <stdio.h>
9442 #ifdef HAVE_LIBUTF8_H
9443 #include <libutf8.h>
9444 #endif
9445 int
9446 main ()
9447 {
9448 mbstate_t state
9449   ;
9450   return 0;
9451 }
9452 _ACEOF
9453 rm -f conftest.$ac_objext
9454 if { (eval echo "$as_me:9454: \"$ac_compile\"") >&5
9455   (eval $ac_compile) 2>&5
9456   ac_status=$?
9457   echo "$as_me:9457: \$? = $ac_status" >&5
9458   (exit $ac_status); } &&
9459          { ac_try='test -s conftest.$ac_objext'
9460   { (eval echo "$as_me:9460: \"$ac_try\"") >&5
9461   (eval $ac_try) 2>&5
9462   ac_status=$?
9463   echo "$as_me:9463: \$? = $ac_status" >&5
9464   (exit $ac_status); }; }; then
9465   cf_cv_mbstate_t=no
9466 else
9467   echo "$as_me: failed program was:" >&5
9468 cat conftest.$ac_ext >&5
9469 cat >conftest.$ac_ext <<_ACEOF
9470 #line 9470 "configure"
9471 #include "confdefs.h"
9472
9473 #include <stdlib.h>
9474 #include <stdarg.h>
9475 #include <stdio.h>
9476 #include <wchar.h>
9477 #ifdef HAVE_LIBUTF8_H
9478 #include <libutf8.h>
9479 #endif
9480 int
9481 main ()
9482 {
9483 mbstate_t value
9484   ;
9485   return 0;
9486 }
9487 _ACEOF
9488 rm -f conftest.$ac_objext
9489 if { (eval echo "$as_me:9489: \"$ac_compile\"") >&5
9490   (eval $ac_compile) 2>&5
9491   ac_status=$?
9492   echo "$as_me:9492: \$? = $ac_status" >&5
9493   (exit $ac_status); } &&
9494          { ac_try='test -s conftest.$ac_objext'
9495   { (eval echo "$as_me:9495: \"$ac_try\"") >&5
9496   (eval $ac_try) 2>&5
9497   ac_status=$?
9498   echo "$as_me:9498: \$? = $ac_status" >&5
9499   (exit $ac_status); }; }; then
9500   cf_cv_mbstate_t=yes
9501 else
9502   echo "$as_me: failed program was:" >&5
9503 cat conftest.$ac_ext >&5
9504 cf_cv_mbstate_t=unknown
9505 fi
9506 rm -f conftest.$ac_objext conftest.$ac_ext
9507 fi
9508 rm -f conftest.$ac_objext conftest.$ac_ext
9509 fi
9510 echo "$as_me:9510: result: $cf_cv_mbstate_t" >&5
9511 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9512
9513 if test "$cf_cv_mbstate_t" = yes ; then
9514
9515 cat >>confdefs.h <<\EOF
9516 #define NEED_WCHAR_H 1
9517 EOF
9518
9519         NEED_WCHAR_H=1
9520 fi
9521
9522 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9523 if test "$cf_cv_mbstate_t" = unknown ; then
9524         NCURSES_MBSTATE_T=1
9525 fi
9526
9527 # This is needed on Tru64 5.0 to declare wchar_t
9528 echo "$as_me:9528: checking if we must include wchar.h to declare wchar_t" >&5
9529 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9530 if test "${cf_cv_wchar_t+set}" = set; then
9531   echo $ECHO_N "(cached) $ECHO_C" >&6
9532 else
9533
9534 cat >conftest.$ac_ext <<_ACEOF
9535 #line 9535 "configure"
9536 #include "confdefs.h"
9537
9538 #include <stdlib.h>
9539 #include <stdarg.h>
9540 #include <stdio.h>
9541 #ifdef HAVE_LIBUTF8_H
9542 #include <libutf8.h>
9543 #endif
9544 int
9545 main ()
9546 {
9547 wchar_t state
9548   ;
9549   return 0;
9550 }
9551 _ACEOF
9552 rm -f conftest.$ac_objext
9553 if { (eval echo "$as_me:9553: \"$ac_compile\"") >&5
9554   (eval $ac_compile) 2>&5
9555   ac_status=$?
9556   echo "$as_me:9556: \$? = $ac_status" >&5
9557   (exit $ac_status); } &&
9558          { ac_try='test -s conftest.$ac_objext'
9559   { (eval echo "$as_me:9559: \"$ac_try\"") >&5
9560   (eval $ac_try) 2>&5
9561   ac_status=$?
9562   echo "$as_me:9562: \$? = $ac_status" >&5
9563   (exit $ac_status); }; }; then
9564   cf_cv_wchar_t=no
9565 else
9566   echo "$as_me: failed program was:" >&5
9567 cat conftest.$ac_ext >&5
9568 cat >conftest.$ac_ext <<_ACEOF
9569 #line 9569 "configure"
9570 #include "confdefs.h"
9571
9572 #include <stdlib.h>
9573 #include <stdarg.h>
9574 #include <stdio.h>
9575 #include <wchar.h>
9576 #ifdef HAVE_LIBUTF8_H
9577 #include <libutf8.h>
9578 #endif
9579 int
9580 main ()
9581 {
9582 wchar_t value
9583   ;
9584   return 0;
9585 }
9586 _ACEOF
9587 rm -f conftest.$ac_objext
9588 if { (eval echo "$as_me:9588: \"$ac_compile\"") >&5
9589   (eval $ac_compile) 2>&5
9590   ac_status=$?
9591   echo "$as_me:9591: \$? = $ac_status" >&5
9592   (exit $ac_status); } &&
9593          { ac_try='test -s conftest.$ac_objext'
9594   { (eval echo "$as_me:9594: \"$ac_try\"") >&5
9595   (eval $ac_try) 2>&5
9596   ac_status=$?
9597   echo "$as_me:9597: \$? = $ac_status" >&5
9598   (exit $ac_status); }; }; then
9599   cf_cv_wchar_t=yes
9600 else
9601   echo "$as_me: failed program was:" >&5
9602 cat conftest.$ac_ext >&5
9603 cf_cv_wchar_t=unknown
9604 fi
9605 rm -f conftest.$ac_objext conftest.$ac_ext
9606 fi
9607 rm -f conftest.$ac_objext conftest.$ac_ext
9608 fi
9609 echo "$as_me:9609: result: $cf_cv_wchar_t" >&5
9610 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9611
9612 if test "$cf_cv_wchar_t" = yes ; then
9613
9614 cat >>confdefs.h <<\EOF
9615 #define NEED_WCHAR_H 1
9616 EOF
9617
9618         NEED_WCHAR_H=1
9619 fi
9620
9621 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9622 if test "$cf_cv_wchar_t" = unknown ; then
9623         NCURSES_WCHAR_T=1
9624 fi
9625
9626 # if we find wchar_t in either place, use substitution to provide a fallback.
9627 if test "$cf_cv_wchar_t" != unknown ; then
9628         NCURSES_OK_WCHAR_T=1
9629 fi
9630
9631 # This is needed on Tru64 5.0 to declare wint_t
9632 echo "$as_me:9632: checking if we must include wchar.h to declare wint_t" >&5
9633 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9634 if test "${cf_cv_wint_t+set}" = set; then
9635   echo $ECHO_N "(cached) $ECHO_C" >&6
9636 else
9637
9638 cat >conftest.$ac_ext <<_ACEOF
9639 #line 9639 "configure"
9640 #include "confdefs.h"
9641
9642 #include <stdlib.h>
9643 #include <stdarg.h>
9644 #include <stdio.h>
9645 #ifdef HAVE_LIBUTF8_H
9646 #include <libutf8.h>
9647 #endif
9648 int
9649 main ()
9650 {
9651 wint_t state
9652   ;
9653   return 0;
9654 }
9655 _ACEOF
9656 rm -f conftest.$ac_objext
9657 if { (eval echo "$as_me:9657: \"$ac_compile\"") >&5
9658   (eval $ac_compile) 2>&5
9659   ac_status=$?
9660   echo "$as_me:9660: \$? = $ac_status" >&5
9661   (exit $ac_status); } &&
9662          { ac_try='test -s conftest.$ac_objext'
9663   { (eval echo "$as_me:9663: \"$ac_try\"") >&5
9664   (eval $ac_try) 2>&5
9665   ac_status=$?
9666   echo "$as_me:9666: \$? = $ac_status" >&5
9667   (exit $ac_status); }; }; then
9668   cf_cv_wint_t=no
9669 else
9670   echo "$as_me: failed program was:" >&5
9671 cat conftest.$ac_ext >&5
9672 cat >conftest.$ac_ext <<_ACEOF
9673 #line 9673 "configure"
9674 #include "confdefs.h"
9675
9676 #include <stdlib.h>
9677 #include <stdarg.h>
9678 #include <stdio.h>
9679 #include <wchar.h>
9680 #ifdef HAVE_LIBUTF8_H
9681 #include <libutf8.h>
9682 #endif
9683 int
9684 main ()
9685 {
9686 wint_t value
9687   ;
9688   return 0;
9689 }
9690 _ACEOF
9691 rm -f conftest.$ac_objext
9692 if { (eval echo "$as_me:9692: \"$ac_compile\"") >&5
9693   (eval $ac_compile) 2>&5
9694   ac_status=$?
9695   echo "$as_me:9695: \$? = $ac_status" >&5
9696   (exit $ac_status); } &&
9697          { ac_try='test -s conftest.$ac_objext'
9698   { (eval echo "$as_me:9698: \"$ac_try\"") >&5
9699   (eval $ac_try) 2>&5
9700   ac_status=$?
9701   echo "$as_me:9701: \$? = $ac_status" >&5
9702   (exit $ac_status); }; }; then
9703   cf_cv_wint_t=yes
9704 else
9705   echo "$as_me: failed program was:" >&5
9706 cat conftest.$ac_ext >&5
9707 cf_cv_wint_t=unknown
9708 fi
9709 rm -f conftest.$ac_objext conftest.$ac_ext
9710 fi
9711 rm -f conftest.$ac_objext conftest.$ac_ext
9712 fi
9713 echo "$as_me:9713: result: $cf_cv_wint_t" >&5
9714 echo "${ECHO_T}$cf_cv_wint_t" >&6
9715
9716 if test "$cf_cv_wint_t" = yes ; then
9717
9718 cat >>confdefs.h <<\EOF
9719 #define NEED_WCHAR_H 1
9720 EOF
9721
9722         NEED_WCHAR_H=1
9723 fi
9724
9725 # if we do not find wint_t in either place, use substitution to provide a fallback.
9726 if test "$cf_cv_wint_t" = unknown ; then
9727         NCURSES_WINT_T=1
9728 fi
9729
9730 # if we find wint_t in either place, use substitution to provide a fallback.
9731 if test "$cf_cv_wint_t" != unknown ; then
9732         NCURSES_OK_WINT_T=1
9733 fi
9734
9735         if test "$NCURSES_MBSTATE_T" != 0; then
9736
9737 cat >>confdefs.h <<\EOF
9738 #define NEED_MBSTATE_T_DEF 1
9739 EOF
9740
9741         fi
9742 fi
9743
9744 ###   use option --disable-lp64 to allow long chtype
9745 case $cf_cv_abi_version in
9746 [345]*)
9747         default_with_lp64=no
9748         ;;
9749 *)
9750         default_with_lp64=yes
9751         ;;
9752 esac
9753
9754 echo "$as_me:9754: checking whether to enable _LP64 definition in curses.h" >&5
9755 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9756
9757 # Check whether --enable-lp64 or --disable-lp64 was given.
9758 if test "${enable_lp64+set}" = set; then
9759   enableval="$enable_lp64"
9760   with_lp64=$enableval
9761 else
9762   with_lp64=$default_with_lp64
9763 fi;
9764 echo "$as_me:9764: result: $with_lp64" >&5
9765 echo "${ECHO_T}$with_lp64" >&6
9766
9767 if test "x$with_lp64" = xyes ; then
9768         cf_cv_enable_lp64=1
9769 else
9770         cf_cv_enable_lp64=0
9771 fi
9772
9773 # Check whether --enable-largefile or --disable-largefile was given.
9774 if test "${enable_largefile+set}" = set; then
9775   enableval="$enable_largefile"
9776
9777 fi;
9778 if test "$enable_largefile" != no; then
9779
9780   echo "$as_me:9780: checking for special C compiler options needed for large files" >&5
9781 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9782 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9783   echo $ECHO_N "(cached) $ECHO_C" >&6
9784 else
9785   ac_cv_sys_largefile_CC=no
9786      if test "$GCC" != yes; then
9787        ac_save_CC=$CC
9788        while :; do
9789          # IRIX 6.2 and later do not support large files by default,
9790          # so use the C compiler's -n32 option if that helps.
9791          cat >conftest.$ac_ext <<_ACEOF
9792 #line 9792 "configure"
9793 #include "confdefs.h"
9794 #include <sys/types.h>
9795  /* Check that off_t can represent 2**63 - 1 correctly.
9796     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9797     since some C++ compilers masquerading as C compilers
9798     incorrectly reject 9223372036854775807.  */
9799 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9800   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9801                        && LARGE_OFF_T % 2147483647 == 1)
9802                       ? 1 : -1];
9803 int
9804 main ()
9805 {
9806
9807   ;
9808   return 0;
9809 }
9810 _ACEOF
9811          rm -f conftest.$ac_objext
9812 if { (eval echo "$as_me:9812: \"$ac_compile\"") >&5
9813   (eval $ac_compile) 2>&5
9814   ac_status=$?
9815   echo "$as_me:9815: \$? = $ac_status" >&5
9816   (exit $ac_status); } &&
9817          { ac_try='test -s conftest.$ac_objext'
9818   { (eval echo "$as_me:9818: \"$ac_try\"") >&5
9819   (eval $ac_try) 2>&5
9820   ac_status=$?
9821   echo "$as_me:9821: \$? = $ac_status" >&5
9822   (exit $ac_status); }; }; then
9823   break
9824 else
9825   echo "$as_me: failed program was:" >&5
9826 cat conftest.$ac_ext >&5
9827 fi
9828 rm -f conftest.$ac_objext
9829          CC="$CC -n32"
9830          rm -f conftest.$ac_objext
9831 if { (eval echo "$as_me:9831: \"$ac_compile\"") >&5
9832   (eval $ac_compile) 2>&5
9833   ac_status=$?
9834   echo "$as_me:9834: \$? = $ac_status" >&5
9835   (exit $ac_status); } &&
9836          { ac_try='test -s conftest.$ac_objext'
9837   { (eval echo "$as_me:9837: \"$ac_try\"") >&5
9838   (eval $ac_try) 2>&5
9839   ac_status=$?
9840   echo "$as_me:9840: \$? = $ac_status" >&5
9841   (exit $ac_status); }; }; then
9842   ac_cv_sys_largefile_CC=' -n32'; break
9843 else
9844   echo "$as_me: failed program was:" >&5
9845 cat conftest.$ac_ext >&5
9846 fi
9847 rm -f conftest.$ac_objext
9848          break
9849        done
9850        CC=$ac_save_CC
9851        rm -f conftest.$ac_ext
9852     fi
9853 fi
9854 echo "$as_me:9854: result: $ac_cv_sys_largefile_CC" >&5
9855 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9856   if test "$ac_cv_sys_largefile_CC" != no; then
9857     CC=$CC$ac_cv_sys_largefile_CC
9858   fi
9859
9860   echo "$as_me:9860: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9861 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9862 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9863   echo $ECHO_N "(cached) $ECHO_C" >&6
9864 else
9865   while :; do
9866   ac_cv_sys_file_offset_bits=no
9867   cat >conftest.$ac_ext <<_ACEOF
9868 #line 9868 "configure"
9869 #include "confdefs.h"
9870 #include <sys/types.h>
9871  /* Check that off_t can represent 2**63 - 1 correctly.
9872     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9873     since some C++ compilers masquerading as C compilers
9874     incorrectly reject 9223372036854775807.  */
9875 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9876   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9877                        && LARGE_OFF_T % 2147483647 == 1)
9878                       ? 1 : -1];
9879 int
9880 main ()
9881 {
9882
9883   ;
9884   return 0;
9885 }
9886 _ACEOF
9887 rm -f conftest.$ac_objext
9888 if { (eval echo "$as_me:9888: \"$ac_compile\"") >&5
9889   (eval $ac_compile) 2>&5
9890   ac_status=$?
9891   echo "$as_me:9891: \$? = $ac_status" >&5
9892   (exit $ac_status); } &&
9893          { ac_try='test -s conftest.$ac_objext'
9894   { (eval echo "$as_me:9894: \"$ac_try\"") >&5
9895   (eval $ac_try) 2>&5
9896   ac_status=$?
9897   echo "$as_me:9897: \$? = $ac_status" >&5
9898   (exit $ac_status); }; }; then
9899   break
9900 else
9901   echo "$as_me: failed program was:" >&5
9902 cat conftest.$ac_ext >&5
9903 fi
9904 rm -f conftest.$ac_objext conftest.$ac_ext
9905   cat >conftest.$ac_ext <<_ACEOF
9906 #line 9906 "configure"
9907 #include "confdefs.h"
9908 #define _FILE_OFFSET_BITS 64
9909 #include <sys/types.h>
9910  /* Check that off_t can represent 2**63 - 1 correctly.
9911     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9912     since some C++ compilers masquerading as C compilers
9913     incorrectly reject 9223372036854775807.  */
9914 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9915   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9916                        && LARGE_OFF_T % 2147483647 == 1)
9917                       ? 1 : -1];
9918 int
9919 main ()
9920 {
9921
9922   ;
9923   return 0;
9924 }
9925 _ACEOF
9926 rm -f conftest.$ac_objext
9927 if { (eval echo "$as_me:9927: \"$ac_compile\"") >&5
9928   (eval $ac_compile) 2>&5
9929   ac_status=$?
9930   echo "$as_me:9930: \$? = $ac_status" >&5
9931   (exit $ac_status); } &&
9932          { ac_try='test -s conftest.$ac_objext'
9933   { (eval echo "$as_me:9933: \"$ac_try\"") >&5
9934   (eval $ac_try) 2>&5
9935   ac_status=$?
9936   echo "$as_me:9936: \$? = $ac_status" >&5
9937   (exit $ac_status); }; }; then
9938   ac_cv_sys_file_offset_bits=64; break
9939 else
9940   echo "$as_me: failed program was:" >&5
9941 cat conftest.$ac_ext >&5
9942 fi
9943 rm -f conftest.$ac_objext conftest.$ac_ext
9944   break
9945 done
9946 fi
9947 echo "$as_me:9947: result: $ac_cv_sys_file_offset_bits" >&5
9948 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9949 if test "$ac_cv_sys_file_offset_bits" != no; then
9950
9951 cat >>confdefs.h <<EOF
9952 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9953 EOF
9954
9955 fi
9956 rm -rf conftest*
9957   echo "$as_me:9957: checking for _LARGE_FILES value needed for large files" >&5
9958 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9959 if test "${ac_cv_sys_large_files+set}" = set; then
9960   echo $ECHO_N "(cached) $ECHO_C" >&6
9961 else
9962   while :; do
9963   ac_cv_sys_large_files=no
9964   cat >conftest.$ac_ext <<_ACEOF
9965 #line 9965 "configure"
9966 #include "confdefs.h"
9967 #include <sys/types.h>
9968  /* Check that off_t can represent 2**63 - 1 correctly.
9969     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9970     since some C++ compilers masquerading as C compilers
9971     incorrectly reject 9223372036854775807.  */
9972 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9973   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9974                        && LARGE_OFF_T % 2147483647 == 1)
9975                       ? 1 : -1];
9976 int
9977 main ()
9978 {
9979
9980   ;
9981   return 0;
9982 }
9983 _ACEOF
9984 rm -f conftest.$ac_objext
9985 if { (eval echo "$as_me:9985: \"$ac_compile\"") >&5
9986   (eval $ac_compile) 2>&5
9987   ac_status=$?
9988   echo "$as_me:9988: \$? = $ac_status" >&5
9989   (exit $ac_status); } &&
9990          { ac_try='test -s conftest.$ac_objext'
9991   { (eval echo "$as_me:9991: \"$ac_try\"") >&5
9992   (eval $ac_try) 2>&5
9993   ac_status=$?
9994   echo "$as_me:9994: \$? = $ac_status" >&5
9995   (exit $ac_status); }; }; then
9996   break
9997 else
9998   echo "$as_me: failed program was:" >&5
9999 cat conftest.$ac_ext >&5
10000 fi
10001 rm -f conftest.$ac_objext conftest.$ac_ext
10002   cat >conftest.$ac_ext <<_ACEOF
10003 #line 10003 "configure"
10004 #include "confdefs.h"
10005 #define _LARGE_FILES 1
10006 #include <sys/types.h>
10007  /* Check that off_t can represent 2**63 - 1 correctly.
10008     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10009     since some C++ compilers masquerading as C compilers
10010     incorrectly reject 9223372036854775807.  */
10011 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10012   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10013                        && LARGE_OFF_T % 2147483647 == 1)
10014                       ? 1 : -1];
10015 int
10016 main ()
10017 {
10018
10019   ;
10020   return 0;
10021 }
10022 _ACEOF
10023 rm -f conftest.$ac_objext
10024 if { (eval echo "$as_me:10024: \"$ac_compile\"") >&5
10025   (eval $ac_compile) 2>&5
10026   ac_status=$?
10027   echo "$as_me:10027: \$? = $ac_status" >&5
10028   (exit $ac_status); } &&
10029          { ac_try='test -s conftest.$ac_objext'
10030   { (eval echo "$as_me:10030: \"$ac_try\"") >&5
10031   (eval $ac_try) 2>&5
10032   ac_status=$?
10033   echo "$as_me:10033: \$? = $ac_status" >&5
10034   (exit $ac_status); }; }; then
10035   ac_cv_sys_large_files=1; break
10036 else
10037   echo "$as_me: failed program was:" >&5
10038 cat conftest.$ac_ext >&5
10039 fi
10040 rm -f conftest.$ac_objext conftest.$ac_ext
10041   break
10042 done
10043 fi
10044 echo "$as_me:10044: result: $ac_cv_sys_large_files" >&5
10045 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10046 if test "$ac_cv_sys_large_files" != no; then
10047
10048 cat >>confdefs.h <<EOF
10049 #define _LARGE_FILES $ac_cv_sys_large_files
10050 EOF
10051
10052 fi
10053 rm -rf conftest*
10054 fi
10055
10056     if test "$enable_largefile" != no ; then
10057         echo "$as_me:10057: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10058 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10059 if test "${ac_cv_sys_largefile_source+set}" = set; then
10060   echo $ECHO_N "(cached) $ECHO_C" >&6
10061 else
10062   while :; do
10063   ac_cv_sys_largefile_source=no
10064   cat >conftest.$ac_ext <<_ACEOF
10065 #line 10065 "configure"
10066 #include "confdefs.h"
10067 #include <stdio.h>
10068 int
10069 main ()
10070 {
10071 return !fseeko;
10072   ;
10073   return 0;
10074 }
10075 _ACEOF
10076 rm -f conftest.$ac_objext
10077 if { (eval echo "$as_me:10077: \"$ac_compile\"") >&5
10078   (eval $ac_compile) 2>&5
10079   ac_status=$?
10080   echo "$as_me:10080: \$? = $ac_status" >&5
10081   (exit $ac_status); } &&
10082          { ac_try='test -s conftest.$ac_objext'
10083   { (eval echo "$as_me:10083: \"$ac_try\"") >&5
10084   (eval $ac_try) 2>&5
10085   ac_status=$?
10086   echo "$as_me:10086: \$? = $ac_status" >&5
10087   (exit $ac_status); }; }; then
10088   break
10089 else
10090   echo "$as_me: failed program was:" >&5
10091 cat conftest.$ac_ext >&5
10092 fi
10093 rm -f conftest.$ac_objext conftest.$ac_ext
10094   cat >conftest.$ac_ext <<_ACEOF
10095 #line 10095 "configure"
10096 #include "confdefs.h"
10097 #define _LARGEFILE_SOURCE 1
10098 #include <stdio.h>
10099 int
10100 main ()
10101 {
10102 return !fseeko;
10103   ;
10104   return 0;
10105 }
10106 _ACEOF
10107 rm -f conftest.$ac_objext
10108 if { (eval echo "$as_me:10108: \"$ac_compile\"") >&5
10109   (eval $ac_compile) 2>&5
10110   ac_status=$?
10111   echo "$as_me:10111: \$? = $ac_status" >&5
10112   (exit $ac_status); } &&
10113          { ac_try='test -s conftest.$ac_objext'
10114   { (eval echo "$as_me:10114: \"$ac_try\"") >&5
10115   (eval $ac_try) 2>&5
10116   ac_status=$?
10117   echo "$as_me:10117: \$? = $ac_status" >&5
10118   (exit $ac_status); }; }; then
10119   ac_cv_sys_largefile_source=1; break
10120 else
10121   echo "$as_me: failed program was:" >&5
10122 cat conftest.$ac_ext >&5
10123 fi
10124 rm -f conftest.$ac_objext conftest.$ac_ext
10125   break
10126 done
10127 fi
10128 echo "$as_me:10128: result: $ac_cv_sys_largefile_source" >&5
10129 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10130 if test "$ac_cv_sys_largefile_source" != no; then
10131
10132 cat >>confdefs.h <<EOF
10133 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10134 EOF
10135
10136 fi
10137 rm -rf conftest*
10138
10139 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10140 # in glibc 2.1.3, but that breaks too many other things.
10141 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10142 echo "$as_me:10142: checking for fseeko" >&5
10143 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10144 if test "${ac_cv_func_fseeko+set}" = set; then
10145   echo $ECHO_N "(cached) $ECHO_C" >&6
10146 else
10147   cat >conftest.$ac_ext <<_ACEOF
10148 #line 10148 "configure"
10149 #include "confdefs.h"
10150 #include <stdio.h>
10151 int
10152 main ()
10153 {
10154 return fseeko && fseeko (stdin, 0, 0);
10155   ;
10156   return 0;
10157 }
10158 _ACEOF
10159 rm -f conftest.$ac_objext conftest$ac_exeext
10160 if { (eval echo "$as_me:10160: \"$ac_link\"") >&5
10161   (eval $ac_link) 2>&5
10162   ac_status=$?
10163   echo "$as_me:10163: \$? = $ac_status" >&5
10164   (exit $ac_status); } &&
10165          { ac_try='test -s conftest$ac_exeext'
10166   { (eval echo "$as_me:10166: \"$ac_try\"") >&5
10167   (eval $ac_try) 2>&5
10168   ac_status=$?
10169   echo "$as_me:10169: \$? = $ac_status" >&5
10170   (exit $ac_status); }; }; then
10171   ac_cv_func_fseeko=yes
10172 else
10173   echo "$as_me: failed program was:" >&5
10174 cat conftest.$ac_ext >&5
10175 ac_cv_func_fseeko=no
10176 fi
10177 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10178 fi
10179 echo "$as_me:10179: result: $ac_cv_func_fseeko" >&5
10180 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10181 if test $ac_cv_func_fseeko = yes; then
10182
10183 cat >>confdefs.h <<\EOF
10184 #define HAVE_FSEEKO 1
10185 EOF
10186
10187 fi
10188
10189         # Normally we would collect these definitions in the config.h,
10190         # but (like _XOPEN_SOURCE), some environments rely on having these
10191         # defined before any of the system headers are included.  Another
10192         # case comes up with C++, e.g., on AIX the compiler compiles the
10193         # header files by themselves before looking at the body files it is
10194         # told to compile.  For ncurses, those header files do not include
10195         # the config.h
10196         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10197         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10198         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10199
10200         echo "$as_me:10200: checking whether to use struct dirent64" >&5
10201 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10202 if test "${cf_cv_struct_dirent64+set}" = set; then
10203   echo $ECHO_N "(cached) $ECHO_C" >&6
10204 else
10205
10206                 cat >conftest.$ac_ext <<_ACEOF
10207 #line 10207 "configure"
10208 #include "confdefs.h"
10209
10210 #include <sys/types.h>
10211 #include <dirent.h>
10212
10213 int
10214 main ()
10215 {
10216
10217                 /* if transitional largefile support is setup, this is true */
10218                 extern struct dirent64 * readdir(DIR *);
10219                 struct dirent64 *x = readdir((DIR *)0);
10220                 struct dirent *y = readdir((DIR *)0);
10221                 int z = x - y;
10222
10223   ;
10224   return 0;
10225 }
10226 _ACEOF
10227 rm -f conftest.$ac_objext
10228 if { (eval echo "$as_me:10228: \"$ac_compile\"") >&5
10229   (eval $ac_compile) 2>&5
10230   ac_status=$?
10231   echo "$as_me:10231: \$? = $ac_status" >&5
10232   (exit $ac_status); } &&
10233          { ac_try='test -s conftest.$ac_objext'
10234   { (eval echo "$as_me:10234: \"$ac_try\"") >&5
10235   (eval $ac_try) 2>&5
10236   ac_status=$?
10237   echo "$as_me:10237: \$? = $ac_status" >&5
10238   (exit $ac_status); }; }; then
10239   cf_cv_struct_dirent64=yes
10240 else
10241   echo "$as_me: failed program was:" >&5
10242 cat conftest.$ac_ext >&5
10243 cf_cv_struct_dirent64=no
10244 fi
10245 rm -f conftest.$ac_objext conftest.$ac_ext
10246
10247 fi
10248 echo "$as_me:10248: result: $cf_cv_struct_dirent64" >&5
10249 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10250         test "$cf_cv_struct_dirent64" = yes &&
10251 cat >>confdefs.h <<\EOF
10252 #define HAVE_STRUCT_DIRENT64 1
10253 EOF
10254
10255     fi
10256
10257 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10258 echo "$as_me:10258: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10259 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10260
10261 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10262 if test "${enable_tparm_varargs+set}" = set; then
10263   enableval="$enable_tparm_varargs"
10264   with_tparm_varargs=$enableval
10265 else
10266   with_tparm_varargs=yes
10267 fi;
10268 echo "$as_me:10268: result: $with_tparm_varargs" >&5
10269 echo "${ECHO_T}$with_tparm_varargs" >&6
10270 NCURSES_TPARM_VARARGS=0
10271 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10272
10273 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10274 if test "$with_ticlib" != no ; then
10275 echo "$as_me:10275: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10276 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10277
10278 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10279 if test "${enable_tic_depends+set}" = set; then
10280   enableval="$enable_tic_depends"
10281   with_tic_depends=$enableval
10282 else
10283   with_tic_depends=yes
10284 fi;
10285 echo "$as_me:10285: result: $with_tic_depends" >&5
10286 echo "${ECHO_T}$with_tic_depends" >&6
10287 else
10288         with_tic_depends=no
10289 fi
10290
10291 ###   use option --with-bool to override bool's type
10292 echo "$as_me:10292: checking for type of bool" >&5
10293 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10294
10295 # Check whether --with-bool or --without-bool was given.
10296 if test "${with_bool+set}" = set; then
10297   withval="$with_bool"
10298   NCURSES_BOOL="$withval"
10299 else
10300   NCURSES_BOOL=auto
10301 fi;
10302 echo "$as_me:10302: result: $NCURSES_BOOL" >&5
10303 echo "${ECHO_T}$NCURSES_BOOL" >&6
10304
10305 echo "$as_me:10305: checking for alternate terminal capabilities file" >&5
10306 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10307
10308 # Check whether --with-caps or --without-caps was given.
10309 if test "${with_caps+set}" = set; then
10310   withval="$with_caps"
10311   TERMINFO_CAPS=Caps.$withval
10312 else
10313   TERMINFO_CAPS=Caps
10314 fi;
10315 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10316 echo "$as_me:10316: result: $TERMINFO_CAPS" >&5
10317 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10318
10319 ###   use option --with-chtype to override chtype's type
10320 echo "$as_me:10320: checking for type of chtype" >&5
10321 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10322
10323 # Check whether --with-chtype or --without-chtype was given.
10324 if test "${with_chtype+set}" = set; then
10325   withval="$with_chtype"
10326   NCURSES_CHTYPE="$withval"
10327 else
10328   NCURSES_CHTYPE=auto
10329 fi;
10330 echo "$as_me:10330: result: $NCURSES_CHTYPE" >&5
10331 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10332
10333 ###   use option --with-ospeed to override ospeed's type
10334 echo "$as_me:10334: checking for type of ospeed" >&5
10335 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10336
10337 # Check whether --with-ospeed or --without-ospeed was given.
10338 if test "${with_ospeed+set}" = set; then
10339   withval="$with_ospeed"
10340   NCURSES_OSPEED="$withval"
10341 else
10342   NCURSES_OSPEED=short
10343 fi;
10344 echo "$as_me:10344: result: $NCURSES_OSPEED" >&5
10345 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10346
10347 ###   use option --with-mmask-t to override mmask_t's type
10348 echo "$as_me:10348: checking for type of mmask_t" >&5
10349 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10350
10351 # Check whether --with-mmask-t or --without-mmask-t was given.
10352 if test "${with_mmask_t+set}" = set; then
10353   withval="$with_mmask_t"
10354   NCURSES_MMASK_T="$withval"
10355 else
10356   NCURSES_MMASK_T=auto
10357 fi;
10358 echo "$as_me:10358: result: $NCURSES_MMASK_T" >&5
10359 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10360
10361 ###   use option --with-ccharw-max to override CCHARW_MAX size
10362 echo "$as_me:10362: checking for size CCHARW_MAX" >&5
10363 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10364
10365 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10366 if test "${with_ccharw_max+set}" = set; then
10367   withval="$with_ccharw_max"
10368   NCURSES_CCHARW_MAX="$withval"
10369 else
10370   NCURSES_CCHARW_MAX=5
10371 fi;
10372 echo "$as_me:10372: result: $NCURSES_CCHARW_MAX" >&5
10373 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10374
10375 ###   use option --with-tparm-arg to override tparm's argument type
10376 echo "$as_me:10376: checking for type of tparm args" >&5
10377 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10378
10379 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10380 if test "${with_tparm_arg+set}" = set; then
10381   withval="$with_tparm_arg"
10382   NCURSES_TPARM_ARG="$withval"
10383 else
10384   NCURSES_TPARM_ARG=long
10385 fi;
10386 echo "$as_me:10386: result: $NCURSES_TPARM_ARG" >&5
10387 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10388
10389 ### Enable compiling-in rcs id's
10390 echo "$as_me:10390: checking if RCS identifiers should be compiled-in" >&5
10391 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10392
10393 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10394 if test "${with_rcs_ids+set}" = set; then
10395   withval="$with_rcs_ids"
10396   with_rcs_ids=$withval
10397 else
10398   with_rcs_ids=no
10399 fi;
10400 echo "$as_me:10400: result: $with_rcs_ids" >&5
10401 echo "${ECHO_T}$with_rcs_ids" >&6
10402 test "x$with_rcs_ids" = xyes &&
10403 cat >>confdefs.h <<\EOF
10404 #define USE_RCS_IDS 1
10405 EOF
10406
10407 ###############################################################################
10408
10409 echo "$as_me:10409: checking format of man-pages" >&5
10410 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10411
10412 # Check whether --with-manpage-format or --without-manpage-format was given.
10413 if test "${with_manpage_format+set}" = set; then
10414   withval="$with_manpage_format"
10415   MANPAGE_FORMAT=$withval
10416 else
10417   MANPAGE_FORMAT=unknown
10418 fi;
10419
10420 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10421 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10422
10423 cf_unknown=
10424
10425 case $MANPAGE_FORMAT in
10426 unknown)
10427   if test -z "$MANPATH" ; then
10428     MANPATH="/usr/man:/usr/share/man"
10429   fi
10430
10431   # look for the 'date' man-page (it's most likely to be installed!)
10432   MANPAGE_FORMAT=
10433   cf_preform=no
10434   cf_catonly=yes
10435   cf_example=date
10436
10437   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10438   for cf_dir in $MANPATH; do
10439     test -z "$cf_dir" && cf_dir=/usr/man
10440     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
10441     do
10442       cf_test=`echo $cf_name | sed -e 's/*//'`
10443       if test "x$cf_test" = "x$cf_name" ; then
10444
10445         case "$cf_name" in
10446         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10447         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10448         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10449         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10450         esac
10451
10452         case "$cf_name" in
10453         $cf_dir/man*)
10454           cf_catonly=no
10455           ;;
10456         $cf_dir/cat*)
10457           cf_preform=yes
10458           ;;
10459         esac
10460         break
10461       fi
10462
10463       # if we found a match in either man* or cat*, stop looking
10464       if test -n "$MANPAGE_FORMAT" ; then
10465         cf_found=no
10466         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10467         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10468         case "$cf_name" in
10469         $cf_dir/cat*)
10470           cf_found=yes
10471           ;;
10472         esac
10473         test $cf_found=yes && break
10474       fi
10475     done
10476     # only check the first directory in $MANPATH where we find manpages
10477     if test -n "$MANPAGE_FORMAT" ; then
10478        break
10479     fi
10480   done
10481   # if we did not find the example, just assume it is normal
10482   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10483   IFS="$ac_save_ifs"
10484   ;;
10485 *)
10486   for cf_option in $MANPAGE_FORMAT; do
10487      case $cf_option in #(vi
10488      gzip|compress|BSDI|normal|formatted|catonly)
10489        ;;
10490      *)
10491        cf_unknown="$cf_unknown $cf_option"
10492        ;;
10493      esac
10494   done
10495   ;;
10496 esac
10497
10498 echo "$as_me:10498: result: $MANPAGE_FORMAT" >&5
10499 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10500 if test -n "$cf_unknown" ; then
10501   { echo "$as_me:10501: WARNING: Unexpected manpage-format $cf_unknown" >&5
10502 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10503 fi
10504
10505 echo "$as_me:10505: checking for manpage renaming" >&5
10506 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10507
10508 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10509 if test "${with_manpage_renames+set}" = set; then
10510   withval="$with_manpage_renames"
10511   MANPAGE_RENAMES=$withval
10512 else
10513   MANPAGE_RENAMES=yes
10514 fi;
10515
10516 case ".$MANPAGE_RENAMES" in #(vi
10517 .no) #(vi
10518   ;;
10519 .|.yes)
10520   # Debian 'man' program?
10521   if test -f /etc/debian_version ; then
10522     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10523   else
10524     MANPAGE_RENAMES=no
10525   fi
10526   ;;
10527 esac
10528
10529 if test "$MANPAGE_RENAMES" != no ; then
10530   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10531     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10532   elif test ! -f $MANPAGE_RENAMES ; then
10533     { { echo "$as_me:10533: error: not a filename: $MANPAGE_RENAMES" >&5
10534 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10535    { (exit 1); exit 1; }; }
10536   fi
10537
10538   test ! -d man && mkdir man
10539
10540   # Construct a sed-script to perform renaming within man-pages
10541   if test -n "$MANPAGE_RENAMES" ; then
10542     test ! -d man && mkdir man
10543     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10544   fi
10545 fi
10546
10547 echo "$as_me:10547: result: $MANPAGE_RENAMES" >&5
10548 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10549
10550 echo "$as_me:10550: checking if manpage aliases will be installed" >&5
10551 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10552
10553 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10554 if test "${with_manpage_aliases+set}" = set; then
10555   withval="$with_manpage_aliases"
10556   MANPAGE_ALIASES=$withval
10557 else
10558   MANPAGE_ALIASES=yes
10559 fi;
10560
10561 echo "$as_me:10561: result: $MANPAGE_ALIASES" >&5
10562 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10563
10564 case "x$LN_S" in #(vi
10565 xln*) #(vi
10566         cf_use_symlinks=yes
10567         ;;
10568 *)
10569         cf_use_symlinks=no
10570         ;;
10571 esac
10572
10573 MANPAGE_SYMLINKS=no
10574 if test "$MANPAGE_ALIASES" = yes ; then
10575 echo "$as_me:10575: checking if manpage symlinks should be used" >&5
10576 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10577
10578 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10579 if test "${with_manpage_symlinks+set}" = set; then
10580   withval="$with_manpage_symlinks"
10581   MANPAGE_SYMLINKS=$withval
10582 else
10583   MANPAGE_SYMLINKS=$cf_use_symlinks
10584 fi;
10585
10586 if test "$$cf_use_symlinks" = no; then
10587 if test "$MANPAGE_SYMLINKS" = yes ; then
10588         { echo "$as_me:10588: WARNING: cannot make symlinks" >&5
10589 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10590         MANPAGE_SYMLINKS=no
10591 fi
10592 fi
10593
10594 echo "$as_me:10594: result: $MANPAGE_SYMLINKS" >&5
10595 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10596 fi
10597
10598 echo "$as_me:10598: checking for manpage tbl" >&5
10599 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10600
10601 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10602 if test "${with_manpage_tbl+set}" = set; then
10603   withval="$with_manpage_tbl"
10604   MANPAGE_TBL=$withval
10605 else
10606   MANPAGE_TBL=no
10607 fi;
10608
10609 echo "$as_me:10609: result: $MANPAGE_TBL" >&5
10610 echo "${ECHO_T}$MANPAGE_TBL" >&6
10611
10612   if test "$prefix" = "NONE" ; then
10613      cf_prefix="$ac_default_prefix"
10614   else
10615      cf_prefix="$prefix"
10616   fi
10617
10618   case "$MANPAGE_FORMAT" in # (vi
10619   *catonly*) # (vi
10620     cf_format=yes
10621     cf_inboth=no
10622     ;;
10623   *formatted*) # (vi
10624     cf_format=yes
10625     cf_inboth=yes
10626     ;;
10627   *)
10628     cf_format=no
10629     cf_inboth=no
10630     ;;
10631   esac
10632
10633 test ! -d man && mkdir man
10634
10635 cf_so_strip=
10636 cf_compress=
10637 case "$MANPAGE_FORMAT" in #(vi
10638 *compress*) #(vi
10639         cf_so_strip="Z"
10640         cf_compress=compress
10641   ;;
10642 *gzip*)
10643         cf_so_strip="gz"
10644         cf_compress=gzip
10645   ;;
10646 esac
10647
10648 cf_edit_man=./edit_man.sh
10649 cf_man_alias=`pwd`/man_alias.sed
10650
10651 cat >$cf_edit_man <<CF_EOF
10652 #! /bin/sh
10653 # this script is generated by the configure-script CF_MAN_PAGES macro.
10654
10655 prefix="$cf_prefix"
10656 datarootdir="$datarootdir"
10657 datadir="$datadir"
10658
10659 NCURSES_MAJOR="$NCURSES_MAJOR"
10660 NCURSES_MINOR="$NCURSES_MINOR"
10661 NCURSES_PATCH="$NCURSES_PATCH"
10662
10663 NCURSES_OSPEED="$NCURSES_OSPEED"
10664 TERMINFO="$TERMINFO"
10665
10666 INSTALL="$INSTALL"
10667 INSTALL_DATA="$INSTALL_DATA"
10668
10669 transform="$program_transform_name"
10670
10671 TMP=\${TMPDIR:=/tmp}/man\$\$
10672 trap "rm -f \$TMP" 0 1 2 5 15
10673
10674 form=\$1
10675 shift || exit 1
10676
10677 verb=\$1
10678 shift || exit 1
10679
10680 mandir=\$1
10681 shift || exit 1
10682
10683 srcdir=\$1
10684 top_srcdir=\$srcdir/..
10685 shift || exit 1
10686
10687 if test "\$form" = normal ; then
10688         if test "$cf_format" = yes ; then
10689         if test "$cf_inboth" = no ; then
10690                 sh \$0 format \$verb \$mandir \$srcdir \$*
10691                 exit $?
10692         fi
10693         fi
10694         cf_subdir=\$mandir/man
10695         cf_tables=$MANPAGE_TBL
10696 else
10697         cf_subdir=\$mandir/cat
10698         cf_tables=yes
10699 fi
10700
10701 # process the list of source-files
10702 for i in \$* ; do
10703 case \$i in #(vi
10704 *.orig|*.rej) ;; #(vi
10705 *.[0-9]*)
10706         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10707         if test \$verb = installing ; then
10708         if test ! -d \$cf_subdir\${section} ; then
10709                 mkdir -p \$cf_subdir\$section
10710         fi
10711         fi
10712
10713         # replace variables in man page
10714         if test ! -f $cf_man_alias ; then
10715 cat >>$cf_man_alias <<-CF_EOF2
10716                 s,@DATADIR@,\$datadir,g
10717                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
10718                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
10719                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
10720                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
10721                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
10722                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
10723 CF_EOF
10724
10725         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10726         do
10727                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10728                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10729 cat >>$cf_edit_man <<-CF_EOF
10730                 s,@$cf_NAME@,$cf_name,g
10731 CF_EOF
10732         done
10733
10734 cat >>$cf_edit_man <<CF_EOF
10735 CF_EOF2
10736                 echo "...made $cf_man_alias"
10737         fi
10738
10739         aliases=
10740         cf_source=\`basename \$i\`
10741         inalias=\$cf_source
10742         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10743         if test ! -f \$inalias ; then
10744                 echo .. skipped \$cf_source
10745                 continue
10746         fi
10747 CF_EOF
10748
10749 if test "$MANPAGE_ALIASES" != no ; then
10750 cat >>$cf_edit_man <<CF_EOF
10751         nCurses=ignore.3x
10752         test $with_curses_h = yes && nCurses=ncurses.3x
10753         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10754 CF_EOF
10755 fi
10756
10757 if test "$MANPAGE_RENAMES" = no ; then
10758 cat >>$cf_edit_man <<CF_EOF
10759         # perform program transformations for section 1 man pages
10760         if test \$section = 1 ; then
10761                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10762         else
10763                 cf_target=\$cf_subdir\${section}/\$cf_source
10764         fi
10765 CF_EOF
10766 else
10767 cat >>$cf_edit_man <<CF_EOF
10768         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10769         if test -z "\$cf_target" ; then
10770                 echo '? missing rename for '\$cf_source
10771                 cf_target="\$cf_source"
10772         fi
10773         cf_target="\$cf_subdir\${section}/\${cf_target}"
10774
10775 CF_EOF
10776 fi
10777
10778 cat >>$cf_edit_man <<CF_EOF
10779         sed     -f $cf_man_alias \\
10780 CF_EOF
10781
10782 if test -f $MANPAGE_RENAMES ; then
10783 cat >>$cf_edit_man <<CF_EOF
10784                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10785 CF_EOF
10786 else
10787 cat >>$cf_edit_man <<CF_EOF
10788                 < \$i >\$TMP
10789 CF_EOF
10790 fi
10791
10792 cat >>$cf_edit_man <<CF_EOF
10793 if test \$cf_tables = yes ; then
10794         tbl \$TMP >\$TMP.out
10795         mv \$TMP.out \$TMP
10796 fi
10797 CF_EOF
10798
10799 if test $with_overwrite != yes ; then
10800 cat >>$cf_edit_man <<CF_EOF
10801         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10802         mv \$TMP.out \$TMP
10803 CF_EOF
10804 fi
10805
10806 if test $with_curses_h != yes ; then
10807 cat >>$cf_edit_man <<CF_EOF
10808         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10809         mv \$TMP.out \$TMP
10810 CF_EOF
10811 fi
10812
10813 cat >>$cf_edit_man <<CF_EOF
10814         if test \$form = format ; then
10815                 nroff -man \$TMP >\$TMP.out
10816                 mv \$TMP.out \$TMP
10817         fi
10818 CF_EOF
10819
10820 if test -n "$cf_compress" ; then
10821 cat >>$cf_edit_man <<CF_EOF
10822         if test \$verb = installing ; then
10823         if ( $cf_compress -f \$TMP )
10824         then
10825                 mv \$TMP.$cf_so_strip \$TMP
10826         fi
10827         fi
10828         cf_target="\$cf_target.$cf_so_strip"
10829 CF_EOF
10830 fi
10831
10832 case "$MANPAGE_FORMAT" in #(vi
10833 *BSDI*)
10834 cat >>$cf_edit_man <<CF_EOF
10835         if test \$form = format ; then
10836                 # BSDI installs only .0 suffixes in the cat directories
10837                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10838         fi
10839 CF_EOF
10840   ;;
10841 esac
10842
10843 cat >>$cf_edit_man <<CF_EOF
10844         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10845         if test \$verb = installing ; then
10846                 echo \$verb \$cf_target
10847                 \$INSTALL_DATA \$TMP \$cf_target
10848                 test -d \$cf_subdir\${section} &&
10849                 test -n "\$aliases" && (
10850                         cd \$cf_subdir\${section} && (
10851                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10852                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10853                                 cf_target=\`basename \$cf_target\`
10854                                 for cf_alias in \$aliases
10855                                 do
10856                                         if test \$section = 1 ; then
10857                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10858                                         fi
10859
10860                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10861                                                 if test -f \$cf_alias\${suffix} ; then
10862                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10863                                                         then
10864                                                                 continue
10865                                                         fi
10866                                                 fi
10867                                                 echo .. \$verb alias \$cf_alias\${suffix}
10868 CF_EOF
10869 case "x$LN_S" in #(vi
10870 *-f) #(vi
10871 cat >>$cf_edit_man <<CF_EOF
10872                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10873 CF_EOF
10874         ;;
10875 *)
10876 cat >>$cf_edit_man <<CF_EOF
10877                                                 rm -f \$cf_alias\${suffix}
10878                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10879 CF_EOF
10880         ;;
10881 esac
10882 cat >>$cf_edit_man <<CF_EOF
10883                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10884                                                 echo ".so \$cf_source" >\$TMP
10885 CF_EOF
10886 if test -n "$cf_compress" ; then
10887 cat >>$cf_edit_man <<CF_EOF
10888                                                 if test -n "$cf_so_strip" ; then
10889                                                         $cf_compress -f \$TMP
10890                                                         mv \$TMP.$cf_so_strip \$TMP
10891                                                 fi
10892 CF_EOF
10893 fi
10894 cat >>$cf_edit_man <<CF_EOF
10895                                                 echo .. \$verb alias \$cf_alias\${suffix}
10896                                                 rm -f \$cf_alias\${suffix}
10897                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10898                                         fi
10899                                 done
10900                         )
10901                 )
10902         elif test \$verb = removing ; then
10903                 test -f \$cf_target && (
10904                         echo \$verb \$cf_target
10905                         rm -f \$cf_target
10906                 )
10907                 test -d \$cf_subdir\${section} &&
10908                 test -n "\$aliases" && (
10909                         cd \$cf_subdir\${section} && (
10910                                 for cf_alias in \$aliases
10911                                 do
10912                                         if test \$section = 1 ; then
10913                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10914                                         fi
10915
10916                                         echo .. \$verb alias \$cf_alias\${suffix}
10917                                         rm -f \$cf_alias\${suffix}
10918                                 done
10919                         )
10920                 )
10921         else
10922 #               echo ".hy 0"
10923                 cat \$TMP
10924         fi
10925         ;;
10926 esac
10927 done
10928
10929 if test $cf_inboth = yes ; then
10930 if test \$form != format ; then
10931         sh \$0 format \$verb \$mandir \$srcdir \$*
10932 fi
10933 fi
10934
10935 exit 0
10936 CF_EOF
10937 chmod 755 $cf_edit_man
10938
10939 ###############################################################################
10940
10941 ### Note that some functions (such as const) are normally disabled anyway.
10942 echo "$as_me:10942: checking if you want to build with function extensions" >&5
10943 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10944
10945 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10946 if test "${enable_ext_funcs+set}" = set; then
10947   enableval="$enable_ext_funcs"
10948   with_ext_funcs=$enableval
10949 else
10950   with_ext_funcs=yes
10951 fi;
10952 echo "$as_me:10952: result: $with_ext_funcs" >&5
10953 echo "${ECHO_T}$with_ext_funcs" >&6
10954 if test "x$with_ext_funcs" = xyes ; then
10955         NCURSES_EXT_FUNCS=1
10956
10957 cat >>confdefs.h <<\EOF
10958 #define HAVE_ASSUME_DEFAULT_COLORS 1
10959 EOF
10960
10961 cat >>confdefs.h <<\EOF
10962 #define HAVE_CURSES_VERSION 1
10963 EOF
10964
10965 cat >>confdefs.h <<\EOF
10966 #define HAVE_HAS_KEY 1
10967 EOF
10968
10969 cat >>confdefs.h <<\EOF
10970 #define HAVE_RESIZETERM 1
10971 EOF
10972
10973 cat >>confdefs.h <<\EOF
10974 #define HAVE_RESIZE_TERM 1
10975 EOF
10976
10977 cat >>confdefs.h <<\EOF
10978 #define HAVE_TERM_ENTRY_H 1
10979 EOF
10980
10981 cat >>confdefs.h <<\EOF
10982 #define HAVE_USE_DEFAULT_COLORS 1
10983 EOF
10984
10985 cat >>confdefs.h <<\EOF
10986 #define HAVE_USE_SCREEN 1
10987 EOF
10988
10989 cat >>confdefs.h <<\EOF
10990 #define HAVE_USE_WINDOW 1
10991 EOF
10992
10993 cat >>confdefs.h <<\EOF
10994 #define HAVE_WRESIZE 1
10995 EOF
10996
10997 cat >>confdefs.h <<\EOF
10998 #define NCURSES_EXT_FUNCS 1
10999 EOF
11000
11001         GENERATED_EXT_FUNCS=generated
11002 else
11003         NCURSES_EXT_FUNCS=0
11004         GENERATED_EXT_FUNCS=
11005 fi
11006
11007 echo "$as_me:11007: checking if you want to build with experimental SCREEN extensions" >&5
11008 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
11009
11010 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11011 if test "${enable_sp_funcs+set}" = set; then
11012   enableval="$enable_sp_funcs"
11013   with_sp_funcs=$enableval
11014 else
11015   with_sp_funcs=no
11016 fi;
11017 echo "$as_me:11017: result: $with_sp_funcs" >&5
11018 echo "${ECHO_T}$with_sp_funcs" >&6
11019 if test "x$with_sp_funcs" = xyes ; then
11020         NCURSES_SP_FUNCS=1
11021
11022 cat >>confdefs.h <<\EOF
11023 #define NCURSES_SP_FUNCS 1
11024 EOF
11025
11026         GENERATED_SP_FUNCS=generated
11027 else
11028         NCURSES_SP_FUNCS=0
11029         GENERATED_SP_FUNCS=
11030 fi
11031
11032 echo "$as_me:11032: checking if you want to build with experimental terminal-driver" >&5
11033 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
11034
11035 # Check whether --enable-term-driver or --disable-term-driver was given.
11036 if test "${enable_term_driver+set}" = set; then
11037   enableval="$enable_term_driver"
11038   with_term_driver=$enableval
11039 else
11040   with_term_driver=no
11041 fi;
11042 echo "$as_me:11042: result: $with_term_driver" >&5
11043 echo "${ECHO_T}$with_term_driver" >&6
11044 if test "x$with_term_driver" = xyes ; then
11045
11046 cat >>confdefs.h <<\EOF
11047 #define USE_TERM_DRIVER 1
11048 EOF
11049
11050         if test "x$with_sp_funcs" != xyes ; then
11051                 { { echo "$as_me:11051: error: The term-driver option relies upon sp-funcs" >&5
11052 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11053    { (exit 1); exit 1; }; }
11054         fi
11055 fi
11056
11057 ###   use option --enable-const to turn on use of const beyond that in XSI.
11058 echo "$as_me:11058: checking for extended use of const keyword" >&5
11059 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11060
11061 # Check whether --enable-const or --disable-const was given.
11062 if test "${enable_const+set}" = set; then
11063   enableval="$enable_const"
11064   with_ext_const=$enableval
11065 else
11066   with_ext_const=no
11067 fi;
11068 echo "$as_me:11068: result: $with_ext_const" >&5
11069 echo "${ECHO_T}$with_ext_const" >&6
11070 NCURSES_CONST='/*nothing*/'
11071 if test "x$with_ext_const" = xyes ; then
11072         NCURSES_CONST=const
11073 fi
11074
11075 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11076 echo "$as_me:11076: checking if you want to use extended colors" >&5
11077 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11078
11079 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11080 if test "${enable_ext_colors+set}" = set; then
11081   enableval="$enable_ext_colors"
11082   with_ext_colors=$enableval
11083 else
11084   with_ext_colors=no
11085 fi;
11086 echo "$as_me:11086: result: $with_ext_colors" >&5
11087 echo "${ECHO_T}$with_ext_colors" >&6
11088 NCURSES_EXT_COLORS=0
11089 if test "x$with_ext_colors" = xyes ; then
11090         if test "x$with_widec" != xyes ; then
11091                 { { echo "$as_me:11091: error: This option applies only to wide-character library" >&5
11092 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11093    { (exit 1); exit 1; }; }
11094         else
11095                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11096
11097 if test "${with_abi_version+set}" != set; then
11098         case $cf_cv_rel_version in
11099         5.*)
11100                 cf_cv_rel_version=6.0
11101                 cf_cv_abi_version=6
11102                 { echo "$as_me:11102: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11103 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11104                 ;;
11105         esac
11106 fi
11107
11108         fi
11109         NCURSES_EXT_COLORS=1
11110
11111 cat >>confdefs.h <<\EOF
11112 #define NCURSES_EXT_COLORS 1
11113 EOF
11114
11115 fi
11116
11117 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11118 echo "$as_me:11118: checking if you want to use extended mouse encoding" >&5
11119 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11120
11121 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11122 if test "${enable_ext_mouse+set}" = set; then
11123   enableval="$enable_ext_mouse"
11124   with_ext_mouse=$enableval
11125 else
11126   with_ext_mouse=no
11127 fi;
11128 echo "$as_me:11128: result: $with_ext_mouse" >&5
11129 echo "${ECHO_T}$with_ext_mouse" >&6
11130 NCURSES_MOUSE_VERSION=1
11131 if test "x$with_ext_mouse" = xyes ; then
11132         NCURSES_MOUSE_VERSION=2
11133
11134 if test "${with_abi_version+set}" != set; then
11135         case $cf_cv_rel_version in
11136         5.*)
11137                 cf_cv_rel_version=6.0
11138                 cf_cv_abi_version=6
11139                 { echo "$as_me:11139: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11140 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11141                 ;;
11142         esac
11143 fi
11144
11145 fi
11146
11147 echo "$as_me:11147: checking if you want \$NCURSES_NO_PADDING code" >&5
11148 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11149
11150 # Check whether --enable-no-padding or --disable-no-padding was given.
11151 if test "${enable_no_padding+set}" = set; then
11152   enableval="$enable_no_padding"
11153   with_no_padding=$enableval
11154 else
11155   with_no_padding=$with_ext_funcs
11156 fi;
11157 echo "$as_me:11157: result: $with_no_padding" >&5
11158 echo "${ECHO_T}$with_no_padding" >&6
11159 test "x$with_no_padding" = xyes &&
11160 cat >>confdefs.h <<\EOF
11161 #define NCURSES_NO_PADDING 1
11162 EOF
11163
11164 echo "$as_me:11164: checking for ANSI C header files" >&5
11165 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11166 if test "${ac_cv_header_stdc+set}" = set; then
11167   echo $ECHO_N "(cached) $ECHO_C" >&6
11168 else
11169   cat >conftest.$ac_ext <<_ACEOF
11170 #line 11170 "configure"
11171 #include "confdefs.h"
11172 #include <stdlib.h>
11173 #include <stdarg.h>
11174 #include <string.h>
11175 #include <float.h>
11176
11177 _ACEOF
11178 if { (eval echo "$as_me:11178: \"$ac_cpp conftest.$ac_ext\"") >&5
11179   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11180   ac_status=$?
11181   egrep -v '^ *\+' conftest.er1 >conftest.err
11182   rm -f conftest.er1
11183   cat conftest.err >&5
11184   echo "$as_me:11184: \$? = $ac_status" >&5
11185   (exit $ac_status); } >/dev/null; then
11186   if test -s conftest.err; then
11187     ac_cpp_err=$ac_c_preproc_warn_flag
11188   else
11189     ac_cpp_err=
11190   fi
11191 else
11192   ac_cpp_err=yes
11193 fi
11194 if test -z "$ac_cpp_err"; then
11195   ac_cv_header_stdc=yes
11196 else
11197   echo "$as_me: failed program was:" >&5
11198   cat conftest.$ac_ext >&5
11199   ac_cv_header_stdc=no
11200 fi
11201 rm -f conftest.err conftest.$ac_ext
11202
11203 if test $ac_cv_header_stdc = yes; then
11204   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11205   cat >conftest.$ac_ext <<_ACEOF
11206 #line 11206 "configure"
11207 #include "confdefs.h"
11208 #include <string.h>
11209
11210 _ACEOF
11211 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11212   egrep "memchr" >/dev/null 2>&1; then
11213   :
11214 else
11215   ac_cv_header_stdc=no
11216 fi
11217 rm -rf conftest*
11218
11219 fi
11220
11221 if test $ac_cv_header_stdc = yes; then
11222   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11223   cat >conftest.$ac_ext <<_ACEOF
11224 #line 11224 "configure"
11225 #include "confdefs.h"
11226 #include <stdlib.h>
11227
11228 _ACEOF
11229 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11230   egrep "free" >/dev/null 2>&1; then
11231   :
11232 else
11233   ac_cv_header_stdc=no
11234 fi
11235 rm -rf conftest*
11236
11237 fi
11238
11239 if test $ac_cv_header_stdc = yes; then
11240   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11241   if test "$cross_compiling" = yes; then
11242   :
11243 else
11244   cat >conftest.$ac_ext <<_ACEOF
11245 #line 11245 "configure"
11246 #include "confdefs.h"
11247 #include <ctype.h>
11248 #if ((' ' & 0x0FF) == 0x020)
11249 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11250 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11251 #else
11252 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11253                      || ('j' <= (c) && (c) <= 'r') \
11254                      || ('s' <= (c) && (c) <= 'z'))
11255 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11256 #endif
11257
11258 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11259 int
11260 main ()
11261 {
11262   int i;
11263   for (i = 0; i < 256; i++)
11264     if (XOR (islower (i), ISLOWER (i))
11265         || toupper (i) != TOUPPER (i))
11266       $ac_main_return(2);
11267   $ac_main_return (0);
11268 }
11269 _ACEOF
11270 rm -f conftest$ac_exeext
11271 if { (eval echo "$as_me:11271: \"$ac_link\"") >&5
11272   (eval $ac_link) 2>&5
11273   ac_status=$?
11274   echo "$as_me:11274: \$? = $ac_status" >&5
11275   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11276   { (eval echo "$as_me:11276: \"$ac_try\"") >&5
11277   (eval $ac_try) 2>&5
11278   ac_status=$?
11279   echo "$as_me:11279: \$? = $ac_status" >&5
11280   (exit $ac_status); }; }; then
11281   :
11282 else
11283   echo "$as_me: program exited with status $ac_status" >&5
11284 echo "$as_me: failed program was:" >&5
11285 cat conftest.$ac_ext >&5
11286 ac_cv_header_stdc=no
11287 fi
11288 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11289 fi
11290 fi
11291 fi
11292 echo "$as_me:11292: result: $ac_cv_header_stdc" >&5
11293 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11294 if test $ac_cv_header_stdc = yes; then
11295
11296 cat >>confdefs.h <<\EOF
11297 #define STDC_HEADERS 1
11298 EOF
11299
11300 fi
11301
11302 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11303
11304 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11305                   inttypes.h stdint.h unistd.h
11306 do
11307 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11308 echo "$as_me:11308: checking for $ac_header" >&5
11309 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11310 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11311   echo $ECHO_N "(cached) $ECHO_C" >&6
11312 else
11313   cat >conftest.$ac_ext <<_ACEOF
11314 #line 11314 "configure"
11315 #include "confdefs.h"
11316 $ac_includes_default
11317 #include <$ac_header>
11318 _ACEOF
11319 rm -f conftest.$ac_objext
11320 if { (eval echo "$as_me:11320: \"$ac_compile\"") >&5
11321   (eval $ac_compile) 2>&5
11322   ac_status=$?
11323   echo "$as_me:11323: \$? = $ac_status" >&5
11324   (exit $ac_status); } &&
11325          { ac_try='test -s conftest.$ac_objext'
11326   { (eval echo "$as_me:11326: \"$ac_try\"") >&5
11327   (eval $ac_try) 2>&5
11328   ac_status=$?
11329   echo "$as_me:11329: \$? = $ac_status" >&5
11330   (exit $ac_status); }; }; then
11331   eval "$as_ac_Header=yes"
11332 else
11333   echo "$as_me: failed program was:" >&5
11334 cat conftest.$ac_ext >&5
11335 eval "$as_ac_Header=no"
11336 fi
11337 rm -f conftest.$ac_objext conftest.$ac_ext
11338 fi
11339 echo "$as_me:11339: result: `eval echo '${'$as_ac_Header'}'`" >&5
11340 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11341 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11342   cat >>confdefs.h <<EOF
11343 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11344 EOF
11345
11346 fi
11347 done
11348
11349 echo "$as_me:11349: checking for signed char" >&5
11350 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11351 if test "${ac_cv_type_signed_char+set}" = set; then
11352   echo $ECHO_N "(cached) $ECHO_C" >&6
11353 else
11354   cat >conftest.$ac_ext <<_ACEOF
11355 #line 11355 "configure"
11356 #include "confdefs.h"
11357 $ac_includes_default
11358 int
11359 main ()
11360 {
11361 if ((signed char *) 0)
11362   return 0;
11363 if (sizeof (signed char))
11364   return 0;
11365   ;
11366   return 0;
11367 }
11368 _ACEOF
11369 rm -f conftest.$ac_objext
11370 if { (eval echo "$as_me:11370: \"$ac_compile\"") >&5
11371   (eval $ac_compile) 2>&5
11372   ac_status=$?
11373   echo "$as_me:11373: \$? = $ac_status" >&5
11374   (exit $ac_status); } &&
11375          { ac_try='test -s conftest.$ac_objext'
11376   { (eval echo "$as_me:11376: \"$ac_try\"") >&5
11377   (eval $ac_try) 2>&5
11378   ac_status=$?
11379   echo "$as_me:11379: \$? = $ac_status" >&5
11380   (exit $ac_status); }; }; then
11381   ac_cv_type_signed_char=yes
11382 else
11383   echo "$as_me: failed program was:" >&5
11384 cat conftest.$ac_ext >&5
11385 ac_cv_type_signed_char=no
11386 fi
11387 rm -f conftest.$ac_objext conftest.$ac_ext
11388 fi
11389 echo "$as_me:11389: result: $ac_cv_type_signed_char" >&5
11390 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11391
11392 echo "$as_me:11392: checking size of signed char" >&5
11393 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11394 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11395   echo $ECHO_N "(cached) $ECHO_C" >&6
11396 else
11397   if test "$ac_cv_type_signed_char" = yes; then
11398   if test "$cross_compiling" = yes; then
11399   # Depending upon the size, compute the lo and hi bounds.
11400 cat >conftest.$ac_ext <<_ACEOF
11401 #line 11401 "configure"
11402 #include "confdefs.h"
11403 $ac_includes_default
11404 int
11405 main ()
11406 {
11407 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11408   ;
11409   return 0;
11410 }
11411 _ACEOF
11412 rm -f conftest.$ac_objext
11413 if { (eval echo "$as_me:11413: \"$ac_compile\"") >&5
11414   (eval $ac_compile) 2>&5
11415   ac_status=$?
11416   echo "$as_me:11416: \$? = $ac_status" >&5
11417   (exit $ac_status); } &&
11418          { ac_try='test -s conftest.$ac_objext'
11419   { (eval echo "$as_me:11419: \"$ac_try\"") >&5
11420   (eval $ac_try) 2>&5
11421   ac_status=$?
11422   echo "$as_me:11422: \$? = $ac_status" >&5
11423   (exit $ac_status); }; }; then
11424   ac_lo=0 ac_mid=0
11425   while :; do
11426     cat >conftest.$ac_ext <<_ACEOF
11427 #line 11427 "configure"
11428 #include "confdefs.h"
11429 $ac_includes_default
11430 int
11431 main ()
11432 {
11433 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11434   ;
11435   return 0;
11436 }
11437 _ACEOF
11438 rm -f conftest.$ac_objext
11439 if { (eval echo "$as_me:11439: \"$ac_compile\"") >&5
11440   (eval $ac_compile) 2>&5
11441   ac_status=$?
11442   echo "$as_me:11442: \$? = $ac_status" >&5
11443   (exit $ac_status); } &&
11444          { ac_try='test -s conftest.$ac_objext'
11445   { (eval echo "$as_me:11445: \"$ac_try\"") >&5
11446   (eval $ac_try) 2>&5
11447   ac_status=$?
11448   echo "$as_me:11448: \$? = $ac_status" >&5
11449   (exit $ac_status); }; }; then
11450   ac_hi=$ac_mid; break
11451 else
11452   echo "$as_me: failed program was:" >&5
11453 cat conftest.$ac_ext >&5
11454 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11455 fi
11456 rm -f conftest.$ac_objext conftest.$ac_ext
11457   done
11458 else
11459   echo "$as_me: failed program was:" >&5
11460 cat conftest.$ac_ext >&5
11461 ac_hi=-1 ac_mid=-1
11462   while :; do
11463     cat >conftest.$ac_ext <<_ACEOF
11464 #line 11464 "configure"
11465 #include "confdefs.h"
11466 $ac_includes_default
11467 int
11468 main ()
11469 {
11470 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11471   ;
11472   return 0;
11473 }
11474 _ACEOF
11475 rm -f conftest.$ac_objext
11476 if { (eval echo "$as_me:11476: \"$ac_compile\"") >&5
11477   (eval $ac_compile) 2>&5
11478   ac_status=$?
11479   echo "$as_me:11479: \$? = $ac_status" >&5
11480   (exit $ac_status); } &&
11481          { ac_try='test -s conftest.$ac_objext'
11482   { (eval echo "$as_me:11482: \"$ac_try\"") >&5
11483   (eval $ac_try) 2>&5
11484   ac_status=$?
11485   echo "$as_me:11485: \$? = $ac_status" >&5
11486   (exit $ac_status); }; }; then
11487   ac_lo=$ac_mid; break
11488 else
11489   echo "$as_me: failed program was:" >&5
11490 cat conftest.$ac_ext >&5
11491 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11492 fi
11493 rm -f conftest.$ac_objext conftest.$ac_ext
11494   done
11495 fi
11496 rm -f conftest.$ac_objext conftest.$ac_ext
11497 # Binary search between lo and hi bounds.
11498 while test "x$ac_lo" != "x$ac_hi"; do
11499   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11500   cat >conftest.$ac_ext <<_ACEOF
11501 #line 11501 "configure"
11502 #include "confdefs.h"
11503 $ac_includes_default
11504 int
11505 main ()
11506 {
11507 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11508   ;
11509   return 0;
11510 }
11511 _ACEOF
11512 rm -f conftest.$ac_objext
11513 if { (eval echo "$as_me:11513: \"$ac_compile\"") >&5
11514   (eval $ac_compile) 2>&5
11515   ac_status=$?
11516   echo "$as_me:11516: \$? = $ac_status" >&5
11517   (exit $ac_status); } &&
11518          { ac_try='test -s conftest.$ac_objext'
11519   { (eval echo "$as_me:11519: \"$ac_try\"") >&5
11520   (eval $ac_try) 2>&5
11521   ac_status=$?
11522   echo "$as_me:11522: \$? = $ac_status" >&5
11523   (exit $ac_status); }; }; then
11524   ac_hi=$ac_mid
11525 else
11526   echo "$as_me: failed program was:" >&5
11527 cat conftest.$ac_ext >&5
11528 ac_lo=`expr $ac_mid + 1`
11529 fi
11530 rm -f conftest.$ac_objext conftest.$ac_ext
11531 done
11532 ac_cv_sizeof_signed_char=$ac_lo
11533 else
11534   if test "$cross_compiling" = yes; then
11535   { { echo "$as_me:11535: error: cannot run test program while cross compiling" >&5
11536 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11537    { (exit 1); exit 1; }; }
11538 else
11539   cat >conftest.$ac_ext <<_ACEOF
11540 #line 11540 "configure"
11541 #include "confdefs.h"
11542 $ac_includes_default
11543 int
11544 main ()
11545 {
11546 FILE *f = fopen ("conftest.val", "w");
11547 if (!f)
11548   $ac_main_return (1);
11549 fprintf (f, "%d", (sizeof (signed char)));
11550 fclose (f);
11551   ;
11552   return 0;
11553 }
11554 _ACEOF
11555 rm -f conftest$ac_exeext
11556 if { (eval echo "$as_me:11556: \"$ac_link\"") >&5
11557   (eval $ac_link) 2>&5
11558   ac_status=$?
11559   echo "$as_me:11559: \$? = $ac_status" >&5
11560   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11561   { (eval echo "$as_me:11561: \"$ac_try\"") >&5
11562   (eval $ac_try) 2>&5
11563   ac_status=$?
11564   echo "$as_me:11564: \$? = $ac_status" >&5
11565   (exit $ac_status); }; }; then
11566   ac_cv_sizeof_signed_char=`cat conftest.val`
11567 else
11568   echo "$as_me: program exited with status $ac_status" >&5
11569 echo "$as_me: failed program was:" >&5
11570 cat conftest.$ac_ext >&5
11571 fi
11572 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11573 fi
11574 fi
11575 rm -f conftest.val
11576 else
11577   ac_cv_sizeof_signed_char=0
11578 fi
11579 fi
11580 echo "$as_me:11580: result: $ac_cv_sizeof_signed_char" >&5
11581 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11582 cat >>confdefs.h <<EOF
11583 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11584 EOF
11585
11586 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11587         NCURSES_SBOOL="signed char"
11588 else
11589         NCURSES_SBOOL="char"
11590 fi
11591 echo "$as_me:11591: checking if you want to use signed Boolean array in term.h" >&5
11592 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11593
11594 # Check whether --enable-signed-char or --disable-signed-char was given.
11595 if test "${enable_signed_char+set}" = set; then
11596   enableval="$enable_signed_char"
11597   with_signed_char=$enableval
11598 else
11599   with_signed_char=no
11600 fi;
11601 echo "$as_me:11601: result: $with_signed_char" >&5
11602 echo "${ECHO_T}$with_signed_char" >&6
11603 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11604
11605 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11606 echo "$as_me:11606: checking if you want SIGWINCH handler" >&5
11607 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11608
11609 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11610 if test "${enable_sigwinch+set}" = set; then
11611   enableval="$enable_sigwinch"
11612   with_sigwinch=$enableval
11613 else
11614   with_sigwinch=$with_ext_funcs
11615 fi;
11616 echo "$as_me:11616: result: $with_sigwinch" >&5
11617 echo "${ECHO_T}$with_sigwinch" >&6
11618 test "x$with_sigwinch" = xyes &&
11619 cat >>confdefs.h <<\EOF
11620 #define USE_SIGWINCH 1
11621 EOF
11622
11623 ###   use option --enable-tcap-names to allow user to define new capabilities
11624 echo "$as_me:11624: checking if you want user-definable terminal capabilities like termcap" >&5
11625 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11626
11627 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11628 if test "${enable_tcap_names+set}" = set; then
11629   enableval="$enable_tcap_names"
11630   with_tcap_names=$enableval
11631 else
11632   with_tcap_names=$with_ext_funcs
11633 fi;
11634 echo "$as_me:11634: result: $with_tcap_names" >&5
11635 echo "${ECHO_T}$with_tcap_names" >&6
11636 NCURSES_XNAMES=0
11637 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
11638
11639 ###############################################################################
11640 # These options are relatively safe to experiment with.
11641
11642 echo "$as_me:11642: checking if you want all development code" >&5
11643 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11644
11645 # Check whether --with-develop or --without-develop was given.
11646 if test "${with_develop+set}" = set; then
11647   withval="$with_develop"
11648   with_develop=$withval
11649 else
11650   with_develop=no
11651 fi;
11652 echo "$as_me:11652: result: $with_develop" >&5
11653 echo "${ECHO_T}$with_develop" >&6
11654
11655 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11656 echo "$as_me:11656: checking if you want hard-tabs code" >&5
11657 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11658
11659 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11660 if test "${enable_hard_tabs+set}" = set; then
11661   enableval="$enable_hard_tabs"
11662
11663 else
11664   enable_hard_tabs=$with_develop
11665 fi;
11666 echo "$as_me:11666: result: $enable_hard_tabs" >&5
11667 echo "${ECHO_T}$enable_hard_tabs" >&6
11668 test "x$enable_hard_tabs" = xyes &&
11669 cat >>confdefs.h <<\EOF
11670 #define USE_HARD_TABS 1
11671 EOF
11672
11673 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11674 echo "$as_me:11674: checking if you want limited support for xmc" >&5
11675 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11676
11677 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11678 if test "${enable_xmc_glitch+set}" = set; then
11679   enableval="$enable_xmc_glitch"
11680
11681 else
11682   enable_xmc_glitch=$with_develop
11683 fi;
11684 echo "$as_me:11684: result: $enable_xmc_glitch" >&5
11685 echo "${ECHO_T}$enable_xmc_glitch" >&6
11686 test "x$enable_xmc_glitch" = xyes &&
11687 cat >>confdefs.h <<\EOF
11688 #define USE_XMC_SUPPORT 1
11689 EOF
11690
11691 ###############################################################################
11692 # These are just experimental, probably should not be in a package:
11693
11694 echo "$as_me:11694: checking if you do not want to assume colors are white-on-black" >&5
11695 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11696
11697 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11698 if test "${enable_assumed_color+set}" = set; then
11699   enableval="$enable_assumed_color"
11700   with_assumed_color=$enableval
11701 else
11702   with_assumed_color=yes
11703 fi;
11704 echo "$as_me:11704: result: $with_assumed_color" >&5
11705 echo "${ECHO_T}$with_assumed_color" >&6
11706 test "x$with_assumed_color" = xyes &&
11707 cat >>confdefs.h <<\EOF
11708 #define USE_ASSUMED_COLOR 1
11709 EOF
11710
11711 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11712 echo "$as_me:11712: checking if you want hashmap scrolling-optimization code" >&5
11713 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11714
11715 # Check whether --enable-hashmap or --disable-hashmap was given.
11716 if test "${enable_hashmap+set}" = set; then
11717   enableval="$enable_hashmap"
11718   with_hashmap=$enableval
11719 else
11720   with_hashmap=yes
11721 fi;
11722 echo "$as_me:11722: result: $with_hashmap" >&5
11723 echo "${ECHO_T}$with_hashmap" >&6
11724 test "x$with_hashmap" = xyes &&
11725 cat >>confdefs.h <<\EOF
11726 #define USE_HASHMAP 1
11727 EOF
11728
11729 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11730 echo "$as_me:11730: checking if you want colorfgbg code" >&5
11731 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11732
11733 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11734 if test "${enable_colorfgbg+set}" = set; then
11735   enableval="$enable_colorfgbg"
11736   with_colorfgbg=$enableval
11737 else
11738   with_colorfgbg=no
11739 fi;
11740 echo "$as_me:11740: result: $with_colorfgbg" >&5
11741 echo "${ECHO_T}$with_colorfgbg" >&6
11742 test "x$with_colorfgbg" = xyes &&
11743 cat >>confdefs.h <<\EOF
11744 #define USE_COLORFGBG 1
11745 EOF
11746
11747 ###   use option --enable-interop to turn on use of bindings used for interop
11748 echo "$as_me:11748: checking if you want interop bindings" >&5
11749 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11750
11751 # Check whether --enable-interop or --disable-interop was given.
11752 if test "${enable_interop+set}" = set; then
11753   enableval="$enable_interop"
11754   with_exp_interop=$enableval
11755 else
11756   with_exp_interop=no
11757 fi;
11758 echo "$as_me:11758: result: $with_exp_interop" >&5
11759 echo "${ECHO_T}$with_exp_interop" >&6
11760
11761 NCURSES_INTEROP_FUNCS=0
11762 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
11763
11764 # This is still experimental (20080329), but should ultimately be moved to
11765 # the script-block --with-normal, etc.
11766
11767 echo "$as_me:11767: checking if you want to link with the pthread library" >&5
11768 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11769
11770 # Check whether --with-pthread or --without-pthread was given.
11771 if test "${with_pthread+set}" = set; then
11772   withval="$with_pthread"
11773   with_pthread=$withval
11774 else
11775   with_pthread=no
11776 fi;
11777 echo "$as_me:11777: result: $with_pthread" >&5
11778 echo "${ECHO_T}$with_pthread" >&6
11779
11780 if test "$with_pthread" != no ; then
11781     echo "$as_me:11781: checking for pthread.h" >&5
11782 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11783 if test "${ac_cv_header_pthread_h+set}" = set; then
11784   echo $ECHO_N "(cached) $ECHO_C" >&6
11785 else
11786   cat >conftest.$ac_ext <<_ACEOF
11787 #line 11787 "configure"
11788 #include "confdefs.h"
11789 #include <pthread.h>
11790 _ACEOF
11791 if { (eval echo "$as_me:11791: \"$ac_cpp conftest.$ac_ext\"") >&5
11792   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11793   ac_status=$?
11794   egrep -v '^ *\+' conftest.er1 >conftest.err
11795   rm -f conftest.er1
11796   cat conftest.err >&5
11797   echo "$as_me:11797: \$? = $ac_status" >&5
11798   (exit $ac_status); } >/dev/null; then
11799   if test -s conftest.err; then
11800     ac_cpp_err=$ac_c_preproc_warn_flag
11801   else
11802     ac_cpp_err=
11803   fi
11804 else
11805   ac_cpp_err=yes
11806 fi
11807 if test -z "$ac_cpp_err"; then
11808   ac_cv_header_pthread_h=yes
11809 else
11810   echo "$as_me: failed program was:" >&5
11811   cat conftest.$ac_ext >&5
11812   ac_cv_header_pthread_h=no
11813 fi
11814 rm -f conftest.err conftest.$ac_ext
11815 fi
11816 echo "$as_me:11816: result: $ac_cv_header_pthread_h" >&5
11817 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11818 if test $ac_cv_header_pthread_h = yes; then
11819
11820 cat >>confdefs.h <<\EOF
11821 #define HAVE_PTHREADS_H 1
11822 EOF
11823
11824         for cf_lib_pthread in pthread c_r
11825         do
11826             echo "$as_me:11826: checking if we can link with the $cf_lib_pthread library" >&5
11827 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11828             cf_save_LIBS="$LIBS"
11829             LIBS="-l$cf_lib_pthread $LIBS"
11830             cat >conftest.$ac_ext <<_ACEOF
11831 #line 11831 "configure"
11832 #include "confdefs.h"
11833
11834 #include <pthread.h>
11835
11836 int
11837 main ()
11838 {
11839
11840                 int rc = pthread_create(0,0,0,0);
11841                 int r2 = pthread_mutexattr_settype(0, 0);
11842
11843   ;
11844   return 0;
11845 }
11846 _ACEOF
11847 rm -f conftest.$ac_objext conftest$ac_exeext
11848 if { (eval echo "$as_me:11848: \"$ac_link\"") >&5
11849   (eval $ac_link) 2>&5
11850   ac_status=$?
11851   echo "$as_me:11851: \$? = $ac_status" >&5
11852   (exit $ac_status); } &&
11853          { ac_try='test -s conftest$ac_exeext'
11854   { (eval echo "$as_me:11854: \"$ac_try\"") >&5
11855   (eval $ac_try) 2>&5
11856   ac_status=$?
11857   echo "$as_me:11857: \$? = $ac_status" >&5
11858   (exit $ac_status); }; }; then
11859   with_pthread=yes
11860 else
11861   echo "$as_me: failed program was:" >&5
11862 cat conftest.$ac_ext >&5
11863 with_pthread=no
11864 fi
11865 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11866             LIBS="$cf_save_LIBS"
11867             echo "$as_me:11867: result: $with_pthread" >&5
11868 echo "${ECHO_T}$with_pthread" >&6
11869             test "$with_pthread" = yes && break
11870         done
11871
11872         if test "$with_pthread" = yes ; then
11873             LIBS="-l$cf_lib_pthread $LIBS"
11874
11875 cat >>confdefs.h <<\EOF
11876 #define HAVE_LIBPTHREADS 1
11877 EOF
11878
11879         else
11880             { { echo "$as_me:11880: error: Cannot link with pthread library" >&5
11881 echo "$as_me: error: Cannot link with pthread library" >&2;}
11882    { (exit 1); exit 1; }; }
11883         fi
11884
11885 fi
11886
11887 fi
11888
11889 if test "x$with_pthread" != xno; then
11890         echo "$as_me:11890: checking for pthread_kill" >&5
11891 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11892 if test "${ac_cv_func_pthread_kill+set}" = set; then
11893   echo $ECHO_N "(cached) $ECHO_C" >&6
11894 else
11895   cat >conftest.$ac_ext <<_ACEOF
11896 #line 11896 "configure"
11897 #include "confdefs.h"
11898 /* System header to define __stub macros and hopefully few prototypes,
11899     which can conflict with char pthread_kill (); below.  */
11900 #include <assert.h>
11901 /* Override any gcc2 internal prototype to avoid an error.  */
11902 #ifdef __cplusplus
11903 extern "C"
11904 #endif
11905 /* We use char because int might match the return type of a gcc2
11906    builtin and then its argument prototype would still apply.  */
11907 char pthread_kill ();
11908 char (*f) ();
11909
11910 int
11911 main ()
11912 {
11913 /* The GNU C library defines this for functions which it implements
11914     to always fail with ENOSYS.  Some functions are actually named
11915     something starting with __ and the normal name is an alias.  */
11916 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11917 choke me
11918 #else
11919 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11920 #endif
11921
11922   ;
11923   return 0;
11924 }
11925 _ACEOF
11926 rm -f conftest.$ac_objext conftest$ac_exeext
11927 if { (eval echo "$as_me:11927: \"$ac_link\"") >&5
11928   (eval $ac_link) 2>&5
11929   ac_status=$?
11930   echo "$as_me:11930: \$? = $ac_status" >&5
11931   (exit $ac_status); } &&
11932          { ac_try='test -s conftest$ac_exeext'
11933   { (eval echo "$as_me:11933: \"$ac_try\"") >&5
11934   (eval $ac_try) 2>&5
11935   ac_status=$?
11936   echo "$as_me:11936: \$? = $ac_status" >&5
11937   (exit $ac_status); }; }; then
11938   ac_cv_func_pthread_kill=yes
11939 else
11940   echo "$as_me: failed program was:" >&5
11941 cat conftest.$ac_ext >&5
11942 ac_cv_func_pthread_kill=no
11943 fi
11944 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11945 fi
11946 echo "$as_me:11946: result: $ac_cv_func_pthread_kill" >&5
11947 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11948 if test $ac_cv_func_pthread_kill = yes; then
11949
11950                 echo "$as_me:11950: checking if you want to allow EINTR in wgetch with pthreads" >&5
11951 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11952
11953 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11954 if test "${enable_pthreads_eintr+set}" = set; then
11955   enableval="$enable_pthreads_eintr"
11956   use_pthreads_eintr=$enableval
11957 else
11958   use_pthreads_eintr=no
11959 fi;
11960                 echo "$as_me:11960: result: $use_pthreads_eintr" >&5
11961 echo "${ECHO_T}$use_pthreads_eintr" >&6
11962                 if test "x$use_pthreads_eintr" = xyes ; then
11963
11964 cat >>confdefs.h <<\EOF
11965 #define USE_PTHREADS_EINTR 1
11966 EOF
11967
11968                 fi
11969 fi
11970
11971         echo "$as_me:11971: checking if you want to use weak-symbols for pthreads" >&5
11972 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11973
11974 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11975 if test "${enable_weak_symbols+set}" = set; then
11976   enableval="$enable_weak_symbols"
11977   use_weak_symbols=$enableval
11978 else
11979   use_weak_symbols=no
11980 fi;
11981         echo "$as_me:11981: result: $use_weak_symbols" >&5
11982 echo "${ECHO_T}$use_weak_symbols" >&6
11983         if test "x$use_weak_symbols" = xyes ; then
11984
11985 echo "$as_me:11985: checking if $CC supports weak symbols" >&5
11986 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11987 if test "${cf_cv_weak_symbols+set}" = set; then
11988   echo $ECHO_N "(cached) $ECHO_C" >&6
11989 else
11990
11991 cat >conftest.$ac_ext <<_ACEOF
11992 #line 11992 "configure"
11993 #include "confdefs.h"
11994
11995 #include <stdio.h>
11996 int
11997 main ()
11998 {
11999
12000 #if defined(__GNUC__)
12001 #  if defined __USE_ISOC99
12002 #    define _cat_pragma(exp)    _Pragma(#exp)
12003 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12004 #  else
12005 #    define _weak_pragma(exp)
12006 #  endif
12007 #  define _declare(name)        __extension__ extern __typeof__(name) name
12008 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12009 #endif
12010
12011 weak_symbol(fopen);
12012
12013   ;
12014   return 0;
12015 }
12016 _ACEOF
12017 rm -f conftest.$ac_objext
12018 if { (eval echo "$as_me:12018: \"$ac_compile\"") >&5
12019   (eval $ac_compile) 2>&5
12020   ac_status=$?
12021   echo "$as_me:12021: \$? = $ac_status" >&5
12022   (exit $ac_status); } &&
12023          { ac_try='test -s conftest.$ac_objext'
12024   { (eval echo "$as_me:12024: \"$ac_try\"") >&5
12025   (eval $ac_try) 2>&5
12026   ac_status=$?
12027   echo "$as_me:12027: \$? = $ac_status" >&5
12028   (exit $ac_status); }; }; then
12029   cf_cv_weak_symbols=yes
12030 else
12031   echo "$as_me: failed program was:" >&5
12032 cat conftest.$ac_ext >&5
12033 cf_cv_weak_symbols=no
12034 fi
12035 rm -f conftest.$ac_objext conftest.$ac_ext
12036
12037 fi
12038 echo "$as_me:12038: result: $cf_cv_weak_symbols" >&5
12039 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12040
12041         else
12042                 cf_cv_weak_symbols=no
12043         fi
12044
12045         if test "x$cf_cv_weak_symbols" = xyes ; then
12046
12047 cat >>confdefs.h <<\EOF
12048 #define USE_WEAK_SYMBOLS 1
12049 EOF
12050
12051         fi
12052 fi
12053
12054 PTHREAD=
12055 if test "x$with_pthread" = "xyes" ; then
12056
12057 cat >>confdefs.h <<\EOF
12058 #define USE_PTHREADS 1
12059 EOF
12060
12061     enable_reentrant=yes
12062     if test "x$cf_cv_weak_symbols" = xyes ; then
12063         PTHREAD=-lpthread
12064     fi
12065 fi
12066
12067 # Reentrant code has to be opaque; there's little advantage to making ncurses
12068 # opaque outside of that, so there is no --enable-opaque option.  We can use
12069 # this option without --with-pthreads, but this will be always set for
12070 # pthreads.
12071 echo "$as_me:12071: checking if you want experimental reentrant code" >&5
12072 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12073
12074 # Check whether --enable-reentrant or --disable-reentrant was given.
12075 if test "${enable_reentrant+set}" = set; then
12076   enableval="$enable_reentrant"
12077   with_reentrant=$enableval
12078 else
12079   with_reentrant=no
12080 fi;
12081 echo "$as_me:12081: result: $with_reentrant" >&5
12082 echo "${ECHO_T}$with_reentrant" >&6
12083 if test "x$with_reentrant" = xyes ; then
12084         cf_cv_enable_reentrant=1
12085         cf_cv_enable_opaque="NCURSES_INTERNALS"
12086         NCURSES_OPAQUE=1
12087         NCURSES_SIZE_T=int
12088         if test "x$cf_cv_weak_symbols" = xyes ; then
12089
12090 # remove pthread library from $LIBS
12091 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12092
12093                 TEST_LIBS="-lpthread $TEST_LIBS"
12094                 TEST_LIBS2="-lpthread $TEST_LIBS2"
12095         else
12096                 # when not using weak symbols but with_reentrant,
12097                 # add 't' to the library suffix on all platforms
12098                 # except cygwin, where we only do that if ALSO
12099                 # compiling with full thread support.
12100                 case "$host" in
12101                 *cygwin* | *msys*) #(vi
12102                         if test "$with_pthread" = "yes" ; then
12103                                 if test "x$disable_lib_suffixes" = "xno" ; then
12104                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12105                                 fi
12106                         fi ;;
12107                 *)
12108                         if test "x$disable_lib_suffixes" = "xno" ; then
12109                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12110                         fi
12111                         ;;
12112                 esac
12113         fi
12114
12115 cat >>confdefs.h <<\EOF
12116 #define USE_REENTRANT 1
12117 EOF
12118
12119 if test "${with_abi_version+set}" != set; then
12120         case $cf_cv_rel_version in
12121         5.*)
12122                 cf_cv_rel_version=6.0
12123                 cf_cv_abi_version=6
12124                 { echo "$as_me:12124: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12125 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12126                 ;;
12127         esac
12128 fi
12129
12130 else
12131         cf_cv_enable_reentrant=0
12132         cf_cv_enable_opaque="NCURSES_OPAQUE"
12133         NCURSES_OPAQUE=0
12134         NCURSES_SIZE_T=short
12135 fi
12136
12137 ### Allow using a different wrap-prefix
12138 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12139         echo "$as_me:12139: checking for prefix used to wrap public variables" >&5
12140 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12141
12142 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12143 if test "${with_wrap_prefix+set}" = set; then
12144   withval="$with_wrap_prefix"
12145   NCURSES_WRAP_PREFIX=$withval
12146 else
12147   NCURSES_WRAP_PREFIX=_nc_
12148 fi;
12149         echo "$as_me:12149: result: $NCURSES_WRAP_PREFIX" >&5
12150 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12151 else
12152         NCURSES_WRAP_PREFIX=_nc_
12153 fi
12154
12155 cat >>confdefs.h <<EOF
12156 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12157 EOF
12158
12159 echo "$as_me:12159: checking if you want experimental safe-sprintf code" >&5
12160 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12161
12162 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12163 if test "${enable_safe_sprintf+set}" = set; then
12164   enableval="$enable_safe_sprintf"
12165   with_safe_sprintf=$enableval
12166 else
12167   with_safe_sprintf=no
12168 fi;
12169 echo "$as_me:12169: result: $with_safe_sprintf" >&5
12170 echo "${ECHO_T}$with_safe_sprintf" >&6
12171 test "x$with_safe_sprintf" = xyes &&
12172 cat >>confdefs.h <<\EOF
12173 #define USE_SAFE_SPRINTF 1
12174 EOF
12175
12176 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12177 # when hashmap is used scroll hints are useless
12178 if test "$with_hashmap" = no ; then
12179 echo "$as_me:12179: checking if you want to experiment without scrolling-hints code" >&5
12180 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12181
12182 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12183 if test "${enable_scroll_hints+set}" = set; then
12184   enableval="$enable_scroll_hints"
12185   with_scroll_hints=$enableval
12186 else
12187   with_scroll_hints=yes
12188 fi;
12189 echo "$as_me:12189: result: $with_scroll_hints" >&5
12190 echo "${ECHO_T}$with_scroll_hints" >&6
12191 test "x$with_scroll_hints" = xyes &&
12192 cat >>confdefs.h <<\EOF
12193 #define USE_SCROLL_HINTS 1
12194 EOF
12195
12196 fi
12197
12198 echo "$as_me:12198: checking if you want experimental wgetch-events code" >&5
12199 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12200
12201 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12202 if test "${enable_wgetch_events+set}" = set; then
12203   enableval="$enable_wgetch_events"
12204   with_wgetch_events=$enableval
12205 else
12206   with_wgetch_events=no
12207 fi;
12208 echo "$as_me:12208: result: $with_wgetch_events" >&5
12209 echo "${ECHO_T}$with_wgetch_events" >&6
12210 test "x$with_wgetch_events" = xyes &&
12211 cat >>confdefs.h <<\EOF
12212 #define NCURSES_WGETCH_EVENTS 1
12213 EOF
12214
12215 ###############################################################################
12216
12217 ###     use option --disable-echo to suppress full display compiling commands
12218
12219 echo "$as_me:12219: checking if you want to see long compiling messages" >&5
12220 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12221
12222 # Check whether --enable-echo or --disable-echo was given.
12223 if test "${enable_echo+set}" = set; then
12224   enableval="$enable_echo"
12225   test "$enableval" != no && enableval=yes
12226   if test "$enableval" != "yes" ; then
12227
12228     ECHO_LT='--silent'
12229     ECHO_LD='@echo linking $@;'
12230     RULE_CC='@echo compiling $<'
12231     SHOW_CC='@echo compiling $@'
12232     ECHO_CC='@'
12233
12234   else
12235
12236     ECHO_LT=''
12237     ECHO_LD=''
12238     RULE_CC=''
12239     SHOW_CC=''
12240     ECHO_CC=''
12241
12242   fi
12243 else
12244   enableval=yes
12245
12246     ECHO_LT=''
12247     ECHO_LD=''
12248     RULE_CC=''
12249     SHOW_CC=''
12250     ECHO_CC=''
12251
12252 fi;
12253 echo "$as_me:12253: result: $enableval" >&5
12254 echo "${ECHO_T}$enableval" >&6
12255
12256 if test "x$enable_echo" = xyes; then
12257         ECHO_LINK=
12258 else
12259         ECHO_LINK='@ echo linking $@ ... ;'
12260         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12261         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12262 fi
12263
12264 ###     use option --enable-warnings to turn on all gcc warnings
12265 echo "$as_me:12265: checking if you want to see compiler warnings" >&5
12266 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12267
12268 # Check whether --enable-warnings or --disable-warnings was given.
12269 if test "${enable_warnings+set}" = set; then
12270   enableval="$enable_warnings"
12271   with_warnings=$enableval
12272 fi;
12273 echo "$as_me:12273: result: $with_warnings" >&5
12274 echo "${ECHO_T}$with_warnings" >&6
12275
12276 if test "x$with_warnings" = "xyes"; then
12277
12278         ADAFLAGS="$ADAFLAGS -gnatg"
12279
12280 INTEL_COMPILER=no
12281
12282 if test "$GCC" = yes ; then
12283         case $host_os in
12284         linux*|gnu*)
12285                 echo "$as_me:12285: checking if this is really Intel C compiler" >&5
12286 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12287                 cf_save_CFLAGS="$CFLAGS"
12288                 CFLAGS="$CFLAGS -no-gcc"
12289                 cat >conftest.$ac_ext <<_ACEOF
12290 #line 12290 "configure"
12291 #include "confdefs.h"
12292
12293 int
12294 main ()
12295 {
12296
12297 #ifdef __INTEL_COMPILER
12298 #else
12299 make an error
12300 #endif
12301
12302   ;
12303   return 0;
12304 }
12305 _ACEOF
12306 rm -f conftest.$ac_objext
12307 if { (eval echo "$as_me:12307: \"$ac_compile\"") >&5
12308   (eval $ac_compile) 2>&5
12309   ac_status=$?
12310   echo "$as_me:12310: \$? = $ac_status" >&5
12311   (exit $ac_status); } &&
12312          { ac_try='test -s conftest.$ac_objext'
12313   { (eval echo "$as_me:12313: \"$ac_try\"") >&5
12314   (eval $ac_try) 2>&5
12315   ac_status=$?
12316   echo "$as_me:12316: \$? = $ac_status" >&5
12317   (exit $ac_status); }; }; then
12318   INTEL_COMPILER=yes
12319 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12320
12321 else
12322   echo "$as_me: failed program was:" >&5
12323 cat conftest.$ac_ext >&5
12324 fi
12325 rm -f conftest.$ac_objext conftest.$ac_ext
12326                 CFLAGS="$cf_save_CFLAGS"
12327                 echo "$as_me:12327: result: $INTEL_COMPILER" >&5
12328 echo "${ECHO_T}$INTEL_COMPILER" >&6
12329                 ;;
12330         esac
12331 fi
12332
12333 CLANG_COMPILER=no
12334
12335 if test "$GCC" = yes ; then
12336         echo "$as_me:12336: checking if this is really Clang C compiler" >&5
12337 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12338         cf_save_CFLAGS="$CFLAGS"
12339         CFLAGS="$CFLAGS -Qunused-arguments"
12340         cat >conftest.$ac_ext <<_ACEOF
12341 #line 12341 "configure"
12342 #include "confdefs.h"
12343
12344 int
12345 main ()
12346 {
12347
12348 #ifdef __clang__
12349 #else
12350 make an error
12351 #endif
12352
12353   ;
12354   return 0;
12355 }
12356 _ACEOF
12357 rm -f conftest.$ac_objext
12358 if { (eval echo "$as_me:12358: \"$ac_compile\"") >&5
12359   (eval $ac_compile) 2>&5
12360   ac_status=$?
12361   echo "$as_me:12361: \$? = $ac_status" >&5
12362   (exit $ac_status); } &&
12363          { ac_try='test -s conftest.$ac_objext'
12364   { (eval echo "$as_me:12364: \"$ac_try\"") >&5
12365   (eval $ac_try) 2>&5
12366   ac_status=$?
12367   echo "$as_me:12367: \$? = $ac_status" >&5
12368   (exit $ac_status); }; }; then
12369   CLANG_COMPILER=yes
12370 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12371
12372 else
12373   echo "$as_me: failed program was:" >&5
12374 cat conftest.$ac_ext >&5
12375 fi
12376 rm -f conftest.$ac_objext conftest.$ac_ext
12377         CFLAGS="$cf_save_CFLAGS"
12378         echo "$as_me:12378: result: $CLANG_COMPILER" >&5
12379 echo "${ECHO_T}$CLANG_COMPILER" >&6
12380 fi
12381
12382 cat > conftest.$ac_ext <<EOF
12383 #line 12383 "${as_me:-configure}"
12384 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12385 EOF
12386
12387 if test "$INTEL_COMPILER" = yes
12388 then
12389 # The "-wdXXX" options suppress warnings:
12390 # remark #1419: external declaration in primary source file
12391 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12392 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12393 # remark #193: zero used for undefined preprocessing identifier
12394 # remark #593: variable "curs_sb_left_arrow" was set but never used
12395 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12396 # remark #869: parameter "tw" was never referenced
12397 # remark #981: operands are evaluated in unspecified order
12398 # warning #279: controlling expression is constant
12399
12400         { echo "$as_me:12400: checking for $CC warning options..." >&5
12401 echo "$as_me: checking for $CC warning options..." >&6;}
12402         cf_save_CFLAGS="$CFLAGS"
12403         EXTRA_CFLAGS="-Wall"
12404         for cf_opt in \
12405                 wd1419 \
12406                 wd1683 \
12407                 wd1684 \
12408                 wd193 \
12409                 wd593 \
12410                 wd279 \
12411                 wd810 \
12412                 wd869 \
12413                 wd981
12414         do
12415                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12416                 if { (eval echo "$as_me:12416: \"$ac_compile\"") >&5
12417   (eval $ac_compile) 2>&5
12418   ac_status=$?
12419   echo "$as_me:12419: \$? = $ac_status" >&5
12420   (exit $ac_status); }; then
12421                         test -n "$verbose" && echo "$as_me:12421: result: ... -$cf_opt" >&5
12422 echo "${ECHO_T}... -$cf_opt" >&6
12423                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12424                 fi
12425         done
12426         CFLAGS="$cf_save_CFLAGS"
12427
12428 elif test "$GCC" = yes
12429 then
12430         { echo "$as_me:12430: checking for $CC warning options..." >&5
12431 echo "$as_me: checking for $CC warning options..." >&6;}
12432         cf_save_CFLAGS="$CFLAGS"
12433         EXTRA_CFLAGS=
12434         cf_warn_CONST=""
12435         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12436         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12437         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12438         for cf_opt in W Wall \
12439                 Wbad-function-cast \
12440                 Wcast-align \
12441                 Wcast-qual \
12442                 Wdeclaration-after-statement \
12443                 Wextra \
12444                 Winline \
12445                 Wmissing-declarations \
12446                 Wmissing-prototypes \
12447                 Wnested-externs \
12448                 Wpointer-arith \
12449                 Wshadow \
12450                 Wstrict-prototypes \
12451                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
12452         do
12453                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12454                 if { (eval echo "$as_me:12454: \"$ac_compile\"") >&5
12455   (eval $ac_compile) 2>&5
12456   ac_status=$?
12457   echo "$as_me:12457: \$? = $ac_status" >&5
12458   (exit $ac_status); }; then
12459                         test -n "$verbose" && echo "$as_me:12459: result: ... -$cf_opt" >&5
12460 echo "${ECHO_T}... -$cf_opt" >&6
12461                         case $cf_opt in #(vi
12462                         Wcast-qual) #(vi
12463                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12464                                 ;;
12465                         Winline) #(vi
12466                                 case $GCC_VERSION in
12467                                 [34].*)
12468                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12469
12470 echo "${as_me:-configure}:12470: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12471
12472                                         continue;;
12473                                 esac
12474                                 ;;
12475                         Wpointer-arith) #(vi
12476                                 case $GCC_VERSION in
12477                                 [12].*)
12478                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12479
12480 echo "${as_me:-configure}:12480: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12481
12482                                         continue;;
12483                                 esac
12484                                 ;;
12485                         esac
12486                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12487                 fi
12488         done
12489         CFLAGS="$cf_save_CFLAGS"
12490 fi
12491 rm -rf conftest*
12492
12493         if test "x$cf_with_cxx" = xyes ; then
12494
12495 INTEL_CPLUSPLUS=no
12496
12497 if test "$GCC" = yes ; then
12498         case $host_os in
12499         linux*|gnu*)
12500                 echo "$as_me:12500: checking if this is really Intel C++ compiler" >&5
12501 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12502                 cf_save_CFLAGS="$CXXFLAGS"
12503                 CXXFLAGS="$CXXFLAGS -no-gcc"
12504                 cat >conftest.$ac_ext <<_ACEOF
12505 #line 12505 "configure"
12506 #include "confdefs.h"
12507
12508 int
12509 main ()
12510 {
12511
12512 #ifdef __INTEL_COMPILER
12513 #else
12514 make an error
12515 #endif
12516
12517   ;
12518   return 0;
12519 }
12520 _ACEOF
12521 rm -f conftest.$ac_objext
12522 if { (eval echo "$as_me:12522: \"$ac_compile\"") >&5
12523   (eval $ac_compile) 2>&5
12524   ac_status=$?
12525   echo "$as_me:12525: \$? = $ac_status" >&5
12526   (exit $ac_status); } &&
12527          { ac_try='test -s conftest.$ac_objext'
12528   { (eval echo "$as_me:12528: \"$ac_try\"") >&5
12529   (eval $ac_try) 2>&5
12530   ac_status=$?
12531   echo "$as_me:12531: \$? = $ac_status" >&5
12532   (exit $ac_status); }; }; then
12533   INTEL_CPLUSPLUS=yes
12534 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12535
12536 else
12537   echo "$as_me: failed program was:" >&5
12538 cat conftest.$ac_ext >&5
12539 fi
12540 rm -f conftest.$ac_objext conftest.$ac_ext
12541                 CXXFLAGS="$cf_save_CFLAGS"
12542                 echo "$as_me:12542: result: $INTEL_CPLUSPLUS" >&5
12543 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12544                 ;;
12545         esac
12546 fi
12547
12548 CLANG_CPLUSPLUS=no
12549
12550 if test "$GCC" = yes ; then
12551         echo "$as_me:12551: checking if this is really Clang C++ compiler" >&5
12552 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12553         cf_save_CFLAGS="$CXXFLAGS"
12554         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12555         cat >conftest.$ac_ext <<_ACEOF
12556 #line 12556 "configure"
12557 #include "confdefs.h"
12558
12559 int
12560 main ()
12561 {
12562
12563 #ifdef __clang__
12564 #else
12565 make an error
12566 #endif
12567
12568   ;
12569   return 0;
12570 }
12571 _ACEOF
12572 rm -f conftest.$ac_objext
12573 if { (eval echo "$as_me:12573: \"$ac_compile\"") >&5
12574   (eval $ac_compile) 2>&5
12575   ac_status=$?
12576   echo "$as_me:12576: \$? = $ac_status" >&5
12577   (exit $ac_status); } &&
12578          { ac_try='test -s conftest.$ac_objext'
12579   { (eval echo "$as_me:12579: \"$ac_try\"") >&5
12580   (eval $ac_try) 2>&5
12581   ac_status=$?
12582   echo "$as_me:12582: \$? = $ac_status" >&5
12583   (exit $ac_status); }; }; then
12584   CLANG_CPLUSPLUS=yes
12585 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12586
12587 else
12588   echo "$as_me: failed program was:" >&5
12589 cat conftest.$ac_ext >&5
12590 fi
12591 rm -f conftest.$ac_objext conftest.$ac_ext
12592         CXXFLAGS="$cf_save_CFLAGS"
12593         echo "$as_me:12593: result: $CLANG_CPLUSPLUS" >&5
12594 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12595 fi
12596
12597 ac_ext=cc
12598 ac_cpp='$CXXCPP $CPPFLAGS'
12599 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12600 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12601 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12602 ac_main_return=return
12603
12604 cat > conftest.$ac_ext <<EOF
12605 #line 12605 "configure"
12606 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12607 EOF
12608
12609 if test "$INTEL_CPLUSPLUS" = yes
12610 then
12611 # The "-wdXXX" options suppress warnings:
12612 # remark #1419: external declaration in primary source file
12613 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12614 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12615 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12616 # remark #193: zero used for undefined preprocessing identifier
12617 # remark #593: variable "curs_sb_left_arrow" was set but never used
12618 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12619 # remark #869: parameter "tw" was never referenced
12620 # remark #981: operands are evaluated in unspecified order
12621 # warning #269: invalid format string conversion
12622
12623         { echo "$as_me:12623: checking for $CC warning options..." >&5
12624 echo "$as_me: checking for $CC warning options..." >&6;}
12625         cf_save_CXXFLAGS="$CXXFLAGS"
12626         EXTRA_CXXFLAGS="-Wall"
12627         for cf_opt in \
12628                 wd1419 \
12629                 wd1682 \
12630                 wd1683 \
12631                 wd1684 \
12632                 wd193 \
12633                 wd279 \
12634                 wd593 \
12635                 wd810 \
12636                 wd869 \
12637                 wd981
12638         do
12639                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12640                 if { (eval echo "$as_me:12640: \"$ac_compile\"") >&5
12641   (eval $ac_compile) 2>&5
12642   ac_status=$?
12643   echo "$as_me:12643: \$? = $ac_status" >&5
12644   (exit $ac_status); }; then
12645                         test -n "$verbose" && echo "$as_me:12645: result: ... -$cf_opt" >&5
12646 echo "${ECHO_T}... -$cf_opt" >&6
12647                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12648                 fi
12649         done
12650         CXXFLAGS="$cf_save_CXXFLAGS"
12651
12652 elif test "$GXX" = yes
12653 then
12654         { echo "$as_me:12654: checking for $CXX warning options..." >&5
12655 echo "$as_me: checking for $CXX warning options..." >&6;}
12656         cf_save_CXXFLAGS="$CXXFLAGS"
12657         EXTRA_CXXFLAGS="-W -Wall"
12658         cf_gxx_extra_warnings=""
12659         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12660         case "$GCC_VERSION" in
12661         [1-2].*)
12662                 ;;
12663         *)
12664                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12665                 ;;
12666         esac
12667         for cf_opt in \
12668                 Wabi \
12669                 fabi-version=0 \
12670                 Wextra \
12671                 Wignored-qualifiers \
12672                 Wlogical-op \
12673                 Woverloaded-virtual \
12674                 Wsign-promo \
12675                 Wsynth \
12676                 Wold-style-cast \
12677                 Wcast-align \
12678                 Wcast-qual \
12679                 Wpointer-arith \
12680                 Wshadow \
12681                 Wundef $cf_gxx_extra_warnings Wno-unused
12682         do
12683                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12684                 if { (eval echo "$as_me:12684: \"$ac_compile\"") >&5
12685   (eval $ac_compile) 2>&5
12686   ac_status=$?
12687   echo "$as_me:12687: \$? = $ac_status" >&5
12688   (exit $ac_status); }; then
12689                         test -n "$verbose" && echo "$as_me:12689: result: ... -$cf_opt" >&5
12690 echo "${ECHO_T}... -$cf_opt" >&6
12691                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12692                 else
12693                         test -n "$verbose" && echo "$as_me:12693: result: ... no -$cf_opt" >&5
12694 echo "${ECHO_T}... no -$cf_opt" >&6
12695                 fi
12696         done
12697         CXXFLAGS="$cf_save_CXXFLAGS"
12698 fi
12699
12700 rm -rf conftest*
12701 ac_ext=c
12702 ac_cpp='$CPP $CPPFLAGS'
12703 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12704 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12705 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12706 ac_main_return=return
12707
12708         fi
12709 fi
12710
12711 if test "$GCC" = yes
12712 then
12713 cat > conftest.i <<EOF
12714 #ifndef GCC_PRINTF
12715 #define GCC_PRINTF 0
12716 #endif
12717 #ifndef GCC_SCANF
12718 #define GCC_SCANF 0
12719 #endif
12720 #ifndef GCC_NORETURN
12721 #define GCC_NORETURN /* nothing */
12722 #endif
12723 #ifndef GCC_UNUSED
12724 #define GCC_UNUSED /* nothing */
12725 #endif
12726 EOF
12727 if test "$GCC" = yes
12728 then
12729         { echo "$as_me:12729: checking for $CC __attribute__ directives..." >&5
12730 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12731 cat > conftest.$ac_ext <<EOF
12732 #line 12732 "${as_me:-configure}"
12733 #include "confdefs.h"
12734 #include "conftest.h"
12735 #include "conftest.i"
12736 #if     GCC_PRINTF
12737 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12738 #else
12739 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12740 #endif
12741 #if     GCC_SCANF
12742 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12743 #else
12744 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12745 #endif
12746 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12747 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12748 extern void foo(void) GCC_NORETURN;
12749 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12750 EOF
12751         cf_printf_attribute=no
12752         cf_scanf_attribute=no
12753         for cf_attribute in scanf printf unused noreturn
12754         do
12755
12756 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12757
12758                 cf_directive="__attribute__(($cf_attribute))"
12759                 echo "checking for $CC $cf_directive" 1>&5
12760
12761                 case $cf_attribute in #(vi
12762                 printf) #(vi
12763                         cf_printf_attribute=yes
12764                         cat >conftest.h <<EOF
12765 #define GCC_$cf_ATTRIBUTE 1
12766 EOF
12767                         ;;
12768                 scanf) #(vi
12769                         cf_scanf_attribute=yes
12770                         cat >conftest.h <<EOF
12771 #define GCC_$cf_ATTRIBUTE 1
12772 EOF
12773                         ;;
12774                 *) #(vi
12775                         cat >conftest.h <<EOF
12776 #define GCC_$cf_ATTRIBUTE $cf_directive
12777 EOF
12778                         ;;
12779                 esac
12780
12781                 if { (eval echo "$as_me:12781: \"$ac_compile\"") >&5
12782   (eval $ac_compile) 2>&5
12783   ac_status=$?
12784   echo "$as_me:12784: \$? = $ac_status" >&5
12785   (exit $ac_status); }; then
12786                         test -n "$verbose" && echo "$as_me:12786: result: ... $cf_attribute" >&5
12787 echo "${ECHO_T}... $cf_attribute" >&6
12788                         cat conftest.h >>confdefs.h
12789                         case $cf_attribute in #(vi
12790                         noreturn) #(vi
12791
12792 cat >>confdefs.h <<EOF
12793 #define GCC_NORETURN $cf_directive
12794 EOF
12795
12796                                 ;;
12797                         printf) #(vi
12798                                 cf_value='/* nothing */'
12799                                 if test "$cf_printf_attribute" != no ; then
12800                                         cf_value='__attribute__((format(printf,fmt,var)))'
12801
12802 cat >>confdefs.h <<\EOF
12803 #define GCC_PRINTF 1
12804 EOF
12805
12806                                 fi
12807
12808 cat >>confdefs.h <<EOF
12809 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12810 EOF
12811
12812                                 ;;
12813                         scanf) #(vi
12814                                 cf_value='/* nothing */'
12815                                 if test "$cf_scanf_attribute" != no ; then
12816                                         cf_value='__attribute__((format(scanf,fmt,var)))'
12817
12818 cat >>confdefs.h <<\EOF
12819 #define GCC_SCANF 1
12820 EOF
12821
12822                                 fi
12823
12824 cat >>confdefs.h <<EOF
12825 #define GCC_SCANFLIKE(fmt,var) $cf_value
12826 EOF
12827
12828                                 ;;
12829                         unused) #(vi
12830
12831 cat >>confdefs.h <<EOF
12832 #define GCC_UNUSED $cf_directive
12833 EOF
12834
12835                                 ;;
12836                         esac
12837                 fi
12838         done
12839 else
12840         fgrep define conftest.i >>confdefs.h
12841 fi
12842 rm -rf conftest*
12843 fi
12844
12845 echo "$as_me:12845: checking if you want to work around bogus compiler/loader warnings" >&5
12846 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12847
12848 # Check whether --enable-string-hacks or --disable-string-hacks was given.
12849 if test "${enable_string_hacks+set}" = set; then
12850   enableval="$enable_string_hacks"
12851   with_string_hacks=$enableval
12852 else
12853   with_string_hacks=no
12854 fi;
12855 echo "$as_me:12855: result: $with_string_hacks" >&5
12856 echo "${ECHO_T}$with_string_hacks" >&6
12857
12858 if test "x$with_string_hacks" = "xyes"; then
12859
12860 cat >>confdefs.h <<\EOF
12861 #define USE_STRING_HACKS 1
12862 EOF
12863
12864         { echo "$as_me:12864: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
12865 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
12866
12867 for ac_func in strlcat strlcpy snprintf
12868 do
12869 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12870 echo "$as_me:12870: checking for $ac_func" >&5
12871 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12872 if eval "test \"\${$as_ac_var+set}\" = set"; then
12873   echo $ECHO_N "(cached) $ECHO_C" >&6
12874 else
12875   cat >conftest.$ac_ext <<_ACEOF
12876 #line 12876 "configure"
12877 #include "confdefs.h"
12878 /* System header to define __stub macros and hopefully few prototypes,
12879     which can conflict with char $ac_func (); below.  */
12880 #include <assert.h>
12881 /* Override any gcc2 internal prototype to avoid an error.  */
12882 #ifdef __cplusplus
12883 extern "C"
12884 #endif
12885 /* We use char because int might match the return type of a gcc2
12886    builtin and then its argument prototype would still apply.  */
12887 char $ac_func ();
12888 char (*f) ();
12889
12890 int
12891 main ()
12892 {
12893 /* The GNU C library defines this for functions which it implements
12894     to always fail with ENOSYS.  Some functions are actually named
12895     something starting with __ and the normal name is an alias.  */
12896 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12897 choke me
12898 #else
12899 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12900 #endif
12901
12902   ;
12903   return 0;
12904 }
12905 _ACEOF
12906 rm -f conftest.$ac_objext conftest$ac_exeext
12907 if { (eval echo "$as_me:12907: \"$ac_link\"") >&5
12908   (eval $ac_link) 2>&5
12909   ac_status=$?
12910   echo "$as_me:12910: \$? = $ac_status" >&5
12911   (exit $ac_status); } &&
12912          { ac_try='test -s conftest$ac_exeext'
12913   { (eval echo "$as_me:12913: \"$ac_try\"") >&5
12914   (eval $ac_try) 2>&5
12915   ac_status=$?
12916   echo "$as_me:12916: \$? = $ac_status" >&5
12917   (exit $ac_status); }; }; then
12918   eval "$as_ac_var=yes"
12919 else
12920   echo "$as_me: failed program was:" >&5
12921 cat conftest.$ac_ext >&5
12922 eval "$as_ac_var=no"
12923 fi
12924 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12925 fi
12926 echo "$as_me:12926: result: `eval echo '${'$as_ac_var'}'`" >&5
12927 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12928 if test `eval echo '${'$as_ac_var'}'` = yes; then
12929   cat >>confdefs.h <<EOF
12930 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12931 EOF
12932
12933 fi
12934 done
12935
12936 fi
12937
12938 ###     use option --enable-assertions to turn on generation of assertion code
12939 echo "$as_me:12939: checking if you want to enable runtime assertions" >&5
12940 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12941
12942 # Check whether --enable-assertions or --disable-assertions was given.
12943 if test "${enable_assertions+set}" = set; then
12944   enableval="$enable_assertions"
12945   with_assertions=$enableval
12946 else
12947   with_assertions=no
12948 fi;
12949 echo "$as_me:12949: result: $with_assertions" >&5
12950 echo "${ECHO_T}$with_assertions" >&6
12951 if test -n "$GCC"
12952 then
12953         if test "$with_assertions" = no
12954         then
12955                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12956         else
12957
12958         ADAFLAGS="$ADAFLAGS -gnata"
12959
12960         fi
12961 fi
12962
12963 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12964
12965 echo "$as_me:12965: checking if you want to use dmalloc for testing" >&5
12966 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12967
12968 # Check whether --with-dmalloc or --without-dmalloc was given.
12969 if test "${with_dmalloc+set}" = set; then
12970   withval="$with_dmalloc"
12971
12972 cat >>confdefs.h <<EOF
12973 #define USE_DMALLOC 1
12974 EOF
12975
12976         : ${with_cflags:=-g}
12977         : ${with_no_leaks:=yes}
12978          with_dmalloc=yes
12979 else
12980   with_dmalloc=
12981 fi;
12982 echo "$as_me:12982: result: ${with_dmalloc:-no}" >&5
12983 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12984
12985 case .$with_cflags in #(vi
12986 .*-g*)
12987         case .$CFLAGS in #(vi
12988         .*-g*) #(vi
12989                 ;;
12990         *)
12991
12992 cf_fix_cppflags=no
12993 cf_new_cflags=
12994 cf_new_cppflags=
12995 cf_new_extra_cppflags=
12996
12997 for cf_add_cflags in -g
12998 do
12999 case $cf_fix_cppflags in
13000 no)
13001         case $cf_add_cflags in #(vi
13002         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13003                 case $cf_add_cflags in
13004                 -D*)
13005                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13006
13007                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13008                                 && test -z "${cf_tst_cflags}" \
13009                                 && cf_fix_cppflags=yes
13010
13011                         if test $cf_fix_cppflags = yes ; then
13012                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13013                                 continue
13014                         elif test "${cf_tst_cflags}" = "\"'" ; then
13015                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13016                                 continue
13017                         fi
13018                         ;;
13019                 esac
13020                 case "$CPPFLAGS" in
13021                 *$cf_add_cflags) #(vi
13022                         ;;
13023                 *) #(vi
13024                         case $cf_add_cflags in #(vi
13025                         -D*)
13026                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13027
13028 CPPFLAGS=`echo "$CPPFLAGS" | \
13029         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13030                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13031
13032                                 ;;
13033                         esac
13034                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13035                         ;;
13036                 esac
13037                 ;;
13038         *)
13039                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13040                 ;;
13041         esac
13042         ;;
13043 yes)
13044         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13045
13046         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13047
13048         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13049                 && test -z "${cf_tst_cflags}" \
13050                 && cf_fix_cppflags=no
13051         ;;
13052 esac
13053 done
13054
13055 if test -n "$cf_new_cflags" ; then
13056
13057         CFLAGS="$CFLAGS $cf_new_cflags"
13058 fi
13059
13060 if test -n "$cf_new_cppflags" ; then
13061
13062         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13063 fi
13064
13065 if test -n "$cf_new_extra_cppflags" ; then
13066
13067         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13068 fi
13069
13070                 ;;
13071         esac
13072         ;;
13073 esac
13074
13075 if test "$with_dmalloc" = yes ; then
13076         echo "$as_me:13076: checking for dmalloc.h" >&5
13077 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13078 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13079   echo $ECHO_N "(cached) $ECHO_C" >&6
13080 else
13081   cat >conftest.$ac_ext <<_ACEOF
13082 #line 13082 "configure"
13083 #include "confdefs.h"
13084 #include <dmalloc.h>
13085 _ACEOF
13086 if { (eval echo "$as_me:13086: \"$ac_cpp conftest.$ac_ext\"") >&5
13087   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13088   ac_status=$?
13089   egrep -v '^ *\+' conftest.er1 >conftest.err
13090   rm -f conftest.er1
13091   cat conftest.err >&5
13092   echo "$as_me:13092: \$? = $ac_status" >&5
13093   (exit $ac_status); } >/dev/null; then
13094   if test -s conftest.err; then
13095     ac_cpp_err=$ac_c_preproc_warn_flag
13096   else
13097     ac_cpp_err=
13098   fi
13099 else
13100   ac_cpp_err=yes
13101 fi
13102 if test -z "$ac_cpp_err"; then
13103   ac_cv_header_dmalloc_h=yes
13104 else
13105   echo "$as_me: failed program was:" >&5
13106   cat conftest.$ac_ext >&5
13107   ac_cv_header_dmalloc_h=no
13108 fi
13109 rm -f conftest.err conftest.$ac_ext
13110 fi
13111 echo "$as_me:13111: result: $ac_cv_header_dmalloc_h" >&5
13112 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13113 if test $ac_cv_header_dmalloc_h = yes; then
13114
13115 echo "$as_me:13115: checking for dmalloc_debug in -ldmalloc" >&5
13116 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13117 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13118   echo $ECHO_N "(cached) $ECHO_C" >&6
13119 else
13120   ac_check_lib_save_LIBS=$LIBS
13121 LIBS="-ldmalloc  $LIBS"
13122 cat >conftest.$ac_ext <<_ACEOF
13123 #line 13123 "configure"
13124 #include "confdefs.h"
13125
13126 /* Override any gcc2 internal prototype to avoid an error.  */
13127 #ifdef __cplusplus
13128 extern "C"
13129 #endif
13130 /* We use char because int might match the return type of a gcc2
13131    builtin and then its argument prototype would still apply.  */
13132 char dmalloc_debug ();
13133 int
13134 main ()
13135 {
13136 dmalloc_debug ();
13137   ;
13138   return 0;
13139 }
13140 _ACEOF
13141 rm -f conftest.$ac_objext conftest$ac_exeext
13142 if { (eval echo "$as_me:13142: \"$ac_link\"") >&5
13143   (eval $ac_link) 2>&5
13144   ac_status=$?
13145   echo "$as_me:13145: \$? = $ac_status" >&5
13146   (exit $ac_status); } &&
13147          { ac_try='test -s conftest$ac_exeext'
13148   { (eval echo "$as_me:13148: \"$ac_try\"") >&5
13149   (eval $ac_try) 2>&5
13150   ac_status=$?
13151   echo "$as_me:13151: \$? = $ac_status" >&5
13152   (exit $ac_status); }; }; then
13153   ac_cv_lib_dmalloc_dmalloc_debug=yes
13154 else
13155   echo "$as_me: failed program was:" >&5
13156 cat conftest.$ac_ext >&5
13157 ac_cv_lib_dmalloc_dmalloc_debug=no
13158 fi
13159 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13160 LIBS=$ac_check_lib_save_LIBS
13161 fi
13162 echo "$as_me:13162: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13163 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13164 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13165   cat >>confdefs.h <<EOF
13166 #define HAVE_LIBDMALLOC 1
13167 EOF
13168
13169   LIBS="-ldmalloc $LIBS"
13170
13171 fi
13172
13173 fi
13174
13175 fi
13176
13177 echo "$as_me:13177: checking if you want to use dbmalloc for testing" >&5
13178 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13179
13180 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13181 if test "${with_dbmalloc+set}" = set; then
13182   withval="$with_dbmalloc"
13183
13184 cat >>confdefs.h <<EOF
13185 #define USE_DBMALLOC 1
13186 EOF
13187
13188         : ${with_cflags:=-g}
13189         : ${with_no_leaks:=yes}
13190          with_dbmalloc=yes
13191 else
13192   with_dbmalloc=
13193 fi;
13194 echo "$as_me:13194: result: ${with_dbmalloc:-no}" >&5
13195 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13196
13197 case .$with_cflags in #(vi
13198 .*-g*)
13199         case .$CFLAGS in #(vi
13200         .*-g*) #(vi
13201                 ;;
13202         *)
13203
13204 cf_fix_cppflags=no
13205 cf_new_cflags=
13206 cf_new_cppflags=
13207 cf_new_extra_cppflags=
13208
13209 for cf_add_cflags in -g
13210 do
13211 case $cf_fix_cppflags in
13212 no)
13213         case $cf_add_cflags in #(vi
13214         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13215                 case $cf_add_cflags in
13216                 -D*)
13217                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13218
13219                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13220                                 && test -z "${cf_tst_cflags}" \
13221                                 && cf_fix_cppflags=yes
13222
13223                         if test $cf_fix_cppflags = yes ; then
13224                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13225                                 continue
13226                         elif test "${cf_tst_cflags}" = "\"'" ; then
13227                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13228                                 continue
13229                         fi
13230                         ;;
13231                 esac
13232                 case "$CPPFLAGS" in
13233                 *$cf_add_cflags) #(vi
13234                         ;;
13235                 *) #(vi
13236                         case $cf_add_cflags in #(vi
13237                         -D*)
13238                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13239
13240 CPPFLAGS=`echo "$CPPFLAGS" | \
13241         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13242                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13243
13244                                 ;;
13245                         esac
13246                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13247                         ;;
13248                 esac
13249                 ;;
13250         *)
13251                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13252                 ;;
13253         esac
13254         ;;
13255 yes)
13256         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13257
13258         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13259
13260         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13261                 && test -z "${cf_tst_cflags}" \
13262                 && cf_fix_cppflags=no
13263         ;;
13264 esac
13265 done
13266
13267 if test -n "$cf_new_cflags" ; then
13268
13269         CFLAGS="$CFLAGS $cf_new_cflags"
13270 fi
13271
13272 if test -n "$cf_new_cppflags" ; then
13273
13274         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13275 fi
13276
13277 if test -n "$cf_new_extra_cppflags" ; then
13278
13279         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13280 fi
13281
13282                 ;;
13283         esac
13284         ;;
13285 esac
13286
13287 if test "$with_dbmalloc" = yes ; then
13288         echo "$as_me:13288: checking for dbmalloc.h" >&5
13289 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13290 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13291   echo $ECHO_N "(cached) $ECHO_C" >&6
13292 else
13293   cat >conftest.$ac_ext <<_ACEOF
13294 #line 13294 "configure"
13295 #include "confdefs.h"
13296 #include <dbmalloc.h>
13297 _ACEOF
13298 if { (eval echo "$as_me:13298: \"$ac_cpp conftest.$ac_ext\"") >&5
13299   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13300   ac_status=$?
13301   egrep -v '^ *\+' conftest.er1 >conftest.err
13302   rm -f conftest.er1
13303   cat conftest.err >&5
13304   echo "$as_me:13304: \$? = $ac_status" >&5
13305   (exit $ac_status); } >/dev/null; then
13306   if test -s conftest.err; then
13307     ac_cpp_err=$ac_c_preproc_warn_flag
13308   else
13309     ac_cpp_err=
13310   fi
13311 else
13312   ac_cpp_err=yes
13313 fi
13314 if test -z "$ac_cpp_err"; then
13315   ac_cv_header_dbmalloc_h=yes
13316 else
13317   echo "$as_me: failed program was:" >&5
13318   cat conftest.$ac_ext >&5
13319   ac_cv_header_dbmalloc_h=no
13320 fi
13321 rm -f conftest.err conftest.$ac_ext
13322 fi
13323 echo "$as_me:13323: result: $ac_cv_header_dbmalloc_h" >&5
13324 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13325 if test $ac_cv_header_dbmalloc_h = yes; then
13326
13327 echo "$as_me:13327: checking for debug_malloc in -ldbmalloc" >&5
13328 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13329 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13330   echo $ECHO_N "(cached) $ECHO_C" >&6
13331 else
13332   ac_check_lib_save_LIBS=$LIBS
13333 LIBS="-ldbmalloc  $LIBS"
13334 cat >conftest.$ac_ext <<_ACEOF
13335 #line 13335 "configure"
13336 #include "confdefs.h"
13337
13338 /* Override any gcc2 internal prototype to avoid an error.  */
13339 #ifdef __cplusplus
13340 extern "C"
13341 #endif
13342 /* We use char because int might match the return type of a gcc2
13343    builtin and then its argument prototype would still apply.  */
13344 char debug_malloc ();
13345 int
13346 main ()
13347 {
13348 debug_malloc ();
13349   ;
13350   return 0;
13351 }
13352 _ACEOF
13353 rm -f conftest.$ac_objext conftest$ac_exeext
13354 if { (eval echo "$as_me:13354: \"$ac_link\"") >&5
13355   (eval $ac_link) 2>&5
13356   ac_status=$?
13357   echo "$as_me:13357: \$? = $ac_status" >&5
13358   (exit $ac_status); } &&
13359          { ac_try='test -s conftest$ac_exeext'
13360   { (eval echo "$as_me:13360: \"$ac_try\"") >&5
13361   (eval $ac_try) 2>&5
13362   ac_status=$?
13363   echo "$as_me:13363: \$? = $ac_status" >&5
13364   (exit $ac_status); }; }; then
13365   ac_cv_lib_dbmalloc_debug_malloc=yes
13366 else
13367   echo "$as_me: failed program was:" >&5
13368 cat conftest.$ac_ext >&5
13369 ac_cv_lib_dbmalloc_debug_malloc=no
13370 fi
13371 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13372 LIBS=$ac_check_lib_save_LIBS
13373 fi
13374 echo "$as_me:13374: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13375 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13376 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13377   cat >>confdefs.h <<EOF
13378 #define HAVE_LIBDBMALLOC 1
13379 EOF
13380
13381   LIBS="-ldbmalloc $LIBS"
13382
13383 fi
13384
13385 fi
13386
13387 fi
13388
13389 echo "$as_me:13389: checking if you want to use valgrind for testing" >&5
13390 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13391
13392 # Check whether --with-valgrind or --without-valgrind was given.
13393 if test "${with_valgrind+set}" = set; then
13394   withval="$with_valgrind"
13395
13396 cat >>confdefs.h <<EOF
13397 #define USE_VALGRIND 1
13398 EOF
13399
13400         : ${with_cflags:=-g}
13401         : ${with_no_leaks:=yes}
13402          with_valgrind=yes
13403 else
13404   with_valgrind=
13405 fi;
13406 echo "$as_me:13406: result: ${with_valgrind:-no}" >&5
13407 echo "${ECHO_T}${with_valgrind:-no}" >&6
13408
13409 case .$with_cflags in #(vi
13410 .*-g*)
13411         case .$CFLAGS in #(vi
13412         .*-g*) #(vi
13413                 ;;
13414         *)
13415
13416 cf_fix_cppflags=no
13417 cf_new_cflags=
13418 cf_new_cppflags=
13419 cf_new_extra_cppflags=
13420
13421 for cf_add_cflags in -g
13422 do
13423 case $cf_fix_cppflags in
13424 no)
13425         case $cf_add_cflags in #(vi
13426         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13427                 case $cf_add_cflags in
13428                 -D*)
13429                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13430
13431                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13432                                 && test -z "${cf_tst_cflags}" \
13433                                 && cf_fix_cppflags=yes
13434
13435                         if test $cf_fix_cppflags = yes ; then
13436                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13437                                 continue
13438                         elif test "${cf_tst_cflags}" = "\"'" ; then
13439                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13440                                 continue
13441                         fi
13442                         ;;
13443                 esac
13444                 case "$CPPFLAGS" in
13445                 *$cf_add_cflags) #(vi
13446                         ;;
13447                 *) #(vi
13448                         case $cf_add_cflags in #(vi
13449                         -D*)
13450                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13451
13452 CPPFLAGS=`echo "$CPPFLAGS" | \
13453         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13454                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13455
13456                                 ;;
13457                         esac
13458                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13459                         ;;
13460                 esac
13461                 ;;
13462         *)
13463                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13464                 ;;
13465         esac
13466         ;;
13467 yes)
13468         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13469
13470         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13471
13472         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13473                 && test -z "${cf_tst_cflags}" \
13474                 && cf_fix_cppflags=no
13475         ;;
13476 esac
13477 done
13478
13479 if test -n "$cf_new_cflags" ; then
13480
13481         CFLAGS="$CFLAGS $cf_new_cflags"
13482 fi
13483
13484 if test -n "$cf_new_cppflags" ; then
13485
13486         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13487 fi
13488
13489 if test -n "$cf_new_extra_cppflags" ; then
13490
13491         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13492 fi
13493
13494                 ;;
13495         esac
13496         ;;
13497 esac
13498
13499 echo "$as_me:13499: checking if you want to perform memory-leak testing" >&5
13500 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13501
13502 # Check whether --enable-leaks or --disable-leaks was given.
13503 if test "${enable_leaks+set}" = set; then
13504   enableval="$enable_leaks"
13505   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13506 else
13507   : ${with_no_leaks:=no}
13508 fi;
13509 echo "$as_me:13509: result: $with_no_leaks" >&5
13510 echo "${ECHO_T}$with_no_leaks" >&6
13511
13512 if test "$with_no_leaks" = yes ; then
13513
13514 cat >>confdefs.h <<\EOF
13515 #define NO_LEAKS 1
13516 EOF
13517
13518 cat >>confdefs.h <<\EOF
13519 #define YY_NO_LEAKS 1
13520 EOF
13521
13522 fi
13523
13524 cat >>confdefs.h <<\EOF
13525 #define HAVE_NC_ALLOC_H 1
13526 EOF
13527
13528 ###     use option --enable-expanded to generate certain macros as functions
13529
13530 # Check whether --enable-expanded or --disable-expanded was given.
13531 if test "${enable_expanded+set}" = set; then
13532   enableval="$enable_expanded"
13533   test "x$enableval" = xyes &&
13534 cat >>confdefs.h <<\EOF
13535 #define NCURSES_EXPANDED 1
13536 EOF
13537
13538 fi;
13539
13540 ###     use option --disable-macros to suppress macros in favor of functions
13541
13542 # Check whether --enable-macros or --disable-macros was given.
13543 if test "${enable_macros+set}" = set; then
13544   enableval="$enable_macros"
13545   test "$enableval" = no &&
13546 cat >>confdefs.h <<\EOF
13547 #define NCURSES_NOMACROS 1
13548 EOF
13549
13550 fi;
13551
13552 # Normally we only add trace() to the debug-library.  Allow this to be
13553 # extended to all models of the ncurses library:
13554 cf_all_traces=no
13555 case "$CFLAGS $CPPFLAGS" in
13556 *-DTRACE*)
13557         cf_all_traces=yes
13558         ;;
13559 esac
13560
13561 echo "$as_me:13561: checking whether to add trace feature to all models" >&5
13562 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13563
13564 # Check whether --with-trace or --without-trace was given.
13565 if test "${with_trace+set}" = set; then
13566   withval="$with_trace"
13567   cf_with_trace=$withval
13568 else
13569   cf_with_trace=$cf_all_traces
13570 fi;
13571 echo "$as_me:13571: result: $cf_with_trace" >&5
13572 echo "${ECHO_T}$cf_with_trace" >&6
13573
13574 if test "x$cf_with_trace" = xyes ; then
13575         LIB_TRACING=all
13576         ADA_TRACE=TRUE
13577
13578 cf_fix_cppflags=no
13579 cf_new_cflags=
13580 cf_new_cppflags=
13581 cf_new_extra_cppflags=
13582
13583 for cf_add_cflags in -DTRACE
13584 do
13585 case $cf_fix_cppflags in
13586 no)
13587         case $cf_add_cflags in #(vi
13588         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13589                 case $cf_add_cflags in
13590                 -D*)
13591                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13592
13593                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13594                                 && test -z "${cf_tst_cflags}" \
13595                                 && cf_fix_cppflags=yes
13596
13597                         if test $cf_fix_cppflags = yes ; then
13598                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13599                                 continue
13600                         elif test "${cf_tst_cflags}" = "\"'" ; then
13601                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13602                                 continue
13603                         fi
13604                         ;;
13605                 esac
13606                 case "$CPPFLAGS" in
13607                 *$cf_add_cflags) #(vi
13608                         ;;
13609                 *) #(vi
13610                         case $cf_add_cflags in #(vi
13611                         -D*)
13612                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13613
13614 CPPFLAGS=`echo "$CPPFLAGS" | \
13615         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13616                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13617
13618                                 ;;
13619                         esac
13620                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13621                         ;;
13622                 esac
13623                 ;;
13624         *)
13625                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13626                 ;;
13627         esac
13628         ;;
13629 yes)
13630         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13631
13632         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13633
13634         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13635                 && test -z "${cf_tst_cflags}" \
13636                 && cf_fix_cppflags=no
13637         ;;
13638 esac
13639 done
13640
13641 if test -n "$cf_new_cflags" ; then
13642
13643         CFLAGS="$CFLAGS $cf_new_cflags"
13644 fi
13645
13646 if test -n "$cf_new_cppflags" ; then
13647
13648         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13649 fi
13650
13651 if test -n "$cf_new_extra_cppflags" ; then
13652
13653         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13654 fi
13655
13656 else
13657         LIB_TRACING=DEBUG
13658         ADA_TRACE=FALSE
13659 fi
13660
13661 echo "$as_me:13661: checking if we want to use GNAT projects" >&5
13662 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
13663
13664 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
13665 if test "${enable_gnat_projects+set}" = set; then
13666   enableval="$enable_gnat_projects"
13667   test "$enableval" != no && enableval=yes
13668   if test "$enableval" != "yes" ; then
13669     enable_gnat_projects=no
13670   else
13671     enable_gnat_projects=yes
13672   fi
13673 else
13674   enableval=yes
13675   enable_gnat_projects=yes
13676
13677 fi;
13678 echo "$as_me:13678: result: $enable_gnat_projects" >&5
13679 echo "${ECHO_T}$enable_gnat_projects" >&6
13680
13681 ###     Checks for libraries.
13682 case $cf_cv_system_name in #(vi
13683 *mingw32*) #(vi
13684         LIBS=" -lpsapi $LIBS"
13685         ;;
13686 *)
13687 echo "$as_me:13687: checking for gettimeofday" >&5
13688 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13689 if test "${ac_cv_func_gettimeofday+set}" = set; then
13690   echo $ECHO_N "(cached) $ECHO_C" >&6
13691 else
13692   cat >conftest.$ac_ext <<_ACEOF
13693 #line 13693 "configure"
13694 #include "confdefs.h"
13695 /* System header to define __stub macros and hopefully few prototypes,
13696     which can conflict with char gettimeofday (); below.  */
13697 #include <assert.h>
13698 /* Override any gcc2 internal prototype to avoid an error.  */
13699 #ifdef __cplusplus
13700 extern "C"
13701 #endif
13702 /* We use char because int might match the return type of a gcc2
13703    builtin and then its argument prototype would still apply.  */
13704 char gettimeofday ();
13705 char (*f) ();
13706
13707 int
13708 main ()
13709 {
13710 /* The GNU C library defines this for functions which it implements
13711     to always fail with ENOSYS.  Some functions are actually named
13712     something starting with __ and the normal name is an alias.  */
13713 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13714 choke me
13715 #else
13716 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13717 #endif
13718
13719   ;
13720   return 0;
13721 }
13722 _ACEOF
13723 rm -f conftest.$ac_objext conftest$ac_exeext
13724 if { (eval echo "$as_me:13724: \"$ac_link\"") >&5
13725   (eval $ac_link) 2>&5
13726   ac_status=$?
13727   echo "$as_me:13727: \$? = $ac_status" >&5
13728   (exit $ac_status); } &&
13729          { ac_try='test -s conftest$ac_exeext'
13730   { (eval echo "$as_me:13730: \"$ac_try\"") >&5
13731   (eval $ac_try) 2>&5
13732   ac_status=$?
13733   echo "$as_me:13733: \$? = $ac_status" >&5
13734   (exit $ac_status); }; }; then
13735   ac_cv_func_gettimeofday=yes
13736 else
13737   echo "$as_me: failed program was:" >&5
13738 cat conftest.$ac_ext >&5
13739 ac_cv_func_gettimeofday=no
13740 fi
13741 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13742 fi
13743 echo "$as_me:13743: result: $ac_cv_func_gettimeofday" >&5
13744 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13745 if test $ac_cv_func_gettimeofday = yes; then
13746
13747 cat >>confdefs.h <<\EOF
13748 #define HAVE_GETTIMEOFDAY 1
13749 EOF
13750
13751 else
13752
13753 echo "$as_me:13753: checking for gettimeofday in -lbsd" >&5
13754 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13755 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13756   echo $ECHO_N "(cached) $ECHO_C" >&6
13757 else
13758   ac_check_lib_save_LIBS=$LIBS
13759 LIBS="-lbsd  $LIBS"
13760 cat >conftest.$ac_ext <<_ACEOF
13761 #line 13761 "configure"
13762 #include "confdefs.h"
13763
13764 /* Override any gcc2 internal prototype to avoid an error.  */
13765 #ifdef __cplusplus
13766 extern "C"
13767 #endif
13768 /* We use char because int might match the return type of a gcc2
13769    builtin and then its argument prototype would still apply.  */
13770 char gettimeofday ();
13771 int
13772 main ()
13773 {
13774 gettimeofday ();
13775   ;
13776   return 0;
13777 }
13778 _ACEOF
13779 rm -f conftest.$ac_objext conftest$ac_exeext
13780 if { (eval echo "$as_me:13780: \"$ac_link\"") >&5
13781   (eval $ac_link) 2>&5
13782   ac_status=$?
13783   echo "$as_me:13783: \$? = $ac_status" >&5
13784   (exit $ac_status); } &&
13785          { ac_try='test -s conftest$ac_exeext'
13786   { (eval echo "$as_me:13786: \"$ac_try\"") >&5
13787   (eval $ac_try) 2>&5
13788   ac_status=$?
13789   echo "$as_me:13789: \$? = $ac_status" >&5
13790   (exit $ac_status); }; }; then
13791   ac_cv_lib_bsd_gettimeofday=yes
13792 else
13793   echo "$as_me: failed program was:" >&5
13794 cat conftest.$ac_ext >&5
13795 ac_cv_lib_bsd_gettimeofday=no
13796 fi
13797 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13798 LIBS=$ac_check_lib_save_LIBS
13799 fi
13800 echo "$as_me:13800: result: $ac_cv_lib_bsd_gettimeofday" >&5
13801 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13802 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13803
13804 cat >>confdefs.h <<\EOF
13805 #define HAVE_GETTIMEOFDAY 1
13806 EOF
13807
13808         LIBS="-lbsd $LIBS"
13809 fi
13810
13811 fi
13812         ;;
13813 esac
13814
13815 echo "$as_me:13815: checking if -lm needed for math functions" >&5
13816 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13817 if test "${cf_cv_need_libm+set}" = set; then
13818   echo $ECHO_N "(cached) $ECHO_C" >&6
13819 else
13820
13821         cat >conftest.$ac_ext <<_ACEOF
13822 #line 13822 "configure"
13823 #include "confdefs.h"
13824
13825         #include <stdio.h>
13826         #include <math.h>
13827
13828 int
13829 main ()
13830 {
13831 double x = rand(); printf("result = %g\n", pow(sin(x),x))
13832   ;
13833   return 0;
13834 }
13835 _ACEOF
13836 rm -f conftest.$ac_objext conftest$ac_exeext
13837 if { (eval echo "$as_me:13837: \"$ac_link\"") >&5
13838   (eval $ac_link) 2>&5
13839   ac_status=$?
13840   echo "$as_me:13840: \$? = $ac_status" >&5
13841   (exit $ac_status); } &&
13842          { ac_try='test -s conftest$ac_exeext'
13843   { (eval echo "$as_me:13843: \"$ac_try\"") >&5
13844   (eval $ac_try) 2>&5
13845   ac_status=$?
13846   echo "$as_me:13846: \$? = $ac_status" >&5
13847   (exit $ac_status); }; }; then
13848   cf_cv_need_libm=no
13849 else
13850   echo "$as_me: failed program was:" >&5
13851 cat conftest.$ac_ext >&5
13852 cf_cv_need_libm=yes
13853 fi
13854 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13855 fi
13856 echo "$as_me:13856: result: $cf_cv_need_libm" >&5
13857 echo "${ECHO_T}$cf_cv_need_libm" >&6
13858 if test "$cf_cv_need_libm" = yes
13859 then
13860 MATH_LIB=-lm
13861 fi
13862
13863 ###     Checks for header files.
13864 echo "$as_me:13864: checking for ANSI C header files" >&5
13865 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13866 if test "${ac_cv_header_stdc+set}" = set; then
13867   echo $ECHO_N "(cached) $ECHO_C" >&6
13868 else
13869   cat >conftest.$ac_ext <<_ACEOF
13870 #line 13870 "configure"
13871 #include "confdefs.h"
13872 #include <stdlib.h>
13873 #include <stdarg.h>
13874 #include <string.h>
13875 #include <float.h>
13876
13877 _ACEOF
13878 if { (eval echo "$as_me:13878: \"$ac_cpp conftest.$ac_ext\"") >&5
13879   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13880   ac_status=$?
13881   egrep -v '^ *\+' conftest.er1 >conftest.err
13882   rm -f conftest.er1
13883   cat conftest.err >&5
13884   echo "$as_me:13884: \$? = $ac_status" >&5
13885   (exit $ac_status); } >/dev/null; then
13886   if test -s conftest.err; then
13887     ac_cpp_err=$ac_c_preproc_warn_flag
13888   else
13889     ac_cpp_err=
13890   fi
13891 else
13892   ac_cpp_err=yes
13893 fi
13894 if test -z "$ac_cpp_err"; then
13895   ac_cv_header_stdc=yes
13896 else
13897   echo "$as_me: failed program was:" >&5
13898   cat conftest.$ac_ext >&5
13899   ac_cv_header_stdc=no
13900 fi
13901 rm -f conftest.err conftest.$ac_ext
13902
13903 if test $ac_cv_header_stdc = yes; then
13904   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13905   cat >conftest.$ac_ext <<_ACEOF
13906 #line 13906 "configure"
13907 #include "confdefs.h"
13908 #include <string.h>
13909
13910 _ACEOF
13911 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13912   egrep "memchr" >/dev/null 2>&1; then
13913   :
13914 else
13915   ac_cv_header_stdc=no
13916 fi
13917 rm -rf conftest*
13918
13919 fi
13920
13921 if test $ac_cv_header_stdc = yes; then
13922   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13923   cat >conftest.$ac_ext <<_ACEOF
13924 #line 13924 "configure"
13925 #include "confdefs.h"
13926 #include <stdlib.h>
13927
13928 _ACEOF
13929 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13930   egrep "free" >/dev/null 2>&1; then
13931   :
13932 else
13933   ac_cv_header_stdc=no
13934 fi
13935 rm -rf conftest*
13936
13937 fi
13938
13939 if test $ac_cv_header_stdc = yes; then
13940   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13941   if test "$cross_compiling" = yes; then
13942   :
13943 else
13944   cat >conftest.$ac_ext <<_ACEOF
13945 #line 13945 "configure"
13946 #include "confdefs.h"
13947 #include <ctype.h>
13948 #if ((' ' & 0x0FF) == 0x020)
13949 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13950 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13951 #else
13952 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13953                      || ('j' <= (c) && (c) <= 'r') \
13954                      || ('s' <= (c) && (c) <= 'z'))
13955 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13956 #endif
13957
13958 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13959 int
13960 main ()
13961 {
13962   int i;
13963   for (i = 0; i < 256; i++)
13964     if (XOR (islower (i), ISLOWER (i))
13965         || toupper (i) != TOUPPER (i))
13966       $ac_main_return(2);
13967   $ac_main_return (0);
13968 }
13969 _ACEOF
13970 rm -f conftest$ac_exeext
13971 if { (eval echo "$as_me:13971: \"$ac_link\"") >&5
13972   (eval $ac_link) 2>&5
13973   ac_status=$?
13974   echo "$as_me:13974: \$? = $ac_status" >&5
13975   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13976   { (eval echo "$as_me:13976: \"$ac_try\"") >&5
13977   (eval $ac_try) 2>&5
13978   ac_status=$?
13979   echo "$as_me:13979: \$? = $ac_status" >&5
13980   (exit $ac_status); }; }; then
13981   :
13982 else
13983   echo "$as_me: program exited with status $ac_status" >&5
13984 echo "$as_me: failed program was:" >&5
13985 cat conftest.$ac_ext >&5
13986 ac_cv_header_stdc=no
13987 fi
13988 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13989 fi
13990 fi
13991 fi
13992 echo "$as_me:13992: result: $ac_cv_header_stdc" >&5
13993 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13994 if test $ac_cv_header_stdc = yes; then
13995
13996 cat >>confdefs.h <<\EOF
13997 #define STDC_HEADERS 1
13998 EOF
13999
14000 fi
14001
14002 ac_header_dirent=no
14003 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14004   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14005 echo "$as_me:14005: checking for $ac_hdr that defines DIR" >&5
14006 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14007 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14008   echo $ECHO_N "(cached) $ECHO_C" >&6
14009 else
14010   cat >conftest.$ac_ext <<_ACEOF
14011 #line 14011 "configure"
14012 #include "confdefs.h"
14013 #include <sys/types.h>
14014 #include <$ac_hdr>
14015
14016 int
14017 main ()
14018 {
14019 if ((DIR *) 0)
14020 return 0;
14021   ;
14022   return 0;
14023 }
14024 _ACEOF
14025 rm -f conftest.$ac_objext
14026 if { (eval echo "$as_me:14026: \"$ac_compile\"") >&5
14027   (eval $ac_compile) 2>&5
14028   ac_status=$?
14029   echo "$as_me:14029: \$? = $ac_status" >&5
14030   (exit $ac_status); } &&
14031          { ac_try='test -s conftest.$ac_objext'
14032   { (eval echo "$as_me:14032: \"$ac_try\"") >&5
14033   (eval $ac_try) 2>&5
14034   ac_status=$?
14035   echo "$as_me:14035: \$? = $ac_status" >&5
14036   (exit $ac_status); }; }; then
14037   eval "$as_ac_Header=yes"
14038 else
14039   echo "$as_me: failed program was:" >&5
14040 cat conftest.$ac_ext >&5
14041 eval "$as_ac_Header=no"
14042 fi
14043 rm -f conftest.$ac_objext conftest.$ac_ext
14044 fi
14045 echo "$as_me:14045: result: `eval echo '${'$as_ac_Header'}'`" >&5
14046 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14047 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14048   cat >>confdefs.h <<EOF
14049 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14050 EOF
14051
14052 ac_header_dirent=$ac_hdr; break
14053 fi
14054
14055 done
14056 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14057 if test $ac_header_dirent = dirent.h; then
14058   echo "$as_me:14058: checking for opendir in -ldir" >&5
14059 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14060 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14061   echo $ECHO_N "(cached) $ECHO_C" >&6
14062 else
14063   ac_check_lib_save_LIBS=$LIBS
14064 LIBS="-ldir  $LIBS"
14065 cat >conftest.$ac_ext <<_ACEOF
14066 #line 14066 "configure"
14067 #include "confdefs.h"
14068
14069 /* Override any gcc2 internal prototype to avoid an error.  */
14070 #ifdef __cplusplus
14071 extern "C"
14072 #endif
14073 /* We use char because int might match the return type of a gcc2
14074    builtin and then its argument prototype would still apply.  */
14075 char opendir ();
14076 int
14077 main ()
14078 {
14079 opendir ();
14080   ;
14081   return 0;
14082 }
14083 _ACEOF
14084 rm -f conftest.$ac_objext conftest$ac_exeext
14085 if { (eval echo "$as_me:14085: \"$ac_link\"") >&5
14086   (eval $ac_link) 2>&5
14087   ac_status=$?
14088   echo "$as_me:14088: \$? = $ac_status" >&5
14089   (exit $ac_status); } &&
14090          { ac_try='test -s conftest$ac_exeext'
14091   { (eval echo "$as_me:14091: \"$ac_try\"") >&5
14092   (eval $ac_try) 2>&5
14093   ac_status=$?
14094   echo "$as_me:14094: \$? = $ac_status" >&5
14095   (exit $ac_status); }; }; then
14096   ac_cv_lib_dir_opendir=yes
14097 else
14098   echo "$as_me: failed program was:" >&5
14099 cat conftest.$ac_ext >&5
14100 ac_cv_lib_dir_opendir=no
14101 fi
14102 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14103 LIBS=$ac_check_lib_save_LIBS
14104 fi
14105 echo "$as_me:14105: result: $ac_cv_lib_dir_opendir" >&5
14106 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14107 if test $ac_cv_lib_dir_opendir = yes; then
14108   LIBS="$LIBS -ldir"
14109 fi
14110
14111 else
14112   echo "$as_me:14112: checking for opendir in -lx" >&5
14113 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14114 if test "${ac_cv_lib_x_opendir+set}" = set; then
14115   echo $ECHO_N "(cached) $ECHO_C" >&6
14116 else
14117   ac_check_lib_save_LIBS=$LIBS
14118 LIBS="-lx  $LIBS"
14119 cat >conftest.$ac_ext <<_ACEOF
14120 #line 14120 "configure"
14121 #include "confdefs.h"
14122
14123 /* Override any gcc2 internal prototype to avoid an error.  */
14124 #ifdef __cplusplus
14125 extern "C"
14126 #endif
14127 /* We use char because int might match the return type of a gcc2
14128    builtin and then its argument prototype would still apply.  */
14129 char opendir ();
14130 int
14131 main ()
14132 {
14133 opendir ();
14134   ;
14135   return 0;
14136 }
14137 _ACEOF
14138 rm -f conftest.$ac_objext conftest$ac_exeext
14139 if { (eval echo "$as_me:14139: \"$ac_link\"") >&5
14140   (eval $ac_link) 2>&5
14141   ac_status=$?
14142   echo "$as_me:14142: \$? = $ac_status" >&5
14143   (exit $ac_status); } &&
14144          { ac_try='test -s conftest$ac_exeext'
14145   { (eval echo "$as_me:14145: \"$ac_try\"") >&5
14146   (eval $ac_try) 2>&5
14147   ac_status=$?
14148   echo "$as_me:14148: \$? = $ac_status" >&5
14149   (exit $ac_status); }; }; then
14150   ac_cv_lib_x_opendir=yes
14151 else
14152   echo "$as_me: failed program was:" >&5
14153 cat conftest.$ac_ext >&5
14154 ac_cv_lib_x_opendir=no
14155 fi
14156 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14157 LIBS=$ac_check_lib_save_LIBS
14158 fi
14159 echo "$as_me:14159: result: $ac_cv_lib_x_opendir" >&5
14160 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14161 if test $ac_cv_lib_x_opendir = yes; then
14162   LIBS="$LIBS -lx"
14163 fi
14164
14165 fi
14166
14167 echo "$as_me:14167: checking whether time.h and sys/time.h may both be included" >&5
14168 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14169 if test "${ac_cv_header_time+set}" = set; then
14170   echo $ECHO_N "(cached) $ECHO_C" >&6
14171 else
14172   cat >conftest.$ac_ext <<_ACEOF
14173 #line 14173 "configure"
14174 #include "confdefs.h"
14175 #include <sys/types.h>
14176 #include <sys/time.h>
14177 #include <time.h>
14178
14179 int
14180 main ()
14181 {
14182 if ((struct tm *) 0)
14183 return 0;
14184   ;
14185   return 0;
14186 }
14187 _ACEOF
14188 rm -f conftest.$ac_objext
14189 if { (eval echo "$as_me:14189: \"$ac_compile\"") >&5
14190   (eval $ac_compile) 2>&5
14191   ac_status=$?
14192   echo "$as_me:14192: \$? = $ac_status" >&5
14193   (exit $ac_status); } &&
14194          { ac_try='test -s conftest.$ac_objext'
14195   { (eval echo "$as_me:14195: \"$ac_try\"") >&5
14196   (eval $ac_try) 2>&5
14197   ac_status=$?
14198   echo "$as_me:14198: \$? = $ac_status" >&5
14199   (exit $ac_status); }; }; then
14200   ac_cv_header_time=yes
14201 else
14202   echo "$as_me: failed program was:" >&5
14203 cat conftest.$ac_ext >&5
14204 ac_cv_header_time=no
14205 fi
14206 rm -f conftest.$ac_objext conftest.$ac_ext
14207 fi
14208 echo "$as_me:14208: result: $ac_cv_header_time" >&5
14209 echo "${ECHO_T}$ac_cv_header_time" >&6
14210 if test $ac_cv_header_time = yes; then
14211
14212 cat >>confdefs.h <<\EOF
14213 #define TIME_WITH_SYS_TIME 1
14214 EOF
14215
14216 fi
14217
14218 cf_regex_func=no
14219
14220 cf_regex_libs="regex re"
14221 case $host_os in #(vi
14222 mingw*)
14223         cf_regex_libs="gnurx $cf_regex_libs"
14224         ;;
14225 esac
14226
14227 echo "$as_me:14227: checking for regcomp" >&5
14228 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14229 if test "${ac_cv_func_regcomp+set}" = set; then
14230   echo $ECHO_N "(cached) $ECHO_C" >&6
14231 else
14232   cat >conftest.$ac_ext <<_ACEOF
14233 #line 14233 "configure"
14234 #include "confdefs.h"
14235 /* System header to define __stub macros and hopefully few prototypes,
14236     which can conflict with char regcomp (); below.  */
14237 #include <assert.h>
14238 /* Override any gcc2 internal prototype to avoid an error.  */
14239 #ifdef __cplusplus
14240 extern "C"
14241 #endif
14242 /* We use char because int might match the return type of a gcc2
14243    builtin and then its argument prototype would still apply.  */
14244 char regcomp ();
14245 char (*f) ();
14246
14247 int
14248 main ()
14249 {
14250 /* The GNU C library defines this for functions which it implements
14251     to always fail with ENOSYS.  Some functions are actually named
14252     something starting with __ and the normal name is an alias.  */
14253 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14254 choke me
14255 #else
14256 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14257 #endif
14258
14259   ;
14260   return 0;
14261 }
14262 _ACEOF
14263 rm -f conftest.$ac_objext conftest$ac_exeext
14264 if { (eval echo "$as_me:14264: \"$ac_link\"") >&5
14265   (eval $ac_link) 2>&5
14266   ac_status=$?
14267   echo "$as_me:14267: \$? = $ac_status" >&5
14268   (exit $ac_status); } &&
14269          { ac_try='test -s conftest$ac_exeext'
14270   { (eval echo "$as_me:14270: \"$ac_try\"") >&5
14271   (eval $ac_try) 2>&5
14272   ac_status=$?
14273   echo "$as_me:14273: \$? = $ac_status" >&5
14274   (exit $ac_status); }; }; then
14275   ac_cv_func_regcomp=yes
14276 else
14277   echo "$as_me: failed program was:" >&5
14278 cat conftest.$ac_ext >&5
14279 ac_cv_func_regcomp=no
14280 fi
14281 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14282 fi
14283 echo "$as_me:14283: result: $ac_cv_func_regcomp" >&5
14284 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14285 if test $ac_cv_func_regcomp = yes; then
14286   cf_regex_func=regcomp
14287 else
14288
14289         for cf_regex_lib in $cf_regex_libs
14290         do
14291                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14292 echo "$as_me:14292: checking for regcomp in -l$cf_regex_lib" >&5
14293 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14294 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14295   echo $ECHO_N "(cached) $ECHO_C" >&6
14296 else
14297   ac_check_lib_save_LIBS=$LIBS
14298 LIBS="-l$cf_regex_lib  $LIBS"
14299 cat >conftest.$ac_ext <<_ACEOF
14300 #line 14300 "configure"
14301 #include "confdefs.h"
14302
14303 /* Override any gcc2 internal prototype to avoid an error.  */
14304 #ifdef __cplusplus
14305 extern "C"
14306 #endif
14307 /* We use char because int might match the return type of a gcc2
14308    builtin and then its argument prototype would still apply.  */
14309 char regcomp ();
14310 int
14311 main ()
14312 {
14313 regcomp ();
14314   ;
14315   return 0;
14316 }
14317 _ACEOF
14318 rm -f conftest.$ac_objext conftest$ac_exeext
14319 if { (eval echo "$as_me:14319: \"$ac_link\"") >&5
14320   (eval $ac_link) 2>&5
14321   ac_status=$?
14322   echo "$as_me:14322: \$? = $ac_status" >&5
14323   (exit $ac_status); } &&
14324          { ac_try='test -s conftest$ac_exeext'
14325   { (eval echo "$as_me:14325: \"$ac_try\"") >&5
14326   (eval $ac_try) 2>&5
14327   ac_status=$?
14328   echo "$as_me:14328: \$? = $ac_status" >&5
14329   (exit $ac_status); }; }; then
14330   eval "$as_ac_Lib=yes"
14331 else
14332   echo "$as_me: failed program was:" >&5
14333 cat conftest.$ac_ext >&5
14334 eval "$as_ac_Lib=no"
14335 fi
14336 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14337 LIBS=$ac_check_lib_save_LIBS
14338 fi
14339 echo "$as_me:14339: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14340 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14341 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14342
14343                                 LIBS="-l$cf_regex_lib $LIBS"
14344                                 cf_regex_func=regcomp
14345                                 break
14346 fi
14347
14348         done
14349
14350 fi
14351
14352 if test "$cf_regex_func" = no ; then
14353         echo "$as_me:14353: checking for compile" >&5
14354 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14355 if test "${ac_cv_func_compile+set}" = set; then
14356   echo $ECHO_N "(cached) $ECHO_C" >&6
14357 else
14358   cat >conftest.$ac_ext <<_ACEOF
14359 #line 14359 "configure"
14360 #include "confdefs.h"
14361 /* System header to define __stub macros and hopefully few prototypes,
14362     which can conflict with char compile (); below.  */
14363 #include <assert.h>
14364 /* Override any gcc2 internal prototype to avoid an error.  */
14365 #ifdef __cplusplus
14366 extern "C"
14367 #endif
14368 /* We use char because int might match the return type of a gcc2
14369    builtin and then its argument prototype would still apply.  */
14370 char compile ();
14371 char (*f) ();
14372
14373 int
14374 main ()
14375 {
14376 /* The GNU C library defines this for functions which it implements
14377     to always fail with ENOSYS.  Some functions are actually named
14378     something starting with __ and the normal name is an alias.  */
14379 #if defined (__stub_compile) || defined (__stub___compile)
14380 choke me
14381 #else
14382 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14383 #endif
14384
14385   ;
14386   return 0;
14387 }
14388 _ACEOF
14389 rm -f conftest.$ac_objext conftest$ac_exeext
14390 if { (eval echo "$as_me:14390: \"$ac_link\"") >&5
14391   (eval $ac_link) 2>&5
14392   ac_status=$?
14393   echo "$as_me:14393: \$? = $ac_status" >&5
14394   (exit $ac_status); } &&
14395          { ac_try='test -s conftest$ac_exeext'
14396   { (eval echo "$as_me:14396: \"$ac_try\"") >&5
14397   (eval $ac_try) 2>&5
14398   ac_status=$?
14399   echo "$as_me:14399: \$? = $ac_status" >&5
14400   (exit $ac_status); }; }; then
14401   ac_cv_func_compile=yes
14402 else
14403   echo "$as_me: failed program was:" >&5
14404 cat conftest.$ac_ext >&5
14405 ac_cv_func_compile=no
14406 fi
14407 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14408 fi
14409 echo "$as_me:14409: result: $ac_cv_func_compile" >&5
14410 echo "${ECHO_T}$ac_cv_func_compile" >&6
14411 if test $ac_cv_func_compile = yes; then
14412   cf_regex_func=compile
14413 else
14414
14415                 echo "$as_me:14415: checking for compile in -lgen" >&5
14416 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14417 if test "${ac_cv_lib_gen_compile+set}" = set; then
14418   echo $ECHO_N "(cached) $ECHO_C" >&6
14419 else
14420   ac_check_lib_save_LIBS=$LIBS
14421 LIBS="-lgen  $LIBS"
14422 cat >conftest.$ac_ext <<_ACEOF
14423 #line 14423 "configure"
14424 #include "confdefs.h"
14425
14426 /* Override any gcc2 internal prototype to avoid an error.  */
14427 #ifdef __cplusplus
14428 extern "C"
14429 #endif
14430 /* We use char because int might match the return type of a gcc2
14431    builtin and then its argument prototype would still apply.  */
14432 char compile ();
14433 int
14434 main ()
14435 {
14436 compile ();
14437   ;
14438   return 0;
14439 }
14440 _ACEOF
14441 rm -f conftest.$ac_objext conftest$ac_exeext
14442 if { (eval echo "$as_me:14442: \"$ac_link\"") >&5
14443   (eval $ac_link) 2>&5
14444   ac_status=$?
14445   echo "$as_me:14445: \$? = $ac_status" >&5
14446   (exit $ac_status); } &&
14447          { ac_try='test -s conftest$ac_exeext'
14448   { (eval echo "$as_me:14448: \"$ac_try\"") >&5
14449   (eval $ac_try) 2>&5
14450   ac_status=$?
14451   echo "$as_me:14451: \$? = $ac_status" >&5
14452   (exit $ac_status); }; }; then
14453   ac_cv_lib_gen_compile=yes
14454 else
14455   echo "$as_me: failed program was:" >&5
14456 cat conftest.$ac_ext >&5
14457 ac_cv_lib_gen_compile=no
14458 fi
14459 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14460 LIBS=$ac_check_lib_save_LIBS
14461 fi
14462 echo "$as_me:14462: result: $ac_cv_lib_gen_compile" >&5
14463 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14464 if test $ac_cv_lib_gen_compile = yes; then
14465
14466                                 LIBS="-lgen $LIBS"
14467                                 cf_regex_func=compile
14468 fi
14469
14470 fi
14471
14472 fi
14473
14474 if test "$cf_regex_func" = no ; then
14475         { echo "$as_me:14475: WARNING: cannot find regular expression library" >&5
14476 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14477 fi
14478
14479 echo "$as_me:14479: checking for regular-expression headers" >&5
14480 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14481 if test "${cf_cv_regex_hdrs+set}" = set; then
14482   echo $ECHO_N "(cached) $ECHO_C" >&6
14483 else
14484
14485 cf_cv_regex_hdrs=no
14486 case $cf_regex_func in #(vi
14487 compile) #(vi
14488         for cf_regex_hdr in regexp.h regexpr.h
14489         do
14490                 cat >conftest.$ac_ext <<_ACEOF
14491 #line 14491 "configure"
14492 #include "confdefs.h"
14493 #include <$cf_regex_hdr>
14494 int
14495 main ()
14496 {
14497
14498                         char *p = compile("", "", "", 0);
14499                         int x = step("", "");
14500
14501   ;
14502   return 0;
14503 }
14504 _ACEOF
14505 rm -f conftest.$ac_objext conftest$ac_exeext
14506 if { (eval echo "$as_me:14506: \"$ac_link\"") >&5
14507   (eval $ac_link) 2>&5
14508   ac_status=$?
14509   echo "$as_me:14509: \$? = $ac_status" >&5
14510   (exit $ac_status); } &&
14511          { ac_try='test -s conftest$ac_exeext'
14512   { (eval echo "$as_me:14512: \"$ac_try\"") >&5
14513   (eval $ac_try) 2>&5
14514   ac_status=$?
14515   echo "$as_me:14515: \$? = $ac_status" >&5
14516   (exit $ac_status); }; }; then
14517
14518                         cf_cv_regex_hdrs=$cf_regex_hdr
14519                         break
14520
14521 else
14522   echo "$as_me: failed program was:" >&5
14523 cat conftest.$ac_ext >&5
14524 fi
14525 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14526         done
14527         ;;
14528 *)
14529         for cf_regex_hdr in regex.h
14530         do
14531                 cat >conftest.$ac_ext <<_ACEOF
14532 #line 14532 "configure"
14533 #include "confdefs.h"
14534 #include <sys/types.h>
14535 #include <$cf_regex_hdr>
14536 int
14537 main ()
14538 {
14539
14540                         regex_t *p;
14541                         int x = regcomp(p, "", 0);
14542                         int y = regexec(p, "", 0, 0, 0);
14543                         regfree(p);
14544
14545   ;
14546   return 0;
14547 }
14548 _ACEOF
14549 rm -f conftest.$ac_objext conftest$ac_exeext
14550 if { (eval echo "$as_me:14550: \"$ac_link\"") >&5
14551   (eval $ac_link) 2>&5
14552   ac_status=$?
14553   echo "$as_me:14553: \$? = $ac_status" >&5
14554   (exit $ac_status); } &&
14555          { ac_try='test -s conftest$ac_exeext'
14556   { (eval echo "$as_me:14556: \"$ac_try\"") >&5
14557   (eval $ac_try) 2>&5
14558   ac_status=$?
14559   echo "$as_me:14559: \$? = $ac_status" >&5
14560   (exit $ac_status); }; }; then
14561
14562                         cf_cv_regex_hdrs=$cf_regex_hdr
14563                         break
14564
14565 else
14566   echo "$as_me: failed program was:" >&5
14567 cat conftest.$ac_ext >&5
14568 fi
14569 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14570         done
14571         ;;
14572 esac
14573
14574 fi
14575 echo "$as_me:14575: result: $cf_cv_regex_hdrs" >&5
14576 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14577
14578 case $cf_cv_regex_hdrs in #(vi
14579     no)        { echo "$as_me:14579: WARNING: no regular expression header found" >&5
14580 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14581     regex.h)
14582 cat >>confdefs.h <<\EOF
14583 #define HAVE_REGEX_H_FUNCS 1
14584 EOF
14585  ;; #(vi
14586     regexp.h)
14587 cat >>confdefs.h <<\EOF
14588 #define HAVE_REGEXP_H_FUNCS 1
14589 EOF
14590  ;; #(vi
14591     regexpr.h)
14592 cat >>confdefs.h <<\EOF
14593 #define HAVE_REGEXPR_H_FUNCS 1
14594 EOF
14595  ;;
14596 esac
14597
14598 for ac_header in \
14599 fcntl.h \
14600 getopt.h \
14601 limits.h \
14602 locale.h \
14603 math.h \
14604 poll.h \
14605 sys/bsdtypes.h \
14606 sys/ioctl.h \
14607 sys/param.h \
14608 sys/poll.h \
14609 sys/select.h \
14610 sys/time.h \
14611 sys/times.h \
14612 ttyent.h \
14613 unistd.h \
14614 wctype.h \
14615
14616 do
14617 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14618 echo "$as_me:14618: checking for $ac_header" >&5
14619 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14620 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14621   echo $ECHO_N "(cached) $ECHO_C" >&6
14622 else
14623   cat >conftest.$ac_ext <<_ACEOF
14624 #line 14624 "configure"
14625 #include "confdefs.h"
14626 #include <$ac_header>
14627 _ACEOF
14628 if { (eval echo "$as_me:14628: \"$ac_cpp conftest.$ac_ext\"") >&5
14629   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14630   ac_status=$?
14631   egrep -v '^ *\+' conftest.er1 >conftest.err
14632   rm -f conftest.er1
14633   cat conftest.err >&5
14634   echo "$as_me:14634: \$? = $ac_status" >&5
14635   (exit $ac_status); } >/dev/null; then
14636   if test -s conftest.err; then
14637     ac_cpp_err=$ac_c_preproc_warn_flag
14638   else
14639     ac_cpp_err=
14640   fi
14641 else
14642   ac_cpp_err=yes
14643 fi
14644 if test -z "$ac_cpp_err"; then
14645   eval "$as_ac_Header=yes"
14646 else
14647   echo "$as_me: failed program was:" >&5
14648   cat conftest.$ac_ext >&5
14649   eval "$as_ac_Header=no"
14650 fi
14651 rm -f conftest.err conftest.$ac_ext
14652 fi
14653 echo "$as_me:14653: result: `eval echo '${'$as_ac_Header'}'`" >&5
14654 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14655 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14656   cat >>confdefs.h <<EOF
14657 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14658 EOF
14659
14660 fi
14661 done
14662
14663 for ac_header in unistd.h getopt.h
14664 do
14665 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14666 echo "$as_me:14666: checking for $ac_header" >&5
14667 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14668 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14669   echo $ECHO_N "(cached) $ECHO_C" >&6
14670 else
14671   cat >conftest.$ac_ext <<_ACEOF
14672 #line 14672 "configure"
14673 #include "confdefs.h"
14674 #include <$ac_header>
14675 _ACEOF
14676 if { (eval echo "$as_me:14676: \"$ac_cpp conftest.$ac_ext\"") >&5
14677   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14678   ac_status=$?
14679   egrep -v '^ *\+' conftest.er1 >conftest.err
14680   rm -f conftest.er1
14681   cat conftest.err >&5
14682   echo "$as_me:14682: \$? = $ac_status" >&5
14683   (exit $ac_status); } >/dev/null; then
14684   if test -s conftest.err; then
14685     ac_cpp_err=$ac_c_preproc_warn_flag
14686   else
14687     ac_cpp_err=
14688   fi
14689 else
14690   ac_cpp_err=yes
14691 fi
14692 if test -z "$ac_cpp_err"; then
14693   eval "$as_ac_Header=yes"
14694 else
14695   echo "$as_me: failed program was:" >&5
14696   cat conftest.$ac_ext >&5
14697   eval "$as_ac_Header=no"
14698 fi
14699 rm -f conftest.err conftest.$ac_ext
14700 fi
14701 echo "$as_me:14701: result: `eval echo '${'$as_ac_Header'}'`" >&5
14702 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14703 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14704   cat >>confdefs.h <<EOF
14705 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14706 EOF
14707
14708 fi
14709 done
14710
14711 echo "$as_me:14711: checking for header declaring getopt variables" >&5
14712 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14713 if test "${cf_cv_getopt_header+set}" = set; then
14714   echo $ECHO_N "(cached) $ECHO_C" >&6
14715 else
14716
14717 cf_cv_getopt_header=none
14718 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14719 do
14720 cat >conftest.$ac_ext <<_ACEOF
14721 #line 14721 "configure"
14722 #include "confdefs.h"
14723
14724 #include <$cf_header>
14725 int
14726 main ()
14727 {
14728 int x = optind; char *y = optarg
14729   ;
14730   return 0;
14731 }
14732 _ACEOF
14733 rm -f conftest.$ac_objext
14734 if { (eval echo "$as_me:14734: \"$ac_compile\"") >&5
14735   (eval $ac_compile) 2>&5
14736   ac_status=$?
14737   echo "$as_me:14737: \$? = $ac_status" >&5
14738   (exit $ac_status); } &&
14739          { ac_try='test -s conftest.$ac_objext'
14740   { (eval echo "$as_me:14740: \"$ac_try\"") >&5
14741   (eval $ac_try) 2>&5
14742   ac_status=$?
14743   echo "$as_me:14743: \$? = $ac_status" >&5
14744   (exit $ac_status); }; }; then
14745   cf_cv_getopt_header=$cf_header
14746  break
14747 else
14748   echo "$as_me: failed program was:" >&5
14749 cat conftest.$ac_ext >&5
14750 fi
14751 rm -f conftest.$ac_objext conftest.$ac_ext
14752 done
14753
14754 fi
14755 echo "$as_me:14755: result: $cf_cv_getopt_header" >&5
14756 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14757 if test $cf_cv_getopt_header != none ; then
14758
14759 cat >>confdefs.h <<\EOF
14760 #define HAVE_GETOPT_HEADER 1
14761 EOF
14762
14763 fi
14764
14765 # check for ISC (this may also define _POSIX_SOURCE)
14766 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14767 if test "x$ISC" = xyes ; then
14768
14769 echo "$as_me:14769: checking for main in -lcposix" >&5
14770 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14771 if test "${ac_cv_lib_cposix_main+set}" = set; then
14772   echo $ECHO_N "(cached) $ECHO_C" >&6
14773 else
14774   ac_check_lib_save_LIBS=$LIBS
14775 LIBS="-lcposix  $LIBS"
14776 cat >conftest.$ac_ext <<_ACEOF
14777 #line 14777 "configure"
14778 #include "confdefs.h"
14779
14780 int
14781 main ()
14782 {
14783 main ();
14784   ;
14785   return 0;
14786 }
14787 _ACEOF
14788 rm -f conftest.$ac_objext conftest$ac_exeext
14789 if { (eval echo "$as_me:14789: \"$ac_link\"") >&5
14790   (eval $ac_link) 2>&5
14791   ac_status=$?
14792   echo "$as_me:14792: \$? = $ac_status" >&5
14793   (exit $ac_status); } &&
14794          { ac_try='test -s conftest$ac_exeext'
14795   { (eval echo "$as_me:14795: \"$ac_try\"") >&5
14796   (eval $ac_try) 2>&5
14797   ac_status=$?
14798   echo "$as_me:14798: \$? = $ac_status" >&5
14799   (exit $ac_status); }; }; then
14800   ac_cv_lib_cposix_main=yes
14801 else
14802   echo "$as_me: failed program was:" >&5
14803 cat conftest.$ac_ext >&5
14804 ac_cv_lib_cposix_main=no
14805 fi
14806 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14807 LIBS=$ac_check_lib_save_LIBS
14808 fi
14809 echo "$as_me:14809: result: $ac_cv_lib_cposix_main" >&5
14810 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14811 if test $ac_cv_lib_cposix_main = yes; then
14812   cat >>confdefs.h <<EOF
14813 #define HAVE_LIBCPOSIX 1
14814 EOF
14815
14816   LIBS="-lcposix $LIBS"
14817
14818 fi
14819
14820         echo "$as_me:14820: checking for bzero in -linet" >&5
14821 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14822 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14823   echo $ECHO_N "(cached) $ECHO_C" >&6
14824 else
14825   ac_check_lib_save_LIBS=$LIBS
14826 LIBS="-linet  $LIBS"
14827 cat >conftest.$ac_ext <<_ACEOF
14828 #line 14828 "configure"
14829 #include "confdefs.h"
14830
14831 /* Override any gcc2 internal prototype to avoid an error.  */
14832 #ifdef __cplusplus
14833 extern "C"
14834 #endif
14835 /* We use char because int might match the return type of a gcc2
14836    builtin and then its argument prototype would still apply.  */
14837 char bzero ();
14838 int
14839 main ()
14840 {
14841 bzero ();
14842   ;
14843   return 0;
14844 }
14845 _ACEOF
14846 rm -f conftest.$ac_objext conftest$ac_exeext
14847 if { (eval echo "$as_me:14847: \"$ac_link\"") >&5
14848   (eval $ac_link) 2>&5
14849   ac_status=$?
14850   echo "$as_me:14850: \$? = $ac_status" >&5
14851   (exit $ac_status); } &&
14852          { ac_try='test -s conftest$ac_exeext'
14853   { (eval echo "$as_me:14853: \"$ac_try\"") >&5
14854   (eval $ac_try) 2>&5
14855   ac_status=$?
14856   echo "$as_me:14856: \$? = $ac_status" >&5
14857   (exit $ac_status); }; }; then
14858   ac_cv_lib_inet_bzero=yes
14859 else
14860   echo "$as_me: failed program was:" >&5
14861 cat conftest.$ac_ext >&5
14862 ac_cv_lib_inet_bzero=no
14863 fi
14864 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14865 LIBS=$ac_check_lib_save_LIBS
14866 fi
14867 echo "$as_me:14867: result: $ac_cv_lib_inet_bzero" >&5
14868 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14869 if test $ac_cv_lib_inet_bzero = yes; then
14870   LIBS="-linet $LIBS"
14871 fi
14872 fi
14873
14874 echo "$as_me:14874: checking if sys/time.h works with sys/select.h" >&5
14875 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14876 if test "${cf_cv_sys_time_select+set}" = set; then
14877   echo $ECHO_N "(cached) $ECHO_C" >&6
14878 else
14879
14880 cat >conftest.$ac_ext <<_ACEOF
14881 #line 14881 "configure"
14882 #include "confdefs.h"
14883
14884 #include <sys/types.h>
14885 #ifdef HAVE_SYS_TIME_H
14886 #include <sys/time.h>
14887 #endif
14888 #ifdef HAVE_SYS_SELECT_H
14889 #include <sys/select.h>
14890 #endif
14891
14892 int
14893 main ()
14894 {
14895
14896   ;
14897   return 0;
14898 }
14899 _ACEOF
14900 rm -f conftest.$ac_objext
14901 if { (eval echo "$as_me:14901: \"$ac_compile\"") >&5
14902   (eval $ac_compile) 2>&5
14903   ac_status=$?
14904   echo "$as_me:14904: \$? = $ac_status" >&5
14905   (exit $ac_status); } &&
14906          { ac_try='test -s conftest.$ac_objext'
14907   { (eval echo "$as_me:14907: \"$ac_try\"") >&5
14908   (eval $ac_try) 2>&5
14909   ac_status=$?
14910   echo "$as_me:14910: \$? = $ac_status" >&5
14911   (exit $ac_status); }; }; then
14912   cf_cv_sys_time_select=yes
14913 else
14914   echo "$as_me: failed program was:" >&5
14915 cat conftest.$ac_ext >&5
14916 cf_cv_sys_time_select=no
14917 fi
14918 rm -f conftest.$ac_objext conftest.$ac_ext
14919
14920 fi
14921
14922 echo "$as_me:14922: result: $cf_cv_sys_time_select" >&5
14923 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14924 test "$cf_cv_sys_time_select" = yes &&
14925 cat >>confdefs.h <<\EOF
14926 #define HAVE_SYS_TIME_SELECT 1
14927 EOF
14928
14929 ###     checks for compiler characteristics
14930 ac_ext=c
14931 ac_cpp='$CPP $CPPFLAGS'
14932 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14933 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14934 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14935 ac_main_return=return
14936
14937 echo "$as_me:14937: checking for an ANSI C-conforming const" >&5
14938 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14939 if test "${ac_cv_c_const+set}" = set; then
14940   echo $ECHO_N "(cached) $ECHO_C" >&6
14941 else
14942   cat >conftest.$ac_ext <<_ACEOF
14943 #line 14943 "configure"
14944 #include "confdefs.h"
14945
14946 int
14947 main ()
14948 {
14949 /* FIXME: Include the comments suggested by Paul. */
14950 #ifndef __cplusplus
14951   /* Ultrix mips cc rejects this.  */
14952   typedef int charset[2];
14953   const charset x;
14954   /* SunOS 4.1.1 cc rejects this.  */
14955   char const *const *ccp;
14956   char **p;
14957   /* NEC SVR4.0.2 mips cc rejects this.  */
14958   struct point {int x, y;};
14959   static struct point const zero = {0,0};
14960   /* AIX XL C 1.02.0.0 rejects this.
14961      It does not let you subtract one const X* pointer from another in
14962      an arm of an if-expression whose if-part is not a constant
14963      expression */
14964   const char *g = "string";
14965   ccp = &g + (g ? g-g : 0);
14966   /* HPUX 7.0 cc rejects these. */
14967   ++ccp;
14968   p = (char**) ccp;
14969   ccp = (char const *const *) p;
14970   { /* SCO 3.2v4 cc rejects this.  */
14971     char *t;
14972     char const *s = 0 ? (char *) 0 : (char const *) 0;
14973
14974     *t++ = 0;
14975   }
14976   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14977     int x[] = {25, 17};
14978     const int *foo = &x[0];
14979     ++foo;
14980   }
14981   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14982     typedef const int *iptr;
14983     iptr p = 0;
14984     ++p;
14985   }
14986   { /* AIX XL C 1.02.0.0 rejects this saying
14987        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14988     struct s { int j; const int *ap[3]; };
14989     struct s *b; b->j = 5;
14990   }
14991   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14992     const int foo = 10;
14993   }
14994 #endif
14995
14996   ;
14997   return 0;
14998 }
14999 _ACEOF
15000 rm -f conftest.$ac_objext
15001 if { (eval echo "$as_me:15001: \"$ac_compile\"") >&5
15002   (eval $ac_compile) 2>&5
15003   ac_status=$?
15004   echo "$as_me:15004: \$? = $ac_status" >&5
15005   (exit $ac_status); } &&
15006          { ac_try='test -s conftest.$ac_objext'
15007   { (eval echo "$as_me:15007: \"$ac_try\"") >&5
15008   (eval $ac_try) 2>&5
15009   ac_status=$?
15010   echo "$as_me:15010: \$? = $ac_status" >&5
15011   (exit $ac_status); }; }; then
15012   ac_cv_c_const=yes
15013 else
15014   echo "$as_me: failed program was:" >&5
15015 cat conftest.$ac_ext >&5
15016 ac_cv_c_const=no
15017 fi
15018 rm -f conftest.$ac_objext conftest.$ac_ext
15019 fi
15020 echo "$as_me:15020: result: $ac_cv_c_const" >&5
15021 echo "${ECHO_T}$ac_cv_c_const" >&6
15022 if test $ac_cv_c_const = no; then
15023
15024 cat >>confdefs.h <<\EOF
15025 #define const
15026 EOF
15027
15028 fi
15029
15030 echo "$as_me:15030: checking for inline" >&5
15031 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15032 if test "${ac_cv_c_inline+set}" = set; then
15033   echo $ECHO_N "(cached) $ECHO_C" >&6
15034 else
15035   ac_cv_c_inline=no
15036 for ac_kw in inline __inline__ __inline; do
15037   cat >conftest.$ac_ext <<_ACEOF
15038 #line 15038 "configure"
15039 #include "confdefs.h"
15040 #ifndef __cplusplus
15041 static $ac_kw int static_foo () {return 0; }
15042 $ac_kw int foo () {return 0; }
15043 #endif
15044
15045 _ACEOF
15046 rm -f conftest.$ac_objext
15047 if { (eval echo "$as_me:15047: \"$ac_compile\"") >&5
15048   (eval $ac_compile) 2>&5
15049   ac_status=$?
15050   echo "$as_me:15050: \$? = $ac_status" >&5
15051   (exit $ac_status); } &&
15052          { ac_try='test -s conftest.$ac_objext'
15053   { (eval echo "$as_me:15053: \"$ac_try\"") >&5
15054   (eval $ac_try) 2>&5
15055   ac_status=$?
15056   echo "$as_me:15056: \$? = $ac_status" >&5
15057   (exit $ac_status); }; }; then
15058   ac_cv_c_inline=$ac_kw; break
15059 else
15060   echo "$as_me: failed program was:" >&5
15061 cat conftest.$ac_ext >&5
15062 fi
15063 rm -f conftest.$ac_objext conftest.$ac_ext
15064 done
15065
15066 fi
15067 echo "$as_me:15067: result: $ac_cv_c_inline" >&5
15068 echo "${ECHO_T}$ac_cv_c_inline" >&6
15069 case $ac_cv_c_inline in
15070   inline | yes) ;;
15071   no)
15072 cat >>confdefs.h <<\EOF
15073 #define inline
15074 EOF
15075  ;;
15076   *)  cat >>confdefs.h <<EOF
15077 #define inline $ac_cv_c_inline
15078 EOF
15079  ;;
15080 esac
15081
15082 NCURSES_INLINE=
15083 if test "$ac_cv_c_inline" != no ; then
15084   NCURSES_INLINE=inline
15085   if test "$INTEL_COMPILER" = yes
15086   then
15087     :
15088   elif test "$CLANG_COMPILER" = yes
15089   then
15090     :
15091   elif test "$GCC" = yes
15092   then
15093     echo "$as_me:15093: checking if $CC supports options to tune inlining" >&5
15094 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15095 if test "${cf_cv_gcc_inline+set}" = set; then
15096   echo $ECHO_N "(cached) $ECHO_C" >&6
15097 else
15098
15099       cf_save_CFLAGS=$CFLAGS
15100       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15101       cat >conftest.$ac_ext <<_ACEOF
15102 #line 15102 "configure"
15103 #include "confdefs.h"
15104 inline int foo(void) { return 1; }
15105 int
15106 main ()
15107 {
15108 ${cf_cv_main_return:-return} foo()
15109   ;
15110   return 0;
15111 }
15112 _ACEOF
15113 rm -f conftest.$ac_objext
15114 if { (eval echo "$as_me:15114: \"$ac_compile\"") >&5
15115   (eval $ac_compile) 2>&5
15116   ac_status=$?
15117   echo "$as_me:15117: \$? = $ac_status" >&5
15118   (exit $ac_status); } &&
15119          { ac_try='test -s conftest.$ac_objext'
15120   { (eval echo "$as_me:15120: \"$ac_try\"") >&5
15121   (eval $ac_try) 2>&5
15122   ac_status=$?
15123   echo "$as_me:15123: \$? = $ac_status" >&5
15124   (exit $ac_status); }; }; then
15125   cf_cv_gcc_inline=yes
15126 else
15127   echo "$as_me: failed program was:" >&5
15128 cat conftest.$ac_ext >&5
15129 cf_cv_gcc_inline=no
15130 fi
15131 rm -f conftest.$ac_objext conftest.$ac_ext
15132       CFLAGS=$cf_save_CFLAGS
15133
15134 fi
15135 echo "$as_me:15135: result: $cf_cv_gcc_inline" >&5
15136 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15137     if test "$cf_cv_gcc_inline" = yes ; then
15138
15139 cf_fix_cppflags=no
15140 cf_new_cflags=
15141 cf_new_cppflags=
15142 cf_new_extra_cppflags=
15143
15144 for cf_add_cflags in --param max-inline-insns-single=1200
15145 do
15146 case $cf_fix_cppflags in
15147 no)
15148         case $cf_add_cflags in #(vi
15149         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15150                 case $cf_add_cflags in
15151                 -D*)
15152                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15153
15154                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15155                                 && test -z "${cf_tst_cflags}" \
15156                                 && cf_fix_cppflags=yes
15157
15158                         if test $cf_fix_cppflags = yes ; then
15159                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15160                                 continue
15161                         elif test "${cf_tst_cflags}" = "\"'" ; then
15162                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15163                                 continue
15164                         fi
15165                         ;;
15166                 esac
15167                 case "$CPPFLAGS" in
15168                 *$cf_add_cflags) #(vi
15169                         ;;
15170                 *) #(vi
15171                         case $cf_add_cflags in #(vi
15172                         -D*)
15173                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15174
15175 CPPFLAGS=`echo "$CPPFLAGS" | \
15176         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15177                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15178
15179                                 ;;
15180                         esac
15181                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15182                         ;;
15183                 esac
15184                 ;;
15185         *)
15186                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15187                 ;;
15188         esac
15189         ;;
15190 yes)
15191         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15192
15193         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15194
15195         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15196                 && test -z "${cf_tst_cflags}" \
15197                 && cf_fix_cppflags=no
15198         ;;
15199 esac
15200 done
15201
15202 if test -n "$cf_new_cflags" ; then
15203
15204         CFLAGS="$CFLAGS $cf_new_cflags"
15205 fi
15206
15207 if test -n "$cf_new_cppflags" ; then
15208
15209         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15210 fi
15211
15212 if test -n "$cf_new_extra_cppflags" ; then
15213
15214         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15215 fi
15216
15217     fi
15218   fi
15219 fi
15220
15221 echo "$as_me:15221: checking for signal global datatype" >&5
15222 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15223 if test "${cf_cv_sig_atomic_t+set}" = set; then
15224   echo $ECHO_N "(cached) $ECHO_C" >&6
15225 else
15226
15227         for cf_type in \
15228                 "volatile sig_atomic_t" \
15229                 "sig_atomic_t" \
15230                 "int"
15231         do
15232         cat >conftest.$ac_ext <<_ACEOF
15233 #line 15233 "configure"
15234 #include "confdefs.h"
15235
15236 #include <sys/types.h>
15237 #include <signal.h>
15238 #include <stdio.h>
15239
15240 extern $cf_type x;
15241 $cf_type x;
15242 static void handler(int sig)
15243 {
15244         x = 5;
15245 }
15246 int
15247 main ()
15248 {
15249 signal(SIGINT, handler);
15250                  x = 1
15251   ;
15252   return 0;
15253 }
15254 _ACEOF
15255 rm -f conftest.$ac_objext
15256 if { (eval echo "$as_me:15256: \"$ac_compile\"") >&5
15257   (eval $ac_compile) 2>&5
15258   ac_status=$?
15259   echo "$as_me:15259: \$? = $ac_status" >&5
15260   (exit $ac_status); } &&
15261          { ac_try='test -s conftest.$ac_objext'
15262   { (eval echo "$as_me:15262: \"$ac_try\"") >&5
15263   (eval $ac_try) 2>&5
15264   ac_status=$?
15265   echo "$as_me:15265: \$? = $ac_status" >&5
15266   (exit $ac_status); }; }; then
15267   cf_cv_sig_atomic_t=$cf_type
15268 else
15269   echo "$as_me: failed program was:" >&5
15270 cat conftest.$ac_ext >&5
15271 cf_cv_sig_atomic_t=no
15272 fi
15273 rm -f conftest.$ac_objext conftest.$ac_ext
15274                 test "$cf_cv_sig_atomic_t" != no && break
15275         done
15276
15277 fi
15278
15279 echo "$as_me:15279: result: $cf_cv_sig_atomic_t" >&5
15280 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15281 test "$cf_cv_sig_atomic_t" != no &&
15282 cat >>confdefs.h <<EOF
15283 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15284 EOF
15285
15286 if test $NCURSES_CHTYPE = auto ; then
15287
15288 echo "$as_me:15288: checking for type of chtype" >&5
15289 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15290 if test "${cf_cv_typeof_chtype+set}" = set; then
15291   echo $ECHO_N "(cached) $ECHO_C" >&6
15292 else
15293
15294                 if test "$cross_compiling" = yes; then
15295   cf_cv_typeof_chtype=long
15296 else
15297   cat >conftest.$ac_ext <<_ACEOF
15298 #line 15298 "configure"
15299 #include "confdefs.h"
15300
15301 #define WANT_BITS 31
15302 #include <stdio.h>
15303 int main()
15304 {
15305         FILE *fp = fopen("cf_test.out", "w");
15306         if (fp != 0) {
15307                 char *result = "long";
15308                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15309                         int n;
15310                         unsigned int x, y;
15311                         for (n = 0; n < WANT_BITS; n++) {
15312                                 x = (1 << n);
15313                                 y = (x >> n);
15314                                 if (y != 1 || x == 0) {
15315                                         x = 0;
15316                                         break;
15317                                 }
15318                         }
15319                         /*
15320                          * If x is nonzero, an int is big enough for the bits
15321                          * that we want.
15322                          */
15323                         result = (x != 0) ? "int" : "long";
15324                 }
15325                 fputs(result, fp);
15326                 fclose(fp);
15327         }
15328         ${cf_cv_main_return:-return}(0);
15329 }
15330
15331 _ACEOF
15332 rm -f conftest$ac_exeext
15333 if { (eval echo "$as_me:15333: \"$ac_link\"") >&5
15334   (eval $ac_link) 2>&5
15335   ac_status=$?
15336   echo "$as_me:15336: \$? = $ac_status" >&5
15337   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15338   { (eval echo "$as_me:15338: \"$ac_try\"") >&5
15339   (eval $ac_try) 2>&5
15340   ac_status=$?
15341   echo "$as_me:15341: \$? = $ac_status" >&5
15342   (exit $ac_status); }; }; then
15343   cf_cv_typeof_chtype=`cat cf_test.out`
15344 else
15345   echo "$as_me: program exited with status $ac_status" >&5
15346 echo "$as_me: failed program was:" >&5
15347 cat conftest.$ac_ext >&5
15348 cf_cv_typeof_chtype=long
15349 fi
15350 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15351 fi
15352                 rm -f cf_test.out
15353
15354 fi
15355
15356 echo "$as_me:15356: result: $cf_cv_typeof_chtype" >&5
15357 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15358
15359 cat >>confdefs.h <<EOF
15360 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15361 EOF
15362
15363 else
15364         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15365 fi
15366 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15367
15368 echo "$as_me:15368: checking if unsigned literals are legal" >&5
15369 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15370 if test "${cf_cv_unsigned_literals+set}" = set; then
15371   echo $ECHO_N "(cached) $ECHO_C" >&6
15372 else
15373
15374         cat >conftest.$ac_ext <<_ACEOF
15375 #line 15375 "configure"
15376 #include "confdefs.h"
15377
15378 int
15379 main ()
15380 {
15381 long x = 1L + 1UL + 1U + 1
15382   ;
15383   return 0;
15384 }
15385 _ACEOF
15386 rm -f conftest.$ac_objext
15387 if { (eval echo "$as_me:15387: \"$ac_compile\"") >&5
15388   (eval $ac_compile) 2>&5
15389   ac_status=$?
15390   echo "$as_me:15390: \$? = $ac_status" >&5
15391   (exit $ac_status); } &&
15392          { ac_try='test -s conftest.$ac_objext'
15393   { (eval echo "$as_me:15393: \"$ac_try\"") >&5
15394   (eval $ac_try) 2>&5
15395   ac_status=$?
15396   echo "$as_me:15396: \$? = $ac_status" >&5
15397   (exit $ac_status); }; }; then
15398   cf_cv_unsigned_literals=yes
15399 else
15400   echo "$as_me: failed program was:" >&5
15401 cat conftest.$ac_ext >&5
15402 cf_cv_unsigned_literals=no
15403 fi
15404 rm -f conftest.$ac_objext conftest.$ac_ext
15405
15406 fi
15407
15408 echo "$as_me:15408: result: $cf_cv_unsigned_literals" >&5
15409 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15410
15411 cf_cv_1UL="1"
15412 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15413 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15414
15415 if test $NCURSES_MMASK_T = auto ; then
15416         cf_cv_typeof_mmask_t=long
15417 else
15418         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15419 fi
15420 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15421
15422 ###     Checks for external-data
15423
15424 echo "$as_me:15424: checking if external errno is declared" >&5
15425 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15426 if test "${cf_cv_dcl_errno+set}" = set; then
15427   echo $ECHO_N "(cached) $ECHO_C" >&6
15428 else
15429
15430     cat >conftest.$ac_ext <<_ACEOF
15431 #line 15431 "configure"
15432 #include "confdefs.h"
15433
15434 #ifdef HAVE_STDLIB_H
15435 #include <stdlib.h>
15436 #endif
15437 #include <stdio.h>
15438 #include <sys/types.h>
15439 #include <errno.h>
15440 int
15441 main ()
15442 {
15443 int x = (int) errno
15444   ;
15445   return 0;
15446 }
15447 _ACEOF
15448 rm -f conftest.$ac_objext
15449 if { (eval echo "$as_me:15449: \"$ac_compile\"") >&5
15450   (eval $ac_compile) 2>&5
15451   ac_status=$?
15452   echo "$as_me:15452: \$? = $ac_status" >&5
15453   (exit $ac_status); } &&
15454          { ac_try='test -s conftest.$ac_objext'
15455   { (eval echo "$as_me:15455: \"$ac_try\"") >&5
15456   (eval $ac_try) 2>&5
15457   ac_status=$?
15458   echo "$as_me:15458: \$? = $ac_status" >&5
15459   (exit $ac_status); }; }; then
15460   cf_cv_dcl_errno=yes
15461 else
15462   echo "$as_me: failed program was:" >&5
15463 cat conftest.$ac_ext >&5
15464 cf_cv_dcl_errno=no
15465 fi
15466 rm -f conftest.$ac_objext conftest.$ac_ext
15467
15468 fi
15469 echo "$as_me:15469: result: $cf_cv_dcl_errno" >&5
15470 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15471
15472 if test "$cf_cv_dcl_errno" = no ; then
15473
15474 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15475
15476     cat >>confdefs.h <<EOF
15477 #define $cf_result 1
15478 EOF
15479
15480 fi
15481
15482 # It's possible (for near-UNIX clones) that the data doesn't exist
15483
15484 echo "$as_me:15484: checking if external errno exists" >&5
15485 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15486 if test "${cf_cv_have_errno+set}" = set; then
15487   echo $ECHO_N "(cached) $ECHO_C" >&6
15488 else
15489
15490     cat >conftest.$ac_ext <<_ACEOF
15491 #line 15491 "configure"
15492 #include "confdefs.h"
15493
15494 #undef errno
15495 extern int errno;
15496
15497 int
15498 main ()
15499 {
15500 errno = 2
15501   ;
15502   return 0;
15503 }
15504 _ACEOF
15505 rm -f conftest.$ac_objext conftest$ac_exeext
15506 if { (eval echo "$as_me:15506: \"$ac_link\"") >&5
15507   (eval $ac_link) 2>&5
15508   ac_status=$?
15509   echo "$as_me:15509: \$? = $ac_status" >&5
15510   (exit $ac_status); } &&
15511          { ac_try='test -s conftest$ac_exeext'
15512   { (eval echo "$as_me:15512: \"$ac_try\"") >&5
15513   (eval $ac_try) 2>&5
15514   ac_status=$?
15515   echo "$as_me:15515: \$? = $ac_status" >&5
15516   (exit $ac_status); }; }; then
15517   cf_cv_have_errno=yes
15518 else
15519   echo "$as_me: failed program was:" >&5
15520 cat conftest.$ac_ext >&5
15521 cf_cv_have_errno=no
15522 fi
15523 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15524
15525 fi
15526 echo "$as_me:15526: result: $cf_cv_have_errno" >&5
15527 echo "${ECHO_T}$cf_cv_have_errno" >&6
15528
15529 if test "$cf_cv_have_errno" = yes ; then
15530
15531 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15532
15533     cat >>confdefs.h <<EOF
15534 #define $cf_result 1
15535 EOF
15536
15537 fi
15538
15539 echo "$as_me:15539: checking if data-only library module links" >&5
15540 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15541 if test "${cf_cv_link_dataonly+set}" = set; then
15542   echo $ECHO_N "(cached) $ECHO_C" >&6
15543 else
15544
15545         rm -f conftest.a
15546         cat >conftest.$ac_ext <<EOF
15547 #line 15547 "configure"
15548 int     testdata[3] = { 123, 456, 789 };
15549 EOF
15550         if { (eval echo "$as_me:15550: \"$ac_compile\"") >&5
15551   (eval $ac_compile) 2>&5
15552   ac_status=$?
15553   echo "$as_me:15553: \$? = $ac_status" >&5
15554   (exit $ac_status); } ; then
15555                 mv conftest.o data.o && \
15556                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15557         fi
15558         rm -f conftest.$ac_ext data.o
15559         cat >conftest.$ac_ext <<EOF
15560 #line 15560 "configure"
15561 int     testfunc()
15562 {
15563 #if defined(NeXT)
15564         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15565 #else
15566         extern int testdata[3];
15567         return testdata[0] == 123
15568            &&  testdata[1] == 456
15569            &&  testdata[2] == 789;
15570 #endif
15571 }
15572 EOF
15573         if { (eval echo "$as_me:15573: \"$ac_compile\"") >&5
15574   (eval $ac_compile) 2>&5
15575   ac_status=$?
15576   echo "$as_me:15576: \$? = $ac_status" >&5
15577   (exit $ac_status); }; then
15578                 mv conftest.o func.o && \
15579                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15580         fi
15581         rm -f conftest.$ac_ext func.o
15582         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15583         cf_saveLIBS="$LIBS"
15584         LIBS="conftest.a $LIBS"
15585         if test "$cross_compiling" = yes; then
15586   cf_cv_link_dataonly=unknown
15587 else
15588   cat >conftest.$ac_ext <<_ACEOF
15589 #line 15589 "configure"
15590 #include "confdefs.h"
15591
15592         int main()
15593         {
15594                 extern int testfunc();
15595                 ${cf_cv_main_return:-return} (!testfunc());
15596         }
15597
15598 _ACEOF
15599 rm -f conftest$ac_exeext
15600 if { (eval echo "$as_me:15600: \"$ac_link\"") >&5
15601   (eval $ac_link) 2>&5
15602   ac_status=$?
15603   echo "$as_me:15603: \$? = $ac_status" >&5
15604   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15605   { (eval echo "$as_me:15605: \"$ac_try\"") >&5
15606   (eval $ac_try) 2>&5
15607   ac_status=$?
15608   echo "$as_me:15608: \$? = $ac_status" >&5
15609   (exit $ac_status); }; }; then
15610   cf_cv_link_dataonly=yes
15611 else
15612   echo "$as_me: program exited with status $ac_status" >&5
15613 echo "$as_me: failed program was:" >&5
15614 cat conftest.$ac_ext >&5
15615 cf_cv_link_dataonly=no
15616 fi
15617 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15618 fi
15619         LIBS="$cf_saveLIBS"
15620
15621 fi
15622
15623 echo "$as_me:15623: result: $cf_cv_link_dataonly" >&5
15624 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15625
15626 if test "$cf_cv_link_dataonly" = no ; then
15627
15628 cat >>confdefs.h <<\EOF
15629 #define BROKEN_LINKER 1
15630 EOF
15631
15632         BROKEN_LINKER=1
15633 fi
15634
15635 ###     Checks for library functions.
15636
15637 for ac_func in \
15638 getcwd \
15639 getegid \
15640 geteuid \
15641 getttynam \
15642 issetugid \
15643 poll \
15644 putenv \
15645 remove \
15646 select \
15647 setbuf \
15648 setbuffer \
15649 setenv \
15650 setvbuf \
15651 sigaction \
15652 sigvec \
15653 strdup \
15654 strstr \
15655 tcgetpgrp \
15656 times \
15657 vsnprintf \
15658
15659 do
15660 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15661 echo "$as_me:15661: checking for $ac_func" >&5
15662 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15663 if eval "test \"\${$as_ac_var+set}\" = set"; then
15664   echo $ECHO_N "(cached) $ECHO_C" >&6
15665 else
15666   cat >conftest.$ac_ext <<_ACEOF
15667 #line 15667 "configure"
15668 #include "confdefs.h"
15669 /* System header to define __stub macros and hopefully few prototypes,
15670     which can conflict with char $ac_func (); below.  */
15671 #include <assert.h>
15672 /* Override any gcc2 internal prototype to avoid an error.  */
15673 #ifdef __cplusplus
15674 extern "C"
15675 #endif
15676 /* We use char because int might match the return type of a gcc2
15677    builtin and then its argument prototype would still apply.  */
15678 char $ac_func ();
15679 char (*f) ();
15680
15681 int
15682 main ()
15683 {
15684 /* The GNU C library defines this for functions which it implements
15685     to always fail with ENOSYS.  Some functions are actually named
15686     something starting with __ and the normal name is an alias.  */
15687 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15688 choke me
15689 #else
15690 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15691 #endif
15692
15693   ;
15694   return 0;
15695 }
15696 _ACEOF
15697 rm -f conftest.$ac_objext conftest$ac_exeext
15698 if { (eval echo "$as_me:15698: \"$ac_link\"") >&5
15699   (eval $ac_link) 2>&5
15700   ac_status=$?
15701   echo "$as_me:15701: \$? = $ac_status" >&5
15702   (exit $ac_status); } &&
15703          { ac_try='test -s conftest$ac_exeext'
15704   { (eval echo "$as_me:15704: \"$ac_try\"") >&5
15705   (eval $ac_try) 2>&5
15706   ac_status=$?
15707   echo "$as_me:15707: \$? = $ac_status" >&5
15708   (exit $ac_status); }; }; then
15709   eval "$as_ac_var=yes"
15710 else
15711   echo "$as_me: failed program was:" >&5
15712 cat conftest.$ac_ext >&5
15713 eval "$as_ac_var=no"
15714 fi
15715 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15716 fi
15717 echo "$as_me:15717: result: `eval echo '${'$as_ac_var'}'`" >&5
15718 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15719 if test `eval echo '${'$as_ac_var'}'` = yes; then
15720   cat >>confdefs.h <<EOF
15721 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15722 EOF
15723
15724 fi
15725 done
15726
15727 if test "x$with_getcap" = "xyes" ; then
15728
15729 echo "$as_me:15729: checking for terminal-capability database functions" >&5
15730 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15731 if test "${cf_cv_cgetent+set}" = set; then
15732   echo $ECHO_N "(cached) $ECHO_C" >&6
15733 else
15734
15735 cat >conftest.$ac_ext <<_ACEOF
15736 #line 15736 "configure"
15737 #include "confdefs.h"
15738
15739 #include <stdlib.h>
15740 int
15741 main ()
15742 {
15743
15744         char temp[128];
15745         char *buf = temp;
15746         char *db_array = temp;
15747         cgetent(&buf, &db_array, "vt100");
15748         cgetcap(buf, "tc", '=');
15749         cgetmatch(buf, "tc");
15750
15751   ;
15752   return 0;
15753 }
15754 _ACEOF
15755 rm -f conftest.$ac_objext conftest$ac_exeext
15756 if { (eval echo "$as_me:15756: \"$ac_link\"") >&5
15757   (eval $ac_link) 2>&5
15758   ac_status=$?
15759   echo "$as_me:15759: \$? = $ac_status" >&5
15760   (exit $ac_status); } &&
15761          { ac_try='test -s conftest$ac_exeext'
15762   { (eval echo "$as_me:15762: \"$ac_try\"") >&5
15763   (eval $ac_try) 2>&5
15764   ac_status=$?
15765   echo "$as_me:15765: \$? = $ac_status" >&5
15766   (exit $ac_status); }; }; then
15767   cf_cv_cgetent=yes
15768 else
15769   echo "$as_me: failed program was:" >&5
15770 cat conftest.$ac_ext >&5
15771 cf_cv_cgetent=no
15772 fi
15773 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15774
15775 fi
15776 echo "$as_me:15776: result: $cf_cv_cgetent" >&5
15777 echo "${ECHO_T}$cf_cv_cgetent" >&6
15778
15779 if test "$cf_cv_cgetent" = yes
15780 then
15781
15782 cat >>confdefs.h <<\EOF
15783 #define HAVE_BSD_CGETENT 1
15784 EOF
15785
15786 echo "$as_me:15786: checking if cgetent uses const parameter" >&5
15787 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15788 if test "${cf_cv_cgetent_const+set}" = set; then
15789   echo $ECHO_N "(cached) $ECHO_C" >&6
15790 else
15791
15792 cat >conftest.$ac_ext <<_ACEOF
15793 #line 15793 "configure"
15794 #include "confdefs.h"
15795
15796 #include <stdlib.h>
15797 int
15798 main ()
15799 {
15800
15801         char temp[128];
15802         char *buf = temp;
15803 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15804         const char *db_array = temp;
15805         cgetent(&buf, &db_array, "vt100");
15806 #endif
15807         cgetcap(buf, "tc", '=');
15808         cgetmatch(buf, "tc");
15809
15810   ;
15811   return 0;
15812 }
15813 _ACEOF
15814 rm -f conftest.$ac_objext conftest$ac_exeext
15815 if { (eval echo "$as_me:15815: \"$ac_link\"") >&5
15816   (eval $ac_link) 2>&5
15817   ac_status=$?
15818   echo "$as_me:15818: \$? = $ac_status" >&5
15819   (exit $ac_status); } &&
15820          { ac_try='test -s conftest$ac_exeext'
15821   { (eval echo "$as_me:15821: \"$ac_try\"") >&5
15822   (eval $ac_try) 2>&5
15823   ac_status=$?
15824   echo "$as_me:15824: \$? = $ac_status" >&5
15825   (exit $ac_status); }; }; then
15826   cf_cv_cgetent_const=yes
15827 else
15828   echo "$as_me: failed program was:" >&5
15829 cat conftest.$ac_ext >&5
15830 cf_cv_cgetent_const=no
15831 fi
15832 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15833
15834 fi
15835 echo "$as_me:15835: result: $cf_cv_cgetent_const" >&5
15836 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15837         if test "$cf_cv_cgetent_const" = yes
15838         then
15839
15840 cat >>confdefs.h <<EOF
15841 #define CGETENT_CONST const
15842 EOF
15843
15844         fi
15845 fi
15846
15847 fi
15848
15849 echo "$as_me:15849: checking for isascii" >&5
15850 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15851 if test "${cf_cv_have_isascii+set}" = set; then
15852   echo $ECHO_N "(cached) $ECHO_C" >&6
15853 else
15854
15855         cat >conftest.$ac_ext <<_ACEOF
15856 #line 15856 "configure"
15857 #include "confdefs.h"
15858 #include <ctype.h>
15859 int
15860 main ()
15861 {
15862 int x = isascii(' ')
15863   ;
15864   return 0;
15865 }
15866 _ACEOF
15867 rm -f conftest.$ac_objext conftest$ac_exeext
15868 if { (eval echo "$as_me:15868: \"$ac_link\"") >&5
15869   (eval $ac_link) 2>&5
15870   ac_status=$?
15871   echo "$as_me:15871: \$? = $ac_status" >&5
15872   (exit $ac_status); } &&
15873          { ac_try='test -s conftest$ac_exeext'
15874   { (eval echo "$as_me:15874: \"$ac_try\"") >&5
15875   (eval $ac_try) 2>&5
15876   ac_status=$?
15877   echo "$as_me:15877: \$? = $ac_status" >&5
15878   (exit $ac_status); }; }; then
15879   cf_cv_have_isascii=yes
15880 else
15881   echo "$as_me: failed program was:" >&5
15882 cat conftest.$ac_ext >&5
15883 cf_cv_have_isascii=no
15884 fi
15885 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15886
15887 fi
15888 echo "$as_me:15888: result: $cf_cv_have_isascii" >&5
15889 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15890 test "$cf_cv_have_isascii" = yes &&
15891 cat >>confdefs.h <<\EOF
15892 #define HAVE_ISASCII 1
15893 EOF
15894
15895 if test "$ac_cv_func_sigaction" = yes; then
15896 echo "$as_me:15896: checking whether sigaction needs _POSIX_SOURCE" >&5
15897 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15898 cat >conftest.$ac_ext <<_ACEOF
15899 #line 15899 "configure"
15900 #include "confdefs.h"
15901
15902 #include <sys/types.h>
15903 #include <signal.h>
15904 int
15905 main ()
15906 {
15907 struct sigaction act
15908   ;
15909   return 0;
15910 }
15911 _ACEOF
15912 rm -f conftest.$ac_objext
15913 if { (eval echo "$as_me:15913: \"$ac_compile\"") >&5
15914   (eval $ac_compile) 2>&5
15915   ac_status=$?
15916   echo "$as_me:15916: \$? = $ac_status" >&5
15917   (exit $ac_status); } &&
15918          { ac_try='test -s conftest.$ac_objext'
15919   { (eval echo "$as_me:15919: \"$ac_try\"") >&5
15920   (eval $ac_try) 2>&5
15921   ac_status=$?
15922   echo "$as_me:15922: \$? = $ac_status" >&5
15923   (exit $ac_status); }; }; then
15924   sigact_bad=no
15925 else
15926   echo "$as_me: failed program was:" >&5
15927 cat conftest.$ac_ext >&5
15928
15929 cat >conftest.$ac_ext <<_ACEOF
15930 #line 15930 "configure"
15931 #include "confdefs.h"
15932
15933 #define _POSIX_SOURCE
15934 #include <sys/types.h>
15935 #include <signal.h>
15936 int
15937 main ()
15938 {
15939 struct sigaction act
15940   ;
15941   return 0;
15942 }
15943 _ACEOF
15944 rm -f conftest.$ac_objext
15945 if { (eval echo "$as_me:15945: \"$ac_compile\"") >&5
15946   (eval $ac_compile) 2>&5
15947   ac_status=$?
15948   echo "$as_me:15948: \$? = $ac_status" >&5
15949   (exit $ac_status); } &&
15950          { ac_try='test -s conftest.$ac_objext'
15951   { (eval echo "$as_me:15951: \"$ac_try\"") >&5
15952   (eval $ac_try) 2>&5
15953   ac_status=$?
15954   echo "$as_me:15954: \$? = $ac_status" >&5
15955   (exit $ac_status); }; }; then
15956   sigact_bad=yes
15957
15958 cat >>confdefs.h <<\EOF
15959 #define _POSIX_SOURCE 1
15960 EOF
15961
15962 else
15963   echo "$as_me: failed program was:" >&5
15964 cat conftest.$ac_ext >&5
15965 sigact_bad=unknown
15966 fi
15967 rm -f conftest.$ac_objext conftest.$ac_ext
15968 fi
15969 rm -f conftest.$ac_objext conftest.$ac_ext
15970 echo "$as_me:15970: result: $sigact_bad" >&5
15971 echo "${ECHO_T}$sigact_bad" >&6
15972 fi
15973
15974 echo "$as_me:15974: checking if nanosleep really works" >&5
15975 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15976 if test "${cf_cv_func_nanosleep+set}" = set; then
15977   echo $ECHO_N "(cached) $ECHO_C" >&6
15978 else
15979
15980 if test "$cross_compiling" = yes; then
15981   cf_cv_func_nanosleep=unknown
15982 else
15983   cat >conftest.$ac_ext <<_ACEOF
15984 #line 15984 "configure"
15985 #include "confdefs.h"
15986
15987 #include <stdio.h>
15988 #include <errno.h>
15989 #include <time.h>
15990
15991 #ifdef HAVE_SYS_TIME_H
15992 #include <sys/time.h>
15993 #endif
15994
15995 int main() {
15996         struct timespec ts1, ts2;
15997         int code;
15998         ts1.tv_sec  = 0;
15999         ts1.tv_nsec = 750000000;
16000         ts2.tv_sec  = 0;
16001         ts2.tv_nsec = 0;
16002         errno = 0;
16003         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16004         ${cf_cv_main_return:-return}(code != 0);
16005 }
16006
16007 _ACEOF
16008 rm -f conftest$ac_exeext
16009 if { (eval echo "$as_me:16009: \"$ac_link\"") >&5
16010   (eval $ac_link) 2>&5
16011   ac_status=$?
16012   echo "$as_me:16012: \$? = $ac_status" >&5
16013   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16014   { (eval echo "$as_me:16014: \"$ac_try\"") >&5
16015   (eval $ac_try) 2>&5
16016   ac_status=$?
16017   echo "$as_me:16017: \$? = $ac_status" >&5
16018   (exit $ac_status); }; }; then
16019   cf_cv_func_nanosleep=yes
16020 else
16021   echo "$as_me: program exited with status $ac_status" >&5
16022 echo "$as_me: failed program was:" >&5
16023 cat conftest.$ac_ext >&5
16024 cf_cv_func_nanosleep=no
16025 fi
16026 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16027 fi
16028 fi
16029 echo "$as_me:16029: result: $cf_cv_func_nanosleep" >&5
16030 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16031
16032 test "$cf_cv_func_nanosleep" = "yes" &&
16033 cat >>confdefs.h <<\EOF
16034 #define HAVE_NANOSLEEP 1
16035 EOF
16036
16037 for ac_header in \
16038 termio.h \
16039 termios.h \
16040 unistd.h \
16041
16042 do
16043 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16044 echo "$as_me:16044: checking for $ac_header" >&5
16045 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16046 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16047   echo $ECHO_N "(cached) $ECHO_C" >&6
16048 else
16049   cat >conftest.$ac_ext <<_ACEOF
16050 #line 16050 "configure"
16051 #include "confdefs.h"
16052 #include <$ac_header>
16053 _ACEOF
16054 if { (eval echo "$as_me:16054: \"$ac_cpp conftest.$ac_ext\"") >&5
16055   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16056   ac_status=$?
16057   egrep -v '^ *\+' conftest.er1 >conftest.err
16058   rm -f conftest.er1
16059   cat conftest.err >&5
16060   echo "$as_me:16060: \$? = $ac_status" >&5
16061   (exit $ac_status); } >/dev/null; then
16062   if test -s conftest.err; then
16063     ac_cpp_err=$ac_c_preproc_warn_flag
16064   else
16065     ac_cpp_err=
16066   fi
16067 else
16068   ac_cpp_err=yes
16069 fi
16070 if test -z "$ac_cpp_err"; then
16071   eval "$as_ac_Header=yes"
16072 else
16073   echo "$as_me: failed program was:" >&5
16074   cat conftest.$ac_ext >&5
16075   eval "$as_ac_Header=no"
16076 fi
16077 rm -f conftest.err conftest.$ac_ext
16078 fi
16079 echo "$as_me:16079: result: `eval echo '${'$as_ac_Header'}'`" >&5
16080 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16081 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16082   cat >>confdefs.h <<EOF
16083 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16084 EOF
16085
16086 fi
16087 done
16088
16089 if test "$ISC" = yes ; then
16090
16091 for ac_header in sys/termio.h
16092 do
16093 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16094 echo "$as_me:16094: checking for $ac_header" >&5
16095 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16096 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16097   echo $ECHO_N "(cached) $ECHO_C" >&6
16098 else
16099   cat >conftest.$ac_ext <<_ACEOF
16100 #line 16100 "configure"
16101 #include "confdefs.h"
16102 #include <$ac_header>
16103 _ACEOF
16104 if { (eval echo "$as_me:16104: \"$ac_cpp conftest.$ac_ext\"") >&5
16105   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16106   ac_status=$?
16107   egrep -v '^ *\+' conftest.er1 >conftest.err
16108   rm -f conftest.er1
16109   cat conftest.err >&5
16110   echo "$as_me:16110: \$? = $ac_status" >&5
16111   (exit $ac_status); } >/dev/null; then
16112   if test -s conftest.err; then
16113     ac_cpp_err=$ac_c_preproc_warn_flag
16114   else
16115     ac_cpp_err=
16116   fi
16117 else
16118   ac_cpp_err=yes
16119 fi
16120 if test -z "$ac_cpp_err"; then
16121   eval "$as_ac_Header=yes"
16122 else
16123   echo "$as_me: failed program was:" >&5
16124   cat conftest.$ac_ext >&5
16125   eval "$as_ac_Header=no"
16126 fi
16127 rm -f conftest.err conftest.$ac_ext
16128 fi
16129 echo "$as_me:16129: result: `eval echo '${'$as_ac_Header'}'`" >&5
16130 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16131 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16132   cat >>confdefs.h <<EOF
16133 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16134 EOF
16135
16136 fi
16137 done
16138
16139 fi
16140 if test "$ac_cv_header_termios_h" = yes ; then
16141         case "$CFLAGS $CPPFLAGS" in
16142         *-D_POSIX_SOURCE*)
16143                 termios_bad=dunno ;;
16144         *)      termios_bad=maybe ;;
16145         esac
16146         if test "$termios_bad" = maybe ; then
16147         echo "$as_me:16147: checking whether termios.h needs _POSIX_SOURCE" >&5
16148 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16149         cat >conftest.$ac_ext <<_ACEOF
16150 #line 16150 "configure"
16151 #include "confdefs.h"
16152 #include <termios.h>
16153 int
16154 main ()
16155 {
16156 struct termios foo; int x = foo.c_iflag
16157   ;
16158   return 0;
16159 }
16160 _ACEOF
16161 rm -f conftest.$ac_objext
16162 if { (eval echo "$as_me:16162: \"$ac_compile\"") >&5
16163   (eval $ac_compile) 2>&5
16164   ac_status=$?
16165   echo "$as_me:16165: \$? = $ac_status" >&5
16166   (exit $ac_status); } &&
16167          { ac_try='test -s conftest.$ac_objext'
16168   { (eval echo "$as_me:16168: \"$ac_try\"") >&5
16169   (eval $ac_try) 2>&5
16170   ac_status=$?
16171   echo "$as_me:16171: \$? = $ac_status" >&5
16172   (exit $ac_status); }; }; then
16173   termios_bad=no
16174 else
16175   echo "$as_me: failed program was:" >&5
16176 cat conftest.$ac_ext >&5
16177
16178                 cat >conftest.$ac_ext <<_ACEOF
16179 #line 16179 "configure"
16180 #include "confdefs.h"
16181
16182 #define _POSIX_SOURCE
16183 #include <termios.h>
16184 int
16185 main ()
16186 {
16187 struct termios foo; int x = foo.c_iflag
16188   ;
16189   return 0;
16190 }
16191 _ACEOF
16192 rm -f conftest.$ac_objext
16193 if { (eval echo "$as_me:16193: \"$ac_compile\"") >&5
16194   (eval $ac_compile) 2>&5
16195   ac_status=$?
16196   echo "$as_me:16196: \$? = $ac_status" >&5
16197   (exit $ac_status); } &&
16198          { ac_try='test -s conftest.$ac_objext'
16199   { (eval echo "$as_me:16199: \"$ac_try\"") >&5
16200   (eval $ac_try) 2>&5
16201   ac_status=$?
16202   echo "$as_me:16202: \$? = $ac_status" >&5
16203   (exit $ac_status); }; }; then
16204   termios_bad=unknown
16205 else
16206   echo "$as_me: failed program was:" >&5
16207 cat conftest.$ac_ext >&5
16208 termios_bad=yes
16209 cat >>confdefs.h <<\EOF
16210 #define _POSIX_SOURCE 1
16211 EOF
16212
16213 fi
16214 rm -f conftest.$ac_objext conftest.$ac_ext
16215
16216 fi
16217 rm -f conftest.$ac_objext conftest.$ac_ext
16218         echo "$as_me:16218: result: $termios_bad" >&5
16219 echo "${ECHO_T}$termios_bad" >&6
16220         fi
16221 fi
16222
16223 echo "$as_me:16223: checking for tcgetattr" >&5
16224 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16225 if test "${cf_cv_have_tcgetattr+set}" = set; then
16226   echo $ECHO_N "(cached) $ECHO_C" >&6
16227 else
16228
16229 cat >conftest.$ac_ext <<_ACEOF
16230 #line 16230 "configure"
16231 #include "confdefs.h"
16232
16233 #include <sys/types.h>
16234 #ifdef HAVE_UNISTD_H
16235 #include <unistd.h>
16236 #endif
16237 #ifdef HAVE_TERMIOS_H
16238 #include <termios.h>
16239 #define TTY struct termios
16240 #else
16241 #ifdef HAVE_TERMIO_H
16242 #include <termio.h>
16243 #define TTY struct termio
16244 #endif
16245 #endif
16246
16247 int
16248 main ()
16249 {
16250
16251 TTY foo;
16252 tcgetattr(1, &foo);
16253   ;
16254   return 0;
16255 }
16256 _ACEOF
16257 rm -f conftest.$ac_objext conftest$ac_exeext
16258 if { (eval echo "$as_me:16258: \"$ac_link\"") >&5
16259   (eval $ac_link) 2>&5
16260   ac_status=$?
16261   echo "$as_me:16261: \$? = $ac_status" >&5
16262   (exit $ac_status); } &&
16263          { ac_try='test -s conftest$ac_exeext'
16264   { (eval echo "$as_me:16264: \"$ac_try\"") >&5
16265   (eval $ac_try) 2>&5
16266   ac_status=$?
16267   echo "$as_me:16267: \$? = $ac_status" >&5
16268   (exit $ac_status); }; }; then
16269   cf_cv_have_tcgetattr=yes
16270 else
16271   echo "$as_me: failed program was:" >&5
16272 cat conftest.$ac_ext >&5
16273 cf_cv_have_tcgetattr=no
16274 fi
16275 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16276 fi
16277 echo "$as_me:16277: result: $cf_cv_have_tcgetattr" >&5
16278 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16279 test "$cf_cv_have_tcgetattr" = yes &&
16280 cat >>confdefs.h <<\EOF
16281 #define HAVE_TCGETATTR 1
16282 EOF
16283
16284 echo "$as_me:16284: checking for vsscanf function or workaround" >&5
16285 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16286 if test "${cf_cv_func_vsscanf+set}" = set; then
16287   echo $ECHO_N "(cached) $ECHO_C" >&6
16288 else
16289
16290 cat >conftest.$ac_ext <<_ACEOF
16291 #line 16291 "configure"
16292 #include "confdefs.h"
16293
16294 #include <stdarg.h>
16295 #include <stdio.h>
16296 int
16297 main ()
16298 {
16299
16300         va_list ap;
16301         vsscanf("from", "%d", ap)
16302   ;
16303   return 0;
16304 }
16305 _ACEOF
16306 rm -f conftest.$ac_objext conftest$ac_exeext
16307 if { (eval echo "$as_me:16307: \"$ac_link\"") >&5
16308   (eval $ac_link) 2>&5
16309   ac_status=$?
16310   echo "$as_me:16310: \$? = $ac_status" >&5
16311   (exit $ac_status); } &&
16312          { ac_try='test -s conftest$ac_exeext'
16313   { (eval echo "$as_me:16313: \"$ac_try\"") >&5
16314   (eval $ac_try) 2>&5
16315   ac_status=$?
16316   echo "$as_me:16316: \$? = $ac_status" >&5
16317   (exit $ac_status); }; }; then
16318   cf_cv_func_vsscanf=vsscanf
16319 else
16320   echo "$as_me: failed program was:" >&5
16321 cat conftest.$ac_ext >&5
16322
16323 cat >conftest.$ac_ext <<_ACEOF
16324 #line 16324 "configure"
16325 #include "confdefs.h"
16326
16327 #include <stdarg.h>
16328 #include <stdio.h>
16329 int
16330 main ()
16331 {
16332
16333     FILE strbuf;
16334     char *str = "from";
16335
16336     strbuf._flag = _IOREAD;
16337     strbuf._ptr = strbuf._base = (unsigned char *) str;
16338     strbuf._cnt = strlen(str);
16339     strbuf._file = _NFILE;
16340     return (vfscanf(&strbuf, "%d", ap))
16341   ;
16342   return 0;
16343 }
16344 _ACEOF
16345 rm -f conftest.$ac_objext conftest$ac_exeext
16346 if { (eval echo "$as_me:16346: \"$ac_link\"") >&5
16347   (eval $ac_link) 2>&5
16348   ac_status=$?
16349   echo "$as_me:16349: \$? = $ac_status" >&5
16350   (exit $ac_status); } &&
16351          { ac_try='test -s conftest$ac_exeext'
16352   { (eval echo "$as_me:16352: \"$ac_try\"") >&5
16353   (eval $ac_try) 2>&5
16354   ac_status=$?
16355   echo "$as_me:16355: \$? = $ac_status" >&5
16356   (exit $ac_status); }; }; then
16357   cf_cv_func_vsscanf=vfscanf
16358 else
16359   echo "$as_me: failed program was:" >&5
16360 cat conftest.$ac_ext >&5
16361
16362 cat >conftest.$ac_ext <<_ACEOF
16363 #line 16363 "configure"
16364 #include "confdefs.h"
16365
16366 #include <stdarg.h>
16367 #include <stdio.h>
16368 int
16369 main ()
16370 {
16371
16372     FILE strbuf;
16373     char *str = "from";
16374
16375     strbuf._flag = _IOREAD;
16376     strbuf._ptr = strbuf._base = (unsigned char *) str;
16377     strbuf._cnt = strlen(str);
16378     strbuf._file = _NFILE;
16379     return (_doscan(&strbuf, "%d", ap))
16380   ;
16381   return 0;
16382 }
16383 _ACEOF
16384 rm -f conftest.$ac_objext conftest$ac_exeext
16385 if { (eval echo "$as_me:16385: \"$ac_link\"") >&5
16386   (eval $ac_link) 2>&5
16387   ac_status=$?
16388   echo "$as_me:16388: \$? = $ac_status" >&5
16389   (exit $ac_status); } &&
16390          { ac_try='test -s conftest$ac_exeext'
16391   { (eval echo "$as_me:16391: \"$ac_try\"") >&5
16392   (eval $ac_try) 2>&5
16393   ac_status=$?
16394   echo "$as_me:16394: \$? = $ac_status" >&5
16395   (exit $ac_status); }; }; then
16396   cf_cv_func_vsscanf=_doscan
16397 else
16398   echo "$as_me: failed program was:" >&5
16399 cat conftest.$ac_ext >&5
16400
16401 cf_cv_func_vsscanf=no
16402 fi
16403 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16404 fi
16405 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16406 fi
16407 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16408 fi
16409 echo "$as_me:16409: result: $cf_cv_func_vsscanf" >&5
16410 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16411
16412 case $cf_cv_func_vsscanf in #(vi
16413 vsscanf)
16414 cat >>confdefs.h <<\EOF
16415 #define HAVE_VSSCANF 1
16416 EOF
16417 ;; #(vi
16418 vfscanf)
16419 cat >>confdefs.h <<\EOF
16420 #define HAVE_VFSCANF 1
16421 EOF
16422 ;; #(vi
16423 _doscan)
16424 cat >>confdefs.h <<\EOF
16425 #define HAVE__DOSCAN 1
16426 EOF
16427 ;;
16428 esac
16429
16430 echo "$as_me:16430: checking for working mkstemp" >&5
16431 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16432 if test "${cf_cv_func_mkstemp+set}" = set; then
16433   echo $ECHO_N "(cached) $ECHO_C" >&6
16434 else
16435
16436 rm -rf conftest*
16437 if test "$cross_compiling" = yes; then
16438   cf_cv_func_mkstemp=maybe
16439 else
16440   cat >conftest.$ac_ext <<_ACEOF
16441 #line 16441 "configure"
16442 #include "confdefs.h"
16443
16444 #include <sys/types.h>
16445 #include <stdlib.h>
16446 #include <stdio.h>
16447 #include <string.h>
16448 #include <sys/stat.h>
16449 int main()
16450 {
16451         char *tmpl = "conftestXXXXXX";
16452         char name[2][80];
16453         int n;
16454         int result = 0;
16455         int fd;
16456         struct stat sb;
16457
16458         umask(077);
16459         for (n = 0; n < 2; ++n) {
16460                 strcpy(name[n], tmpl);
16461                 if ((fd = mkstemp(name[n])) >= 0) {
16462                         if (!strcmp(name[n], tmpl)
16463                          || stat(name[n], &sb) != 0
16464                          || (sb.st_mode & S_IFMT) != S_IFREG
16465                          || (sb.st_mode & 077) != 0) {
16466                                 result = 1;
16467                         }
16468                         close(fd);
16469                 }
16470         }
16471         if (result == 0
16472          && !strcmp(name[0], name[1]))
16473                 result = 1;
16474         ${cf_cv_main_return:-return}(result);
16475 }
16476
16477 _ACEOF
16478 rm -f conftest$ac_exeext
16479 if { (eval echo "$as_me:16479: \"$ac_link\"") >&5
16480   (eval $ac_link) 2>&5
16481   ac_status=$?
16482   echo "$as_me:16482: \$? = $ac_status" >&5
16483   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16484   { (eval echo "$as_me:16484: \"$ac_try\"") >&5
16485   (eval $ac_try) 2>&5
16486   ac_status=$?
16487   echo "$as_me:16487: \$? = $ac_status" >&5
16488   (exit $ac_status); }; }; then
16489   cf_cv_func_mkstemp=yes
16490
16491 else
16492   echo "$as_me: program exited with status $ac_status" >&5
16493 echo "$as_me: failed program was:" >&5
16494 cat conftest.$ac_ext >&5
16495 cf_cv_func_mkstemp=no
16496
16497 fi
16498 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16499 fi
16500
16501 fi
16502 echo "$as_me:16502: result: $cf_cv_func_mkstemp" >&5
16503 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16504 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16505         echo "$as_me:16505: checking for mkstemp" >&5
16506 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16507 if test "${ac_cv_func_mkstemp+set}" = set; then
16508   echo $ECHO_N "(cached) $ECHO_C" >&6
16509 else
16510   cat >conftest.$ac_ext <<_ACEOF
16511 #line 16511 "configure"
16512 #include "confdefs.h"
16513 /* System header to define __stub macros and hopefully few prototypes,
16514     which can conflict with char mkstemp (); below.  */
16515 #include <assert.h>
16516 /* Override any gcc2 internal prototype to avoid an error.  */
16517 #ifdef __cplusplus
16518 extern "C"
16519 #endif
16520 /* We use char because int might match the return type of a gcc2
16521    builtin and then its argument prototype would still apply.  */
16522 char mkstemp ();
16523 char (*f) ();
16524
16525 int
16526 main ()
16527 {
16528 /* The GNU C library defines this for functions which it implements
16529     to always fail with ENOSYS.  Some functions are actually named
16530     something starting with __ and the normal name is an alias.  */
16531 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16532 choke me
16533 #else
16534 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16535 #endif
16536
16537   ;
16538   return 0;
16539 }
16540 _ACEOF
16541 rm -f conftest.$ac_objext conftest$ac_exeext
16542 if { (eval echo "$as_me:16542: \"$ac_link\"") >&5
16543   (eval $ac_link) 2>&5
16544   ac_status=$?
16545   echo "$as_me:16545: \$? = $ac_status" >&5
16546   (exit $ac_status); } &&
16547          { ac_try='test -s conftest$ac_exeext'
16548   { (eval echo "$as_me:16548: \"$ac_try\"") >&5
16549   (eval $ac_try) 2>&5
16550   ac_status=$?
16551   echo "$as_me:16551: \$? = $ac_status" >&5
16552   (exit $ac_status); }; }; then
16553   ac_cv_func_mkstemp=yes
16554 else
16555   echo "$as_me: failed program was:" >&5
16556 cat conftest.$ac_ext >&5
16557 ac_cv_func_mkstemp=no
16558 fi
16559 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16560 fi
16561 echo "$as_me:16561: result: $ac_cv_func_mkstemp" >&5
16562 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16563
16564 fi
16565 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16566
16567 cat >>confdefs.h <<\EOF
16568 #define HAVE_MKSTEMP 1
16569 EOF
16570
16571 fi
16572
16573 # setup for prototype of fallback for vsscanf()
16574
16575 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16576         HAVE_VSSCANF=1
16577 else
16578         HAVE_VSSCANF=0
16579 fi
16580
16581 if test "x$cross_compiling" = xyes ; then
16582         { echo "$as_me:16582: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16583 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16584 else
16585         echo "$as_me:16585: checking whether setvbuf arguments are reversed" >&5
16586 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16587 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16588   echo $ECHO_N "(cached) $ECHO_C" >&6
16589 else
16590   if test "$cross_compiling" = yes; then
16591   { { echo "$as_me:16591: error: cannot run test program while cross compiling" >&5
16592 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16593    { (exit 1); exit 1; }; }
16594 else
16595   cat >conftest.$ac_ext <<_ACEOF
16596 #line 16596 "configure"
16597 #include "confdefs.h"
16598 #include <stdio.h>
16599 /* If setvbuf has the reversed format, exit 0. */
16600 int
16601 main ()
16602 {
16603   /* This call has the arguments reversed.
16604      A reversed system may check and see that the address of main
16605      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16606   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16607     $ac_main_return(1);
16608   putc('\r', stdout);
16609   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16610 }
16611 _ACEOF
16612 rm -f conftest$ac_exeext
16613 if { (eval echo "$as_me:16613: \"$ac_link\"") >&5
16614   (eval $ac_link) 2>&5
16615   ac_status=$?
16616   echo "$as_me:16616: \$? = $ac_status" >&5
16617   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16618   { (eval echo "$as_me:16618: \"$ac_try\"") >&5
16619   (eval $ac_try) 2>&5
16620   ac_status=$?
16621   echo "$as_me:16621: \$? = $ac_status" >&5
16622   (exit $ac_status); }; }; then
16623   ac_cv_func_setvbuf_reversed=yes
16624 else
16625   echo "$as_me: program exited with status $ac_status" >&5
16626 echo "$as_me: failed program was:" >&5
16627 cat conftest.$ac_ext >&5
16628 ac_cv_func_setvbuf_reversed=no
16629 fi
16630 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16631 fi
16632 rm -f core core.* *.core
16633 fi
16634 echo "$as_me:16634: result: $ac_cv_func_setvbuf_reversed" >&5
16635 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16636 if test $ac_cv_func_setvbuf_reversed = yes; then
16637
16638 cat >>confdefs.h <<\EOF
16639 #define SETVBUF_REVERSED 1
16640 EOF
16641
16642 fi
16643
16644 fi
16645 echo "$as_me:16645: checking for intptr_t" >&5
16646 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16647 if test "${ac_cv_type_intptr_t+set}" = set; then
16648   echo $ECHO_N "(cached) $ECHO_C" >&6
16649 else
16650   cat >conftest.$ac_ext <<_ACEOF
16651 #line 16651 "configure"
16652 #include "confdefs.h"
16653 $ac_includes_default
16654 int
16655 main ()
16656 {
16657 if ((intptr_t *) 0)
16658   return 0;
16659 if (sizeof (intptr_t))
16660   return 0;
16661   ;
16662   return 0;
16663 }
16664 _ACEOF
16665 rm -f conftest.$ac_objext
16666 if { (eval echo "$as_me:16666: \"$ac_compile\"") >&5
16667   (eval $ac_compile) 2>&5
16668   ac_status=$?
16669   echo "$as_me:16669: \$? = $ac_status" >&5
16670   (exit $ac_status); } &&
16671          { ac_try='test -s conftest.$ac_objext'
16672   { (eval echo "$as_me:16672: \"$ac_try\"") >&5
16673   (eval $ac_try) 2>&5
16674   ac_status=$?
16675   echo "$as_me:16675: \$? = $ac_status" >&5
16676   (exit $ac_status); }; }; then
16677   ac_cv_type_intptr_t=yes
16678 else
16679   echo "$as_me: failed program was:" >&5
16680 cat conftest.$ac_ext >&5
16681 ac_cv_type_intptr_t=no
16682 fi
16683 rm -f conftest.$ac_objext conftest.$ac_ext
16684 fi
16685 echo "$as_me:16685: result: $ac_cv_type_intptr_t" >&5
16686 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16687 if test $ac_cv_type_intptr_t = yes; then
16688   :
16689 else
16690
16691 cat >>confdefs.h <<EOF
16692 #define intptr_t long
16693 EOF
16694
16695 fi
16696
16697 echo "$as_me:16697: checking for type sigaction_t" >&5
16698 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16699 if test "${cf_cv_type_sigaction+set}" = set; then
16700   echo $ECHO_N "(cached) $ECHO_C" >&6
16701 else
16702
16703         cat >conftest.$ac_ext <<_ACEOF
16704 #line 16704 "configure"
16705 #include "confdefs.h"
16706
16707 #include <signal.h>
16708 int
16709 main ()
16710 {
16711 sigaction_t x
16712   ;
16713   return 0;
16714 }
16715 _ACEOF
16716 rm -f conftest.$ac_objext
16717 if { (eval echo "$as_me:16717: \"$ac_compile\"") >&5
16718   (eval $ac_compile) 2>&5
16719   ac_status=$?
16720   echo "$as_me:16720: \$? = $ac_status" >&5
16721   (exit $ac_status); } &&
16722          { ac_try='test -s conftest.$ac_objext'
16723   { (eval echo "$as_me:16723: \"$ac_try\"") >&5
16724   (eval $ac_try) 2>&5
16725   ac_status=$?
16726   echo "$as_me:16726: \$? = $ac_status" >&5
16727   (exit $ac_status); }; }; then
16728   cf_cv_type_sigaction=yes
16729 else
16730   echo "$as_me: failed program was:" >&5
16731 cat conftest.$ac_ext >&5
16732 cf_cv_type_sigaction=no
16733 fi
16734 rm -f conftest.$ac_objext conftest.$ac_ext
16735 fi
16736
16737 echo "$as_me:16737: result: $cf_cv_type_sigaction" >&5
16738 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16739 test "$cf_cv_type_sigaction" = yes &&
16740 cat >>confdefs.h <<\EOF
16741 #define HAVE_TYPE_SIGACTION 1
16742 EOF
16743
16744 echo "$as_me:16744: checking declaration of size-change" >&5
16745 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16746 if test "${cf_cv_sizechange+set}" = set; then
16747   echo $ECHO_N "(cached) $ECHO_C" >&6
16748 else
16749
16750     cf_cv_sizechange=unknown
16751     cf_save_CPPFLAGS="$CPPFLAGS"
16752
16753 for cf_opts in "" "NEED_PTEM_H"
16754 do
16755
16756     CPPFLAGS="$cf_save_CPPFLAGS"
16757     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16758     cat >conftest.$ac_ext <<_ACEOF
16759 #line 16759 "configure"
16760 #include "confdefs.h"
16761 #include <sys/types.h>
16762 #ifdef HAVE_TERMIOS_H
16763 #include <termios.h>
16764 #else
16765 #ifdef HAVE_TERMIO_H
16766 #include <termio.h>
16767 #endif
16768 #endif
16769 #ifdef NEED_PTEM_H
16770 /* This is a workaround for SCO:  they neglected to define struct winsize in
16771  * termios.h -- it's only in termio.h and ptem.h
16772  */
16773 #include        <sys/stream.h>
16774 #include        <sys/ptem.h>
16775 #endif
16776 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16777 #include <sys/ioctl.h>
16778 #endif
16779
16780 int
16781 main ()
16782 {
16783
16784 #ifdef TIOCGSIZE
16785         struct ttysize win;     /* FIXME: what system is this? */
16786         int y = win.ts_lines;
16787         int x = win.ts_cols;
16788 #else
16789 #ifdef TIOCGWINSZ
16790         struct winsize win;
16791         int y = win.ws_row;
16792         int x = win.ws_col;
16793 #else
16794         no TIOCGSIZE or TIOCGWINSZ
16795 #endif /* TIOCGWINSZ */
16796 #endif /* TIOCGSIZE */
16797
16798   ;
16799   return 0;
16800 }
16801 _ACEOF
16802 rm -f conftest.$ac_objext
16803 if { (eval echo "$as_me:16803: \"$ac_compile\"") >&5
16804   (eval $ac_compile) 2>&5
16805   ac_status=$?
16806   echo "$as_me:16806: \$? = $ac_status" >&5
16807   (exit $ac_status); } &&
16808          { ac_try='test -s conftest.$ac_objext'
16809   { (eval echo "$as_me:16809: \"$ac_try\"") >&5
16810   (eval $ac_try) 2>&5
16811   ac_status=$?
16812   echo "$as_me:16812: \$? = $ac_status" >&5
16813   (exit $ac_status); }; }; then
16814   cf_cv_sizechange=yes
16815 else
16816   echo "$as_me: failed program was:" >&5
16817 cat conftest.$ac_ext >&5
16818 cf_cv_sizechange=no
16819 fi
16820 rm -f conftest.$ac_objext conftest.$ac_ext
16821
16822         CPPFLAGS="$cf_save_CPPFLAGS"
16823         if test "$cf_cv_sizechange" = yes ; then
16824                 echo "size-change succeeded ($cf_opts)" >&5
16825                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16826                 break
16827         fi
16828 done
16829
16830 fi
16831 echo "$as_me:16831: result: $cf_cv_sizechange" >&5
16832 echo "${ECHO_T}$cf_cv_sizechange" >&6
16833 if test "$cf_cv_sizechange" != no ; then
16834
16835 cat >>confdefs.h <<\EOF
16836 #define HAVE_SIZECHANGE 1
16837 EOF
16838
16839         case $cf_cv_sizechange in #(vi
16840         NEED*)
16841                 cat >>confdefs.h <<EOF
16842 #define $cf_cv_sizechange  1
16843 EOF
16844
16845                 ;;
16846         esac
16847 fi
16848
16849 echo "$as_me:16849: checking for memmove" >&5
16850 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16851 if test "${ac_cv_func_memmove+set}" = set; then
16852   echo $ECHO_N "(cached) $ECHO_C" >&6
16853 else
16854   cat >conftest.$ac_ext <<_ACEOF
16855 #line 16855 "configure"
16856 #include "confdefs.h"
16857 /* System header to define __stub macros and hopefully few prototypes,
16858     which can conflict with char memmove (); below.  */
16859 #include <assert.h>
16860 /* Override any gcc2 internal prototype to avoid an error.  */
16861 #ifdef __cplusplus
16862 extern "C"
16863 #endif
16864 /* We use char because int might match the return type of a gcc2
16865    builtin and then its argument prototype would still apply.  */
16866 char memmove ();
16867 char (*f) ();
16868
16869 int
16870 main ()
16871 {
16872 /* The GNU C library defines this for functions which it implements
16873     to always fail with ENOSYS.  Some functions are actually named
16874     something starting with __ and the normal name is an alias.  */
16875 #if defined (__stub_memmove) || defined (__stub___memmove)
16876 choke me
16877 #else
16878 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16879 #endif
16880
16881   ;
16882   return 0;
16883 }
16884 _ACEOF
16885 rm -f conftest.$ac_objext conftest$ac_exeext
16886 if { (eval echo "$as_me:16886: \"$ac_link\"") >&5
16887   (eval $ac_link) 2>&5
16888   ac_status=$?
16889   echo "$as_me:16889: \$? = $ac_status" >&5
16890   (exit $ac_status); } &&
16891          { ac_try='test -s conftest$ac_exeext'
16892   { (eval echo "$as_me:16892: \"$ac_try\"") >&5
16893   (eval $ac_try) 2>&5
16894   ac_status=$?
16895   echo "$as_me:16895: \$? = $ac_status" >&5
16896   (exit $ac_status); }; }; then
16897   ac_cv_func_memmove=yes
16898 else
16899   echo "$as_me: failed program was:" >&5
16900 cat conftest.$ac_ext >&5
16901 ac_cv_func_memmove=no
16902 fi
16903 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16904 fi
16905 echo "$as_me:16905: result: $ac_cv_func_memmove" >&5
16906 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16907 if test $ac_cv_func_memmove = yes; then
16908   :
16909 else
16910
16911 echo "$as_me:16911: checking for bcopy" >&5
16912 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16913 if test "${ac_cv_func_bcopy+set}" = set; then
16914   echo $ECHO_N "(cached) $ECHO_C" >&6
16915 else
16916   cat >conftest.$ac_ext <<_ACEOF
16917 #line 16917 "configure"
16918 #include "confdefs.h"
16919 /* System header to define __stub macros and hopefully few prototypes,
16920     which can conflict with char bcopy (); below.  */
16921 #include <assert.h>
16922 /* Override any gcc2 internal prototype to avoid an error.  */
16923 #ifdef __cplusplus
16924 extern "C"
16925 #endif
16926 /* We use char because int might match the return type of a gcc2
16927    builtin and then its argument prototype would still apply.  */
16928 char bcopy ();
16929 char (*f) ();
16930
16931 int
16932 main ()
16933 {
16934 /* The GNU C library defines this for functions which it implements
16935     to always fail with ENOSYS.  Some functions are actually named
16936     something starting with __ and the normal name is an alias.  */
16937 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16938 choke me
16939 #else
16940 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16941 #endif
16942
16943   ;
16944   return 0;
16945 }
16946 _ACEOF
16947 rm -f conftest.$ac_objext conftest$ac_exeext
16948 if { (eval echo "$as_me:16948: \"$ac_link\"") >&5
16949   (eval $ac_link) 2>&5
16950   ac_status=$?
16951   echo "$as_me:16951: \$? = $ac_status" >&5
16952   (exit $ac_status); } &&
16953          { ac_try='test -s conftest$ac_exeext'
16954   { (eval echo "$as_me:16954: \"$ac_try\"") >&5
16955   (eval $ac_try) 2>&5
16956   ac_status=$?
16957   echo "$as_me:16957: \$? = $ac_status" >&5
16958   (exit $ac_status); }; }; then
16959   ac_cv_func_bcopy=yes
16960 else
16961   echo "$as_me: failed program was:" >&5
16962 cat conftest.$ac_ext >&5
16963 ac_cv_func_bcopy=no
16964 fi
16965 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16966 fi
16967 echo "$as_me:16967: result: $ac_cv_func_bcopy" >&5
16968 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16969 if test $ac_cv_func_bcopy = yes; then
16970
16971         echo "$as_me:16971: checking if bcopy does overlapping moves" >&5
16972 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16973 if test "${cf_cv_good_bcopy+set}" = set; then
16974   echo $ECHO_N "(cached) $ECHO_C" >&6
16975 else
16976
16977                 if test "$cross_compiling" = yes; then
16978   cf_cv_good_bcopy=unknown
16979 else
16980   cat >conftest.$ac_ext <<_ACEOF
16981 #line 16981 "configure"
16982 #include "confdefs.h"
16983
16984 int main() {
16985         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16986         char temp[40];
16987         bcopy(data, temp, sizeof(data));
16988         bcopy(temp+10, temp, 15);
16989         bcopy(temp+5, temp+15, 10);
16990         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16991 }
16992
16993 _ACEOF
16994 rm -f conftest$ac_exeext
16995 if { (eval echo "$as_me:16995: \"$ac_link\"") >&5
16996   (eval $ac_link) 2>&5
16997   ac_status=$?
16998   echo "$as_me:16998: \$? = $ac_status" >&5
16999   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17000   { (eval echo "$as_me:17000: \"$ac_try\"") >&5
17001   (eval $ac_try) 2>&5
17002   ac_status=$?
17003   echo "$as_me:17003: \$? = $ac_status" >&5
17004   (exit $ac_status); }; }; then
17005   cf_cv_good_bcopy=yes
17006 else
17007   echo "$as_me: program exited with status $ac_status" >&5
17008 echo "$as_me: failed program was:" >&5
17009 cat conftest.$ac_ext >&5
17010 cf_cv_good_bcopy=no
17011 fi
17012 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17013 fi
17014
17015 fi
17016 echo "$as_me:17016: result: $cf_cv_good_bcopy" >&5
17017 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17018
17019 else
17020   cf_cv_good_bcopy=no
17021 fi
17022
17023         if test "$cf_cv_good_bcopy" = yes ; then
17024
17025 cat >>confdefs.h <<\EOF
17026 #define USE_OK_BCOPY 1
17027 EOF
17028
17029         else
17030
17031 cat >>confdefs.h <<\EOF
17032 #define USE_MY_MEMMOVE 1
17033 EOF
17034
17035         fi
17036
17037 fi
17038
17039 echo "$as_me:17039: checking if poll really works" >&5
17040 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17041 if test "${cf_cv_working_poll+set}" = set; then
17042   echo $ECHO_N "(cached) $ECHO_C" >&6
17043 else
17044
17045 if test "$cross_compiling" = yes; then
17046   cf_cv_working_poll=unknown
17047 else
17048   cat >conftest.$ac_ext <<_ACEOF
17049 #line 17049 "configure"
17050 #include "confdefs.h"
17051
17052 #include <stdlib.h>
17053 #include <stdio.h>
17054 #include <unistd.h>
17055 #include <fcntl.h>
17056 #ifdef HAVE_POLL_H
17057 #include <poll.h>
17058 #else
17059 #include <sys/poll.h>
17060 #endif
17061 int main() {
17062         struct pollfd myfds;
17063         int ret;
17064
17065         /* check for Darwin bug with respect to "devices" */
17066         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17067         if (myfds.fd < 0)
17068                 myfds.fd = 0;
17069         myfds.events = POLLIN;
17070         myfds.revents = 0;
17071
17072         ret = poll(&myfds, 1, 100);
17073
17074         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17075                 ret = -1;
17076         } else {
17077                 int fd = 0;
17078                 if (!isatty(fd)) {
17079                         fd = open("/dev/tty", 2);       /* O_RDWR */
17080                 }
17081
17082                 if (fd >= 0) {
17083                         /* also check with standard input */
17084                         myfds.fd = fd;
17085                         myfds.events = POLLIN;
17086                         myfds.revents = 0;
17087                         ret = poll(&myfds, 1, 100);
17088                 } else {
17089                         ret = -1;
17090                 }
17091         }
17092         ${cf_cv_main_return:-return}(ret < 0);
17093 }
17094 _ACEOF
17095 rm -f conftest$ac_exeext
17096 if { (eval echo "$as_me:17096: \"$ac_link\"") >&5
17097   (eval $ac_link) 2>&5
17098   ac_status=$?
17099   echo "$as_me:17099: \$? = $ac_status" >&5
17100   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17101   { (eval echo "$as_me:17101: \"$ac_try\"") >&5
17102   (eval $ac_try) 2>&5
17103   ac_status=$?
17104   echo "$as_me:17104: \$? = $ac_status" >&5
17105   (exit $ac_status); }; }; then
17106   cf_cv_working_poll=yes
17107 else
17108   echo "$as_me: program exited with status $ac_status" >&5
17109 echo "$as_me: failed program was:" >&5
17110 cat conftest.$ac_ext >&5
17111 cf_cv_working_poll=no
17112 fi
17113 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17114 fi
17115 fi
17116 echo "$as_me:17116: result: $cf_cv_working_poll" >&5
17117 echo "${ECHO_T}$cf_cv_working_poll" >&6
17118 test "$cf_cv_working_poll" = "yes" &&
17119 cat >>confdefs.h <<\EOF
17120 #define HAVE_WORKING_POLL 1
17121 EOF
17122
17123 echo "$as_me:17123: checking for va_copy" >&5
17124 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17125 if test "${cf_cv_have_va_copy+set}" = set; then
17126   echo $ECHO_N "(cached) $ECHO_C" >&6
17127 else
17128
17129 cat >conftest.$ac_ext <<_ACEOF
17130 #line 17130 "configure"
17131 #include "confdefs.h"
17132
17133 #include <stdarg.h>
17134
17135 int
17136 main ()
17137 {
17138
17139         static va_list dst;
17140         static va_list src;
17141         va_copy(dst, src)
17142   ;
17143   return 0;
17144 }
17145 _ACEOF
17146 rm -f conftest.$ac_objext conftest$ac_exeext
17147 if { (eval echo "$as_me:17147: \"$ac_link\"") >&5
17148   (eval $ac_link) 2>&5
17149   ac_status=$?
17150   echo "$as_me:17150: \$? = $ac_status" >&5
17151   (exit $ac_status); } &&
17152          { ac_try='test -s conftest$ac_exeext'
17153   { (eval echo "$as_me:17153: \"$ac_try\"") >&5
17154   (eval $ac_try) 2>&5
17155   ac_status=$?
17156   echo "$as_me:17156: \$? = $ac_status" >&5
17157   (exit $ac_status); }; }; then
17158   cf_cv_have_va_copy=yes
17159 else
17160   echo "$as_me: failed program was:" >&5
17161 cat conftest.$ac_ext >&5
17162 cf_cv_have_va_copy=no
17163 fi
17164 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17165 fi
17166 echo "$as_me:17166: result: $cf_cv_have_va_copy" >&5
17167 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17168
17169 test "$cf_cv_have_va_copy" = yes &&
17170 cat >>confdefs.h <<\EOF
17171 #define HAVE_VA_COPY 1
17172 EOF
17173
17174 echo "$as_me:17174: checking for __va_copy" >&5
17175 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17176 if test "${cf_cv_have___va_copy+set}" = set; then
17177   echo $ECHO_N "(cached) $ECHO_C" >&6
17178 else
17179
17180 cat >conftest.$ac_ext <<_ACEOF
17181 #line 17181 "configure"
17182 #include "confdefs.h"
17183
17184 #include <stdarg.h>
17185
17186 int
17187 main ()
17188 {
17189
17190         static va_list dst;
17191         static va_list src;
17192         __va_copy(dst, src)
17193   ;
17194   return 0;
17195 }
17196 _ACEOF
17197 rm -f conftest.$ac_objext conftest$ac_exeext
17198 if { (eval echo "$as_me:17198: \"$ac_link\"") >&5
17199   (eval $ac_link) 2>&5
17200   ac_status=$?
17201   echo "$as_me:17201: \$? = $ac_status" >&5
17202   (exit $ac_status); } &&
17203          { ac_try='test -s conftest$ac_exeext'
17204   { (eval echo "$as_me:17204: \"$ac_try\"") >&5
17205   (eval $ac_try) 2>&5
17206   ac_status=$?
17207   echo "$as_me:17207: \$? = $ac_status" >&5
17208   (exit $ac_status); }; }; then
17209   cf_cv_have___va_copy=yes
17210 else
17211   echo "$as_me: failed program was:" >&5
17212 cat conftest.$ac_ext >&5
17213 cf_cv_have___va_copy=no
17214 fi
17215 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17216 fi
17217 echo "$as_me:17217: result: $cf_cv_have___va_copy" >&5
17218 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17219
17220 test "$cf_cv_have___va_copy" = yes &&
17221 cat >>confdefs.h <<\EOF
17222 #define HAVE___VA_COPY 1
17223 EOF
17224
17225 echo "$as_me:17225: checking for pid_t" >&5
17226 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17227 if test "${ac_cv_type_pid_t+set}" = set; then
17228   echo $ECHO_N "(cached) $ECHO_C" >&6
17229 else
17230   cat >conftest.$ac_ext <<_ACEOF
17231 #line 17231 "configure"
17232 #include "confdefs.h"
17233 $ac_includes_default
17234 int
17235 main ()
17236 {
17237 if ((pid_t *) 0)
17238   return 0;
17239 if (sizeof (pid_t))
17240   return 0;
17241   ;
17242   return 0;
17243 }
17244 _ACEOF
17245 rm -f conftest.$ac_objext
17246 if { (eval echo "$as_me:17246: \"$ac_compile\"") >&5
17247   (eval $ac_compile) 2>&5
17248   ac_status=$?
17249   echo "$as_me:17249: \$? = $ac_status" >&5
17250   (exit $ac_status); } &&
17251          { ac_try='test -s conftest.$ac_objext'
17252   { (eval echo "$as_me:17252: \"$ac_try\"") >&5
17253   (eval $ac_try) 2>&5
17254   ac_status=$?
17255   echo "$as_me:17255: \$? = $ac_status" >&5
17256   (exit $ac_status); }; }; then
17257   ac_cv_type_pid_t=yes
17258 else
17259   echo "$as_me: failed program was:" >&5
17260 cat conftest.$ac_ext >&5
17261 ac_cv_type_pid_t=no
17262 fi
17263 rm -f conftest.$ac_objext conftest.$ac_ext
17264 fi
17265 echo "$as_me:17265: result: $ac_cv_type_pid_t" >&5
17266 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17267 if test $ac_cv_type_pid_t = yes; then
17268   :
17269 else
17270
17271 cat >>confdefs.h <<EOF
17272 #define pid_t int
17273 EOF
17274
17275 fi
17276
17277 for ac_header in unistd.h vfork.h
17278 do
17279 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17280 echo "$as_me:17280: checking for $ac_header" >&5
17281 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17282 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17283   echo $ECHO_N "(cached) $ECHO_C" >&6
17284 else
17285   cat >conftest.$ac_ext <<_ACEOF
17286 #line 17286 "configure"
17287 #include "confdefs.h"
17288 #include <$ac_header>
17289 _ACEOF
17290 if { (eval echo "$as_me:17290: \"$ac_cpp conftest.$ac_ext\"") >&5
17291   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17292   ac_status=$?
17293   egrep -v '^ *\+' conftest.er1 >conftest.err
17294   rm -f conftest.er1
17295   cat conftest.err >&5
17296   echo "$as_me:17296: \$? = $ac_status" >&5
17297   (exit $ac_status); } >/dev/null; then
17298   if test -s conftest.err; then
17299     ac_cpp_err=$ac_c_preproc_warn_flag
17300   else
17301     ac_cpp_err=
17302   fi
17303 else
17304   ac_cpp_err=yes
17305 fi
17306 if test -z "$ac_cpp_err"; then
17307   eval "$as_ac_Header=yes"
17308 else
17309   echo "$as_me: failed program was:" >&5
17310   cat conftest.$ac_ext >&5
17311   eval "$as_ac_Header=no"
17312 fi
17313 rm -f conftest.err conftest.$ac_ext
17314 fi
17315 echo "$as_me:17315: result: `eval echo '${'$as_ac_Header'}'`" >&5
17316 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17317 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17318   cat >>confdefs.h <<EOF
17319 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17320 EOF
17321
17322 fi
17323 done
17324
17325 for ac_func in fork vfork
17326 do
17327 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17328 echo "$as_me:17328: checking for $ac_func" >&5
17329 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17330 if eval "test \"\${$as_ac_var+set}\" = set"; then
17331   echo $ECHO_N "(cached) $ECHO_C" >&6
17332 else
17333   cat >conftest.$ac_ext <<_ACEOF
17334 #line 17334 "configure"
17335 #include "confdefs.h"
17336 /* System header to define __stub macros and hopefully few prototypes,
17337     which can conflict with char $ac_func (); below.  */
17338 #include <assert.h>
17339 /* Override any gcc2 internal prototype to avoid an error.  */
17340 #ifdef __cplusplus
17341 extern "C"
17342 #endif
17343 /* We use char because int might match the return type of a gcc2
17344    builtin and then its argument prototype would still apply.  */
17345 char $ac_func ();
17346 char (*f) ();
17347
17348 int
17349 main ()
17350 {
17351 /* The GNU C library defines this for functions which it implements
17352     to always fail with ENOSYS.  Some functions are actually named
17353     something starting with __ and the normal name is an alias.  */
17354 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17355 choke me
17356 #else
17357 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17358 #endif
17359
17360   ;
17361   return 0;
17362 }
17363 _ACEOF
17364 rm -f conftest.$ac_objext conftest$ac_exeext
17365 if { (eval echo "$as_me:17365: \"$ac_link\"") >&5
17366   (eval $ac_link) 2>&5
17367   ac_status=$?
17368   echo "$as_me:17368: \$? = $ac_status" >&5
17369   (exit $ac_status); } &&
17370          { ac_try='test -s conftest$ac_exeext'
17371   { (eval echo "$as_me:17371: \"$ac_try\"") >&5
17372   (eval $ac_try) 2>&5
17373   ac_status=$?
17374   echo "$as_me:17374: \$? = $ac_status" >&5
17375   (exit $ac_status); }; }; then
17376   eval "$as_ac_var=yes"
17377 else
17378   echo "$as_me: failed program was:" >&5
17379 cat conftest.$ac_ext >&5
17380 eval "$as_ac_var=no"
17381 fi
17382 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17383 fi
17384 echo "$as_me:17384: result: `eval echo '${'$as_ac_var'}'`" >&5
17385 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17386 if test `eval echo '${'$as_ac_var'}'` = yes; then
17387   cat >>confdefs.h <<EOF
17388 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17389 EOF
17390
17391 fi
17392 done
17393
17394 ac_cv_func_fork_works=$ac_cv_func_fork
17395 if test "x$ac_cv_func_fork" = xyes; then
17396   echo "$as_me:17396: checking for working fork" >&5
17397 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17398 if test "${ac_cv_func_fork_works+set}" = set; then
17399   echo $ECHO_N "(cached) $ECHO_C" >&6
17400 else
17401   if test "$cross_compiling" = yes; then
17402   ac_cv_func_fork_works=cross
17403 else
17404   cat >conftest.$ac_ext <<_ACEOF
17405 /* By Rüdiger Kuhlmann. */
17406       #include <sys/types.h>
17407       #if HAVE_UNISTD_H
17408       # include <unistd.h>
17409       #endif
17410       /* Some systems only have a dummy stub for fork() */
17411       int main ()
17412       {
17413         if (fork() < 0)
17414           $ac_main_return (1);
17415         $ac_main_return (0);
17416       }
17417 _ACEOF
17418 rm -f conftest$ac_exeext
17419 if { (eval echo "$as_me:17419: \"$ac_link\"") >&5
17420   (eval $ac_link) 2>&5
17421   ac_status=$?
17422   echo "$as_me:17422: \$? = $ac_status" >&5
17423   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17424   { (eval echo "$as_me:17424: \"$ac_try\"") >&5
17425   (eval $ac_try) 2>&5
17426   ac_status=$?
17427   echo "$as_me:17427: \$? = $ac_status" >&5
17428   (exit $ac_status); }; }; then
17429   ac_cv_func_fork_works=yes
17430 else
17431   echo "$as_me: program exited with status $ac_status" >&5
17432 echo "$as_me: failed program was:" >&5
17433 cat conftest.$ac_ext >&5
17434 ac_cv_func_fork_works=no
17435 fi
17436 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17437 fi
17438 fi
17439 echo "$as_me:17439: result: $ac_cv_func_fork_works" >&5
17440 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17441
17442 fi
17443 if test "x$ac_cv_func_fork_works" = xcross; then
17444   case $host in
17445     *-*-amigaos* | *-*-msdosdjgpp*)
17446       # Override, as these systems have only a dummy fork() stub
17447       ac_cv_func_fork_works=no
17448       ;;
17449     *)
17450       ac_cv_func_fork_works=yes
17451       ;;
17452   esac
17453   { echo "$as_me:17453: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17454 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17455 fi
17456 ac_cv_func_vfork_works=$ac_cv_func_vfork
17457 if test "x$ac_cv_func_vfork" = xyes; then
17458   echo "$as_me:17458: checking for working vfork" >&5
17459 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17460 if test "${ac_cv_func_vfork_works+set}" = set; then
17461   echo $ECHO_N "(cached) $ECHO_C" >&6
17462 else
17463   if test "$cross_compiling" = yes; then
17464   ac_cv_func_vfork_works=cross
17465 else
17466   cat >conftest.$ac_ext <<_ACEOF
17467 #line 17467 "configure"
17468 #include "confdefs.h"
17469 /* Thanks to Paul Eggert for this test.  */
17470 #include <stdio.h>
17471 #include <sys/types.h>
17472 #include <sys/stat.h>
17473 #if HAVE_UNISTD_H
17474 # include <unistd.h>
17475 #endif
17476 #if HAVE_VFORK_H
17477 # include <vfork.h>
17478 #endif
17479 /* On some sparc systems, changes by the child to local and incoming
17480    argument registers are propagated back to the parent.  The compiler
17481    is told about this with #include <vfork.h>, but some compilers
17482    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17483    static variable whose address is put into a register that is
17484    clobbered by the vfork.  */
17485 static
17486 #ifdef __cplusplus
17487 sparc_address_test (int arg)
17488 # else
17489 sparc_address_test (arg) int arg;
17490 #endif
17491 {
17492   static pid_t child;
17493   if (!child) {
17494     child = vfork ();
17495     if (child < 0) {
17496       perror ("vfork");
17497       _exit(2);
17498     }
17499     if (!child) {
17500       arg = getpid();
17501       write(-1, "", 0);
17502       _exit (arg);
17503     }
17504   }
17505 }
17506
17507 int
17508 main ()
17509 {
17510   pid_t parent = getpid ();
17511   pid_t child;
17512
17513   sparc_address_test ();
17514
17515   child = vfork ();
17516
17517   if (child == 0) {
17518     /* Here is another test for sparc vfork register problems.  This
17519        test uses lots of local variables, at least as many local
17520        variables as main has allocated so far including compiler
17521        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17522        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17523        reuse the register of parent for one of the local variables,
17524        since it will think that parent can't possibly be used any more
17525        in this routine.  Assigning to the local variable will thus
17526        munge parent in the parent process.  */
17527     pid_t
17528       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17529       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17530     /* Convince the compiler that p..p7 are live; otherwise, it might
17531        use the same hardware register for all 8 local variables.  */
17532     if (p != p1 || p != p2 || p != p3 || p != p4
17533         || p != p5 || p != p6 || p != p7)
17534       _exit(1);
17535
17536     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17537        from child file descriptors.  If the child closes a descriptor
17538        before it execs or exits, this munges the parent's descriptor
17539        as well.  Test for this by closing stdout in the child.  */
17540     _exit(close(fileno(stdout)) != 0);
17541   } else {
17542     int status;
17543     struct stat st;
17544
17545     while (wait(&status) != child)
17546       ;
17547     $ac_main_return(
17548          /* Was there some problem with vforking?  */
17549          child < 0
17550
17551          /* Did the child fail?  (This shouldn't happen.)  */
17552          || status
17553
17554          /* Did the vfork/compiler bug occur?  */
17555          || parent != getpid()
17556
17557          /* Did the file descriptor bug occur?  */
17558          || fstat(fileno(stdout), &st) != 0
17559          );
17560   }
17561 }
17562 _ACEOF
17563 rm -f conftest$ac_exeext
17564 if { (eval echo "$as_me:17564: \"$ac_link\"") >&5
17565   (eval $ac_link) 2>&5
17566   ac_status=$?
17567   echo "$as_me:17567: \$? = $ac_status" >&5
17568   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17569   { (eval echo "$as_me:17569: \"$ac_try\"") >&5
17570   (eval $ac_try) 2>&5
17571   ac_status=$?
17572   echo "$as_me:17572: \$? = $ac_status" >&5
17573   (exit $ac_status); }; }; then
17574   ac_cv_func_vfork_works=yes
17575 else
17576   echo "$as_me: program exited with status $ac_status" >&5
17577 echo "$as_me: failed program was:" >&5
17578 cat conftest.$ac_ext >&5
17579 ac_cv_func_vfork_works=no
17580 fi
17581 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17582 fi
17583 fi
17584 echo "$as_me:17584: result: $ac_cv_func_vfork_works" >&5
17585 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17586
17587 fi;
17588 if test "x$ac_cv_func_fork_works" = xcross; then
17589   ac_cv_func_vfork_works=ac_cv_func_vfork
17590   { echo "$as_me:17590: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17591 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17592 fi
17593
17594 if test "x$ac_cv_func_vfork_works" = xyes; then
17595
17596 cat >>confdefs.h <<\EOF
17597 #define HAVE_WORKING_VFORK 1
17598 EOF
17599
17600 else
17601
17602 cat >>confdefs.h <<\EOF
17603 #define vfork fork
17604 EOF
17605
17606 fi
17607 if test "x$ac_cv_func_fork_works" = xyes; then
17608
17609 cat >>confdefs.h <<\EOF
17610 #define HAVE_WORKING_FORK 1
17611 EOF
17612
17613 fi
17614
17615 # special check for test/ditto.c
17616
17617 echo "$as_me:17617: checking for openpty in -lutil" >&5
17618 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17619 if test "${ac_cv_lib_util_openpty+set}" = set; then
17620   echo $ECHO_N "(cached) $ECHO_C" >&6
17621 else
17622   ac_check_lib_save_LIBS=$LIBS
17623 LIBS="-lutil  $LIBS"
17624 cat >conftest.$ac_ext <<_ACEOF
17625 #line 17625 "configure"
17626 #include "confdefs.h"
17627
17628 /* Override any gcc2 internal prototype to avoid an error.  */
17629 #ifdef __cplusplus
17630 extern "C"
17631 #endif
17632 /* We use char because int might match the return type of a gcc2
17633    builtin and then its argument prototype would still apply.  */
17634 char openpty ();
17635 int
17636 main ()
17637 {
17638 openpty ();
17639   ;
17640   return 0;
17641 }
17642 _ACEOF
17643 rm -f conftest.$ac_objext conftest$ac_exeext
17644 if { (eval echo "$as_me:17644: \"$ac_link\"") >&5
17645   (eval $ac_link) 2>&5
17646   ac_status=$?
17647   echo "$as_me:17647: \$? = $ac_status" >&5
17648   (exit $ac_status); } &&
17649          { ac_try='test -s conftest$ac_exeext'
17650   { (eval echo "$as_me:17650: \"$ac_try\"") >&5
17651   (eval $ac_try) 2>&5
17652   ac_status=$?
17653   echo "$as_me:17653: \$? = $ac_status" >&5
17654   (exit $ac_status); }; }; then
17655   ac_cv_lib_util_openpty=yes
17656 else
17657   echo "$as_me: failed program was:" >&5
17658 cat conftest.$ac_ext >&5
17659 ac_cv_lib_util_openpty=no
17660 fi
17661 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17662 LIBS=$ac_check_lib_save_LIBS
17663 fi
17664 echo "$as_me:17664: result: $ac_cv_lib_util_openpty" >&5
17665 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17666 if test $ac_cv_lib_util_openpty = yes; then
17667   cf_cv_lib_util=yes
17668 else
17669   cf_cv_lib_util=no
17670 fi
17671
17672 echo "$as_me:17672: checking for openpty header" >&5
17673 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17674 if test "${cf_cv_func_openpty+set}" = set; then
17675   echo $ECHO_N "(cached) $ECHO_C" >&6
17676 else
17677
17678     cf_save_LIBS="$LIBS"
17679     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17680     for cf_header in pty.h libutil.h util.h
17681     do
17682     cat >conftest.$ac_ext <<_ACEOF
17683 #line 17683 "configure"
17684 #include "confdefs.h"
17685
17686 #include <$cf_header>
17687
17688 int
17689 main ()
17690 {
17691
17692     int x = openpty((int *)0, (int *)0, (char *)0,
17693                    (struct termios *)0, (struct winsize *)0);
17694
17695   ;
17696   return 0;
17697 }
17698 _ACEOF
17699 rm -f conftest.$ac_objext conftest$ac_exeext
17700 if { (eval echo "$as_me:17700: \"$ac_link\"") >&5
17701   (eval $ac_link) 2>&5
17702   ac_status=$?
17703   echo "$as_me:17703: \$? = $ac_status" >&5
17704   (exit $ac_status); } &&
17705          { ac_try='test -s conftest$ac_exeext'
17706   { (eval echo "$as_me:17706: \"$ac_try\"") >&5
17707   (eval $ac_try) 2>&5
17708   ac_status=$?
17709   echo "$as_me:17709: \$? = $ac_status" >&5
17710   (exit $ac_status); }; }; then
17711
17712         cf_cv_func_openpty=$cf_header
17713         break
17714
17715 else
17716   echo "$as_me: failed program was:" >&5
17717 cat conftest.$ac_ext >&5
17718
17719         cf_cv_func_openpty=no
17720
17721 fi
17722 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17723     done
17724     LIBS="$cf_save_LIBS"
17725
17726 fi
17727 echo "$as_me:17727: result: $cf_cv_func_openpty" >&5
17728 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17729
17730 if test "$cf_cv_func_openpty" != no ; then
17731
17732 cat >>confdefs.h <<EOF
17733 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17734 EOF
17735
17736 cat >>confdefs.h <<\EOF
17737 #define USE_XTERM_PTY 1
17738 EOF
17739
17740     if test "x$cf_cv_lib_util" = xyes ; then
17741         TEST_LIBS="-lutil $TEST_LIBS"
17742     fi
17743 fi
17744
17745 if test "$with_hashed_db" != no ; then
17746
17747 cat >>confdefs.h <<\EOF
17748 #define USE_HASHED_DB 1
17749 EOF
17750
17751 case $with_hashed_db in #(vi
17752 yes|*able*) #(vi
17753     ;;
17754 *)
17755     if test -d "$with_hashed_db" ; then
17756
17757 if test -n "$with_hashed_db/include" ; then
17758   for cf_add_incdir in $with_hashed_db/include
17759   do
17760         while test $cf_add_incdir != /usr/include
17761         do
17762           if test -d $cf_add_incdir
17763           then
17764                 cf_have_incdir=no
17765                 if test -n "$CFLAGS$CPPFLAGS" ; then
17766                   # a loop is needed to ensure we can add subdirs of existing dirs
17767                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17768                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17769                           cf_have_incdir=yes; break
17770                         fi
17771                   done
17772                 fi
17773
17774                 if test "$cf_have_incdir" = no ; then
17775                   if test "$cf_add_incdir" = /usr/local/include ; then
17776                         if test "$GCC" = yes
17777                         then
17778                           cf_save_CPPFLAGS=$CPPFLAGS
17779                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17780                           cat >conftest.$ac_ext <<_ACEOF
17781 #line 17781 "configure"
17782 #include "confdefs.h"
17783 #include <stdio.h>
17784 int
17785 main ()
17786 {
17787 printf("Hello")
17788   ;
17789   return 0;
17790 }
17791 _ACEOF
17792 rm -f conftest.$ac_objext
17793 if { (eval echo "$as_me:17793: \"$ac_compile\"") >&5
17794   (eval $ac_compile) 2>&5
17795   ac_status=$?
17796   echo "$as_me:17796: \$? = $ac_status" >&5
17797   (exit $ac_status); } &&
17798          { ac_try='test -s conftest.$ac_objext'
17799   { (eval echo "$as_me:17799: \"$ac_try\"") >&5
17800   (eval $ac_try) 2>&5
17801   ac_status=$?
17802   echo "$as_me:17802: \$? = $ac_status" >&5
17803   (exit $ac_status); }; }; then
17804   :
17805 else
17806   echo "$as_me: failed program was:" >&5
17807 cat conftest.$ac_ext >&5
17808 cf_have_incdir=yes
17809 fi
17810 rm -f conftest.$ac_objext conftest.$ac_ext
17811                           CPPFLAGS=$cf_save_CPPFLAGS
17812                         fi
17813                   fi
17814                 fi
17815
17816                 if test "$cf_have_incdir" = no ; then
17817                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17818
17819 echo "${as_me:-configure}:17819: testing adding $cf_add_incdir to include-path ..." 1>&5
17820
17821                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17822
17823                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17824                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17825                   cf_add_incdir="$cf_top_incdir"
17826                 else
17827                   break
17828                 fi
17829           fi
17830         done
17831   done
17832 fi
17833
17834 if test -n "$with_hashed_db/lib" ; then
17835   for cf_add_libdir in $with_hashed_db/lib
17836   do
17837     if test $cf_add_libdir = /usr/lib ; then
17838       :
17839     elif test -d $cf_add_libdir
17840     then
17841       cf_have_libdir=no
17842       if test -n "$LDFLAGS$LIBS" ; then
17843         # a loop is needed to ensure we can add subdirs of existing dirs
17844         for cf_test_libdir in $LDFLAGS $LIBS ; do
17845           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17846             cf_have_libdir=yes; break
17847           fi
17848         done
17849       fi
17850       if test "$cf_have_libdir" = no ; then
17851         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17852
17853 echo "${as_me:-configure}:17853: testing adding $cf_add_libdir to library-path ..." 1>&5
17854
17855         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17856       fi
17857     fi
17858   done
17859 fi
17860
17861         else
17862                 case "$with_hashed_db" in #(vi
17863                 ./*|../*|/*)
17864                         { echo "$as_me:17864: WARNING: no such directory $with_hashed_db" >&5
17865 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
17866                         ;; #(vi
17867                 *)
17868
17869 cf_search=
17870
17871 test "x/usr" != "x$prefix" && \
17872 test -d "/usr" && \
17873 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
17874         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
17875         test -d /usr/include &&          cf_search="$cf_search /usr/include"
17876         test -d /usr/include/$with_hashed_db &&       cf_search="$cf_search /usr/include/$with_hashed_db"
17877         test -d /usr/include/$with_hashed_db/include &&    cf_search="$cf_search /usr/include/$with_hashed_db/include"
17878         test -d /usr/$with_hashed_db/include &&       cf_search="$cf_search /usr/$with_hashed_db/include"
17879         test -d /usr/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /usr/$with_hashed_db/include/$with_hashed_db"
17880 }
17881
17882 test "x$prefix" != "xNONE" && \
17883 test -d "$prefix" && \
17884  {
17885         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
17886         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
17887         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
17888         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
17889         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
17890         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
17891 }
17892
17893 test "x/usr/local" != "x$prefix" && \
17894 test -d "/usr/local" && \
17895 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
17896         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
17897         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
17898         test -d /usr/local/include/$with_hashed_db &&       cf_search="$cf_search /usr/local/include/$with_hashed_db"
17899         test -d /usr/local/include/$with_hashed_db/include &&    cf_search="$cf_search /usr/local/include/$with_hashed_db/include"
17900         test -d /usr/local/$with_hashed_db/include &&       cf_search="$cf_search /usr/local/$with_hashed_db/include"
17901         test -d /usr/local/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /usr/local/$with_hashed_db/include/$with_hashed_db"
17902 }
17903
17904 test "x/opt" != "x$prefix" && \
17905 test -d "/opt" && \
17906 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
17907         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
17908         test -d /opt/include &&          cf_search="$cf_search /opt/include"
17909         test -d /opt/include/$with_hashed_db &&       cf_search="$cf_search /opt/include/$with_hashed_db"
17910         test -d /opt/include/$with_hashed_db/include &&    cf_search="$cf_search /opt/include/$with_hashed_db/include"
17911         test -d /opt/$with_hashed_db/include &&       cf_search="$cf_search /opt/$with_hashed_db/include"
17912         test -d /opt/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /opt/$with_hashed_db/include/$with_hashed_db"
17913 }
17914
17915 test "x$HOME" != "x$prefix" && \
17916 test -d "$HOME" && \
17917 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
17918         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
17919         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
17920         test -d $HOME/include/$with_hashed_db &&       cf_search="$cf_search $HOME/include/$with_hashed_db"
17921         test -d $HOME/include/$with_hashed_db/include &&    cf_search="$cf_search $HOME/include/$with_hashed_db/include"
17922         test -d $HOME/$with_hashed_db/include &&       cf_search="$cf_search $HOME/$with_hashed_db/include"
17923         test -d $HOME/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $HOME/$with_hashed_db/include/$with_hashed_db"
17924 }
17925
17926         for cf_item in $cf_search
17927         do
17928                 case $cf_item in #(vi
17929                 */$with_hashed_db)
17930
17931 if test -n "$cf_item" ; then
17932   for cf_add_incdir in $cf_item
17933   do
17934         while test $cf_add_incdir != /usr/include
17935         do
17936           if test -d $cf_add_incdir
17937           then
17938                 cf_have_incdir=no
17939                 if test -n "$CFLAGS$CPPFLAGS" ; then
17940                   # a loop is needed to ensure we can add subdirs of existing dirs
17941                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17942                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17943                           cf_have_incdir=yes; break
17944                         fi
17945                   done
17946                 fi
17947
17948                 if test "$cf_have_incdir" = no ; then
17949                   if test "$cf_add_incdir" = /usr/local/include ; then
17950                         if test "$GCC" = yes
17951                         then
17952                           cf_save_CPPFLAGS=$CPPFLAGS
17953                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17954                           cat >conftest.$ac_ext <<_ACEOF
17955 #line 17955 "configure"
17956 #include "confdefs.h"
17957 #include <stdio.h>
17958 int
17959 main ()
17960 {
17961 printf("Hello")
17962   ;
17963   return 0;
17964 }
17965 _ACEOF
17966 rm -f conftest.$ac_objext
17967 if { (eval echo "$as_me:17967: \"$ac_compile\"") >&5
17968   (eval $ac_compile) 2>&5
17969   ac_status=$?
17970   echo "$as_me:17970: \$? = $ac_status" >&5
17971   (exit $ac_status); } &&
17972          { ac_try='test -s conftest.$ac_objext'
17973   { (eval echo "$as_me:17973: \"$ac_try\"") >&5
17974   (eval $ac_try) 2>&5
17975   ac_status=$?
17976   echo "$as_me:17976: \$? = $ac_status" >&5
17977   (exit $ac_status); }; }; then
17978   :
17979 else
17980   echo "$as_me: failed program was:" >&5
17981 cat conftest.$ac_ext >&5
17982 cf_have_incdir=yes
17983 fi
17984 rm -f conftest.$ac_objext conftest.$ac_ext
17985                           CPPFLAGS=$cf_save_CPPFLAGS
17986                         fi
17987                   fi
17988                 fi
17989
17990                 if test "$cf_have_incdir" = no ; then
17991                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17992
17993 echo "${as_me:-configure}:17993: testing adding $cf_add_incdir to include-path ..." 1>&5
17994
17995                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17996
17997                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17998                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17999                   cf_add_incdir="$cf_top_incdir"
18000                 else
18001                   break
18002                 fi
18003           fi
18004         done
18005   done
18006 fi
18007
18008                         ;;
18009                 esac
18010         done
18011
18012 cf_search=
18013
18014 test "x/usr" != "x$prefix" && \
18015 test -d "/usr" && \
18016 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
18017         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
18018         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
18019         test -d /usr/lib/$with_hashed_db &&       cf_search="$cf_search /usr/lib/$with_hashed_db"
18020         test -d /usr/lib/$with_hashed_db/lib &&    cf_search="$cf_search /usr/lib/$with_hashed_db/lib"
18021         test -d /usr/$with_hashed_db/lib &&       cf_search="$cf_search /usr/$with_hashed_db/lib"
18022         test -d /usr/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /usr/$with_hashed_db/lib/$with_hashed_db"
18023 }
18024
18025 test "x$prefix" != "xNONE" && \
18026 test -d "$prefix" && \
18027  {
18028         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18029         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18030         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18031         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18032         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18033         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18034 }
18035
18036 test "x/usr/local" != "x$prefix" && \
18037 test -d "/usr/local" && \
18038 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
18039         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
18040         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
18041         test -d /usr/local/lib/$with_hashed_db &&       cf_search="$cf_search /usr/local/lib/$with_hashed_db"
18042         test -d /usr/local/lib/$with_hashed_db/lib &&    cf_search="$cf_search /usr/local/lib/$with_hashed_db/lib"
18043         test -d /usr/local/$with_hashed_db/lib &&       cf_search="$cf_search /usr/local/$with_hashed_db/lib"
18044         test -d /usr/local/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /usr/local/$with_hashed_db/lib/$with_hashed_db"
18045 }
18046
18047 test "x/opt" != "x$prefix" && \
18048 test -d "/opt" && \
18049 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
18050         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
18051         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
18052         test -d /opt/lib/$with_hashed_db &&       cf_search="$cf_search /opt/lib/$with_hashed_db"
18053         test -d /opt/lib/$with_hashed_db/lib &&    cf_search="$cf_search /opt/lib/$with_hashed_db/lib"
18054         test -d /opt/$with_hashed_db/lib &&       cf_search="$cf_search /opt/$with_hashed_db/lib"
18055         test -d /opt/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /opt/$with_hashed_db/lib/$with_hashed_db"
18056 }
18057
18058 test "x$HOME" != "x$prefix" && \
18059 test -d "$HOME" && \
18060 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
18061         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
18062         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
18063         test -d $HOME/lib/$with_hashed_db &&       cf_search="$cf_search $HOME/lib/$with_hashed_db"
18064         test -d $HOME/lib/$with_hashed_db/lib &&    cf_search="$cf_search $HOME/lib/$with_hashed_db/lib"
18065         test -d $HOME/$with_hashed_db/lib &&       cf_search="$cf_search $HOME/$with_hashed_db/lib"
18066         test -d $HOME/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $HOME/$with_hashed_db/lib/$with_hashed_db"
18067 }
18068
18069         for cf_item in $cf_search
18070         do
18071                 case $cf_item in #(vi
18072                 */$with_hashed_db)
18073
18074 if test -n "$cf_item" ; then
18075   for cf_add_libdir in $cf_item
18076   do
18077     if test $cf_add_libdir = /usr/lib ; then
18078       :
18079     elif test -d $cf_add_libdir
18080     then
18081       cf_have_libdir=no
18082       if test -n "$LDFLAGS$LIBS" ; then
18083         # a loop is needed to ensure we can add subdirs of existing dirs
18084         for cf_test_libdir in $LDFLAGS $LIBS ; do
18085           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18086             cf_have_libdir=yes; break
18087           fi
18088         done
18089       fi
18090       if test "$cf_have_libdir" = no ; then
18091         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18092
18093 echo "${as_me:-configure}:18093: testing adding $cf_add_libdir to library-path ..." 1>&5
18094
18095         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18096       fi
18097     fi
18098   done
18099 fi
18100
18101                         ;;
18102                 esac
18103         done
18104
18105                         ;;
18106                 esac
18107     fi
18108 esac
18109
18110 echo "$as_me:18110: checking for db.h" >&5
18111 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18112 if test "${ac_cv_header_db_h+set}" = set; then
18113   echo $ECHO_N "(cached) $ECHO_C" >&6
18114 else
18115   cat >conftest.$ac_ext <<_ACEOF
18116 #line 18116 "configure"
18117 #include "confdefs.h"
18118 #include <db.h>
18119 _ACEOF
18120 if { (eval echo "$as_me:18120: \"$ac_cpp conftest.$ac_ext\"") >&5
18121   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18122   ac_status=$?
18123   egrep -v '^ *\+' conftest.er1 >conftest.err
18124   rm -f conftest.er1
18125   cat conftest.err >&5
18126   echo "$as_me:18126: \$? = $ac_status" >&5
18127   (exit $ac_status); } >/dev/null; then
18128   if test -s conftest.err; then
18129     ac_cpp_err=$ac_c_preproc_warn_flag
18130   else
18131     ac_cpp_err=
18132   fi
18133 else
18134   ac_cpp_err=yes
18135 fi
18136 if test -z "$ac_cpp_err"; then
18137   ac_cv_header_db_h=yes
18138 else
18139   echo "$as_me: failed program was:" >&5
18140   cat conftest.$ac_ext >&5
18141   ac_cv_header_db_h=no
18142 fi
18143 rm -f conftest.err conftest.$ac_ext
18144 fi
18145 echo "$as_me:18145: result: $ac_cv_header_db_h" >&5
18146 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18147 if test $ac_cv_header_db_h = yes; then
18148
18149 echo "$as_me:18149: checking for version of db" >&5
18150 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18151 if test "${cf_cv_hashed_db_version+set}" = set; then
18152   echo $ECHO_N "(cached) $ECHO_C" >&6
18153 else
18154
18155 cf_cv_hashed_db_version=unknown
18156
18157 for cf_db_version in 1 2 3 4 5 6
18158 do
18159
18160 echo "${as_me:-configure}:18160: testing checking for db version $cf_db_version ..." 1>&5
18161
18162         cat >conftest.$ac_ext <<_ACEOF
18163 #line 18163 "configure"
18164 #include "confdefs.h"
18165
18166 $ac_includes_default
18167 #include <db.h>
18168
18169 #ifdef DB_VERSION_MAJOR
18170         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18171 #if $cf_db_version == DB_VERSION_MAJOR
18172         /* ok */
18173 #else
18174         make an error
18175 #endif
18176 #else
18177 #if $cf_db_version == 1
18178         /* ok: assuming this is DB 1.8.5 */
18179 #else
18180         make an error
18181 #endif
18182 #endif
18183
18184 int
18185 main ()
18186 {
18187 DBT *foo = 0
18188   ;
18189   return 0;
18190 }
18191 _ACEOF
18192 rm -f conftest.$ac_objext
18193 if { (eval echo "$as_me:18193: \"$ac_compile\"") >&5
18194   (eval $ac_compile) 2>&5
18195   ac_status=$?
18196   echo "$as_me:18196: \$? = $ac_status" >&5
18197   (exit $ac_status); } &&
18198          { ac_try='test -s conftest.$ac_objext'
18199   { (eval echo "$as_me:18199: \"$ac_try\"") >&5
18200   (eval $ac_try) 2>&5
18201   ac_status=$?
18202   echo "$as_me:18202: \$? = $ac_status" >&5
18203   (exit $ac_status); }; }; then
18204
18205         cf_cv_hashed_db_version=$cf_db_version
18206         break
18207
18208 else
18209   echo "$as_me: failed program was:" >&5
18210 cat conftest.$ac_ext >&5
18211 fi
18212 rm -f conftest.$ac_objext conftest.$ac_ext
18213 done
18214
18215 fi
18216 echo "$as_me:18216: result: $cf_cv_hashed_db_version" >&5
18217 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
18218
18219 if test "$cf_cv_hashed_db_version" = unknown ; then
18220         { { echo "$as_me:18220: error: Cannot determine version of db" >&5
18221 echo "$as_me: error: Cannot determine version of db" >&2;}
18222    { (exit 1); exit 1; }; }
18223 else
18224
18225 echo "$as_me:18225: checking for db libraries" >&5
18226 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
18227 if test "${cf_cv_hashed_db_libs+set}" = set; then
18228   echo $ECHO_N "(cached) $ECHO_C" >&6
18229 else
18230
18231 cf_cv_hashed_db_libs=unknown
18232 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
18233 do
18234         cf_save_libs="$LIBS"
18235         if test -n "$cf_db_libs"; then
18236                 LIBS="-l$cf_db_libs $LIBS"
18237         fi
18238
18239 echo "${as_me:-configure}:18239: testing checking for library "$cf_db_libs" ..." 1>&5
18240
18241         cat >conftest.$ac_ext <<_ACEOF
18242 #line 18242 "configure"
18243 #include "confdefs.h"
18244
18245 $ac_includes_default
18246 #include <db.h>
18247
18248 int
18249 main ()
18250 {
18251
18252         char *path = "/tmp/foo";
18253 #ifdef DB_VERSION_MAJOR
18254 #if DB_VERSION_MAJOR >= 4
18255         DB *result = 0;
18256         db_create(&result, NULL, 0);
18257         result->open(result,
18258                 NULL,
18259                 path,
18260                 path,
18261                 DB_HASH,
18262                 DB_CREATE,
18263                 0644);
18264 #elif DB_VERSION_MAJOR >= 3
18265         DB *result = 0;
18266         db_create(&result, NULL, 0);
18267         result->open(result,
18268                 path,
18269                 path,
18270                 DB_HASH,
18271                 DB_CREATE,
18272                 0644);
18273 #elif DB_VERSION_MAJOR >= 2
18274         DB *result = 0;
18275         db_open(path,
18276                 DB_HASH,
18277                 DB_CREATE,
18278                 0644,
18279                 (DB_ENV *) 0,
18280                 (DB_INFO *) 0,
18281                 &result);
18282 #endif /* DB_VERSION_MAJOR */
18283 #else
18284         DB *result = dbopen(path,
18285                      2,
18286                      0644,
18287                      DB_HASH,
18288                      0);
18289 #endif
18290         ${cf_cv_main_return:-return}(result != 0)
18291
18292   ;
18293   return 0;
18294 }
18295 _ACEOF
18296 rm -f conftest.$ac_objext conftest$ac_exeext
18297 if { (eval echo "$as_me:18297: \"$ac_link\"") >&5
18298   (eval $ac_link) 2>&5
18299   ac_status=$?
18300   echo "$as_me:18300: \$? = $ac_status" >&5
18301   (exit $ac_status); } &&
18302          { ac_try='test -s conftest$ac_exeext'
18303   { (eval echo "$as_me:18303: \"$ac_try\"") >&5
18304   (eval $ac_try) 2>&5
18305   ac_status=$?
18306   echo "$as_me:18306: \$? = $ac_status" >&5
18307   (exit $ac_status); }; }; then
18308
18309         if test -n "$cf_db_libs" ; then
18310                 cf_cv_hashed_db_libs=$cf_db_libs
18311         else
18312                 cf_cv_hashed_db_libs=default
18313         fi
18314         LIBS="$cf_save_libs"
18315         break
18316
18317 else
18318   echo "$as_me: failed program was:" >&5
18319 cat conftest.$ac_ext >&5
18320 fi
18321 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18322         LIBS="$cf_save_libs"
18323 done
18324
18325 fi
18326 echo "$as_me:18326: result: $cf_cv_hashed_db_libs" >&5
18327 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
18328
18329         if test "$cf_cv_hashed_db_libs" = unknown ; then
18330                 { { echo "$as_me:18330: error: Cannot determine library for db" >&5
18331 echo "$as_me: error: Cannot determine library for db" >&2;}
18332    { (exit 1); exit 1; }; }
18333         elif test "$cf_cv_hashed_db_libs" != default ; then
18334                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
18335         fi
18336 fi
18337
18338 else
18339
18340         { { echo "$as_me:18340: error: Cannot find db.h" >&5
18341 echo "$as_me: error: Cannot find db.h" >&2;}
18342    { (exit 1); exit 1; }; }
18343
18344 fi
18345
18346 fi
18347
18348 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
18349         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18350         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18351 fi
18352
18353 # Just in case, check if the C compiler has a bool type.
18354
18355 echo "$as_me:18355: checking if we should include stdbool.h" >&5
18356 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18357
18358 if test "${cf_cv_header_stdbool_h+set}" = set; then
18359   echo $ECHO_N "(cached) $ECHO_C" >&6
18360 else
18361
18362         cat >conftest.$ac_ext <<_ACEOF
18363 #line 18363 "configure"
18364 #include "confdefs.h"
18365
18366 int
18367 main ()
18368 {
18369 bool foo = false
18370   ;
18371   return 0;
18372 }
18373 _ACEOF
18374 rm -f conftest.$ac_objext
18375 if { (eval echo "$as_me:18375: \"$ac_compile\"") >&5
18376   (eval $ac_compile) 2>&5
18377   ac_status=$?
18378   echo "$as_me:18378: \$? = $ac_status" >&5
18379   (exit $ac_status); } &&
18380          { ac_try='test -s conftest.$ac_objext'
18381   { (eval echo "$as_me:18381: \"$ac_try\"") >&5
18382   (eval $ac_try) 2>&5
18383   ac_status=$?
18384   echo "$as_me:18384: \$? = $ac_status" >&5
18385   (exit $ac_status); }; }; then
18386   cf_cv_header_stdbool_h=0
18387 else
18388   echo "$as_me: failed program was:" >&5
18389 cat conftest.$ac_ext >&5
18390 cat >conftest.$ac_ext <<_ACEOF
18391 #line 18391 "configure"
18392 #include "confdefs.h"
18393
18394 #ifndef __BEOS__
18395 #include <stdbool.h>
18396 #endif
18397
18398 int
18399 main ()
18400 {
18401 bool foo = false
18402   ;
18403   return 0;
18404 }
18405 _ACEOF
18406 rm -f conftest.$ac_objext
18407 if { (eval echo "$as_me:18407: \"$ac_compile\"") >&5
18408   (eval $ac_compile) 2>&5
18409   ac_status=$?
18410   echo "$as_me:18410: \$? = $ac_status" >&5
18411   (exit $ac_status); } &&
18412          { ac_try='test -s conftest.$ac_objext'
18413   { (eval echo "$as_me:18413: \"$ac_try\"") >&5
18414   (eval $ac_try) 2>&5
18415   ac_status=$?
18416   echo "$as_me:18416: \$? = $ac_status" >&5
18417   (exit $ac_status); }; }; then
18418   cf_cv_header_stdbool_h=1
18419 else
18420   echo "$as_me: failed program was:" >&5
18421 cat conftest.$ac_ext >&5
18422 cf_cv_header_stdbool_h=0
18423 fi
18424 rm -f conftest.$ac_objext conftest.$ac_ext
18425 fi
18426 rm -f conftest.$ac_objext conftest.$ac_ext
18427 fi
18428
18429 if test "$cf_cv_header_stdbool_h" = 1
18430 then    echo "$as_me:18430: result: yes" >&5
18431 echo "${ECHO_T}yes" >&6
18432 else    echo "$as_me:18432: result: no" >&5
18433 echo "${ECHO_T}no" >&6
18434 fi
18435
18436 echo "$as_me:18436: checking for builtin bool type" >&5
18437 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18438
18439 if test "${cf_cv_cc_bool_type+set}" = set; then
18440   echo $ECHO_N "(cached) $ECHO_C" >&6
18441 else
18442
18443         cat >conftest.$ac_ext <<_ACEOF
18444 #line 18444 "configure"
18445 #include "confdefs.h"
18446
18447 #include <stdio.h>
18448 #include <sys/types.h>
18449
18450 int
18451 main ()
18452 {
18453 bool x = false
18454   ;
18455   return 0;
18456 }
18457 _ACEOF
18458 rm -f conftest.$ac_objext
18459 if { (eval echo "$as_me:18459: \"$ac_compile\"") >&5
18460   (eval $ac_compile) 2>&5
18461   ac_status=$?
18462   echo "$as_me:18462: \$? = $ac_status" >&5
18463   (exit $ac_status); } &&
18464          { ac_try='test -s conftest.$ac_objext'
18465   { (eval echo "$as_me:18465: \"$ac_try\"") >&5
18466   (eval $ac_try) 2>&5
18467   ac_status=$?
18468   echo "$as_me:18468: \$? = $ac_status" >&5
18469   (exit $ac_status); }; }; then
18470   cf_cv_cc_bool_type=1
18471 else
18472   echo "$as_me: failed program was:" >&5
18473 cat conftest.$ac_ext >&5
18474 cf_cv_cc_bool_type=0
18475 fi
18476 rm -f conftest.$ac_objext conftest.$ac_ext
18477
18478 fi
18479
18480 if test "$cf_cv_cc_bool_type" = 1
18481 then    echo "$as_me:18481: result: yes" >&5
18482 echo "${ECHO_T}yes" >&6
18483 else    echo "$as_me:18483: result: no" >&5
18484 echo "${ECHO_T}no" >&6
18485 fi
18486
18487 # Check for C++ compiler characteristics (and ensure that it's there!)
18488 if test -n "$CXX" ; then
18489         ac_ext=cc
18490 ac_cpp='$CXXCPP $CPPFLAGS'
18491 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18492 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18493 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18494 ac_main_return=return
18495
18496 if test -n "$GXX" ; then
18497 case $cf_cv_system_name in #(vi
18498 os2*) #(vi
18499         cf_stdcpp_libname=stdcpp
18500         ;;
18501 *)
18502         cf_stdcpp_libname=stdc++
18503         ;;
18504 esac
18505 echo "$as_me:18505: checking for library $cf_stdcpp_libname" >&5
18506 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
18507 if test "${cf_cv_libstdcpp+set}" = set; then
18508   echo $ECHO_N "(cached) $ECHO_C" >&6
18509 else
18510
18511         cf_save="$LIBS"
18512         LIBS="-l$cf_stdcpp_libname $LIBS"
18513 cat >conftest.$ac_ext <<_ACEOF
18514 #line 18514 "configure"
18515 #include "confdefs.h"
18516
18517 #include <strstream.h>
18518 int
18519 main ()
18520 {
18521
18522 char buf[80];
18523 strstreambuf foo(buf, sizeof(buf))
18524
18525   ;
18526   return 0;
18527 }
18528 _ACEOF
18529 rm -f conftest.$ac_objext conftest$ac_exeext
18530 if { (eval echo "$as_me:18530: \"$ac_link\"") >&5
18531   (eval $ac_link) 2>&5
18532   ac_status=$?
18533   echo "$as_me:18533: \$? = $ac_status" >&5
18534   (exit $ac_status); } &&
18535          { ac_try='test -s conftest$ac_exeext'
18536   { (eval echo "$as_me:18536: \"$ac_try\"") >&5
18537   (eval $ac_try) 2>&5
18538   ac_status=$?
18539   echo "$as_me:18539: \$? = $ac_status" >&5
18540   (exit $ac_status); }; }; then
18541   cf_cv_libstdcpp=yes
18542 else
18543   echo "$as_me: failed program was:" >&5
18544 cat conftest.$ac_ext >&5
18545 cf_cv_libstdcpp=no
18546 fi
18547 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18548         LIBS="$cf_save"
18549
18550 fi
18551 echo "$as_me:18551: result: $cf_cv_libstdcpp" >&5
18552 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18553 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
18554 fi
18555
18556         echo "$as_me:18556: checking whether $CXX understands -c and -o together" >&5
18557 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18558 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18559   echo $ECHO_N "(cached) $ECHO_C" >&6
18560 else
18561
18562 cat > conftest.$ac_ext <<CF_EOF
18563 #include <stdio.h>
18564 int main()
18565 {
18566         ${cf_cv_main_return:-return}(0);
18567 }
18568 CF_EOF
18569 # We do the test twice because some compilers refuse to overwrite an
18570 # existing .o file with -o, though they will create one.
18571 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18572 if { (eval echo "$as_me:18572: \"$ac_try\"") >&5
18573   (eval $ac_try) 2>&5
18574   ac_status=$?
18575   echo "$as_me:18575: \$? = $ac_status" >&5
18576   (exit $ac_status); } &&
18577   test -f conftest2.$ac_objext && { (eval echo "$as_me:18577: \"$ac_try\"") >&5
18578   (eval $ac_try) 2>&5
18579   ac_status=$?
18580   echo "$as_me:18580: \$? = $ac_status" >&5
18581   (exit $ac_status); };
18582 then
18583   eval cf_cv_prog_CXX_c_o=yes
18584 else
18585   eval cf_cv_prog_CXX_c_o=no
18586 fi
18587 rm -rf conftest*
18588
18589 fi
18590 if test $cf_cv_prog_CXX_c_o = yes; then
18591   echo "$as_me:18591: result: yes" >&5
18592 echo "${ECHO_T}yes" >&6
18593 else
18594   echo "$as_me:18594: result: no" >&5
18595 echo "${ECHO_T}no" >&6
18596 fi
18597
18598         case $GXX_VERSION in
18599         1*|2.0-6*)
18600                 cf_cxx_library=yes
18601                 ;;
18602         *-2.7*|2.7*)
18603
18604 cf_cxx_library=unknown
18605 case $cf_cv_system_name in #(vi
18606 os2*) #(vi
18607         cf_gpp_libname=gpp
18608         ;;
18609 *)
18610         cf_gpp_libname=g++
18611         ;;
18612 esac
18613 if test "$GXX" = yes; then
18614         echo "$as_me:18614: checking for lib$cf_gpp_libname" >&5
18615 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18616         cf_save="$LIBS"
18617         LIBS="-l$cf_gpp_libname $LIBS"
18618         cat >conftest.$ac_ext <<_ACEOF
18619 #line 18619 "configure"
18620 #include "confdefs.h"
18621
18622 #include <$cf_gpp_libname/builtin.h>
18623
18624 int
18625 main ()
18626 {
18627 two_arg_error_handler_t foo2 = lib_error_handler
18628   ;
18629   return 0;
18630 }
18631 _ACEOF
18632 rm -f conftest.$ac_objext conftest$ac_exeext
18633 if { (eval echo "$as_me:18633: \"$ac_link\"") >&5
18634   (eval $ac_link) 2>&5
18635   ac_status=$?
18636   echo "$as_me:18636: \$? = $ac_status" >&5
18637   (exit $ac_status); } &&
18638          { ac_try='test -s conftest$ac_exeext'
18639   { (eval echo "$as_me:18639: \"$ac_try\"") >&5
18640   (eval $ac_try) 2>&5
18641   ac_status=$?
18642   echo "$as_me:18642: \$? = $ac_status" >&5
18643   (exit $ac_status); }; }; then
18644   cf_cxx_library=yes
18645          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18646          if test "$cf_gpp_libname" = cpp ; then
18647
18648 cat >>confdefs.h <<\EOF
18649 #define HAVE_GPP_BUILTIN_H 1
18650 EOF
18651
18652          else
18653
18654 cat >>confdefs.h <<\EOF
18655 #define HAVE_GXX_BUILTIN_H 1
18656 EOF
18657
18658          fi
18659 else
18660   echo "$as_me: failed program was:" >&5
18661 cat conftest.$ac_ext >&5
18662 cat >conftest.$ac_ext <<_ACEOF
18663 #line 18663 "configure"
18664 #include "confdefs.h"
18665
18666 #include <builtin.h>
18667
18668 int
18669 main ()
18670 {
18671 two_arg_error_handler_t foo2 = lib_error_handler
18672   ;
18673   return 0;
18674 }
18675 _ACEOF
18676 rm -f conftest.$ac_objext conftest$ac_exeext
18677 if { (eval echo "$as_me:18677: \"$ac_link\"") >&5
18678   (eval $ac_link) 2>&5
18679   ac_status=$?
18680   echo "$as_me:18680: \$? = $ac_status" >&5
18681   (exit $ac_status); } &&
18682          { ac_try='test -s conftest$ac_exeext'
18683   { (eval echo "$as_me:18683: \"$ac_try\"") >&5
18684   (eval $ac_try) 2>&5
18685   ac_status=$?
18686   echo "$as_me:18686: \$? = $ac_status" >&5
18687   (exit $ac_status); }; }; then
18688   cf_cxx_library=yes
18689          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18690
18691 cat >>confdefs.h <<\EOF
18692 #define HAVE_BUILTIN_H 1
18693 EOF
18694
18695 else
18696   echo "$as_me: failed program was:" >&5
18697 cat conftest.$ac_ext >&5
18698 cf_cxx_library=no
18699 fi
18700 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18701 fi
18702 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18703         LIBS="$cf_save"
18704         echo "$as_me:18704: result: $cf_cxx_library" >&5
18705 echo "${ECHO_T}$cf_cxx_library" >&6
18706 fi
18707
18708                 ;;
18709         *)
18710                 cf_cxx_library=no
18711                 ;;
18712         esac
18713
18714         ac_ext=cc
18715 ac_cpp='$CXXCPP $CPPFLAGS'
18716 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18717 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18718 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18719 ac_main_return=return
18720 echo "$as_me:18720: checking how to run the C++ preprocessor" >&5
18721 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18722 if test -z "$CXXCPP"; then
18723   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18724   echo $ECHO_N "(cached) $ECHO_C" >&6
18725 else
18726       # Double quotes because CXXCPP needs to be expanded
18727     for CXXCPP in "$CXX -E" "/lib/cpp"
18728     do
18729       ac_preproc_ok=false
18730 for ac_cxx_preproc_warn_flag in '' yes
18731 do
18732   # Use a header file that comes with gcc, so configuring glibc
18733   # with a fresh cross-compiler works.
18734   # On the NeXT, cc -E runs the code through the compiler's parser,
18735   # not just through cpp. "Syntax error" is here to catch this case.
18736   cat >conftest.$ac_ext <<_ACEOF
18737 #line 18737 "configure"
18738 #include "confdefs.h"
18739 #include <assert.h>
18740                      Syntax error
18741 _ACEOF
18742 if { (eval echo "$as_me:18742: \"$ac_cpp conftest.$ac_ext\"") >&5
18743   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18744   ac_status=$?
18745   egrep -v '^ *\+' conftest.er1 >conftest.err
18746   rm -f conftest.er1
18747   cat conftest.err >&5
18748   echo "$as_me:18748: \$? = $ac_status" >&5
18749   (exit $ac_status); } >/dev/null; then
18750   if test -s conftest.err; then
18751     ac_cpp_err=$ac_cxx_preproc_warn_flag
18752   else
18753     ac_cpp_err=
18754   fi
18755 else
18756   ac_cpp_err=yes
18757 fi
18758 if test -z "$ac_cpp_err"; then
18759   :
18760 else
18761   echo "$as_me: failed program was:" >&5
18762   cat conftest.$ac_ext >&5
18763   # Broken: fails on valid input.
18764 continue
18765 fi
18766 rm -f conftest.err conftest.$ac_ext
18767
18768   # OK, works on sane cases.  Now check whether non-existent headers
18769   # can be detected and how.
18770   cat >conftest.$ac_ext <<_ACEOF
18771 #line 18771 "configure"
18772 #include "confdefs.h"
18773 #include <ac_nonexistent.h>
18774 _ACEOF
18775 if { (eval echo "$as_me:18775: \"$ac_cpp conftest.$ac_ext\"") >&5
18776   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18777   ac_status=$?
18778   egrep -v '^ *\+' conftest.er1 >conftest.err
18779   rm -f conftest.er1
18780   cat conftest.err >&5
18781   echo "$as_me:18781: \$? = $ac_status" >&5
18782   (exit $ac_status); } >/dev/null; then
18783   if test -s conftest.err; then
18784     ac_cpp_err=$ac_cxx_preproc_warn_flag
18785   else
18786     ac_cpp_err=
18787   fi
18788 else
18789   ac_cpp_err=yes
18790 fi
18791 if test -z "$ac_cpp_err"; then
18792   # Broken: success on invalid input.
18793 continue
18794 else
18795   echo "$as_me: failed program was:" >&5
18796   cat conftest.$ac_ext >&5
18797   # Passes both tests.
18798 ac_preproc_ok=:
18799 break
18800 fi
18801 rm -f conftest.err conftest.$ac_ext
18802
18803 done
18804 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18805 rm -f conftest.err conftest.$ac_ext
18806 if $ac_preproc_ok; then
18807   break
18808 fi
18809
18810     done
18811     ac_cv_prog_CXXCPP=$CXXCPP
18812
18813 fi
18814   CXXCPP=$ac_cv_prog_CXXCPP
18815 else
18816   ac_cv_prog_CXXCPP=$CXXCPP
18817 fi
18818 echo "$as_me:18818: result: $CXXCPP" >&5
18819 echo "${ECHO_T}$CXXCPP" >&6
18820 ac_preproc_ok=false
18821 for ac_cxx_preproc_warn_flag in '' yes
18822 do
18823   # Use a header file that comes with gcc, so configuring glibc
18824   # with a fresh cross-compiler works.
18825   # On the NeXT, cc -E runs the code through the compiler's parser,
18826   # not just through cpp. "Syntax error" is here to catch this case.
18827   cat >conftest.$ac_ext <<_ACEOF
18828 #line 18828 "configure"
18829 #include "confdefs.h"
18830 #include <assert.h>
18831                      Syntax error
18832 _ACEOF
18833 if { (eval echo "$as_me:18833: \"$ac_cpp conftest.$ac_ext\"") >&5
18834   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18835   ac_status=$?
18836   egrep -v '^ *\+' conftest.er1 >conftest.err
18837   rm -f conftest.er1
18838   cat conftest.err >&5
18839   echo "$as_me:18839: \$? = $ac_status" >&5
18840   (exit $ac_status); } >/dev/null; then
18841   if test -s conftest.err; then
18842     ac_cpp_err=$ac_cxx_preproc_warn_flag
18843   else
18844     ac_cpp_err=
18845   fi
18846 else
18847   ac_cpp_err=yes
18848 fi
18849 if test -z "$ac_cpp_err"; then
18850   :
18851 else
18852   echo "$as_me: failed program was:" >&5
18853   cat conftest.$ac_ext >&5
18854   # Broken: fails on valid input.
18855 continue
18856 fi
18857 rm -f conftest.err conftest.$ac_ext
18858
18859   # OK, works on sane cases.  Now check whether non-existent headers
18860   # can be detected and how.
18861   cat >conftest.$ac_ext <<_ACEOF
18862 #line 18862 "configure"
18863 #include "confdefs.h"
18864 #include <ac_nonexistent.h>
18865 _ACEOF
18866 if { (eval echo "$as_me:18866: \"$ac_cpp conftest.$ac_ext\"") >&5
18867   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18868   ac_status=$?
18869   egrep -v '^ *\+' conftest.er1 >conftest.err
18870   rm -f conftest.er1
18871   cat conftest.err >&5
18872   echo "$as_me:18872: \$? = $ac_status" >&5
18873   (exit $ac_status); } >/dev/null; then
18874   if test -s conftest.err; then
18875     ac_cpp_err=$ac_cxx_preproc_warn_flag
18876   else
18877     ac_cpp_err=
18878   fi
18879 else
18880   ac_cpp_err=yes
18881 fi
18882 if test -z "$ac_cpp_err"; then
18883   # Broken: success on invalid input.
18884 continue
18885 else
18886   echo "$as_me: failed program was:" >&5
18887   cat conftest.$ac_ext >&5
18888   # Passes both tests.
18889 ac_preproc_ok=:
18890 break
18891 fi
18892 rm -f conftest.err conftest.$ac_ext
18893
18894 done
18895 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18896 rm -f conftest.err conftest.$ac_ext
18897 if $ac_preproc_ok; then
18898   :
18899 else
18900   { { echo "$as_me:18900: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18901 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18902    { (exit 1); exit 1; }; }
18903 fi
18904
18905 ac_ext=cc
18906 ac_cpp='$CXXCPP $CPPFLAGS'
18907 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18908 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18909 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18910 ac_main_return=return
18911
18912 for ac_header in typeinfo
18913 do
18914 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18915 echo "$as_me:18915: checking for $ac_header" >&5
18916 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18917 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18918   echo $ECHO_N "(cached) $ECHO_C" >&6
18919 else
18920   cat >conftest.$ac_ext <<_ACEOF
18921 #line 18921 "configure"
18922 #include "confdefs.h"
18923 #include <$ac_header>
18924 _ACEOF
18925 if { (eval echo "$as_me:18925: \"$ac_cpp conftest.$ac_ext\"") >&5
18926   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18927   ac_status=$?
18928   egrep -v '^ *\+' conftest.er1 >conftest.err
18929   rm -f conftest.er1
18930   cat conftest.err >&5
18931   echo "$as_me:18931: \$? = $ac_status" >&5
18932   (exit $ac_status); } >/dev/null; then
18933   if test -s conftest.err; then
18934     ac_cpp_err=$ac_cxx_preproc_warn_flag
18935   else
18936     ac_cpp_err=
18937   fi
18938 else
18939   ac_cpp_err=yes
18940 fi
18941 if test -z "$ac_cpp_err"; then
18942   eval "$as_ac_Header=yes"
18943 else
18944   echo "$as_me: failed program was:" >&5
18945   cat conftest.$ac_ext >&5
18946   eval "$as_ac_Header=no"
18947 fi
18948 rm -f conftest.err conftest.$ac_ext
18949 fi
18950 echo "$as_me:18950: result: `eval echo '${'$as_ac_Header'}'`" >&5
18951 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18952 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18953   cat >>confdefs.h <<EOF
18954 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18955 EOF
18956
18957 fi
18958 done
18959
18960 for ac_header in iostream
18961 do
18962 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18963 echo "$as_me:18963: checking for $ac_header" >&5
18964 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18965 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18966   echo $ECHO_N "(cached) $ECHO_C" >&6
18967 else
18968   cat >conftest.$ac_ext <<_ACEOF
18969 #line 18969 "configure"
18970 #include "confdefs.h"
18971 #include <$ac_header>
18972 _ACEOF
18973 if { (eval echo "$as_me:18973: \"$ac_cpp conftest.$ac_ext\"") >&5
18974   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18975   ac_status=$?
18976   egrep -v '^ *\+' conftest.er1 >conftest.err
18977   rm -f conftest.er1
18978   cat conftest.err >&5
18979   echo "$as_me:18979: \$? = $ac_status" >&5
18980   (exit $ac_status); } >/dev/null; then
18981   if test -s conftest.err; then
18982     ac_cpp_err=$ac_cxx_preproc_warn_flag
18983   else
18984     ac_cpp_err=
18985   fi
18986 else
18987   ac_cpp_err=yes
18988 fi
18989 if test -z "$ac_cpp_err"; then
18990   eval "$as_ac_Header=yes"
18991 else
18992   echo "$as_me: failed program was:" >&5
18993   cat conftest.$ac_ext >&5
18994   eval "$as_ac_Header=no"
18995 fi
18996 rm -f conftest.err conftest.$ac_ext
18997 fi
18998 echo "$as_me:18998: result: `eval echo '${'$as_ac_Header'}'`" >&5
18999 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19000 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19001   cat >>confdefs.h <<EOF
19002 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19003 EOF
19004
19005 fi
19006 done
19007
19008 if test x"$ac_cv_header_iostream" = xyes ; then
19009         echo "$as_me:19009: checking if iostream uses std-namespace" >&5
19010 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
19011         cat >conftest.$ac_ext <<_ACEOF
19012 #line 19012 "configure"
19013 #include "confdefs.h"
19014
19015 #include <iostream>
19016 using std::endl;
19017 using std::cerr;
19018 int
19019 main ()
19020 {
19021
19022 cerr << "testing" << endl;
19023
19024   ;
19025   return 0;
19026 }
19027 _ACEOF
19028 rm -f conftest.$ac_objext
19029 if { (eval echo "$as_me:19029: \"$ac_compile\"") >&5
19030   (eval $ac_compile) 2>&5
19031   ac_status=$?
19032   echo "$as_me:19032: \$? = $ac_status" >&5
19033   (exit $ac_status); } &&
19034          { ac_try='test -s conftest.$ac_objext'
19035   { (eval echo "$as_me:19035: \"$ac_try\"") >&5
19036   (eval $ac_try) 2>&5
19037   ac_status=$?
19038   echo "$as_me:19038: \$? = $ac_status" >&5
19039   (exit $ac_status); }; }; then
19040   cf_iostream_namespace=yes
19041 else
19042   echo "$as_me: failed program was:" >&5
19043 cat conftest.$ac_ext >&5
19044 cf_iostream_namespace=no
19045 fi
19046 rm -f conftest.$ac_objext conftest.$ac_ext
19047         echo "$as_me:19047: result: $cf_iostream_namespace" >&5
19048 echo "${ECHO_T}$cf_iostream_namespace" >&6
19049         if test "$cf_iostream_namespace" = yes ; then
19050
19051 cat >>confdefs.h <<\EOF
19052 #define IOSTREAM_NAMESPACE 1
19053 EOF
19054
19055         fi
19056 fi
19057
19058 echo "$as_me:19058: checking if we should include stdbool.h" >&5
19059 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19060
19061 if test "${cf_cv_header_stdbool_h+set}" = set; then
19062   echo $ECHO_N "(cached) $ECHO_C" >&6
19063 else
19064
19065         cat >conftest.$ac_ext <<_ACEOF
19066 #line 19066 "configure"
19067 #include "confdefs.h"
19068
19069 int
19070 main ()
19071 {
19072 bool foo = false
19073   ;
19074   return 0;
19075 }
19076 _ACEOF
19077 rm -f conftest.$ac_objext
19078 if { (eval echo "$as_me:19078: \"$ac_compile\"") >&5
19079   (eval $ac_compile) 2>&5
19080   ac_status=$?
19081   echo "$as_me:19081: \$? = $ac_status" >&5
19082   (exit $ac_status); } &&
19083          { ac_try='test -s conftest.$ac_objext'
19084   { (eval echo "$as_me:19084: \"$ac_try\"") >&5
19085   (eval $ac_try) 2>&5
19086   ac_status=$?
19087   echo "$as_me:19087: \$? = $ac_status" >&5
19088   (exit $ac_status); }; }; then
19089   cf_cv_header_stdbool_h=0
19090 else
19091   echo "$as_me: failed program was:" >&5
19092 cat conftest.$ac_ext >&5
19093 cat >conftest.$ac_ext <<_ACEOF
19094 #line 19094 "configure"
19095 #include "confdefs.h"
19096
19097 #ifndef __BEOS__
19098 #include <stdbool.h>
19099 #endif
19100
19101 int
19102 main ()
19103 {
19104 bool foo = false
19105   ;
19106   return 0;
19107 }
19108 _ACEOF
19109 rm -f conftest.$ac_objext
19110 if { (eval echo "$as_me:19110: \"$ac_compile\"") >&5
19111   (eval $ac_compile) 2>&5
19112   ac_status=$?
19113   echo "$as_me:19113: \$? = $ac_status" >&5
19114   (exit $ac_status); } &&
19115          { ac_try='test -s conftest.$ac_objext'
19116   { (eval echo "$as_me:19116: \"$ac_try\"") >&5
19117   (eval $ac_try) 2>&5
19118   ac_status=$?
19119   echo "$as_me:19119: \$? = $ac_status" >&5
19120   (exit $ac_status); }; }; then
19121   cf_cv_header_stdbool_h=1
19122 else
19123   echo "$as_me: failed program was:" >&5
19124 cat conftest.$ac_ext >&5
19125 cf_cv_header_stdbool_h=0
19126 fi
19127 rm -f conftest.$ac_objext conftest.$ac_ext
19128 fi
19129 rm -f conftest.$ac_objext conftest.$ac_ext
19130 fi
19131
19132 if test "$cf_cv_header_stdbool_h" = 1
19133 then    echo "$as_me:19133: result: yes" >&5
19134 echo "${ECHO_T}yes" >&6
19135 else    echo "$as_me:19135: result: no" >&5
19136 echo "${ECHO_T}no" >&6
19137 fi
19138
19139 echo "$as_me:19139: checking for builtin bool type" >&5
19140 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19141
19142 if test "${cf_cv_builtin_bool+set}" = set; then
19143   echo $ECHO_N "(cached) $ECHO_C" >&6
19144 else
19145
19146         cat >conftest.$ac_ext <<_ACEOF
19147 #line 19147 "configure"
19148 #include "confdefs.h"
19149
19150 #include <stdio.h>
19151 #include <sys/types.h>
19152
19153 int
19154 main ()
19155 {
19156 bool x = false
19157   ;
19158   return 0;
19159 }
19160 _ACEOF
19161 rm -f conftest.$ac_objext
19162 if { (eval echo "$as_me:19162: \"$ac_compile\"") >&5
19163   (eval $ac_compile) 2>&5
19164   ac_status=$?
19165   echo "$as_me:19165: \$? = $ac_status" >&5
19166   (exit $ac_status); } &&
19167          { ac_try='test -s conftest.$ac_objext'
19168   { (eval echo "$as_me:19168: \"$ac_try\"") >&5
19169   (eval $ac_try) 2>&5
19170   ac_status=$?
19171   echo "$as_me:19171: \$? = $ac_status" >&5
19172   (exit $ac_status); }; }; then
19173   cf_cv_builtin_bool=1
19174 else
19175   echo "$as_me: failed program was:" >&5
19176 cat conftest.$ac_ext >&5
19177 cf_cv_builtin_bool=0
19178 fi
19179 rm -f conftest.$ac_objext conftest.$ac_ext
19180
19181 fi
19182
19183 if test "$cf_cv_builtin_bool" = 1
19184 then    echo "$as_me:19184: result: yes" >&5
19185 echo "${ECHO_T}yes" >&6
19186 else    echo "$as_me:19186: result: no" >&5
19187 echo "${ECHO_T}no" >&6
19188 fi
19189
19190 echo "$as_me:19190: checking for size of bool" >&5
19191 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19192 if test "${cf_cv_type_of_bool+set}" = set; then
19193   echo $ECHO_N "(cached) $ECHO_C" >&6
19194 else
19195
19196         rm -f cf_test.out
19197         if test "$cross_compiling" = yes; then
19198   cf_cv_type_of_bool=unknown
19199 else
19200   cat >conftest.$ac_ext <<_ACEOF
19201 #line 19201 "configure"
19202 #include "confdefs.h"
19203
19204 #include <stdlib.h>
19205 #include <stdio.h>
19206
19207 #if defined(__cplusplus)
19208
19209 #ifdef HAVE_GXX_BUILTIN_H
19210 #include <g++/builtin.h>
19211 #elif HAVE_GPP_BUILTIN_H
19212 #include <gpp/builtin.h>
19213 #elif HAVE_BUILTIN_H
19214 #include <builtin.h>
19215 #endif
19216
19217 #else
19218
19219 #if $cf_cv_header_stdbool_h
19220 #include <stdbool.h>
19221 #endif
19222
19223 #endif
19224
19225 int main()
19226 {
19227         FILE *fp = fopen("cf_test.out", "w");
19228         if (fp != 0) {
19229                 bool x = true;
19230                 if ((bool)(-x) >= 0)
19231                         fputs("unsigned ", fp);
19232                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19233                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19234                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19235                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19236                 fclose(fp);
19237         }
19238         ${cf_cv_main_return:-return}(0);
19239 }
19240
19241 _ACEOF
19242 rm -f conftest$ac_exeext
19243 if { (eval echo "$as_me:19243: \"$ac_link\"") >&5
19244   (eval $ac_link) 2>&5
19245   ac_status=$?
19246   echo "$as_me:19246: \$? = $ac_status" >&5
19247   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19248   { (eval echo "$as_me:19248: \"$ac_try\"") >&5
19249   (eval $ac_try) 2>&5
19250   ac_status=$?
19251   echo "$as_me:19251: \$? = $ac_status" >&5
19252   (exit $ac_status); }; }; then
19253   cf_cv_type_of_bool=`cat cf_test.out`
19254                  if test -z "$cf_cv_type_of_bool"; then
19255                    cf_cv_type_of_bool=unknown
19256                  fi
19257 else
19258   echo "$as_me: program exited with status $ac_status" >&5
19259 echo "$as_me: failed program was:" >&5
19260 cat conftest.$ac_ext >&5
19261 cf_cv_type_of_bool=unknown
19262 fi
19263 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19264 fi
19265
19266 fi
19267
19268         rm -f cf_test.out
19269 echo "$as_me:19269: result: $cf_cv_type_of_bool" >&5
19270 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19271 if test "$cf_cv_type_of_bool" = unknown ; then
19272         case .$NCURSES_BOOL in #(vi
19273         .auto|.) NCURSES_BOOL=unsigned;;
19274         esac
19275         { echo "$as_me:19275: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19276 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19277         cf_cv_type_of_bool=$NCURSES_BOOL
19278 fi
19279
19280 echo "$as_me:19280: checking for special defines needed for etip.h" >&5
19281 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
19282 cf_save_CXXFLAGS="$CXXFLAGS"
19283 cf_result="none"
19284
19285 # etip.h includes ncurses.h which includes ncurses_dll.h
19286 # But ncurses_dll.h is generated - fix here.
19287 test -d include || mkdir include
19288 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
19289
19290 for cf_math in "" MATH_H
19291 do
19292 for cf_excp in "" MATH_EXCEPTION
19293 do
19294         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
19295         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
19296         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
19297 cat >conftest.$ac_ext <<_ACEOF
19298 #line 19298 "configure"
19299 #include "confdefs.h"
19300
19301 #include <etip.h.in>
19302
19303 int
19304 main ()
19305 {
19306
19307   ;
19308   return 0;
19309 }
19310 _ACEOF
19311 rm -f conftest.$ac_objext
19312 if { (eval echo "$as_me:19312: \"$ac_compile\"") >&5
19313   (eval $ac_compile) 2>&5
19314   ac_status=$?
19315   echo "$as_me:19315: \$? = $ac_status" >&5
19316   (exit $ac_status); } &&
19317          { ac_try='test -s conftest.$ac_objext'
19318   { (eval echo "$as_me:19318: \"$ac_try\"") >&5
19319   (eval $ac_try) 2>&5
19320   ac_status=$?
19321   echo "$as_me:19321: \$? = $ac_status" >&5
19322   (exit $ac_status); }; }; then
19323
19324         test -n "$cf_math" && cat >>confdefs.h <<EOF
19325 #define ETIP_NEEDS_${cf_math} 1
19326 EOF
19327
19328         test -n "$cf_excp" && cat >>confdefs.h <<EOF
19329 #define ETIP_NEEDS_${cf_excp} 1
19330 EOF
19331
19332         cf_result="$cf_math $cf_excp"
19333         break 2
19334
19335 else
19336   echo "$as_me: failed program was:" >&5
19337 cat conftest.$ac_ext >&5
19338 fi
19339 rm -f conftest.$ac_objext conftest.$ac_ext
19340 done
19341 done
19342 echo "$as_me:19342: result: $cf_result" >&5
19343 echo "${ECHO_T}$cf_result" >&6
19344 CXXFLAGS="$cf_save_CXXFLAGS"
19345
19346 if test -n "$CXX"; then
19347 echo "$as_me:19347: checking if $CXX accepts parameter initialization" >&5
19348 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
19349 if test "${cf_cv_cpp_param_init+set}" = set; then
19350   echo $ECHO_N "(cached) $ECHO_C" >&6
19351 else
19352
19353         ac_ext=cc
19354 ac_cpp='$CXXCPP $CPPFLAGS'
19355 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19356 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19357 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19358 ac_main_return=return
19359
19360         if test "$cross_compiling" = yes; then
19361   cf_cv_cpp_param_init=unknown
19362 else
19363   cat >conftest.$ac_ext <<_ACEOF
19364 #line 19364 "configure"
19365 #include "confdefs.h"
19366
19367 class TEST {
19368 private:
19369         int value;
19370 public:
19371         TEST(int x = 1);
19372         ~TEST();
19373 };
19374
19375 TEST::TEST(int x = 1)   // some compilers do not like second initializer
19376 {
19377         value = x;
19378 }
19379 int main() { }
19380
19381 _ACEOF
19382 rm -f conftest$ac_exeext
19383 if { (eval echo "$as_me:19383: \"$ac_link\"") >&5
19384   (eval $ac_link) 2>&5
19385   ac_status=$?
19386   echo "$as_me:19386: \$? = $ac_status" >&5
19387   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19388   { (eval echo "$as_me:19388: \"$ac_try\"") >&5
19389   (eval $ac_try) 2>&5
19390   ac_status=$?
19391   echo "$as_me:19391: \$? = $ac_status" >&5
19392   (exit $ac_status); }; }; then
19393   cf_cv_cpp_param_init=yes
19394 else
19395   echo "$as_me: program exited with status $ac_status" >&5
19396 echo "$as_me: failed program was:" >&5
19397 cat conftest.$ac_ext >&5
19398 cf_cv_cpp_param_init=no
19399 fi
19400 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19401 fi
19402         ac_ext=cc
19403 ac_cpp='$CXXCPP $CPPFLAGS'
19404 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19405 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19406 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19407 ac_main_return=return
19408
19409 fi
19410 echo "$as_me:19410: result: $cf_cv_cpp_param_init" >&5
19411 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
19412 fi
19413 test "$cf_cv_cpp_param_init" = yes &&
19414 cat >>confdefs.h <<\EOF
19415 #define CPP_HAS_PARAM_INIT 1
19416 EOF
19417
19418 if test -n "$CXX"; then
19419
19420 echo "$as_me:19420: checking if $CXX accepts static_cast" >&5
19421 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
19422 if test "${cf_cv_cpp_static_cast+set}" = set; then
19423   echo $ECHO_N "(cached) $ECHO_C" >&6
19424 else
19425
19426         ac_ext=cc
19427 ac_cpp='$CXXCPP $CPPFLAGS'
19428 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19429 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19430 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19431 ac_main_return=return
19432
19433         cat >conftest.$ac_ext <<_ACEOF
19434 #line 19434 "configure"
19435 #include "confdefs.h"
19436
19437 class NCursesPanel
19438 {
19439 public:
19440   NCursesPanel(int nlines,
19441                int ncols,
19442                int begin_y = 0,
19443                int begin_x = 0)
19444   {
19445   }
19446   NCursesPanel();
19447   ~NCursesPanel();
19448 };
19449
19450 template<class T> class NCursesUserPanel : public NCursesPanel
19451 {
19452 public:
19453   NCursesUserPanel (int nlines,
19454                     int ncols,
19455                     int begin_y = 0,
19456                     int begin_x = 0,
19457                     const T* p_UserData = static_cast<T*>(0))
19458     : NCursesPanel (nlines, ncols, begin_y, begin_x)
19459   {
19460   };
19461   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
19462   {
19463   };
19464
19465   virtual ~NCursesUserPanel() {};
19466 };
19467
19468 int
19469 main ()
19470 {
19471
19472         const char* p_UserData = static_cast<char*>(0)
19473   ;
19474   return 0;
19475 }
19476 _ACEOF
19477 rm -f conftest.$ac_objext
19478 if { (eval echo "$as_me:19478: \"$ac_compile\"") >&5
19479   (eval $ac_compile) 2>&5
19480   ac_status=$?
19481   echo "$as_me:19481: \$? = $ac_status" >&5
19482   (exit $ac_status); } &&
19483          { ac_try='test -s conftest.$ac_objext'
19484   { (eval echo "$as_me:19484: \"$ac_try\"") >&5
19485   (eval $ac_try) 2>&5
19486   ac_status=$?
19487   echo "$as_me:19487: \$? = $ac_status" >&5
19488   (exit $ac_status); }; }; then
19489   cf_cv_cpp_static_cast=yes
19490 else
19491   echo "$as_me: failed program was:" >&5
19492 cat conftest.$ac_ext >&5
19493 cf_cv_cpp_static_cast=no
19494 fi
19495 rm -f conftest.$ac_objext conftest.$ac_ext
19496
19497         ac_ext=cc
19498 ac_cpp='$CXXCPP $CPPFLAGS'
19499 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19500 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19501 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19502 ac_main_return=return
19503
19504 fi
19505 echo "$as_me:19505: result: $cf_cv_cpp_static_cast" >&5
19506 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
19507
19508 fi
19509
19510 test "$cf_cv_cpp_static_cast" = yes &&
19511 cat >>confdefs.h <<\EOF
19512 #define CPP_HAS_STATIC_CAST 1
19513 EOF
19514
19515         CXX_AR='$(AR)'
19516         CXX_ARFLAGS='$(ARFLAGS)'
19517         case $cf_cv_system_name in #(vi
19518         irix*) #(vi
19519             if test "$GXX" != yes ; then
19520                 CXX_AR='$(CXX)'
19521                 CXX_ARFLAGS='-ar -o'
19522             fi
19523             ;;
19524         sco3.2v5*) #(vi
19525             CXXLDFLAGS="-u main"
19526             ;;
19527         solaris2*)
19528             if test "$GXX" != yes ; then
19529                 CXX_AR='$(CXX)'
19530                 CXX_ARFLAGS='-xar -o'
19531             fi
19532             ;;
19533         esac
19534
19535 else
19536         cf_cxx_library=no
19537         cf_cv_builtin_bool=1
19538
19539         # Just because we are not configuring against C++ right now does not
19540         # mean that a user will not want to use C++.  Some distributors disable
19541         # the C++ portion of this configuration as a shortcut (or just to avoid
19542         # compiling the demo in the c++ directory).  So we need a reasonable
19543         # default for the 'bool' type.
19544         #
19545         # Caveat: since the storage of the bool type is not standardized, it
19546         # may change.
19547
19548         if test "$NCURSES_BOOL" != auto ; then
19549                 cf_cv_type_of_bool=$NCURSES_BOOL
19550                 cf_cv_header_stdbool_h=0
19551         else
19552                 if test "$cf_cv_header_stdbool_h" = 1 ; then
19553
19554 echo "$as_me:19554: checking for size of bool" >&5
19555 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19556 if test "${cf_cv_type_of_bool+set}" = set; then
19557   echo $ECHO_N "(cached) $ECHO_C" >&6
19558 else
19559
19560         rm -f cf_test.out
19561         if test "$cross_compiling" = yes; then
19562   cf_cv_type_of_bool=unknown
19563 else
19564   cat >conftest.$ac_ext <<_ACEOF
19565 #line 19565 "configure"
19566 #include "confdefs.h"
19567
19568 #include <stdlib.h>
19569 #include <stdio.h>
19570
19571 #if defined(__cplusplus)
19572
19573 #ifdef HAVE_GXX_BUILTIN_H
19574 #include <g++/builtin.h>
19575 #elif HAVE_GPP_BUILTIN_H
19576 #include <gpp/builtin.h>
19577 #elif HAVE_BUILTIN_H
19578 #include <builtin.h>
19579 #endif
19580
19581 #else
19582
19583 #if $cf_cv_header_stdbool_h
19584 #include <stdbool.h>
19585 #endif
19586
19587 #endif
19588
19589 int main()
19590 {
19591         FILE *fp = fopen("cf_test.out", "w");
19592         if (fp != 0) {
19593                 bool x = true;
19594                 if ((bool)(-x) >= 0)
19595                         fputs("unsigned ", fp);
19596                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19597                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19598                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19599                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19600                 fclose(fp);
19601         }
19602         ${cf_cv_main_return:-return}(0);
19603 }
19604
19605 _ACEOF
19606 rm -f conftest$ac_exeext
19607 if { (eval echo "$as_me:19607: \"$ac_link\"") >&5
19608   (eval $ac_link) 2>&5
19609   ac_status=$?
19610   echo "$as_me:19610: \$? = $ac_status" >&5
19611   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19612   { (eval echo "$as_me:19612: \"$ac_try\"") >&5
19613   (eval $ac_try) 2>&5
19614   ac_status=$?
19615   echo "$as_me:19615: \$? = $ac_status" >&5
19616   (exit $ac_status); }; }; then
19617   cf_cv_type_of_bool=`cat cf_test.out`
19618                  if test -z "$cf_cv_type_of_bool"; then
19619                    cf_cv_type_of_bool=unknown
19620                  fi
19621 else
19622   echo "$as_me: program exited with status $ac_status" >&5
19623 echo "$as_me: failed program was:" >&5
19624 cat conftest.$ac_ext >&5
19625 cf_cv_type_of_bool=unknown
19626 fi
19627 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19628 fi
19629
19630 fi
19631
19632         rm -f cf_test.out
19633 echo "$as_me:19633: result: $cf_cv_type_of_bool" >&5
19634 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19635 if test "$cf_cv_type_of_bool" = unknown ; then
19636         case .$NCURSES_BOOL in #(vi
19637         .auto|.) NCURSES_BOOL=unsigned;;
19638         esac
19639         { echo "$as_me:19639: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19640 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19641         cf_cv_type_of_bool=$NCURSES_BOOL
19642 fi
19643
19644                 else
19645                         echo "$as_me:19645: checking for fallback type of bool" >&5
19646 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19647                         case "$host_cpu" in #(vi
19648                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19649                         *)      cf_cv_type_of_bool=int  ;;
19650                         esac
19651                         echo "$as_me:19651: result: $cf_cv_type_of_bool" >&5
19652 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19653                 fi
19654         fi
19655 fi
19656
19657 # If the C compiler did not declare bool, and we did not determine that the C++
19658 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19659 # ncurses library use the same type as C++ bool.  Note that this allows one to
19660 # specify the type of bool in a configure-script option and postpone
19661 # integration with the C++ compiler provided that the types are compatible.
19662 USE_CXX_BOOL=1
19663 if test $cf_cv_cc_bool_type = 1
19664 then
19665         # oops: C has a bool.  Unlikely, but C++ could differ.
19666         USE_CXX_BOOL=0
19667 elif test $cf_cv_builtin_bool = 0
19668 then
19669         # C++ has no bool
19670         USE_CXX_BOOL=0
19671 else
19672         # this is the normal case
19673         USE_CXX_BOOL='defined(__cplusplus)'
19674 fi
19675
19676 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19677
19678         if test "$cf_with_ada" != "no" ; then
19679                 if test "$with_libtool" != "no"; then
19680                         { echo "$as_me:19680: WARNING: libtool does not support Ada - disabling feature" >&5
19681 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19682                         cf_with_ada=no
19683                 fi
19684         fi
19685
19686         if test "$cf_with_ada" != "no" ; then
19687
19688 cf_ada_make=gnatmake
19689 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19690 set dummy $cf_ada_make; ac_word=$2
19691 echo "$as_me:19691: checking for $ac_word" >&5
19692 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19693 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19694   echo $ECHO_N "(cached) $ECHO_C" >&6
19695 else
19696   if test -n "$gnat_exists"; then
19697   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19698 else
19699   ac_save_IFS=$IFS; IFS=$ac_path_separator
19700 ac_dummy="$PATH"
19701 for ac_dir in $ac_dummy; do
19702   IFS=$ac_save_IFS
19703   test -z "$ac_dir" && ac_dir=.
19704   $as_executable_p "$ac_dir/$ac_word" || continue
19705 ac_cv_prog_gnat_exists="yes"
19706 echo "$as_me:19706: found $ac_dir/$ac_word" >&5
19707 break
19708 done
19709
19710   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19711 fi
19712 fi
19713 gnat_exists=$ac_cv_prog_gnat_exists
19714 if test -n "$gnat_exists"; then
19715   echo "$as_me:19715: result: $gnat_exists" >&5
19716 echo "${ECHO_T}$gnat_exists" >&6
19717 else
19718   echo "$as_me:19718: result: no" >&5
19719 echo "${ECHO_T}no" >&6
19720 fi
19721
19722 if test "$ac_cv_prog_gnat_exists" = no; then
19723    cf_ada_make=
19724    cf_cv_prog_gnat_correct=no
19725 else
19726
19727 echo "$as_me:19727: checking for gnat version" >&5
19728 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19729 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19730         grep '[0-9].[0-9][0-9]*' |\
19731     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19732 echo "$as_me:19732: result: $cf_gnat_version" >&5
19733 echo "${ECHO_T}$cf_gnat_version" >&6
19734
19735 case $cf_gnat_version in #(vi
19736 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19737         cf_cv_prog_gnat_correct=yes
19738         ;;
19739 *)
19740         { echo "$as_me:19740: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19741 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19742         cf_cv_prog_gnat_correct=no
19743         ;;
19744 esac
19745
19746    # Extract the first word of "m4", so it can be a program name with args.
19747 set dummy m4; ac_word=$2
19748 echo "$as_me:19748: checking for $ac_word" >&5
19749 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19750 if test "${ac_cv_prog_M4_exists+set}" = set; then
19751   echo $ECHO_N "(cached) $ECHO_C" >&6
19752 else
19753   if test -n "$M4_exists"; then
19754   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19755 else
19756   ac_save_IFS=$IFS; IFS=$ac_path_separator
19757 ac_dummy="$PATH"
19758 for ac_dir in $ac_dummy; do
19759   IFS=$ac_save_IFS
19760   test -z "$ac_dir" && ac_dir=.
19761   $as_executable_p "$ac_dir/$ac_word" || continue
19762 ac_cv_prog_M4_exists="yes"
19763 echo "$as_me:19763: found $ac_dir/$ac_word" >&5
19764 break
19765 done
19766
19767   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19768 fi
19769 fi
19770 M4_exists=$ac_cv_prog_M4_exists
19771 if test -n "$M4_exists"; then
19772   echo "$as_me:19772: result: $M4_exists" >&5
19773 echo "${ECHO_T}$M4_exists" >&6
19774 else
19775   echo "$as_me:19775: result: no" >&5
19776 echo "${ECHO_T}no" >&6
19777 fi
19778
19779    if test "$ac_cv_prog_M4_exists" = no; then
19780       cf_cv_prog_gnat_correct=no
19781       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19782    fi
19783    if test "$cf_cv_prog_gnat_correct" = yes; then
19784       echo "$as_me:19784: checking if GNAT works" >&5
19785 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19786
19787 rm -rf conftest* *~conftest*
19788 cat >>conftest.ads <<CF_EOF
19789 procedure conftest;
19790 CF_EOF
19791 cat >>conftest.adb <<CF_EOF
19792 with Text_IO;
19793 with GNAT.OS_Lib;
19794 procedure conftest is
19795 begin
19796    Text_IO.Put ("Hello World");
19797    Text_IO.New_Line;
19798    GNAT.OS_Lib.OS_Exit (0);
19799 end conftest;
19800 CF_EOF
19801 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19802    if ( ./conftest 1>&5 2>&1 ) ; then
19803       cf_cv_prog_gnat_correct=yes
19804    else
19805       cf_cv_prog_gnat_correct=no
19806    fi
19807 else
19808    cf_cv_prog_gnat_correct=no
19809 fi
19810 rm -rf conftest* *~conftest*
19811
19812       echo "$as_me:19812: result: $cf_cv_prog_gnat_correct" >&5
19813 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19814    fi
19815 fi
19816
19817                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
19818
19819         ADAFLAGS="$ADAFLAGS -gnatpn"
19820
19821         echo "$as_me:19821: checking optimization options for ADAFLAGS" >&5
19822 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
19823         case "$CFLAGS" in
19824         *-g*)
19825
19826         ADAFLAGS="$ADAFLAGS -g"
19827
19828                 ;;
19829         esac
19830         case "$CFLAGS" in
19831         *-O*)
19832                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
19833
19834         ADAFLAGS="$ADAFLAGS $cf_O_flag"
19835
19836                 ;;
19837         esac
19838         echo "$as_me:19838: result: $ADAFLAGS" >&5
19839 echo "${ECHO_T}$ADAFLAGS" >&6
19840
19841 echo "$as_me:19841: checking if GNAT supports generics" >&5
19842 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19843 case $cf_gnat_version in #(vi
19844 3.[1-9]*|[4-9].*) #(vi
19845         cf_gnat_generics=yes
19846         ;;
19847 *)
19848         cf_gnat_generics=no
19849         ;;
19850 esac
19851 echo "$as_me:19851: result: $cf_gnat_generics" >&5
19852 echo "${ECHO_T}$cf_gnat_generics" >&6
19853
19854 if test "$cf_gnat_generics" = yes
19855 then
19856         cf_compile_generics=generics
19857         cf_generic_objects="\${GENOBJS}"
19858 else
19859         cf_compile_generics=
19860         cf_generic_objects=
19861 fi
19862
19863 echo "$as_me:19863: checking if GNAT supports SIGINT" >&5
19864 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19865 if test "${cf_cv_gnat_sigint+set}" = set; then
19866   echo $ECHO_N "(cached) $ECHO_C" >&6
19867 else
19868
19869 rm -rf conftest* *~conftest*
19870 cat >>conftest.ads <<CF_EOF
19871 with Ada.Interrupts.Names;
19872
19873 package ConfTest is
19874
19875    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19876    pragma Unreserve_All_Interrupts;
19877    pragma Warnings (On);
19878
19879    protected Process is
19880       procedure Stop;
19881       function Continue return Boolean;
19882       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19883    private
19884       Done : Boolean := False;
19885    end Process;
19886
19887 end ConfTest;
19888 CF_EOF
19889 cat >>conftest.adb <<CF_EOF
19890 package body ConfTest is
19891    protected body Process is
19892       procedure Stop is
19893       begin
19894          Done := True;
19895       end Stop;
19896       function Continue return Boolean is
19897       begin
19898          return not Done;
19899       end Continue;
19900    end Process;
19901 end ConfTest;
19902 CF_EOF
19903 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19904       cf_cv_gnat_sigint=yes
19905 else
19906    cf_cv_gnat_sigint=no
19907 fi
19908 rm -rf conftest* *~conftest*
19909
19910 fi
19911 echo "$as_me:19911: result: $cf_cv_gnat_sigint" >&5
19912 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19913
19914 if test $cf_cv_gnat_sigint = yes ; then
19915         USE_GNAT_SIGINT=""
19916 else
19917         USE_GNAT_SIGINT="#"
19918 fi
19919
19920 cf_gnat_libraries=no
19921 cf_gnat_projects=no
19922
19923 if test "$enable_gnat_projects" != no ; then
19924 echo "$as_me:19924: checking if GNAT supports project files" >&5
19925 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19926 case $cf_gnat_version in #(vi
19927 3.[0-9]*) #(vi
19928         ;;
19929 *)
19930         case $cf_cv_system_name in #(vi
19931         cygwin*|msys*) #(vi
19932                 ;;
19933         *)
19934                 mkdir conftest.src conftest.bin conftest.lib
19935                 cd conftest.src
19936                 rm -rf conftest* *~conftest*
19937                 cat >>library.gpr <<CF_EOF
19938 project Library is
19939   Kind := External ("LIB_KIND");
19940   for Library_Name use "ConfTest";
19941   for Object_Dir use ".";
19942   for Library_ALI_Dir use External("LIBRARY_DIR");
19943   for Library_Version use External ("SONAME");
19944   for Library_Kind use Kind;
19945   for Library_Dir use External("BUILD_DIR");
19946   Source_Dir := External ("SOURCE_DIR");
19947   for Source_Dirs use (Source_Dir);
19948 end Library;
19949 CF_EOF
19950                 cat >>confpackage.ads <<CF_EOF
19951 package ConfPackage is
19952    procedure conftest;
19953 end ConfPackage;
19954 CF_EOF
19955                 cat >>confpackage.adb <<CF_EOF
19956 with Text_IO;
19957 package body ConfPackage is
19958    procedure conftest is
19959    begin
19960       Text_IO.Put ("Hello World");
19961       Text_IO.New_Line;
19962    end conftest;
19963 end ConfPackage;
19964 CF_EOF
19965                 if ( $cf_ada_make $ADAFLAGS \
19966                                 -Plibrary.gpr \
19967                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19968                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19969                                 -XSOURCE_DIR=`pwd` \
19970                                 -XSONAME=libConfTest.so.1 \
19971                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19972                         cf_gnat_projects=yes
19973                 fi
19974                 cd ..
19975                 if test -f conftest.lib/confpackage.ali
19976                 then
19977                         cf_gnat_libraries=yes
19978                 fi
19979                 rm -rf conftest* *~conftest*
19980                 ;;
19981         esac
19982         ;;
19983 esac
19984 echo "$as_me:19984: result: $cf_gnat_projects" >&5
19985 echo "${ECHO_T}$cf_gnat_projects" >&6
19986 fi # enable_gnat_projects
19987
19988 if test $cf_gnat_projects = yes
19989 then
19990         echo "$as_me:19990: checking if GNAT supports libraries" >&5
19991 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19992         echo "$as_me:19992: result: $cf_gnat_libraries" >&5
19993 echo "${ECHO_T}$cf_gnat_libraries" >&6
19994 fi
19995
19996 if test "$cf_gnat_projects" = yes
19997 then
19998         USE_OLD_MAKERULES="#"
19999         USE_GNAT_PROJECTS=""
20000 else
20001         USE_OLD_MAKERULES=""
20002         USE_GNAT_PROJECTS="#"
20003 fi
20004
20005 if test "$cf_gnat_libraries" = yes
20006 then
20007         USE_GNAT_LIBRARIES=""
20008 else
20009         USE_GNAT_LIBRARIES="#"
20010 fi
20011
20012 echo "$as_me:20012: checking for ada-compiler" >&5
20013 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
20014
20015 # Check whether --with-ada-compiler or --without-ada-compiler was given.
20016 if test "${with_ada_compiler+set}" = set; then
20017   withval="$with_ada_compiler"
20018   cf_ada_compiler=$withval
20019 else
20020   cf_ada_compiler=gnatmake
20021 fi;
20022
20023 echo "$as_me:20023: result: $cf_ada_compiler" >&5
20024 echo "${ECHO_T}$cf_ada_compiler" >&6
20025
20026                         cf_ada_package=terminal_interface
20027
20028 echo "$as_me:20028: checking for ada-include" >&5
20029 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
20030
20031 # Check whether --with-ada-include or --without-ada-include was given.
20032 if test "${with_ada_include+set}" = set; then
20033   withval="$with_ada_include"
20034
20035 else
20036   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20037 fi; if test -n "$prefix/share/ada/adainclude" ; then
20038
20039 if test "x$prefix" != xNONE; then
20040   cf_path_syntax="$prefix"
20041 else
20042   cf_path_syntax="$ac_default_prefix"
20043 fi
20044
20045 case ".$withval" in #(vi
20046 .\$\(*\)*|.\'*\'*) #(vi
20047   ;;
20048 ..|./*|.\\*) #(vi
20049   ;;
20050 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20051   ;;
20052 .\${*prefix}*|.\${*dir}*) #(vi
20053   eval withval="$withval"
20054   case ".$withval" in #(vi
20055   .NONE/*)
20056     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20057     ;;
20058   esac
20059   ;; #(vi
20060 .no|.NONE/*)
20061   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20062   ;;
20063 *)
20064   { { echo "$as_me:20064: error: expected a pathname, not \"$withval\"" >&5
20065 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20066    { (exit 1); exit 1; }; }
20067   ;;
20068 esac
20069
20070 fi
20071 eval ADA_INCLUDE="$withval"
20072
20073 echo "$as_me:20073: result: $ADA_INCLUDE" >&5
20074 echo "${ECHO_T}$ADA_INCLUDE" >&6
20075
20076 echo "$as_me:20076: checking for ada-objects" >&5
20077 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
20078
20079 # Check whether --with-ada-objects or --without-ada-objects was given.
20080 if test "${with_ada_objects+set}" = set; then
20081   withval="$with_ada_objects"
20082
20083 else
20084   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
20085 fi; if test -n "$prefix/lib/ada/adalib" ; then
20086
20087 if test "x$prefix" != xNONE; then
20088   cf_path_syntax="$prefix"
20089 else
20090   cf_path_syntax="$ac_default_prefix"
20091 fi
20092
20093 case ".$withval" in #(vi
20094 .\$\(*\)*|.\'*\'*) #(vi
20095   ;;
20096 ..|./*|.\\*) #(vi
20097   ;;
20098 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20099   ;;
20100 .\${*prefix}*|.\${*dir}*) #(vi
20101   eval withval="$withval"
20102   case ".$withval" in #(vi
20103   .NONE/*)
20104     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20105     ;;
20106   esac
20107   ;; #(vi
20108 .no|.NONE/*)
20109   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20110   ;;
20111 *)
20112   { { echo "$as_me:20112: error: expected a pathname, not \"$withval\"" >&5
20113 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20114    { (exit 1); exit 1; }; }
20115   ;;
20116 esac
20117
20118 fi
20119 eval ADA_OBJECTS="$withval"
20120
20121 echo "$as_me:20121: result: $ADA_OBJECTS" >&5
20122 echo "${ECHO_T}$ADA_OBJECTS" >&6
20123
20124 echo "$as_me:20124: checking if an Ada95 shared-library should be built" >&5
20125 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
20126
20127 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
20128 if test "${with_ada_sharedlib+set}" = set; then
20129   withval="$with_ada_sharedlib"
20130   with_ada_sharedlib=$withval
20131 else
20132   with_ada_sharedlib=no
20133 fi;
20134 echo "$as_me:20134: result: $with_ada_sharedlib" >&5
20135 echo "${ECHO_T}$with_ada_sharedlib" >&6
20136
20137 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
20138 MAKE_ADA_SHAREDLIB="#"
20139
20140 if test "x$with_ada_sharedlib" != xno
20141 then
20142         MAKE_ADA_SHAREDLIB=
20143         if test "x$with_ada_sharedlib" != xyes
20144         then
20145                 ADA_SHAREDLIB="$with_ada_sharedlib"
20146         fi
20147 fi
20148
20149                 fi
20150         fi
20151 else
20152         cf_with_ada=no
20153 fi
20154
20155 # do this "late" to avoid conflict with header-checks
20156 if test "x$with_widec" = xyes ; then
20157         echo "$as_me:20157: checking for wchar_t" >&5
20158 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
20159 if test "${ac_cv_type_wchar_t+set}" = set; then
20160   echo $ECHO_N "(cached) $ECHO_C" >&6
20161 else
20162   cat >conftest.$ac_ext <<_ACEOF
20163 #line 20163 "configure"
20164 #include "confdefs.h"
20165 $ac_includes_default
20166 int
20167 main ()
20168 {
20169 if ((wchar_t *) 0)
20170   return 0;
20171 if (sizeof (wchar_t))
20172   return 0;
20173   ;
20174   return 0;
20175 }
20176 _ACEOF
20177 rm -f conftest.$ac_objext
20178 if { (eval echo "$as_me:20178: \"$ac_compile\"") >&5
20179   (eval $ac_compile) 2>&5
20180   ac_status=$?
20181   echo "$as_me:20181: \$? = $ac_status" >&5
20182   (exit $ac_status); } &&
20183          { ac_try='test -s conftest.$ac_objext'
20184   { (eval echo "$as_me:20184: \"$ac_try\"") >&5
20185   (eval $ac_try) 2>&5
20186   ac_status=$?
20187   echo "$as_me:20187: \$? = $ac_status" >&5
20188   (exit $ac_status); }; }; then
20189   ac_cv_type_wchar_t=yes
20190 else
20191   echo "$as_me: failed program was:" >&5
20192 cat conftest.$ac_ext >&5
20193 ac_cv_type_wchar_t=no
20194 fi
20195 rm -f conftest.$ac_objext conftest.$ac_ext
20196 fi
20197 echo "$as_me:20197: result: $ac_cv_type_wchar_t" >&5
20198 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
20199
20200 echo "$as_me:20200: checking size of wchar_t" >&5
20201 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
20202 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
20203   echo $ECHO_N "(cached) $ECHO_C" >&6
20204 else
20205   if test "$ac_cv_type_wchar_t" = yes; then
20206   if test "$cross_compiling" = yes; then
20207   # Depending upon the size, compute the lo and hi bounds.
20208 cat >conftest.$ac_ext <<_ACEOF
20209 #line 20209 "configure"
20210 #include "confdefs.h"
20211 $ac_includes_default
20212 int
20213 main ()
20214 {
20215 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
20216   ;
20217   return 0;
20218 }
20219 _ACEOF
20220 rm -f conftest.$ac_objext
20221 if { (eval echo "$as_me:20221: \"$ac_compile\"") >&5
20222   (eval $ac_compile) 2>&5
20223   ac_status=$?
20224   echo "$as_me:20224: \$? = $ac_status" >&5
20225   (exit $ac_status); } &&
20226          { ac_try='test -s conftest.$ac_objext'
20227   { (eval echo "$as_me:20227: \"$ac_try\"") >&5
20228   (eval $ac_try) 2>&5
20229   ac_status=$?
20230   echo "$as_me:20230: \$? = $ac_status" >&5
20231   (exit $ac_status); }; }; then
20232   ac_lo=0 ac_mid=0
20233   while :; do
20234     cat >conftest.$ac_ext <<_ACEOF
20235 #line 20235 "configure"
20236 #include "confdefs.h"
20237 $ac_includes_default
20238 int
20239 main ()
20240 {
20241 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20242   ;
20243   return 0;
20244 }
20245 _ACEOF
20246 rm -f conftest.$ac_objext
20247 if { (eval echo "$as_me:20247: \"$ac_compile\"") >&5
20248   (eval $ac_compile) 2>&5
20249   ac_status=$?
20250   echo "$as_me:20250: \$? = $ac_status" >&5
20251   (exit $ac_status); } &&
20252          { ac_try='test -s conftest.$ac_objext'
20253   { (eval echo "$as_me:20253: \"$ac_try\"") >&5
20254   (eval $ac_try) 2>&5
20255   ac_status=$?
20256   echo "$as_me:20256: \$? = $ac_status" >&5
20257   (exit $ac_status); }; }; then
20258   ac_hi=$ac_mid; break
20259 else
20260   echo "$as_me: failed program was:" >&5
20261 cat conftest.$ac_ext >&5
20262 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
20263 fi
20264 rm -f conftest.$ac_objext conftest.$ac_ext
20265   done
20266 else
20267   echo "$as_me: failed program was:" >&5
20268 cat conftest.$ac_ext >&5
20269 ac_hi=-1 ac_mid=-1
20270   while :; do
20271     cat >conftest.$ac_ext <<_ACEOF
20272 #line 20272 "configure"
20273 #include "confdefs.h"
20274 $ac_includes_default
20275 int
20276 main ()
20277 {
20278 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
20279   ;
20280   return 0;
20281 }
20282 _ACEOF
20283 rm -f conftest.$ac_objext
20284 if { (eval echo "$as_me:20284: \"$ac_compile\"") >&5
20285   (eval $ac_compile) 2>&5
20286   ac_status=$?
20287   echo "$as_me:20287: \$? = $ac_status" >&5
20288   (exit $ac_status); } &&
20289          { ac_try='test -s conftest.$ac_objext'
20290   { (eval echo "$as_me:20290: \"$ac_try\"") >&5
20291   (eval $ac_try) 2>&5
20292   ac_status=$?
20293   echo "$as_me:20293: \$? = $ac_status" >&5
20294   (exit $ac_status); }; }; then
20295   ac_lo=$ac_mid; break
20296 else
20297   echo "$as_me: failed program was:" >&5
20298 cat conftest.$ac_ext >&5
20299 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
20300 fi
20301 rm -f conftest.$ac_objext conftest.$ac_ext
20302   done
20303 fi
20304 rm -f conftest.$ac_objext conftest.$ac_ext
20305 # Binary search between lo and hi bounds.
20306 while test "x$ac_lo" != "x$ac_hi"; do
20307   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20308   cat >conftest.$ac_ext <<_ACEOF
20309 #line 20309 "configure"
20310 #include "confdefs.h"
20311 $ac_includes_default
20312 int
20313 main ()
20314 {
20315 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20316   ;
20317   return 0;
20318 }
20319 _ACEOF
20320 rm -f conftest.$ac_objext
20321 if { (eval echo "$as_me:20321: \"$ac_compile\"") >&5
20322   (eval $ac_compile) 2>&5
20323   ac_status=$?
20324   echo "$as_me:20324: \$? = $ac_status" >&5
20325   (exit $ac_status); } &&
20326          { ac_try='test -s conftest.$ac_objext'
20327   { (eval echo "$as_me:20327: \"$ac_try\"") >&5
20328   (eval $ac_try) 2>&5
20329   ac_status=$?
20330   echo "$as_me:20330: \$? = $ac_status" >&5
20331   (exit $ac_status); }; }; then
20332   ac_hi=$ac_mid
20333 else
20334   echo "$as_me: failed program was:" >&5
20335 cat conftest.$ac_ext >&5
20336 ac_lo=`expr $ac_mid + 1`
20337 fi
20338 rm -f conftest.$ac_objext conftest.$ac_ext
20339 done
20340 ac_cv_sizeof_wchar_t=$ac_lo
20341 else
20342   if test "$cross_compiling" = yes; then
20343   { { echo "$as_me:20343: error: cannot run test program while cross compiling" >&5
20344 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20345    { (exit 1); exit 1; }; }
20346 else
20347   cat >conftest.$ac_ext <<_ACEOF
20348 #line 20348 "configure"
20349 #include "confdefs.h"
20350 $ac_includes_default
20351 int
20352 main ()
20353 {
20354 FILE *f = fopen ("conftest.val", "w");
20355 if (!f)
20356   $ac_main_return (1);
20357 fprintf (f, "%d", (sizeof (wchar_t)));
20358 fclose (f);
20359   ;
20360   return 0;
20361 }
20362 _ACEOF
20363 rm -f conftest$ac_exeext
20364 if { (eval echo "$as_me:20364: \"$ac_link\"") >&5
20365   (eval $ac_link) 2>&5
20366   ac_status=$?
20367   echo "$as_me:20367: \$? = $ac_status" >&5
20368   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20369   { (eval echo "$as_me:20369: \"$ac_try\"") >&5
20370   (eval $ac_try) 2>&5
20371   ac_status=$?
20372   echo "$as_me:20372: \$? = $ac_status" >&5
20373   (exit $ac_status); }; }; then
20374   ac_cv_sizeof_wchar_t=`cat conftest.val`
20375 else
20376   echo "$as_me: program exited with status $ac_status" >&5
20377 echo "$as_me: failed program was:" >&5
20378 cat conftest.$ac_ext >&5
20379 fi
20380 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20381 fi
20382 fi
20383 rm -f conftest.val
20384 else
20385   ac_cv_sizeof_wchar_t=0
20386 fi
20387 fi
20388 echo "$as_me:20388: result: $ac_cv_sizeof_wchar_t" >&5
20389 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
20390 cat >>confdefs.h <<EOF
20391 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
20392 EOF
20393
20394 fi
20395
20396 ### Construct the ncurses library-subsets, if any, from this set of keywords:
20397 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
20398 ###
20399 ### ticlib modules may be a separate library, otherwise contained in termlib.
20400 ### termlib modules may be a separate library, otherwise contained in ncurses.
20401 ###
20402 ### The of "+" or " " between the tokens controls the way the script
20403 ### chooses to split module lists into libraries.
20404 ###
20405 ### (see CF_LIB_RULES).
20406 echo "$as_me:20406: checking for library subsets" >&5
20407 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
20408 LIB_SUBSETS=
20409
20410 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
20411         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
20412         if test "$with_ticlib" != no ; then
20413                 LIB_SUBSETS="${LIB_SUBSETS} "
20414         else
20415                 LIB_SUBSETS="${LIB_SUBSETS}+"
20416         fi
20417 fi
20418
20419 LIB_SUBSETS="${LIB_SUBSETS}termlib"
20420 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
20421
20422 if test "$with_termlib" != no ; then
20423         LIB_SUBSETS="${LIB_SUBSETS} "
20424 else
20425         LIB_SUBSETS="${LIB_SUBSETS}+"
20426 fi
20427
20428 LIB_SUBSETS="${LIB_SUBSETS}base"
20429
20430 # Most term-driver calls are to tinfo, but some like init_pair are to the
20431 # base library (so it resides in base).
20432 if test "$with_term_driver" != no ; then
20433         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
20434         case $cf_cv_system_name in #(vi
20435         *mingw32*) #(vi
20436                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
20437                 ;;
20438         *) #(vi
20439                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
20440                 ;;
20441         esac
20442 fi
20443
20444 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
20445 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
20446
20447 echo "$as_me:20447: result: $LIB_SUBSETS" >&5
20448 echo "${ECHO_T}$LIB_SUBSETS" >&6
20449
20450 ### Construct the list of include-directories to be generated
20451
20452 if test "$GCC" != yes; then
20453         CPPFLAGS="-I\${includedir} $CPPFLAGS"
20454 elif test "$includedir" != "/usr/include"; then
20455         if test "$includedir" = '${prefix}/include' ; then
20456                 if test x$prefix != x/usr ; then
20457                         CPPFLAGS="-I\${includedir} $CPPFLAGS"
20458                 fi
20459         else
20460                 CPPFLAGS="-I\${includedir} $CPPFLAGS"
20461         fi
20462 fi
20463 if test "$srcdir" != "."; then
20464         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
20465 fi
20466 CPPFLAGS="-I. -I../include $CPPFLAGS"
20467
20468 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
20469 if test "$srcdir" != "."; then
20470         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
20471 fi
20472 if test "$GCC" != yes; then
20473         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20474 elif test "$includedir" != "/usr/include"; then
20475         if test "$includedir" = '${prefix}/include' ; then
20476                 if test x$prefix != x/usr ; then
20477                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20478                 fi
20479         else
20480                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20481         fi
20482 fi
20483
20484 ### Build up pieces for makefile rules
20485 echo "$as_me:20485: checking default library suffix" >&5
20486 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
20487
20488         case $DFT_LWR_MODEL in
20489         libtool) DFT_ARG_SUFFIX=''   ;;
20490         normal)  DFT_ARG_SUFFIX=''   ;;
20491         debug)   DFT_ARG_SUFFIX='_g' ;;
20492         profile) DFT_ARG_SUFFIX='_p' ;;
20493         shared)  DFT_ARG_SUFFIX=''   ;;
20494         esac
20495         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
20496 echo "$as_me:20496: result: $DFT_ARG_SUFFIX" >&5
20497 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
20498
20499 echo "$as_me:20499: checking default library-dependency suffix" >&5
20500 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
20501
20502         case X$DFT_LWR_MODEL in #(vi
20503         Xlibtool) #(vi
20504                 DFT_LIB_SUFFIX='.la'
20505                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20506                 ;;
20507         Xdebug) #(vi
20508                 DFT_LIB_SUFFIX='_g.a'
20509                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20510                 ;;
20511         Xprofile) #(vi
20512                 DFT_LIB_SUFFIX='_p.a'
20513                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20514                 ;;
20515         Xshared) #(vi
20516                 case $cf_cv_system_name in
20517                 aix[5-7]*) #(vi
20518                         DFT_LIB_SUFFIX='.so'
20519                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20520                         ;;
20521                 cygwin*|msys*|mingw*) #(vi
20522                         DFT_LIB_SUFFIX='.dll'
20523                         DFT_DEP_SUFFIX='.dll.a'
20524                         ;;
20525                 darwin*) #(vi
20526                         DFT_LIB_SUFFIX='.dylib'
20527                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20528                         ;;
20529                 hpux*) #(vi
20530                         case $target in
20531                         ia64*) #(vi
20532                                 DFT_LIB_SUFFIX='.so'
20533                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20534                                 ;;
20535                         *) #(vi
20536                                 DFT_LIB_SUFFIX='.sl'
20537                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20538                                 ;;
20539                         esac
20540                         ;;
20541                 *) #(vi
20542                         DFT_LIB_SUFFIX='.so'
20543                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20544                         ;;
20545                 esac
20546                 ;;
20547         *)
20548                 DFT_LIB_SUFFIX='.a'
20549                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20550                 ;;
20551         esac
20552         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
20553         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
20554 echo "$as_me:20554: result: $DFT_DEP_SUFFIX" >&5
20555 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
20556
20557 echo "$as_me:20557: checking default object directory" >&5
20558 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
20559
20560         case $DFT_LWR_MODEL in
20561         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
20562         normal)  DFT_OBJ_SUBDIR='objects' ;;
20563         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
20564         profile) DFT_OBJ_SUBDIR='obj_p' ;;
20565         shared)
20566                 case $cf_cv_system_name in #(vi
20567                 cygwin|msys) #(vi
20568                         DFT_OBJ_SUBDIR='objects' ;;
20569                 *)
20570                         DFT_OBJ_SUBDIR='obj_s' ;;
20571                 esac
20572         esac
20573 echo "$as_me:20573: result: $DFT_OBJ_SUBDIR" >&5
20574 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
20575
20576 if test "x$cf_with_cxx" = xyes ; then
20577 echo "$as_me:20577: checking c++ library-dependency suffix" >&5
20578 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
20579 if test "$with_libtool" != "no"; then
20580         # libtool thinks it can make c++ shared libraries (perhaps only g++)
20581         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20582 elif test "$with_shared_cxx" != "no"; then
20583         # also for g++ users...
20584         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20585 else
20586         # we normally make a static library because C/C++ library rules differ
20587
20588         case Xnormal in #(vi
20589         Xlibtool) #(vi
20590                 CXX_LIB_SUFFIX='.la'
20591                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20592                 ;;
20593         Xdebug) #(vi
20594                 CXX_LIB_SUFFIX='_g.a'
20595                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20596                 ;;
20597         Xprofile) #(vi
20598                 CXX_LIB_SUFFIX='_p.a'
20599                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20600                 ;;
20601         Xshared) #(vi
20602                 case $cf_cv_system_name in
20603                 aix[5-7]*) #(vi
20604                         CXX_LIB_SUFFIX='.so'
20605                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20606                         ;;
20607                 cygwin*|msys*|mingw*) #(vi
20608                         CXX_LIB_SUFFIX='.dll'
20609                         CXX_DEP_SUFFIX='.dll.a'
20610                         ;;
20611                 darwin*) #(vi
20612                         CXX_LIB_SUFFIX='.dylib'
20613                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20614                         ;;
20615                 hpux*) #(vi
20616                         case $target in
20617                         ia64*) #(vi
20618                                 CXX_LIB_SUFFIX='.so'
20619                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20620                                 ;;
20621                         *) #(vi
20622                                 CXX_LIB_SUFFIX='.sl'
20623                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20624                                 ;;
20625                         esac
20626                         ;;
20627                 *) #(vi
20628                         CXX_LIB_SUFFIX='.so'
20629                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20630                         ;;
20631                 esac
20632                 ;;
20633         *)
20634                 CXX_LIB_SUFFIX='.a'
20635                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20636                 ;;
20637         esac
20638         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
20639         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
20640
20641 fi
20642 echo "$as_me:20642: result: $CXX_LIB_SUFFIX" >&5
20643 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
20644
20645 fi
20646
20647 # do not want -ldl in build except as needed for -lncurses dependency
20648 if test "x$with_dlsym" = xyes ; then
20649 if test $DFT_LWR_MODEL = shared || \
20650    test $DFT_LWR_MODEL = libtool ; then
20651
20652 # remove dl library from $LIBS
20653 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
20654
20655 fi
20656 fi
20657 ### Set up low-level terminfo dependencies for makefiles.
20658
20659 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
20660 # do not need libdl
20661 TICS_LIST=
20662 if test "x$with_dlsym" = xyes ; then
20663
20664 # remove dl library from $SHLIB_LIST
20665 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
20666
20667 fi
20668
20669 if test "$with_ticlib" != no ; then
20670
20671         if test "x$with_ticlib" != xyes ; then
20672                 TICS_NAME=$with_ticlib
20673                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20674                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20675                 TICS_LIB_SUFFIX="${with_ticlib}"
20676         else
20677                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
20678                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
20679                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
20680         fi
20681         TICS_LDFLAGS="-L${LIB_DIR}"
20682         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
20683 else
20684         TICS_LDFLAGS="-L${LIB_DIR}"
20685         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20686 fi
20687
20688 if test "$with_termlib" != no ; then
20689
20690         if test "x$with_termlib" != xyes ; then
20691                 TINFO_NAME=$with_termlib
20692                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20693                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20694                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20695                 TINFO_LIB_SUFFIX="${with_termlib}"
20696         else
20697                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20698                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
20699                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
20700                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
20701         fi
20702
20703         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20704         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20705         if test "$DFT_LWR_MODEL" = "libtool"; then
20706                 TEST_ARGS="${TEST_DEPS}"
20707                 TEST_ARG2="${TEST_DEP2}"
20708                 TINFO_LDFLAGS="-L${LIB_DIR}"
20709                 TINFO_LIBS="$TEST_ARGS"
20710                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
20711                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
20712         else
20713                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
20714                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
20715                 if test "x$with_term_driver" != xno ; then
20716                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20717                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20718                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20719                 else
20720                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20721                         TINFO_LIBS="$TEST_ARGS"
20722                 fi
20723                 TINFO_LDFLAGS="-L${LIB_DIR}"
20724                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20725         fi
20726 else
20727         # the next lines are needed for linking libtic over libncurses
20728         TINFO_NAME=${LIB_NAME}
20729         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20730         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
20731         if test "x$with_tic_depends" = xyes ; then
20732                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20733         else
20734                 TICS_LIST="$SHLIB_LIST"
20735         fi
20736
20737         TINFO_LDFLAGS="-L${LIB_DIR}"
20738         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20739 fi
20740
20741 if test "$DFT_LWR_MODEL" = shared ; then
20742         case $cf_cv_system_name in #(vi
20743         cygwin*|msys*)
20744                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
20745                 TINFO_SUFFIX=.dll
20746                 ;;
20747         esac
20748 fi
20749
20750 if test "x$with_dlsym" = xyes ; then
20751
20752 # remove dl library from $TICS_LIST
20753 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
20754
20755 fi
20756
20757 if test "$DFT_LWR_MODEL" = "libtool"; then
20758     OBJEXT=lo
20759 fi
20760
20761 # needed for Ada95
20762 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
20763
20764 case $DFT_LWR_MODEL in
20765 normal|debug|profile)
20766
20767 if test "$GCC" = yes ; then
20768         case $cf_cv_system_name in #(
20769         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
20770                 LDFLAGS_STATIC=
20771                 LDFLAGS_SHARED=
20772                 ;;
20773     *)  #( normally, except when broken
20774         LDFLAGS_STATIC=-static
20775         LDFLAGS_SHARED=-dynamic
20776         ;;
20777     esac
20778 else
20779         case $cf_cv_system_name in #(
20780         aix[4-7]*)      #( from ld manpage
20781                 LDFLAGS_STATIC=-bstatic
20782                 LDFLAGS_SHARED=-bdynamic
20783                 ;;
20784         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
20785                 # We could also use just "archive" and "shared".
20786                 LDFLAGS_STATIC=-Wl,-a,archive_shared
20787                 LDFLAGS_SHARED=-Wl,-a,shared_archive
20788                 ;;
20789         irix*)          #( from ld manpage IRIX64
20790                 LDFLAGS_STATIC=-Bstatic
20791                 LDFLAGS_SHARED=-Bdynamic
20792                 ;;
20793         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
20794                 # alternative "-oldstyle_liblookup" (not in cc manpage)
20795                 LDFLAGS_STATIC=-noso
20796                 LDFLAGS_SHARED=-so_archive
20797                 ;;
20798         solaris2*)
20799                 LDFLAGS_STATIC=-Bstatic
20800                 LDFLAGS_SHARED=-Bdynamic
20801                 ;;
20802         esac
20803 fi
20804
20805 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
20806 then
20807         echo "$as_me:20807: checking if linker supports switching between static/dynamic" >&5
20808 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
20809
20810         rm -f libconftest.a
20811         cat >conftest.$ac_ext <<EOF
20812 #line 20812 "configure"
20813 #include <stdio.h>
20814 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
20815 EOF
20816         if { (eval echo "$as_me:20816: \"$ac_compile\"") >&5
20817   (eval $ac_compile) 2>&5
20818   ac_status=$?
20819   echo "$as_me:20819: \$? = $ac_status" >&5
20820   (exit $ac_status); } ; then
20821                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
20822                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
20823         fi
20824         rm -f conftest.*
20825
20826         cf_save_LIBS="$LIBS"
20827
20828         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20829         cat >conftest.$ac_ext <<_ACEOF
20830 #line 20830 "configure"
20831 #include "confdefs.h"
20832
20833 #line 20833 "configure"
20834 #include <stdio.h>
20835 int cf_ldflags_static(FILE *fp);
20836
20837 int
20838 main ()
20839 {
20840
20841         return cf_ldflags_static(stdin);
20842
20843   ;
20844   return 0;
20845 }
20846 _ACEOF
20847 rm -f conftest.$ac_objext conftest$ac_exeext
20848 if { (eval echo "$as_me:20848: \"$ac_link\"") >&5
20849   (eval $ac_link) 2>&5
20850   ac_status=$?
20851   echo "$as_me:20851: \$? = $ac_status" >&5
20852   (exit $ac_status); } &&
20853          { ac_try='test -s conftest$ac_exeext'
20854   { (eval echo "$as_me:20854: \"$ac_try\"") >&5
20855   (eval $ac_try) 2>&5
20856   ac_status=$?
20857   echo "$as_me:20857: \$? = $ac_status" >&5
20858   (exit $ac_status); }; }; then
20859
20860         # some linkers simply ignore the -dynamic
20861         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20862         *static*) # (vi
20863                 cf_ldflags_static=no
20864                 ;;
20865         *)
20866                 cf_ldflags_static=yes
20867                 ;;
20868         esac
20869
20870 else
20871   echo "$as_me: failed program was:" >&5
20872 cat conftest.$ac_ext >&5
20873 cf_ldflags_static=no
20874 fi
20875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20876
20877         rm -f libconftest.*
20878         LIBS="$cf_save_LIBS"
20879
20880         echo "$as_me:20880: result: $cf_ldflags_static" >&5
20881 echo "${ECHO_T}$cf_ldflags_static" >&6
20882
20883         if test $cf_ldflags_static != yes
20884         then
20885                 LDFLAGS_STATIC=
20886                 LDFLAGS_SHARED=
20887         fi
20888 else
20889         LDFLAGS_STATIC=
20890         LDFLAGS_SHARED=
20891 fi
20892
20893         ;;
20894 esac
20895
20896 echo "$as_me:20896: checking where we will install curses.h" >&5
20897 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20898
20899 includesubdir=
20900 if test "$with_overwrite" = no && \
20901  ( test "x$includedir" = 'x${prefix}/include' || \
20902    test "x$includedir" = "x${prefix}/include" )
20903 then
20904         includesubdir="/ncurses${LIB_SUFFIX}"
20905 fi
20906 echo "$as_me:20906: result: ${includedir}${includesubdir}" >&5
20907 echo "${ECHO_T}${includedir}${includesubdir}" >&6
20908
20909 ### Resolve a conflict between normal and wide-curses by forcing applications
20910 ### that will need libutf8 to add it to their configure script.
20911 if test "$with_overwrite" != no ; then
20912 if test "$NCURSES_LIBUTF8" = 1 ; then
20913         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20914         { echo "$as_me:20914: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20915 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20916 fi
20917 fi
20918 WITH_OVERWRITE=$with_overwrite
20919
20920 # used to separate tack out of the tree
20921 NCURSES_TREE=
20922
20923 ### predefined stuff for the test programs
20924
20925 cat >>confdefs.h <<\EOF
20926 #define HAVE_SLK_COLOR 1
20927 EOF
20928
20929 ### Construct the list of subdirectories for which we'll customize makefiles
20930 ### with the appropriate compile-rules.
20931
20932 echo "$as_me:20932: checking for src modules" >&5
20933 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20934
20935 # dependencies and linker-arguments for test-programs
20936 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20937 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20938 if test "$DFT_LWR_MODEL" = "libtool"; then
20939         TEST_ARGS="${TEST_DEPS}"
20940         TEST_ARG2="${TEST_DEP2}"
20941 else
20942         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20943         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20944 fi
20945
20946 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20947 cf_cv_src_modules=
20948 for cf_dir in $modules_to_build
20949 do
20950         if test -f $srcdir/$cf_dir/modules; then
20951
20952                 # We may/may not have tack in the distribution, though the
20953                 # makefile is.
20954                 if test $cf_dir = tack ; then
20955                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20956                                 continue
20957                         fi
20958                 fi
20959
20960                 if test -z "$cf_cv_src_modules"; then
20961                         cf_cv_src_modules=$cf_dir
20962                 else
20963                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20964                 fi
20965
20966                 # Make the ncurses_cfg.h file record the library interface files as
20967                 # well.  These are header files that are the same name as their
20968                 # directory.  Ncurses is the only library that does not follow
20969                 # that pattern.
20970                 if test $cf_dir = tack ; then
20971                         continue
20972                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20973
20974 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20975
20976                         cat >>confdefs.h <<EOF
20977 #define HAVE_${cf_have_include}_H 1
20978 EOF
20979
20980                         cat >>confdefs.h <<EOF
20981 #define HAVE_LIB${cf_have_include} 1
20982 EOF
20983
20984                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20985                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20986                         if test "$DFT_LWR_MODEL" = "libtool"; then
20987                                 TEST_ARGS="${TEST_DEPS}"
20988                                 TEST_ARG2="${TEST_DEP2}"
20989                         else
20990                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20991                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20992                         fi
20993                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20994                 fi
20995         fi
20996 done
20997 echo "$as_me:20997: result: $cf_cv_src_modules" >&5
20998 echo "${ECHO_T}$cf_cv_src_modules" >&6
20999
21000 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21001 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21002
21003 SRC_SUBDIRS=
21004 if test "x$cf_with_manpages" != xno ; then
21005         SRC_SUBDIRS="$SRC_SUBDIRS man"
21006 fi
21007 SRC_SUBDIRS="$SRC_SUBDIRS include"
21008 for cf_dir in $cf_cv_src_modules
21009 do
21010         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21011 done
21012 if test "x$cf_with_tests" != "xno" ; then
21013         SRC_SUBDIRS="$SRC_SUBDIRS test"
21014 fi
21015 if test "x$cf_with_db_install" = xyes; then
21016         test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
21017 fi
21018 if test "$cf_with_cxx_binding" != no; then
21019         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
21020         SRC_SUBDIRS="$SRC_SUBDIRS c++"
21021 fi
21022
21023 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21024 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
21025
21026 ADA_SUBDIRS=
21027 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
21028         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
21029         ADA_SUBDIRS="gen src"
21030         if test "x$cf_with_tests" != "xno" ; then
21031                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
21032         fi
21033 fi
21034
21035 SUB_MAKEFILES=
21036 for cf_dir in $SRC_SUBDIRS
21037 do
21038         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
21039 done
21040
21041 if test -n "$ADA_SUBDIRS"; then
21042         for cf_dir in $ADA_SUBDIRS
21043         do
21044                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
21045         done
21046
21047 fi
21048
21049 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21050    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
21051    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
21052 fi
21053
21054 DIRS_TO_MAKE="lib"
21055 for cf_item in $cf_list_models
21056 do
21057
21058         case $cf_item in
21059         libtool) cf_subdir='obj_lo'  ;;
21060         normal)  cf_subdir='objects' ;;
21061         debug)   cf_subdir='obj_g' ;;
21062         profile) cf_subdir='obj_p' ;;
21063         shared)
21064                 case $cf_cv_system_name in #(vi
21065                 cygwin|msys) #(vi
21066                         cf_subdir='objects' ;;
21067                 *)
21068                         cf_subdir='obj_s' ;;
21069                 esac
21070         esac
21071
21072         for cf_item2 in $DIRS_TO_MAKE
21073         do
21074                 test $cf_item2 = $cf_subdir && break
21075         done
21076         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21077 done
21078 for cf_dir in $DIRS_TO_MAKE
21079 do
21080         test ! -d $cf_dir && mkdir $cf_dir
21081 done
21082
21083 # symbols that differ when compiling Ada95 by itself.
21084 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
21085
21086 # values to use as strings
21087
21088 cat >>confdefs.h <<EOF
21089 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
21090 EOF
21091
21092 cat >>confdefs.h <<EOF
21093 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
21094 EOF
21095
21096 ### Now that we're done running tests, add the compiler-warnings, if any
21097
21098 cf_fix_cppflags=no
21099 cf_new_cflags=
21100 cf_new_cppflags=
21101 cf_new_extra_cppflags=
21102
21103 for cf_add_cflags in $EXTRA_CFLAGS
21104 do
21105 case $cf_fix_cppflags in
21106 no)
21107         case $cf_add_cflags in #(vi
21108         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
21109                 case $cf_add_cflags in
21110                 -D*)
21111                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21112
21113                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
21114                                 && test -z "${cf_tst_cflags}" \
21115                                 && cf_fix_cppflags=yes
21116
21117                         if test $cf_fix_cppflags = yes ; then
21118                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21119                                 continue
21120                         elif test "${cf_tst_cflags}" = "\"'" ; then
21121                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21122                                 continue
21123                         fi
21124                         ;;
21125                 esac
21126                 case "$CPPFLAGS" in
21127                 *$cf_add_cflags) #(vi
21128                         ;;
21129                 *) #(vi
21130                         case $cf_add_cflags in #(vi
21131                         -D*)
21132                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21133
21134 CPPFLAGS=`echo "$CPPFLAGS" | \
21135         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21136                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21137
21138                                 ;;
21139                         esac
21140                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
21141                         ;;
21142                 esac
21143                 ;;
21144         *)
21145                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
21146                 ;;
21147         esac
21148         ;;
21149 yes)
21150         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21151
21152         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21153
21154         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
21155                 && test -z "${cf_tst_cflags}" \
21156                 && cf_fix_cppflags=no
21157         ;;
21158 esac
21159 done
21160
21161 if test -n "$cf_new_cflags" ; then
21162
21163         CFLAGS="$CFLAGS $cf_new_cflags"
21164 fi
21165
21166 if test -n "$cf_new_cppflags" ; then
21167
21168         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
21169 fi
21170
21171 if test -n "$cf_new_extra_cppflags" ; then
21172
21173         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
21174 fi
21175
21176 ### Define substitutions for header files to avoid name-pollution
21177
21178 if test "x$cf_cv_have_tcgetattr" = xyes ; then
21179         HAVE_TCGETATTR=1
21180 else
21181         HAVE_TCGETATTR=0
21182 fi
21183
21184 if test "x$ac_cv_header_stdint_h" = xyes ; then
21185         HAVE_STDINT_H=1
21186 else
21187         HAVE_STDINT_H=0
21188 fi
21189
21190 if test "x$ac_cv_header_termio_h" = xyes ; then
21191         HAVE_TERMIO_H=1
21192 else
21193         HAVE_TERMIO_H=0
21194 fi
21195
21196 if test "x$ac_cv_header_termios_h" = xyes ; then
21197         HAVE_TERMIOS_H=1
21198 else
21199         HAVE_TERMIOS_H=0
21200 fi
21201
21202 ################################################################################
21203 test "x$use_database" = xyes && \
21204 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
21205
21206 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
21207 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
21208
21209 if test "x$enable_pc_files" = xyes ; then \
21210 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
21211 MAKE_PC_FILES=
21212 else
21213 MAKE_PC_FILES="#"
21214 fi
21215
21216 # Extract the first word of "tic", so it can be a program name with args.
21217 set dummy tic; ac_word=$2
21218 echo "$as_me:21218: checking for $ac_word" >&5
21219 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21220 if test "${ac_cv_path_TIC_PATH+set}" = set; then
21221   echo $ECHO_N "(cached) $ECHO_C" >&6
21222 else
21223   case $TIC_PATH in
21224   [\\/]* | ?:[\\/]*)
21225   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
21226   ;;
21227   *)
21228   ac_save_IFS=$IFS; IFS=$ac_path_separator
21229 ac_dummy="$PATH:/usr/local/ncurses/bin"
21230 for ac_dir in $ac_dummy; do
21231   IFS=$ac_save_IFS
21232   test -z "$ac_dir" && ac_dir=.
21233   if $as_executable_p "$ac_dir/$ac_word"; then
21234    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
21235    echo "$as_me:21235: found $ac_dir/$ac_word" >&5
21236    break
21237 fi
21238 done
21239
21240   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
21241   ;;
21242 esac
21243 fi
21244 TIC_PATH=$ac_cv_path_TIC_PATH
21245
21246 if test -n "$TIC_PATH"; then
21247   echo "$as_me:21247: result: $TIC_PATH" >&5
21248 echo "${ECHO_T}$TIC_PATH" >&6
21249 else
21250   echo "$as_me:21250: result: no" >&5
21251 echo "${ECHO_T}no" >&6
21252 fi
21253
21254 if test -n "$FALLBACK_LIST"
21255 then
21256         if test "$TIC_PATH" = unknown
21257         then
21258                 { echo "$as_me:21258: WARNING: no tic program found for fallbacks" >&5
21259 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
21260         fi
21261 fi
21262
21263 if test "x$cf_with_tests" != xno ; then
21264         MAKE_TESTS=
21265 else
21266         MAKE_TESTS="#"
21267 fi
21268
21269 ADAHTML_DIR=../../doc/html/ada
21270
21271 # these could be configurable, but are not currently
21272 PANEL_NAME=panel
21273 MENU_NAME=menu
21274 FORM_NAME=form
21275 CXX_NAME=ncurses++
21276
21277 # workaround for g++ versus Solaris (20131116)
21278 case $cf_cv_system_name in #(vi
21279 solaris2*) #(vi
21280         case "x$CPPFLAGS" in #(vi
21281         *-D_XOPEN_SOURCE_EXTENDED*)
21282                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
21283
21284 echo "${as_me:-configure}:21284: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
21285
21286                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
21287                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
21288                 ;;
21289         esac
21290         ;;
21291 esac
21292
21293 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
21294 case "x$NCURSES_OSPEED" in #(vi
21295 *short*) #(vi
21296         cf_compatible=1
21297         ;;
21298 *)
21299         cf_compatible=0
21300         ;;
21301 esac
21302
21303 cat >>confdefs.h <<EOF
21304 #define NCURSES_OSPEED_COMPAT $cf_compatible
21305 EOF
21306
21307 case "x$cf_cv_typeof_chtype" in
21308 xshort|xint|xlong)
21309         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
21310         ;;
21311 esac
21312
21313 case "x$cf_cv_typeof_mmask_t" in
21314 xshort|xint|xlong)
21315         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
21316         ;;
21317 esac
21318
21319 SUB_SCRIPTS=
21320
21321 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"
21322 ac_config_commands="$ac_config_commands default"
21323 cat >confcache <<\_ACEOF
21324 # This file is a shell script that caches the results of configure
21325 # tests run on this system so they can be shared between configure
21326 # scripts and configure runs, see configure's option --config-cache.
21327 # It is not useful on other systems.  If it contains results you don't
21328 # want to keep, you may remove or edit it.
21329 #
21330 # config.status only pays attention to the cache file if you give it
21331 # the --recheck option to rerun configure.
21332 #
21333 # `ac_cv_env_foo' variables (set or unset) will be overriden when
21334 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21335 # following values.
21336
21337 _ACEOF
21338
21339 # The following way of writing the cache mishandles newlines in values,
21340 # but we know of no workaround that is simple, portable, and efficient.
21341 # So, don't put newlines in cache variables' values.
21342 # Ultrix sh set writes to stderr and can't be redirected directly,
21343 # and sets the high bit in the cache file unless we assign to the vars.
21344 {
21345   (set) 2>&1 |
21346     case `(ac_space=' '; set | grep ac_space) 2>&1` in
21347     *ac_space=\ *)
21348       # `set' does not quote correctly, so add quotes (double-quote
21349       # substitution turns \\\\ into \\, and sed turns \\ into \).
21350       sed -n \
21351         "s/'/'\\\\''/g;
21352           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21353       ;;
21354     *)
21355       # `set' quotes correctly as required by POSIX, so do not add quotes.
21356       sed -n \
21357         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
21358       ;;
21359     esac;
21360 } |
21361   sed '
21362      t clear
21363      : clear
21364      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21365      t end
21366      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21367      : end' >>confcache
21368 if cmp -s $cache_file confcache; then :; else
21369   if test -w $cache_file; then
21370     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21371     cat confcache >$cache_file
21372   else
21373     echo "not updating unwritable cache $cache_file"
21374   fi
21375 fi
21376 rm -f confcache
21377
21378 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21379 # Let make expand exec_prefix.
21380 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21381
21382 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21383 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21384 # trailing colons and then remove the whole line if VPATH becomes empty
21385 # (actually we leave an empty line to preserve line numbers).
21386 if test "x$srcdir" = x.; then
21387   ac_vpsub='/^[         ]*VPATH[        ]*=/{
21388 s/:*\$(srcdir):*/:/;
21389 s/:*\${srcdir}:*/:/;
21390 s/:*@srcdir@:*/:/;
21391 s/^\([^=]*=[    ]*\):*/\1/;
21392 s/:*$//;
21393 s/^[^=]*=[      ]*$//;
21394 }'
21395 fi
21396
21397 DEFS=-DHAVE_CONFIG_H
21398
21399 : ${CONFIG_STATUS=./config.status}
21400 ac_clean_files_save=$ac_clean_files
21401 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21402 { echo "$as_me:21402: creating $CONFIG_STATUS" >&5
21403 echo "$as_me: creating $CONFIG_STATUS" >&6;}
21404 cat >$CONFIG_STATUS <<_ACEOF
21405 #! $SHELL
21406 # Generated automatically by configure.
21407 # Run this file to recreate the current configuration.
21408 # Compiler output produced by configure, useful for debugging
21409 # configure, is in config.log if it exists.
21410
21411 debug=false
21412 SHELL=\${CONFIG_SHELL-$SHELL}
21413 ac_cs_invocation="\$0 \$@"
21414
21415 _ACEOF
21416
21417 cat >>$CONFIG_STATUS <<\_ACEOF
21418 # Be Bourne compatible
21419 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21420   emulate sh
21421   NULLCMD=:
21422 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21423   set -o posix
21424 fi
21425
21426 # Name of the executable.
21427 as_me=`echo "$0" |sed 's,.*[\\/],,'`
21428
21429 if expr a : '\(a\)' >/dev/null 2>&1; then
21430   as_expr=expr
21431 else
21432   as_expr=false
21433 fi
21434
21435 rm -f conf$$ conf$$.exe conf$$.file
21436 echo >conf$$.file
21437 if ln -s conf$$.file conf$$ 2>/dev/null; then
21438   # We could just check for DJGPP; but this test a) works b) is more generic
21439   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21440   if test -f conf$$.exe; then
21441     # Don't use ln at all; we don't have any links
21442     as_ln_s='cp -p'
21443   else
21444     as_ln_s='ln -s'
21445   fi
21446 elif ln conf$$.file conf$$ 2>/dev/null; then
21447   as_ln_s=ln
21448 else
21449   as_ln_s='cp -p'
21450 fi
21451 rm -f conf$$ conf$$.exe conf$$.file
21452
21453 as_executable_p="test -f"
21454
21455 # Support unset when possible.
21456 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
21457   as_unset=unset
21458 else
21459   as_unset=false
21460 fi
21461
21462 # NLS nuisances.
21463 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
21464 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
21465 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
21466 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
21467 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
21468 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
21469 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
21470 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
21471
21472 # IFS
21473 # We need space, tab and new line, in precisely that order.
21474 as_nl='
21475 '
21476 IFS="   $as_nl"
21477
21478 # CDPATH.
21479 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
21480
21481 exec 6>&1
21482
21483 _ACEOF
21484
21485 # Files that config.status was made for.
21486 if test -n "$ac_config_files"; then
21487   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21488 fi
21489
21490 if test -n "$ac_config_headers"; then
21491   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21492 fi
21493
21494 if test -n "$ac_config_links"; then
21495   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21496 fi
21497
21498 if test -n "$ac_config_commands"; then
21499   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21500 fi
21501
21502 cat >>$CONFIG_STATUS <<\EOF
21503
21504 ac_cs_usage="\
21505 \`$as_me' instantiates files from templates according to the
21506 current configuration.
21507
21508 Usage: $0 [OPTIONS] [FILE]...
21509
21510   -h, --help       print this help, then exit
21511   -V, --version    print version number, then exit
21512   -d, --debug      don't remove temporary files
21513       --recheck    update $as_me by reconfiguring in the same conditions
21514   --file=FILE[:TEMPLATE]
21515                    instantiate the configuration file FILE
21516   --header=FILE[:TEMPLATE]
21517                    instantiate the configuration header FILE
21518
21519 Configuration files:
21520 $config_files
21521
21522 Configuration headers:
21523 $config_headers
21524
21525 Configuration commands:
21526 $config_commands
21527
21528 Report bugs to <dickey@invisible-island.net>."
21529 EOF
21530
21531 cat >>$CONFIG_STATUS <<EOF
21532 ac_cs_version="\\
21533 config.status
21534 configured by $0, generated by GNU Autoconf 2.52.20121002,
21535   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21536
21537 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
21538 Free Software Foundation, Inc.
21539 This config.status script is free software; the Free Software Foundation
21540 gives unlimited permission to copy, distribute and modify it."
21541 srcdir=$srcdir
21542 INSTALL="$INSTALL"
21543 EOF
21544
21545 cat >>$CONFIG_STATUS <<\EOF
21546 # If no file are specified by the user, then we need to provide default
21547 # value.  By we need to know if files were specified by the user.
21548 ac_need_defaults=:
21549 while test $# != 0
21550 do
21551   case $1 in
21552   --*=*)
21553     ac_option=`expr "x$1" : 'x\([^=]*\)='`
21554     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
21555     shift
21556     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
21557     shift
21558     ;;
21559   -*);;
21560   *) # This is not an option, so the user has probably given explicit
21561      # arguments.
21562      ac_need_defaults=false;;
21563   esac
21564
21565   case $1 in
21566   # Handling of the options.
21567 EOF
21568 cat >>$CONFIG_STATUS <<EOF
21569   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21570     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
21571     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
21572 EOF
21573 cat >>$CONFIG_STATUS <<\EOF
21574   --version | --vers* | -V )
21575     echo "$ac_cs_version"; exit 0 ;;
21576   --he | --h)
21577     # Conflict between --help and --header
21578     { { echo "$as_me:21578: error: ambiguous option: $1
21579 Try \`$0 --help' for more information." >&5
21580 echo "$as_me: error: ambiguous option: $1
21581 Try \`$0 --help' for more information." >&2;}
21582    { (exit 1); exit 1; }; };;
21583   --help | --hel | -h )
21584     echo "$ac_cs_usage"; exit 0 ;;
21585   --debug | --d* | -d )
21586     debug=: ;;
21587   --file | --fil | --fi | --f )
21588     shift
21589     CONFIG_FILES="$CONFIG_FILES $1"
21590     ac_need_defaults=false;;
21591   --header | --heade | --head | --hea )
21592     shift
21593     CONFIG_HEADERS="$CONFIG_HEADERS $1"
21594     ac_need_defaults=false;;
21595
21596   # This is an error.
21597   -*) { { echo "$as_me:21597: error: unrecognized option: $1
21598 Try \`$0 --help' for more information." >&5
21599 echo "$as_me: error: unrecognized option: $1
21600 Try \`$0 --help' for more information." >&2;}
21601    { (exit 1); exit 1; }; } ;;
21602
21603   *) ac_config_targets="$ac_config_targets $1" ;;
21604
21605   esac
21606   shift
21607 done
21608
21609 exec 5>>config.log
21610 cat >&5 << _ACEOF
21611
21612 ## ----------------------- ##
21613 ## Running config.status.  ##
21614 ## ----------------------- ##
21615
21616 This file was extended by $as_me 2.52.20121002, executed with
21617   CONFIG_FILES    = $CONFIG_FILES
21618   CONFIG_HEADERS  = $CONFIG_HEADERS
21619   CONFIG_LINKS    = $CONFIG_LINKS
21620   CONFIG_COMMANDS = $CONFIG_COMMANDS
21621   > $ac_cs_invocation
21622 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21623
21624 _ACEOF
21625 EOF
21626
21627 cat >>$CONFIG_STATUS <<EOF
21628 #
21629 # INIT-COMMANDS section.
21630 #
21631
21632 ### Special initialization commands, used to pass information from the
21633 ### configuration-run into config.status
21634
21635 AWK="$AWK"
21636 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
21637 DFT_LWR_MODEL="$DFT_LWR_MODEL"
21638 ECHO_LD="$ECHO_LD"
21639 LDCONFIG="$LDCONFIG"
21640 LIBTOOL_VERSION="$LIBTOOL_VERSION"
21641 LIB_NAME="$LIB_NAME"
21642 LIB_PREFIX="$LIB_PREFIX"
21643 LIB_SUBSETS="$LIB_SUBSETS"
21644 LIB_SUFFIX="$LIB_SUFFIX"
21645 LIB_TRACING="$LIB_TRACING"
21646 LN_S="$LN_S"
21647 MAKE_TERMINFO="$MAKE_TERMINFO"
21648 NCURSES_MAJOR="$NCURSES_MAJOR"
21649 NCURSES_MINOR="$NCURSES_MINOR"
21650 NCURSES_OSPEED="$NCURSES_OSPEED"
21651 NCURSES_PATCH="$NCURSES_PATCH"
21652 SRC_SUBDIRS="$SRC_SUBDIRS"
21653 TERMINFO="$TERMINFO"
21654 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
21655 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
21656 TICS_NAME="$TICS_NAME"
21657 TIC_PATH="$TIC_PATH"
21658 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
21659 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
21660 TINFO_NAME="$TINFO_NAME"
21661 TINFO_SUFFIX="$TINFO_SUFFIX"
21662 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
21663 WITH_CURSES_H="$with_curses_h"
21664 WITH_ECHO="${enable_echo:=yes}"
21665 WITH_OVERWRITE="$with_overwrite"
21666 cf_LIST_MODELS="$cf_list_models"
21667 cf_cv_abi_version="$cf_cv_abi_version"
21668 cf_cv_do_relink="$cf_cv_do_relink"
21669 cf_cv_do_symlinks="$cf_cv_do_symlinks"
21670 cf_cv_enable_lp64="$cf_cv_enable_lp64"
21671 cf_cv_enable_opaque="$cf_cv_enable_opaque"
21672 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
21673 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
21674 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
21675 cf_cv_rel_version="$cf_cv_rel_version"
21676 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
21677 cf_cv_shared_soname='$cf_cv_shared_soname'
21678 cf_cv_shlib_version="$cf_cv_shlib_version"
21679 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
21680 cf_cv_system_name="$cf_cv_system_name"
21681 cf_cv_term_driver="$with_term_driver"
21682 cf_with_ada="$cf_with_ada"
21683 cf_with_cxx_binding="$cf_with_cxx_binding"
21684 cf_with_db_install="$cf_with_db_install"
21685 cf_with_manpages="$cf_with_manpages"
21686 cf_with_tests="$cf_with_tests"
21687 with_shared_cxx="$with_shared_cxx"
21688 host="$host"
21689 target="$target"
21690
21691 EOF
21692
21693 cat >>$CONFIG_STATUS <<\EOF
21694 for ac_config_target in $ac_config_targets
21695 do
21696   case "$ac_config_target" in
21697   # Handling of arguments.
21698   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
21699   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
21700   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
21701   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
21702   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
21703   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
21704   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
21705   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21706   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21707   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
21708   *) { { echo "$as_me:21708: error: invalid argument: $ac_config_target" >&5
21709 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21710    { (exit 1); exit 1; }; };;
21711   esac
21712 done
21713
21714 # If the user did not use the arguments to specify the items to instantiate,
21715 # then the envvar interface is used.  Set only those that are not.
21716 # We use the long form for the default assignment because of an extremely
21717 # bizarre bug on SunOS 4.1.3.
21718 if $ac_need_defaults; then
21719   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21720   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21721   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21722 fi
21723
21724 # Create a temporary directory, and hook for its removal unless debugging.
21725 $debug ||
21726 {
21727   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21728   trap '{ (exit 1); exit 1; }' 1 2 13 15
21729 }
21730
21731 # Create a (secure) tmp directory for tmp files.
21732 : ${TMPDIR=/tmp}
21733 {
21734   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
21735   test -n "$tmp" && test -d "$tmp"
21736 }  ||
21737 {
21738   tmp=$TMPDIR/cs$$-$RANDOM
21739   (umask 077 && mkdir $tmp)
21740 } ||
21741 {
21742    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
21743    { (exit 1); exit 1; }
21744 }
21745
21746 EOF
21747
21748 cat >>$CONFIG_STATUS <<EOF
21749
21750 #
21751 # CONFIG_FILES section.
21752 #
21753
21754 # No need to generate the scripts if there are no CONFIG_FILES.
21755 # This happens for instance when ./config.status config.h
21756 if test -n "\$CONFIG_FILES"; then
21757   # Protect against being on the right side of a sed subst in config.status.
21758   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21759    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21760 s,@SHELL@,$SHELL,;t t
21761 s,@exec_prefix@,$exec_prefix,;t t
21762 s,@prefix@,$prefix,;t t
21763 s,@program_transform_name@,$program_transform_name,;t t
21764 s,@bindir@,$bindir,;t t
21765 s,@sbindir@,$sbindir,;t t
21766 s,@libexecdir@,$libexecdir,;t t
21767 s,@datarootdir@,$datarootdir,;t t
21768 s,@datadir@,$datadir,;t t
21769 s,@sysconfdir@,$sysconfdir,;t t
21770 s,@sharedstatedir@,$sharedstatedir,;t t
21771 s,@localstatedir@,$localstatedir,;t t
21772 s,@libdir@,$libdir,;t t
21773 s,@includedir@,$includedir,;t t
21774 s,@oldincludedir@,$oldincludedir,;t t
21775 s,@infodir@,$infodir,;t t
21776 s,@mandir@,$mandir,;t t
21777 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21778 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21779 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21780 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21781 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21782 s,@build_alias@,$build_alias,;t t
21783 s,@host_alias@,$host_alias,;t t
21784 s,@target_alias@,$target_alias,;t t
21785 s,@ECHO_C@,$ECHO_C,;t t
21786 s,@ECHO_N@,$ECHO_N,;t t
21787 s,@ECHO_T@,$ECHO_T,;t t
21788 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21789 s,@DEFS@,$DEFS,;t t
21790 s,@LIBS@,$LIBS,;t t
21791 s,@top_builddir@,$top_builddir,;t t
21792 s,@EGREP@,$EGREP,;t t
21793 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
21794 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
21795 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
21796 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21797 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21798 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
21799 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
21800 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
21801 s,@build@,$build,;t t
21802 s,@build_cpu@,$build_cpu,;t t
21803 s,@build_vendor@,$build_vendor,;t t
21804 s,@build_os@,$build_os,;t t
21805 s,@host@,$host,;t t
21806 s,@host_cpu@,$host_cpu,;t t
21807 s,@host_vendor@,$host_vendor,;t t
21808 s,@host_os@,$host_os,;t t
21809 s,@target@,$target,;t t
21810 s,@target_cpu@,$target_cpu,;t t
21811 s,@target_vendor@,$target_vendor,;t t
21812 s,@target_os@,$target_os,;t t
21813 s,@CC@,$CC,;t t
21814 s,@CFLAGS@,$CFLAGS,;t t
21815 s,@LDFLAGS@,$LDFLAGS,;t t
21816 s,@CPPFLAGS@,$CPPFLAGS,;t t
21817 s,@ac_ct_CC@,$ac_ct_CC,;t t
21818 s,@EXEEXT@,$EXEEXT,;t t
21819 s,@OBJEXT@,$OBJEXT,;t t
21820 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21821 s,@CPP@,$CPP,;t t
21822 s,@LDCONFIG@,$LDCONFIG,;t t
21823 s,@CXX@,$CXX,;t t
21824 s,@CXXFLAGS@,$CXXFLAGS,;t t
21825 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
21826 s,@AWK@,$AWK,;t t
21827 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21828 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21829 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21830 s,@LINT@,$LINT,;t t
21831 s,@LINT_OPTS@,$LINT_OPTS,;t t
21832 s,@LN_S@,$LN_S,;t t
21833 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21834 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21835 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
21836 s,@SET_MAKE@,$SET_MAKE,;t t
21837 s,@CTAGS@,$CTAGS,;t t
21838 s,@ETAGS@,$ETAGS,;t t
21839 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21840 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21841 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
21842 s,@RANLIB@,$RANLIB,;t t
21843 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21844 s,@LD@,$LD,;t t
21845 s,@ac_ct_LD@,$ac_ct_LD,;t t
21846 s,@AR@,$AR,;t t
21847 s,@ac_ct_AR@,$ac_ct_AR,;t t
21848 s,@NM@,$NM,;t t
21849 s,@ac_ct_NM@,$ac_ct_NM,;t t
21850 s,@ARFLAGS@,$ARFLAGS,;t t
21851 s,@DESTDIR@,$DESTDIR,;t t
21852 s,@BUILD_CC@,$BUILD_CC,;t t
21853 s,@BUILD_CPP@,$BUILD_CPP,;t t
21854 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
21855 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
21856 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
21857 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
21858 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
21859 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
21860 s,@cf_list_models@,$cf_list_models,;t t
21861 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
21862 s,@LIBTOOL@,$LIBTOOL,;t t
21863 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
21864 s,@LT_UNDEF@,$LT_UNDEF,;t t
21865 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
21866 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21867 s,@LIB_CREATE@,$LIB_CREATE,;t t
21868 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
21869 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
21870 s,@LIB_PREP@,$LIB_PREP,;t t
21871 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21872 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21873 s,@LIB_LINK@,$LIB_LINK,;t t
21874 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
21875 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
21876 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
21877 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21878 s,@TICS_NAME@,$TICS_NAME,;t t
21879 s,@TINFO_NAME@,$TINFO_NAME,;t t
21880 s,@LIB_NAME@,$LIB_NAME,;t t
21881 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
21882 s,@CC_G_OPT@,$CC_G_OPT,;t t
21883 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
21884 s,@LD_MODEL@,$LD_MODEL,;t t
21885 s,@shlibdir@,$shlibdir,;t t
21886 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
21887 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21888 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
21889 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21890 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
21891 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
21892 s,@LINK_PROGS@,$LINK_PROGS,;t t
21893 s,@LINK_TESTS@,$LINK_TESTS,;t t
21894 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21895 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21896 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21897 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21898 s,@RPATH_LIST@,$RPATH_LIST,;t t
21899 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21900 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21901 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
21902 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21903 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21904 s,@XTERM_KBS@,$XTERM_KBS,;t t
21905 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21906 s,@TERMINFO@,$TERMINFO,;t t
21907 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21908 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21909 s,@TERMPATH@,$TERMPATH,;t t
21910 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
21911 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21912 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21913 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21914 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21915 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21916 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21917 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21918 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21919 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21920 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21921 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21922 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21923 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21924 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21925 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21926 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
21927 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21928 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21929 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21930 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21931 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21932 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21933 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21934 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21935 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21936 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21937 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21938 s,@PTHREAD@,$PTHREAD,;t t
21939 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21940 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21941 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21942 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21943 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21944 s,@ECHO_LT@,$ECHO_LT,;t t
21945 s,@ECHO_LD@,$ECHO_LD,;t t
21946 s,@RULE_CC@,$RULE_CC,;t t
21947 s,@SHOW_CC@,$SHOW_CC,;t t
21948 s,@ECHO_CC@,$ECHO_CC,;t t
21949 s,@ECHO_LINK@,$ECHO_LINK,;t t
21950 s,@ADAFLAGS@,$ADAFLAGS,;t t
21951 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21952 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21953 s,@ADA_TRACE@,$ADA_TRACE,;t t
21954 s,@MATH_LIB@,$MATH_LIB,;t t
21955 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21956 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21957 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21958 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21959 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21960 s,@TEST_LIBS@,$TEST_LIBS,;t t
21961 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21962 s,@CXXCPP@,$CXXCPP,;t t
21963 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21964 s,@CXX_AR@,$CXX_AR,;t t
21965 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21966 s,@CXXLIBS@,$CXXLIBS,;t t
21967 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21968 s,@gnat_exists@,$gnat_exists,;t t
21969 s,@M4_exists@,$M4_exists,;t t
21970 s,@cf_ada_make@,$cf_ada_make,;t t
21971 s,@cf_compile_generics@,$cf_compile_generics,;t t
21972 s,@cf_generic_objects@,$cf_generic_objects,;t t
21973 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21974 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21975 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21976 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21977 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21978 s,@cf_ada_package@,$cf_ada_package,;t t
21979 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21980 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21981 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21982 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21983 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21984 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21985 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21986 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21987 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21988 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21989 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21990 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21991 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21992 s,@TICS_LIBS@,$TICS_LIBS,;t t
21993 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21994 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21995 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21996 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21997 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21998 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21999 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
22000 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
22001 s,@includesubdir@,$includesubdir,;t t
22002 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
22003 s,@TICS_LIST@,$TICS_LIST,;t t
22004 s,@TINFO_LIST@,$TINFO_LIST,;t t
22005 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
22006 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
22007 s,@TEST_ARGS@,$TEST_ARGS,;t t
22008 s,@TEST_DEPS@,$TEST_DEPS,;t t
22009 s,@TEST_ARG2@,$TEST_ARG2,;t t
22010 s,@TEST_DEP2@,$TEST_DEP2,;t t
22011 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
22012 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
22013 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
22014 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
22015 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
22016 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
22017 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
22018 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
22019 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22020 s,@cross_compiling@,$cross_compiling,;t t
22021 s,@TIC_PATH@,$TIC_PATH,;t t
22022 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
22023 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
22024 s,@PANEL_NAME@,$PANEL_NAME,;t t
22025 s,@MENU_NAME@,$MENU_NAME,;t t
22026 s,@FORM_NAME@,$FORM_NAME,;t t
22027 s,@CXX_NAME@,$CXX_NAME,;t t
22028 CEOF
22029
22030 EOF
22031
22032   cat >>$CONFIG_STATUS <<\EOF
22033   # Split the substitutions into bite-sized pieces for seds with
22034   # small command number limits, like on Digital OSF/1 and HP-UX.
22035   ac_max_sed_lines=48
22036   ac_sed_frag=1 # Number of current file.
22037   ac_beg=1 # First line for current file.
22038   ac_end=$ac_max_sed_lines # Line after last line for current file.
22039   ac_more_lines=:
22040   ac_sed_cmds=
22041   while $ac_more_lines; do
22042     if test $ac_beg -gt 1; then
22043       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22044     else
22045       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22046     fi
22047     if test ! -s $tmp/subs.frag; then
22048       ac_more_lines=false
22049     else
22050       # The purpose of the label and of the branching condition is to
22051       # speed up the sed processing (if there are no `@' at all, there
22052       # is no need to browse any of the substitutions).
22053       # These are the two extra sed commands mentioned above.
22054       (echo ':t
22055   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22056       if test -z "$ac_sed_cmds"; then
22057         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
22058       else
22059         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22060       fi
22061       ac_sed_frag=`expr $ac_sed_frag + 1`
22062       ac_beg=$ac_end
22063       ac_end=`expr $ac_end + $ac_max_sed_lines`
22064     fi
22065   done
22066   if test -z "$ac_sed_cmds"; then
22067     ac_sed_cmds=cat
22068   fi
22069 fi # test -n "$CONFIG_FILES"
22070
22071 EOF
22072 cat >>$CONFIG_STATUS <<\EOF
22073 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22074   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22075   case $ac_file in
22076   - | *:- | *:-:* ) # input from stdin
22077         cat >$tmp/stdin
22078         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22079         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22080   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22081         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22082   * )   ac_file_in=$ac_file.in ;;
22083   esac
22084
22085   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22086   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22087          X"$ac_file" : 'X\(//\)[^/]' \| \
22088          X"$ac_file" : 'X\(//\)$' \| \
22089          X"$ac_file" : 'X\(/\)' \| \
22090          .     : '\(.\)' 2>/dev/null ||
22091 echo X"$ac_file" |
22092     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22093           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22094           /^X\(\/\/\)$/{ s//\1/; q; }
22095           /^X\(\/\).*/{ s//\1/; q; }
22096           s/.*/./; q'`
22097   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22098     { case "$ac_dir" in
22099   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22100   *)                      as_incr_dir=.;;
22101 esac
22102 as_dummy="$ac_dir"
22103 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22104   case $as_mkdir_dir in
22105     # Skip DOS drivespec
22106     ?:) as_incr_dir=$as_mkdir_dir ;;
22107     *)
22108       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22109       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22110     ;;
22111   esac
22112 done; }
22113
22114     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
22115     # A "../" for each directory in $ac_dir_suffix.
22116     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
22117   else
22118     ac_dir_suffix= ac_dots=
22119   fi
22120
22121   case $srcdir in
22122   .)  ac_srcdir=.
22123       if test -z "$ac_dots"; then
22124          ac_top_srcdir=.
22125       else
22126          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
22127       fi ;;
22128   [\\/]* | ?:[\\/]* )
22129       ac_srcdir=$srcdir$ac_dir_suffix;
22130       ac_top_srcdir=$srcdir ;;
22131   *) # Relative path.
22132     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
22133     ac_top_srcdir=$ac_dots$srcdir ;;
22134   esac
22135
22136   case $INSTALL in
22137   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22138   *) ac_INSTALL=$ac_dots$INSTALL ;;
22139   esac
22140
22141   if test x"$ac_file" != x-; then
22142     { echo "$as_me:22142: creating $ac_file" >&5
22143 echo "$as_me: creating $ac_file" >&6;}
22144     rm -f "$ac_file"
22145   fi
22146   # Let's still pretend it is `configure' which instantiates (i.e., don't
22147   # use $as_me), people would be surprised to read:
22148   #    /* config.h.  Generated automatically by config.status.  */
22149   configure_input="Generated automatically from `echo $ac_file_in |
22150                                                  sed 's,.*/,,'` by configure."
22151
22152   # First look for the input files in the build tree, otherwise in the
22153   # src tree.
22154   ac_file_inputs=`IFS=:
22155     for f in $ac_file_in; do
22156       case $f in
22157       -) echo $tmp/stdin ;;
22158       [\\/$]*)
22159          # Absolute (can't be DOS-style, as IFS=:)
22160          test -f "$f" || { { echo "$as_me:22160: error: cannot find input file: $f" >&5
22161 echo "$as_me: error: cannot find input file: $f" >&2;}
22162    { (exit 1); exit 1; }; }
22163          echo $f;;
22164       *) # Relative
22165          if test -f "$f"; then
22166            # Build tree
22167            echo $f
22168          elif test -f "$srcdir/$f"; then
22169            # Source tree
22170            echo $srcdir/$f
22171          else
22172            # /dev/null tree
22173            { { echo "$as_me:22173: error: cannot find input file: $f" >&5
22174 echo "$as_me: error: cannot find input file: $f" >&2;}
22175    { (exit 1); exit 1; }; }
22176          fi;;
22177       esac
22178     done` || { (exit 1); exit 1; }
22179 EOF
22180 cat >>$CONFIG_STATUS <<\EOF
22181   ac_warn_datarootdir=no
22182   if test x"$ac_file" != x-; then
22183     for ac_item in $ac_file_inputs
22184     do
22185       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
22186       if test -n "$ac_seen"; then
22187         ac_used=`grep '@datarootdir@' $ac_item`
22188         if test -z "$ac_used"; then
22189           { echo "$as_me:22189: WARNING: datarootdir was used implicitly but not set:
22190 $ac_seen" >&5
22191 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
22192 $ac_seen" >&2;}
22193           ac_warn_datarootdir=yes
22194         fi
22195       fi
22196       ac_seen=`grep '${datarootdir}' $ac_item`
22197       if test -n "$ac_seen"; then
22198         { echo "$as_me:22198: WARNING: datarootdir was used explicitly but not set:
22199 $ac_seen" >&5
22200 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
22201 $ac_seen" >&2;}
22202         ac_warn_datarootdir=yes
22203       fi
22204     done
22205   fi
22206
22207 if test "x$ac_warn_datarootdir" = xyes; then
22208   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
22209 fi
22210
22211 EOF
22212 cat >>$CONFIG_STATUS <<EOF
22213   sed "$ac_vpsub
22214 $extrasub
22215 EOF
22216 cat >>$CONFIG_STATUS <<\EOF
22217 :t
22218 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22219 s,@configure_input@,$configure_input,;t t
22220 s,@srcdir@,$ac_srcdir,;t t
22221 s,@top_srcdir@,$ac_top_srcdir,;t t
22222 s,@INSTALL@,$ac_INSTALL,;t t
22223 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22224   rm -f $tmp/stdin
22225   if test x"$ac_file" != x-; then
22226     cp $tmp/out $ac_file
22227
22228     for ac_name in prefix exec_prefix datarootdir
22229     do
22230         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
22231         if test -n "$ac_seen"; then
22232             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
22233             if test -z "$ac_init"; then
22234               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
22235               { echo "$as_me:22235: WARNING: Variable $ac_name is used but was not set:
22236 $ac_seen" >&5
22237 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
22238 $ac_seen" >&2;}
22239             fi
22240         fi
22241     done
22242     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
22243     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
22244     if test -s $tmp/out; then
22245       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
22246       { echo "$as_me:22246: WARNING: Some variables may not be substituted:
22247 $ac_seen" >&5
22248 echo "$as_me: WARNING: Some variables may not be substituted:
22249 $ac_seen" >&2;}
22250     fi
22251   else
22252     cat $tmp/out
22253   fi
22254   rm -f $tmp/out
22255
22256 done
22257 EOF
22258 cat >>$CONFIG_STATUS <<\EOF
22259
22260 #
22261 # CONFIG_HEADER section.
22262 #
22263
22264 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22265 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22266 #
22267 # ac_d sets the value in "#define NAME VALUE" lines.
22268 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22269 ac_dB='[        ].*$,\1#\2'
22270 ac_dC=' '
22271 ac_dD=',;t'
22272 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22273 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22274 ac_iB='\([      ]\),\1#\2define\3'
22275 ac_iC=' '
22276 ac_iD='\4,;t'
22277 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22278 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22279 ac_uB='$,\1#\2define\3'
22280 ac_uC=' '
22281 ac_uD=',;t'
22282
22283 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22284   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22285   case $ac_file in
22286   - | *:- | *:-:* ) # input from stdin
22287         cat >$tmp/stdin
22288         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22289         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22290   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22291         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22292   * )   ac_file_in=$ac_file.in ;;
22293   esac
22294
22295   test x"$ac_file" != x- && { echo "$as_me:22295: creating $ac_file" >&5
22296 echo "$as_me: creating $ac_file" >&6;}
22297
22298   # First look for the input files in the build tree, otherwise in the
22299   # src tree.
22300   ac_file_inputs=`IFS=:
22301     for f in $ac_file_in; do
22302       case $f in
22303       -) echo $tmp/stdin ;;
22304       [\\/$]*)
22305          # Absolute (can't be DOS-style, as IFS=:)
22306          test -f "$f" || { { echo "$as_me:22306: error: cannot find input file: $f" >&5
22307 echo "$as_me: error: cannot find input file: $f" >&2;}
22308    { (exit 1); exit 1; }; }
22309          echo $f;;
22310       *) # Relative
22311          if test -f "$f"; then
22312            # Build tree
22313            echo $f
22314          elif test -f "$srcdir/$f"; then
22315            # Source tree
22316            echo $srcdir/$f
22317          else
22318            # /dev/null tree
22319            { { echo "$as_me:22319: error: cannot find input file: $f" >&5
22320 echo "$as_me: error: cannot find input file: $f" >&2;}
22321    { (exit 1); exit 1; }; }
22322          fi;;
22323       esac
22324     done` || { (exit 1); exit 1; }
22325   # Remove the trailing spaces.
22326   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
22327
22328 EOF
22329
22330 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
22331 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
22332 # be either 'cat' or 'sort'.
22333 cat confdefs.h | uniq >conftest.vals
22334
22335 # Break up conftest.vals because some shells have a limit on
22336 # the size of here documents, and old seds have small limits too.
22337
22338 rm -f conftest.tail
22339 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
22340 while grep . conftest.vals >/dev/null
22341 do
22342   # Write chunks of a limited-size here document to conftest.frag.
22343   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
22344   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
22345   echo 'CEOF' >> $CONFIG_STATUS
22346   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22347   rm -f conftest.vals
22348   mv conftest.tail conftest.vals
22349 done
22350 rm -f conftest.vals
22351
22352 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
22353 # marker @DEFS@.
22354 echo '  cat >> conftest.edit <<CEOF
22355 /@DEFS@/r conftest.frag
22356 /@DEFS@/d
22357 CEOF
22358 sed -f conftest.edit $tmp/in > $tmp/out
22359 rm -f $tmp/in
22360 mv $tmp/out $tmp/in
22361 rm -f conftest.edit conftest.frag
22362 ' >> $CONFIG_STATUS
22363
22364 cat >>$CONFIG_STATUS <<\EOF
22365   # Let's still pretend it is `configure' which instantiates (i.e., don't
22366   # use $as_me), people would be surprised to read:
22367   #    /* config.h.  Generated automatically by config.status.  */
22368   if test x"$ac_file" = x-; then
22369     echo "/* Generated automatically by configure.  */" >$tmp/config.h
22370   else
22371     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
22372   fi
22373   cat $tmp/in >>$tmp/config.h
22374   rm -f $tmp/in
22375   if test x"$ac_file" != x-; then
22376     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
22377       { echo "$as_me:22377: $ac_file is unchanged" >&5
22378 echo "$as_me: $ac_file is unchanged" >&6;}
22379     else
22380       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22381          X"$ac_file" : 'X\(//\)[^/]' \| \
22382          X"$ac_file" : 'X\(//\)$' \| \
22383          X"$ac_file" : 'X\(/\)' \| \
22384          .     : '\(.\)' 2>/dev/null ||
22385 echo X"$ac_file" |
22386     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22387           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22388           /^X\(\/\/\)$/{ s//\1/; q; }
22389           /^X\(\/\).*/{ s//\1/; q; }
22390           s/.*/./; q'`
22391       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22392         { case "$ac_dir" in
22393   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22394   *)                      as_incr_dir=.;;
22395 esac
22396 as_dummy="$ac_dir"
22397 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22398   case $as_mkdir_dir in
22399     # Skip DOS drivespec
22400     ?:) as_incr_dir=$as_mkdir_dir ;;
22401     *)
22402       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22403       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22404     ;;
22405   esac
22406 done; }
22407
22408       fi
22409       rm -f $ac_file
22410       mv $tmp/config.h $ac_file
22411     fi
22412   else
22413     cat $tmp/config.h
22414     rm -f $tmp/config.h
22415   fi
22416 done
22417 EOF
22418 cat >>$CONFIG_STATUS <<\EOF
22419 #
22420 # CONFIG_COMMANDS section.
22421 #
22422 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22423   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22424   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22425
22426   case $ac_dest in
22427     default )
22428 if test "x$cf_with_tests" != xno ; then
22429
22430 for cf_dir in test
22431 do
22432         if test ! -d $srcdir/$cf_dir; then
22433                 continue
22434         elif test -f $srcdir/$cf_dir/programs; then
22435                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
22436         fi
22437 done
22438
22439 fi
22440
22441 cf_prefix=$LIB_PREFIX
22442
22443 case $cf_cv_shlib_version in #(vi
22444 cygdll|msysdll|mingw)
22445         TINFO_NAME=$TINFO_ARG_SUFFIX
22446         TINFO_SUFFIX=.dll
22447         ;;
22448 esac
22449
22450 if test -n "$TINFO_SUFFIX" ; then
22451         case $TINFO_SUFFIX in
22452         tw*)
22453                 TINFO_NAME="${TINFO_NAME}tw"
22454                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
22455                 ;;
22456         t*)
22457                 TINFO_NAME="${TINFO_NAME}t"
22458                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
22459                 ;;
22460         w*)
22461                 TINFO_NAME="${TINFO_NAME}w"
22462                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
22463                 ;;
22464         esac
22465 fi
22466
22467 for cf_dir in $SRC_SUBDIRS
22468 do
22469         if test ! -d $srcdir/$cf_dir ; then
22470                 continue
22471         elif test -f $srcdir/$cf_dir/modules; then
22472
22473                 SHARED_LIB=
22474                 Libs_To_Make=
22475                 for cf_item in $cf_LIST_MODELS
22476                 do
22477
22478         case X$cf_item in #(vi
22479         Xlibtool) #(vi
22480                 cf_suffix='.la'
22481                 cf_depsuf=$cf_suffix
22482                 ;;
22483         Xdebug) #(vi
22484                 cf_suffix='_g.a'
22485                 cf_depsuf=$cf_suffix
22486                 ;;
22487         Xprofile) #(vi
22488                 cf_suffix='_p.a'
22489                 cf_depsuf=$cf_suffix
22490                 ;;
22491         Xshared) #(vi
22492                 case $cf_cv_system_name in
22493                 aix[5-7]*) #(vi
22494                         cf_suffix='.so'
22495                         cf_depsuf=$cf_suffix
22496                         ;;
22497                 cygwin*|msys*|mingw*) #(vi
22498                         cf_suffix='.dll'
22499                         cf_depsuf='.dll.a'
22500                         ;;
22501                 darwin*) #(vi
22502                         cf_suffix='.dylib'
22503                         cf_depsuf=$cf_suffix
22504                         ;;
22505                 hpux*) #(vi
22506                         case $target in
22507                         ia64*) #(vi
22508                                 cf_suffix='.so'
22509                                 cf_depsuf=$cf_suffix
22510                                 ;;
22511                         *) #(vi
22512                                 cf_suffix='.sl'
22513                                 cf_depsuf=$cf_suffix
22514                                 ;;
22515                         esac
22516                         ;;
22517                 *) #(vi
22518                         cf_suffix='.so'
22519                         cf_depsuf=$cf_suffix
22520                         ;;
22521                 esac
22522                 ;;
22523         *)
22524                 cf_suffix='.a'
22525                 cf_depsuf=$cf_suffix
22526                 ;;
22527         esac
22528         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22529         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22530
22531                         cf_libname=$cf_dir
22532                         test "$cf_dir" = c++ && cf_libname=ncurses++
22533                         if test $cf_item = shared ; then
22534                                 if test -n "${LIB_SUFFIX}"
22535                                 then
22536                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
22537                                 else
22538                                         cf_shared_suffix="$cf_suffix"
22539                                 fi
22540                                 if test "$cf_cv_do_symlinks" = yes ; then
22541                                         cf_version_name=
22542
22543                                         case "$cf_cv_shlib_version" in #(vi
22544                                         rel) #(vi
22545                                                 cf_version_name=REL_VERSION
22546                                                 ;;
22547                                         abi)
22548                                                 cf_version_name=ABI_VERSION
22549                                                 ;;
22550                                         esac
22551
22552                                         if test -n "$cf_version_name"
22553                                         then
22554                                                 case "$cf_cv_system_name" in #(vi
22555                                                 darwin*)
22556                                                         # "w", etc?
22557                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
22558                                                         ;; #(vi
22559                                                 *)
22560                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
22561                                                         ;;
22562                                                 esac
22563                                         fi
22564                                         if test -n "${LIB_SUFFIX}"
22565                                         then
22566                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
22567                                         else
22568                                                 cf_shared_suffix="$cf_suffix"
22569                                         fi
22570                                 fi
22571                                 # cygwin needs import library, and has unique naming convention
22572                                 # use autodetected ${cf_prefix} for import lib and static lib, but
22573                                 # use 'cyg' prefix for shared lib.
22574                                 case $cf_cv_shlib_version in #(vi
22575                                 cygdll) #(vi
22576                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22577                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
22578                                         continue
22579                                         ;;
22580                                 msysdll) #(vi
22581                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22582                                         Libs_To_Make="$Libs_To_Make ../lib/msys-${cf_libname}${cf_cygsuf}"
22583                                         continue
22584                                         ;;
22585                                 mingw)
22586                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22587                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
22588                                         continue
22589                                         ;;
22590                                 esac
22591                         fi
22592                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
22593                 done
22594
22595                 if test $cf_dir = ncurses ; then
22596                         cf_subsets="$LIB_SUBSETS"
22597                         cf_r_parts="$cf_subsets"
22598                         cf_liblist="$Libs_To_Make"
22599
22600                         while test -n "$cf_r_parts"
22601                         do
22602                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
22603                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
22604                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
22605                                         cf_item=
22606                                         case $cf_l_parts in #(vi
22607                                         *termlib*) #(vi
22608                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
22609                                                 ;;
22610                                         *ticlib*)
22611                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
22612                                                 ;;
22613                                         *)
22614                                                 break
22615                                                 ;;
22616                                         esac
22617                                         if test -n "$cf_item"; then
22618                                                 Libs_To_Make="$cf_item $Libs_To_Make"
22619                                         fi
22620                                 else
22621                                         break
22622                                 fi
22623                         done
22624                 else
22625                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
22626                 fi
22627
22628                 if test $cf_dir = c++; then
22629                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
22630                                 cf_list=
22631                                 for cf_item in $Libs_To_Make
22632                                 do
22633                                         case $cf_item in
22634                                         *.a)
22635                                                 ;;
22636                                         *)
22637                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
22638                                                 ;;
22639                                         esac
22640                                         for cf_test in $cf_list
22641                                         do
22642                                                 if test "$cf_test" = "$cf_item"
22643                                                 then
22644                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
22645                                                         cf_item=
22646                                                         break
22647                                                 fi
22648                                         done
22649                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
22650                                 done
22651                                 Libs_To_Make="$cf_list"
22652                         fi
22653                 fi
22654
22655                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
22656                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
22657                         $cf_dir/Makefile >$cf_dir/Makefile.out
22658                 mv $cf_dir/Makefile.out $cf_dir/Makefile
22659
22660                 $AWK -f $srcdir/mk-0th.awk \
22661                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
22662                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22663
22664                 for cf_subset in $cf_subsets
22665                 do
22666                         cf_subdirs=
22667                         for cf_item in $cf_LIST_MODELS
22668                         do
22669
22670                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
22671
22672 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22673
22674                         CXX_MODEL=$cf_ITEM
22675                         if test "$CXX_MODEL" = SHARED; then
22676                                 case $cf_cv_shlib_version in #(vi
22677                                 cygdll|msysdll|mingw) #(vi
22678                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
22679
22680 echo "${as_me:-configure}:22680: testing overriding CXX_MODEL to SHARED ..." 1>&5
22681
22682                                         with_shared_cxx=yes
22683                                         ;;
22684                                 *)
22685                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
22686                                         ;;
22687                                 esac
22688                         fi
22689
22690         case X$cf_item in #(vi
22691         Xlibtool) #(vi
22692                 cf_suffix='.la'
22693                 cf_depsuf=$cf_suffix
22694                 ;;
22695         Xdebug) #(vi
22696                 cf_suffix='_g.a'
22697                 cf_depsuf=$cf_suffix
22698                 ;;
22699         Xprofile) #(vi
22700                 cf_suffix='_p.a'
22701                 cf_depsuf=$cf_suffix
22702                 ;;
22703         Xshared) #(vi
22704                 case $cf_cv_system_name in
22705                 aix[5-7]*) #(vi
22706                         cf_suffix='.so'
22707                         cf_depsuf=$cf_suffix
22708                         ;;
22709                 cygwin*|msys*|mingw*) #(vi
22710                         cf_suffix='.dll'
22711                         cf_depsuf='.dll.a'
22712                         ;;
22713                 darwin*) #(vi
22714                         cf_suffix='.dylib'
22715                         cf_depsuf=$cf_suffix
22716                         ;;
22717                 hpux*) #(vi
22718                         case $target in
22719                         ia64*) #(vi
22720                                 cf_suffix='.so'
22721                                 cf_depsuf=$cf_suffix
22722                                 ;;
22723                         *) #(vi
22724                                 cf_suffix='.sl'
22725                                 cf_depsuf=$cf_suffix
22726                                 ;;
22727                         esac
22728                         ;;
22729                 *) #(vi
22730                         cf_suffix='.so'
22731                         cf_depsuf=$cf_suffix
22732                         ;;
22733                 esac
22734                 ;;
22735         *)
22736                 cf_suffix='.a'
22737                 cf_depsuf=$cf_suffix
22738                 ;;
22739         esac
22740         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22741         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22742
22743         case $cf_item in
22744         libtool) cf_subdir='obj_lo'  ;;
22745         normal)  cf_subdir='objects' ;;
22746         debug)   cf_subdir='obj_g' ;;
22747         profile) cf_subdir='obj_p' ;;
22748         shared)
22749                 case $cf_cv_system_name in #(vi
22750                 cygwin|msys) #(vi
22751                         cf_subdir='objects' ;;
22752                 *)
22753                         cf_subdir='obj_s' ;;
22754                 esac
22755         esac
22756
22757                         # Test for case where we build libtinfo with a different name.
22758                         cf_libname=$cf_dir
22759                         if test $cf_dir = ncurses ; then
22760                                 case $cf_subset in
22761                                 *base*)
22762                                         cf_libname=${cf_libname}$LIB_SUFFIX
22763                                         ;;
22764                                 *termlib*)
22765                                         cf_libname=$TINFO_LIB_SUFFIX
22766                                         ;;
22767                                 ticlib*)
22768                                         cf_libname=$TICS_LIB_SUFFIX
22769                                         ;;
22770                                 esac
22771                         elif test $cf_dir = c++ ; then
22772                                 cf_libname=ncurses++$LIB_SUFFIX
22773                         else
22774                                 cf_libname=${cf_libname}$LIB_SUFFIX
22775                         fi
22776                         if test -n "${DFT_ARG_SUFFIX}" ; then
22777                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
22778                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
22779                         fi
22780
22781                         # These dependencies really are for development, not
22782                         # builds, but they are useful in porting, too.
22783                         cf_depend="../include/ncurses_cfg.h"
22784                         if test "$srcdir" = "."; then
22785                                 cf_reldir="."
22786                         else
22787                                 cf_reldir="\${srcdir}"
22788                         fi
22789
22790                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
22791                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
22792                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
22793                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
22794                         fi
22795
22796                         cf_dir_suffix=
22797                         old_cf_suffix="$cf_suffix"
22798                         if test "$cf_cv_shlib_version_infix" = yes ; then
22799                         if test -n "$LIB_SUFFIX" ; then
22800                                 case $LIB_SUFFIX in
22801                                 tw*)
22802                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
22803                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
22804                                         cf_dir_suffix=tw
22805                                         ;;
22806                                 t*)
22807                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
22808                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
22809                                         cf_dir_suffix=t
22810                                         ;;
22811                                 w*)
22812                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
22813                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
22814                                         cf_dir_suffix=w
22815                                         ;;
22816                                 esac
22817                         fi
22818                         fi
22819
22820                         $AWK -f $srcdir/mk-1st.awk \
22821                                 name=${cf_libname}${cf_dir_suffix} \
22822                                 traces=$LIB_TRACING \
22823                                 MODEL=$cf_ITEM \
22824                                 CXX_MODEL=$CXX_MODEL \
22825                                 model=$cf_subdir \
22826                                 prefix=$cf_prefix \
22827                                 suffix=$cf_suffix \
22828                                 subset=$cf_subset \
22829                                 driver=$cf_cv_term_driver \
22830                                 SymLink="$LN_S" \
22831                                 TermlibRoot=$TINFO_NAME \
22832                                 TermlibSuffix=$TINFO_SUFFIX \
22833                                 ShlibVer=$cf_cv_shlib_version \
22834                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
22835                                 ReLink=${cf_cv_do_relink:-no} \
22836                                 DoLinks=$cf_cv_do_symlinks \
22837                                 rmSoLocs=$cf_cv_rm_so_locs \
22838                                 ldconfig="$LDCONFIG" \
22839                                 overwrite=$WITH_OVERWRITE \
22840                                 depend="$cf_depend" \
22841                                 host="$host" \
22842                                 libtool_version="$LIBTOOL_VERSION" \
22843                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22844
22845                         cf_suffix="$old_cf_suffix"
22846
22847                         for cf_subdir2 in $cf_subdirs lib
22848                         do
22849                                 test $cf_subdir = $cf_subdir2 && break
22850                         done
22851                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
22852                         $AWK -f $srcdir/mk-2nd.awk \
22853                                 name=$cf_dir \
22854                                 traces=$LIB_TRACING \
22855                                 MODEL=$cf_ITEM \
22856                                 model=$cf_subdir \
22857                                 subset=$cf_subset \
22858                                 srcdir=$srcdir \
22859                                 echo=$WITH_ECHO \
22860                                 crenames=$cf_cv_prog_CC_c_o \
22861                                 cxxrenames=$cf_cv_prog_CXX_c_o \
22862                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22863                         cf_subdirs="$cf_subdirs $cf_subdir"
22864                         done
22865                 done
22866         fi
22867
22868         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
22869 done
22870
22871 for cf_dir in $SRC_SUBDIRS
22872 do
22873         if test ! -d $srcdir/$cf_dir ; then
22874                 continue
22875         fi
22876
22877         if test -f $cf_dir/Makefile ; then
22878                 case "$cf_dir" in
22879                 Ada95) #(vi
22880                         echo 'libs \' >> Makefile
22881                         echo 'install.libs \' >> Makefile
22882                         echo 'uninstall.libs ::' >> Makefile
22883                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
22884                         ;;
22885                 esac
22886         fi
22887
22888         if test -f $srcdir/$cf_dir/modules; then
22889                 echo >> Makefile
22890                 if test -f $srcdir/$cf_dir/headers; then
22891 cat >> Makefile <<CF_EOF
22892 install.includes \\
22893 uninstall.includes \\
22894 CF_EOF
22895                 fi
22896 if test "$cf_dir" != "c++" ; then
22897 echo 'lint \' >> Makefile
22898 fi
22899 cat >> Makefile <<CF_EOF
22900 libs \\
22901 lintlib \\
22902 install.libs \\
22903 uninstall.libs \\
22904 install.$cf_dir \\
22905 uninstall.$cf_dir ::
22906         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22907 CF_EOF
22908         elif test -f $srcdir/$cf_dir/headers; then
22909 cat >> Makefile <<CF_EOF
22910
22911 libs \\
22912 install.libs \\
22913 uninstall.libs \\
22914 install.includes \\
22915 uninstall.includes ::
22916         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22917 CF_EOF
22918 fi
22919 done
22920
22921 if test "x$cf_with_db_install" = xyes; then
22922 cat >> Makefile <<CF_EOF
22923
22924 install.libs uninstall.libs \\
22925 install.data uninstall.data ::
22926 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
22927 CF_EOF
22928 fi
22929
22930 if test "x$cf_with_manpages" = xyes; then
22931 cat >> Makefile <<CF_EOF
22932
22933 install.man \\
22934 uninstall.man ::
22935         cd man && \${MAKE} \${TOP_MFLAGS} \$@
22936 CF_EOF
22937 fi
22938
22939 cat >> Makefile <<CF_EOF
22940
22941 distclean ::
22942         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
22943         rm -f headers.sh headers.sed mk_shared_lib.sh
22944         rm -f edit_man.* man_alias.*
22945         rm -rf \${DIRS_TO_MAKE}
22946 CF_EOF
22947
22948 # Special case: tack's manpage lives in its own directory.
22949 if test "x$cf_with_manpages" = xyes; then
22950 if test -d tack ; then
22951 if test -f $srcdir/$tack.h; then
22952 cat >> Makefile <<CF_EOF
22953
22954 install.man \\
22955 uninstall.man ::
22956         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
22957 CF_EOF
22958 fi
22959 fi
22960 fi
22961
22962 rm -f headers.sed headers.sh
22963
22964 echo creating headers.sh
22965 cat >headers.sh <<CF_EOF
22966 #! /bin/sh
22967 # This shell script is generated by the 'configure' script.  It is invoked in a
22968 # subdirectory of the build tree.  It generates a sed-script in the parent
22969 # directory that is used to adjust includes for header files that reside in a
22970 # subdirectory of /usr/include, etc.
22971 PRG=""
22972 while test \$# != 3
22973 do
22974 PRG="\$PRG \$1"; shift
22975 done
22976 DST=\$1
22977 REF=\$2
22978 SRC=\$3
22979 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
22980 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
22981 echo installing \$SRC in \$DST
22982 CF_EOF
22983
22984 if test $WITH_CURSES_H = yes; then
22985         cat >>headers.sh <<CF_EOF
22986 case \$DST in
22987 /*/include/*)
22988         END=\`basename \$DST\`
22989         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22990         do
22991                 NAME=\`basename \$i\`
22992                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22993         done
22994         ;;
22995 *)
22996         echo "" >> \$TMPSED
22997         ;;
22998 esac
22999 CF_EOF
23000
23001 else
23002         cat >>headers.sh <<CF_EOF
23003 case \$DST in
23004 /*/include/*)
23005         END=\`basename \$DST\`
23006         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23007         do
23008                 NAME=\`basename \$i\`
23009                 if test "\$NAME" = "curses.h"
23010                 then
23011                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23012                         NAME=ncurses.h
23013                 fi
23014                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23015         done
23016         ;;
23017 *)
23018         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23019         ;;
23020 esac
23021 CF_EOF
23022 fi
23023 cat >>headers.sh <<CF_EOF
23024 rm -f \$TMPSRC
23025 sed -f \$TMPSED \$SRC > \$TMPSRC
23026 NAME=\`basename \$SRC\`
23027 CF_EOF
23028 if test $WITH_CURSES_H != yes; then
23029         cat >>headers.sh <<CF_EOF
23030 test "\$NAME" = "curses.h" && NAME=ncurses.h
23031 CF_EOF
23032 fi
23033 cat >>headers.sh <<CF_EOF
23034 # Just in case someone gzip'd manpages, remove the conflicting copy.
23035 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
23036
23037 eval \$PRG \$TMPSRC \$DST/\$NAME
23038 rm -f \$TMPSRC \$TMPSED
23039 CF_EOF
23040
23041 chmod 0755 headers.sh
23042
23043 for cf_dir in $SRC_SUBDIRS
23044 do
23045         if test ! -d $srcdir/$cf_dir ; then
23046                 continue
23047         fi
23048
23049         if test -f $srcdir/$cf_dir/headers; then
23050                 $AWK -f $srcdir/mk-hdr.awk \
23051                         subset="$LIB_SUBSETS" \
23052                         compat="$WITH_CURSES_H" \
23053                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
23054         fi
23055
23056         if test -f $srcdir/$cf_dir/modules; then
23057                 if test "$cf_dir" != "c++" ; then
23058                         cat >>$cf_dir/Makefile <<"CF_EOF"
23059 depend : ${AUTO_SRC}
23060         makedepend -- ${CPPFLAGS} -- ${C_SRC}
23061
23062 # DO NOT DELETE THIS LINE -- make depend depends on it.
23063 CF_EOF
23064                 fi
23065         fi
23066 done
23067
23068 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23069 if test -z "$USE_OLD_MAKERULES" ; then
23070         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
23071 fi
23072 fi
23073  ;;
23074   esac
23075 done
23076 EOF
23077
23078 cat >>$CONFIG_STATUS <<\EOF
23079
23080 { (exit 0); exit 0; }
23081 EOF
23082 chmod +x $CONFIG_STATUS
23083 ac_clean_files=$ac_clean_files_save
23084
23085 # configure is writing to config.log, and then calls config.status.
23086 # config.status does its own redirection, appending to config.log.
23087 # Unfortunately, on DOS this fails, as config.log is still kept open
23088 # by configure, so config.status won't be able to write to it; its
23089 # output is simply discarded.  So we exec the FD to /dev/null,
23090 # effectively closing config.log, so it can be properly (re)opened and
23091 # appended to by config.status.  When coming back to configure, we
23092 # need to make the FD available again.
23093 if test "$no_create" != yes; then
23094   ac_cs_success=:
23095   exec 5>/dev/null
23096   $SHELL $CONFIG_STATUS || ac_cs_success=false
23097   exec 5>>config.log
23098   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23099   # would make configure fail if this is the last instruction.
23100   $ac_cs_success || { (exit 1); exit 1; }
23101 fi
23102 ${MAKE:-make} preinstall