]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20150124
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.597 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20141204.
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   --with-pc-suffix        suffixes pc-files
718   --enable-mixed-case     tic should assume mixed-case filenames
719   --with-install-prefix   prefixes actual install-location ($DESTDIR)
720 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
721   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
722   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
723   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
724   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
725   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
726   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
727 Options to Specify the Libraries Built/Used:
728   --disable-libtool-version  enable to use libtool's incompatible naming scheme
729   --with-libtool          generate libraries with libtool
730   --with-shared           generate shared-libraries
731   --with-normal           generate normal-libraries (default)
732   --with-debug            generate debug-libraries (default)
733   --with-profile          generate profile-libraries
734   --with-cxx-shared       generate C++ shared-libraries
735   --with-lib-prefix       override library-prefix
736   --with-termlib          generate separate terminfo library
737   --with-ticlib           generate separate tic library
738   --with-gpm              use Alessandro Rubini's GPM library
739   --without-dlsym         do not use dlsym() to load GPM dynamically
740   --with-sysmouse         use sysmouse (FreeBSD console)
741   --enable-rpath          use rpath option when generating shared libraries
742   --disable-relink        relink shared libraries during install
743   --with-shlib-version=X  Specify rel or abi version for shared libs
744   --with-libtool-opts=XXX specify additional libtool options
745   --with-export-syms=XXX  limit exported symbols using libtool
746   --with-versioned-syms=X markup versioned symbols using ld
747   --disable-lib-suffixes  disable library suffixes
748   --disable-rpath-hack    don't add rpath options for additional libraries
749 Fine-Tuning Your Configuration:
750   --disable-overwrite     leave out the link to -lcurses
751   --disable-database      do not use terminfo, only fallbacks/termcap
752   --with-database=XXX     specify terminfo source to install
753   --with-hashed-db        specify hashed-database library
754   --with-fallbacks=XXX    specify list of fallback terminal descriptions
755   --without-xterm-new     specify if xterm terminfo should be old version
756   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
757   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
758   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
759   --disable-big-core      assume machine has little memory
760   --disable-big-strings   assume compiler has only standard-size strings
761   --enable-termcap        compile in termcap fallback support
762   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
763   --enable-getcap         fast termcap load, no xrefs to terminfo
764   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
765   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
766   --disable-root-environ  restrict environment when running as root
767   --enable-symlinks       make tic use symbolic links not hard links
768   --enable-broken_linker  compile with broken-linker support code
769   --enable-bsdpad         recognize BSD-style prefix padding
770   --enable-widec          compile with wide-char/UTF-8 code
771   --disable-lp64          allow chtype to be long (ignore _LP64)
772   --disable-largefile     omit support for large files
773   --disable-tparm-varargs compile tparm() without varargs interface
774   --disable-tic-depends   link tic library without explicit dependency on ncurses library
775   --with-bool=TYPE        override fallback type of bool variable
776   --with-caps=alt         compile with alternate Caps file
777   --with-chtype=TYPE      override type of chtype
778   --with-ospeed=TYPE      override type of ospeed variable
779   --with-mmask-t=TYPE     override type of mmask_t
780   --with-ccharw-max=XXX   override size CCHARW_MAX
781   --with-tparm-arg=TYPE   override parameter type of tparm
782   --with-rcs-ids          compile-in RCS identifiers
783 Options to Specify How Manpages are Installed:
784   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
785                           optionally formatted/catonly, e.g., gzip,formatted
786   --with-manpage-renames  specify manpage-renaming
787   --with-manpage-aliases  specify manpage-aliases using .so
788   --with-manpage-symlinks specify manpage-aliases using symlinks
789   --with-manpage-tbl      specify manpage processing with tbl
790 Extensions:
791   --disable-ext-funcs     disable function-extensions
792   --enable-sp-funcs       enable experimental SCREEN-extensions
793   --enable-term-driver    enable experimental terminal-driver
794   --enable-const          compile with extra/non-standard const
795   --enable-ext-colors     compile for 256-color support
796   --enable-ext-mouse      compile for extended mouse-encoding
797   --enable-no-padding     compile with $NCURSES_NO_PADDING code
798   --enable-signed-char    compile using signed Boolean's in term.h
799   --enable-sigwinch       compile with SIGWINCH handler
800   --enable-tcap-names     compile with user-definable terminal capabilities
801 Development Code:
802   --without-develop       disable development options
803   --enable-hard-tabs      compile with hard-tabs code
804   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
805 Experimental Code:
806   --disable-assumed-color do not assume anything about default-colors
807   --disable-hashmap       compile without hashmap scrolling-optimization
808   --enable-colorfgbg      compile-in experimental $COLORFGBG code
809   --enable-interop        compile-in experimental interop bindings
810   --with-pthread          use POSIX thread library
811   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
812   --enable-weak-symbols   enable weak-symbols for pthreads
813   --enable-reentrant      compile with experimental reentrant code
814   --with-wrap-prefix=XXX  override prefix used for public variables
815   --enable-safe-sprintf   compile with experimental safe-sprintf code
816   --disable-scroll-hints  compile without scroll-hints code
817   --enable-wgetch-events  compile with experimental wgetch-events code
818 Testing/development Options:
819   --disable-echo          do not display "compiling" commands
820   --enable-warnings       build: turn on GCC compiler warnings
821   --enable-string-hacks   work around bogus compiler/loader warnings
822   --enable-assertions     test: turn on generation of assertion code
823   --with-dmalloc          test: use Gray Watson's dmalloc library
824   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
825   --with-valgrind         test: use valgrind
826   --disable-leaks         test: free permanent memory, analyze leaks
827   --enable-expanded       test: generate functions for certain macros
828   --disable-macros        test: use functions rather than macros
829   --with-trace            test: add trace() function to all models of ncurses
830   --disable-gnat-projects test: disable GNAT projects even if usable
831 Ada95 Binding Options:
832   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
833   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
834   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
835   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
836
837 Some influential environment variables:
838   CC          C compiler command
839   CFLAGS      C compiler flags
840   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
841               nonstandard directory <lib dir>
842   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
843               headers in a nonstandard directory <include dir>
844   CPP         C preprocessor
845   CXX         C++ compiler command
846   CXXFLAGS    C++ compiler flags
847   CXXCPP      C++ preprocessor
848
849 Use these variables to override the choices made by `configure' or to help
850 it to find libraries and programs with nonstandard names/locations.
851
852 EOF
853 fi
854
855 if test "$ac_init_help" = "recursive"; then
856   # If there are subdirs, report their specific --help.
857   ac_popdir=`pwd`
858   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
859     cd $ac_subdir
860     # A "../" for each directory in /$ac_subdir.
861     ac_dots=`echo $ac_subdir |
862              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
863
864     case $srcdir in
865     .) # No --srcdir option.  We are building in place.
866       ac_sub_srcdir=$srcdir ;;
867     [\\/]* | ?:[\\/]* ) # Absolute path.
868       ac_sub_srcdir=$srcdir/$ac_subdir ;;
869     *) # Relative path.
870       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
871     esac
872
873     # Check for guested configure; otherwise get Cygnus style configure.
874     if test -f $ac_sub_srcdir/configure.gnu; then
875       echo
876       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
877     elif test -f $ac_sub_srcdir/configure; then
878       echo
879       $SHELL $ac_sub_srcdir/configure  --help=recursive
880     elif test -f $ac_sub_srcdir/configure.ac ||
881            test -f $ac_sub_srcdir/configure.in; then
882       echo
883       $ac_configure --help
884     else
885       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
886     fi
887     cd $ac_popdir
888   done
889 fi
890
891 test -n "$ac_init_help" && exit 0
892 if $ac_init_version; then
893   cat <<\EOF
894
895 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
896 Free Software Foundation, Inc.
897 This configure script is free software; the Free Software Foundation
898 gives unlimited permission to copy, distribute and modify it.
899 EOF
900   exit 0
901 fi
902 exec 5>config.log
903 cat >&5 <<EOF
904 This file contains any messages produced by compilers while
905 running configure, to aid debugging if configure makes a mistake.
906
907 It was created by $as_me, which was
908 generated by GNU Autoconf 2.52.20141204.  Invocation command line was
909
910   $ $0 $@
911
912 EOF
913 {
914 cat <<_ASUNAME
915 ## ---------- ##
916 ## Platform.  ##
917 ## ---------- ##
918
919 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
920 uname -m = `(uname -m) 2>/dev/null || echo unknown`
921 uname -r = `(uname -r) 2>/dev/null || echo unknown`
922 uname -s = `(uname -s) 2>/dev/null || echo unknown`
923 uname -v = `(uname -v) 2>/dev/null || echo unknown`
924
925 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
926 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
927
928 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
929 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
930 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
931 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
932 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
933 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
934 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
935
936 PATH = $PATH
937
938 _ASUNAME
939 } >&5
940
941 cat >&5 <<EOF
942 ## ------------ ##
943 ## Core tests.  ##
944 ## ------------ ##
945
946 EOF
947
948 # Keep a trace of the command line.
949 # Strip out --no-create and --no-recursion so they do not pile up.
950 # Also quote any args containing shell meta-characters.
951 ac_configure_args=
952 ac_sep=
953 for ac_arg
954 do
955   case $ac_arg in
956   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
957   | --no-cr | --no-c) ;;
958   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
959   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
960   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
961     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
962     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
963     ac_sep=" " ;;
964   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
965      ac_sep=" " ;;
966   esac
967   # Get rid of the leading space.
968 done
969
970 # When interrupted or exit'd, cleanup temporary files, and complete
971 # config.log.  We remove comments because anyway the quotes in there
972 # would cause problems or look ugly.
973 trap 'exit_status=$?
974   # Save into config.log some information that might help in debugging.
975   echo >&5
976   echo "## ----------------- ##" >&5
977   echo "## Cache variables.  ##" >&5
978   echo "## ----------------- ##" >&5
979   echo >&5
980   # The following way of writing the cache mishandles newlines in values,
981 {
982   (set) 2>&1 |
983     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
984     *ac_space=\ *)
985       sed -n \
986         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
987           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
988       ;;
989     *)
990       sed -n \
991         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
992       ;;
993     esac;
994 } >&5
995   sed "/^$/d" confdefs.h >conftest.log
996   if test -s conftest.log; then
997     echo >&5
998     echo "## ------------ ##" >&5
999     echo "## confdefs.h.  ##" >&5
1000     echo "## ------------ ##" >&5
1001     echo >&5
1002     cat conftest.log >&5
1003   fi
1004   (echo; echo) >&5
1005   test "$ac_signal" != 0 &&
1006     echo "$as_me: caught signal $ac_signal" >&5
1007   echo "$as_me: exit $exit_status" >&5
1008   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1009     exit $exit_status
1010      ' 0
1011 for ac_signal in 1 2 13 15; do
1012   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1013 done
1014 ac_signal=0
1015
1016 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1017 rm -rf conftest* confdefs.h
1018 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1019 echo >confdefs.h
1020
1021 # Let the site file select an alternate cache file if it wants to.
1022 # Prefer explicitly selected file to automatically selected ones.
1023 if test -z "$CONFIG_SITE"; then
1024   if test "x$prefix" != xNONE; then
1025     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1026   else
1027     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1028   fi
1029 fi
1030 for ac_site_file in $CONFIG_SITE; do
1031   if test -r "$ac_site_file"; then
1032     { echo "$as_me:1032: loading site script $ac_site_file" >&5
1033 echo "$as_me: loading site script $ac_site_file" >&6;}
1034     cat "$ac_site_file" >&5
1035     . "$ac_site_file"
1036   fi
1037 done
1038
1039 if test -r "$cache_file"; then
1040   # Some versions of bash will fail to source /dev/null (special
1041   # files actually), so we avoid doing that.
1042   if test -f "$cache_file"; then
1043     { echo "$as_me:1043: loading cache $cache_file" >&5
1044 echo "$as_me: loading cache $cache_file" >&6;}
1045     case $cache_file in
1046       [\\/]* | ?:[\\/]* ) . $cache_file;;
1047       *)                      . ./$cache_file;;
1048     esac
1049   fi
1050 else
1051   { echo "$as_me:1051: creating cache $cache_file" >&5
1052 echo "$as_me: creating cache $cache_file" >&6;}
1053   >$cache_file
1054 fi
1055
1056 # Check that the precious variables saved in the cache have kept the same
1057 # value.
1058 ac_cache_corrupted=false
1059 for ac_var in `(set) 2>&1 |
1060                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1061   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1062   eval ac_new_set=\$ac_env_${ac_var}_set
1063   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1064   eval ac_new_val="\$ac_env_${ac_var}_value"
1065   case $ac_old_set,$ac_new_set in
1066     set,)
1067       { echo "$as_me:1067: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1068 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1069       ac_cache_corrupted=: ;;
1070     ,set)
1071       { echo "$as_me:1071: error: \`$ac_var' was not set in the previous run" >&5
1072 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1073       ac_cache_corrupted=: ;;
1074     ,);;
1075     *)
1076       if test "x$ac_old_val" != "x$ac_new_val"; then
1077         { echo "$as_me:1077: error: \`$ac_var' has changed since the previous run:" >&5
1078 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1079         { echo "$as_me:1079:   former value:  $ac_old_val" >&5
1080 echo "$as_me:   former value:  $ac_old_val" >&2;}
1081         { echo "$as_me:1081:   current value: $ac_new_val" >&5
1082 echo "$as_me:   current value: $ac_new_val" >&2;}
1083         ac_cache_corrupted=:
1084       fi;;
1085   esac
1086   # Pass precious variables to config.status.  It doesn't matter if
1087   # we pass some twice (in addition to the command line arguments).
1088   if test "$ac_new_set" = set; then
1089     case $ac_new_val in
1090     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1091       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1092       ac_configure_args="$ac_configure_args '$ac_arg'"
1093       ;;
1094     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1095        ;;
1096     esac
1097   fi
1098 done
1099 if $ac_cache_corrupted; then
1100   { echo "$as_me:1100: error: changes in the environment can compromise the build" >&5
1101 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1102   { { echo "$as_me:1102: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1103 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1104    { (exit 1); exit 1; }; }
1105 fi
1106
1107 ac_ext=c
1108 ac_cpp='$CPP $CPPFLAGS'
1109 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1110 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1111 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1112 ac_main_return=return
1113
1114 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1115   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1116                    ECHO_T='     ' ;;
1117   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1118   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1119 esac
1120 echo "#! $SHELL" >conftest.sh
1121 echo  "exit 0"   >>conftest.sh
1122 chmod +x conftest.sh
1123 if { (echo "$as_me:1123: PATH=\".;.\"; conftest.sh") >&5
1124   (PATH=".;."; conftest.sh) 2>&5
1125   ac_status=$?
1126   echo "$as_me:1126: \$? = $ac_status" >&5
1127   (exit $ac_status); }; then
1128   ac_path_separator=';'
1129 else
1130   ac_path_separator=:
1131 fi
1132 PATH_SEPARATOR="$ac_path_separator"
1133 rm -f conftest.sh
1134
1135 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1136
1137 top_builddir=`pwd`
1138
1139 echo "$as_me:1139: checking for egrep" >&5
1140 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1141 if test "${ac_cv_prog_egrep+set}" = set; then
1142   echo $ECHO_N "(cached) $ECHO_C" >&6
1143 else
1144   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1145     then ac_cv_prog_egrep='grep -E'
1146     else ac_cv_prog_egrep='egrep'
1147     fi
1148 fi
1149 echo "$as_me:1149: result: $ac_cv_prog_egrep" >&5
1150 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1151  EGREP=$ac_cv_prog_egrep
1152
1153 test -z "$EGREP" && { { echo "$as_me:1153: error: No egrep program found" >&5
1154 echo "$as_me: error: No egrep program found" >&2;}
1155    { (exit 1); exit 1; }; }
1156
1157 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1158 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1159 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1160 cf_cv_abi_version=${NCURSES_MAJOR}
1161 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1162 cf_cv_timestamp=`date`
1163 echo "$as_me:1163: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1164 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1165
1166 if test -f $srcdir/VERSION ; then
1167         echo "$as_me:1167: checking for package version" >&5
1168 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1169
1170         # if there are not enough fields, cut returns the last one...
1171         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1172         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1173         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1174
1175         # this is how CF_BUNDLED_INTL uses $VERSION:
1176         VERSION="$cf_field1"
1177
1178         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1179         test -z "$VERSION_MAJOR" && { { echo "$as_me:1179: error: missing major-version" >&5
1180 echo "$as_me: error: missing major-version" >&2;}
1181    { (exit 1); exit 1; }; }
1182
1183         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1184         test -z "$VERSION_MINOR" && { { echo "$as_me:1184: error: missing minor-version" >&5
1185 echo "$as_me: error: missing minor-version" >&2;}
1186    { (exit 1); exit 1; }; }
1187
1188         echo "$as_me:1188: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1189 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1190
1191         echo "$as_me:1191: checking for package patch date" >&5
1192 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1193         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1194         case .$VERSION_PATCH in
1195         .)
1196                 { { echo "$as_me:1196: error: missing patch-date $VERSION_PATCH" >&5
1197 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1198    { (exit 1); exit 1; }; }
1199                 ;;
1200         .[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1201                 ;;
1202         *)
1203                 { { echo "$as_me:1203: error: illegal patch-date $VERSION_PATCH" >&5
1204 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1205    { (exit 1); exit 1; }; }
1206                 ;;
1207         esac
1208         echo "$as_me:1208: result: $VERSION_PATCH" >&5
1209 echo "${ECHO_T}$VERSION_PATCH" >&6
1210 else
1211         { { echo "$as_me:1211: error: did not find $srcdir/VERSION" >&5
1212 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1213    { (exit 1); exit 1; }; }
1214 fi
1215
1216 # show the actual data that we have for versions:
1217 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1218
1219 echo "${as_me:-configure}:1219: testing ABI VERSION $VERSION ..." 1>&5
1220
1221 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1222
1223 echo "${as_me:-configure}:1223: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1224
1225 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1226
1227 echo "${as_me:-configure}:1227: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1228
1229 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1230
1231 echo "${as_me:-configure}:1231: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1232
1233         cf_PACKAGE=NCURSES
1234         PACKAGE=ncurses
1235
1236 cat >>confdefs.h <<EOF
1237 #define PACKAGE "$PACKAGE"
1238 EOF
1239
1240 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1241
1242         cat >>confdefs.h <<EOF
1243 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1244 EOF
1245
1246         cat >>confdefs.h <<EOF
1247 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1248 EOF
1249
1250 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1251
1252 # Check whether --with-rel-version or --without-rel-version was given.
1253 if test "${with_rel_version+set}" = set; then
1254   withval="$with_rel_version"
1255   { echo "$as_me:1255: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1256 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1257  cf_cv_rel_version=$withval
1258 fi;
1259
1260  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1261  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1262
1263 if test -n "$NCURSES_MAJOR" ; then
1264   case $NCURSES_MAJOR in #(vi
1265   [0-9]*) #(vi
1266         ;;
1267   *)
1268         { { echo "$as_me:1268: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1269 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1270    { (exit 1); exit 1; }; }
1271         ;;
1272   esac
1273 else
1274   { { echo "$as_me:1274: error: Release major-version value is empty" >&5
1275 echo "$as_me: error: Release major-version value is empty" >&2;}
1276    { (exit 1); exit 1; }; }
1277 fi
1278
1279 if test -n "$NCURSES_MINOR" ; then
1280   case $NCURSES_MINOR in #(vi
1281   [0-9]*) #(vi
1282         ;;
1283   *)
1284         { { echo "$as_me:1284: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1285 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1286    { (exit 1); exit 1; }; }
1287         ;;
1288   esac
1289 else
1290   { { echo "$as_me:1290: error: Release minor-version value is empty" >&5
1291 echo "$as_me: error: Release minor-version value is empty" >&2;}
1292    { (exit 1); exit 1; }; }
1293 fi
1294
1295 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1296
1297 # Check whether --with-abi-version or --without-abi-version was given.
1298 if test "${with_abi_version+set}" = set; then
1299   withval="$with_abi_version"
1300   { echo "$as_me:1300: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1301 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1302  cf_cv_abi_version=$withval
1303 fi;
1304
1305 if test -n "$cf_cv_abi_version" ; then
1306   case $cf_cv_abi_version in #(vi
1307   [0-9]*) #(vi
1308         ;;
1309   *)
1310         { { echo "$as_me:1310: error: ABI version is not a number: $cf_cv_abi_version" >&5
1311 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1312    { (exit 1); exit 1; }; }
1313         ;;
1314   esac
1315 else
1316   { { echo "$as_me:1316: error: ABI version value is empty" >&5
1317 echo "$as_me: error: ABI version value is empty" >&2;}
1318    { (exit 1); exit 1; }; }
1319 fi
1320
1321 ac_aux_dir=
1322 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1323   if test -f $ac_dir/install-sh; then
1324     ac_aux_dir=$ac_dir
1325     ac_install_sh="$ac_aux_dir/install-sh -c"
1326     break
1327   elif test -f $ac_dir/install.sh; then
1328     ac_aux_dir=$ac_dir
1329     ac_install_sh="$ac_aux_dir/install.sh -c"
1330     break
1331   elif test -f $ac_dir/shtool; then
1332     ac_aux_dir=$ac_dir
1333     ac_install_sh="$ac_aux_dir/shtool install -c"
1334     break
1335   fi
1336 done
1337 if test -z "$ac_aux_dir"; then
1338   { { echo "$as_me:1338: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1339 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1340    { (exit 1); exit 1; }; }
1341 fi
1342 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1343 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1344 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1345
1346 # Make sure we can run config.sub.
1347 $ac_config_sub sun4 >/dev/null 2>&1 ||
1348   { { echo "$as_me:1348: error: cannot run $ac_config_sub" >&5
1349 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1350    { (exit 1); exit 1; }; }
1351
1352 echo "$as_me:1352: checking build system type" >&5
1353 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1354 if test "${ac_cv_build+set}" = set; then
1355   echo $ECHO_N "(cached) $ECHO_C" >&6
1356 else
1357   ac_cv_build_alias=$build_alias
1358 test -z "$ac_cv_build_alias" &&
1359   ac_cv_build_alias=`$ac_config_guess`
1360 test -z "$ac_cv_build_alias" &&
1361   { { echo "$as_me:1361: error: cannot guess build type; you must specify one" >&5
1362 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1363    { (exit 1); exit 1; }; }
1364 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1365   { { echo "$as_me:1365: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1366 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1367    { (exit 1); exit 1; }; }
1368
1369 fi
1370 echo "$as_me:1370: result: $ac_cv_build" >&5
1371 echo "${ECHO_T}$ac_cv_build" >&6
1372 build=$ac_cv_build
1373 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1374 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1375 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1376
1377 echo "$as_me:1377: checking host system type" >&5
1378 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1379 if test "${ac_cv_host+set}" = set; then
1380   echo $ECHO_N "(cached) $ECHO_C" >&6
1381 else
1382   ac_cv_host_alias=$host_alias
1383 test -z "$ac_cv_host_alias" &&
1384   ac_cv_host_alias=$ac_cv_build_alias
1385 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1386   { { echo "$as_me:1386: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1387 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1388    { (exit 1); exit 1; }; }
1389
1390 fi
1391 echo "$as_me:1391: result: $ac_cv_host" >&5
1392 echo "${ECHO_T}$ac_cv_host" >&6
1393 host=$ac_cv_host
1394 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1395 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1396 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1397
1398 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1399         echo "$as_me:1399: checking target system type" >&5
1400 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1401 if test "${ac_cv_target+set}" = set; then
1402   echo $ECHO_N "(cached) $ECHO_C" >&6
1403 else
1404   ac_cv_target_alias=$target_alias
1405 test "x$ac_cv_target_alias" = "x" &&
1406   ac_cv_target_alias=$ac_cv_host_alias
1407 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1408   { { echo "$as_me:1408: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1409 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1410    { (exit 1); exit 1; }; }
1411
1412 fi
1413 echo "$as_me:1413: result: $ac_cv_target" >&5
1414 echo "${ECHO_T}$ac_cv_target" >&6
1415 target=$ac_cv_target
1416 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1417 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1418 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1419
1420 # The aliases save the names the user supplied, while $host etc.
1421 # will get canonicalized.
1422 test -n "$target_alias" &&
1423   test "$program_prefix$program_suffix$program_transform_name" = \
1424     NONENONEs,x,x, &&
1425   program_prefix=${target_alias}-
1426         system_name="$host_os"
1427 else
1428         system_name="`(uname -s -r) 2>/dev/null`"
1429         if test -z "$system_name" ; then
1430                 system_name="`(hostname) 2>/dev/null`"
1431         fi
1432 fi
1433 test -n "$system_name" &&
1434 cat >>confdefs.h <<EOF
1435 #define SYSTEM_NAME "$system_name"
1436 EOF
1437
1438 if test "${cf_cv_system_name+set}" = set; then
1439   echo $ECHO_N "(cached) $ECHO_C" >&6
1440 else
1441   cf_cv_system_name="$system_name"
1442 fi
1443
1444 test -z "$system_name" && system_name="$cf_cv_system_name"
1445 test -n "$cf_cv_system_name" && echo "$as_me:1445: result: Configuring for $cf_cv_system_name" >&5
1446 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1447
1448 if test ".$system_name" != ".$cf_cv_system_name" ; then
1449         echo "$as_me:1449: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1450 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1451         { { echo "$as_me:1451: error: \"Please remove config.cache and try again.\"" >&5
1452 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1453    { (exit 1); exit 1; }; }
1454 fi
1455
1456 # Check whether --with-system-type or --without-system-type was given.
1457 if test "${with_system_type+set}" = set; then
1458   withval="$with_system_type"
1459   { echo "$as_me:1459: WARNING: overriding system type to $withval" >&5
1460 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1461         cf_cv_system_name=$withval
1462         host_os=$withval
1463
1464 fi;
1465
1466 ###     Save the given $CFLAGS to allow user-override.
1467 cf_user_CFLAGS="$CFLAGS"
1468
1469 ###     Default install-location
1470
1471 echo "$as_me:1471: checking for prefix" >&5
1472 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1473 if test "x$prefix" = "xNONE" ; then
1474         case "$cf_cv_system_name" in
1475                 # non-vendor systems don't have a conflict
1476         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1477                 prefix=/usr
1478                 ;;
1479         *)      prefix=$ac_default_prefix
1480                 ;;
1481         esac
1482 fi
1483 echo "$as_me:1483: result: $prefix" >&5
1484 echo "${ECHO_T}$prefix" >&6
1485
1486 if test "x$prefix" = "xNONE" ; then
1487 echo "$as_me:1487: checking for default include-directory" >&5
1488 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1489 test -n "$verbose" && echo 1>&6
1490 for cf_symbol in \
1491         $includedir \
1492         $includedir/ncurses \
1493         $prefix/include \
1494         $prefix/include/ncurses \
1495         /usr/local/include \
1496         /usr/local/include/ncurses \
1497         /usr/include \
1498         /usr/include/ncurses
1499 do
1500         cf_dir=`eval echo $cf_symbol`
1501         if test -f $cf_dir/curses.h ; then
1502         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1503                 includedir="$cf_symbol"
1504                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1505                 break
1506         fi
1507         fi
1508         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1509 done
1510 echo "$as_me:1510: result: $includedir" >&5
1511 echo "${ECHO_T}$includedir" >&6
1512 fi
1513
1514 ###     Checks for programs.
1515
1516 # Check whether --with-ada or --without-ada was given.
1517 if test "${with_ada+set}" = set; then
1518   withval="$with_ada"
1519   cf_with_ada=$withval
1520 else
1521   cf_with_ada=yes
1522 fi;
1523 if test "x$cf_with_ada" = xyes
1524 then
1525         cf_PROG_CC="gnatgcc gcc cc"
1526 else
1527         cf_PROG_CC="gcc cc"
1528 fi
1529
1530 ac_ext=c
1531 ac_cpp='$CPP $CPPFLAGS'
1532 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1533 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1534 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1535 ac_main_return=return
1536 if test -n "$ac_tool_prefix"; then
1537   for ac_prog in $cf_PROG_CC
1538   do
1539     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1540 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1541 echo "$as_me:1541: checking for $ac_word" >&5
1542 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1543 if test "${ac_cv_prog_CC+set}" = set; then
1544   echo $ECHO_N "(cached) $ECHO_C" >&6
1545 else
1546   if test -n "$CC"; then
1547   ac_cv_prog_CC="$CC" # Let the user override the test.
1548 else
1549   ac_save_IFS=$IFS; IFS=$ac_path_separator
1550 ac_dummy="$PATH"
1551 for ac_dir in $ac_dummy; do
1552   IFS=$ac_save_IFS
1553   test -z "$ac_dir" && ac_dir=.
1554   $as_executable_p "$ac_dir/$ac_word" || continue
1555 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1556 echo "$as_me:1556: found $ac_dir/$ac_word" >&5
1557 break
1558 done
1559
1560 fi
1561 fi
1562 CC=$ac_cv_prog_CC
1563 if test -n "$CC"; then
1564   echo "$as_me:1564: result: $CC" >&5
1565 echo "${ECHO_T}$CC" >&6
1566 else
1567   echo "$as_me:1567: result: no" >&5
1568 echo "${ECHO_T}no" >&6
1569 fi
1570
1571     test -n "$CC" && break
1572   done
1573 fi
1574 if test -z "$CC"; then
1575   ac_ct_CC=$CC
1576   for ac_prog in $cf_PROG_CC
1577 do
1578   # Extract the first word of "$ac_prog", so it can be a program name with args.
1579 set dummy $ac_prog; ac_word=$2
1580 echo "$as_me:1580: checking for $ac_word" >&5
1581 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1582 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1583   echo $ECHO_N "(cached) $ECHO_C" >&6
1584 else
1585   if test -n "$ac_ct_CC"; then
1586   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1587 else
1588   ac_save_IFS=$IFS; IFS=$ac_path_separator
1589 ac_dummy="$PATH"
1590 for ac_dir in $ac_dummy; do
1591   IFS=$ac_save_IFS
1592   test -z "$ac_dir" && ac_dir=.
1593   $as_executable_p "$ac_dir/$ac_word" || continue
1594 ac_cv_prog_ac_ct_CC="$ac_prog"
1595 echo "$as_me:1595: found $ac_dir/$ac_word" >&5
1596 break
1597 done
1598
1599 fi
1600 fi
1601 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1602 if test -n "$ac_ct_CC"; then
1603   echo "$as_me:1603: result: $ac_ct_CC" >&5
1604 echo "${ECHO_T}$ac_ct_CC" >&6
1605 else
1606   echo "$as_me:1606: result: no" >&5
1607 echo "${ECHO_T}no" >&6
1608 fi
1609
1610   test -n "$ac_ct_CC" && break
1611 done
1612
1613   CC=$ac_ct_CC
1614 fi
1615
1616 test -z "$CC" && { { echo "$as_me:1616: error: no acceptable cc found in \$PATH" >&5
1617 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1618    { (exit 1); exit 1; }; }
1619
1620 # Provide some information about the compiler.
1621 echo "$as_me:1621:" \
1622      "checking for C compiler version" >&5
1623 ac_compiler=`set X $ac_compile; echo $2`
1624 { (eval echo "$as_me:1624: \"$ac_compiler --version </dev/null >&5\"") >&5
1625   (eval $ac_compiler --version </dev/null >&5) 2>&5
1626   ac_status=$?
1627   echo "$as_me:1627: \$? = $ac_status" >&5
1628   (exit $ac_status); }
1629 { (eval echo "$as_me:1629: \"$ac_compiler -v </dev/null >&5\"") >&5
1630   (eval $ac_compiler -v </dev/null >&5) 2>&5
1631   ac_status=$?
1632   echo "$as_me:1632: \$? = $ac_status" >&5
1633   (exit $ac_status); }
1634 { (eval echo "$as_me:1634: \"$ac_compiler -V </dev/null >&5\"") >&5
1635   (eval $ac_compiler -V </dev/null >&5) 2>&5
1636   ac_status=$?
1637   echo "$as_me:1637: \$? = $ac_status" >&5
1638   (exit $ac_status); }
1639
1640 cat >conftest.$ac_ext <<_ACEOF
1641 #line 1641 "configure"
1642 #include "confdefs.h"
1643
1644 int
1645 main ()
1646 {
1647
1648   ;
1649   return 0;
1650 }
1651 _ACEOF
1652 ac_clean_files_save=$ac_clean_files
1653 ac_clean_files="$ac_clean_files a.out a.exe"
1654 # Try to create an executable without -o first, disregard a.out.
1655 # It will help us diagnose broken compilers, and finding out an intuition
1656 # of exeext.
1657 echo "$as_me:1657: checking for C compiler default output" >&5
1658 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1659 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1660 if { (eval echo "$as_me:1660: \"$ac_link_default\"") >&5
1661   (eval $ac_link_default) 2>&5
1662   ac_status=$?
1663   echo "$as_me:1663: \$? = $ac_status" >&5
1664   (exit $ac_status); }; then
1665   # Find the output, starting from the most likely.  This scheme is
1666 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1667 # resort.
1668 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1669                 ls a.out conftest 2>/dev/null;
1670                 ls a.* conftest.* 2>/dev/null`; do
1671   case $ac_file in
1672     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1673     a.out ) # We found the default executable, but exeext='' is most
1674             # certainly right.
1675             break;;
1676     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1677           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1678           export ac_cv_exeext
1679           break;;
1680     * ) break;;
1681   esac
1682 done
1683 else
1684   echo "$as_me: failed program was:" >&5
1685 cat conftest.$ac_ext >&5
1686 { { echo "$as_me:1686: error: C compiler cannot create executables" >&5
1687 echo "$as_me: error: C compiler cannot create executables" >&2;}
1688    { (exit 77); exit 77; }; }
1689 fi
1690
1691 ac_exeext=$ac_cv_exeext
1692 echo "$as_me:1692: result: $ac_file" >&5
1693 echo "${ECHO_T}$ac_file" >&6
1694
1695 # Check the compiler produces executables we can run.  If not, either
1696 # the compiler is broken, or we cross compile.
1697 echo "$as_me:1697: checking whether the C compiler works" >&5
1698 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1699 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1700 # If not cross compiling, check that we can run a simple program.
1701 if test "$cross_compiling" != yes; then
1702   if { ac_try='./$ac_file'
1703   { (eval echo "$as_me:1703: \"$ac_try\"") >&5
1704   (eval $ac_try) 2>&5
1705   ac_status=$?
1706   echo "$as_me:1706: \$? = $ac_status" >&5
1707   (exit $ac_status); }; }; then
1708     cross_compiling=no
1709   else
1710     if test "$cross_compiling" = maybe; then
1711         cross_compiling=yes
1712     else
1713         { { echo "$as_me:1713: error: cannot run C compiled programs.
1714 If you meant to cross compile, use \`--host'." >&5
1715 echo "$as_me: error: cannot run C compiled programs.
1716 If you meant to cross compile, use \`--host'." >&2;}
1717    { (exit 1); exit 1; }; }
1718     fi
1719   fi
1720 fi
1721 echo "$as_me:1721: result: yes" >&5
1722 echo "${ECHO_T}yes" >&6
1723
1724 rm -f a.out a.exe conftest$ac_cv_exeext
1725 ac_clean_files=$ac_clean_files_save
1726 # Check the compiler produces executables we can run.  If not, either
1727 # the compiler is broken, or we cross compile.
1728 echo "$as_me:1728: checking whether we are cross compiling" >&5
1729 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1730 echo "$as_me:1730: result: $cross_compiling" >&5
1731 echo "${ECHO_T}$cross_compiling" >&6
1732
1733 echo "$as_me:1733: checking for executable suffix" >&5
1734 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1735 if { (eval echo "$as_me:1735: \"$ac_link\"") >&5
1736   (eval $ac_link) 2>&5
1737   ac_status=$?
1738   echo "$as_me:1738: \$? = $ac_status" >&5
1739   (exit $ac_status); }; then
1740   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1741 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1742 # work properly (i.e., refer to `conftest.exe'), while it won't with
1743 # `rm'.
1744 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1745   case $ac_file in
1746     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1747     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1748           export ac_cv_exeext
1749           break;;
1750     * ) break;;
1751   esac
1752 done
1753 else
1754   { { echo "$as_me:1754: error: cannot compute EXEEXT: cannot compile and link" >&5
1755 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1756    { (exit 1); exit 1; }; }
1757 fi
1758
1759 rm -f conftest$ac_cv_exeext
1760 echo "$as_me:1760: result: $ac_cv_exeext" >&5
1761 echo "${ECHO_T}$ac_cv_exeext" >&6
1762
1763 rm -f conftest.$ac_ext
1764 EXEEXT=$ac_cv_exeext
1765 ac_exeext=$EXEEXT
1766 echo "$as_me:1766: checking for object suffix" >&5
1767 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1768 if test "${ac_cv_objext+set}" = set; then
1769   echo $ECHO_N "(cached) $ECHO_C" >&6
1770 else
1771   cat >conftest.$ac_ext <<_ACEOF
1772 #line 1772 "configure"
1773 #include "confdefs.h"
1774
1775 int
1776 main ()
1777 {
1778
1779   ;
1780   return 0;
1781 }
1782 _ACEOF
1783 rm -f conftest.o conftest.obj
1784 if { (eval echo "$as_me:1784: \"$ac_compile\"") >&5
1785   (eval $ac_compile) 2>&5
1786   ac_status=$?
1787   echo "$as_me:1787: \$? = $ac_status" >&5
1788   (exit $ac_status); }; then
1789   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1790   case $ac_file in
1791     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1792     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1793        break;;
1794   esac
1795 done
1796 else
1797   echo "$as_me: failed program was:" >&5
1798 cat conftest.$ac_ext >&5
1799 { { echo "$as_me:1799: error: cannot compute OBJEXT: cannot compile" >&5
1800 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1801    { (exit 1); exit 1; }; }
1802 fi
1803
1804 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1805 fi
1806 echo "$as_me:1806: result: $ac_cv_objext" >&5
1807 echo "${ECHO_T}$ac_cv_objext" >&6
1808 OBJEXT=$ac_cv_objext
1809 ac_objext=$OBJEXT
1810 echo "$as_me:1810: checking whether we are using the GNU C compiler" >&5
1811 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1812 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1813   echo $ECHO_N "(cached) $ECHO_C" >&6
1814 else
1815   cat >conftest.$ac_ext <<_ACEOF
1816 #line 1816 "configure"
1817 #include "confdefs.h"
1818
1819 int
1820 main ()
1821 {
1822 #ifndef __GNUC__
1823        choke me
1824 #endif
1825
1826   ;
1827   return 0;
1828 }
1829 _ACEOF
1830 rm -f conftest.$ac_objext
1831 if { (eval echo "$as_me:1831: \"$ac_compile\"") >&5
1832   (eval $ac_compile) 2>&5
1833   ac_status=$?
1834   echo "$as_me:1834: \$? = $ac_status" >&5
1835   (exit $ac_status); } &&
1836          { ac_try='test -s conftest.$ac_objext'
1837   { (eval echo "$as_me:1837: \"$ac_try\"") >&5
1838   (eval $ac_try) 2>&5
1839   ac_status=$?
1840   echo "$as_me:1840: \$? = $ac_status" >&5
1841   (exit $ac_status); }; }; then
1842   ac_compiler_gnu=yes
1843 else
1844   echo "$as_me: failed program was:" >&5
1845 cat conftest.$ac_ext >&5
1846 ac_compiler_gnu=no
1847 fi
1848 rm -f conftest.$ac_objext conftest.$ac_ext
1849 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1850
1851 fi
1852 echo "$as_me:1852: result: $ac_cv_c_compiler_gnu" >&5
1853 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1854 GCC=`test $ac_compiler_gnu = yes && echo yes`
1855 ac_test_CFLAGS=${CFLAGS+set}
1856 ac_save_CFLAGS=$CFLAGS
1857 CFLAGS="-g"
1858 echo "$as_me:1858: checking whether $CC accepts -g" >&5
1859 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1860 if test "${ac_cv_prog_cc_g+set}" = set; then
1861   echo $ECHO_N "(cached) $ECHO_C" >&6
1862 else
1863   cat >conftest.$ac_ext <<_ACEOF
1864 #line 1864 "configure"
1865 #include "confdefs.h"
1866
1867 int
1868 main ()
1869 {
1870
1871   ;
1872   return 0;
1873 }
1874 _ACEOF
1875 rm -f conftest.$ac_objext
1876 if { (eval echo "$as_me:1876: \"$ac_compile\"") >&5
1877   (eval $ac_compile) 2>&5
1878   ac_status=$?
1879   echo "$as_me:1879: \$? = $ac_status" >&5
1880   (exit $ac_status); } &&
1881          { ac_try='test -s conftest.$ac_objext'
1882   { (eval echo "$as_me:1882: \"$ac_try\"") >&5
1883   (eval $ac_try) 2>&5
1884   ac_status=$?
1885   echo "$as_me:1885: \$? = $ac_status" >&5
1886   (exit $ac_status); }; }; then
1887   ac_cv_prog_cc_g=yes
1888 else
1889   echo "$as_me: failed program was:" >&5
1890 cat conftest.$ac_ext >&5
1891 ac_cv_prog_cc_g=no
1892 fi
1893 rm -f conftest.$ac_objext conftest.$ac_ext
1894 fi
1895 echo "$as_me:1895: result: $ac_cv_prog_cc_g" >&5
1896 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1897 if test "$ac_test_CFLAGS" = set; then
1898   CFLAGS=$ac_save_CFLAGS
1899 elif test $ac_cv_prog_cc_g = yes; then
1900   if test "$GCC" = yes; then
1901     CFLAGS="-g -O2"
1902   else
1903     CFLAGS="-g"
1904   fi
1905 else
1906   if test "$GCC" = yes; then
1907     CFLAGS="-O2"
1908   else
1909     CFLAGS=
1910   fi
1911 fi
1912 # Some people use a C++ compiler to compile C.  Since we use `exit',
1913 # in C++ we need to declare it.  In case someone uses the same compiler
1914 # for both compiling C and C++ we need to have the C++ compiler decide
1915 # the declaration of exit, since it's the most demanding environment.
1916 cat >conftest.$ac_ext <<_ACEOF
1917 #ifndef __cplusplus
1918   choke me
1919 #endif
1920 _ACEOF
1921 rm -f conftest.$ac_objext
1922 if { (eval echo "$as_me:1922: \"$ac_compile\"") >&5
1923   (eval $ac_compile) 2>&5
1924   ac_status=$?
1925   echo "$as_me:1925: \$? = $ac_status" >&5
1926   (exit $ac_status); } &&
1927          { ac_try='test -s conftest.$ac_objext'
1928   { (eval echo "$as_me:1928: \"$ac_try\"") >&5
1929   (eval $ac_try) 2>&5
1930   ac_status=$?
1931   echo "$as_me:1931: \$? = $ac_status" >&5
1932   (exit $ac_status); }; }; then
1933   for ac_declaration in \
1934    ''\
1935    '#include <stdlib.h>' \
1936    'extern "C" void std::exit (int) throw (); using std::exit;' \
1937    'extern "C" void std::exit (int); using std::exit;' \
1938    'extern "C" void exit (int) throw ();' \
1939    'extern "C" void exit (int);' \
1940    'void exit (int);'
1941 do
1942   cat >conftest.$ac_ext <<_ACEOF
1943 #line 1943 "configure"
1944 #include "confdefs.h"
1945 #include <stdlib.h>
1946 $ac_declaration
1947 int
1948 main ()
1949 {
1950 exit (42);
1951   ;
1952   return 0;
1953 }
1954 _ACEOF
1955 rm -f conftest.$ac_objext
1956 if { (eval echo "$as_me:1956: \"$ac_compile\"") >&5
1957   (eval $ac_compile) 2>&5
1958   ac_status=$?
1959   echo "$as_me:1959: \$? = $ac_status" >&5
1960   (exit $ac_status); } &&
1961          { ac_try='test -s conftest.$ac_objext'
1962   { (eval echo "$as_me:1962: \"$ac_try\"") >&5
1963   (eval $ac_try) 2>&5
1964   ac_status=$?
1965   echo "$as_me:1965: \$? = $ac_status" >&5
1966   (exit $ac_status); }; }; then
1967   :
1968 else
1969   echo "$as_me: failed program was:" >&5
1970 cat conftest.$ac_ext >&5
1971 continue
1972 fi
1973 rm -f conftest.$ac_objext conftest.$ac_ext
1974   cat >conftest.$ac_ext <<_ACEOF
1975 #line 1975 "configure"
1976 #include "confdefs.h"
1977 $ac_declaration
1978 int
1979 main ()
1980 {
1981 exit (42);
1982   ;
1983   return 0;
1984 }
1985 _ACEOF
1986 rm -f conftest.$ac_objext
1987 if { (eval echo "$as_me:1987: \"$ac_compile\"") >&5
1988   (eval $ac_compile) 2>&5
1989   ac_status=$?
1990   echo "$as_me:1990: \$? = $ac_status" >&5
1991   (exit $ac_status); } &&
1992          { ac_try='test -s conftest.$ac_objext'
1993   { (eval echo "$as_me:1993: \"$ac_try\"") >&5
1994   (eval $ac_try) 2>&5
1995   ac_status=$?
1996   echo "$as_me:1996: \$? = $ac_status" >&5
1997   (exit $ac_status); }; }; then
1998   break
1999 else
2000   echo "$as_me: failed program was:" >&5
2001 cat conftest.$ac_ext >&5
2002 fi
2003 rm -f conftest.$ac_objext conftest.$ac_ext
2004 done
2005 rm -rf conftest*
2006 if test -n "$ac_declaration"; then
2007   echo '#ifdef __cplusplus' >>confdefs.h
2008   echo $ac_declaration      >>confdefs.h
2009   echo '#endif'             >>confdefs.h
2010 fi
2011
2012 else
2013   echo "$as_me: failed program was:" >&5
2014 cat conftest.$ac_ext >&5
2015 fi
2016 rm -f conftest.$ac_objext conftest.$ac_ext
2017 ac_ext=c
2018 ac_cpp='$CPP $CPPFLAGS'
2019 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2020 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2021 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2022 ac_main_return=return
2023
2024 GCC_VERSION=none
2025 if test "$GCC" = yes ; then
2026         echo "$as_me:2026: checking version of $CC" >&5
2027 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2028         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.].*//'`"
2029         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2030         echo "$as_me:2030: result: $GCC_VERSION" >&5
2031 echo "${ECHO_T}$GCC_VERSION" >&6
2032 fi
2033
2034 echo "$as_me:2034: checking for $CC option to accept ANSI C" >&5
2035 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2036 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2037   echo $ECHO_N "(cached) $ECHO_C" >&6
2038 else
2039   ac_cv_prog_cc_stdc=no
2040 ac_save_CC=$CC
2041 cat >conftest.$ac_ext <<_ACEOF
2042 #line 2042 "configure"
2043 #include "confdefs.h"
2044 #include <stdarg.h>
2045 #include <stdio.h>
2046 #include <sys/types.h>
2047 #include <sys/stat.h>
2048 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2049 struct buf { int x; };
2050 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2051 static char *e (p, i)
2052      char **p;
2053      int i;
2054 {
2055   return p[i];
2056 }
2057 static char *f (char * (*g) (char **, int), char **p, ...)
2058 {
2059   char *s;
2060   va_list v;
2061   va_start (v,p);
2062   s = g (p, va_arg (v,int));
2063   va_end (v);
2064   return s;
2065 }
2066 int test (int i, double x);
2067 struct s1 {int (*f) (int a);};
2068 struct s2 {int (*f) (double a);};
2069 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2070 int argc;
2071 char **argv;
2072 int
2073 main ()
2074 {
2075 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2076   ;
2077   return 0;
2078 }
2079 _ACEOF
2080 # Don't try gcc -ansi; that turns off useful extensions and
2081 # breaks some systems' header files.
2082 # AIX                   -qlanglvl=ansi
2083 # Ultrix and OSF/1      -std1
2084 # HP-UX 10.20 and later -Ae
2085 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2086 # SVR4                  -Xc -D__EXTENSIONS__
2087 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2088 do
2089   CC="$ac_save_CC $ac_arg"
2090   rm -f conftest.$ac_objext
2091 if { (eval echo "$as_me:2091: \"$ac_compile\"") >&5
2092   (eval $ac_compile) 2>&5
2093   ac_status=$?
2094   echo "$as_me:2094: \$? = $ac_status" >&5
2095   (exit $ac_status); } &&
2096          { ac_try='test -s conftest.$ac_objext'
2097   { (eval echo "$as_me:2097: \"$ac_try\"") >&5
2098   (eval $ac_try) 2>&5
2099   ac_status=$?
2100   echo "$as_me:2100: \$? = $ac_status" >&5
2101   (exit $ac_status); }; }; then
2102   ac_cv_prog_cc_stdc=$ac_arg
2103 break
2104 else
2105   echo "$as_me: failed program was:" >&5
2106 cat conftest.$ac_ext >&5
2107 fi
2108 rm -f conftest.$ac_objext
2109 done
2110 rm -f conftest.$ac_ext conftest.$ac_objext
2111 CC=$ac_save_CC
2112
2113 fi
2114
2115 case "x$ac_cv_prog_cc_stdc" in
2116   x|xno)
2117     echo "$as_me:2117: result: none needed" >&5
2118 echo "${ECHO_T}none needed" >&6 ;;
2119   *)
2120     echo "$as_me:2120: result: $ac_cv_prog_cc_stdc" >&5
2121 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2122     CC="$CC $ac_cv_prog_cc_stdc" ;;
2123 esac
2124
2125 # This should have been defined by AC_PROG_CC
2126 : ${CC:=cc}
2127
2128 echo "$as_me:2128: checking \$CC variable" >&5
2129 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2130 case "$CC" in #(vi
2131 *[\ \   ]-[IUD]*)
2132         echo "$as_me:2132: result: broken" >&5
2133 echo "${ECHO_T}broken" >&6
2134         { echo "$as_me:2134: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2135 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2136         # humor him...
2137         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2138         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2139
2140 cf_fix_cppflags=no
2141 cf_new_cflags=
2142 cf_new_cppflags=
2143 cf_new_extra_cppflags=
2144
2145 for cf_add_cflags in $cf_flags
2146 do
2147 case $cf_fix_cppflags in
2148 no)
2149         case $cf_add_cflags in #(vi
2150         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2151                 case $cf_add_cflags in
2152                 -D*)
2153                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2154
2155                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2156                                 && test -z "${cf_tst_cflags}" \
2157                                 && cf_fix_cppflags=yes
2158
2159                         if test $cf_fix_cppflags = yes ; then
2160                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2161                                 continue
2162                         elif test "${cf_tst_cflags}" = "\"'" ; then
2163                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2164                                 continue
2165                         fi
2166                         ;;
2167                 esac
2168                 case "$CPPFLAGS" in
2169                 *$cf_add_cflags) #(vi
2170                         ;;
2171                 *) #(vi
2172                         case $cf_add_cflags in #(vi
2173                         -D*)
2174                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2175
2176 CPPFLAGS=`echo "$CPPFLAGS" | \
2177         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2178                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2179
2180                                 ;;
2181                         esac
2182                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2183                         ;;
2184                 esac
2185                 ;;
2186         *)
2187                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2188                 ;;
2189         esac
2190         ;;
2191 yes)
2192         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2193
2194         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2195
2196         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2197                 && test -z "${cf_tst_cflags}" \
2198                 && cf_fix_cppflags=no
2199         ;;
2200 esac
2201 done
2202
2203 if test -n "$cf_new_cflags" ; then
2204
2205         CFLAGS="$CFLAGS $cf_new_cflags"
2206 fi
2207
2208 if test -n "$cf_new_cppflags" ; then
2209
2210         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2211 fi
2212
2213 if test -n "$cf_new_extra_cppflags" ; then
2214
2215         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2216 fi
2217
2218         ;;
2219 *)
2220         echo "$as_me:2220: result: ok" >&5
2221 echo "${ECHO_T}ok" >&6
2222         ;;
2223 esac
2224
2225 ac_ext=c
2226 ac_cpp='$CPP $CPPFLAGS'
2227 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2228 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2229 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2230 ac_main_return=return
2231 echo "$as_me:2231: checking how to run the C preprocessor" >&5
2232 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2233 # On Suns, sometimes $CPP names a directory.
2234 if test -n "$CPP" && test -d "$CPP"; then
2235   CPP=
2236 fi
2237 if test -z "$CPP"; then
2238   if test "${ac_cv_prog_CPP+set}" = set; then
2239   echo $ECHO_N "(cached) $ECHO_C" >&6
2240 else
2241       # Double quotes because CPP needs to be expanded
2242     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2243     do
2244       ac_preproc_ok=false
2245 for ac_c_preproc_warn_flag in '' yes
2246 do
2247   # Use a header file that comes with gcc, so configuring glibc
2248   # with a fresh cross-compiler works.
2249   # On the NeXT, cc -E runs the code through the compiler's parser,
2250   # not just through cpp. "Syntax error" is here to catch this case.
2251   cat >conftest.$ac_ext <<_ACEOF
2252 #line 2252 "configure"
2253 #include "confdefs.h"
2254 #include <assert.h>
2255                      Syntax error
2256 _ACEOF
2257 if { (eval echo "$as_me:2257: \"$ac_cpp conftest.$ac_ext\"") >&5
2258   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2259   ac_status=$?
2260   egrep -v '^ *\+' conftest.er1 >conftest.err
2261   rm -f conftest.er1
2262   cat conftest.err >&5
2263   echo "$as_me:2263: \$? = $ac_status" >&5
2264   (exit $ac_status); } >/dev/null; then
2265   if test -s conftest.err; then
2266     ac_cpp_err=$ac_c_preproc_warn_flag
2267   else
2268     ac_cpp_err=
2269   fi
2270 else
2271   ac_cpp_err=yes
2272 fi
2273 if test -z "$ac_cpp_err"; then
2274   :
2275 else
2276   echo "$as_me: failed program was:" >&5
2277   cat conftest.$ac_ext >&5
2278   # Broken: fails on valid input.
2279 continue
2280 fi
2281 rm -f conftest.err conftest.$ac_ext
2282
2283   # OK, works on sane cases.  Now check whether non-existent headers
2284   # can be detected and how.
2285   cat >conftest.$ac_ext <<_ACEOF
2286 #line 2286 "configure"
2287 #include "confdefs.h"
2288 #include <ac_nonexistent.h>
2289 _ACEOF
2290 if { (eval echo "$as_me:2290: \"$ac_cpp conftest.$ac_ext\"") >&5
2291   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2292   ac_status=$?
2293   egrep -v '^ *\+' conftest.er1 >conftest.err
2294   rm -f conftest.er1
2295   cat conftest.err >&5
2296   echo "$as_me:2296: \$? = $ac_status" >&5
2297   (exit $ac_status); } >/dev/null; then
2298   if test -s conftest.err; then
2299     ac_cpp_err=$ac_c_preproc_warn_flag
2300   else
2301     ac_cpp_err=
2302   fi
2303 else
2304   ac_cpp_err=yes
2305 fi
2306 if test -z "$ac_cpp_err"; then
2307   # Broken: success on invalid input.
2308 continue
2309 else
2310   echo "$as_me: failed program was:" >&5
2311   cat conftest.$ac_ext >&5
2312   # Passes both tests.
2313 ac_preproc_ok=:
2314 break
2315 fi
2316 rm -f conftest.err conftest.$ac_ext
2317
2318 done
2319 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2320 rm -f conftest.err conftest.$ac_ext
2321 if $ac_preproc_ok; then
2322   break
2323 fi
2324
2325     done
2326     ac_cv_prog_CPP=$CPP
2327
2328 fi
2329   CPP=$ac_cv_prog_CPP
2330 else
2331   ac_cv_prog_CPP=$CPP
2332 fi
2333 echo "$as_me:2333: result: $CPP" >&5
2334 echo "${ECHO_T}$CPP" >&6
2335 ac_preproc_ok=false
2336 for ac_c_preproc_warn_flag in '' yes
2337 do
2338   # Use a header file that comes with gcc, so configuring glibc
2339   # with a fresh cross-compiler works.
2340   # On the NeXT, cc -E runs the code through the compiler's parser,
2341   # not just through cpp. "Syntax error" is here to catch this case.
2342   cat >conftest.$ac_ext <<_ACEOF
2343 #line 2343 "configure"
2344 #include "confdefs.h"
2345 #include <assert.h>
2346                      Syntax error
2347 _ACEOF
2348 if { (eval echo "$as_me:2348: \"$ac_cpp conftest.$ac_ext\"") >&5
2349   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2350   ac_status=$?
2351   egrep -v '^ *\+' conftest.er1 >conftest.err
2352   rm -f conftest.er1
2353   cat conftest.err >&5
2354   echo "$as_me:2354: \$? = $ac_status" >&5
2355   (exit $ac_status); } >/dev/null; then
2356   if test -s conftest.err; then
2357     ac_cpp_err=$ac_c_preproc_warn_flag
2358   else
2359     ac_cpp_err=
2360   fi
2361 else
2362   ac_cpp_err=yes
2363 fi
2364 if test -z "$ac_cpp_err"; then
2365   :
2366 else
2367   echo "$as_me: failed program was:" >&5
2368   cat conftest.$ac_ext >&5
2369   # Broken: fails on valid input.
2370 continue
2371 fi
2372 rm -f conftest.err conftest.$ac_ext
2373
2374   # OK, works on sane cases.  Now check whether non-existent headers
2375   # can be detected and how.
2376   cat >conftest.$ac_ext <<_ACEOF
2377 #line 2377 "configure"
2378 #include "confdefs.h"
2379 #include <ac_nonexistent.h>
2380 _ACEOF
2381 if { (eval echo "$as_me:2381: \"$ac_cpp conftest.$ac_ext\"") >&5
2382   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2383   ac_status=$?
2384   egrep -v '^ *\+' conftest.er1 >conftest.err
2385   rm -f conftest.er1
2386   cat conftest.err >&5
2387   echo "$as_me:2387: \$? = $ac_status" >&5
2388   (exit $ac_status); } >/dev/null; then
2389   if test -s conftest.err; then
2390     ac_cpp_err=$ac_c_preproc_warn_flag
2391   else
2392     ac_cpp_err=
2393   fi
2394 else
2395   ac_cpp_err=yes
2396 fi
2397 if test -z "$ac_cpp_err"; then
2398   # Broken: success on invalid input.
2399 continue
2400 else
2401   echo "$as_me: failed program was:" >&5
2402   cat conftest.$ac_ext >&5
2403   # Passes both tests.
2404 ac_preproc_ok=:
2405 break
2406 fi
2407 rm -f conftest.err conftest.$ac_ext
2408
2409 done
2410 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2411 rm -f conftest.err conftest.$ac_ext
2412 if $ac_preproc_ok; then
2413   :
2414 else
2415   { { echo "$as_me:2415: error: C preprocessor \"$CPP\" fails sanity check" >&5
2416 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2417    { (exit 1); exit 1; }; }
2418 fi
2419
2420 ac_ext=c
2421 ac_cpp='$CPP $CPPFLAGS'
2422 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2423 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2424 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2425 ac_main_return=return
2426
2427 if test $ac_cv_c_compiler_gnu = yes; then
2428     echo "$as_me:2428: checking whether $CC needs -traditional" >&5
2429 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2430 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2431   echo $ECHO_N "(cached) $ECHO_C" >&6
2432 else
2433     ac_pattern="Autoconf.*'x'"
2434   cat >conftest.$ac_ext <<_ACEOF
2435 #line 2435 "configure"
2436 #include "confdefs.h"
2437 #include <sgtty.h>
2438 int Autoconf = TIOCGETP;
2439 _ACEOF
2440 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2441   egrep "$ac_pattern" >/dev/null 2>&1; then
2442   ac_cv_prog_gcc_traditional=yes
2443 else
2444   ac_cv_prog_gcc_traditional=no
2445 fi
2446 rm -rf conftest*
2447
2448   if test $ac_cv_prog_gcc_traditional = no; then
2449     cat >conftest.$ac_ext <<_ACEOF
2450 #line 2450 "configure"
2451 #include "confdefs.h"
2452 #include <termio.h>
2453 int Autoconf = TCGETA;
2454 _ACEOF
2455 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2456   egrep "$ac_pattern" >/dev/null 2>&1; then
2457   ac_cv_prog_gcc_traditional=yes
2458 fi
2459 rm -rf conftest*
2460
2461   fi
2462 fi
2463 echo "$as_me:2463: result: $ac_cv_prog_gcc_traditional" >&5
2464 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2465   if test $ac_cv_prog_gcc_traditional = yes; then
2466     CC="$CC -traditional"
2467   fi
2468 fi
2469
2470 echo "$as_me:2470: checking whether $CC understands -c and -o together" >&5
2471 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2472 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2473   echo $ECHO_N "(cached) $ECHO_C" >&6
2474 else
2475
2476 cat > conftest.$ac_ext <<CF_EOF
2477 #include <stdio.h>
2478 int main()
2479 {
2480         ${cf_cv_main_return:-return}(0);
2481 }
2482 CF_EOF
2483 # We do the test twice because some compilers refuse to overwrite an
2484 # existing .o file with -o, though they will create one.
2485 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2486 if { (eval echo "$as_me:2486: \"$ac_try\"") >&5
2487   (eval $ac_try) 2>&5
2488   ac_status=$?
2489   echo "$as_me:2489: \$? = $ac_status" >&5
2490   (exit $ac_status); } &&
2491   test -f conftest2.$ac_objext && { (eval echo "$as_me:2491: \"$ac_try\"") >&5
2492   (eval $ac_try) 2>&5
2493   ac_status=$?
2494   echo "$as_me:2494: \$? = $ac_status" >&5
2495   (exit $ac_status); };
2496 then
2497   eval cf_cv_prog_CC_c_o=yes
2498 else
2499   eval cf_cv_prog_CC_c_o=no
2500 fi
2501 rm -rf conftest*
2502
2503 fi
2504 if test $cf_cv_prog_CC_c_o = yes; then
2505   echo "$as_me:2505: result: yes" >&5
2506 echo "${ECHO_T}yes" >&6
2507 else
2508   echo "$as_me:2508: result: no" >&5
2509 echo "${ECHO_T}no" >&6
2510 fi
2511
2512 if test "$cross_compiling" = yes ; then
2513   LDCONFIG=:
2514 else
2515 case "$cf_cv_system_name" in #(vi
2516 dragonfly*|mirbsd*|freebsd*) #(vi
2517   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2518   ;;
2519 *) LDPATH=$PATH:/sbin:/usr/sbin
2520   # Extract the first word of "ldconfig", so it can be a program name with args.
2521 set dummy ldconfig; ac_word=$2
2522 echo "$as_me:2522: checking for $ac_word" >&5
2523 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2524 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2525   echo $ECHO_N "(cached) $ECHO_C" >&6
2526 else
2527   case $LDCONFIG in
2528   [\\/]* | ?:[\\/]*)
2529   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2530   ;;
2531   *)
2532   ac_save_IFS=$IFS; IFS=$ac_path_separator
2533 ac_dummy="$LDPATH"
2534 for ac_dir in $ac_dummy; do
2535   IFS=$ac_save_IFS
2536   test -z "$ac_dir" && ac_dir=.
2537   if $as_executable_p "$ac_dir/$ac_word"; then
2538    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2539    echo "$as_me:2539: found $ac_dir/$ac_word" >&5
2540    break
2541 fi
2542 done
2543
2544   ;;
2545 esac
2546 fi
2547 LDCONFIG=$ac_cv_path_LDCONFIG
2548
2549 if test -n "$LDCONFIG"; then
2550   echo "$as_me:2550: result: $LDCONFIG" >&5
2551 echo "${ECHO_T}$LDCONFIG" >&6
2552 else
2553   echo "$as_me:2553: result: no" >&5
2554 echo "${ECHO_T}no" >&6
2555 fi
2556
2557   ;;
2558 esac
2559 fi
2560
2561 echo "$as_me:2561: checking if you want to ensure bool is consistent with C++" >&5
2562 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2563
2564 # Check whether --with-cxx or --without-cxx was given.
2565 if test "${with_cxx+set}" = set; then
2566   withval="$with_cxx"
2567   cf_with_cxx=$withval
2568 else
2569   cf_with_cxx=yes
2570 fi;
2571 echo "$as_me:2571: result: $cf_with_cxx" >&5
2572 echo "${ECHO_T}$cf_with_cxx" >&6
2573 if test "X$cf_with_cxx" = Xno ; then
2574         CXX=""
2575         GXX=""
2576 else
2577         # with autoconf 2.13, we can change the error to a warning:
2578                 ac_ext=cc
2579 ac_cpp='$CXXCPP $CPPFLAGS'
2580 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2581 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2582 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2583 ac_main_return=return
2584 if test -n "$ac_tool_prefix"; then
2585   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2586   do
2587     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2588 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2589 echo "$as_me:2589: checking for $ac_word" >&5
2590 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2591 if test "${ac_cv_prog_CXX+set}" = set; then
2592   echo $ECHO_N "(cached) $ECHO_C" >&6
2593 else
2594   if test -n "$CXX"; then
2595   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2596 else
2597   ac_save_IFS=$IFS; IFS=$ac_path_separator
2598 ac_dummy="$PATH"
2599 for ac_dir in $ac_dummy; do
2600   IFS=$ac_save_IFS
2601   test -z "$ac_dir" && ac_dir=.
2602   $as_executable_p "$ac_dir/$ac_word" || continue
2603 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2604 echo "$as_me:2604: found $ac_dir/$ac_word" >&5
2605 break
2606 done
2607
2608 fi
2609 fi
2610 CXX=$ac_cv_prog_CXX
2611 if test -n "$CXX"; then
2612   echo "$as_me:2612: result: $CXX" >&5
2613 echo "${ECHO_T}$CXX" >&6
2614 else
2615   echo "$as_me:2615: result: no" >&5
2616 echo "${ECHO_T}no" >&6
2617 fi
2618
2619     test -n "$CXX" && break
2620   done
2621 fi
2622 if test -z "$CXX"; then
2623   ac_ct_CXX=$CXX
2624   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2625 do
2626   # Extract the first word of "$ac_prog", so it can be a program name with args.
2627 set dummy $ac_prog; ac_word=$2
2628 echo "$as_me:2628: checking for $ac_word" >&5
2629 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2630 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2631   echo $ECHO_N "(cached) $ECHO_C" >&6
2632 else
2633   if test -n "$ac_ct_CXX"; then
2634   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2635 else
2636   ac_save_IFS=$IFS; IFS=$ac_path_separator
2637 ac_dummy="$PATH"
2638 for ac_dir in $ac_dummy; do
2639   IFS=$ac_save_IFS
2640   test -z "$ac_dir" && ac_dir=.
2641   $as_executable_p "$ac_dir/$ac_word" || continue
2642 ac_cv_prog_ac_ct_CXX="$ac_prog"
2643 echo "$as_me:2643: found $ac_dir/$ac_word" >&5
2644 break
2645 done
2646
2647 fi
2648 fi
2649 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2650 if test -n "$ac_ct_CXX"; then
2651   echo "$as_me:2651: result: $ac_ct_CXX" >&5
2652 echo "${ECHO_T}$ac_ct_CXX" >&6
2653 else
2654   echo "$as_me:2654: result: no" >&5
2655 echo "${ECHO_T}no" >&6
2656 fi
2657
2658   test -n "$ac_ct_CXX" && break
2659 done
2660 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2661
2662   CXX=$ac_ct_CXX
2663 fi
2664
2665 # Provide some information about the compiler.
2666 echo "$as_me:2666:" \
2667      "checking for C++ compiler version" >&5
2668 ac_compiler=`set X $ac_compile; echo $2`
2669 { (eval echo "$as_me:2669: \"$ac_compiler --version </dev/null >&5\"") >&5
2670   (eval $ac_compiler --version </dev/null >&5) 2>&5
2671   ac_status=$?
2672   echo "$as_me:2672: \$? = $ac_status" >&5
2673   (exit $ac_status); }
2674 { (eval echo "$as_me:2674: \"$ac_compiler -v </dev/null >&5\"") >&5
2675   (eval $ac_compiler -v </dev/null >&5) 2>&5
2676   ac_status=$?
2677   echo "$as_me:2677: \$? = $ac_status" >&5
2678   (exit $ac_status); }
2679 { (eval echo "$as_me:2679: \"$ac_compiler -V </dev/null >&5\"") >&5
2680   (eval $ac_compiler -V </dev/null >&5) 2>&5
2681   ac_status=$?
2682   echo "$as_me:2682: \$? = $ac_status" >&5
2683   (exit $ac_status); }
2684
2685 echo "$as_me:2685: checking whether we are using the GNU C++ compiler" >&5
2686 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2687 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2688   echo $ECHO_N "(cached) $ECHO_C" >&6
2689 else
2690   cat >conftest.$ac_ext <<_ACEOF
2691 #line 2691 "configure"
2692 #include "confdefs.h"
2693
2694 int
2695 main ()
2696 {
2697 #ifndef __GNUC__
2698        choke me
2699 #endif
2700
2701   ;
2702   return 0;
2703 }
2704 _ACEOF
2705 rm -f conftest.$ac_objext
2706 if { (eval echo "$as_me:2706: \"$ac_compile\"") >&5
2707   (eval $ac_compile) 2>&5
2708   ac_status=$?
2709   echo "$as_me:2709: \$? = $ac_status" >&5
2710   (exit $ac_status); } &&
2711          { ac_try='test -s conftest.$ac_objext'
2712   { (eval echo "$as_me:2712: \"$ac_try\"") >&5
2713   (eval $ac_try) 2>&5
2714   ac_status=$?
2715   echo "$as_me:2715: \$? = $ac_status" >&5
2716   (exit $ac_status); }; }; then
2717   ac_compiler_gnu=yes
2718 else
2719   echo "$as_me: failed program was:" >&5
2720 cat conftest.$ac_ext >&5
2721 ac_compiler_gnu=no
2722 fi
2723 rm -f conftest.$ac_objext conftest.$ac_ext
2724 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2725
2726 fi
2727 echo "$as_me:2727: result: $ac_cv_cxx_compiler_gnu" >&5
2728 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2729 GXX=`test $ac_compiler_gnu = yes && echo yes`
2730 ac_test_CXXFLAGS=${CXXFLAGS+set}
2731 ac_save_CXXFLAGS=$CXXFLAGS
2732 CXXFLAGS="-g"
2733 echo "$as_me:2733: checking whether $CXX accepts -g" >&5
2734 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2735 if test "${ac_cv_prog_cxx_g+set}" = set; then
2736   echo $ECHO_N "(cached) $ECHO_C" >&6
2737 else
2738   cat >conftest.$ac_ext <<_ACEOF
2739 #line 2739 "configure"
2740 #include "confdefs.h"
2741
2742 int
2743 main ()
2744 {
2745
2746   ;
2747   return 0;
2748 }
2749 _ACEOF
2750 rm -f conftest.$ac_objext
2751 if { (eval echo "$as_me:2751: \"$ac_compile\"") >&5
2752   (eval $ac_compile) 2>&5
2753   ac_status=$?
2754   echo "$as_me:2754: \$? = $ac_status" >&5
2755   (exit $ac_status); } &&
2756          { ac_try='test -s conftest.$ac_objext'
2757   { (eval echo "$as_me:2757: \"$ac_try\"") >&5
2758   (eval $ac_try) 2>&5
2759   ac_status=$?
2760   echo "$as_me:2760: \$? = $ac_status" >&5
2761   (exit $ac_status); }; }; then
2762   ac_cv_prog_cxx_g=yes
2763 else
2764   echo "$as_me: failed program was:" >&5
2765 cat conftest.$ac_ext >&5
2766 ac_cv_prog_cxx_g=no
2767 fi
2768 rm -f conftest.$ac_objext conftest.$ac_ext
2769 fi
2770 echo "$as_me:2770: result: $ac_cv_prog_cxx_g" >&5
2771 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2772 if test "$ac_test_CXXFLAGS" = set; then
2773   CXXFLAGS=$ac_save_CXXFLAGS
2774 elif test $ac_cv_prog_cxx_g = yes; then
2775   if test "$GXX" = yes; then
2776     CXXFLAGS="-g -O2"
2777   else
2778     CXXFLAGS="-g"
2779   fi
2780 else
2781   if test "$GXX" = yes; then
2782     CXXFLAGS="-O2"
2783   else
2784     CXXFLAGS=
2785   fi
2786 fi
2787 for ac_declaration in \
2788    ''\
2789    '#include <stdlib.h>' \
2790    'extern "C" void std::exit (int) throw (); using std::exit;' \
2791    'extern "C" void std::exit (int); using std::exit;' \
2792    'extern "C" void exit (int) throw ();' \
2793    'extern "C" void exit (int);' \
2794    'void exit (int);'
2795 do
2796   cat >conftest.$ac_ext <<_ACEOF
2797 #line 2797 "configure"
2798 #include "confdefs.h"
2799 #include <stdlib.h>
2800 $ac_declaration
2801 int
2802 main ()
2803 {
2804 exit (42);
2805   ;
2806   return 0;
2807 }
2808 _ACEOF
2809 rm -f conftest.$ac_objext
2810 if { (eval echo "$as_me:2810: \"$ac_compile\"") >&5
2811   (eval $ac_compile) 2>&5
2812   ac_status=$?
2813   echo "$as_me:2813: \$? = $ac_status" >&5
2814   (exit $ac_status); } &&
2815          { ac_try='test -s conftest.$ac_objext'
2816   { (eval echo "$as_me:2816: \"$ac_try\"") >&5
2817   (eval $ac_try) 2>&5
2818   ac_status=$?
2819   echo "$as_me:2819: \$? = $ac_status" >&5
2820   (exit $ac_status); }; }; then
2821   :
2822 else
2823   echo "$as_me: failed program was:" >&5
2824 cat conftest.$ac_ext >&5
2825 continue
2826 fi
2827 rm -f conftest.$ac_objext conftest.$ac_ext
2828   cat >conftest.$ac_ext <<_ACEOF
2829 #line 2829 "configure"
2830 #include "confdefs.h"
2831 $ac_declaration
2832 int
2833 main ()
2834 {
2835 exit (42);
2836   ;
2837   return 0;
2838 }
2839 _ACEOF
2840 rm -f conftest.$ac_objext
2841 if { (eval echo "$as_me:2841: \"$ac_compile\"") >&5
2842   (eval $ac_compile) 2>&5
2843   ac_status=$?
2844   echo "$as_me:2844: \$? = $ac_status" >&5
2845   (exit $ac_status); } &&
2846          { ac_try='test -s conftest.$ac_objext'
2847   { (eval echo "$as_me:2847: \"$ac_try\"") >&5
2848   (eval $ac_try) 2>&5
2849   ac_status=$?
2850   echo "$as_me:2850: \$? = $ac_status" >&5
2851   (exit $ac_status); }; }; then
2852   break
2853 else
2854   echo "$as_me: failed program was:" >&5
2855 cat conftest.$ac_ext >&5
2856 fi
2857 rm -f conftest.$ac_objext conftest.$ac_ext
2858 done
2859 rm -rf conftest*
2860 if test -n "$ac_declaration"; then
2861   echo '#ifdef __cplusplus' >>confdefs.h
2862   echo $ac_declaration      >>confdefs.h
2863   echo '#endif'             >>confdefs.h
2864 fi
2865
2866 ac_ext=c
2867 ac_cpp='$CPP $CPPFLAGS'
2868 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2869 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2870 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2871 ac_main_return=return
2872
2873         ac_ext=cc
2874 ac_cpp='$CXXCPP $CPPFLAGS'
2875 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2876 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2877 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2878 ac_main_return=return
2879
2880         if test "x$cf_with_cxx" != xno
2881         then
2882                 # Several of the C++ configurations do not work, particularly when
2883                 # cross-compiling (20140913 -TD)
2884                 echo "$as_me:2884: checking if $CXX works" >&5
2885 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2886
2887                 save_CPPFLAGS="$CPPFLAGS"
2888                 eval cf_includedir=${includedir}
2889                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2890
2891 cat >conftest.$ac_ext <<_ACEOF
2892 #line 2892 "configure"
2893 #include "confdefs.h"
2894
2895 #include <stdlib.h>
2896 #include <stdio.h>
2897
2898 int
2899 main ()
2900 {
2901
2902                 printf("Hello world!\n")
2903
2904   ;
2905   return 0;
2906 }
2907 _ACEOF
2908 rm -f conftest.$ac_objext
2909 if { (eval echo "$as_me:2909: \"$ac_compile\"") >&5
2910   (eval $ac_compile) 2>&5
2911   ac_status=$?
2912   echo "$as_me:2912: \$? = $ac_status" >&5
2913   (exit $ac_status); } &&
2914          { ac_try='test -s conftest.$ac_objext'
2915   { (eval echo "$as_me:2915: \"$ac_try\"") >&5
2916   (eval $ac_try) 2>&5
2917   ac_status=$?
2918   echo "$as_me:2918: \$? = $ac_status" >&5
2919   (exit $ac_status); }; }; then
2920   cf_cxx_works=yes
2921 else
2922   echo "$as_me: failed program was:" >&5
2923 cat conftest.$ac_ext >&5
2924 cf_cxx_works=no
2925 fi
2926 rm -f conftest.$ac_objext conftest.$ac_ext
2927                 CPPFLAGS="$save_CPPFLAGS"
2928
2929                 echo "$as_me:2929: result: $cf_cxx_works" >&5
2930 echo "${ECHO_T}$cf_cxx_works" >&6
2931                 if test "x$cf_cxx_works" = xno
2932                 then
2933                         { echo "$as_me:2933: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
2934 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
2935                         cf_with_cxx=no; CXX=""; GXX="";
2936                 fi
2937         fi
2938         ac_ext=c
2939 ac_cpp='$CPP $CPPFLAGS'
2940 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2941 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2942 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2943 ac_main_return=return
2944
2945         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2946         if test "$CXX" = "g++" ; then
2947                 # Extract the first word of "g++", so it can be a program name with args.
2948 set dummy g++; ac_word=$2
2949 echo "$as_me:2949: checking for $ac_word" >&5
2950 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2951 if test "${ac_cv_path_CXX+set}" = set; then
2952   echo $ECHO_N "(cached) $ECHO_C" >&6
2953 else
2954   case $CXX in
2955   [\\/]* | ?:[\\/]*)
2956   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2957   ;;
2958   *)
2959   ac_save_IFS=$IFS; IFS=$ac_path_separator
2960 ac_dummy="$PATH"
2961 for ac_dir in $ac_dummy; do
2962   IFS=$ac_save_IFS
2963   test -z "$ac_dir" && ac_dir=.
2964   if $as_executable_p "$ac_dir/$ac_word"; then
2965    ac_cv_path_CXX="$ac_dir/$ac_word"
2966    echo "$as_me:2966: found $ac_dir/$ac_word" >&5
2967    break
2968 fi
2969 done
2970
2971   ;;
2972 esac
2973 fi
2974 CXX=$ac_cv_path_CXX
2975
2976 if test -n "$CXX"; then
2977   echo "$as_me:2977: result: $CXX" >&5
2978 echo "${ECHO_T}$CXX" >&6
2979 else
2980   echo "$as_me:2980: result: no" >&5
2981 echo "${ECHO_T}no" >&6
2982 fi
2983
2984         fi
2985         case "x$CXX" in #(vi
2986         x|xg++)
2987                 { echo "$as_me:2987: WARNING: You don't have any C++ compiler, too bad" >&5
2988 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2989                 cf_with_cxx=no; CXX=""; GXX="";
2990                 ;;
2991         esac
2992 fi
2993
2994 GXX_VERSION=none
2995 if test "$GXX" = yes; then
2996         echo "$as_me:2996: checking version of ${CXX:-g++}" >&5
2997 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2998         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2999         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3000         echo "$as_me:3000: result: $GXX_VERSION" >&5
3001 echo "${ECHO_T}$GXX_VERSION" >&6
3002 fi
3003
3004 case $GXX_VERSION in
3005 1*|2.[0-6]*)
3006         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3007         # cf_cxx_library=no
3008         { echo "$as_me:3008: WARNING: templates do not work" >&5
3009 echo "$as_me: WARNING: templates do not work" >&2;}
3010         ;;
3011 esac
3012
3013 echo "$as_me:3013: checking if you want to build C++ binding and demo" >&5
3014 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3015
3016 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3017 if test "${with_cxx_binding+set}" = set; then
3018   withval="$with_cxx_binding"
3019   cf_with_cxx_binding=$withval
3020 else
3021   cf_with_cxx_binding=$cf_with_cxx
3022 fi;
3023 echo "$as_me:3023: result: $cf_with_cxx_binding" >&5
3024 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3025
3026 echo "$as_me:3026: checking if you want to build with Ada95" >&5
3027 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3028 echo "$as_me:3028: result: $cf_with_ada" >&5
3029 echo "${ECHO_T}$cf_with_ada" >&6
3030
3031 echo "$as_me:3031: checking if you want to install terminal database" >&5
3032 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3033
3034 # Check whether --enable-db-install or --disable-db-install was given.
3035 if test "${enable_db_install+set}" = set; then
3036   enableval="$enable_db_install"
3037   cf_with_db_install=$enableval
3038 else
3039   cf_with_db_install=yes
3040 fi;
3041 echo "$as_me:3041: result: $cf_with_db_install" >&5
3042 echo "${ECHO_T}$cf_with_db_install" >&6
3043
3044 echo "$as_me:3044: checking if you want to install manpages" >&5
3045 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3046
3047 # Check whether --with-manpages or --without-manpages was given.
3048 if test "${with_manpages+set}" = set; then
3049   withval="$with_manpages"
3050   cf_with_manpages=$withval
3051 else
3052   cf_with_manpages=yes
3053 fi;
3054 echo "$as_me:3054: result: $cf_with_manpages" >&5
3055 echo "${ECHO_T}$cf_with_manpages" >&6
3056
3057 echo "$as_me:3057: checking if you want to build programs such as tic" >&5
3058 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3059
3060 # Check whether --with-progs or --without-progs was given.
3061 if test "${with_progs+set}" = set; then
3062   withval="$with_progs"
3063   cf_with_progs=$withval
3064 else
3065   cf_with_progs=yes
3066 fi;
3067 echo "$as_me:3067: result: $cf_with_progs" >&5
3068 echo "${ECHO_T}$cf_with_progs" >&6
3069
3070 echo "$as_me:3070: checking if you want to build test-programs" >&5
3071 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3072
3073 # Check whether --with-tests or --without-tests was given.
3074 if test "${with_tests+set}" = set; then
3075   withval="$with_tests"
3076   cf_with_tests=$withval
3077 else
3078   cf_with_tests=yes
3079 fi;
3080 echo "$as_me:3080: result: $cf_with_tests" >&5
3081 echo "${ECHO_T}$cf_with_tests" >&6
3082
3083 echo "$as_me:3083: checking if you wish to install curses.h" >&5
3084 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3085
3086 # Check whether --with-curses-h or --without-curses-h was given.
3087 if test "${with_curses_h+set}" = set; then
3088   withval="$with_curses_h"
3089   with_curses_h=$withval
3090 else
3091   with_curses_h=yes
3092 fi;
3093 echo "$as_me:3093: result: $with_curses_h" >&5
3094 echo "${ECHO_T}$with_curses_h" >&6
3095
3096 modules_to_build="ncurses"
3097 if test "X$cf_with_progs" != Xno ; then
3098 modules_to_build="$modules_to_build progs tack"
3099 fi
3100 modules_to_build="$modules_to_build panel menu form"
3101
3102 test "$program_prefix" != NONE &&
3103   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3104 # Use a double $ so make ignores it.
3105 test "$program_suffix" != NONE &&
3106   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3107 # Double any \ or $.  echo might interpret backslashes.
3108 # By default was `s,x,x', remove it if useless.
3109 cat <<\_ACEOF >conftest.sed
3110 s/[\\$]/&&/g;s/;s,x,x,$//
3111 _ACEOF
3112 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3113 rm conftest.sed
3114
3115 for ac_prog in mawk gawk nawk awk
3116 do
3117   # Extract the first word of "$ac_prog", so it can be a program name with args.
3118 set dummy $ac_prog; ac_word=$2
3119 echo "$as_me:3119: checking for $ac_word" >&5
3120 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3121 if test "${ac_cv_prog_AWK+set}" = set; then
3122   echo $ECHO_N "(cached) $ECHO_C" >&6
3123 else
3124   if test -n "$AWK"; then
3125   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3126 else
3127   ac_save_IFS=$IFS; IFS=$ac_path_separator
3128 ac_dummy="$PATH"
3129 for ac_dir in $ac_dummy; do
3130   IFS=$ac_save_IFS
3131   test -z "$ac_dir" && ac_dir=.
3132   $as_executable_p "$ac_dir/$ac_word" || continue
3133 ac_cv_prog_AWK="$ac_prog"
3134 echo "$as_me:3134: found $ac_dir/$ac_word" >&5
3135 break
3136 done
3137
3138 fi
3139 fi
3140 AWK=$ac_cv_prog_AWK
3141 if test -n "$AWK"; then
3142   echo "$as_me:3142: result: $AWK" >&5
3143 echo "${ECHO_T}$AWK" >&6
3144 else
3145   echo "$as_me:3145: result: no" >&5
3146 echo "${ECHO_T}no" >&6
3147 fi
3148
3149   test -n "$AWK" && break
3150 done
3151
3152 test -z "$AWK" && { { echo "$as_me:3152: error: No awk program found" >&5
3153 echo "$as_me: error: No awk program found" >&2;}
3154    { (exit 1); exit 1; }; }
3155
3156 echo "$as_me:3156: checking for egrep" >&5
3157 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3158 if test "${ac_cv_prog_egrep+set}" = set; then
3159   echo $ECHO_N "(cached) $ECHO_C" >&6
3160 else
3161   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3162     then ac_cv_prog_egrep='grep -E'
3163     else ac_cv_prog_egrep='egrep'
3164     fi
3165 fi
3166 echo "$as_me:3166: result: $ac_cv_prog_egrep" >&5
3167 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3168  EGREP=$ac_cv_prog_egrep
3169
3170 test -z "$EGREP" && { { echo "$as_me:3170: error: No egrep program found" >&5
3171 echo "$as_me: error: No egrep program found" >&2;}
3172    { (exit 1); exit 1; }; }
3173
3174 # Find a good install program.  We prefer a C program (faster),
3175 # so one script is as good as another.  But avoid the broken or
3176 # incompatible versions:
3177 # SysV /etc/install, /usr/sbin/install
3178 # SunOS /usr/etc/install
3179 # IRIX /sbin/install
3180 # AIX /bin/install
3181 # AmigaOS /C/install, which installs bootblocks on floppy discs
3182 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3183 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3184 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3185 # ./install, which can be erroneously created by make from ./install.sh.
3186 echo "$as_me:3186: checking for a BSD compatible install" >&5
3187 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3188 if test -z "$INSTALL"; then
3189 if test "${ac_cv_path_install+set}" = set; then
3190   echo $ECHO_N "(cached) $ECHO_C" >&6
3191 else
3192     ac_save_IFS=$IFS; IFS=$ac_path_separator
3193   for ac_dir in $PATH; do
3194     IFS=$ac_save_IFS
3195     # Account for people who put trailing slashes in PATH elements.
3196     case $ac_dir/ in
3197     / | ./ | .// | /cC/* \
3198     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3199     | /usr/ucb/* ) ;;
3200     *)
3201       # OSF1 and SCO ODT 3.0 have their own names for install.
3202       # Don't use installbsd from OSF since it installs stuff as root
3203       # by default.
3204       for ac_prog in ginstall scoinst install; do
3205         if $as_executable_p "$ac_dir/$ac_prog"; then
3206           if test $ac_prog = install &&
3207             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3208             # AIX install.  It has an incompatible calling convention.
3209             :
3210           elif test $ac_prog = install &&
3211             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3212             # program-specific install script used by HP pwplus--don't use.
3213             :
3214           else
3215             ac_cv_path_install="$ac_dir/$ac_prog -c"
3216             break 2
3217           fi
3218         fi
3219       done
3220       ;;
3221     esac
3222   done
3223
3224 fi
3225   if test "${ac_cv_path_install+set}" = set; then
3226     INSTALL=$ac_cv_path_install
3227   else
3228     # As a last resort, use the slow shell script.  We don't cache a
3229     # path for INSTALL within a source directory, because that will
3230     # break other packages using the cache if that directory is
3231     # removed, or if the path is relative.
3232     INSTALL=$ac_install_sh
3233   fi
3234 fi
3235 echo "$as_me:3235: result: $INSTALL" >&5
3236 echo "${ECHO_T}$INSTALL" >&6
3237
3238 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3239 # It thinks the first close brace ends the variable substitution.
3240 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3241
3242 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3243
3244 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3245
3246 case $INSTALL in
3247 /*)
3248   ;;
3249 *)
3250   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3251   test -z "$cf_dir" && cf_dir=.
3252   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3253   ;;
3254 esac
3255
3256 for ac_prog in tdlint lint alint splint lclint
3257 do
3258   # Extract the first word of "$ac_prog", so it can be a program name with args.
3259 set dummy $ac_prog; ac_word=$2
3260 echo "$as_me:3260: checking for $ac_word" >&5
3261 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3262 if test "${ac_cv_prog_LINT+set}" = set; then
3263   echo $ECHO_N "(cached) $ECHO_C" >&6
3264 else
3265   if test -n "$LINT"; then
3266   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3267 else
3268   ac_save_IFS=$IFS; IFS=$ac_path_separator
3269 ac_dummy="$PATH"
3270 for ac_dir in $ac_dummy; do
3271   IFS=$ac_save_IFS
3272   test -z "$ac_dir" && ac_dir=.
3273   $as_executable_p "$ac_dir/$ac_word" || continue
3274 ac_cv_prog_LINT="$ac_prog"
3275 echo "$as_me:3275: found $ac_dir/$ac_word" >&5
3276 break
3277 done
3278
3279 fi
3280 fi
3281 LINT=$ac_cv_prog_LINT
3282 if test -n "$LINT"; then
3283   echo "$as_me:3283: result: $LINT" >&5
3284 echo "${ECHO_T}$LINT" >&6
3285 else
3286   echo "$as_me:3286: result: no" >&5
3287 echo "${ECHO_T}no" >&6
3288 fi
3289
3290   test -n "$LINT" && break
3291 done
3292
3293 echo "$as_me:3293: checking whether ln -s works" >&5
3294 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3295 LN_S=$as_ln_s
3296 if test "$LN_S" = "ln -s"; then
3297   echo "$as_me:3297: result: yes" >&5
3298 echo "${ECHO_T}yes" >&6
3299 else
3300   echo "$as_me:3300: result: no, using $LN_S" >&5
3301 echo "${ECHO_T}no, using $LN_S" >&6
3302 fi
3303
3304 echo "$as_me:3304: checking if $LN_S -f options work" >&5
3305 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3306
3307 rm -f conf$$.src conf$$dst
3308 echo >conf$$.dst
3309 echo first >conf$$.src
3310 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3311         cf_prog_ln_sf=yes
3312 else
3313         cf_prog_ln_sf=no
3314 fi
3315 rm -f conf$$.dst conf$$src
3316 echo "$as_me:3316: result: $cf_prog_ln_sf" >&5
3317 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3318
3319 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3320
3321 echo "$as_me:3321: checking for long file names" >&5
3322 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3323 if test "${ac_cv_sys_long_file_names+set}" = set; then
3324   echo $ECHO_N "(cached) $ECHO_C" >&6
3325 else
3326   ac_cv_sys_long_file_names=yes
3327 # Test for long file names in all the places we know might matter:
3328 #      .                the current directory, where building will happen
3329 #      $prefix/lib      where we will be installing things
3330 #      $exec_prefix/lib likewise
3331 # eval it to expand exec_prefix.
3332 #      $TMPDIR          if set, where it might want to write temporary files
3333 # if $TMPDIR is not set:
3334 #      /tmp             where it might want to write temporary files
3335 #      /var/tmp         likewise
3336 #      /usr/tmp         likewise
3337 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3338   ac_tmpdirs=$TMPDIR
3339 else
3340   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3341 fi
3342 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3343   test -d $ac_dir || continue
3344   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3345   ac_xdir=$ac_dir/cf$$
3346   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3347   ac_tf1=$ac_xdir/conftest9012345
3348   ac_tf2=$ac_xdir/conftest9012346
3349   (echo 1 >$ac_tf1) 2>/dev/null
3350   (echo 2 >$ac_tf2) 2>/dev/null
3351   ac_val=`cat $ac_tf1 2>/dev/null`
3352   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3353     ac_cv_sys_long_file_names=no
3354     rm -rf $ac_xdir 2>/dev/null
3355     break
3356   fi
3357   rm -rf $ac_xdir 2>/dev/null
3358 done
3359 fi
3360 echo "$as_me:3360: result: $ac_cv_sys_long_file_names" >&5
3361 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3362 if test $ac_cv_sys_long_file_names = yes; then
3363
3364 cat >>confdefs.h <<\EOF
3365 #define HAVE_LONG_FILE_NAMES 1
3366 EOF
3367
3368 fi
3369
3370 # if we find pkg-config, check if we should install the ".pc" files.
3371
3372 echo "$as_me:3372: checking if you want to use pkg-config" >&5
3373 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3374
3375 # Check whether --with-pkg-config or --without-pkg-config was given.
3376 if test "${with_pkg_config+set}" = set; then
3377   withval="$with_pkg_config"
3378   cf_pkg_config=$withval
3379 else
3380   cf_pkg_config=yes
3381 fi;
3382 echo "$as_me:3382: result: $cf_pkg_config" >&5
3383 echo "${ECHO_T}$cf_pkg_config" >&6
3384
3385 case $cf_pkg_config in #(vi
3386 no) #(vi
3387         PKG_CONFIG=none
3388         ;;
3389 yes) #(vi
3390
3391 if test -n "$ac_tool_prefix"; then
3392   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3393 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3394 echo "$as_me:3394: checking for $ac_word" >&5
3395 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3396 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3397   echo $ECHO_N "(cached) $ECHO_C" >&6
3398 else
3399   case $PKG_CONFIG in
3400   [\\/]* | ?:[\\/]*)
3401   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3402   ;;
3403   *)
3404   ac_save_IFS=$IFS; IFS=$ac_path_separator
3405 ac_dummy="$PATH"
3406 for ac_dir in $ac_dummy; do
3407   IFS=$ac_save_IFS
3408   test -z "$ac_dir" && ac_dir=.
3409   if $as_executable_p "$ac_dir/$ac_word"; then
3410    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3411    echo "$as_me:3411: found $ac_dir/$ac_word" >&5
3412    break
3413 fi
3414 done
3415
3416   ;;
3417 esac
3418 fi
3419 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3420
3421 if test -n "$PKG_CONFIG"; then
3422   echo "$as_me:3422: result: $PKG_CONFIG" >&5
3423 echo "${ECHO_T}$PKG_CONFIG" >&6
3424 else
3425   echo "$as_me:3425: result: no" >&5
3426 echo "${ECHO_T}no" >&6
3427 fi
3428
3429 fi
3430 if test -z "$ac_cv_path_PKG_CONFIG"; then
3431   ac_pt_PKG_CONFIG=$PKG_CONFIG
3432   # Extract the first word of "pkg-config", so it can be a program name with args.
3433 set dummy pkg-config; ac_word=$2
3434 echo "$as_me:3434: checking for $ac_word" >&5
3435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3436 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3437   echo $ECHO_N "(cached) $ECHO_C" >&6
3438 else
3439   case $ac_pt_PKG_CONFIG in
3440   [\\/]* | ?:[\\/]*)
3441   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3442   ;;
3443   *)
3444   ac_save_IFS=$IFS; IFS=$ac_path_separator
3445 ac_dummy="$PATH"
3446 for ac_dir in $ac_dummy; do
3447   IFS=$ac_save_IFS
3448   test -z "$ac_dir" && ac_dir=.
3449   if $as_executable_p "$ac_dir/$ac_word"; then
3450    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3451    echo "$as_me:3451: found $ac_dir/$ac_word" >&5
3452    break
3453 fi
3454 done
3455
3456   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3457   ;;
3458 esac
3459 fi
3460 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3461
3462 if test -n "$ac_pt_PKG_CONFIG"; then
3463   echo "$as_me:3463: result: $ac_pt_PKG_CONFIG" >&5
3464 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3465 else
3466   echo "$as_me:3466: result: no" >&5
3467 echo "${ECHO_T}no" >&6
3468 fi
3469
3470   PKG_CONFIG=$ac_pt_PKG_CONFIG
3471 else
3472   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3473 fi
3474
3475         ;;
3476 *)
3477         PKG_CONFIG=$withval
3478         ;;
3479 esac
3480
3481 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3482 if test "$PKG_CONFIG" != none ; then
3483
3484 if test "x$prefix" != xNONE; then
3485   cf_path_syntax="$prefix"
3486 else
3487   cf_path_syntax="$ac_default_prefix"
3488 fi
3489
3490 case ".$PKG_CONFIG" in #(vi
3491 .\$\(*\)*|.\'*\'*) #(vi
3492   ;;
3493 ..|./*|.\\*) #(vi
3494   ;;
3495 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3496   ;;
3497 .\${*prefix}*|.\${*dir}*) #(vi
3498   eval PKG_CONFIG="$PKG_CONFIG"
3499   case ".$PKG_CONFIG" in #(vi
3500   .NONE/*)
3501     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3502     ;;
3503   esac
3504   ;; #(vi
3505 .no|.NONE/*)
3506   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3507   ;;
3508 *)
3509   { { echo "$as_me:3509: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3510 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3511    { (exit 1); exit 1; }; }
3512   ;;
3513 esac
3514
3515 else
3516         { echo "$as_me:3516: WARNING: pkg-config is not installed" >&5
3517 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3518 fi
3519
3520 echo "$as_me:3520: checking for $PKG_CONFIG library directory" >&5
3521 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3522
3523 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3524 if test "${with_pkg_config_libdir+set}" = set; then
3525   withval="$with_pkg_config_libdir"
3526   PKG_CONFIG_LIBDIR=$withval
3527 else
3528   PKG_CONFIG_LIBDIR=yes
3529 fi;
3530
3531 case x$PKG_CONFIG_LIBDIR in #(vi
3532 x/*) #(vi
3533         ;;
3534 xyes) #(vi
3535         # Look for the library directory using the same prefix as the executable
3536         if test "x$PKG_CONFIG" = xnone
3537         then
3538                 cf_path=$prefix
3539         else
3540                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3541         fi
3542
3543         # If you don't like using the default architecture, you have to specify the
3544         # intended library directory and corresponding compiler/linker options.
3545         #
3546         # This case allows for Debian's 2014-flavor of multiarch, along with the
3547         # most common variations before that point.  Some other variants spell the
3548         # directory differently, e.g., "pkg-config", and put it in unusual places.
3549         # pkg-config has always been poorly standardized, which is ironic...
3550         case x`(arch) 2>/dev/null` in #(vi
3551         *64) #(vi
3552                 cf_search_path="\
3553                         $cf_path/lib/*64-linux-gnu \
3554                         $cf_path/share \
3555                         $cf_path/lib64 \
3556                         $cf_path/lib32 \
3557                         $cf_path/lib"
3558                 ;;
3559         *)
3560                 cf_search_path="\
3561                         $cf_path/lib/*-linux-gnu \
3562                         $cf_path/share \
3563                         $cf_path/lib32 \
3564                         $cf_path/lib \
3565                         $cf_path/libdata"
3566                 ;;
3567         esac
3568
3569         test -n "$verbose" && echo "    list..." 1>&6
3570
3571 echo "${as_me:-configure}:3571: testing list... ..." 1>&5
3572
3573         for cf_config in $cf_search_path
3574         do
3575                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3576
3577 echo "${as_me:-configure}:3577: testing checking $cf_config/pkgconfig ..." 1>&5
3578
3579                 if test -d $cf_config/pkgconfig
3580                 then
3581                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3582                         echo "$as_me:3582: checking done" >&5
3583 echo $ECHO_N "checking done... $ECHO_C" >&6
3584                         break
3585                 fi
3586         done
3587         ;;
3588 *)
3589         ;;
3590 esac
3591
3592 echo "$as_me:3592: result: $PKG_CONFIG_LIBDIR" >&5
3593 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3594
3595 if test "x$PKG_CONFIG" != xnone
3596 then
3597         echo "$as_me:3597: checking if we should install .pc files for $PKG_CONFIG" >&5
3598 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3599 else
3600         echo "$as_me:3600: checking if we should install .pc files" >&5
3601 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3602 fi
3603
3604 # Check whether --enable-pc-files or --disable-pc-files was given.
3605 if test "${enable_pc_files+set}" = set; then
3606   enableval="$enable_pc_files"
3607   enable_pc_files=$enableval
3608 else
3609   enable_pc_files=no
3610 fi;
3611 echo "$as_me:3611: result: $enable_pc_files" >&5
3612 echo "${ECHO_T}$enable_pc_files" >&6
3613
3614 if test "x$enable_pc_files" != xno
3615 then
3616         case "x$PKG_CONFIG_LIBDIR" in #(vi
3617         xno|xyes) #(vi
3618                 { echo "$as_me:3618: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3619 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3620                 MAKE_PC_FILES="#"
3621                 ;;
3622         *)
3623
3624 if test "x$prefix" != xNONE; then
3625   cf_path_syntax="$prefix"
3626 else
3627   cf_path_syntax="$ac_default_prefix"
3628 fi
3629
3630 case ".$PKG_CONFIG_LIBDIR" in #(vi
3631 .\$\(*\)*|.\'*\'*) #(vi
3632   ;;
3633 ..|./*|.\\*) #(vi
3634   ;;
3635 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3636   ;;
3637 .\${*prefix}*|.\${*dir}*) #(vi
3638   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3639   case ".$PKG_CONFIG_LIBDIR" in #(vi
3640   .NONE/*)
3641     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3642     ;;
3643   esac
3644   ;; #(vi
3645 .no|.NONE/*)
3646   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3647   ;;
3648 *)
3649   { { echo "$as_me:3649: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3650 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3651    { (exit 1); exit 1; }; }
3652   ;;
3653 esac
3654
3655                 MAKE_PC_FILES=
3656                 ;;
3657         esac
3658 else
3659         MAKE_PC_FILES="#"
3660 fi
3661
3662 if test -z "$MAKE_PC_FILES"
3663 then
3664         echo "$as_me:3664: checking for suffix to add to pc-files" >&5
3665 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3666
3667 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3668 if test "${with_pc_suffix+set}" = set; then
3669   withval="$with_pc_suffix"
3670   case "x$withval" in #(vi
3671         xyes|xno) #(vi
3672                 PC_MODULE_SUFFIX=
3673                 ;;
3674         *)      PC_MODULE_SUFFIX="$withval"
3675                 ;;
3676         esac
3677 fi;
3678         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3679         echo "$as_me:3679: result: $PC_MODULE_SUFFIX" >&5
3680 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3681         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3682
3683 fi
3684
3685 echo "$as_me:3685: checking if we should assume mixed-case filenames" >&5
3686 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3687
3688 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3689 if test "${enable_mixed_case+set}" = set; then
3690   enableval="$enable_mixed_case"
3691   enable_mixedcase=$enableval
3692 else
3693   enable_mixedcase=auto
3694 fi;
3695 echo "$as_me:3695: result: $enable_mixedcase" >&5
3696 echo "${ECHO_T}$enable_mixedcase" >&6
3697 if test "$enable_mixedcase" = "auto" ; then
3698
3699 echo "$as_me:3699: checking if filesystem supports mixed-case filenames" >&5
3700 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3701 if test "${cf_cv_mixedcase+set}" = set; then
3702   echo $ECHO_N "(cached) $ECHO_C" >&6
3703 else
3704
3705 if test "$cross_compiling" = yes ; then
3706         case $target_alias in #(vi
3707         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
3708                 cf_cv_mixedcase=no
3709                 ;;
3710         *)
3711                 cf_cv_mixedcase=yes
3712                 ;;
3713         esac
3714 else
3715         rm -f conftest CONFTEST
3716         echo test >conftest
3717         if test -f CONFTEST ; then
3718                 cf_cv_mixedcase=no
3719         else
3720                 cf_cv_mixedcase=yes
3721         fi
3722         rm -f conftest CONFTEST
3723 fi
3724
3725 fi
3726 echo "$as_me:3726: result: $cf_cv_mixedcase" >&5
3727 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3728 test "$cf_cv_mixedcase" = yes &&
3729 cat >>confdefs.h <<\EOF
3730 #define MIXEDCASE_FILENAMES 1
3731 EOF
3732
3733 else
3734     cf_cv_mixedcase=$enable_mixedcase
3735     if test "x$enable_mixedcase" = "xyes" ; then
3736
3737 cat >>confdefs.h <<\EOF
3738 #define MIXEDCASE_FILENAMES 1
3739 EOF
3740
3741     fi
3742 fi
3743
3744 # do this after mixed-case option (tags/TAGS is not as important as tic).
3745 echo "$as_me:3745: checking whether ${MAKE-make} sets \${MAKE}" >&5
3746 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3747 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3748 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3749   echo $ECHO_N "(cached) $ECHO_C" >&6
3750 else
3751   cat >conftest.make <<\EOF
3752 all:
3753         @echo 'ac_maketemp="${MAKE}"'
3754 EOF
3755 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3756 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3757 if test -n "$ac_maketemp"; then
3758   eval ac_cv_prog_make_${ac_make}_set=yes
3759 else
3760   eval ac_cv_prog_make_${ac_make}_set=no
3761 fi
3762 rm -f conftest.make
3763 fi
3764 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3765   echo "$as_me:3765: result: yes" >&5
3766 echo "${ECHO_T}yes" >&6
3767   SET_MAKE=
3768 else
3769   echo "$as_me:3769: result: no" >&5
3770 echo "${ECHO_T}no" >&6
3771   SET_MAKE="MAKE=${MAKE-make}"
3772 fi
3773
3774 for ac_prog in exctags ctags
3775 do
3776   # Extract the first word of "$ac_prog", so it can be a program name with args.
3777 set dummy $ac_prog; ac_word=$2
3778 echo "$as_me:3778: checking for $ac_word" >&5
3779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3780 if test "${ac_cv_prog_CTAGS+set}" = set; then
3781   echo $ECHO_N "(cached) $ECHO_C" >&6
3782 else
3783   if test -n "$CTAGS"; then
3784   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3785 else
3786   ac_save_IFS=$IFS; IFS=$ac_path_separator
3787 ac_dummy="$PATH"
3788 for ac_dir in $ac_dummy; do
3789   IFS=$ac_save_IFS
3790   test -z "$ac_dir" && ac_dir=.
3791   $as_executable_p "$ac_dir/$ac_word" || continue
3792 ac_cv_prog_CTAGS="$ac_prog"
3793 echo "$as_me:3793: found $ac_dir/$ac_word" >&5
3794 break
3795 done
3796
3797 fi
3798 fi
3799 CTAGS=$ac_cv_prog_CTAGS
3800 if test -n "$CTAGS"; then
3801   echo "$as_me:3801: result: $CTAGS" >&5
3802 echo "${ECHO_T}$CTAGS" >&6
3803 else
3804   echo "$as_me:3804: result: no" >&5
3805 echo "${ECHO_T}no" >&6
3806 fi
3807
3808   test -n "$CTAGS" && break
3809 done
3810
3811 for ac_prog in exetags etags
3812 do
3813   # Extract the first word of "$ac_prog", so it can be a program name with args.
3814 set dummy $ac_prog; ac_word=$2
3815 echo "$as_me:3815: checking for $ac_word" >&5
3816 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3817 if test "${ac_cv_prog_ETAGS+set}" = set; then
3818   echo $ECHO_N "(cached) $ECHO_C" >&6
3819 else
3820   if test -n "$ETAGS"; then
3821   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3822 else
3823   ac_save_IFS=$IFS; IFS=$ac_path_separator
3824 ac_dummy="$PATH"
3825 for ac_dir in $ac_dummy; do
3826   IFS=$ac_save_IFS
3827   test -z "$ac_dir" && ac_dir=.
3828   $as_executable_p "$ac_dir/$ac_word" || continue
3829 ac_cv_prog_ETAGS="$ac_prog"
3830 echo "$as_me:3830: found $ac_dir/$ac_word" >&5
3831 break
3832 done
3833
3834 fi
3835 fi
3836 ETAGS=$ac_cv_prog_ETAGS
3837 if test -n "$ETAGS"; then
3838   echo "$as_me:3838: result: $ETAGS" >&5
3839 echo "${ECHO_T}$ETAGS" >&6
3840 else
3841   echo "$as_me:3841: result: no" >&5
3842 echo "${ECHO_T}no" >&6
3843 fi
3844
3845   test -n "$ETAGS" && break
3846 done
3847
3848 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3849 set dummy ${CTAGS:-ctags}; ac_word=$2
3850 echo "$as_me:3850: checking for $ac_word" >&5
3851 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3852 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3853   echo $ECHO_N "(cached) $ECHO_C" >&6
3854 else
3855   if test -n "$MAKE_LOWER_TAGS"; then
3856   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3857 else
3858   ac_save_IFS=$IFS; IFS=$ac_path_separator
3859 ac_dummy="$PATH"
3860 for ac_dir in $ac_dummy; do
3861   IFS=$ac_save_IFS
3862   test -z "$ac_dir" && ac_dir=.
3863   $as_executable_p "$ac_dir/$ac_word" || continue
3864 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3865 echo "$as_me:3865: found $ac_dir/$ac_word" >&5
3866 break
3867 done
3868
3869   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3870 fi
3871 fi
3872 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3873 if test -n "$MAKE_LOWER_TAGS"; then
3874   echo "$as_me:3874: result: $MAKE_LOWER_TAGS" >&5
3875 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3876 else
3877   echo "$as_me:3877: result: no" >&5
3878 echo "${ECHO_T}no" >&6
3879 fi
3880
3881 if test "$cf_cv_mixedcase" = yes ; then
3882         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3883 set dummy ${ETAGS:-etags}; ac_word=$2
3884 echo "$as_me:3884: checking for $ac_word" >&5
3885 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3886 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3887   echo $ECHO_N "(cached) $ECHO_C" >&6
3888 else
3889   if test -n "$MAKE_UPPER_TAGS"; then
3890   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3891 else
3892   ac_save_IFS=$IFS; IFS=$ac_path_separator
3893 ac_dummy="$PATH"
3894 for ac_dir in $ac_dummy; do
3895   IFS=$ac_save_IFS
3896   test -z "$ac_dir" && ac_dir=.
3897   $as_executable_p "$ac_dir/$ac_word" || continue
3898 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3899 echo "$as_me:3899: found $ac_dir/$ac_word" >&5
3900 break
3901 done
3902
3903   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3904 fi
3905 fi
3906 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3907 if test -n "$MAKE_UPPER_TAGS"; then
3908   echo "$as_me:3908: result: $MAKE_UPPER_TAGS" >&5
3909 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3910 else
3911   echo "$as_me:3911: result: no" >&5
3912 echo "${ECHO_T}no" >&6
3913 fi
3914
3915 else
3916         MAKE_UPPER_TAGS=no
3917 fi
3918
3919 if test "$MAKE_UPPER_TAGS" = yes ; then
3920         MAKE_UPPER_TAGS=
3921 else
3922         MAKE_UPPER_TAGS="#"
3923 fi
3924
3925 if test "$MAKE_LOWER_TAGS" = yes ; then
3926         MAKE_LOWER_TAGS=
3927 else
3928         MAKE_LOWER_TAGS="#"
3929 fi
3930
3931 echo "$as_me:3931: checking for makeflags variable" >&5
3932 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3933 if test "${cf_cv_makeflags+set}" = set; then
3934   echo $ECHO_N "(cached) $ECHO_C" >&6
3935 else
3936
3937         cf_cv_makeflags=''
3938         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3939         do
3940                 cat >cf_makeflags.tmp <<CF_EOF
3941 SHELL = /bin/sh
3942 all :
3943         @ echo '.$cf_option'
3944 CF_EOF
3945                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3946                 case "$cf_result" in
3947                 .*k|.*kw)
3948                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3949                         case "$cf_result" in
3950                         .*CC=*) cf_cv_makeflags=
3951                                 ;;
3952                         *)      cf_cv_makeflags=$cf_option
3953                                 ;;
3954                         esac
3955                         break
3956                         ;;
3957                 .-)     ;;
3958                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3959                         ;;
3960                 esac
3961         done
3962         rm -f cf_makeflags.tmp
3963
3964 fi
3965 echo "$as_me:3965: result: $cf_cv_makeflags" >&5
3966 echo "${ECHO_T}$cf_cv_makeflags" >&6
3967
3968 if test -n "$ac_tool_prefix"; then
3969   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3970 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3971 echo "$as_me:3971: checking for $ac_word" >&5
3972 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3973 if test "${ac_cv_prog_RANLIB+set}" = set; then
3974   echo $ECHO_N "(cached) $ECHO_C" >&6
3975 else
3976   if test -n "$RANLIB"; then
3977   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3978 else
3979   ac_save_IFS=$IFS; IFS=$ac_path_separator
3980 ac_dummy="$PATH"
3981 for ac_dir in $ac_dummy; do
3982   IFS=$ac_save_IFS
3983   test -z "$ac_dir" && ac_dir=.
3984   $as_executable_p "$ac_dir/$ac_word" || continue
3985 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3986 echo "$as_me:3986: found $ac_dir/$ac_word" >&5
3987 break
3988 done
3989
3990 fi
3991 fi
3992 RANLIB=$ac_cv_prog_RANLIB
3993 if test -n "$RANLIB"; then
3994   echo "$as_me:3994: result: $RANLIB" >&5
3995 echo "${ECHO_T}$RANLIB" >&6
3996 else
3997   echo "$as_me:3997: result: no" >&5
3998 echo "${ECHO_T}no" >&6
3999 fi
4000
4001 fi
4002 if test -z "$ac_cv_prog_RANLIB"; then
4003   ac_ct_RANLIB=$RANLIB
4004   # Extract the first word of "ranlib", so it can be a program name with args.
4005 set dummy ranlib; ac_word=$2
4006 echo "$as_me:4006: checking for $ac_word" >&5
4007 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4008 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4009   echo $ECHO_N "(cached) $ECHO_C" >&6
4010 else
4011   if test -n "$ac_ct_RANLIB"; then
4012   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4013 else
4014   ac_save_IFS=$IFS; IFS=$ac_path_separator
4015 ac_dummy="$PATH"
4016 for ac_dir in $ac_dummy; do
4017   IFS=$ac_save_IFS
4018   test -z "$ac_dir" && ac_dir=.
4019   $as_executable_p "$ac_dir/$ac_word" || continue
4020 ac_cv_prog_ac_ct_RANLIB="ranlib"
4021 echo "$as_me:4021: found $ac_dir/$ac_word" >&5
4022 break
4023 done
4024
4025   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4026 fi
4027 fi
4028 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4029 if test -n "$ac_ct_RANLIB"; then
4030   echo "$as_me:4030: result: $ac_ct_RANLIB" >&5
4031 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4032 else
4033   echo "$as_me:4033: result: no" >&5
4034 echo "${ECHO_T}no" >&6
4035 fi
4036
4037   RANLIB=$ac_ct_RANLIB
4038 else
4039   RANLIB="$ac_cv_prog_RANLIB"
4040 fi
4041
4042 if test -n "$ac_tool_prefix"; then
4043   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4044 set dummy ${ac_tool_prefix}ld; ac_word=$2
4045 echo "$as_me:4045: checking for $ac_word" >&5
4046 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4047 if test "${ac_cv_prog_LD+set}" = set; then
4048   echo $ECHO_N "(cached) $ECHO_C" >&6
4049 else
4050   if test -n "$LD"; then
4051   ac_cv_prog_LD="$LD" # Let the user override the test.
4052 else
4053   ac_save_IFS=$IFS; IFS=$ac_path_separator
4054 ac_dummy="$PATH"
4055 for ac_dir in $ac_dummy; do
4056   IFS=$ac_save_IFS
4057   test -z "$ac_dir" && ac_dir=.
4058   $as_executable_p "$ac_dir/$ac_word" || continue
4059 ac_cv_prog_LD="${ac_tool_prefix}ld"
4060 echo "$as_me:4060: found $ac_dir/$ac_word" >&5
4061 break
4062 done
4063
4064 fi
4065 fi
4066 LD=$ac_cv_prog_LD
4067 if test -n "$LD"; then
4068   echo "$as_me:4068: result: $LD" >&5
4069 echo "${ECHO_T}$LD" >&6
4070 else
4071   echo "$as_me:4071: result: no" >&5
4072 echo "${ECHO_T}no" >&6
4073 fi
4074
4075 fi
4076 if test -z "$ac_cv_prog_LD"; then
4077   ac_ct_LD=$LD
4078   # Extract the first word of "ld", so it can be a program name with args.
4079 set dummy ld; ac_word=$2
4080 echo "$as_me:4080: checking for $ac_word" >&5
4081 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4082 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4083   echo $ECHO_N "(cached) $ECHO_C" >&6
4084 else
4085   if test -n "$ac_ct_LD"; then
4086   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4087 else
4088   ac_save_IFS=$IFS; IFS=$ac_path_separator
4089 ac_dummy="$PATH"
4090 for ac_dir in $ac_dummy; do
4091   IFS=$ac_save_IFS
4092   test -z "$ac_dir" && ac_dir=.
4093   $as_executable_p "$ac_dir/$ac_word" || continue
4094 ac_cv_prog_ac_ct_LD="ld"
4095 echo "$as_me:4095: found $ac_dir/$ac_word" >&5
4096 break
4097 done
4098
4099   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4100 fi
4101 fi
4102 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4103 if test -n "$ac_ct_LD"; then
4104   echo "$as_me:4104: result: $ac_ct_LD" >&5
4105 echo "${ECHO_T}$ac_ct_LD" >&6
4106 else
4107   echo "$as_me:4107: result: no" >&5
4108 echo "${ECHO_T}no" >&6
4109 fi
4110
4111   LD=$ac_ct_LD
4112 else
4113   LD="$ac_cv_prog_LD"
4114 fi
4115
4116 if test -n "$ac_tool_prefix"; then
4117   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4118 set dummy ${ac_tool_prefix}ar; ac_word=$2
4119 echo "$as_me:4119: checking for $ac_word" >&5
4120 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4121 if test "${ac_cv_prog_AR+set}" = set; then
4122   echo $ECHO_N "(cached) $ECHO_C" >&6
4123 else
4124   if test -n "$AR"; then
4125   ac_cv_prog_AR="$AR" # Let the user override the test.
4126 else
4127   ac_save_IFS=$IFS; IFS=$ac_path_separator
4128 ac_dummy="$PATH"
4129 for ac_dir in $ac_dummy; do
4130   IFS=$ac_save_IFS
4131   test -z "$ac_dir" && ac_dir=.
4132   $as_executable_p "$ac_dir/$ac_word" || continue
4133 ac_cv_prog_AR="${ac_tool_prefix}ar"
4134 echo "$as_me:4134: found $ac_dir/$ac_word" >&5
4135 break
4136 done
4137
4138 fi
4139 fi
4140 AR=$ac_cv_prog_AR
4141 if test -n "$AR"; then
4142   echo "$as_me:4142: result: $AR" >&5
4143 echo "${ECHO_T}$AR" >&6
4144 else
4145   echo "$as_me:4145: result: no" >&5
4146 echo "${ECHO_T}no" >&6
4147 fi
4148
4149 fi
4150 if test -z "$ac_cv_prog_AR"; then
4151   ac_ct_AR=$AR
4152   # Extract the first word of "ar", so it can be a program name with args.
4153 set dummy ar; ac_word=$2
4154 echo "$as_me:4154: checking for $ac_word" >&5
4155 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4156 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4157   echo $ECHO_N "(cached) $ECHO_C" >&6
4158 else
4159   if test -n "$ac_ct_AR"; then
4160   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4161 else
4162   ac_save_IFS=$IFS; IFS=$ac_path_separator
4163 ac_dummy="$PATH"
4164 for ac_dir in $ac_dummy; do
4165   IFS=$ac_save_IFS
4166   test -z "$ac_dir" && ac_dir=.
4167   $as_executable_p "$ac_dir/$ac_word" || continue
4168 ac_cv_prog_ac_ct_AR="ar"
4169 echo "$as_me:4169: found $ac_dir/$ac_word" >&5
4170 break
4171 done
4172
4173   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4174 fi
4175 fi
4176 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4177 if test -n "$ac_ct_AR"; then
4178   echo "$as_me:4178: result: $ac_ct_AR" >&5
4179 echo "${ECHO_T}$ac_ct_AR" >&6
4180 else
4181   echo "$as_me:4181: result: no" >&5
4182 echo "${ECHO_T}no" >&6
4183 fi
4184
4185   AR=$ac_ct_AR
4186 else
4187   AR="$ac_cv_prog_AR"
4188 fi
4189
4190 if test -n "$ac_tool_prefix"; then
4191   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4192 set dummy ${ac_tool_prefix}nm; ac_word=$2
4193 echo "$as_me:4193: checking for $ac_word" >&5
4194 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4195 if test "${ac_cv_prog_NM+set}" = set; then
4196   echo $ECHO_N "(cached) $ECHO_C" >&6
4197 else
4198   if test -n "$NM"; then
4199   ac_cv_prog_NM="$NM" # Let the user override the test.
4200 else
4201   ac_save_IFS=$IFS; IFS=$ac_path_separator
4202 ac_dummy="$PATH"
4203 for ac_dir in $ac_dummy; do
4204   IFS=$ac_save_IFS
4205   test -z "$ac_dir" && ac_dir=.
4206   $as_executable_p "$ac_dir/$ac_word" || continue
4207 ac_cv_prog_NM="${ac_tool_prefix}nm"
4208 echo "$as_me:4208: found $ac_dir/$ac_word" >&5
4209 break
4210 done
4211
4212 fi
4213 fi
4214 NM=$ac_cv_prog_NM
4215 if test -n "$NM"; then
4216   echo "$as_me:4216: result: $NM" >&5
4217 echo "${ECHO_T}$NM" >&6
4218 else
4219   echo "$as_me:4219: result: no" >&5
4220 echo "${ECHO_T}no" >&6
4221 fi
4222
4223 fi
4224 if test -z "$ac_cv_prog_NM"; then
4225   ac_ct_NM=$NM
4226   # Extract the first word of "nm", so it can be a program name with args.
4227 set dummy nm; ac_word=$2
4228 echo "$as_me:4228: checking for $ac_word" >&5
4229 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4230 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4231   echo $ECHO_N "(cached) $ECHO_C" >&6
4232 else
4233   if test -n "$ac_ct_NM"; then
4234   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4235 else
4236   ac_save_IFS=$IFS; IFS=$ac_path_separator
4237 ac_dummy="$PATH"
4238 for ac_dir in $ac_dummy; do
4239   IFS=$ac_save_IFS
4240   test -z "$ac_dir" && ac_dir=.
4241   $as_executable_p "$ac_dir/$ac_word" || continue
4242 ac_cv_prog_ac_ct_NM="nm"
4243 echo "$as_me:4243: found $ac_dir/$ac_word" >&5
4244 break
4245 done
4246
4247   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4248 fi
4249 fi
4250 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4251 if test -n "$ac_ct_NM"; then
4252   echo "$as_me:4252: result: $ac_ct_NM" >&5
4253 echo "${ECHO_T}$ac_ct_NM" >&6
4254 else
4255   echo "$as_me:4255: result: no" >&5
4256 echo "${ECHO_T}no" >&6
4257 fi
4258
4259   NM=$ac_ct_NM
4260 else
4261   NM="$ac_cv_prog_NM"
4262 fi
4263
4264 if test -n "$ac_tool_prefix"; then
4265   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4266 set dummy ${ac_tool_prefix}ar; ac_word=$2
4267 echo "$as_me:4267: checking for $ac_word" >&5
4268 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4269 if test "${ac_cv_prog_AR+set}" = set; then
4270   echo $ECHO_N "(cached) $ECHO_C" >&6
4271 else
4272   if test -n "$AR"; then
4273   ac_cv_prog_AR="$AR" # Let the user override the test.
4274 else
4275   ac_save_IFS=$IFS; IFS=$ac_path_separator
4276 ac_dummy="$PATH"
4277 for ac_dir in $ac_dummy; do
4278   IFS=$ac_save_IFS
4279   test -z "$ac_dir" && ac_dir=.
4280   $as_executable_p "$ac_dir/$ac_word" || continue
4281 ac_cv_prog_AR="${ac_tool_prefix}ar"
4282 echo "$as_me:4282: found $ac_dir/$ac_word" >&5
4283 break
4284 done
4285
4286 fi
4287 fi
4288 AR=$ac_cv_prog_AR
4289 if test -n "$AR"; then
4290   echo "$as_me:4290: result: $AR" >&5
4291 echo "${ECHO_T}$AR" >&6
4292 else
4293   echo "$as_me:4293: result: no" >&5
4294 echo "${ECHO_T}no" >&6
4295 fi
4296
4297 fi
4298 if test -z "$ac_cv_prog_AR"; then
4299   ac_ct_AR=$AR
4300   # Extract the first word of "ar", so it can be a program name with args.
4301 set dummy ar; ac_word=$2
4302 echo "$as_me:4302: checking for $ac_word" >&5
4303 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4304 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4305   echo $ECHO_N "(cached) $ECHO_C" >&6
4306 else
4307   if test -n "$ac_ct_AR"; then
4308   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4309 else
4310   ac_save_IFS=$IFS; IFS=$ac_path_separator
4311 ac_dummy="$PATH"
4312 for ac_dir in $ac_dummy; do
4313   IFS=$ac_save_IFS
4314   test -z "$ac_dir" && ac_dir=.
4315   $as_executable_p "$ac_dir/$ac_word" || continue
4316 ac_cv_prog_ac_ct_AR="ar"
4317 echo "$as_me:4317: found $ac_dir/$ac_word" >&5
4318 break
4319 done
4320
4321   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4322 fi
4323 fi
4324 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4325 if test -n "$ac_ct_AR"; then
4326   echo "$as_me:4326: result: $ac_ct_AR" >&5
4327 echo "${ECHO_T}$ac_ct_AR" >&6
4328 else
4329   echo "$as_me:4329: result: no" >&5
4330 echo "${ECHO_T}no" >&6
4331 fi
4332
4333   AR=$ac_ct_AR
4334 else
4335   AR="$ac_cv_prog_AR"
4336 fi
4337
4338 echo "$as_me:4338: checking for options to update archives" >&5
4339 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4340 if test "${cf_cv_ar_flags+set}" = set; then
4341   echo $ECHO_N "(cached) $ECHO_C" >&6
4342 else
4343
4344         cf_cv_ar_flags=unknown
4345         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4346         do
4347
4348                 # check if $ARFLAGS already contains this choice
4349                 if test "x$ARFLAGS" != "x" ; then
4350                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4351                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4352                                 cf_cv_ar_flags=
4353                                 break
4354                         fi
4355                 fi
4356
4357                 rm -f conftest.$ac_cv_objext
4358                 rm -f conftest.a
4359
4360                 cat >conftest.$ac_ext <<EOF
4361 #line 4361 "configure"
4362 int     testdata[3] = { 123, 456, 789 };
4363 EOF
4364                 if { (eval echo "$as_me:4364: \"$ac_compile\"") >&5
4365   (eval $ac_compile) 2>&5
4366   ac_status=$?
4367   echo "$as_me:4367: \$? = $ac_status" >&5
4368   (exit $ac_status); } ; then
4369                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4370                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4371                         if test -f conftest.a ; then
4372                                 cf_cv_ar_flags=$cf_ar_flags
4373                                 break
4374                         fi
4375                 else
4376                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4377
4378 echo "${as_me:-configure}:4378: testing cannot compile test-program ..." 1>&5
4379
4380                         break
4381                 fi
4382         done
4383         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4384
4385 fi
4386 echo "$as_me:4386: result: $cf_cv_ar_flags" >&5
4387 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4388
4389 if test -n "$ARFLAGS" ; then
4390         if test -n "$cf_cv_ar_flags" ; then
4391                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4392         fi
4393 else
4394         ARFLAGS=$cf_cv_ar_flags
4395 fi
4396
4397 echo "$as_me:4397: checking if you have specified an install-prefix" >&5
4398 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4399
4400 # Check whether --with-install-prefix or --without-install-prefix was given.
4401 if test "${with_install_prefix+set}" = set; then
4402   withval="$with_install_prefix"
4403   case "x$withval" in #(vi
4404         xyes|xno) #(vi
4405                 ;;
4406         *)      DESTDIR="$withval"
4407                 ;;
4408         esac
4409 fi;
4410 echo "$as_me:4410: result: $DESTDIR" >&5
4411 echo "${ECHO_T}$DESTDIR" >&6
4412
4413 ###############################################################################
4414
4415 # If we're cross-compiling, allow the user to override the tools and their
4416 # options.  The configure script is oriented toward identifying the host
4417 # compiler, etc., but we need a build compiler to generate parts of the source.
4418
4419 if test "$cross_compiling" = yes ; then
4420
4421         # defaults that we might want to override
4422         : ${BUILD_CFLAGS:=''}
4423         : ${BUILD_CPPFLAGS:=''}
4424         : ${BUILD_LDFLAGS:=''}
4425         : ${BUILD_LIBS:=''}
4426         : ${BUILD_EXEEXT:='$x'}
4427         : ${BUILD_OBJEXT:='o'}
4428
4429 # Check whether --with-build-cc or --without-build-cc was given.
4430 if test "${with_build_cc+set}" = set; then
4431   withval="$with_build_cc"
4432   BUILD_CC="$withval"
4433 else
4434   for ac_prog in gcc cc cl
4435 do
4436   # Extract the first word of "$ac_prog", so it can be a program name with args.
4437 set dummy $ac_prog; ac_word=$2
4438 echo "$as_me:4438: checking for $ac_word" >&5
4439 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4440 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4441   echo $ECHO_N "(cached) $ECHO_C" >&6
4442 else
4443   if test -n "$BUILD_CC"; then
4444   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4445 else
4446   ac_save_IFS=$IFS; IFS=$ac_path_separator
4447 ac_dummy="$PATH"
4448 for ac_dir in $ac_dummy; do
4449   IFS=$ac_save_IFS
4450   test -z "$ac_dir" && ac_dir=.
4451   $as_executable_p "$ac_dir/$ac_word" || continue
4452 ac_cv_prog_BUILD_CC="$ac_prog"
4453 echo "$as_me:4453: found $ac_dir/$ac_word" >&5
4454 break
4455 done
4456
4457 fi
4458 fi
4459 BUILD_CC=$ac_cv_prog_BUILD_CC
4460 if test -n "$BUILD_CC"; then
4461   echo "$as_me:4461: result: $BUILD_CC" >&5
4462 echo "${ECHO_T}$BUILD_CC" >&6
4463 else
4464   echo "$as_me:4464: result: no" >&5
4465 echo "${ECHO_T}no" >&6
4466 fi
4467
4468   test -n "$BUILD_CC" && break
4469 done
4470
4471 fi;
4472         echo "$as_me:4472: checking for native build C compiler" >&5
4473 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4474         echo "$as_me:4474: result: $BUILD_CC" >&5
4475 echo "${ECHO_T}$BUILD_CC" >&6
4476
4477         echo "$as_me:4477: checking for native build C preprocessor" >&5
4478 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4479
4480 # Check whether --with-build-cpp or --without-build-cpp was given.
4481 if test "${with_build_cpp+set}" = set; then
4482   withval="$with_build_cpp"
4483   BUILD_CPP="$withval"
4484 else
4485   BUILD_CPP='${BUILD_CC} -E'
4486 fi;
4487         echo "$as_me:4487: result: $BUILD_CPP" >&5
4488 echo "${ECHO_T}$BUILD_CPP" >&6
4489
4490         echo "$as_me:4490: checking for native build C flags" >&5
4491 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4492
4493 # Check whether --with-build-cflags or --without-build-cflags was given.
4494 if test "${with_build_cflags+set}" = set; then
4495   withval="$with_build_cflags"
4496   BUILD_CFLAGS="$withval"
4497 fi;
4498         echo "$as_me:4498: result: $BUILD_CFLAGS" >&5
4499 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4500
4501         echo "$as_me:4501: checking for native build C preprocessor-flags" >&5
4502 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4503
4504 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4505 if test "${with_build_cppflags+set}" = set; then
4506   withval="$with_build_cppflags"
4507   BUILD_CPPFLAGS="$withval"
4508 fi;
4509         echo "$as_me:4509: result: $BUILD_CPPFLAGS" >&5
4510 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4511
4512         echo "$as_me:4512: checking for native build linker-flags" >&5
4513 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4514
4515 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4516 if test "${with_build_ldflags+set}" = set; then
4517   withval="$with_build_ldflags"
4518   BUILD_LDFLAGS="$withval"
4519 fi;
4520         echo "$as_me:4520: result: $BUILD_LDFLAGS" >&5
4521 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4522
4523         echo "$as_me:4523: checking for native build linker-libraries" >&5
4524 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4525
4526 # Check whether --with-build-libs or --without-build-libs was given.
4527 if test "${with_build_libs+set}" = set; then
4528   withval="$with_build_libs"
4529   BUILD_LIBS="$withval"
4530 fi;
4531         echo "$as_me:4531: result: $BUILD_LIBS" >&5
4532 echo "${ECHO_T}$BUILD_LIBS" >&6
4533
4534         # this assumes we're on Unix.
4535         BUILD_EXEEXT=
4536         BUILD_OBJEXT=o
4537
4538         : ${BUILD_CC:='${CC}'}
4539
4540         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4541                 { { echo "$as_me:4541: error: Cross-build requires two compilers.
4542 Use --with-build-cc to specify the native compiler." >&5
4543 echo "$as_me: error: Cross-build requires two compilers.
4544 Use --with-build-cc to specify the native compiler." >&2;}
4545    { (exit 1); exit 1; }; }
4546         fi
4547
4548 else
4549         : ${BUILD_CC:='${CC}'}
4550         : ${BUILD_CPP:='${CPP}'}
4551         : ${BUILD_CFLAGS:='${CFLAGS}'}
4552         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4553         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4554         : ${BUILD_LIBS:='${LIBS}'}
4555         : ${BUILD_EXEEXT:='$x'}
4556         : ${BUILD_OBJEXT:='o'}
4557 fi
4558
4559 ###############################################################################
4560
4561 ### Options to allow the user to specify the set of libraries which are used.
4562 ### Use "--without-normal --with-shared" to allow the default model to be
4563 ### shared, for example.
4564 cf_list_models=""
4565
4566 echo "$as_me:4566: checking if libtool -version-number should be used" >&5
4567 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4568
4569 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4570 if test "${enable_libtool_version+set}" = set; then
4571   enableval="$enable_libtool_version"
4572   test "$enableval" != no && enableval=yes
4573   if test "$enableval" != "yes" ; then
4574     cf_libtool_version=no
4575   else
4576     cf_libtool_version=yes
4577   fi
4578 else
4579   enableval=yes
4580   cf_libtool_version=yes
4581
4582 fi;
4583 echo "$as_me:4583: result: $cf_libtool_version" >&5
4584 echo "${ECHO_T}$cf_libtool_version" >&6
4585
4586 if test "$cf_libtool_version" = yes ; then
4587         LIBTOOL_VERSION="-version-number"
4588 else
4589         LIBTOOL_VERSION="-version-info"
4590         case "x$VERSION" in #(vi
4591         x) #(vi
4592                 { echo "$as_me:4592: WARNING: VERSION was not set" >&5
4593 echo "$as_me: WARNING: VERSION was not set" >&2;}
4594                 ;;
4595         x*.*.*)
4596                 ABI_VERSION="$VERSION"
4597                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4598
4599 echo "${as_me:-configure}:4599: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4600
4601                 ;;
4602         x*:*:*)
4603                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4604                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4605
4606 echo "${as_me:-configure}:4606: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4607
4608                 ;;
4609         *)
4610                 { echo "$as_me:4610: WARNING: unexpected VERSION value: $VERSION" >&5
4611 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4612                 ;;
4613         esac
4614 fi
4615
4616 LIBTOOL=
4617
4618 # common library maintenance symbols that are convenient for libtool scripts:
4619 LIB_CREATE='${AR} -cr'
4620 LIB_OBJECT='${OBJECTS}'
4621 LIB_SUFFIX=.a
4622 LIB_PREP="$RANLIB"
4623
4624 # symbols used to prop libtool up to enable it to determine what it should be
4625 # doing:
4626 LIB_CLEAN=
4627 LIB_COMPILE=
4628 LIB_LINK='${CC}'
4629 LIB_INSTALL=
4630 LIB_UNINSTALL=
4631
4632 echo "$as_me:4632: checking if you want to build libraries with libtool" >&5
4633 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4634
4635 # Check whether --with-libtool or --without-libtool was given.
4636 if test "${with_libtool+set}" = set; then
4637   withval="$with_libtool"
4638   with_libtool=$withval
4639 else
4640   with_libtool=no
4641 fi;
4642 echo "$as_me:4642: result: $with_libtool" >&5
4643 echo "${ECHO_T}$with_libtool" >&6
4644 if test "$with_libtool" != "no"; then
4645
4646         if test "$with_libtool" != "yes" ; then
4647
4648 if test "x$prefix" != xNONE; then
4649   cf_path_syntax="$prefix"
4650 else
4651   cf_path_syntax="$ac_default_prefix"
4652 fi
4653
4654 case ".$with_libtool" in #(vi
4655 .\$\(*\)*|.\'*\'*) #(vi
4656   ;;
4657 ..|./*|.\\*) #(vi
4658   ;;
4659 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4660   ;;
4661 .\${*prefix}*|.\${*dir}*) #(vi
4662   eval with_libtool="$with_libtool"
4663   case ".$with_libtool" in #(vi
4664   .NONE/*)
4665     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4666     ;;
4667   esac
4668   ;; #(vi
4669 .no|.NONE/*)
4670   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4671   ;;
4672 *)
4673   { { echo "$as_me:4673: error: expected a pathname, not \"$with_libtool\"" >&5
4674 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4675    { (exit 1); exit 1; }; }
4676   ;;
4677 esac
4678
4679                 LIBTOOL=$with_libtool
4680         else
4681                 if test -n "$ac_tool_prefix"; then
4682   for ac_prog in libtool glibtool
4683   do
4684     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4685 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4686 echo "$as_me:4686: checking for $ac_word" >&5
4687 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4688 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4689   echo $ECHO_N "(cached) $ECHO_C" >&6
4690 else
4691   if test -n "$LIBTOOL"; then
4692   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4693 else
4694   ac_save_IFS=$IFS; IFS=$ac_path_separator
4695 ac_dummy="$PATH"
4696 for ac_dir in $ac_dummy; do
4697   IFS=$ac_save_IFS
4698   test -z "$ac_dir" && ac_dir=.
4699   $as_executable_p "$ac_dir/$ac_word" || continue
4700 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4701 echo "$as_me:4701: found $ac_dir/$ac_word" >&5
4702 break
4703 done
4704
4705 fi
4706 fi
4707 LIBTOOL=$ac_cv_prog_LIBTOOL
4708 if test -n "$LIBTOOL"; then
4709   echo "$as_me:4709: result: $LIBTOOL" >&5
4710 echo "${ECHO_T}$LIBTOOL" >&6
4711 else
4712   echo "$as_me:4712: result: no" >&5
4713 echo "${ECHO_T}no" >&6
4714 fi
4715
4716     test -n "$LIBTOOL" && break
4717   done
4718 fi
4719 if test -z "$LIBTOOL"; then
4720   ac_ct_LIBTOOL=$LIBTOOL
4721   for ac_prog in libtool glibtool
4722 do
4723   # Extract the first word of "$ac_prog", so it can be a program name with args.
4724 set dummy $ac_prog; ac_word=$2
4725 echo "$as_me:4725: checking for $ac_word" >&5
4726 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4727 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4728   echo $ECHO_N "(cached) $ECHO_C" >&6
4729 else
4730   if test -n "$ac_ct_LIBTOOL"; then
4731   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4732 else
4733   ac_save_IFS=$IFS; IFS=$ac_path_separator
4734 ac_dummy="$PATH"
4735 for ac_dir in $ac_dummy; do
4736   IFS=$ac_save_IFS
4737   test -z "$ac_dir" && ac_dir=.
4738   $as_executable_p "$ac_dir/$ac_word" || continue
4739 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4740 echo "$as_me:4740: found $ac_dir/$ac_word" >&5
4741 break
4742 done
4743
4744 fi
4745 fi
4746 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4747 if test -n "$ac_ct_LIBTOOL"; then
4748   echo "$as_me:4748: result: $ac_ct_LIBTOOL" >&5
4749 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4750 else
4751   echo "$as_me:4751: result: no" >&5
4752 echo "${ECHO_T}no" >&6
4753 fi
4754
4755   test -n "$ac_ct_LIBTOOL" && break
4756 done
4757 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4758
4759   LIBTOOL=$ac_ct_LIBTOOL
4760 fi
4761
4762 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4763 then
4764         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.].*//'`
4765 else
4766         cf_cv_libtool_version=
4767 fi
4768 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4769
4770                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4771                 then
4772
4773 unset ac_cv_prog_ac_ct_LIBTOOL
4774 unset ac_ct_LIBTOOL
4775 unset LIBTOOL
4776
4777                         if test -n "$ac_tool_prefix"; then
4778   for ac_prog in glibtool
4779   do
4780     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4781 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4782 echo "$as_me:4782: checking for $ac_word" >&5
4783 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4784 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4785   echo $ECHO_N "(cached) $ECHO_C" >&6
4786 else
4787   if test -n "$LIBTOOL"; then
4788   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4789 else
4790   ac_save_IFS=$IFS; IFS=$ac_path_separator
4791 ac_dummy="$PATH"
4792 for ac_dir in $ac_dummy; do
4793   IFS=$ac_save_IFS
4794   test -z "$ac_dir" && ac_dir=.
4795   $as_executable_p "$ac_dir/$ac_word" || continue
4796 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4797 echo "$as_me:4797: found $ac_dir/$ac_word" >&5
4798 break
4799 done
4800
4801 fi
4802 fi
4803 LIBTOOL=$ac_cv_prog_LIBTOOL
4804 if test -n "$LIBTOOL"; then
4805   echo "$as_me:4805: result: $LIBTOOL" >&5
4806 echo "${ECHO_T}$LIBTOOL" >&6
4807 else
4808   echo "$as_me:4808: result: no" >&5
4809 echo "${ECHO_T}no" >&6
4810 fi
4811
4812     test -n "$LIBTOOL" && break
4813   done
4814 fi
4815 if test -z "$LIBTOOL"; then
4816   ac_ct_LIBTOOL=$LIBTOOL
4817   for ac_prog in glibtool
4818 do
4819   # Extract the first word of "$ac_prog", so it can be a program name with args.
4820 set dummy $ac_prog; ac_word=$2
4821 echo "$as_me:4821: checking for $ac_word" >&5
4822 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4823 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4824   echo $ECHO_N "(cached) $ECHO_C" >&6
4825 else
4826   if test -n "$ac_ct_LIBTOOL"; then
4827   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4828 else
4829   ac_save_IFS=$IFS; IFS=$ac_path_separator
4830 ac_dummy="$PATH"
4831 for ac_dir in $ac_dummy; do
4832   IFS=$ac_save_IFS
4833   test -z "$ac_dir" && ac_dir=.
4834   $as_executable_p "$ac_dir/$ac_word" || continue
4835 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4836 echo "$as_me:4836: found $ac_dir/$ac_word" >&5
4837 break
4838 done
4839
4840 fi
4841 fi
4842 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4843 if test -n "$ac_ct_LIBTOOL"; then
4844   echo "$as_me:4844: result: $ac_ct_LIBTOOL" >&5
4845 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4846 else
4847   echo "$as_me:4847: result: no" >&5
4848 echo "${ECHO_T}no" >&6
4849 fi
4850
4851   test -n "$ac_ct_LIBTOOL" && break
4852 done
4853 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4854
4855   LIBTOOL=$ac_ct_LIBTOOL
4856 fi
4857
4858 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4859 then
4860         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.].*//'`
4861 else
4862         cf_cv_libtool_version=
4863 fi
4864 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4865
4866                 fi
4867         fi
4868         if test -z "$LIBTOOL" ; then
4869                 { { echo "$as_me:4869: error: Cannot find libtool" >&5
4870 echo "$as_me: error: Cannot find libtool" >&2;}
4871    { (exit 1); exit 1; }; }
4872         fi
4873         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4874         LIB_OBJECT='${OBJECTS:.o=.lo}'
4875         LIB_SUFFIX=.la
4876         LIB_CLEAN='${LIBTOOL} --mode=clean'
4877         LIB_COMPILE='${LIBTOOL} --mode=compile'
4878         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4879         LIB_INSTALL='${LIBTOOL} --mode=install'
4880         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4881         LIB_PREP=:
4882
4883 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4884 then
4885         echo "$as_me:4885: checking version of $LIBTOOL" >&5
4886 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4887
4888 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4889 then
4890         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.].*//'`
4891 else
4892         cf_cv_libtool_version=
4893 fi
4894 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4895
4896         echo "$as_me:4896: result: $cf_cv_libtool_version" >&5
4897 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4898         if test -z "$cf_cv_libtool_version" ; then
4899                 { { echo "$as_me:4899: error: This is not GNU libtool" >&5
4900 echo "$as_me: error: This is not GNU libtool" >&2;}
4901    { (exit 1); exit 1; }; }
4902         fi
4903 else
4904         { { echo "$as_me:4904: error: GNU libtool has not been found" >&5
4905 echo "$as_me: error: GNU libtool has not been found" >&2;}
4906    { (exit 1); exit 1; }; }
4907 fi
4908
4909         # special hack to add -no-undefined (which libtool should do for itself)
4910         LT_UNDEF=
4911         case "$cf_cv_system_name" in #(vi
4912         cygwin*|msys*|mingw32*|uwin*|aix[4-7]) #(vi
4913                 LT_UNDEF=-no-undefined
4914                 ;;
4915         esac
4916
4917         # special hack to add --tag option for C++ compiler
4918         case $cf_cv_libtool_version in #(vi
4919         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4920                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4921                 LIBTOOL="$LIBTOOL --tag=CC"
4922                 ;;
4923         *)
4924                 LIBTOOL_CXX="$LIBTOOL"
4925                 ;;
4926         esac
4927 else
4928         LIBTOOL=""
4929         LIBTOOL_CXX=""
4930 fi
4931
4932 test -z "$LIBTOOL" && ECHO_LT=
4933
4934 if test "$with_libtool" != "no" ; then
4935
4936 cf_list_models="$cf_list_models libtool"
4937
4938 else
4939
4940 echo "$as_me:4940: checking if you want to build shared libraries" >&5
4941 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4942
4943 # Check whether --with-shared or --without-shared was given.
4944 if test "${with_shared+set}" = set; then
4945   withval="$with_shared"
4946   with_shared=$withval
4947 else
4948   with_shared=no
4949 fi;
4950 echo "$as_me:4950: result: $with_shared" >&5
4951 echo "${ECHO_T}$with_shared" >&6
4952 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4953
4954 echo "$as_me:4954: checking if you want to build static libraries" >&5
4955 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4956
4957 # Check whether --with-normal or --without-normal was given.
4958 if test "${with_normal+set}" = set; then
4959   withval="$with_normal"
4960   with_normal=$withval
4961 else
4962   with_normal=yes
4963 fi;
4964 echo "$as_me:4964: result: $with_normal" >&5
4965 echo "${ECHO_T}$with_normal" >&6
4966 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4967
4968 echo "$as_me:4968: checking if you want to build debug libraries" >&5
4969 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4970
4971 # Check whether --with-debug or --without-debug was given.
4972 if test "${with_debug+set}" = set; then
4973   withval="$with_debug"
4974   with_debug=$withval
4975 else
4976   with_debug=yes
4977 fi;
4978 echo "$as_me:4978: result: $with_debug" >&5
4979 echo "${ECHO_T}$with_debug" >&6
4980 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4981
4982 echo "$as_me:4982: checking if you want to build profiling libraries" >&5
4983 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4984
4985 # Check whether --with-profile or --without-profile was given.
4986 if test "${with_profile+set}" = set; then
4987   withval="$with_profile"
4988   with_profile=$withval
4989 else
4990   with_profile=no
4991 fi;
4992 echo "$as_me:4992: result: $with_profile" >&5
4993 echo "${ECHO_T}$with_profile" >&6
4994 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4995
4996 fi
4997
4998 if test "X$cf_with_cxx_binding" != Xno; then
4999 if test "x$with_shared" = "xyes"; then
5000 echo "$as_me:5000: checking if you want to build C++ shared libraries" >&5
5001 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5002
5003 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5004 if test "${with_cxx_shared+set}" = set; then
5005   withval="$with_cxx_shared"
5006   with_shared_cxx=$withval
5007 else
5008   with_shared_cxx=no
5009 fi;
5010 echo "$as_me:5010: result: $with_shared_cxx" >&5
5011 echo "${ECHO_T}$with_shared_cxx" >&6
5012 fi
5013 fi
5014
5015 ###############################################################################
5016
5017 echo "$as_me:5017: checking for specified models" >&5
5018 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5019 test -z "$cf_list_models" && cf_list_models=normal
5020 test "$with_libtool" != "no" && cf_list_models=libtool
5021 echo "$as_me:5021: result: $cf_list_models" >&5
5022 echo "${ECHO_T}$cf_list_models" >&6
5023
5024 ### Use the first model as the default, and save its suffix for use in building
5025 ### up test-applications.
5026 echo "$as_me:5026: checking for default model" >&5
5027 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5028 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5029 echo "$as_me:5029: result: $DFT_LWR_MODEL" >&5
5030 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5031
5032 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5033
5034 TICS_NAME=tic
5035
5036 TINFO_NAME=tinfo
5037
5038 LIB_NAME=ncurses
5039
5040 LIB_DIR=../lib
5041 LIB_2ND=../../lib
5042
5043 echo "$as_me:5043: checking if you want to have a library-prefix" >&5
5044 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5045
5046 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5047 if test "${with_lib_prefix+set}" = set; then
5048   withval="$with_lib_prefix"
5049   with_lib_prefix=$withval
5050 else
5051   with_lib_prefix=auto
5052 fi;
5053 echo "$as_me:5053: result: $with_lib_prefix" >&5
5054 echo "${ECHO_T}$with_lib_prefix" >&6
5055
5056 if test $with_lib_prefix = auto
5057 then
5058
5059         case $cf_cv_system_name in #(vi
5060         OS/2*|os2*) #(vi
5061         LIB_PREFIX=''
5062         ;;
5063         *)      LIB_PREFIX='lib'
5064         ;;
5065         esac
5066 cf_prefix=$LIB_PREFIX
5067
5068 elif test $with_lib_prefix = no
5069 then
5070         LIB_PREFIX=
5071 else
5072         LIB_PREFIX=$with_lib_prefix
5073 fi
5074
5075 LIB_SUFFIX=
5076
5077         echo "$as_me:5077: checking for PATH separator" >&5
5078 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5079         case $cf_cv_system_name in
5080         os2*)   PATH_SEPARATOR=';'  ;;
5081         *)      ${PATH_SEPARATOR:=':'}  ;;
5082         esac
5083
5084         echo "$as_me:5084: result: $PATH_SEPARATOR" >&5
5085 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5086
5087 ###############################################################################
5088
5089 echo "$as_me:5089: checking if you want to build a separate terminfo library" >&5
5090 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5091
5092 # Check whether --with-termlib or --without-termlib was given.
5093 if test "${with_termlib+set}" = set; then
5094   withval="$with_termlib"
5095   with_termlib=$withval
5096 else
5097   with_termlib=no
5098 fi;
5099 echo "$as_me:5099: result: $with_termlib" >&5
5100 echo "${ECHO_T}$with_termlib" >&6
5101
5102 echo "$as_me:5102: checking if you want to build a separate tic library" >&5
5103 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5104
5105 # Check whether --with-ticlib or --without-ticlib was given.
5106 if test "${with_ticlib+set}" = set; then
5107   withval="$with_ticlib"
5108   with_ticlib=$withval
5109 else
5110   with_ticlib=no
5111 fi;
5112 echo "$as_me:5112: result: $with_ticlib" >&5
5113 echo "${ECHO_T}$with_ticlib" >&6
5114
5115 ### Checks for special libraries, must be done up-front.
5116 SHLIB_LIST=""
5117
5118 echo "$as_me:5118: checking if you want to link with the GPM mouse library" >&5
5119 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5120
5121 # Check whether --with-gpm or --without-gpm was given.
5122 if test "${with_gpm+set}" = set; then
5123   withval="$with_gpm"
5124   with_gpm=$withval
5125 else
5126   with_gpm=maybe
5127 fi;
5128 echo "$as_me:5128: result: $with_gpm" >&5
5129 echo "${ECHO_T}$with_gpm" >&6
5130
5131 if test "$with_gpm" != no ; then
5132         echo "$as_me:5132: checking for gpm.h" >&5
5133 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5134 if test "${ac_cv_header_gpm_h+set}" = set; then
5135   echo $ECHO_N "(cached) $ECHO_C" >&6
5136 else
5137   cat >conftest.$ac_ext <<_ACEOF
5138 #line 5138 "configure"
5139 #include "confdefs.h"
5140 #include <gpm.h>
5141 _ACEOF
5142 if { (eval echo "$as_me:5142: \"$ac_cpp conftest.$ac_ext\"") >&5
5143   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5144   ac_status=$?
5145   egrep -v '^ *\+' conftest.er1 >conftest.err
5146   rm -f conftest.er1
5147   cat conftest.err >&5
5148   echo "$as_me:5148: \$? = $ac_status" >&5
5149   (exit $ac_status); } >/dev/null; then
5150   if test -s conftest.err; then
5151     ac_cpp_err=$ac_c_preproc_warn_flag
5152   else
5153     ac_cpp_err=
5154   fi
5155 else
5156   ac_cpp_err=yes
5157 fi
5158 if test -z "$ac_cpp_err"; then
5159   ac_cv_header_gpm_h=yes
5160 else
5161   echo "$as_me: failed program was:" >&5
5162   cat conftest.$ac_ext >&5
5163   ac_cv_header_gpm_h=no
5164 fi
5165 rm -f conftest.err conftest.$ac_ext
5166 fi
5167 echo "$as_me:5167: result: $ac_cv_header_gpm_h" >&5
5168 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5169 if test $ac_cv_header_gpm_h = yes; then
5170
5171 cat >>confdefs.h <<\EOF
5172 #define HAVE_GPM_H 1
5173 EOF
5174
5175                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5176                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5177
5178 echo "${as_me:-configure}:5178: testing assuming we really have GPM library ..." 1>&5
5179
5180 cat >>confdefs.h <<\EOF
5181 #define HAVE_LIBGPM 1
5182 EOF
5183
5184                 else
5185                         echo "$as_me:5185: checking for Gpm_Open in -lgpm" >&5
5186 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5187 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5188   echo $ECHO_N "(cached) $ECHO_C" >&6
5189 else
5190   ac_check_lib_save_LIBS=$LIBS
5191 LIBS="-lgpm  $LIBS"
5192 cat >conftest.$ac_ext <<_ACEOF
5193 #line 5193 "configure"
5194 #include "confdefs.h"
5195
5196 /* Override any gcc2 internal prototype to avoid an error.  */
5197 #ifdef __cplusplus
5198 extern "C"
5199 #endif
5200 /* We use char because int might match the return type of a gcc2
5201    builtin and then its argument prototype would still apply.  */
5202 char Gpm_Open ();
5203 int
5204 main ()
5205 {
5206 Gpm_Open ();
5207   ;
5208   return 0;
5209 }
5210 _ACEOF
5211 rm -f conftest.$ac_objext conftest$ac_exeext
5212 if { (eval echo "$as_me:5212: \"$ac_link\"") >&5
5213   (eval $ac_link) 2>&5
5214   ac_status=$?
5215   echo "$as_me:5215: \$? = $ac_status" >&5
5216   (exit $ac_status); } &&
5217          { ac_try='test -s conftest$ac_exeext'
5218   { (eval echo "$as_me:5218: \"$ac_try\"") >&5
5219   (eval $ac_try) 2>&5
5220   ac_status=$?
5221   echo "$as_me:5221: \$? = $ac_status" >&5
5222   (exit $ac_status); }; }; then
5223   ac_cv_lib_gpm_Gpm_Open=yes
5224 else
5225   echo "$as_me: failed program was:" >&5
5226 cat conftest.$ac_ext >&5
5227 ac_cv_lib_gpm_Gpm_Open=no
5228 fi
5229 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5230 LIBS=$ac_check_lib_save_LIBS
5231 fi
5232 echo "$as_me:5232: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5233 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5234 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5235   :
5236 else
5237
5238                                 { { echo "$as_me:5238: error: Cannot link with GPM library" >&5
5239 echo "$as_me: error: Cannot link with GPM library" >&2;}
5240    { (exit 1); exit 1; }; }
5241                 fi
5242                 with_gpm=yes
5243
5244 fi
5245
5246 else
5247
5248                 test "$with_gpm" != maybe && { echo "$as_me:5248: WARNING: Cannot find GPM header" >&5
5249 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5250                 with_gpm=no
5251
5252 fi
5253
5254 fi
5255
5256 if test "$with_gpm" != no ; then
5257         echo "$as_me:5257: checking if you want to load GPM dynamically" >&5
5258 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5259
5260 # Check whether --with-dlsym or --without-dlsym was given.
5261 if test "${with_dlsym+set}" = set; then
5262   withval="$with_dlsym"
5263   with_dlsym=$withval
5264 else
5265   with_dlsym=yes
5266 fi;
5267         echo "$as_me:5267: result: $with_dlsym" >&5
5268 echo "${ECHO_T}$with_dlsym" >&6
5269         if test "x$with_dlsym" = xyes ; then
5270
5271 cf_have_dlsym=no
5272 echo "$as_me:5272: checking for dlsym" >&5
5273 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5274 if test "${ac_cv_func_dlsym+set}" = set; then
5275   echo $ECHO_N "(cached) $ECHO_C" >&6
5276 else
5277   cat >conftest.$ac_ext <<_ACEOF
5278 #line 5278 "configure"
5279 #include "confdefs.h"
5280 /* System header to define __stub macros and hopefully few prototypes,
5281     which can conflict with char dlsym (); below.  */
5282 #include <assert.h>
5283 /* Override any gcc2 internal prototype to avoid an error.  */
5284 #ifdef __cplusplus
5285 extern "C"
5286 #endif
5287 /* We use char because int might match the return type of a gcc2
5288    builtin and then its argument prototype would still apply.  */
5289 char dlsym ();
5290 char (*f) ();
5291
5292 int
5293 main ()
5294 {
5295 /* The GNU C library defines this for functions which it implements
5296     to always fail with ENOSYS.  Some functions are actually named
5297     something starting with __ and the normal name is an alias.  */
5298 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5299 choke me
5300 #else
5301 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5302 #endif
5303
5304   ;
5305   return 0;
5306 }
5307 _ACEOF
5308 rm -f conftest.$ac_objext conftest$ac_exeext
5309 if { (eval echo "$as_me:5309: \"$ac_link\"") >&5
5310   (eval $ac_link) 2>&5
5311   ac_status=$?
5312   echo "$as_me:5312: \$? = $ac_status" >&5
5313   (exit $ac_status); } &&
5314          { ac_try='test -s conftest$ac_exeext'
5315   { (eval echo "$as_me:5315: \"$ac_try\"") >&5
5316   (eval $ac_try) 2>&5
5317   ac_status=$?
5318   echo "$as_me:5318: \$? = $ac_status" >&5
5319   (exit $ac_status); }; }; then
5320   ac_cv_func_dlsym=yes
5321 else
5322   echo "$as_me: failed program was:" >&5
5323 cat conftest.$ac_ext >&5
5324 ac_cv_func_dlsym=no
5325 fi
5326 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5327 fi
5328 echo "$as_me:5328: result: $ac_cv_func_dlsym" >&5
5329 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5330 if test $ac_cv_func_dlsym = yes; then
5331   cf_have_dlsym=yes
5332 else
5333
5334 cf_have_libdl=no
5335 echo "$as_me:5335: checking for dlsym in -ldl" >&5
5336 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5337 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5338   echo $ECHO_N "(cached) $ECHO_C" >&6
5339 else
5340   ac_check_lib_save_LIBS=$LIBS
5341 LIBS="-ldl  $LIBS"
5342 cat >conftest.$ac_ext <<_ACEOF
5343 #line 5343 "configure"
5344 #include "confdefs.h"
5345
5346 /* Override any gcc2 internal prototype to avoid an error.  */
5347 #ifdef __cplusplus
5348 extern "C"
5349 #endif
5350 /* We use char because int might match the return type of a gcc2
5351    builtin and then its argument prototype would still apply.  */
5352 char dlsym ();
5353 int
5354 main ()
5355 {
5356 dlsym ();
5357   ;
5358   return 0;
5359 }
5360 _ACEOF
5361 rm -f conftest.$ac_objext conftest$ac_exeext
5362 if { (eval echo "$as_me:5362: \"$ac_link\"") >&5
5363   (eval $ac_link) 2>&5
5364   ac_status=$?
5365   echo "$as_me:5365: \$? = $ac_status" >&5
5366   (exit $ac_status); } &&
5367          { ac_try='test -s conftest$ac_exeext'
5368   { (eval echo "$as_me:5368: \"$ac_try\"") >&5
5369   (eval $ac_try) 2>&5
5370   ac_status=$?
5371   echo "$as_me:5371: \$? = $ac_status" >&5
5372   (exit $ac_status); }; }; then
5373   ac_cv_lib_dl_dlsym=yes
5374 else
5375   echo "$as_me: failed program was:" >&5
5376 cat conftest.$ac_ext >&5
5377 ac_cv_lib_dl_dlsym=no
5378 fi
5379 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5380 LIBS=$ac_check_lib_save_LIBS
5381 fi
5382 echo "$as_me:5382: result: $ac_cv_lib_dl_dlsym" >&5
5383 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5384 if test $ac_cv_lib_dl_dlsym = yes; then
5385
5386         cf_have_dlsym=yes
5387         cf_have_libdl=yes
5388 fi
5389
5390 fi
5391
5392 if test "$cf_have_dlsym" = yes ; then
5393         test "$cf_have_libdl" = yes &&
5394 cf_add_libs="-ldl"
5395 # Filter out duplicates - this happens with badly-designed ".pc" files...
5396 for cf_add_1lib in $LIBS
5397 do
5398         for cf_add_2lib in $cf_add_libs
5399         do
5400                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5401                 then
5402                         cf_add_1lib=
5403                         break
5404                 fi
5405         done
5406         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5407 done
5408 LIBS="$cf_add_libs"
5409
5410         echo "$as_me:5410: checking whether able to link to dl*() functions" >&5
5411 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5412         cat >conftest.$ac_ext <<_ACEOF
5413 #line 5413 "configure"
5414 #include "confdefs.h"
5415 #include <dlfcn.h>
5416 int
5417 main ()
5418 {
5419
5420                 void *obj;
5421                 if ((obj = dlopen("filename", 0)) != 0) {
5422                         if (dlsym(obj, "symbolname") == 0) {
5423                         dlclose(obj);
5424                         }
5425                 }
5426   ;
5427   return 0;
5428 }
5429 _ACEOF
5430 rm -f conftest.$ac_objext conftest$ac_exeext
5431 if { (eval echo "$as_me:5431: \"$ac_link\"") >&5
5432   (eval $ac_link) 2>&5
5433   ac_status=$?
5434   echo "$as_me:5434: \$? = $ac_status" >&5
5435   (exit $ac_status); } &&
5436          { ac_try='test -s conftest$ac_exeext'
5437   { (eval echo "$as_me:5437: \"$ac_try\"") >&5
5438   (eval $ac_try) 2>&5
5439   ac_status=$?
5440   echo "$as_me:5440: \$? = $ac_status" >&5
5441   (exit $ac_status); }; }; then
5442
5443 cat >>confdefs.h <<\EOF
5444 #define HAVE_LIBDL 1
5445 EOF
5446
5447 else
5448   echo "$as_me: failed program was:" >&5
5449 cat conftest.$ac_ext >&5
5450
5451                 { { echo "$as_me:5451: error: Cannot link test program for libdl" >&5
5452 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5453    { (exit 1); exit 1; }; }
5454 fi
5455 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5456         echo "$as_me:5456: result: ok" >&5
5457 echo "${ECHO_T}ok" >&6
5458 else
5459         { { echo "$as_me:5459: error: Cannot find dlsym function" >&5
5460 echo "$as_me: error: Cannot find dlsym function" >&2;}
5461    { (exit 1); exit 1; }; }
5462 fi
5463
5464                 if test "x$with_gpm" != xyes ; then
5465                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5466
5467 echo "${as_me:-configure}:5467: testing assuming soname for gpm is $with_gpm ..." 1>&5
5468
5469                         cf_cv_gpm_soname="$with_gpm"
5470                 else
5471
5472 echo "$as_me:5472: checking for soname of gpm library" >&5
5473 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5474 if test "${cf_cv_gpm_soname+set}" = set; then
5475   echo $ECHO_N "(cached) $ECHO_C" >&6
5476 else
5477
5478 cf_cv_gpm_soname=unknown
5479 if test "$cross_compiling" != yes ; then
5480 cat >conftest.$ac_ext <<CF_EOF
5481 #include <gpm.h>
5482 int main()
5483 {
5484 if (Gpm_Open(0,0)) Gpm_Close();
5485         ${cf_cv_main_return:-return}(0);
5486 }
5487 CF_EOF
5488 cf_save_LIBS="$LIBS"
5489
5490 cf_add_libs="-lgpm"
5491 # Filter out duplicates - this happens with badly-designed ".pc" files...
5492 for cf_add_1lib in $LIBS
5493 do
5494         for cf_add_2lib in $cf_add_libs
5495         do
5496                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5497                 then
5498                         cf_add_1lib=
5499                         break
5500                 fi
5501         done
5502         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5503 done
5504 LIBS="$cf_add_libs"
5505
5506         if { (eval echo "$as_me:5506: \"$ac_compile\"") >&5
5507   (eval $ac_compile) 2>&5
5508   ac_status=$?
5509   echo "$as_me:5509: \$? = $ac_status" >&5
5510   (exit $ac_status); } ; then
5511                 if { (eval echo "$as_me:5511: \"$ac_link\"") >&5
5512   (eval $ac_link) 2>&5
5513   ac_status=$?
5514   echo "$as_me:5514: \$? = $ac_status" >&5
5515   (exit $ac_status); } ; then
5516                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5517                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5518                 fi
5519         fi
5520 rm -rf conftest*
5521 LIBS="$cf_save_LIBS"
5522 fi
5523
5524 fi
5525 echo "$as_me:5525: result: $cf_cv_gpm_soname" >&5
5526 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5527
5528                 fi
5529                 test "$cf_cv_gpm_soname" != "unknown" &&
5530 cat >>confdefs.h <<EOF
5531 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5532 EOF
5533
5534                 SHLIB_LIST="-ldl $SHLIB_LIST"
5535         else
5536                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5537
5538 cf_add_libs="-lgpm"
5539 # Filter out duplicates - this happens with badly-designed ".pc" files...
5540 for cf_add_1lib in $TEST_LIBS
5541 do
5542         for cf_add_2lib in $cf_add_libs
5543         do
5544                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5545                 then
5546                         cf_add_1lib=
5547                         break
5548                 fi
5549         done
5550         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5551 done
5552 TEST_LIBS="$cf_add_libs"
5553
5554         fi
5555
5556 cat >>confdefs.h <<\EOF
5557 #define HAVE_LIBGPM 1
5558 EOF
5559
5560 echo "$as_me:5560: checking for Gpm_Wgetch in -lgpm" >&5
5561 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5562 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5563   echo $ECHO_N "(cached) $ECHO_C" >&6
5564 else
5565   ac_check_lib_save_LIBS=$LIBS
5566 LIBS="-lgpm  $LIBS"
5567 cat >conftest.$ac_ext <<_ACEOF
5568 #line 5568 "configure"
5569 #include "confdefs.h"
5570
5571 /* Override any gcc2 internal prototype to avoid an error.  */
5572 #ifdef __cplusplus
5573 extern "C"
5574 #endif
5575 /* We use char because int might match the return type of a gcc2
5576    builtin and then its argument prototype would still apply.  */
5577 char Gpm_Wgetch ();
5578 int
5579 main ()
5580 {
5581 Gpm_Wgetch ();
5582   ;
5583   return 0;
5584 }
5585 _ACEOF
5586 rm -f conftest.$ac_objext conftest$ac_exeext
5587 if { (eval echo "$as_me:5587: \"$ac_link\"") >&5
5588   (eval $ac_link) 2>&5
5589   ac_status=$?
5590   echo "$as_me:5590: \$? = $ac_status" >&5
5591   (exit $ac_status); } &&
5592          { ac_try='test -s conftest$ac_exeext'
5593   { (eval echo "$as_me:5593: \"$ac_try\"") >&5
5594   (eval $ac_try) 2>&5
5595   ac_status=$?
5596   echo "$as_me:5596: \$? = $ac_status" >&5
5597   (exit $ac_status); }; }; then
5598   ac_cv_lib_gpm_Gpm_Wgetch=yes
5599 else
5600   echo "$as_me: failed program was:" >&5
5601 cat conftest.$ac_ext >&5
5602 ac_cv_lib_gpm_Gpm_Wgetch=no
5603 fi
5604 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5605 LIBS=$ac_check_lib_save_LIBS
5606 fi
5607 echo "$as_me:5607: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5608 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5609 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5610
5611 echo "$as_me:5611: checking if GPM is weakly bound to curses library" >&5
5612 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5613 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5614   echo $ECHO_N "(cached) $ECHO_C" >&6
5615 else
5616
5617 cf_cv_check_gpm_wgetch=unknown
5618 if test "$cross_compiling" != yes ; then
5619
5620 cat >conftest.$ac_ext <<CF_EOF
5621 #include <gpm.h>
5622 int main()
5623 {
5624         Gpm_Wgetch();
5625         ${cf_cv_main_return:-return}(0);
5626 }
5627 CF_EOF
5628
5629         cf_save_LIBS="$LIBS"
5630         # This only works if we can look at the symbol table.  If a shared
5631         # library is stripped for install, we cannot use that.  So we're forced
5632         # to rely on the static library, noting that some packagers may not
5633         # include it.
5634         LIBS="-static -lgpm -dynamic $LIBS"
5635         if { (eval echo "$as_me:5635: \"$ac_compile\"") >&5
5636   (eval $ac_compile) 2>&5
5637   ac_status=$?
5638   echo "$as_me:5638: \$? = $ac_status" >&5
5639   (exit $ac_status); } ; then
5640                 if { (eval echo "$as_me:5640: \"$ac_link\"") >&5
5641   (eval $ac_link) 2>&5
5642   ac_status=$?
5643   echo "$as_me:5643: \$? = $ac_status" >&5
5644   (exit $ac_status); } ; then
5645                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5646                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5647                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5648                 fi
5649         fi
5650         rm -rf conftest*
5651         LIBS="$cf_save_LIBS"
5652 fi
5653
5654 fi
5655 echo "$as_me:5655: result: $cf_cv_check_gpm_wgetch" >&5
5656 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5657
5658 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5659         { echo "$as_me:5659: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5660 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5661 fi
5662
5663 fi
5664
5665 fi
5666
5667 # not everyone has "test -c"
5668 if test -c /dev/sysmouse 2>/dev/null ; then
5669 echo "$as_me:5669: checking if you want to use sysmouse" >&5
5670 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5671
5672 # Check whether --with-sysmouse or --without-sysmouse was given.
5673 if test "${with_sysmouse+set}" = set; then
5674   withval="$with_sysmouse"
5675   cf_with_sysmouse=$withval
5676 else
5677   cf_with_sysmouse=maybe
5678 fi;
5679         if test "$cf_with_sysmouse" != no ; then
5680         cat >conftest.$ac_ext <<_ACEOF
5681 #line 5681 "configure"
5682 #include "confdefs.h"
5683
5684 #include <osreldate.h>
5685 #if (__FreeBSD_version >= 400017)
5686 #include <sys/consio.h>
5687 #include <sys/fbio.h>
5688 #else
5689 #include <machine/console.h>
5690 #endif
5691
5692 int
5693 main ()
5694 {
5695
5696         struct mouse_info the_mouse;
5697         ioctl(0, CONS_MOUSECTL, &the_mouse);
5698
5699   ;
5700   return 0;
5701 }
5702 _ACEOF
5703 rm -f conftest.$ac_objext
5704 if { (eval echo "$as_me:5704: \"$ac_compile\"") >&5
5705   (eval $ac_compile) 2>&5
5706   ac_status=$?
5707   echo "$as_me:5707: \$? = $ac_status" >&5
5708   (exit $ac_status); } &&
5709          { ac_try='test -s conftest.$ac_objext'
5710   { (eval echo "$as_me:5710: \"$ac_try\"") >&5
5711   (eval $ac_try) 2>&5
5712   ac_status=$?
5713   echo "$as_me:5713: \$? = $ac_status" >&5
5714   (exit $ac_status); }; }; then
5715   cf_with_sysmouse=yes
5716 else
5717   echo "$as_me: failed program was:" >&5
5718 cat conftest.$ac_ext >&5
5719 cf_with_sysmouse=no
5720 fi
5721 rm -f conftest.$ac_objext conftest.$ac_ext
5722         fi
5723 echo "$as_me:5723: result: $cf_with_sysmouse" >&5
5724 echo "${ECHO_T}$cf_with_sysmouse" >&6
5725 test "$cf_with_sysmouse" = yes &&
5726 cat >>confdefs.h <<\EOF
5727 #define USE_SYSMOUSE 1
5728 EOF
5729
5730 fi
5731
5732 if test X"$CC_G_OPT" = X"" ; then
5733         CC_G_OPT='-g'
5734         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5735 fi
5736
5737 if test X"$CXX_G_OPT" = X"" ; then
5738         CXX_G_OPT='-g'
5739         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5740 fi
5741
5742 echo "$as_me:5742: checking for default loader flags" >&5
5743 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5744 case $DFT_LWR_MODEL in
5745 libtool) LD_MODEL=''   ;;
5746 normal)  LD_MODEL=''   ;;
5747 debug)   LD_MODEL=$CC_G_OPT ;;
5748 profile) LD_MODEL='-pg';;
5749 shared)  LD_MODEL=''   ;;
5750 esac
5751 echo "$as_me:5751: result: $LD_MODEL" >&5
5752 echo "${ECHO_T}$LD_MODEL" >&6
5753
5754 case $DFT_LWR_MODEL in
5755 shared)
5756
5757 echo "$as_me:5757: checking if rpath option should be used" >&5
5758 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5759
5760 # Check whether --enable-rpath or --disable-rpath was given.
5761 if test "${enable_rpath+set}" = set; then
5762   enableval="$enable_rpath"
5763   cf_cv_enable_rpath=$enableval
5764 else
5765   cf_cv_enable_rpath=no
5766 fi;
5767 echo "$as_me:5767: result: $cf_cv_enable_rpath" >&5
5768 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5769
5770 echo "$as_me:5770: checking if shared libraries should be relinked during install" >&5
5771 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5772
5773 # Check whether --enable-relink or --disable-relink was given.
5774 if test "${enable_relink+set}" = set; then
5775   enableval="$enable_relink"
5776   cf_cv_do_relink=$enableval
5777 else
5778   cf_cv_do_relink=yes
5779 fi;
5780 echo "$as_me:5780: result: $cf_cv_do_relink" >&5
5781 echo "${ECHO_T}$cf_cv_do_relink" >&6
5782         ;;
5783 esac
5784
5785 # we will build libraries one-level down.
5786 rel_builddir=..
5787
5788 LD_RPATH_OPT=
5789 echo "$as_me:5789: checking for an rpath option" >&5
5790 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5791 case $cf_cv_system_name in #(vi
5792 irix*) #(vi
5793         if test "$GCC" = yes; then
5794                 LD_RPATH_OPT="-Wl,-rpath,"
5795         else
5796                 LD_RPATH_OPT="-rpath "
5797         fi
5798         ;;
5799 linux*|gnu*|k*bsd*-gnu) #(vi
5800         LD_RPATH_OPT="-Wl,-rpath,"
5801         ;;
5802 openbsd[2-9].*|mirbsd*) #(vi
5803         LD_RPATH_OPT="-Wl,-rpath,"
5804         ;;
5805 dragonfly*|freebsd*) #(vi
5806         LD_RPATH_OPT="-rpath "
5807         ;;
5808 netbsd*) #(vi
5809         LD_RPATH_OPT="-Wl,-rpath,"
5810         ;;
5811 osf*|mls+*) #(vi
5812         LD_RPATH_OPT="-rpath "
5813         ;;
5814 solaris2*) #(vi
5815         LD_RPATH_OPT="-R"
5816         ;;
5817 *)
5818         ;;
5819 esac
5820 echo "$as_me:5820: result: $LD_RPATH_OPT" >&5
5821 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5822
5823 case "x$LD_RPATH_OPT" in #(vi
5824 x-R*)
5825         echo "$as_me:5825: checking if we need a space after rpath option" >&5
5826 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5827         cf_save_LIBS="$LIBS"
5828
5829 cf_add_libs="${LD_RPATH_OPT}$libdir"
5830 # Filter out duplicates - this happens with badly-designed ".pc" files...
5831 for cf_add_1lib in $LIBS
5832 do
5833         for cf_add_2lib in $cf_add_libs
5834         do
5835                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5836                 then
5837                         cf_add_1lib=
5838                         break
5839                 fi
5840         done
5841         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5842 done
5843 LIBS="$cf_add_libs"
5844
5845         cat >conftest.$ac_ext <<_ACEOF
5846 #line 5846 "configure"
5847 #include "confdefs.h"
5848
5849 int
5850 main ()
5851 {
5852
5853   ;
5854   return 0;
5855 }
5856 _ACEOF
5857 rm -f conftest.$ac_objext conftest$ac_exeext
5858 if { (eval echo "$as_me:5858: \"$ac_link\"") >&5
5859   (eval $ac_link) 2>&5
5860   ac_status=$?
5861   echo "$as_me:5861: \$? = $ac_status" >&5
5862   (exit $ac_status); } &&
5863          { ac_try='test -s conftest$ac_exeext'
5864   { (eval echo "$as_me:5864: \"$ac_try\"") >&5
5865   (eval $ac_try) 2>&5
5866   ac_status=$?
5867   echo "$as_me:5867: \$? = $ac_status" >&5
5868   (exit $ac_status); }; }; then
5869   cf_rpath_space=no
5870 else
5871   echo "$as_me: failed program was:" >&5
5872 cat conftest.$ac_ext >&5
5873 cf_rpath_space=yes
5874 fi
5875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5876         LIBS="$cf_save_LIBS"
5877         echo "$as_me:5877: result: $cf_rpath_space" >&5
5878 echo "${ECHO_T}$cf_rpath_space" >&6
5879         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5880         ;;
5881 esac
5882
5883         RM_SHARED_OPTS=
5884         LOCAL_LDFLAGS=
5885         LOCAL_LDFLAGS2=
5886         LD_SHARED_OPTS=
5887         INSTALL_LIB="-m 644"
5888         : ${rel_builddir:=.}
5889
5890         shlibdir=$libdir
5891
5892         MAKE_DLLS="#"
5893
5894         cf_cv_do_symlinks=no
5895         cf_ld_rpath_opt=
5896         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5897
5898         echo "$as_me:5898: checking if release/abi version should be used for shared libs" >&5
5899 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5900
5901 # Check whether --with-shlib-version or --without-shlib-version was given.
5902 if test "${with_shlib_version+set}" = set; then
5903   withval="$with_shlib_version"
5904   test -z "$withval" && withval=auto
5905         case $withval in #(vi
5906         yes) #(vi
5907                 cf_cv_shlib_version=auto
5908                 ;;
5909         rel|abi|auto|no) #(vi
5910                 cf_cv_shlib_version=$withval
5911                 ;;
5912         *)
5913                 { { echo "$as_me:5913: error: option value must be one of: rel, abi, auto or no" >&5
5914 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5915    { (exit 1); exit 1; }; }
5916                 ;;
5917         esac
5918
5919 else
5920   cf_cv_shlib_version=auto
5921 fi;
5922         echo "$as_me:5922: result: $cf_cv_shlib_version" >&5
5923 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5924
5925         cf_cv_rm_so_locs=no
5926         cf_try_cflags=
5927
5928         # Some less-capable ports of gcc support only -fpic
5929         CC_SHARED_OPTS=
5930         if test "$GCC" = yes
5931         then
5932                 echo "$as_me:5932: checking which $CC option to use" >&5
5933 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5934                 cf_save_CFLAGS="$CFLAGS"
5935                 for CC_SHARED_OPTS in -fPIC -fpic ''
5936                 do
5937                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5938                         cat >conftest.$ac_ext <<_ACEOF
5939 #line 5939 "configure"
5940 #include "confdefs.h"
5941 #include <stdio.h>
5942 int
5943 main ()
5944 {
5945 int x = 1
5946   ;
5947   return 0;
5948 }
5949 _ACEOF
5950 rm -f conftest.$ac_objext
5951 if { (eval echo "$as_me:5951: \"$ac_compile\"") >&5
5952   (eval $ac_compile) 2>&5
5953   ac_status=$?
5954   echo "$as_me:5954: \$? = $ac_status" >&5
5955   (exit $ac_status); } &&
5956          { ac_try='test -s conftest.$ac_objext'
5957   { (eval echo "$as_me:5957: \"$ac_try\"") >&5
5958   (eval $ac_try) 2>&5
5959   ac_status=$?
5960   echo "$as_me:5960: \$? = $ac_status" >&5
5961   (exit $ac_status); }; }; then
5962   break
5963 else
5964   echo "$as_me: failed program was:" >&5
5965 cat conftest.$ac_ext >&5
5966 fi
5967 rm -f conftest.$ac_objext conftest.$ac_ext
5968                 done
5969                 echo "$as_me:5969: result: $CC_SHARED_OPTS" >&5
5970 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5971                 CFLAGS="$cf_save_CFLAGS"
5972         fi
5973
5974         cf_cv_shlib_version_infix=no
5975
5976         case $cf_cv_system_name in #(vi
5977         aix4.3-9*|aix[5-7]*) #(vi
5978                 if test "$GCC" = yes; then
5979                         CC_SHARED_OPTS=
5980                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5981                 else
5982                         # CC_SHARED_OPTS='-qpic=large -G'
5983                         # perhaps "-bM:SRE -bnoentry -bexpall"
5984                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5985                 fi
5986                 ;;
5987         beos*) #(vi
5988                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5989                 ;;
5990         cygwin*) #(vi
5991                 CC_SHARED_OPTS=
5992                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5993                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5994                 cf_cv_shlib_version=cygdll
5995                 cf_cv_shlib_version_infix=cygdll
5996                 shlibdir=$bindir
5997                 MAKE_DLLS=
5998                 cat >mk_shared_lib.sh <<-CF_EOF
5999                 #!/bin/sh
6000                 SHARED_LIB=\$1
6001                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6002                 shift
6003                 cat <<-EOF
6004                 Linking shared library
6005                 ** SHARED_LIB \$SHARED_LIB
6006                 ** IMPORT_LIB \$IMPORT_LIB
6007 EOF
6008                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6009 CF_EOF
6010                 chmod +x mk_shared_lib.sh
6011                 ;;
6012         msys*) #(vi
6013                 CC_SHARED_OPTS=
6014                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6015                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6016                 cf_cv_shlib_version=msysdll
6017                 cf_cv_shlib_version_infix=msysdll
6018                 shlibdir=$bindir
6019                 MAKE_DLLS=
6020                 cat >mk_shared_lib.sh <<-CF_EOF
6021                 #!/bin/sh
6022                 SHARED_LIB=\$1
6023                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6024                 shift
6025                 cat <<-EOF
6026                 Linking shared library
6027                 ** SHARED_LIB \$SHARED_LIB
6028                 ** IMPORT_LIB \$IMPORT_LIB
6029 EOF
6030                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6031 CF_EOF
6032                 chmod +x mk_shared_lib.sh
6033                 ;;
6034         darwin*) #(vi
6035                 cf_try_cflags="no-cpp-precomp"
6036                 CC_SHARED_OPTS="-dynamic"
6037                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6038                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6039                 cf_cv_shlib_version_infix=yes
6040                 echo "$as_me:6040: checking if ld -search_paths_first works" >&5
6041 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6042 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6043   echo $ECHO_N "(cached) $ECHO_C" >&6
6044 else
6045
6046                         cf_save_LDFLAGS=$LDFLAGS
6047                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6048                         cat >conftest.$ac_ext <<_ACEOF
6049 #line 6049 "configure"
6050 #include "confdefs.h"
6051
6052 int
6053 main ()
6054 {
6055 int i;
6056   ;
6057   return 0;
6058 }
6059 _ACEOF
6060 rm -f conftest.$ac_objext conftest$ac_exeext
6061 if { (eval echo "$as_me:6061: \"$ac_link\"") >&5
6062   (eval $ac_link) 2>&5
6063   ac_status=$?
6064   echo "$as_me:6064: \$? = $ac_status" >&5
6065   (exit $ac_status); } &&
6066          { ac_try='test -s conftest$ac_exeext'
6067   { (eval echo "$as_me:6067: \"$ac_try\"") >&5
6068   (eval $ac_try) 2>&5
6069   ac_status=$?
6070   echo "$as_me:6070: \$? = $ac_status" >&5
6071   (exit $ac_status); }; }; then
6072   cf_cv_ldflags_search_paths_first=yes
6073 else
6074   echo "$as_me: failed program was:" >&5
6075 cat conftest.$ac_ext >&5
6076 cf_cv_ldflags_search_paths_first=no
6077 fi
6078 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6079                                 LDFLAGS=$cf_save_LDFLAGS
6080 fi
6081 echo "$as_me:6081: result: $cf_cv_ldflags_search_paths_first" >&5
6082 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6083                 if test $cf_cv_ldflags_search_paths_first = yes; then
6084                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6085                 fi
6086                 ;;
6087         hpux[7-8]*) #(vi
6088                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6089                 if test "$GCC" != yes; then
6090                         CC_SHARED_OPTS='+Z'
6091                 fi
6092                 MK_SHARED_LIB='${LD} -b -o $@'
6093                 INSTALL_LIB="-m 555"
6094                 ;;
6095         hpux*) #(vi
6096                 # (tested with gcc 2.7.2 -- I don't have c89)
6097                 if test "$GCC" = yes; then
6098                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6099                 else
6100                         CC_SHARED_OPTS='+Z'
6101                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6102                 fi
6103                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6104                 # HP-UX shared libraries must be executable, and should be
6105                 # readonly to exploit a quirk in the memory manager.
6106                 INSTALL_LIB="-m 555"
6107                 ;;
6108         interix*)
6109                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6110                 if test "$cf_cv_shlib_version" = rel; then
6111                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6112                 else
6113                         cf_shared_soname='`basename `'
6114                 fi
6115                 CC_SHARED_OPTS=
6116                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6117                 ;;
6118         irix*) #(vi
6119                 if test "$cf_cv_enable_rpath" = yes ; then
6120                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6121                 fi
6122                 # tested with IRIX 5.2 and 'cc'.
6123                 if test "$GCC" != yes; then
6124                         CC_SHARED_OPTS='-KPIC'
6125                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6126                 else
6127                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6128                 fi
6129                 cf_cv_rm_so_locs=yes
6130                 ;;
6131         linux*|gnu*|k*bsd*-gnu) #(vi
6132                 if test "$DFT_LWR_MODEL" = "shared" ; then
6133                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6134                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6135                 fi
6136                 if test "$cf_cv_enable_rpath" = yes ; then
6137                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6138                 fi
6139
6140         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6141         if test "$cf_cv_shlib_version" = rel; then
6142                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6143         else
6144                 cf_cv_shared_soname='`basename $@`'
6145         fi
6146
6147                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6148                 ;;
6149         mingw*) #(vi
6150                 cf_cv_shlib_version=mingw
6151                 cf_cv_shlib_version_infix=mingw
6152                 shlibdir=$bindir
6153                 MAKE_DLLS=
6154                 if test "$DFT_LWR_MODEL" = "shared" ; then
6155                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6156                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6157                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6158                 fi
6159                 CC_SHARED_OPTS=
6160                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6161                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6162                 cat >mk_shared_lib.sh <<-CF_EOF
6163                 #!/bin/sh
6164                 SHARED_LIB=\$1
6165                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6166                 shift
6167                 cat <<-EOF
6168                 Linking shared library
6169                 ** SHARED_LIB \$SHARED_LIB
6170                 ** IMPORT_LIB \$IMPORT_LIB
6171 EOF
6172                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6173 CF_EOF
6174                 chmod +x mk_shared_lib.sh
6175                 ;;
6176         openbsd[2-9].*|mirbsd*) #(vi
6177                 if test "$DFT_LWR_MODEL" = "shared" ; then
6178                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6179                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6180                 fi
6181                 if test "$cf_cv_enable_rpath" = yes ; then
6182                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6183                 fi
6184                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6185
6186         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6187         if test "$cf_cv_shlib_version" = rel; then
6188                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6189         else
6190                 cf_cv_shared_soname='`basename $@`'
6191         fi
6192
6193                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6194                 ;;
6195         nto-qnx*|openbsd*|freebsd[12].*) #(vi
6196                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6197                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6198                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6199                 ;;
6200         dragonfly*|freebsd*) #(vi
6201                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6202                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6203                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6204                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6205                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6206                 fi
6207
6208         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6209         if test "$cf_cv_shlib_version" = rel; then
6210                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6211         else
6212                 cf_cv_shared_soname='`basename $@`'
6213         fi
6214
6215                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6216                 ;;
6217         netbsd*) #(vi
6218                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6219                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6220                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6221                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6222                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6223                         if test "$cf_cv_shlib_version" = auto; then
6224                         if test -f /usr/libexec/ld.elf_so; then
6225                                 cf_cv_shlib_version=abi
6226                         else
6227                                 cf_cv_shlib_version=rel
6228                         fi
6229                         fi
6230
6231         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6232         if test "$cf_cv_shlib_version" = rel; then
6233                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6234         else
6235                 cf_cv_shared_soname='`basename $@`'
6236         fi
6237
6238                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6239                 else
6240                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6241                 fi
6242                 ;;
6243         osf*|mls+*) #(vi
6244                 # tested with OSF/1 V3.2 and 'cc'
6245                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6246                 # link with shared libs).
6247                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6248                 case $host_os in #(vi
6249                 osf4*)
6250                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6251                         ;;
6252                 esac
6253                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6254                 if test "$DFT_LWR_MODEL" = "shared" ; then
6255                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6256                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6257                 fi
6258                 cf_cv_rm_so_locs=yes
6259                 ;;
6260         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
6261                 # tested with osr5.0.5
6262                 if test "$GCC" != yes; then
6263                         CC_SHARED_OPTS='-belf -KPIC'
6264                 fi
6265                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6266                 if test "$cf_cv_enable_rpath" = yes ; then
6267                         # only way is to set LD_RUN_PATH but no switch for it
6268                         RUN_PATH=$libdir
6269                 fi
6270                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6271                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6272                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6273                 ;;
6274         sunos4*) #(vi
6275                 # tested with SunOS 4.1.1 and gcc 2.7.0
6276                 if test "$GCC" != yes; then
6277                         CC_SHARED_OPTS='-KPIC'
6278                 fi
6279                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6280                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6281                 ;;
6282         solaris2*) #(vi
6283                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6284                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6285                 if test "$DFT_LWR_MODEL" = "shared" ; then
6286                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6287                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6288                 fi
6289                 if test "$cf_cv_enable_rpath" = yes ; then
6290                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6291                 fi
6292
6293         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6294         if test "$cf_cv_shlib_version" = rel; then
6295                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6296         else
6297                 cf_cv_shared_soname='`basename $@`'
6298         fi
6299
6300                 if test "$GCC" != yes; then
6301                         cf_save_CFLAGS="$CFLAGS"
6302                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6303                         do
6304                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6305                                 cat >conftest.$ac_ext <<_ACEOF
6306 #line 6306 "configure"
6307 #include "confdefs.h"
6308 #include <stdio.h>
6309 int
6310 main ()
6311 {
6312 printf("Hello\n");
6313   ;
6314   return 0;
6315 }
6316 _ACEOF
6317 rm -f conftest.$ac_objext
6318 if { (eval echo "$as_me:6318: \"$ac_compile\"") >&5
6319   (eval $ac_compile) 2>&5
6320   ac_status=$?
6321   echo "$as_me:6321: \$? = $ac_status" >&5
6322   (exit $ac_status); } &&
6323          { ac_try='test -s conftest.$ac_objext'
6324   { (eval echo "$as_me:6324: \"$ac_try\"") >&5
6325   (eval $ac_try) 2>&5
6326   ac_status=$?
6327   echo "$as_me:6327: \$? = $ac_status" >&5
6328   (exit $ac_status); }; }; then
6329   break
6330 else
6331   echo "$as_me: failed program was:" >&5
6332 cat conftest.$ac_ext >&5
6333 fi
6334 rm -f conftest.$ac_objext conftest.$ac_ext
6335                         done
6336                         CFLAGS="$cf_save_CFLAGS"
6337                         CC_SHARED_OPTS=$cf_shared_opts
6338                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6339                 else
6340                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6341                 fi
6342                 ;;
6343         sysv5uw7*|unix_sv*) #(vi
6344                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6345                 if test "$GCC" != yes; then
6346                         CC_SHARED_OPTS='-KPIC'
6347                 fi
6348                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6349                 ;;
6350         *)
6351                 CC_SHARED_OPTS='unknown'
6352                 MK_SHARED_LIB='echo unknown'
6353                 ;;
6354         esac
6355
6356         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6357         case "$cf_cv_shlib_version" in #(vi
6358         rel|abi)
6359                 case "$MK_SHARED_LIB" in #(vi
6360                 *'-o $@') #(vi
6361                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6362                         ;;
6363                 *)
6364                         { echo "$as_me:6364: WARNING: ignored --with-shlib-version" >&5
6365 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6366                         ;;
6367                 esac
6368                 ;;
6369         esac
6370
6371         if test -n "$cf_try_cflags"
6372         then
6373 cat > conftest.$ac_ext <<EOF
6374 #line 6374 "${as_me:-configure}"
6375 #include <stdio.h>
6376 int main(int argc, char *argv[])
6377 {
6378         printf("hello\n");
6379         return (argv[argc-1] == 0) ;
6380 }
6381 EOF
6382                 cf_save_CFLAGS="$CFLAGS"
6383                 for cf_opt in $cf_try_cflags
6384                 do
6385                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6386                         echo "$as_me:6386: checking if CFLAGS option -$cf_opt works" >&5
6387 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6388                         if { (eval echo "$as_me:6388: \"$ac_compile\"") >&5
6389   (eval $ac_compile) 2>&5
6390   ac_status=$?
6391   echo "$as_me:6391: \$? = $ac_status" >&5
6392   (exit $ac_status); }; then
6393                                 echo "$as_me:6393: result: yes" >&5
6394 echo "${ECHO_T}yes" >&6
6395                                 cf_save_CFLAGS="$CFLAGS"
6396                         else
6397                                 echo "$as_me:6397: result: no" >&5
6398 echo "${ECHO_T}no" >&6
6399                         fi
6400                 done
6401                 CFLAGS="$cf_save_CFLAGS"
6402         fi
6403
6404         # RPATH_LIST is a colon-separated list of directories
6405         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6406         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6407
6408         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6409
6410         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6411
6412 echo "${as_me:-configure}:6412: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6413
6414         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6415
6416 echo "${as_me:-configure}:6416: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6417
6418 for model in $cf_list_models; do
6419         case $model in #(vi
6420         libtool)
6421
6422 echo "$as_me:6422: checking for additional libtool options" >&5
6423 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6424
6425 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6426 if test "${with_libtool_opts+set}" = set; then
6427   withval="$with_libtool_opts"
6428   with_libtool_opts=$withval
6429 else
6430   with_libtool_opts=no
6431 fi;
6432 echo "$as_me:6432: result: $with_libtool_opts" >&5
6433 echo "${ECHO_T}$with_libtool_opts" >&6
6434
6435 case .$with_libtool_opts in
6436 .yes|.no|.)
6437         ;;
6438 *)
6439         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6440         ;;
6441 esac
6442
6443 echo "$as_me:6443: checking if exported-symbols file should be used" >&5
6444 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6445
6446 # Check whether --with-export-syms or --without-export-syms was given.
6447 if test "${with_export_syms+set}" = set; then
6448   withval="$with_export_syms"
6449   with_export_syms=$withval
6450 else
6451   with_export_syms=no
6452 fi;
6453 if test "x$with_export_syms" = xyes
6454 then
6455         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6456
6457 fi
6458 echo "$as_me:6458: result: $with_export_syms" >&5
6459 echo "${ECHO_T}$with_export_syms" >&6
6460 if test "x$with_export_syms" != xno
6461 then
6462         EXPORT_SYMS="-export-symbols $with_export_syms"
6463
6464 fi
6465
6466                 ;;
6467         shared) #(vi
6468                 if test "$CC_SHARED_OPTS" = "unknown"; then
6469                         { { echo "$as_me:6469: error: Shared libraries are not supported in this version" >&5
6470 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6471    { (exit 1); exit 1; }; }
6472                 fi
6473
6474 echo "$as_me:6474: checking if versioned-symbols file should be used" >&5
6475 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6476
6477 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6478 if test "${with_versioned_syms+set}" = set; then
6479   withval="$with_versioned_syms"
6480   with_versioned_syms=$withval
6481 else
6482   with_versioned_syms=no
6483 fi;
6484 if test "x$with_versioned_syms" = xyes
6485 then
6486         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6487
6488 fi
6489 echo "$as_me:6489: result: $with_versioned_syms" >&5
6490 echo "${ECHO_T}$with_versioned_syms" >&6
6491
6492 RESULTING_SYMS=
6493 VERSIONED_SYMS=
6494 WILDCARD_SYMS=
6495
6496 if test "x$with_versioned_syms" != xno
6497 then
6498         RESULTING_SYMS=$with_versioned_syms
6499         case "x$MK_SHARED_LIB" in
6500         *-Wl,*) #(vi
6501                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6502                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6503                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6504
6505 echo "${as_me:-configure}:6505: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6506
6507                 ;;
6508         *-dy\ *) #(vi
6509                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6510                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6511                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6512
6513 echo "${as_me:-configure}:6513: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6514
6515                 ;;
6516         *)
6517                 { echo "$as_me:6517: WARNING: this system does not support versioned-symbols" >&5
6518 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6519                 ;;
6520         esac
6521
6522         # Linux ld can selectively override scope, e.g., of symbols beginning with
6523         # "_" by first declaring some as global, and then using a wildcard to
6524         # declare the others as local.  Some other loaders cannot do this.  Check
6525         # by constructing a (very) simple shared library and inspecting its
6526         # symbols.
6527         if test "x$VERSIONED_SYMS" != "x"
6528         then
6529                 echo "$as_me:6529: checking if wildcards can be used to selectively omit symbols" >&5
6530 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6531                 WILDCARD_SYMS=no
6532
6533                 # make sources
6534                 rm -f conftest.*
6535
6536                 cat >conftest.ver <<EOF
6537 module_1.0 {
6538 global:
6539         globalf1;
6540 local:
6541         localf1;
6542 };
6543 module_2.0 {
6544 global:
6545         globalf2;
6546 local:
6547         localf2;
6548         _*;
6549 } module_1.0;
6550 submodule_1.0 {
6551 global:
6552         subglobalf1;
6553         _ismissing;
6554 local:
6555         sublocalf1;
6556 };
6557 submodule_2.0 {
6558 global:
6559         subglobalf2;
6560 local:
6561         sublocalf2;
6562         _*;
6563 } submodule_1.0;
6564 EOF
6565                 cat >conftest.$ac_ext <<EOF
6566 #line 6566 "configure"
6567 int     _ismissing(void) { return 1; }
6568 int     _localf1(void) { return 1; }
6569 int     _localf2(void) { return 2; }
6570 int     globalf1(void) { return 1; }
6571 int     globalf2(void) { return 2; }
6572 int     _sublocalf1(void) { return 1; }
6573 int     _sublocalf2(void) { return 2; }
6574 int     subglobalf1(void) { return 1; }
6575 int     subglobalf2(void) { return 2; }
6576 EOF
6577                 cat >conftest.mk <<EOF
6578 CC=${CC}
6579 CFLAGS=${CFLAGS}
6580 CPPFLAGS=${CPPFLAGS}
6581 LDFLAGS=${LDFLAGS}
6582 LIBS=${LIBS}
6583 VERSIONED_SYMS=${VERSIONED_SYMS}
6584 RESULTING_SYMS=conftest.ver
6585 MK_SHARED_LIB=${MK_SHARED_LIB}
6586 conftest.so: conftest.$ac_cv_objext
6587                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6588 EOF
6589
6590                 # compile source, make library
6591                 if make -f conftest.mk 2>&5 >/dev/null
6592                 then
6593                         # test for missing symbol
6594                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ]T[     ]'`
6595                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6596                 fi
6597                 echo "$as_me:6597: result: $WILDCARD_SYMS" >&5
6598 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6599                 rm -f conftest.*
6600         fi
6601 fi
6602
6603                 ;;
6604         esac
6605 done
6606
6607 # pretend that ncurses==ncursesw==ncursest
6608 echo "$as_me:6608: checking if you want to disable library suffixes" >&5
6609 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6610
6611 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6612 if test "${enable_lib_suffixes+set}" = set; then
6613   enableval="$enable_lib_suffixes"
6614   disable_lib_suffixes=$enableval
6615 else
6616   disable_lib_suffixes=no
6617 fi;
6618 echo "$as_me:6618: result: $disable_lib_suffixes" >&5
6619 echo "${ECHO_T}$disable_lib_suffixes" >&6
6620
6621 ### If we're building with rpath, try to link non-standard libs that way too.
6622 if test "$DFT_LWR_MODEL" = "shared"; then
6623
6624 echo "$as_me:6624: checking if rpath-hack should be disabled" >&5
6625 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6626
6627 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6628 if test "${enable_rpath_hack+set}" = set; then
6629   enableval="$enable_rpath_hack"
6630   test "$enableval" != no && enableval=yes
6631   if test "$enableval" != "yes" ; then
6632     cf_disable_rpath_hack=yes
6633   else
6634     cf_disable_rpath_hack=no
6635   fi
6636 else
6637   enableval=yes
6638   cf_disable_rpath_hack=no
6639
6640 fi;
6641 echo "$as_me:6641: result: $cf_disable_rpath_hack" >&5
6642 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6643 if test "$cf_disable_rpath_hack" = no ; then
6644
6645 echo "$as_me:6645: checking for updated LDFLAGS" >&5
6646 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6647 if test -n "$LD_RPATH_OPT" ; then
6648         echo "$as_me:6648: result: maybe" >&5
6649 echo "${ECHO_T}maybe" >&6
6650
6651         for ac_prog in ldd
6652 do
6653   # Extract the first word of "$ac_prog", so it can be a program name with args.
6654 set dummy $ac_prog; ac_word=$2
6655 echo "$as_me:6655: checking for $ac_word" >&5
6656 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6657 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6658   echo $ECHO_N "(cached) $ECHO_C" >&6
6659 else
6660   if test -n "$cf_ldd_prog"; then
6661   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6662 else
6663   ac_save_IFS=$IFS; IFS=$ac_path_separator
6664 ac_dummy="$PATH"
6665 for ac_dir in $ac_dummy; do
6666   IFS=$ac_save_IFS
6667   test -z "$ac_dir" && ac_dir=.
6668   $as_executable_p "$ac_dir/$ac_word" || continue
6669 ac_cv_prog_cf_ldd_prog="$ac_prog"
6670 echo "$as_me:6670: found $ac_dir/$ac_word" >&5
6671 break
6672 done
6673
6674 fi
6675 fi
6676 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6677 if test -n "$cf_ldd_prog"; then
6678   echo "$as_me:6678: result: $cf_ldd_prog" >&5
6679 echo "${ECHO_T}$cf_ldd_prog" >&6
6680 else
6681   echo "$as_me:6681: result: no" >&5
6682 echo "${ECHO_T}no" >&6
6683 fi
6684
6685   test -n "$cf_ldd_prog" && break
6686 done
6687 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6688
6689         cf_rpath_list="/usr/lib /lib"
6690         if test "$cf_ldd_prog" != no
6691         then
6692                 cf_rpath_oops=
6693
6694 cat >conftest.$ac_ext <<_ACEOF
6695 #line 6695 "configure"
6696 #include "confdefs.h"
6697 #include <stdio.h>
6698 int
6699 main ()
6700 {
6701 printf("Hello");
6702   ;
6703   return 0;
6704 }
6705 _ACEOF
6706 rm -f conftest.$ac_objext conftest$ac_exeext
6707 if { (eval echo "$as_me:6707: \"$ac_link\"") >&5
6708   (eval $ac_link) 2>&5
6709   ac_status=$?
6710   echo "$as_me:6710: \$? = $ac_status" >&5
6711   (exit $ac_status); } &&
6712          { ac_try='test -s conftest$ac_exeext'
6713   { (eval echo "$as_me:6713: \"$ac_try\"") >&5
6714   (eval $ac_try) 2>&5
6715   ac_status=$?
6716   echo "$as_me:6716: \$? = $ac_status" >&5
6717   (exit $ac_status); }; }; then
6718   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6719                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6720 else
6721   echo "$as_me: failed program was:" >&5
6722 cat conftest.$ac_ext >&5
6723 fi
6724 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6725
6726                 # If we passed the link-test, but get a "not found" on a given library,
6727                 # this could be due to inept reconfiguration of gcc to make it only
6728                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6729                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6730                 # /usr/local libraries.
6731                 if test -n "$cf_rpath_oops"
6732                 then
6733                         for cf_rpath_src in $cf_rpath_oops
6734                         do
6735                                 for cf_rpath_dir in \
6736                                         /usr/local \
6737                                         /usr/pkg \
6738                                         /opt/sfw
6739                                 do
6740                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6741                                         then
6742                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6743
6744 echo "${as_me:-configure}:6744: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6745
6746                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6747                                                 break
6748                                         fi
6749                                 done
6750                         done
6751                 fi
6752         fi
6753
6754         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6755
6756 echo "${as_me:-configure}:6756: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6757
6758 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6759
6760 echo "${as_me:-configure}:6760: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6761
6762 cf_rpath_dst=
6763 for cf_rpath_src in $LDFLAGS
6764 do
6765         case $cf_rpath_src in #(vi
6766         -L*) #(vi
6767
6768                 # check if this refers to a directory which we will ignore
6769                 cf_rpath_skip=no
6770                 if test -n "$cf_rpath_list"
6771                 then
6772                         for cf_rpath_item in $cf_rpath_list
6773                         do
6774                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6775                                 then
6776                                         cf_rpath_skip=yes
6777                                         break
6778                                 fi
6779                         done
6780                 fi
6781
6782                 if test "$cf_rpath_skip" = no
6783                 then
6784                         # transform the option
6785                         if test "$LD_RPATH_OPT" = "-R " ; then
6786                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6787                         else
6788                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6789                         fi
6790
6791                         # if we have not already added this, add it now
6792                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6793                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6794                         then
6795                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6796
6797 echo "${as_me:-configure}:6797: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6798
6799                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6800                         fi
6801                 fi
6802                 ;;
6803         esac
6804         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6805 done
6806 LDFLAGS=$cf_rpath_dst
6807
6808 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6809
6810 echo "${as_me:-configure}:6810: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6811
6812 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6813
6814 echo "${as_me:-configure}:6814: testing ...checking LIBS $LIBS ..." 1>&5
6815
6816 cf_rpath_dst=
6817 for cf_rpath_src in $LIBS
6818 do
6819         case $cf_rpath_src in #(vi
6820         -L*) #(vi
6821
6822                 # check if this refers to a directory which we will ignore
6823                 cf_rpath_skip=no
6824                 if test -n "$cf_rpath_list"
6825                 then
6826                         for cf_rpath_item in $cf_rpath_list
6827                         do
6828                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6829                                 then
6830                                         cf_rpath_skip=yes
6831                                         break
6832                                 fi
6833                         done
6834                 fi
6835
6836                 if test "$cf_rpath_skip" = no
6837                 then
6838                         # transform the option
6839                         if test "$LD_RPATH_OPT" = "-R " ; then
6840                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6841                         else
6842                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6843                         fi
6844
6845                         # if we have not already added this, add it now
6846                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6847                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6848                         then
6849                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6850
6851 echo "${as_me:-configure}:6851: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6852
6853                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6854                         fi
6855                 fi
6856                 ;;
6857         esac
6858         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6859 done
6860 LIBS=$cf_rpath_dst
6861
6862 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6863
6864 echo "${as_me:-configure}:6864: testing ...checked LIBS $LIBS ..." 1>&5
6865
6866         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6867
6868 echo "${as_me:-configure}:6868: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6869
6870 else
6871         echo "$as_me:6871: result: no" >&5
6872 echo "${ECHO_T}no" >&6
6873 fi
6874
6875 fi
6876
6877 fi
6878
6879 ###############################################################################
6880
6881 ###     use option --disable-overwrite to leave out the link to -lcurses
6882 echo "$as_me:6882: checking if you wish to install ncurses overwriting curses" >&5
6883 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6884
6885 # Check whether --enable-overwrite or --disable-overwrite was given.
6886 if test "${enable_overwrite+set}" = set; then
6887   enableval="$enable_overwrite"
6888   with_overwrite=$enableval
6889 else
6890   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6891 fi;
6892 echo "$as_me:6892: result: $with_overwrite" >&5
6893 echo "${ECHO_T}$with_overwrite" >&6
6894
6895 echo "$as_me:6895: checking if external terminfo-database is used" >&5
6896 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6897
6898 # Check whether --enable-database or --disable-database was given.
6899 if test "${enable_database+set}" = set; then
6900   enableval="$enable_database"
6901   use_database=$enableval
6902 else
6903   use_database=yes
6904 fi;
6905 echo "$as_me:6905: result: $use_database" >&5
6906 echo "${ECHO_T}$use_database" >&6
6907
6908 case $host_os in #(vi
6909 os2*) #(vi
6910         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6911         ;;
6912 *) #(vi
6913         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6914         ;;
6915 esac
6916
6917 NCURSES_USE_DATABASE=0
6918 if test "$use_database" != no ; then
6919         NCURSES_USE_DATABASE=1
6920
6921         echo "$as_me:6921: checking which terminfo source-file will be installed" >&5
6922 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6923
6924 # Check whether --with-database or --without-database was given.
6925 if test "${with_database+set}" = set; then
6926   withval="$with_database"
6927   TERMINFO_SRC=$withval
6928 fi;
6929         echo "$as_me:6929: result: $TERMINFO_SRC" >&5
6930 echo "${ECHO_T}$TERMINFO_SRC" >&6
6931
6932         echo "$as_me:6932: checking whether to use hashed database instead of directory/tree" >&5
6933 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6934
6935 # Check whether --with-hashed-db or --without-hashed-db was given.
6936 if test "${with_hashed_db+set}" = set; then
6937   withval="$with_hashed_db"
6938
6939 else
6940   with_hashed_db=no
6941 fi;
6942         echo "$as_me:6942: result: $with_hashed_db" >&5
6943 echo "${ECHO_T}$with_hashed_db" >&6
6944 else
6945         with_hashed_db=no
6946 fi
6947
6948 echo "$as_me:6948: checking for list of fallback descriptions" >&5
6949 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6950
6951 # Check whether --with-fallbacks or --without-fallbacks was given.
6952 if test "${with_fallbacks+set}" = set; then
6953   withval="$with_fallbacks"
6954   with_fallback=$withval
6955 else
6956   with_fallback=
6957 fi;
6958 echo "$as_me:6958: result: $with_fallback" >&5
6959 echo "${ECHO_T}$with_fallback" >&6
6960 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6961
6962 echo "$as_me:6962: checking if you want modern xterm or antique" >&5
6963 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6964
6965 # Check whether --with-xterm-new or --without-xterm-new was given.
6966 if test "${with_xterm_new+set}" = set; then
6967   withval="$with_xterm_new"
6968   with_xterm_new=$withval
6969 else
6970   with_xterm_new=yes
6971 fi;
6972 case $with_xterm_new in
6973 no)     with_xterm_new=xterm-old;;
6974 *)      with_xterm_new=xterm-new;;
6975 esac
6976 echo "$as_me:6976: result: $with_xterm_new" >&5
6977 echo "${ECHO_T}$with_xterm_new" >&6
6978 WHICH_XTERM=$with_xterm_new
6979
6980 echo "$as_me:6980: checking if xterm backspace sends BS or DEL" >&5
6981 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6982
6983 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6984 if test "${with_xterm_kbs+set}" = set; then
6985   withval="$with_xterm_kbs"
6986   with_xterm_kbs=$withval
6987 else
6988   with_xterm_kbs=BS
6989 fi;
6990 case x$with_xterm_kbs in
6991 xyes|xno|xBS|xbs|x8)
6992         with_xterm_kbs=BS
6993         ;;
6994 xDEL|xdel|x127)
6995         with_xterm_kbs=DEL
6996         ;;
6997 *)
6998         with_xterm_kbs=$withval
6999         ;;
7000 esac
7001 echo "$as_me:7001: result: $with_xterm_kbs" >&5
7002 echo "${ECHO_T}$with_xterm_kbs" >&6
7003 XTERM_KBS=$with_xterm_kbs
7004
7005 MAKE_TERMINFO=
7006 if test "$use_database" = no ; then
7007         TERMINFO="${datadir}/terminfo"
7008         MAKE_TERMINFO="#"
7009 else
7010
7011 echo "$as_me:7011: checking for list of terminfo directories" >&5
7012 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7013
7014 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7015 if test "${with_terminfo_dirs+set}" = set; then
7016   withval="$with_terminfo_dirs"
7017
7018 else
7019   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7020 fi;
7021 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7022 cf_dst_path=
7023 for cf_src_path in $withval
7024 do
7025
7026 if test "x$prefix" != xNONE; then
7027   cf_path_syntax="$prefix"
7028 else
7029   cf_path_syntax="$ac_default_prefix"
7030 fi
7031
7032 case ".$cf_src_path" in #(vi
7033 .\$\(*\)*|.\'*\'*) #(vi
7034   ;;
7035 ..|./*|.\\*) #(vi
7036   ;;
7037 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
7038   ;;
7039 .\${*prefix}*|.\${*dir}*) #(vi
7040   eval cf_src_path="$cf_src_path"
7041   case ".$cf_src_path" in #(vi
7042   .NONE/*)
7043     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7044     ;;
7045   esac
7046   ;; #(vi
7047 .no|.NONE/*)
7048   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7049   ;;
7050 *)
7051   { { echo "$as_me:7051: error: expected a pathname, not \"$cf_src_path\"" >&5
7052 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7053    { (exit 1); exit 1; }; }
7054   ;;
7055 esac
7056
7057   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7058   cf_dst_path="${cf_dst_path}${cf_src_path}"
7059 done
7060 IFS="$ac_save_ifs"
7061
7062 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7063 # so we have to check/work around.  We do prefer the result of "eval"...
7064 eval cf_dst_eval="$cf_dst_path"
7065 case "x$cf_dst_eval" in #(vi
7066 xNONE*) #(vi
7067         TERMINFO_DIRS=$cf_dst_path
7068         ;;
7069 *)
7070         TERMINFO_DIRS="$cf_dst_eval"
7071         ;;
7072 esac
7073
7074 echo "$as_me:7074: result: $TERMINFO_DIRS" >&5
7075 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7076 test -n "$TERMINFO_DIRS" &&
7077 cat >>confdefs.h <<EOF
7078 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7079 EOF
7080
7081 echo "$as_me:7081: checking for default terminfo directory" >&5
7082 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7083
7084 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7085 if test "${with_default_terminfo_dir+set}" = set; then
7086   withval="$with_default_terminfo_dir"
7087
7088 else
7089   withval="${TERMINFO:-${datadir}/terminfo}"
7090 fi; if test -n "${datadir}/terminfo" ; then
7091
7092 if test "x$prefix" != xNONE; then
7093   cf_path_syntax="$prefix"
7094 else
7095   cf_path_syntax="$ac_default_prefix"
7096 fi
7097
7098 case ".$withval" in #(vi
7099 .\$\(*\)*|.\'*\'*) #(vi
7100   ;;
7101 ..|./*|.\\*) #(vi
7102   ;;
7103 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
7104   ;;
7105 .\${*prefix}*|.\${*dir}*) #(vi
7106   eval withval="$withval"
7107   case ".$withval" in #(vi
7108   .NONE/*)
7109     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7110     ;;
7111   esac
7112   ;; #(vi
7113 .no|.NONE/*)
7114   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7115   ;;
7116 *)
7117   { { echo "$as_me:7117: error: expected a pathname, not \"$withval\"" >&5
7118 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7119    { (exit 1); exit 1; }; }
7120   ;;
7121 esac
7122
7123 fi
7124 eval TERMINFO="$withval"
7125
7126 echo "$as_me:7126: result: $TERMINFO" >&5
7127 echo "${ECHO_T}$TERMINFO" >&6
7128
7129 cat >>confdefs.h <<EOF
7130 #define TERMINFO "$TERMINFO"
7131 EOF
7132
7133 fi
7134
7135 ###     use option --disable-big-core to make tic run on small machines
7136 ###     We need 4Mb, check if we can allocate 50% more than that.
7137 echo "$as_me:7137: checking if big-core option selected" >&5
7138 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7139
7140 # Check whether --enable-big-core or --disable-big-core was given.
7141 if test "${enable_big_core+set}" = set; then
7142   enableval="$enable_big_core"
7143   with_big_core=$enableval
7144 else
7145   if test "$cross_compiling" = yes; then
7146   with_big_core=no
7147 else
7148   cat >conftest.$ac_ext <<_ACEOF
7149 #line 7149 "configure"
7150 #include "confdefs.h"
7151
7152 #include <stdlib.h>
7153 #include <string.h>
7154 int main() {
7155         unsigned long n = 6000000L;
7156         char *s = malloc(n);
7157         if (s != 0)
7158                 s[0] = s[n-1] = 0;
7159         ${cf_cv_main_return:-return}(s == 0);
7160 }
7161 _ACEOF
7162 rm -f conftest$ac_exeext
7163 if { (eval echo "$as_me:7163: \"$ac_link\"") >&5
7164   (eval $ac_link) 2>&5
7165   ac_status=$?
7166   echo "$as_me:7166: \$? = $ac_status" >&5
7167   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7168   { (eval echo "$as_me:7168: \"$ac_try\"") >&5
7169   (eval $ac_try) 2>&5
7170   ac_status=$?
7171   echo "$as_me:7171: \$? = $ac_status" >&5
7172   (exit $ac_status); }; }; then
7173   with_big_core=yes
7174 else
7175   echo "$as_me: program exited with status $ac_status" >&5
7176 echo "$as_me: failed program was:" >&5
7177 cat conftest.$ac_ext >&5
7178 with_big_core=no
7179 fi
7180 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7181 fi
7182 fi;
7183 echo "$as_me:7183: result: $with_big_core" >&5
7184 echo "${ECHO_T}$with_big_core" >&6
7185 test "x$with_big_core" = "xyes" &&
7186 cat >>confdefs.h <<\EOF
7187 #define HAVE_BIG_CORE 1
7188 EOF
7189
7190 ### ISO C only guarantees 512-char strings, we have tables which load faster
7191 ### when constructed using "big" strings.  More than the C compiler, the awk
7192 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7193 echo "$as_me:7193: checking if big-strings option selected" >&5
7194 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7195
7196 # Check whether --enable-big-strings or --disable-big-strings was given.
7197 if test "${enable_big_strings+set}" = set; then
7198   enableval="$enable_big_strings"
7199   with_big_strings=$enableval
7200 else
7201
7202         case x$AWK in #(vi
7203         x)
7204                 eval with_big_strings=no
7205                 ;;
7206         *) #(vi
7207                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7208                         | $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
7209                         eval with_big_strings=yes
7210                 else
7211                         eval with_big_strings=no
7212                 fi
7213                 ;;
7214         esac
7215
7216 fi;
7217 echo "$as_me:7217: result: $with_big_strings" >&5
7218 echo "${ECHO_T}$with_big_strings" >&6
7219
7220 USE_BIG_STRINGS=0
7221 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7222
7223 ###     use option --enable-termcap to compile in the termcap fallback support
7224 echo "$as_me:7224: checking if you want termcap-fallback support" >&5
7225 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7226
7227 # Check whether --enable-termcap or --disable-termcap was given.
7228 if test "${enable_termcap+set}" = set; then
7229   enableval="$enable_termcap"
7230   with_termcap=$enableval
7231 else
7232   with_termcap=no
7233 fi;
7234 echo "$as_me:7234: result: $with_termcap" >&5
7235 echo "${ECHO_T}$with_termcap" >&6
7236
7237 NCURSES_USE_TERMCAP=0
7238 if test "x$with_termcap" != "xyes" ; then
7239         if test "$use_database" = no ; then
7240                 if test -z "$with_fallback" ; then
7241                         { { echo "$as_me:7241: error: You have disabled the database w/o specifying fallbacks" >&5
7242 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7243    { (exit 1); exit 1; }; }
7244                 fi
7245         fi
7246
7247 cat >>confdefs.h <<\EOF
7248 #define PURE_TERMINFO 1
7249 EOF
7250
7251 else
7252
7253         if test "$with_ticlib" != no ; then
7254                 { { echo "$as_me:7254: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7255 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7256    { (exit 1); exit 1; }; }
7257         fi
7258
7259         NCURSES_USE_TERMCAP=1
7260         echo "$as_me:7260: checking for list of termcap files" >&5
7261 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7262
7263 # Check whether --with-termpath or --without-termpath was given.
7264 if test "${with_termpath+set}" = set; then
7265   withval="$with_termpath"
7266
7267 else
7268   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7269 fi;
7270 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7271 cf_dst_path=
7272 for cf_src_path in $withval
7273 do
7274
7275 if test "x$prefix" != xNONE; then
7276   cf_path_syntax="$prefix"
7277 else
7278   cf_path_syntax="$ac_default_prefix"
7279 fi
7280
7281 case ".$cf_src_path" in #(vi
7282 .\$\(*\)*|.\'*\'*) #(vi
7283   ;;
7284 ..|./*|.\\*) #(vi
7285   ;;
7286 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
7287   ;;
7288 .\${*prefix}*|.\${*dir}*) #(vi
7289   eval cf_src_path="$cf_src_path"
7290   case ".$cf_src_path" in #(vi
7291   .NONE/*)
7292     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7293     ;;
7294   esac
7295   ;; #(vi
7296 .no|.NONE/*)
7297   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7298   ;;
7299 *)
7300   { { echo "$as_me:7300: error: expected a pathname, not \"$cf_src_path\"" >&5
7301 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7302    { (exit 1); exit 1; }; }
7303   ;;
7304 esac
7305
7306   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7307   cf_dst_path="${cf_dst_path}${cf_src_path}"
7308 done
7309 IFS="$ac_save_ifs"
7310
7311 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7312 # so we have to check/work around.  We do prefer the result of "eval"...
7313 eval cf_dst_eval="$cf_dst_path"
7314 case "x$cf_dst_eval" in #(vi
7315 xNONE*) #(vi
7316         TERMPATH=$cf_dst_path
7317         ;;
7318 *)
7319         TERMPATH="$cf_dst_eval"
7320         ;;
7321 esac
7322
7323         echo "$as_me:7323: result: $TERMPATH" >&5
7324 echo "${ECHO_T}$TERMPATH" >&6
7325         test -n "$TERMPATH" &&
7326 cat >>confdefs.h <<EOF
7327 #define TERMPATH "$TERMPATH"
7328 EOF
7329
7330         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7331         echo "$as_me:7331: checking if fast termcap-loader is needed" >&5
7332 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7333
7334 # Check whether --enable-getcap or --disable-getcap was given.
7335 if test "${enable_getcap+set}" = set; then
7336   enableval="$enable_getcap"
7337   with_getcap=$enableval
7338 else
7339   with_getcap=no
7340 fi;
7341         echo "$as_me:7341: result: $with_getcap" >&5
7342 echo "${ECHO_T}$with_getcap" >&6
7343         test "x$with_getcap" = "xyes" &&
7344 cat >>confdefs.h <<\EOF
7345 #define USE_GETCAP 1
7346 EOF
7347
7348         echo "$as_me:7348: checking if translated termcaps will be cached in ~/.terminfo" >&5
7349 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7350
7351 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7352 if test "${enable_getcap_cache+set}" = set; then
7353   enableval="$enable_getcap_cache"
7354   with_getcap_cache=$enableval
7355 else
7356   with_getcap_cache=no
7357 fi;
7358         echo "$as_me:7358: result: $with_getcap_cache" >&5
7359 echo "${ECHO_T}$with_getcap_cache" >&6
7360         test "x$with_getcap_cache" = "xyes" &&
7361 cat >>confdefs.h <<\EOF
7362 #define USE_GETCAP_CACHE 1
7363 EOF
7364
7365 fi
7366
7367 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7368 echo "$as_me:7368: checking if ~/.terminfo is wanted" >&5
7369 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7370
7371 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7372 if test "${enable_home_terminfo+set}" = set; then
7373   enableval="$enable_home_terminfo"
7374   with_home_terminfo=$enableval
7375 else
7376   with_home_terminfo=yes
7377 fi;
7378 echo "$as_me:7378: result: $with_home_terminfo" >&5
7379 echo "${ECHO_T}$with_home_terminfo" >&6
7380 test "x$with_home_terminfo" = "xyes" &&
7381 cat >>confdefs.h <<\EOF
7382 #define USE_HOME_TERMINFO 1
7383 EOF
7384
7385 echo "$as_me:7385: checking if you want to use restricted environment when running as root" >&5
7386 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7387
7388 # Check whether --enable-root-environ or --disable-root-environ was given.
7389 if test "${enable_root_environ+set}" = set; then
7390   enableval="$enable_root_environ"
7391   with_root_environ=$enableval
7392 else
7393   with_root_environ=yes
7394 fi;
7395 echo "$as_me:7395: result: $with_root_environ" >&5
7396 echo "${ECHO_T}$with_root_environ" >&6
7397 test "x$with_root_environ" = xyes &&
7398 cat >>confdefs.h <<\EOF
7399 #define USE_ROOT_ENVIRON 1
7400 EOF
7401
7402 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7403 ###   to reduce storage requirements for the terminfo database.
7404
7405 for ac_func in \
7406         remove \
7407         unlink
7408 do
7409 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7410 echo "$as_me:7410: checking for $ac_func" >&5
7411 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7412 if eval "test \"\${$as_ac_var+set}\" = set"; then
7413   echo $ECHO_N "(cached) $ECHO_C" >&6
7414 else
7415   cat >conftest.$ac_ext <<_ACEOF
7416 #line 7416 "configure"
7417 #include "confdefs.h"
7418 /* System header to define __stub macros and hopefully few prototypes,
7419     which can conflict with char $ac_func (); below.  */
7420 #include <assert.h>
7421 /* Override any gcc2 internal prototype to avoid an error.  */
7422 #ifdef __cplusplus
7423 extern "C"
7424 #endif
7425 /* We use char because int might match the return type of a gcc2
7426    builtin and then its argument prototype would still apply.  */
7427 char $ac_func ();
7428 char (*f) ();
7429
7430 int
7431 main ()
7432 {
7433 /* The GNU C library defines this for functions which it implements
7434     to always fail with ENOSYS.  Some functions are actually named
7435     something starting with __ and the normal name is an alias.  */
7436 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7437 choke me
7438 #else
7439 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7440 #endif
7441
7442   ;
7443   return 0;
7444 }
7445 _ACEOF
7446 rm -f conftest.$ac_objext conftest$ac_exeext
7447 if { (eval echo "$as_me:7447: \"$ac_link\"") >&5
7448   (eval $ac_link) 2>&5
7449   ac_status=$?
7450   echo "$as_me:7450: \$? = $ac_status" >&5
7451   (exit $ac_status); } &&
7452          { ac_try='test -s conftest$ac_exeext'
7453   { (eval echo "$as_me:7453: \"$ac_try\"") >&5
7454   (eval $ac_try) 2>&5
7455   ac_status=$?
7456   echo "$as_me:7456: \$? = $ac_status" >&5
7457   (exit $ac_status); }; }; then
7458   eval "$as_ac_var=yes"
7459 else
7460   echo "$as_me: failed program was:" >&5
7461 cat conftest.$ac_ext >&5
7462 eval "$as_ac_var=no"
7463 fi
7464 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7465 fi
7466 echo "$as_me:7466: result: `eval echo '${'$as_ac_var'}'`" >&5
7467 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7468 if test `eval echo '${'$as_ac_var'}'` = yes; then
7469   cat >>confdefs.h <<EOF
7470 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7471 EOF
7472
7473 fi
7474 done
7475
7476 if test "$cross_compiling" = yes ; then
7477
7478 for ac_func in \
7479                 link \
7480                 symlink
7481 do
7482 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7483 echo "$as_me:7483: checking for $ac_func" >&5
7484 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7485 if eval "test \"\${$as_ac_var+set}\" = set"; then
7486   echo $ECHO_N "(cached) $ECHO_C" >&6
7487 else
7488   cat >conftest.$ac_ext <<_ACEOF
7489 #line 7489 "configure"
7490 #include "confdefs.h"
7491 /* System header to define __stub macros and hopefully few prototypes,
7492     which can conflict with char $ac_func (); below.  */
7493 #include <assert.h>
7494 /* Override any gcc2 internal prototype to avoid an error.  */
7495 #ifdef __cplusplus
7496 extern "C"
7497 #endif
7498 /* We use char because int might match the return type of a gcc2
7499    builtin and then its argument prototype would still apply.  */
7500 char $ac_func ();
7501 char (*f) ();
7502
7503 int
7504 main ()
7505 {
7506 /* The GNU C library defines this for functions which it implements
7507     to always fail with ENOSYS.  Some functions are actually named
7508     something starting with __ and the normal name is an alias.  */
7509 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7510 choke me
7511 #else
7512 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7513 #endif
7514
7515   ;
7516   return 0;
7517 }
7518 _ACEOF
7519 rm -f conftest.$ac_objext conftest$ac_exeext
7520 if { (eval echo "$as_me:7520: \"$ac_link\"") >&5
7521   (eval $ac_link) 2>&5
7522   ac_status=$?
7523   echo "$as_me:7523: \$? = $ac_status" >&5
7524   (exit $ac_status); } &&
7525          { ac_try='test -s conftest$ac_exeext'
7526   { (eval echo "$as_me:7526: \"$ac_try\"") >&5
7527   (eval $ac_try) 2>&5
7528   ac_status=$?
7529   echo "$as_me:7529: \$? = $ac_status" >&5
7530   (exit $ac_status); }; }; then
7531   eval "$as_ac_var=yes"
7532 else
7533   echo "$as_me: failed program was:" >&5
7534 cat conftest.$ac_ext >&5
7535 eval "$as_ac_var=no"
7536 fi
7537 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7538 fi
7539 echo "$as_me:7539: result: `eval echo '${'$as_ac_var'}'`" >&5
7540 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7541 if test `eval echo '${'$as_ac_var'}'` = yes; then
7542   cat >>confdefs.h <<EOF
7543 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7544 EOF
7545
7546 fi
7547 done
7548
7549 else
7550         echo "$as_me:7550: checking if link/symlink functions work" >&5
7551 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7552 if test "${cf_cv_link_funcs+set}" = set; then
7553   echo $ECHO_N "(cached) $ECHO_C" >&6
7554 else
7555
7556                 cf_cv_link_funcs=
7557                 for cf_func in link symlink ; do
7558                         if test "$cross_compiling" = yes; then
7559
7560                         eval 'ac_cv_func_'$cf_func'=error'
7561 else
7562   cat >conftest.$ac_ext <<_ACEOF
7563 #line 7563 "configure"
7564 #include "confdefs.h"
7565
7566 #include <sys/types.h>
7567 #include <sys/stat.h>
7568 #ifdef HAVE_UNISTD_H
7569 #include <unistd.h>
7570 #endif
7571 int main()
7572 {
7573         int fail = 0;
7574         char *src = "config.log";
7575         char *dst = "conftest.chk";
7576         struct stat src_sb;
7577         struct stat dst_sb;
7578
7579         stat(src, &src_sb);
7580         fail = ($cf_func("config.log", "conftest.chk") < 0)
7581             || (stat(dst, &dst_sb) < 0)
7582             || (dst_sb.st_mtime != src_sb.st_mtime);
7583 #ifdef HAVE_UNLINK
7584         unlink(dst);
7585 #else
7586         remove(dst);
7587 #endif
7588         ${cf_cv_main_return:-return} (fail);
7589 }
7590
7591 _ACEOF
7592 rm -f conftest$ac_exeext
7593 if { (eval echo "$as_me:7593: \"$ac_link\"") >&5
7594   (eval $ac_link) 2>&5
7595   ac_status=$?
7596   echo "$as_me:7596: \$? = $ac_status" >&5
7597   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7598   { (eval echo "$as_me:7598: \"$ac_try\"") >&5
7599   (eval $ac_try) 2>&5
7600   ac_status=$?
7601   echo "$as_me:7601: \$? = $ac_status" >&5
7602   (exit $ac_status); }; }; then
7603
7604                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7605                         eval 'ac_cv_func_'$cf_func'=yes'
7606 else
7607   echo "$as_me: program exited with status $ac_status" >&5
7608 echo "$as_me: failed program was:" >&5
7609 cat conftest.$ac_ext >&5
7610
7611                         eval 'ac_cv_func_'$cf_func'=no'
7612 fi
7613 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7614 fi
7615                 done
7616                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7617
7618 fi
7619 echo "$as_me:7619: result: $cf_cv_link_funcs" >&5
7620 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7621         test "$ac_cv_func_link"    = yes &&
7622 cat >>confdefs.h <<\EOF
7623 #define HAVE_LINK 1
7624 EOF
7625
7626         test "$ac_cv_func_symlink" = yes &&
7627 cat >>confdefs.h <<\EOF
7628 #define HAVE_SYMLINK 1
7629 EOF
7630
7631 fi
7632
7633 with_links=no
7634 with_symlinks=no
7635
7636 # soft links (symbolic links) are useful for some systems where hard links do
7637 # not work, or to make it simpler to copy terminfo trees around.
7638 if test "x$ac_cv_func_symlink" = xyes ; then
7639     echo "$as_me:7639: checking if tic should use symbolic links" >&5
7640 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7641
7642 # Check whether --enable-symlinks or --disable-symlinks was given.
7643 if test "${enable_symlinks+set}" = set; then
7644   enableval="$enable_symlinks"
7645   with_symlinks=$enableval
7646 else
7647   with_symlinks=no
7648 fi;
7649     echo "$as_me:7649: result: $with_symlinks" >&5
7650 echo "${ECHO_T}$with_symlinks" >&6
7651 fi
7652
7653 # If we have hard links and did not choose to use soft links instead, there is
7654 # no reason to make this choice optional - use the hard links.
7655 if test "$with_symlinks" = no ; then
7656     echo "$as_me:7656: checking if tic should use hard links" >&5
7657 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7658     if test "x$ac_cv_func_link" = xyes ; then
7659         with_links=yes
7660     else
7661         with_links=no
7662     fi
7663     echo "$as_me:7663: result: $with_links" >&5
7664 echo "${ECHO_T}$with_links" >&6
7665 fi
7666
7667 test "x$with_links" = xyes &&
7668 cat >>confdefs.h <<\EOF
7669 #define USE_LINKS 1
7670 EOF
7671
7672 test "x$with_symlinks" = xyes &&
7673 cat >>confdefs.h <<\EOF
7674 #define USE_SYMLINKS 1
7675 EOF
7676
7677 ###   use option --enable-broken-linker to force on use of broken-linker support
7678 echo "$as_me:7678: checking if you want broken-linker support code" >&5
7679 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7680
7681 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7682 if test "${enable_broken_linker+set}" = set; then
7683   enableval="$enable_broken_linker"
7684   with_broken_linker=$enableval
7685 else
7686   with_broken_linker=${BROKEN_LINKER:-no}
7687 fi;
7688 echo "$as_me:7688: result: $with_broken_linker" >&5
7689 echo "${ECHO_T}$with_broken_linker" >&6
7690
7691 BROKEN_LINKER=0
7692 if test "x$with_broken_linker" = xyes ; then
7693
7694 cat >>confdefs.h <<\EOF
7695 #define BROKEN_LINKER 1
7696 EOF
7697
7698         BROKEN_LINKER=1
7699 elif test "$DFT_LWR_MODEL" = shared ; then
7700         case $cf_cv_system_name in #(vi
7701         cygwin*)
7702
7703 cat >>confdefs.h <<\EOF
7704 #define BROKEN_LINKER 1
7705 EOF
7706
7707                 BROKEN_LINKER=1
7708                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7709
7710 echo "${as_me:-configure}:7710: testing cygwin linker is broken anyway ..." 1>&5
7711
7712                 ;;
7713         esac
7714 fi
7715
7716 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7717 echo "$as_me:7717: checking if tputs should process BSD-style prefix padding" >&5
7718 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7719
7720 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7721 if test "${enable_bsdpad+set}" = set; then
7722   enableval="$enable_bsdpad"
7723   with_bsdpad=$enableval
7724 else
7725   with_bsdpad=no
7726 fi;
7727 echo "$as_me:7727: result: $with_bsdpad" >&5
7728 echo "${ECHO_T}$with_bsdpad" >&6
7729 test "x$with_bsdpad" = xyes &&
7730 cat >>confdefs.h <<\EOF
7731 #define BSD_TPUTS 1
7732 EOF
7733
7734 ###   use option --enable-widec to turn on use of wide-character support
7735 NCURSES_CH_T=chtype
7736 NCURSES_LIBUTF8=0
7737
7738 NEED_WCHAR_H=0
7739 NCURSES_MBSTATE_T=0
7740 NCURSES_WCHAR_T=0
7741 NCURSES_WINT_T=0
7742
7743 # Check to define _XOPEN_SOURCE "automatically"
7744
7745 cf_XOPEN_SOURCE=500
7746 cf_POSIX_C_SOURCE=199506L
7747 cf_xopen_source=
7748
7749 case $host_os in #(vi
7750 aix[4-7]*) #(vi
7751         cf_xopen_source="-D_ALL_SOURCE"
7752         ;;
7753 cygwin|msys) #(vi
7754         cf_XOPEN_SOURCE=600
7755         ;;
7756 darwin[0-8].*) #(vi
7757         cf_xopen_source="-D_APPLE_C_SOURCE"
7758         ;;
7759 darwin*) #(vi
7760         cf_xopen_source="-D_DARWIN_C_SOURCE"
7761         cf_XOPEN_SOURCE=
7762         ;;
7763 freebsd*|dragonfly*) #(vi
7764         # 5.x headers associate
7765         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7766         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7767         cf_POSIX_C_SOURCE=200112L
7768         cf_XOPEN_SOURCE=600
7769         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7770         ;;
7771 hpux11*) #(vi
7772         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7773         ;;
7774 hpux*) #(vi
7775         cf_xopen_source="-D_HPUX_SOURCE"
7776         ;;
7777 irix[56].*) #(vi
7778         cf_xopen_source="-D_SGI_SOURCE"
7779         cf_XOPEN_SOURCE=
7780         ;;
7781 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7782
7783 echo "$as_me:7783: checking if we must define _GNU_SOURCE" >&5
7784 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7785 if test "${cf_cv_gnu_source+set}" = set; then
7786   echo $ECHO_N "(cached) $ECHO_C" >&6
7787 else
7788
7789 cat >conftest.$ac_ext <<_ACEOF
7790 #line 7790 "configure"
7791 #include "confdefs.h"
7792 #include <sys/types.h>
7793 int
7794 main ()
7795 {
7796
7797 #ifndef _XOPEN_SOURCE
7798 make an error
7799 #endif
7800   ;
7801   return 0;
7802 }
7803 _ACEOF
7804 rm -f conftest.$ac_objext
7805 if { (eval echo "$as_me:7805: \"$ac_compile\"") >&5
7806   (eval $ac_compile) 2>&5
7807   ac_status=$?
7808   echo "$as_me:7808: \$? = $ac_status" >&5
7809   (exit $ac_status); } &&
7810          { ac_try='test -s conftest.$ac_objext'
7811   { (eval echo "$as_me:7811: \"$ac_try\"") >&5
7812   (eval $ac_try) 2>&5
7813   ac_status=$?
7814   echo "$as_me:7814: \$? = $ac_status" >&5
7815   (exit $ac_status); }; }; then
7816   cf_cv_gnu_source=no
7817 else
7818   echo "$as_me: failed program was:" >&5
7819 cat conftest.$ac_ext >&5
7820 cf_save="$CPPFLAGS"
7821          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7822          cat >conftest.$ac_ext <<_ACEOF
7823 #line 7823 "configure"
7824 #include "confdefs.h"
7825 #include <sys/types.h>
7826 int
7827 main ()
7828 {
7829
7830 #ifdef _XOPEN_SOURCE
7831 make an error
7832 #endif
7833   ;
7834   return 0;
7835 }
7836 _ACEOF
7837 rm -f conftest.$ac_objext
7838 if { (eval echo "$as_me:7838: \"$ac_compile\"") >&5
7839   (eval $ac_compile) 2>&5
7840   ac_status=$?
7841   echo "$as_me:7841: \$? = $ac_status" >&5
7842   (exit $ac_status); } &&
7843          { ac_try='test -s conftest.$ac_objext'
7844   { (eval echo "$as_me:7844: \"$ac_try\"") >&5
7845   (eval $ac_try) 2>&5
7846   ac_status=$?
7847   echo "$as_me:7847: \$? = $ac_status" >&5
7848   (exit $ac_status); }; }; then
7849   cf_cv_gnu_source=no
7850 else
7851   echo "$as_me: failed program was:" >&5
7852 cat conftest.$ac_ext >&5
7853 cf_cv_gnu_source=yes
7854 fi
7855 rm -f conftest.$ac_objext conftest.$ac_ext
7856         CPPFLAGS="$cf_save"
7857
7858 fi
7859 rm -f conftest.$ac_objext conftest.$ac_ext
7860
7861 fi
7862 echo "$as_me:7862: result: $cf_cv_gnu_source" >&5
7863 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7864 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7865
7866         ;;
7867 minix*) #(vi
7868         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7869         ;;
7870 mirbsd*) #(vi
7871         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7872         cf_XOPEN_SOURCE=
7873
7874 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7875
7876 cf_save_CFLAGS="$CFLAGS"
7877 cf_save_CPPFLAGS="$CPPFLAGS"
7878
7879 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7880         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7881                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7882
7883 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7884         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7885                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7886
7887 echo "$as_me:7887: checking if we should define _POSIX_C_SOURCE" >&5
7888 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7889 if test "${cf_cv_posix_c_source+set}" = set; then
7890   echo $ECHO_N "(cached) $ECHO_C" >&6
7891 else
7892
7893 echo "${as_me:-configure}:7893: testing if the symbol is already defined go no further ..." 1>&5
7894
7895         cat >conftest.$ac_ext <<_ACEOF
7896 #line 7896 "configure"
7897 #include "confdefs.h"
7898 #include <sys/types.h>
7899 int
7900 main ()
7901 {
7902
7903 #ifndef _POSIX_C_SOURCE
7904 make an error
7905 #endif
7906   ;
7907   return 0;
7908 }
7909 _ACEOF
7910 rm -f conftest.$ac_objext
7911 if { (eval echo "$as_me:7911: \"$ac_compile\"") >&5
7912   (eval $ac_compile) 2>&5
7913   ac_status=$?
7914   echo "$as_me:7914: \$? = $ac_status" >&5
7915   (exit $ac_status); } &&
7916          { ac_try='test -s conftest.$ac_objext'
7917   { (eval echo "$as_me:7917: \"$ac_try\"") >&5
7918   (eval $ac_try) 2>&5
7919   ac_status=$?
7920   echo "$as_me:7920: \$? = $ac_status" >&5
7921   (exit $ac_status); }; }; then
7922   cf_cv_posix_c_source=no
7923 else
7924   echo "$as_me: failed program was:" >&5
7925 cat conftest.$ac_ext >&5
7926 cf_want_posix_source=no
7927          case .$cf_POSIX_C_SOURCE in #(vi
7928          .[12]??*) #(vi
7929                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7930                 ;;
7931          .2) #(vi
7932                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7933                 cf_want_posix_source=yes
7934                 ;;
7935          .*)
7936                 cf_want_posix_source=yes
7937                 ;;
7938          esac
7939          if test "$cf_want_posix_source" = yes ; then
7940                 cat >conftest.$ac_ext <<_ACEOF
7941 #line 7941 "configure"
7942 #include "confdefs.h"
7943 #include <sys/types.h>
7944 int
7945 main ()
7946 {
7947
7948 #ifdef _POSIX_SOURCE
7949 make an error
7950 #endif
7951   ;
7952   return 0;
7953 }
7954 _ACEOF
7955 rm -f conftest.$ac_objext
7956 if { (eval echo "$as_me:7956: \"$ac_compile\"") >&5
7957   (eval $ac_compile) 2>&5
7958   ac_status=$?
7959   echo "$as_me:7959: \$? = $ac_status" >&5
7960   (exit $ac_status); } &&
7961          { ac_try='test -s conftest.$ac_objext'
7962   { (eval echo "$as_me:7962: \"$ac_try\"") >&5
7963   (eval $ac_try) 2>&5
7964   ac_status=$?
7965   echo "$as_me:7965: \$? = $ac_status" >&5
7966   (exit $ac_status); }; }; then
7967   :
7968 else
7969   echo "$as_me: failed program was:" >&5
7970 cat conftest.$ac_ext >&5
7971 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7972 fi
7973 rm -f conftest.$ac_objext conftest.$ac_ext
7974          fi
7975
7976 echo "${as_me:-configure}:7976: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7977
7978          CFLAGS="$cf_trim_CFLAGS"
7979          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7980
7981 echo "${as_me:-configure}:7981: testing if the second compile does not leave our definition intact error ..." 1>&5
7982
7983          cat >conftest.$ac_ext <<_ACEOF
7984 #line 7984 "configure"
7985 #include "confdefs.h"
7986 #include <sys/types.h>
7987 int
7988 main ()
7989 {
7990
7991 #ifndef _POSIX_C_SOURCE
7992 make an error
7993 #endif
7994   ;
7995   return 0;
7996 }
7997 _ACEOF
7998 rm -f conftest.$ac_objext
7999 if { (eval echo "$as_me:7999: \"$ac_compile\"") >&5
8000   (eval $ac_compile) 2>&5
8001   ac_status=$?
8002   echo "$as_me:8002: \$? = $ac_status" >&5
8003   (exit $ac_status); } &&
8004          { ac_try='test -s conftest.$ac_objext'
8005   { (eval echo "$as_me:8005: \"$ac_try\"") >&5
8006   (eval $ac_try) 2>&5
8007   ac_status=$?
8008   echo "$as_me:8008: \$? = $ac_status" >&5
8009   (exit $ac_status); }; }; then
8010   :
8011 else
8012   echo "$as_me: failed program was:" >&5
8013 cat conftest.$ac_ext >&5
8014 cf_cv_posix_c_source=no
8015 fi
8016 rm -f conftest.$ac_objext conftest.$ac_ext
8017          CFLAGS="$cf_save_CFLAGS"
8018          CPPFLAGS="$cf_save_CPPFLAGS"
8019
8020 fi
8021 rm -f conftest.$ac_objext conftest.$ac_ext
8022
8023 fi
8024 echo "$as_me:8024: result: $cf_cv_posix_c_source" >&5
8025 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8026
8027 if test "$cf_cv_posix_c_source" != no ; then
8028         CFLAGS="$cf_trim_CFLAGS"
8029         CPPFLAGS="$cf_trim_CPPFLAGS"
8030
8031 cf_fix_cppflags=no
8032 cf_new_cflags=
8033 cf_new_cppflags=
8034 cf_new_extra_cppflags=
8035
8036 for cf_add_cflags in $cf_cv_posix_c_source
8037 do
8038 case $cf_fix_cppflags in
8039 no)
8040         case $cf_add_cflags in #(vi
8041         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8042                 case $cf_add_cflags in
8043                 -D*)
8044                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8045
8046                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8047                                 && test -z "${cf_tst_cflags}" \
8048                                 && cf_fix_cppflags=yes
8049
8050                         if test $cf_fix_cppflags = yes ; then
8051                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8052                                 continue
8053                         elif test "${cf_tst_cflags}" = "\"'" ; then
8054                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8055                                 continue
8056                         fi
8057                         ;;
8058                 esac
8059                 case "$CPPFLAGS" in
8060                 *$cf_add_cflags) #(vi
8061                         ;;
8062                 *) #(vi
8063                         case $cf_add_cflags in #(vi
8064                         -D*)
8065                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8066
8067 CPPFLAGS=`echo "$CPPFLAGS" | \
8068         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8069                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8070
8071                                 ;;
8072                         esac
8073                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8074                         ;;
8075                 esac
8076                 ;;
8077         *)
8078                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8079                 ;;
8080         esac
8081         ;;
8082 yes)
8083         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8084
8085         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8086
8087         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8088                 && test -z "${cf_tst_cflags}" \
8089                 && cf_fix_cppflags=no
8090         ;;
8091 esac
8092 done
8093
8094 if test -n "$cf_new_cflags" ; then
8095
8096         CFLAGS="$CFLAGS $cf_new_cflags"
8097 fi
8098
8099 if test -n "$cf_new_cppflags" ; then
8100
8101         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8102 fi
8103
8104 if test -n "$cf_new_extra_cppflags" ; then
8105
8106         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8107 fi
8108
8109 fi
8110
8111         ;;
8112 netbsd*) #(vi
8113         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8114         ;;
8115 openbsd[4-9]*) #(vi
8116         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8117         cf_xopen_source="-D_BSD_SOURCE"
8118         cf_XOPEN_SOURCE=600
8119         ;;
8120 openbsd*) #(vi
8121         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8122         ;;
8123 osf[45]*) #(vi
8124         cf_xopen_source="-D_OSF_SOURCE"
8125         ;;
8126 nto-qnx*) #(vi
8127         cf_xopen_source="-D_QNX_SOURCE"
8128         ;;
8129 sco*) #(vi
8130         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8131         ;;
8132 solaris2.*) #(vi
8133         cf_xopen_source="-D__EXTENSIONS__"
8134         cf_cv_xopen_source=broken
8135         ;;
8136 sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8137         cf_XOPEN_SOURCE=
8138         cf_POSIX_C_SOURCE=
8139         ;;
8140 *)
8141
8142 echo "$as_me:8142: checking if we should define _XOPEN_SOURCE" >&5
8143 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8144 if test "${cf_cv_xopen_source+set}" = set; then
8145   echo $ECHO_N "(cached) $ECHO_C" >&6
8146 else
8147
8148         cat >conftest.$ac_ext <<_ACEOF
8149 #line 8149 "configure"
8150 #include "confdefs.h"
8151
8152 #include <stdlib.h>
8153 #include <string.h>
8154 #include <sys/types.h>
8155
8156 int
8157 main ()
8158 {
8159
8160 #ifndef _XOPEN_SOURCE
8161 make an error
8162 #endif
8163   ;
8164   return 0;
8165 }
8166 _ACEOF
8167 rm -f conftest.$ac_objext
8168 if { (eval echo "$as_me:8168: \"$ac_compile\"") >&5
8169   (eval $ac_compile) 2>&5
8170   ac_status=$?
8171   echo "$as_me:8171: \$? = $ac_status" >&5
8172   (exit $ac_status); } &&
8173          { ac_try='test -s conftest.$ac_objext'
8174   { (eval echo "$as_me:8174: \"$ac_try\"") >&5
8175   (eval $ac_try) 2>&5
8176   ac_status=$?
8177   echo "$as_me:8177: \$? = $ac_status" >&5
8178   (exit $ac_status); }; }; then
8179   cf_cv_xopen_source=no
8180 else
8181   echo "$as_me: failed program was:" >&5
8182 cat conftest.$ac_ext >&5
8183 cf_save="$CPPFLAGS"
8184          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8185          cat >conftest.$ac_ext <<_ACEOF
8186 #line 8186 "configure"
8187 #include "confdefs.h"
8188
8189 #include <stdlib.h>
8190 #include <string.h>
8191 #include <sys/types.h>
8192
8193 int
8194 main ()
8195 {
8196
8197 #ifdef _XOPEN_SOURCE
8198 make an error
8199 #endif
8200   ;
8201   return 0;
8202 }
8203 _ACEOF
8204 rm -f conftest.$ac_objext
8205 if { (eval echo "$as_me:8205: \"$ac_compile\"") >&5
8206   (eval $ac_compile) 2>&5
8207   ac_status=$?
8208   echo "$as_me:8208: \$? = $ac_status" >&5
8209   (exit $ac_status); } &&
8210          { ac_try='test -s conftest.$ac_objext'
8211   { (eval echo "$as_me:8211: \"$ac_try\"") >&5
8212   (eval $ac_try) 2>&5
8213   ac_status=$?
8214   echo "$as_me:8214: \$? = $ac_status" >&5
8215   (exit $ac_status); }; }; then
8216   cf_cv_xopen_source=no
8217 else
8218   echo "$as_me: failed program was:" >&5
8219 cat conftest.$ac_ext >&5
8220 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8221 fi
8222 rm -f conftest.$ac_objext conftest.$ac_ext
8223         CPPFLAGS="$cf_save"
8224
8225 fi
8226 rm -f conftest.$ac_objext conftest.$ac_ext
8227
8228 fi
8229 echo "$as_me:8229: result: $cf_cv_xopen_source" >&5
8230 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8231
8232 if test "$cf_cv_xopen_source" != no ; then
8233
8234 CFLAGS=`echo "$CFLAGS" | \
8235         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8236                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8237
8238 CPPFLAGS=`echo "$CPPFLAGS" | \
8239         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8240                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8241
8242         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8243
8244 cf_fix_cppflags=no
8245 cf_new_cflags=
8246 cf_new_cppflags=
8247 cf_new_extra_cppflags=
8248
8249 for cf_add_cflags in $cf_temp_xopen_source
8250 do
8251 case $cf_fix_cppflags in
8252 no)
8253         case $cf_add_cflags in #(vi
8254         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8255                 case $cf_add_cflags in
8256                 -D*)
8257                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8258
8259                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8260                                 && test -z "${cf_tst_cflags}" \
8261                                 && cf_fix_cppflags=yes
8262
8263                         if test $cf_fix_cppflags = yes ; then
8264                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8265                                 continue
8266                         elif test "${cf_tst_cflags}" = "\"'" ; then
8267                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8268                                 continue
8269                         fi
8270                         ;;
8271                 esac
8272                 case "$CPPFLAGS" in
8273                 *$cf_add_cflags) #(vi
8274                         ;;
8275                 *) #(vi
8276                         case $cf_add_cflags in #(vi
8277                         -D*)
8278                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8279
8280 CPPFLAGS=`echo "$CPPFLAGS" | \
8281         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8282                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8283
8284                                 ;;
8285                         esac
8286                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8287                         ;;
8288                 esac
8289                 ;;
8290         *)
8291                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8292                 ;;
8293         esac
8294         ;;
8295 yes)
8296         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8297
8298         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8299
8300         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8301                 && test -z "${cf_tst_cflags}" \
8302                 && cf_fix_cppflags=no
8303         ;;
8304 esac
8305 done
8306
8307 if test -n "$cf_new_cflags" ; then
8308
8309         CFLAGS="$CFLAGS $cf_new_cflags"
8310 fi
8311
8312 if test -n "$cf_new_cppflags" ; then
8313
8314         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8315 fi
8316
8317 if test -n "$cf_new_extra_cppflags" ; then
8318
8319         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8320 fi
8321
8322 fi
8323
8324 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8325
8326 cf_save_CFLAGS="$CFLAGS"
8327 cf_save_CPPFLAGS="$CPPFLAGS"
8328
8329 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8330         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8331                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8332
8333 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8334         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8335                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8336
8337 echo "$as_me:8337: checking if we should define _POSIX_C_SOURCE" >&5
8338 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8339 if test "${cf_cv_posix_c_source+set}" = set; then
8340   echo $ECHO_N "(cached) $ECHO_C" >&6
8341 else
8342
8343 echo "${as_me:-configure}:8343: testing if the symbol is already defined go no further ..." 1>&5
8344
8345         cat >conftest.$ac_ext <<_ACEOF
8346 #line 8346 "configure"
8347 #include "confdefs.h"
8348 #include <sys/types.h>
8349 int
8350 main ()
8351 {
8352
8353 #ifndef _POSIX_C_SOURCE
8354 make an error
8355 #endif
8356   ;
8357   return 0;
8358 }
8359 _ACEOF
8360 rm -f conftest.$ac_objext
8361 if { (eval echo "$as_me:8361: \"$ac_compile\"") >&5
8362   (eval $ac_compile) 2>&5
8363   ac_status=$?
8364   echo "$as_me:8364: \$? = $ac_status" >&5
8365   (exit $ac_status); } &&
8366          { ac_try='test -s conftest.$ac_objext'
8367   { (eval echo "$as_me:8367: \"$ac_try\"") >&5
8368   (eval $ac_try) 2>&5
8369   ac_status=$?
8370   echo "$as_me:8370: \$? = $ac_status" >&5
8371   (exit $ac_status); }; }; then
8372   cf_cv_posix_c_source=no
8373 else
8374   echo "$as_me: failed program was:" >&5
8375 cat conftest.$ac_ext >&5
8376 cf_want_posix_source=no
8377          case .$cf_POSIX_C_SOURCE in #(vi
8378          .[12]??*) #(vi
8379                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8380                 ;;
8381          .2) #(vi
8382                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8383                 cf_want_posix_source=yes
8384                 ;;
8385          .*)
8386                 cf_want_posix_source=yes
8387                 ;;
8388          esac
8389          if test "$cf_want_posix_source" = yes ; then
8390                 cat >conftest.$ac_ext <<_ACEOF
8391 #line 8391 "configure"
8392 #include "confdefs.h"
8393 #include <sys/types.h>
8394 int
8395 main ()
8396 {
8397
8398 #ifdef _POSIX_SOURCE
8399 make an error
8400 #endif
8401   ;
8402   return 0;
8403 }
8404 _ACEOF
8405 rm -f conftest.$ac_objext
8406 if { (eval echo "$as_me:8406: \"$ac_compile\"") >&5
8407   (eval $ac_compile) 2>&5
8408   ac_status=$?
8409   echo "$as_me:8409: \$? = $ac_status" >&5
8410   (exit $ac_status); } &&
8411          { ac_try='test -s conftest.$ac_objext'
8412   { (eval echo "$as_me:8412: \"$ac_try\"") >&5
8413   (eval $ac_try) 2>&5
8414   ac_status=$?
8415   echo "$as_me:8415: \$? = $ac_status" >&5
8416   (exit $ac_status); }; }; then
8417   :
8418 else
8419   echo "$as_me: failed program was:" >&5
8420 cat conftest.$ac_ext >&5
8421 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8422 fi
8423 rm -f conftest.$ac_objext conftest.$ac_ext
8424          fi
8425
8426 echo "${as_me:-configure}:8426: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8427
8428          CFLAGS="$cf_trim_CFLAGS"
8429          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8430
8431 echo "${as_me:-configure}:8431: testing if the second compile does not leave our definition intact error ..." 1>&5
8432
8433          cat >conftest.$ac_ext <<_ACEOF
8434 #line 8434 "configure"
8435 #include "confdefs.h"
8436 #include <sys/types.h>
8437 int
8438 main ()
8439 {
8440
8441 #ifndef _POSIX_C_SOURCE
8442 make an error
8443 #endif
8444   ;
8445   return 0;
8446 }
8447 _ACEOF
8448 rm -f conftest.$ac_objext
8449 if { (eval echo "$as_me:8449: \"$ac_compile\"") >&5
8450   (eval $ac_compile) 2>&5
8451   ac_status=$?
8452   echo "$as_me:8452: \$? = $ac_status" >&5
8453   (exit $ac_status); } &&
8454          { ac_try='test -s conftest.$ac_objext'
8455   { (eval echo "$as_me:8455: \"$ac_try\"") >&5
8456   (eval $ac_try) 2>&5
8457   ac_status=$?
8458   echo "$as_me:8458: \$? = $ac_status" >&5
8459   (exit $ac_status); }; }; then
8460   :
8461 else
8462   echo "$as_me: failed program was:" >&5
8463 cat conftest.$ac_ext >&5
8464 cf_cv_posix_c_source=no
8465 fi
8466 rm -f conftest.$ac_objext conftest.$ac_ext
8467          CFLAGS="$cf_save_CFLAGS"
8468          CPPFLAGS="$cf_save_CPPFLAGS"
8469
8470 fi
8471 rm -f conftest.$ac_objext conftest.$ac_ext
8472
8473 fi
8474 echo "$as_me:8474: result: $cf_cv_posix_c_source" >&5
8475 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8476
8477 if test "$cf_cv_posix_c_source" != no ; then
8478         CFLAGS="$cf_trim_CFLAGS"
8479         CPPFLAGS="$cf_trim_CPPFLAGS"
8480
8481 cf_fix_cppflags=no
8482 cf_new_cflags=
8483 cf_new_cppflags=
8484 cf_new_extra_cppflags=
8485
8486 for cf_add_cflags in $cf_cv_posix_c_source
8487 do
8488 case $cf_fix_cppflags in
8489 no)
8490         case $cf_add_cflags in #(vi
8491         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8492                 case $cf_add_cflags in
8493                 -D*)
8494                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8495
8496                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8497                                 && test -z "${cf_tst_cflags}" \
8498                                 && cf_fix_cppflags=yes
8499
8500                         if test $cf_fix_cppflags = yes ; then
8501                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8502                                 continue
8503                         elif test "${cf_tst_cflags}" = "\"'" ; then
8504                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8505                                 continue
8506                         fi
8507                         ;;
8508                 esac
8509                 case "$CPPFLAGS" in
8510                 *$cf_add_cflags) #(vi
8511                         ;;
8512                 *) #(vi
8513                         case $cf_add_cflags in #(vi
8514                         -D*)
8515                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8516
8517 CPPFLAGS=`echo "$CPPFLAGS" | \
8518         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8519                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8520
8521                                 ;;
8522                         esac
8523                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8524                         ;;
8525                 esac
8526                 ;;
8527         *)
8528                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8529                 ;;
8530         esac
8531         ;;
8532 yes)
8533         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8534
8535         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8536
8537         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8538                 && test -z "${cf_tst_cflags}" \
8539                 && cf_fix_cppflags=no
8540         ;;
8541 esac
8542 done
8543
8544 if test -n "$cf_new_cflags" ; then
8545
8546         CFLAGS="$CFLAGS $cf_new_cflags"
8547 fi
8548
8549 if test -n "$cf_new_cppflags" ; then
8550
8551         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8552 fi
8553
8554 if test -n "$cf_new_extra_cppflags" ; then
8555
8556         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8557 fi
8558
8559 fi
8560
8561         ;;
8562 esac
8563
8564 if test -n "$cf_xopen_source" ; then
8565
8566 cf_fix_cppflags=no
8567 cf_new_cflags=
8568 cf_new_cppflags=
8569 cf_new_extra_cppflags=
8570
8571 for cf_add_cflags in $cf_xopen_source
8572 do
8573 case $cf_fix_cppflags in
8574 no)
8575         case $cf_add_cflags in #(vi
8576         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8577                 case $cf_add_cflags in
8578                 -D*)
8579                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8580
8581                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8582                                 && test -z "${cf_tst_cflags}" \
8583                                 && cf_fix_cppflags=yes
8584
8585                         if test $cf_fix_cppflags = yes ; then
8586                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8587                                 continue
8588                         elif test "${cf_tst_cflags}" = "\"'" ; then
8589                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8590                                 continue
8591                         fi
8592                         ;;
8593                 esac
8594                 case "$CPPFLAGS" in
8595                 *$cf_add_cflags) #(vi
8596                         ;;
8597                 *) #(vi
8598                         case $cf_add_cflags in #(vi
8599                         -D*)
8600                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8601
8602 CPPFLAGS=`echo "$CPPFLAGS" | \
8603         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8604                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8605
8606                                 ;;
8607                         esac
8608                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8609                         ;;
8610                 esac
8611                 ;;
8612         *)
8613                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8614                 ;;
8615         esac
8616         ;;
8617 yes)
8618         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8619
8620         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8621
8622         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8623                 && test -z "${cf_tst_cflags}" \
8624                 && cf_fix_cppflags=no
8625         ;;
8626 esac
8627 done
8628
8629 if test -n "$cf_new_cflags" ; then
8630         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8631
8632 echo "${as_me:-configure}:8632: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8633
8634         CFLAGS="$CFLAGS $cf_new_cflags"
8635 fi
8636
8637 if test -n "$cf_new_cppflags" ; then
8638         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8639
8640 echo "${as_me:-configure}:8640: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8641
8642         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8643 fi
8644
8645 if test -n "$cf_new_extra_cppflags" ; then
8646         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8647
8648 echo "${as_me:-configure}:8648: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8649
8650         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8651 fi
8652
8653 fi
8654
8655 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8656         echo "$as_me:8656: checking if _XOPEN_SOURCE really is set" >&5
8657 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8658         cat >conftest.$ac_ext <<_ACEOF
8659 #line 8659 "configure"
8660 #include "confdefs.h"
8661 #include <stdlib.h>
8662 int
8663 main ()
8664 {
8665
8666 #ifndef _XOPEN_SOURCE
8667 make an error
8668 #endif
8669   ;
8670   return 0;
8671 }
8672 _ACEOF
8673 rm -f conftest.$ac_objext
8674 if { (eval echo "$as_me:8674: \"$ac_compile\"") >&5
8675   (eval $ac_compile) 2>&5
8676   ac_status=$?
8677   echo "$as_me:8677: \$? = $ac_status" >&5
8678   (exit $ac_status); } &&
8679          { ac_try='test -s conftest.$ac_objext'
8680   { (eval echo "$as_me:8680: \"$ac_try\"") >&5
8681   (eval $ac_try) 2>&5
8682   ac_status=$?
8683   echo "$as_me:8683: \$? = $ac_status" >&5
8684   (exit $ac_status); }; }; then
8685   cf_XOPEN_SOURCE_set=yes
8686 else
8687   echo "$as_me: failed program was:" >&5
8688 cat conftest.$ac_ext >&5
8689 cf_XOPEN_SOURCE_set=no
8690 fi
8691 rm -f conftest.$ac_objext conftest.$ac_ext
8692         echo "$as_me:8692: result: $cf_XOPEN_SOURCE_set" >&5
8693 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8694         if test $cf_XOPEN_SOURCE_set = yes
8695         then
8696                 cat >conftest.$ac_ext <<_ACEOF
8697 #line 8697 "configure"
8698 #include "confdefs.h"
8699 #include <stdlib.h>
8700 int
8701 main ()
8702 {
8703
8704 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8705 make an error
8706 #endif
8707   ;
8708   return 0;
8709 }
8710 _ACEOF
8711 rm -f conftest.$ac_objext
8712 if { (eval echo "$as_me:8712: \"$ac_compile\"") >&5
8713   (eval $ac_compile) 2>&5
8714   ac_status=$?
8715   echo "$as_me:8715: \$? = $ac_status" >&5
8716   (exit $ac_status); } &&
8717          { ac_try='test -s conftest.$ac_objext'
8718   { (eval echo "$as_me:8718: \"$ac_try\"") >&5
8719   (eval $ac_try) 2>&5
8720   ac_status=$?
8721   echo "$as_me:8721: \$? = $ac_status" >&5
8722   (exit $ac_status); }; }; then
8723   cf_XOPEN_SOURCE_set_ok=yes
8724 else
8725   echo "$as_me: failed program was:" >&5
8726 cat conftest.$ac_ext >&5
8727 cf_XOPEN_SOURCE_set_ok=no
8728 fi
8729 rm -f conftest.$ac_objext conftest.$ac_ext
8730                 if test $cf_XOPEN_SOURCE_set_ok = no
8731                 then
8732                         { echo "$as_me:8732: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8733 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8734                 fi
8735         else
8736
8737 echo "$as_me:8737: checking if we should define _XOPEN_SOURCE" >&5
8738 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8739 if test "${cf_cv_xopen_source+set}" = set; then
8740   echo $ECHO_N "(cached) $ECHO_C" >&6
8741 else
8742
8743         cat >conftest.$ac_ext <<_ACEOF
8744 #line 8744 "configure"
8745 #include "confdefs.h"
8746
8747 #include <stdlib.h>
8748 #include <string.h>
8749 #include <sys/types.h>
8750
8751 int
8752 main ()
8753 {
8754
8755 #ifndef _XOPEN_SOURCE
8756 make an error
8757 #endif
8758   ;
8759   return 0;
8760 }
8761 _ACEOF
8762 rm -f conftest.$ac_objext
8763 if { (eval echo "$as_me:8763: \"$ac_compile\"") >&5
8764   (eval $ac_compile) 2>&5
8765   ac_status=$?
8766   echo "$as_me:8766: \$? = $ac_status" >&5
8767   (exit $ac_status); } &&
8768          { ac_try='test -s conftest.$ac_objext'
8769   { (eval echo "$as_me:8769: \"$ac_try\"") >&5
8770   (eval $ac_try) 2>&5
8771   ac_status=$?
8772   echo "$as_me:8772: \$? = $ac_status" >&5
8773   (exit $ac_status); }; }; then
8774   cf_cv_xopen_source=no
8775 else
8776   echo "$as_me: failed program was:" >&5
8777 cat conftest.$ac_ext >&5
8778 cf_save="$CPPFLAGS"
8779          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8780          cat >conftest.$ac_ext <<_ACEOF
8781 #line 8781 "configure"
8782 #include "confdefs.h"
8783
8784 #include <stdlib.h>
8785 #include <string.h>
8786 #include <sys/types.h>
8787
8788 int
8789 main ()
8790 {
8791
8792 #ifdef _XOPEN_SOURCE
8793 make an error
8794 #endif
8795   ;
8796   return 0;
8797 }
8798 _ACEOF
8799 rm -f conftest.$ac_objext
8800 if { (eval echo "$as_me:8800: \"$ac_compile\"") >&5
8801   (eval $ac_compile) 2>&5
8802   ac_status=$?
8803   echo "$as_me:8803: \$? = $ac_status" >&5
8804   (exit $ac_status); } &&
8805          { ac_try='test -s conftest.$ac_objext'
8806   { (eval echo "$as_me:8806: \"$ac_try\"") >&5
8807   (eval $ac_try) 2>&5
8808   ac_status=$?
8809   echo "$as_me:8809: \$? = $ac_status" >&5
8810   (exit $ac_status); }; }; then
8811   cf_cv_xopen_source=no
8812 else
8813   echo "$as_me: failed program was:" >&5
8814 cat conftest.$ac_ext >&5
8815 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8816 fi
8817 rm -f conftest.$ac_objext conftest.$ac_ext
8818         CPPFLAGS="$cf_save"
8819
8820 fi
8821 rm -f conftest.$ac_objext conftest.$ac_ext
8822
8823 fi
8824 echo "$as_me:8824: result: $cf_cv_xopen_source" >&5
8825 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8826
8827 if test "$cf_cv_xopen_source" != no ; then
8828
8829 CFLAGS=`echo "$CFLAGS" | \
8830         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8831                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8832
8833 CPPFLAGS=`echo "$CPPFLAGS" | \
8834         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8835                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8836
8837         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8838
8839 cf_fix_cppflags=no
8840 cf_new_cflags=
8841 cf_new_cppflags=
8842 cf_new_extra_cppflags=
8843
8844 for cf_add_cflags in $cf_temp_xopen_source
8845 do
8846 case $cf_fix_cppflags in
8847 no)
8848         case $cf_add_cflags in #(vi
8849         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8850                 case $cf_add_cflags in
8851                 -D*)
8852                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8853
8854                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8855                                 && test -z "${cf_tst_cflags}" \
8856                                 && cf_fix_cppflags=yes
8857
8858                         if test $cf_fix_cppflags = yes ; then
8859                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8860                                 continue
8861                         elif test "${cf_tst_cflags}" = "\"'" ; then
8862                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8863                                 continue
8864                         fi
8865                         ;;
8866                 esac
8867                 case "$CPPFLAGS" in
8868                 *$cf_add_cflags) #(vi
8869                         ;;
8870                 *) #(vi
8871                         case $cf_add_cflags in #(vi
8872                         -D*)
8873                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8874
8875 CPPFLAGS=`echo "$CPPFLAGS" | \
8876         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8877                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8878
8879                                 ;;
8880                         esac
8881                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8882                         ;;
8883                 esac
8884                 ;;
8885         *)
8886                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8887                 ;;
8888         esac
8889         ;;
8890 yes)
8891         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8892
8893         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8894
8895         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8896                 && test -z "${cf_tst_cflags}" \
8897                 && cf_fix_cppflags=no
8898         ;;
8899 esac
8900 done
8901
8902 if test -n "$cf_new_cflags" ; then
8903
8904         CFLAGS="$CFLAGS $cf_new_cflags"
8905 fi
8906
8907 if test -n "$cf_new_cppflags" ; then
8908
8909         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8910 fi
8911
8912 if test -n "$cf_new_extra_cppflags" ; then
8913
8914         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8915 fi
8916
8917 fi
8918
8919         fi
8920 fi
8921
8922 # Work around breakage on OS X
8923
8924 echo "$as_me:8924: checking if SIGWINCH is defined" >&5
8925 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8926 if test "${cf_cv_define_sigwinch+set}" = set; then
8927   echo $ECHO_N "(cached) $ECHO_C" >&6
8928 else
8929
8930         cat >conftest.$ac_ext <<_ACEOF
8931 #line 8931 "configure"
8932 #include "confdefs.h"
8933
8934 #include <sys/types.h>
8935 #include <sys/signal.h>
8936
8937 int
8938 main ()
8939 {
8940 int x = SIGWINCH
8941   ;
8942   return 0;
8943 }
8944 _ACEOF
8945 rm -f conftest.$ac_objext
8946 if { (eval echo "$as_me:8946: \"$ac_compile\"") >&5
8947   (eval $ac_compile) 2>&5
8948   ac_status=$?
8949   echo "$as_me:8949: \$? = $ac_status" >&5
8950   (exit $ac_status); } &&
8951          { ac_try='test -s conftest.$ac_objext'
8952   { (eval echo "$as_me:8952: \"$ac_try\"") >&5
8953   (eval $ac_try) 2>&5
8954   ac_status=$?
8955   echo "$as_me:8955: \$? = $ac_status" >&5
8956   (exit $ac_status); }; }; then
8957   cf_cv_define_sigwinch=yes
8958 else
8959   echo "$as_me: failed program was:" >&5
8960 cat conftest.$ac_ext >&5
8961 cat >conftest.$ac_ext <<_ACEOF
8962 #line 8962 "configure"
8963 #include "confdefs.h"
8964
8965 #undef _XOPEN_SOURCE
8966 #undef _POSIX_SOURCE
8967 #undef _POSIX_C_SOURCE
8968 #include <sys/types.h>
8969 #include <sys/signal.h>
8970
8971 int
8972 main ()
8973 {
8974 int x = SIGWINCH
8975   ;
8976   return 0;
8977 }
8978 _ACEOF
8979 rm -f conftest.$ac_objext
8980 if { (eval echo "$as_me:8980: \"$ac_compile\"") >&5
8981   (eval $ac_compile) 2>&5
8982   ac_status=$?
8983   echo "$as_me:8983: \$? = $ac_status" >&5
8984   (exit $ac_status); } &&
8985          { ac_try='test -s conftest.$ac_objext'
8986   { (eval echo "$as_me:8986: \"$ac_try\"") >&5
8987   (eval $ac_try) 2>&5
8988   ac_status=$?
8989   echo "$as_me:8989: \$? = $ac_status" >&5
8990   (exit $ac_status); }; }; then
8991   cf_cv_define_sigwinch=maybe
8992 else
8993   echo "$as_me: failed program was:" >&5
8994 cat conftest.$ac_ext >&5
8995 cf_cv_define_sigwinch=no
8996 fi
8997 rm -f conftest.$ac_objext conftest.$ac_ext
8998
8999 fi
9000 rm -f conftest.$ac_objext conftest.$ac_ext
9001
9002 fi
9003 echo "$as_me:9003: result: $cf_cv_define_sigwinch" >&5
9004 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9005
9006 if test "$cf_cv_define_sigwinch" = maybe ; then
9007 echo "$as_me:9007: checking for actual SIGWINCH definition" >&5
9008 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9009 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9010   echo $ECHO_N "(cached) $ECHO_C" >&6
9011 else
9012
9013 cf_cv_fixup_sigwinch=unknown
9014 cf_sigwinch=32
9015 while test $cf_sigwinch != 1
9016 do
9017         cat >conftest.$ac_ext <<_ACEOF
9018 #line 9018 "configure"
9019 #include "confdefs.h"
9020
9021 #undef _XOPEN_SOURCE
9022 #undef _POSIX_SOURCE
9023 #undef _POSIX_C_SOURCE
9024 #include <sys/types.h>
9025 #include <sys/signal.h>
9026
9027 int
9028 main ()
9029 {
9030
9031 #if SIGWINCH != $cf_sigwinch
9032 make an error
9033 #endif
9034 int x = SIGWINCH
9035   ;
9036   return 0;
9037 }
9038 _ACEOF
9039 rm -f conftest.$ac_objext
9040 if { (eval echo "$as_me:9040: \"$ac_compile\"") >&5
9041   (eval $ac_compile) 2>&5
9042   ac_status=$?
9043   echo "$as_me:9043: \$? = $ac_status" >&5
9044   (exit $ac_status); } &&
9045          { ac_try='test -s conftest.$ac_objext'
9046   { (eval echo "$as_me:9046: \"$ac_try\"") >&5
9047   (eval $ac_try) 2>&5
9048   ac_status=$?
9049   echo "$as_me:9049: \$? = $ac_status" >&5
9050   (exit $ac_status); }; }; then
9051   cf_cv_fixup_sigwinch=$cf_sigwinch
9052          break
9053 else
9054   echo "$as_me: failed program was:" >&5
9055 cat conftest.$ac_ext >&5
9056 fi
9057 rm -f conftest.$ac_objext conftest.$ac_ext
9058
9059 cf_sigwinch=`expr $cf_sigwinch - 1`
9060 done
9061
9062 fi
9063 echo "$as_me:9063: result: $cf_cv_fixup_sigwinch" >&5
9064 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9065
9066         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9067                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9068         fi
9069 fi
9070
9071 # Checks for CODESET support.
9072
9073   echo "$as_me:9073: checking for nl_langinfo and CODESET" >&5
9074 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9075 if test "${am_cv_langinfo_codeset+set}" = set; then
9076   echo $ECHO_N "(cached) $ECHO_C" >&6
9077 else
9078   cat >conftest.$ac_ext <<_ACEOF
9079 #line 9079 "configure"
9080 #include "confdefs.h"
9081 #include <langinfo.h>
9082 int
9083 main ()
9084 {
9085 char* cs = nl_langinfo(CODESET);
9086   ;
9087   return 0;
9088 }
9089 _ACEOF
9090 rm -f conftest.$ac_objext conftest$ac_exeext
9091 if { (eval echo "$as_me:9091: \"$ac_link\"") >&5
9092   (eval $ac_link) 2>&5
9093   ac_status=$?
9094   echo "$as_me:9094: \$? = $ac_status" >&5
9095   (exit $ac_status); } &&
9096          { ac_try='test -s conftest$ac_exeext'
9097   { (eval echo "$as_me:9097: \"$ac_try\"") >&5
9098   (eval $ac_try) 2>&5
9099   ac_status=$?
9100   echo "$as_me:9100: \$? = $ac_status" >&5
9101   (exit $ac_status); }; }; then
9102   am_cv_langinfo_codeset=yes
9103 else
9104   echo "$as_me: failed program was:" >&5
9105 cat conftest.$ac_ext >&5
9106 am_cv_langinfo_codeset=no
9107 fi
9108 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9109
9110 fi
9111 echo "$as_me:9111: result: $am_cv_langinfo_codeset" >&5
9112 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9113   if test $am_cv_langinfo_codeset = yes; then
9114
9115 cat >>confdefs.h <<\EOF
9116 #define HAVE_LANGINFO_CODESET 1
9117 EOF
9118
9119   fi
9120
9121 # use these variables to work around a defect in gcc's fixincludes.
9122 NCURSES_OK_WCHAR_T=
9123 NCURSES_OK_WINT_T=
9124
9125 echo "$as_me:9125: checking if you want wide-character code" >&5
9126 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9127
9128 # Check whether --enable-widec or --disable-widec was given.
9129 if test "${enable_widec+set}" = set; then
9130   enableval="$enable_widec"
9131   with_widec=$enableval
9132 else
9133   with_widec=no
9134 fi;
9135 echo "$as_me:9135: result: $with_widec" >&5
9136 echo "${ECHO_T}$with_widec" >&6
9137 if test "x$with_widec" = xyes ; then
9138         if test "x$disable_lib_suffixes" = xno ; then
9139                 LIB_SUFFIX="w${LIB_SUFFIX}"
9140         fi
9141
9142 cat >>confdefs.h <<\EOF
9143 #define USE_WIDEC_SUPPORT 1
9144 EOF
9145
9146 cat >>confdefs.h <<\EOF
9147 #define NCURSES_WIDECHAR 1
9148 EOF
9149
9150 echo "$as_me:9150: checking if wchar.h can be used as is" >&5
9151 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9152 if test "${cf_cv_wchar_h_okay+set}" = set; then
9153   echo $ECHO_N "(cached) $ECHO_C" >&6
9154 else
9155
9156 cat >conftest.$ac_ext <<_ACEOF
9157 #line 9157 "configure"
9158 #include "confdefs.h"
9159
9160 #include <stdlib.h>
9161 #include <wchar.h>
9162
9163 int
9164 main ()
9165 {
9166
9167         wint_t foo = 0;
9168         int bar = iswpunct(foo)
9169   ;
9170   return 0;
9171 }
9172 _ACEOF
9173 rm -f conftest.$ac_objext
9174 if { (eval echo "$as_me:9174: \"$ac_compile\"") >&5
9175   (eval $ac_compile) 2>&5
9176   ac_status=$?
9177   echo "$as_me:9177: \$? = $ac_status" >&5
9178   (exit $ac_status); } &&
9179          { ac_try='test -s conftest.$ac_objext'
9180   { (eval echo "$as_me:9180: \"$ac_try\"") >&5
9181   (eval $ac_try) 2>&5
9182   ac_status=$?
9183   echo "$as_me:9183: \$? = $ac_status" >&5
9184   (exit $ac_status); }; }; then
9185   cf_cv_wchar_h_okay=yes
9186 else
9187   echo "$as_me: failed program was:" >&5
9188 cat conftest.$ac_ext >&5
9189 cf_cv_wchar_h_okay=no
9190 fi
9191 rm -f conftest.$ac_objext conftest.$ac_ext
9192 fi
9193 echo "$as_me:9193: result: $cf_cv_wchar_h_okay" >&5
9194 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9195
9196 if test $cf_cv_wchar_h_okay = no
9197 then
9198
9199 echo "$as_me:9199: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9200 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9201 cat >conftest.$ac_ext <<_ACEOF
9202 #line 9202 "configure"
9203 #include "confdefs.h"
9204 #include <sys/types.h>
9205
9206 int
9207 main ()
9208 {
9209
9210 #ifndef _XOPEN_SOURCE_EXTENDED
9211 make an error
9212 #endif
9213   ;
9214   return 0;
9215 }
9216 _ACEOF
9217 rm -f conftest.$ac_objext
9218 if { (eval echo "$as_me:9218: \"$ac_compile\"") >&5
9219   (eval $ac_compile) 2>&5
9220   ac_status=$?
9221   echo "$as_me:9221: \$? = $ac_status" >&5
9222   (exit $ac_status); } &&
9223          { ac_try='test -s conftest.$ac_objext'
9224   { (eval echo "$as_me:9224: \"$ac_try\"") >&5
9225   (eval $ac_try) 2>&5
9226   ac_status=$?
9227   echo "$as_me:9227: \$? = $ac_status" >&5
9228   (exit $ac_status); }; }; then
9229   cf_result=no
9230 else
9231   echo "$as_me: failed program was:" >&5
9232 cat conftest.$ac_ext >&5
9233 cf_result=yes
9234 fi
9235 rm -f conftest.$ac_objext conftest.$ac_ext
9236 echo "$as_me:9236: result: $cf_result" >&5
9237 echo "${ECHO_T}$cf_result" >&6
9238
9239 if test "$cf_result" = yes ; then
9240         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9241 elif test "x" != "x" ; then
9242         echo "$as_me:9242: checking checking for compatible value versus " >&5
9243 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9244         cat >conftest.$ac_ext <<_ACEOF
9245 #line 9245 "configure"
9246 #include "confdefs.h"
9247 #include <sys/types.h>
9248
9249 int
9250 main ()
9251 {
9252
9253 #if _XOPEN_SOURCE_EXTENDED- < 0
9254 make an error
9255 #endif
9256   ;
9257   return 0;
9258 }
9259 _ACEOF
9260 rm -f conftest.$ac_objext
9261 if { (eval echo "$as_me:9261: \"$ac_compile\"") >&5
9262   (eval $ac_compile) 2>&5
9263   ac_status=$?
9264   echo "$as_me:9264: \$? = $ac_status" >&5
9265   (exit $ac_status); } &&
9266          { ac_try='test -s conftest.$ac_objext'
9267   { (eval echo "$as_me:9267: \"$ac_try\"") >&5
9268   (eval $ac_try) 2>&5
9269   ac_status=$?
9270   echo "$as_me:9270: \$? = $ac_status" >&5
9271   (exit $ac_status); }; }; then
9272   cf_result=yes
9273 else
9274   echo "$as_me: failed program was:" >&5
9275 cat conftest.$ac_ext >&5
9276 cf_result=no
9277 fi
9278 rm -f conftest.$ac_objext conftest.$ac_ext
9279         echo "$as_me:9279: result: $cf_result" >&5
9280 echo "${ECHO_T}$cf_result" >&6
9281         if test "$cf_result" = no ; then
9282                 # perhaps we can override it - try...
9283                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9284         fi
9285 fi
9286
9287 fi
9288
9289         # with_overwrite=no
9290         NCURSES_CH_T=cchar_t
9291
9292 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9293 do
9294 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9295 echo "$as_me:9295: checking for $ac_func" >&5
9296 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9297 if eval "test \"\${$as_ac_var+set}\" = set"; then
9298   echo $ECHO_N "(cached) $ECHO_C" >&6
9299 else
9300   cat >conftest.$ac_ext <<_ACEOF
9301 #line 9301 "configure"
9302 #include "confdefs.h"
9303 /* System header to define __stub macros and hopefully few prototypes,
9304     which can conflict with char $ac_func (); below.  */
9305 #include <assert.h>
9306 /* Override any gcc2 internal prototype to avoid an error.  */
9307 #ifdef __cplusplus
9308 extern "C"
9309 #endif
9310 /* We use char because int might match the return type of a gcc2
9311    builtin and then its argument prototype would still apply.  */
9312 char $ac_func ();
9313 char (*f) ();
9314
9315 int
9316 main ()
9317 {
9318 /* The GNU C library defines this for functions which it implements
9319     to always fail with ENOSYS.  Some functions are actually named
9320     something starting with __ and the normal name is an alias.  */
9321 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9322 choke me
9323 #else
9324 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9325 #endif
9326
9327   ;
9328   return 0;
9329 }
9330 _ACEOF
9331 rm -f conftest.$ac_objext conftest$ac_exeext
9332 if { (eval echo "$as_me:9332: \"$ac_link\"") >&5
9333   (eval $ac_link) 2>&5
9334   ac_status=$?
9335   echo "$as_me:9335: \$? = $ac_status" >&5
9336   (exit $ac_status); } &&
9337          { ac_try='test -s conftest$ac_exeext'
9338   { (eval echo "$as_me:9338: \"$ac_try\"") >&5
9339   (eval $ac_try) 2>&5
9340   ac_status=$?
9341   echo "$as_me:9341: \$? = $ac_status" >&5
9342   (exit $ac_status); }; }; then
9343   eval "$as_ac_var=yes"
9344 else
9345   echo "$as_me: failed program was:" >&5
9346 cat conftest.$ac_ext >&5
9347 eval "$as_ac_var=no"
9348 fi
9349 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9350 fi
9351 echo "$as_me:9351: result: `eval echo '${'$as_ac_var'}'`" >&5
9352 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9353 if test `eval echo '${'$as_ac_var'}'` = yes; then
9354   cat >>confdefs.h <<EOF
9355 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9356 EOF
9357
9358 fi
9359 done
9360
9361         if test "x$ac_cv_func_putwc" != xyes ; then
9362
9363 echo "$as_me:9363: checking for multibyte character support" >&5
9364 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9365 if test "${cf_cv_utf8_lib+set}" = set; then
9366   echo $ECHO_N "(cached) $ECHO_C" >&6
9367 else
9368
9369         cf_save_LIBS="$LIBS"
9370         cat >conftest.$ac_ext <<_ACEOF
9371 #line 9371 "configure"
9372 #include "confdefs.h"
9373
9374 #include <stdlib.h>
9375 int
9376 main ()
9377 {
9378 putwc(0,0);
9379   ;
9380   return 0;
9381 }
9382 _ACEOF
9383 rm -f conftest.$ac_objext conftest$ac_exeext
9384 if { (eval echo "$as_me:9384: \"$ac_link\"") >&5
9385   (eval $ac_link) 2>&5
9386   ac_status=$?
9387   echo "$as_me:9387: \$? = $ac_status" >&5
9388   (exit $ac_status); } &&
9389          { ac_try='test -s conftest$ac_exeext'
9390   { (eval echo "$as_me:9390: \"$ac_try\"") >&5
9391   (eval $ac_try) 2>&5
9392   ac_status=$?
9393   echo "$as_me:9393: \$? = $ac_status" >&5
9394   (exit $ac_status); }; }; then
9395   cf_cv_utf8_lib=yes
9396 else
9397   echo "$as_me: failed program was:" >&5
9398 cat conftest.$ac_ext >&5
9399
9400 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9401 # will be set on completion of the AC_TRY_LINK below.
9402 cf_cv_header_path_utf8=
9403 cf_cv_library_path_utf8=
9404
9405 echo "${as_me:-configure}:9405: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9406
9407 cf_save_LIBS="$LIBS"
9408
9409 cat >conftest.$ac_ext <<_ACEOF
9410 #line 9410 "configure"
9411 #include "confdefs.h"
9412
9413 #include <libutf8.h>
9414 int
9415 main ()
9416 {
9417 putwc(0,0);
9418   ;
9419   return 0;
9420 }
9421 _ACEOF
9422 rm -f conftest.$ac_objext conftest$ac_exeext
9423 if { (eval echo "$as_me:9423: \"$ac_link\"") >&5
9424   (eval $ac_link) 2>&5
9425   ac_status=$?
9426   echo "$as_me:9426: \$? = $ac_status" >&5
9427   (exit $ac_status); } &&
9428          { ac_try='test -s conftest$ac_exeext'
9429   { (eval echo "$as_me:9429: \"$ac_try\"") >&5
9430   (eval $ac_try) 2>&5
9431   ac_status=$?
9432   echo "$as_me:9432: \$? = $ac_status" >&5
9433   (exit $ac_status); }; }; then
9434
9435         cf_cv_find_linkage_utf8=yes
9436         cf_cv_header_path_utf8=/usr/include
9437         cf_cv_library_path_utf8=/usr/lib
9438
9439 else
9440   echo "$as_me: failed program was:" >&5
9441 cat conftest.$ac_ext >&5
9442
9443 LIBS="-lutf8  $cf_save_LIBS"
9444
9445 cat >conftest.$ac_ext <<_ACEOF
9446 #line 9446 "configure"
9447 #include "confdefs.h"
9448
9449 #include <libutf8.h>
9450 int
9451 main ()
9452 {
9453 putwc(0,0);
9454   ;
9455   return 0;
9456 }
9457 _ACEOF
9458 rm -f conftest.$ac_objext conftest$ac_exeext
9459 if { (eval echo "$as_me:9459: \"$ac_link\"") >&5
9460   (eval $ac_link) 2>&5
9461   ac_status=$?
9462   echo "$as_me:9462: \$? = $ac_status" >&5
9463   (exit $ac_status); } &&
9464          { ac_try='test -s conftest$ac_exeext'
9465   { (eval echo "$as_me:9465: \"$ac_try\"") >&5
9466   (eval $ac_try) 2>&5
9467   ac_status=$?
9468   echo "$as_me:9468: \$? = $ac_status" >&5
9469   (exit $ac_status); }; }; then
9470
9471         cf_cv_find_linkage_utf8=yes
9472         cf_cv_header_path_utf8=/usr/include
9473         cf_cv_library_path_utf8=/usr/lib
9474         cf_cv_library_file_utf8="-lutf8"
9475
9476 else
9477   echo "$as_me: failed program was:" >&5
9478 cat conftest.$ac_ext >&5
9479
9480         cf_cv_find_linkage_utf8=no
9481         LIBS="$cf_save_LIBS"
9482
9483     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
9484
9485 echo "${as_me:-configure}:9485: testing find linkage for utf8 library ..." 1>&5
9486
9487 echo "${as_me:-configure}:9487: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9488
9489     cf_save_CPPFLAGS="$CPPFLAGS"
9490     cf_test_CPPFLAGS="$CPPFLAGS"
9491
9492 cf_search=
9493
9494 # collect the current set of include-directories from compiler flags
9495 cf_header_path_list=""
9496 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9497         for cf_header_path in $CPPFLAGS $CFLAGS
9498         do
9499                 case $cf_header_path in #(vi
9500                 -I*)
9501                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9502
9503 test "x$cf_header_path" != "xNONE" && \
9504 test -d "$cf_header_path" && \
9505  {
9506         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9507         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9508         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9509         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9510         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9511         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9512 }
9513
9514                         cf_header_path_list="$cf_header_path_list $cf_search"
9515                         ;;
9516                 esac
9517         done
9518 fi
9519
9520 # add the variations for the package we are looking for
9521
9522 cf_search=
9523
9524 test "x$prefix" != "xNONE" && \
9525 test -d "$prefix" && \
9526  {
9527         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9528         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9529         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9530         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9531         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9532         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9533 }
9534
9535 for cf_subdir_prefix in \
9536         /usr \
9537         /usr/local \
9538         /usr/pkg \
9539         /opt \
9540         /opt/local \
9541         $HOME
9542 do
9543
9544 test "x$cf_subdir_prefix" != "x$prefix" && \
9545 test -d "$cf_subdir_prefix" && \
9546 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9547         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9548         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9549         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9550         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9551         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9552         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9553 }
9554
9555 done
9556
9557 test "$includedir" != NONE && \
9558 test "$includedir" != "/usr/include" && \
9559 test -d "$includedir" && {
9560         test -d $includedir &&    cf_search="$cf_search $includedir"
9561         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9562 }
9563
9564 test "$oldincludedir" != NONE && \
9565 test "$oldincludedir" != "/usr/include" && \
9566 test -d "$oldincludedir" && {
9567         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9568         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9569 }
9570
9571 cf_search="$cf_search $cf_header_path_list"
9572
9573     for cf_cv_header_path_utf8 in $cf_search
9574     do
9575       if test -d $cf_cv_header_path_utf8 ; then
9576         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9577
9578 echo "${as_me:-configure}:9578: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9579
9580         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9581         cat >conftest.$ac_ext <<_ACEOF
9582 #line 9582 "configure"
9583 #include "confdefs.h"
9584
9585 #include <libutf8.h>
9586 int
9587 main ()
9588 {
9589 putwc(0,0);
9590   ;
9591   return 0;
9592 }
9593 _ACEOF
9594 rm -f conftest.$ac_objext
9595 if { (eval echo "$as_me:9595: \"$ac_compile\"") >&5
9596   (eval $ac_compile) 2>&5
9597   ac_status=$?
9598   echo "$as_me:9598: \$? = $ac_status" >&5
9599   (exit $ac_status); } &&
9600          { ac_try='test -s conftest.$ac_objext'
9601   { (eval echo "$as_me:9601: \"$ac_try\"") >&5
9602   (eval $ac_try) 2>&5
9603   ac_status=$?
9604   echo "$as_me:9604: \$? = $ac_status" >&5
9605   (exit $ac_status); }; }; then
9606
9607             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9608
9609 echo "${as_me:-configure}:9609: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9610
9611             cf_cv_find_linkage_utf8=maybe
9612             cf_test_CPPFLAGS="$CPPFLAGS"
9613             break
9614 else
9615   echo "$as_me: failed program was:" >&5
9616 cat conftest.$ac_ext >&5
9617
9618             CPPFLAGS="$cf_save_CPPFLAGS"
9619
9620 fi
9621 rm -f conftest.$ac_objext conftest.$ac_ext
9622       fi
9623     done
9624
9625     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9626
9627 echo "${as_me:-configure}:9627: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9628
9629       cf_save_LIBS="$LIBS"
9630       cf_save_LDFLAGS="$LDFLAGS"
9631
9632       if test "$cf_cv_find_linkage_utf8" != yes ; then
9633
9634 cf_search=
9635 cf_library_path_list=""
9636 if test -n "${LDFLAGS}${LIBS}" ; then
9637         for cf_library_path in $LDFLAGS $LIBS
9638         do
9639                 case $cf_library_path in #(vi
9640                 -L*)
9641                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9642
9643 test "x$cf_library_path" != "xNONE" && \
9644 test -d "$cf_library_path" && \
9645  {
9646         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9647         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9648         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9649         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9650         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9651         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9652 }
9653
9654                         cf_library_path_list="$cf_library_path_list $cf_search"
9655                         ;;
9656                 esac
9657         done
9658 fi
9659
9660 cf_search=
9661
9662 test "x$prefix" != "xNONE" && \
9663 test -d "$prefix" && \
9664  {
9665         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9666         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9667         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9668         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9669         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9670         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9671 }
9672
9673 for cf_subdir_prefix in \
9674         /usr \
9675         /usr/local \
9676         /usr/pkg \
9677         /opt \
9678         /opt/local \
9679         $HOME
9680 do
9681
9682 test "x$cf_subdir_prefix" != "x$prefix" && \
9683 test -d "$cf_subdir_prefix" && \
9684 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9685         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
9686         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9687         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
9688         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
9689         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
9690         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
9691 }
9692
9693 done
9694
9695 cf_search="$cf_library_path_list $cf_search"
9696
9697         for cf_cv_library_path_utf8 in $cf_search
9698         do
9699           if test -d $cf_cv_library_path_utf8 ; then
9700             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9701
9702 echo "${as_me:-configure}:9702: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9703
9704             CPPFLAGS="$cf_test_CPPFLAGS"
9705             LIBS="-lutf8  $cf_save_LIBS"
9706             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9707             cat >conftest.$ac_ext <<_ACEOF
9708 #line 9708 "configure"
9709 #include "confdefs.h"
9710
9711 #include <libutf8.h>
9712 int
9713 main ()
9714 {
9715 putwc(0,0);
9716   ;
9717   return 0;
9718 }
9719 _ACEOF
9720 rm -f conftest.$ac_objext conftest$ac_exeext
9721 if { (eval echo "$as_me:9721: \"$ac_link\"") >&5
9722   (eval $ac_link) 2>&5
9723   ac_status=$?
9724   echo "$as_me:9724: \$? = $ac_status" >&5
9725   (exit $ac_status); } &&
9726          { ac_try='test -s conftest$ac_exeext'
9727   { (eval echo "$as_me:9727: \"$ac_try\"") >&5
9728   (eval $ac_try) 2>&5
9729   ac_status=$?
9730   echo "$as_me:9730: \$? = $ac_status" >&5
9731   (exit $ac_status); }; }; then
9732
9733                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9734
9735 echo "${as_me:-configure}:9735: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9736
9737                 cf_cv_find_linkage_utf8=yes
9738                 cf_cv_library_file_utf8="-lutf8"
9739                 break
9740 else
9741   echo "$as_me: failed program was:" >&5
9742 cat conftest.$ac_ext >&5
9743
9744                 CPPFLAGS="$cf_save_CPPFLAGS"
9745                 LIBS="$cf_save_LIBS"
9746                 LDFLAGS="$cf_save_LDFLAGS"
9747
9748 fi
9749 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9750           fi
9751         done
9752         CPPFLAGS="$cf_save_CPPFLAGS"
9753         LDFLAGS="$cf_save_LDFLAGS"
9754       fi
9755
9756     else
9757       cf_cv_find_linkage_utf8=no
9758     fi
9759
9760 fi
9761 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9762
9763 fi
9764 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9765
9766 LIBS="$cf_save_LIBS"
9767
9768 if test "$cf_cv_find_linkage_utf8" = yes ; then
9769 cf_cv_utf8_lib=add-on
9770 else
9771 cf_cv_utf8_lib=no
9772 fi
9773
9774 fi
9775 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9776 fi
9777 echo "$as_me:9777: result: $cf_cv_utf8_lib" >&5
9778 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9779
9780 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9781 # ncurses/ncursesw:
9782 if test "$cf_cv_utf8_lib" = "add-on" ; then
9783
9784 cat >>confdefs.h <<\EOF
9785 #define HAVE_LIBUTF8_H 1
9786 EOF
9787
9788 if test -n "$cf_cv_header_path_utf8" ; then
9789   for cf_add_incdir in $cf_cv_header_path_utf8
9790   do
9791         while test $cf_add_incdir != /usr/include
9792         do
9793           if test -d $cf_add_incdir
9794           then
9795                 cf_have_incdir=no
9796                 if test -n "$CFLAGS$CPPFLAGS" ; then
9797                   # a loop is needed to ensure we can add subdirs of existing dirs
9798                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9799                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9800                           cf_have_incdir=yes; break
9801                         fi
9802                   done
9803                 fi
9804
9805                 if test "$cf_have_incdir" = no ; then
9806                   if test "$cf_add_incdir" = /usr/local/include ; then
9807                         if test "$GCC" = yes
9808                         then
9809                           cf_save_CPPFLAGS=$CPPFLAGS
9810                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9811                           cat >conftest.$ac_ext <<_ACEOF
9812 #line 9812 "configure"
9813 #include "confdefs.h"
9814 #include <stdio.h>
9815 int
9816 main ()
9817 {
9818 printf("Hello")
9819   ;
9820   return 0;
9821 }
9822 _ACEOF
9823 rm -f conftest.$ac_objext
9824 if { (eval echo "$as_me:9824: \"$ac_compile\"") >&5
9825   (eval $ac_compile) 2>&5
9826   ac_status=$?
9827   echo "$as_me:9827: \$? = $ac_status" >&5
9828   (exit $ac_status); } &&
9829          { ac_try='test -s conftest.$ac_objext'
9830   { (eval echo "$as_me:9830: \"$ac_try\"") >&5
9831   (eval $ac_try) 2>&5
9832   ac_status=$?
9833   echo "$as_me:9833: \$? = $ac_status" >&5
9834   (exit $ac_status); }; }; then
9835   :
9836 else
9837   echo "$as_me: failed program was:" >&5
9838 cat conftest.$ac_ext >&5
9839 cf_have_incdir=yes
9840 fi
9841 rm -f conftest.$ac_objext conftest.$ac_ext
9842                           CPPFLAGS=$cf_save_CPPFLAGS
9843                         fi
9844                   fi
9845                 fi
9846
9847                 if test "$cf_have_incdir" = no ; then
9848                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9849
9850 echo "${as_me:-configure}:9850: testing adding $cf_add_incdir to include-path ..." 1>&5
9851
9852                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9853
9854                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9855                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9856                   cf_add_incdir="$cf_top_incdir"
9857                 else
9858                   break
9859                 fi
9860           fi
9861         done
9862   done
9863 fi
9864
9865 if test -n "$cf_cv_library_path_utf8" ; then
9866   for cf_add_libdir in $cf_cv_library_path_utf8
9867   do
9868     if test $cf_add_libdir = /usr/lib ; then
9869       :
9870     elif test -d $cf_add_libdir
9871     then
9872       cf_have_libdir=no
9873       if test -n "$LDFLAGS$LIBS" ; then
9874         # a loop is needed to ensure we can add subdirs of existing dirs
9875         for cf_test_libdir in $LDFLAGS $LIBS ; do
9876           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9877             cf_have_libdir=yes; break
9878           fi
9879         done
9880       fi
9881       if test "$cf_have_libdir" = no ; then
9882         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9883
9884 echo "${as_me:-configure}:9884: testing adding $cf_add_libdir to library-path ..." 1>&5
9885
9886         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9887       fi
9888     fi
9889   done
9890 fi
9891
9892 cf_add_libs="$cf_cv_library_file_utf8"
9893 # Filter out duplicates - this happens with badly-designed ".pc" files...
9894 for cf_add_1lib in $LIBS
9895 do
9896         for cf_add_2lib in $cf_add_libs
9897         do
9898                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9899                 then
9900                         cf_add_1lib=
9901                         break
9902                 fi
9903         done
9904         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9905 done
9906 LIBS="$cf_add_libs"
9907
9908 fi
9909
9910                 if test "$cf_cv_utf8_lib" != no ; then
9911                         NCURSES_LIBUTF8=1
9912                 fi
9913         fi
9914
9915 # This is needed on Tru64 5.0 to declare mbstate_t
9916 echo "$as_me:9916: checking if we must include wchar.h to declare mbstate_t" >&5
9917 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9918 if test "${cf_cv_mbstate_t+set}" = set; then
9919   echo $ECHO_N "(cached) $ECHO_C" >&6
9920 else
9921
9922 cat >conftest.$ac_ext <<_ACEOF
9923 #line 9923 "configure"
9924 #include "confdefs.h"
9925
9926 #include <stdlib.h>
9927 #include <stdarg.h>
9928 #include <stdio.h>
9929 #ifdef HAVE_LIBUTF8_H
9930 #include <libutf8.h>
9931 #endif
9932 int
9933 main ()
9934 {
9935 mbstate_t state
9936   ;
9937   return 0;
9938 }
9939 _ACEOF
9940 rm -f conftest.$ac_objext
9941 if { (eval echo "$as_me:9941: \"$ac_compile\"") >&5
9942   (eval $ac_compile) 2>&5
9943   ac_status=$?
9944   echo "$as_me:9944: \$? = $ac_status" >&5
9945   (exit $ac_status); } &&
9946          { ac_try='test -s conftest.$ac_objext'
9947   { (eval echo "$as_me:9947: \"$ac_try\"") >&5
9948   (eval $ac_try) 2>&5
9949   ac_status=$?
9950   echo "$as_me:9950: \$? = $ac_status" >&5
9951   (exit $ac_status); }; }; then
9952   cf_cv_mbstate_t=no
9953 else
9954   echo "$as_me: failed program was:" >&5
9955 cat conftest.$ac_ext >&5
9956 cat >conftest.$ac_ext <<_ACEOF
9957 #line 9957 "configure"
9958 #include "confdefs.h"
9959
9960 #include <stdlib.h>
9961 #include <stdarg.h>
9962 #include <stdio.h>
9963 #include <wchar.h>
9964 #ifdef HAVE_LIBUTF8_H
9965 #include <libutf8.h>
9966 #endif
9967 int
9968 main ()
9969 {
9970 mbstate_t value
9971   ;
9972   return 0;
9973 }
9974 _ACEOF
9975 rm -f conftest.$ac_objext
9976 if { (eval echo "$as_me:9976: \"$ac_compile\"") >&5
9977   (eval $ac_compile) 2>&5
9978   ac_status=$?
9979   echo "$as_me:9979: \$? = $ac_status" >&5
9980   (exit $ac_status); } &&
9981          { ac_try='test -s conftest.$ac_objext'
9982   { (eval echo "$as_me:9982: \"$ac_try\"") >&5
9983   (eval $ac_try) 2>&5
9984   ac_status=$?
9985   echo "$as_me:9985: \$? = $ac_status" >&5
9986   (exit $ac_status); }; }; then
9987   cf_cv_mbstate_t=yes
9988 else
9989   echo "$as_me: failed program was:" >&5
9990 cat conftest.$ac_ext >&5
9991 cf_cv_mbstate_t=unknown
9992 fi
9993 rm -f conftest.$ac_objext conftest.$ac_ext
9994 fi
9995 rm -f conftest.$ac_objext conftest.$ac_ext
9996 fi
9997 echo "$as_me:9997: result: $cf_cv_mbstate_t" >&5
9998 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9999
10000 if test "$cf_cv_mbstate_t" = yes ; then
10001
10002 cat >>confdefs.h <<\EOF
10003 #define NEED_WCHAR_H 1
10004 EOF
10005
10006         NEED_WCHAR_H=1
10007 fi
10008
10009 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10010 if test "$cf_cv_mbstate_t" = unknown ; then
10011         NCURSES_MBSTATE_T=1
10012 fi
10013
10014 # This is needed on Tru64 5.0 to declare wchar_t
10015 echo "$as_me:10015: checking if we must include wchar.h to declare wchar_t" >&5
10016 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10017 if test "${cf_cv_wchar_t+set}" = set; then
10018   echo $ECHO_N "(cached) $ECHO_C" >&6
10019 else
10020
10021 cat >conftest.$ac_ext <<_ACEOF
10022 #line 10022 "configure"
10023 #include "confdefs.h"
10024
10025 #include <stdlib.h>
10026 #include <stdarg.h>
10027 #include <stdio.h>
10028 #ifdef HAVE_LIBUTF8_H
10029 #include <libutf8.h>
10030 #endif
10031 int
10032 main ()
10033 {
10034 wchar_t state
10035   ;
10036   return 0;
10037 }
10038 _ACEOF
10039 rm -f conftest.$ac_objext
10040 if { (eval echo "$as_me:10040: \"$ac_compile\"") >&5
10041   (eval $ac_compile) 2>&5
10042   ac_status=$?
10043   echo "$as_me:10043: \$? = $ac_status" >&5
10044   (exit $ac_status); } &&
10045          { ac_try='test -s conftest.$ac_objext'
10046   { (eval echo "$as_me:10046: \"$ac_try\"") >&5
10047   (eval $ac_try) 2>&5
10048   ac_status=$?
10049   echo "$as_me:10049: \$? = $ac_status" >&5
10050   (exit $ac_status); }; }; then
10051   cf_cv_wchar_t=no
10052 else
10053   echo "$as_me: failed program was:" >&5
10054 cat conftest.$ac_ext >&5
10055 cat >conftest.$ac_ext <<_ACEOF
10056 #line 10056 "configure"
10057 #include "confdefs.h"
10058
10059 #include <stdlib.h>
10060 #include <stdarg.h>
10061 #include <stdio.h>
10062 #include <wchar.h>
10063 #ifdef HAVE_LIBUTF8_H
10064 #include <libutf8.h>
10065 #endif
10066 int
10067 main ()
10068 {
10069 wchar_t value
10070   ;
10071   return 0;
10072 }
10073 _ACEOF
10074 rm -f conftest.$ac_objext
10075 if { (eval echo "$as_me:10075: \"$ac_compile\"") >&5
10076   (eval $ac_compile) 2>&5
10077   ac_status=$?
10078   echo "$as_me:10078: \$? = $ac_status" >&5
10079   (exit $ac_status); } &&
10080          { ac_try='test -s conftest.$ac_objext'
10081   { (eval echo "$as_me:10081: \"$ac_try\"") >&5
10082   (eval $ac_try) 2>&5
10083   ac_status=$?
10084   echo "$as_me:10084: \$? = $ac_status" >&5
10085   (exit $ac_status); }; }; then
10086   cf_cv_wchar_t=yes
10087 else
10088   echo "$as_me: failed program was:" >&5
10089 cat conftest.$ac_ext >&5
10090 cf_cv_wchar_t=unknown
10091 fi
10092 rm -f conftest.$ac_objext conftest.$ac_ext
10093 fi
10094 rm -f conftest.$ac_objext conftest.$ac_ext
10095 fi
10096 echo "$as_me:10096: result: $cf_cv_wchar_t" >&5
10097 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10098
10099 if test "$cf_cv_wchar_t" = yes ; then
10100
10101 cat >>confdefs.h <<\EOF
10102 #define NEED_WCHAR_H 1
10103 EOF
10104
10105         NEED_WCHAR_H=1
10106 fi
10107
10108 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10109 if test "$cf_cv_wchar_t" = unknown ; then
10110         NCURSES_WCHAR_T=1
10111 fi
10112
10113 # if we find wchar_t in either place, use substitution to provide a fallback.
10114 if test "$cf_cv_wchar_t" != unknown ; then
10115         NCURSES_OK_WCHAR_T=1
10116 fi
10117
10118 # This is needed on Tru64 5.0 to declare wint_t
10119 echo "$as_me:10119: checking if we must include wchar.h to declare wint_t" >&5
10120 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10121 if test "${cf_cv_wint_t+set}" = set; then
10122   echo $ECHO_N "(cached) $ECHO_C" >&6
10123 else
10124
10125 cat >conftest.$ac_ext <<_ACEOF
10126 #line 10126 "configure"
10127 #include "confdefs.h"
10128
10129 #include <stdlib.h>
10130 #include <stdarg.h>
10131 #include <stdio.h>
10132 #ifdef HAVE_LIBUTF8_H
10133 #include <libutf8.h>
10134 #endif
10135 int
10136 main ()
10137 {
10138 wint_t state
10139   ;
10140   return 0;
10141 }
10142 _ACEOF
10143 rm -f conftest.$ac_objext
10144 if { (eval echo "$as_me:10144: \"$ac_compile\"") >&5
10145   (eval $ac_compile) 2>&5
10146   ac_status=$?
10147   echo "$as_me:10147: \$? = $ac_status" >&5
10148   (exit $ac_status); } &&
10149          { ac_try='test -s conftest.$ac_objext'
10150   { (eval echo "$as_me:10150: \"$ac_try\"") >&5
10151   (eval $ac_try) 2>&5
10152   ac_status=$?
10153   echo "$as_me:10153: \$? = $ac_status" >&5
10154   (exit $ac_status); }; }; then
10155   cf_cv_wint_t=no
10156 else
10157   echo "$as_me: failed program was:" >&5
10158 cat conftest.$ac_ext >&5
10159 cat >conftest.$ac_ext <<_ACEOF
10160 #line 10160 "configure"
10161 #include "confdefs.h"
10162
10163 #include <stdlib.h>
10164 #include <stdarg.h>
10165 #include <stdio.h>
10166 #include <wchar.h>
10167 #ifdef HAVE_LIBUTF8_H
10168 #include <libutf8.h>
10169 #endif
10170 int
10171 main ()
10172 {
10173 wint_t value
10174   ;
10175   return 0;
10176 }
10177 _ACEOF
10178 rm -f conftest.$ac_objext
10179 if { (eval echo "$as_me:10179: \"$ac_compile\"") >&5
10180   (eval $ac_compile) 2>&5
10181   ac_status=$?
10182   echo "$as_me:10182: \$? = $ac_status" >&5
10183   (exit $ac_status); } &&
10184          { ac_try='test -s conftest.$ac_objext'
10185   { (eval echo "$as_me:10185: \"$ac_try\"") >&5
10186   (eval $ac_try) 2>&5
10187   ac_status=$?
10188   echo "$as_me:10188: \$? = $ac_status" >&5
10189   (exit $ac_status); }; }; then
10190   cf_cv_wint_t=yes
10191 else
10192   echo "$as_me: failed program was:" >&5
10193 cat conftest.$ac_ext >&5
10194 cf_cv_wint_t=unknown
10195 fi
10196 rm -f conftest.$ac_objext conftest.$ac_ext
10197 fi
10198 rm -f conftest.$ac_objext conftest.$ac_ext
10199 fi
10200 echo "$as_me:10200: result: $cf_cv_wint_t" >&5
10201 echo "${ECHO_T}$cf_cv_wint_t" >&6
10202
10203 if test "$cf_cv_wint_t" = yes ; then
10204
10205 cat >>confdefs.h <<\EOF
10206 #define NEED_WCHAR_H 1
10207 EOF
10208
10209         NEED_WCHAR_H=1
10210 fi
10211
10212 # if we do not find wint_t in either place, use substitution to provide a fallback.
10213 if test "$cf_cv_wint_t" = unknown ; then
10214         NCURSES_WINT_T=1
10215 fi
10216
10217 # if we find wint_t in either place, use substitution to provide a fallback.
10218 if test "$cf_cv_wint_t" != unknown ; then
10219         NCURSES_OK_WINT_T=1
10220 fi
10221
10222         if test "$NCURSES_MBSTATE_T" != 0; then
10223
10224 cat >>confdefs.h <<\EOF
10225 #define NEED_MBSTATE_T_DEF 1
10226 EOF
10227
10228         fi
10229 fi
10230
10231 ###   use option --disable-lp64 to allow long chtype
10232 case $cf_cv_abi_version in
10233 [345]*)
10234         default_with_lp64=no
10235         ;;
10236 *)
10237         default_with_lp64=yes
10238         ;;
10239 esac
10240
10241 echo "$as_me:10241: checking whether to enable _LP64 definition in curses.h" >&5
10242 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10243
10244 # Check whether --enable-lp64 or --disable-lp64 was given.
10245 if test "${enable_lp64+set}" = set; then
10246   enableval="$enable_lp64"
10247   with_lp64=$enableval
10248 else
10249   with_lp64=$default_with_lp64
10250 fi;
10251 echo "$as_me:10251: result: $with_lp64" >&5
10252 echo "${ECHO_T}$with_lp64" >&6
10253
10254 if test "x$with_lp64" = xyes ; then
10255         cf_cv_enable_lp64=1
10256 else
10257         cf_cv_enable_lp64=0
10258 fi
10259
10260 # Check whether --enable-largefile or --disable-largefile was given.
10261 if test "${enable_largefile+set}" = set; then
10262   enableval="$enable_largefile"
10263
10264 fi;
10265 if test "$enable_largefile" != no; then
10266
10267   echo "$as_me:10267: checking for special C compiler options needed for large files" >&5
10268 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10269 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10270   echo $ECHO_N "(cached) $ECHO_C" >&6
10271 else
10272   ac_cv_sys_largefile_CC=no
10273      if test "$GCC" != yes; then
10274        ac_save_CC=$CC
10275        while :; do
10276          # IRIX 6.2 and later do not support large files by default,
10277          # so use the C compiler's -n32 option if that helps.
10278          cat >conftest.$ac_ext <<_ACEOF
10279 #line 10279 "configure"
10280 #include "confdefs.h"
10281 #include <sys/types.h>
10282  /* Check that off_t can represent 2**63 - 1 correctly.
10283     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10284     since some C++ compilers masquerading as C compilers
10285     incorrectly reject 9223372036854775807.  */
10286 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10287   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10288                        && LARGE_OFF_T % 2147483647 == 1)
10289                       ? 1 : -1];
10290 int
10291 main ()
10292 {
10293
10294   ;
10295   return 0;
10296 }
10297 _ACEOF
10298          rm -f conftest.$ac_objext
10299 if { (eval echo "$as_me:10299: \"$ac_compile\"") >&5
10300   (eval $ac_compile) 2>&5
10301   ac_status=$?
10302   echo "$as_me:10302: \$? = $ac_status" >&5
10303   (exit $ac_status); } &&
10304          { ac_try='test -s conftest.$ac_objext'
10305   { (eval echo "$as_me:10305: \"$ac_try\"") >&5
10306   (eval $ac_try) 2>&5
10307   ac_status=$?
10308   echo "$as_me:10308: \$? = $ac_status" >&5
10309   (exit $ac_status); }; }; then
10310   break
10311 else
10312   echo "$as_me: failed program was:" >&5
10313 cat conftest.$ac_ext >&5
10314 fi
10315 rm -f conftest.$ac_objext
10316          CC="$CC -n32"
10317          rm -f conftest.$ac_objext
10318 if { (eval echo "$as_me:10318: \"$ac_compile\"") >&5
10319   (eval $ac_compile) 2>&5
10320   ac_status=$?
10321   echo "$as_me:10321: \$? = $ac_status" >&5
10322   (exit $ac_status); } &&
10323          { ac_try='test -s conftest.$ac_objext'
10324   { (eval echo "$as_me:10324: \"$ac_try\"") >&5
10325   (eval $ac_try) 2>&5
10326   ac_status=$?
10327   echo "$as_me:10327: \$? = $ac_status" >&5
10328   (exit $ac_status); }; }; then
10329   ac_cv_sys_largefile_CC=' -n32'; break
10330 else
10331   echo "$as_me: failed program was:" >&5
10332 cat conftest.$ac_ext >&5
10333 fi
10334 rm -f conftest.$ac_objext
10335          break
10336        done
10337        CC=$ac_save_CC
10338        rm -f conftest.$ac_ext
10339     fi
10340 fi
10341 echo "$as_me:10341: result: $ac_cv_sys_largefile_CC" >&5
10342 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10343   if test "$ac_cv_sys_largefile_CC" != no; then
10344     CC=$CC$ac_cv_sys_largefile_CC
10345   fi
10346
10347   echo "$as_me:10347: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10348 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10349 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10350   echo $ECHO_N "(cached) $ECHO_C" >&6
10351 else
10352   while :; do
10353   ac_cv_sys_file_offset_bits=no
10354   cat >conftest.$ac_ext <<_ACEOF
10355 #line 10355 "configure"
10356 #include "confdefs.h"
10357 #include <sys/types.h>
10358  /* Check that off_t can represent 2**63 - 1 correctly.
10359     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10360     since some C++ compilers masquerading as C compilers
10361     incorrectly reject 9223372036854775807.  */
10362 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10363   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10364                        && LARGE_OFF_T % 2147483647 == 1)
10365                       ? 1 : -1];
10366 int
10367 main ()
10368 {
10369
10370   ;
10371   return 0;
10372 }
10373 _ACEOF
10374 rm -f conftest.$ac_objext
10375 if { (eval echo "$as_me:10375: \"$ac_compile\"") >&5
10376   (eval $ac_compile) 2>&5
10377   ac_status=$?
10378   echo "$as_me:10378: \$? = $ac_status" >&5
10379   (exit $ac_status); } &&
10380          { ac_try='test -s conftest.$ac_objext'
10381   { (eval echo "$as_me:10381: \"$ac_try\"") >&5
10382   (eval $ac_try) 2>&5
10383   ac_status=$?
10384   echo "$as_me:10384: \$? = $ac_status" >&5
10385   (exit $ac_status); }; }; then
10386   break
10387 else
10388   echo "$as_me: failed program was:" >&5
10389 cat conftest.$ac_ext >&5
10390 fi
10391 rm -f conftest.$ac_objext conftest.$ac_ext
10392   cat >conftest.$ac_ext <<_ACEOF
10393 #line 10393 "configure"
10394 #include "confdefs.h"
10395 #define _FILE_OFFSET_BITS 64
10396 #include <sys/types.h>
10397  /* Check that off_t can represent 2**63 - 1 correctly.
10398     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10399     since some C++ compilers masquerading as C compilers
10400     incorrectly reject 9223372036854775807.  */
10401 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10402   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10403                        && LARGE_OFF_T % 2147483647 == 1)
10404                       ? 1 : -1];
10405 int
10406 main ()
10407 {
10408
10409   ;
10410   return 0;
10411 }
10412 _ACEOF
10413 rm -f conftest.$ac_objext
10414 if { (eval echo "$as_me:10414: \"$ac_compile\"") >&5
10415   (eval $ac_compile) 2>&5
10416   ac_status=$?
10417   echo "$as_me:10417: \$? = $ac_status" >&5
10418   (exit $ac_status); } &&
10419          { ac_try='test -s conftest.$ac_objext'
10420   { (eval echo "$as_me:10420: \"$ac_try\"") >&5
10421   (eval $ac_try) 2>&5
10422   ac_status=$?
10423   echo "$as_me:10423: \$? = $ac_status" >&5
10424   (exit $ac_status); }; }; then
10425   ac_cv_sys_file_offset_bits=64; break
10426 else
10427   echo "$as_me: failed program was:" >&5
10428 cat conftest.$ac_ext >&5
10429 fi
10430 rm -f conftest.$ac_objext conftest.$ac_ext
10431   break
10432 done
10433 fi
10434 echo "$as_me:10434: result: $ac_cv_sys_file_offset_bits" >&5
10435 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10436 if test "$ac_cv_sys_file_offset_bits" != no; then
10437
10438 cat >>confdefs.h <<EOF
10439 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10440 EOF
10441
10442 fi
10443 rm -rf conftest*
10444   echo "$as_me:10444: checking for _LARGE_FILES value needed for large files" >&5
10445 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10446 if test "${ac_cv_sys_large_files+set}" = set; then
10447   echo $ECHO_N "(cached) $ECHO_C" >&6
10448 else
10449   while :; do
10450   ac_cv_sys_large_files=no
10451   cat >conftest.$ac_ext <<_ACEOF
10452 #line 10452 "configure"
10453 #include "confdefs.h"
10454 #include <sys/types.h>
10455  /* Check that off_t can represent 2**63 - 1 correctly.
10456     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10457     since some C++ compilers masquerading as C compilers
10458     incorrectly reject 9223372036854775807.  */
10459 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10460   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10461                        && LARGE_OFF_T % 2147483647 == 1)
10462                       ? 1 : -1];
10463 int
10464 main ()
10465 {
10466
10467   ;
10468   return 0;
10469 }
10470 _ACEOF
10471 rm -f conftest.$ac_objext
10472 if { (eval echo "$as_me:10472: \"$ac_compile\"") >&5
10473   (eval $ac_compile) 2>&5
10474   ac_status=$?
10475   echo "$as_me:10475: \$? = $ac_status" >&5
10476   (exit $ac_status); } &&
10477          { ac_try='test -s conftest.$ac_objext'
10478   { (eval echo "$as_me:10478: \"$ac_try\"") >&5
10479   (eval $ac_try) 2>&5
10480   ac_status=$?
10481   echo "$as_me:10481: \$? = $ac_status" >&5
10482   (exit $ac_status); }; }; then
10483   break
10484 else
10485   echo "$as_me: failed program was:" >&5
10486 cat conftest.$ac_ext >&5
10487 fi
10488 rm -f conftest.$ac_objext conftest.$ac_ext
10489   cat >conftest.$ac_ext <<_ACEOF
10490 #line 10490 "configure"
10491 #include "confdefs.h"
10492 #define _LARGE_FILES 1
10493 #include <sys/types.h>
10494  /* Check that off_t can represent 2**63 - 1 correctly.
10495     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10496     since some C++ compilers masquerading as C compilers
10497     incorrectly reject 9223372036854775807.  */
10498 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10499   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10500                        && LARGE_OFF_T % 2147483647 == 1)
10501                       ? 1 : -1];
10502 int
10503 main ()
10504 {
10505
10506   ;
10507   return 0;
10508 }
10509 _ACEOF
10510 rm -f conftest.$ac_objext
10511 if { (eval echo "$as_me:10511: \"$ac_compile\"") >&5
10512   (eval $ac_compile) 2>&5
10513   ac_status=$?
10514   echo "$as_me:10514: \$? = $ac_status" >&5
10515   (exit $ac_status); } &&
10516          { ac_try='test -s conftest.$ac_objext'
10517   { (eval echo "$as_me:10517: \"$ac_try\"") >&5
10518   (eval $ac_try) 2>&5
10519   ac_status=$?
10520   echo "$as_me:10520: \$? = $ac_status" >&5
10521   (exit $ac_status); }; }; then
10522   ac_cv_sys_large_files=1; break
10523 else
10524   echo "$as_me: failed program was:" >&5
10525 cat conftest.$ac_ext >&5
10526 fi
10527 rm -f conftest.$ac_objext conftest.$ac_ext
10528   break
10529 done
10530 fi
10531 echo "$as_me:10531: result: $ac_cv_sys_large_files" >&5
10532 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10533 if test "$ac_cv_sys_large_files" != no; then
10534
10535 cat >>confdefs.h <<EOF
10536 #define _LARGE_FILES $ac_cv_sys_large_files
10537 EOF
10538
10539 fi
10540 rm -rf conftest*
10541 fi
10542
10543     if test "$enable_largefile" != no ; then
10544         echo "$as_me:10544: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10545 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10546 if test "${ac_cv_sys_largefile_source+set}" = set; then
10547   echo $ECHO_N "(cached) $ECHO_C" >&6
10548 else
10549   while :; do
10550   ac_cv_sys_largefile_source=no
10551   cat >conftest.$ac_ext <<_ACEOF
10552 #line 10552 "configure"
10553 #include "confdefs.h"
10554 #include <stdio.h>
10555 int
10556 main ()
10557 {
10558 return !fseeko;
10559   ;
10560   return 0;
10561 }
10562 _ACEOF
10563 rm -f conftest.$ac_objext
10564 if { (eval echo "$as_me:10564: \"$ac_compile\"") >&5
10565   (eval $ac_compile) 2>&5
10566   ac_status=$?
10567   echo "$as_me:10567: \$? = $ac_status" >&5
10568   (exit $ac_status); } &&
10569          { ac_try='test -s conftest.$ac_objext'
10570   { (eval echo "$as_me:10570: \"$ac_try\"") >&5
10571   (eval $ac_try) 2>&5
10572   ac_status=$?
10573   echo "$as_me:10573: \$? = $ac_status" >&5
10574   (exit $ac_status); }; }; then
10575   break
10576 else
10577   echo "$as_me: failed program was:" >&5
10578 cat conftest.$ac_ext >&5
10579 fi
10580 rm -f conftest.$ac_objext conftest.$ac_ext
10581   cat >conftest.$ac_ext <<_ACEOF
10582 #line 10582 "configure"
10583 #include "confdefs.h"
10584 #define _LARGEFILE_SOURCE 1
10585 #include <stdio.h>
10586 int
10587 main ()
10588 {
10589 return !fseeko;
10590   ;
10591   return 0;
10592 }
10593 _ACEOF
10594 rm -f conftest.$ac_objext
10595 if { (eval echo "$as_me:10595: \"$ac_compile\"") >&5
10596   (eval $ac_compile) 2>&5
10597   ac_status=$?
10598   echo "$as_me:10598: \$? = $ac_status" >&5
10599   (exit $ac_status); } &&
10600          { ac_try='test -s conftest.$ac_objext'
10601   { (eval echo "$as_me:10601: \"$ac_try\"") >&5
10602   (eval $ac_try) 2>&5
10603   ac_status=$?
10604   echo "$as_me:10604: \$? = $ac_status" >&5
10605   (exit $ac_status); }; }; then
10606   ac_cv_sys_largefile_source=1; break
10607 else
10608   echo "$as_me: failed program was:" >&5
10609 cat conftest.$ac_ext >&5
10610 fi
10611 rm -f conftest.$ac_objext conftest.$ac_ext
10612   break
10613 done
10614 fi
10615 echo "$as_me:10615: result: $ac_cv_sys_largefile_source" >&5
10616 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10617 if test "$ac_cv_sys_largefile_source" != no; then
10618
10619 cat >>confdefs.h <<EOF
10620 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10621 EOF
10622
10623 fi
10624 rm -rf conftest*
10625
10626 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10627 # in glibc 2.1.3, but that breaks too many other things.
10628 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10629 echo "$as_me:10629: checking for fseeko" >&5
10630 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10631 if test "${ac_cv_func_fseeko+set}" = set; then
10632   echo $ECHO_N "(cached) $ECHO_C" >&6
10633 else
10634   cat >conftest.$ac_ext <<_ACEOF
10635 #line 10635 "configure"
10636 #include "confdefs.h"
10637 #include <stdio.h>
10638 int
10639 main ()
10640 {
10641 return fseeko && fseeko (stdin, 0, 0);
10642   ;
10643   return 0;
10644 }
10645 _ACEOF
10646 rm -f conftest.$ac_objext conftest$ac_exeext
10647 if { (eval echo "$as_me:10647: \"$ac_link\"") >&5
10648   (eval $ac_link) 2>&5
10649   ac_status=$?
10650   echo "$as_me:10650: \$? = $ac_status" >&5
10651   (exit $ac_status); } &&
10652          { ac_try='test -s conftest$ac_exeext'
10653   { (eval echo "$as_me:10653: \"$ac_try\"") >&5
10654   (eval $ac_try) 2>&5
10655   ac_status=$?
10656   echo "$as_me:10656: \$? = $ac_status" >&5
10657   (exit $ac_status); }; }; then
10658   ac_cv_func_fseeko=yes
10659 else
10660   echo "$as_me: failed program was:" >&5
10661 cat conftest.$ac_ext >&5
10662 ac_cv_func_fseeko=no
10663 fi
10664 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10665 fi
10666 echo "$as_me:10666: result: $ac_cv_func_fseeko" >&5
10667 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10668 if test $ac_cv_func_fseeko = yes; then
10669
10670 cat >>confdefs.h <<\EOF
10671 #define HAVE_FSEEKO 1
10672 EOF
10673
10674 fi
10675
10676         # Normally we would collect these definitions in the config.h,
10677         # but (like _XOPEN_SOURCE), some environments rely on having these
10678         # defined before any of the system headers are included.  Another
10679         # case comes up with C++, e.g., on AIX the compiler compiles the
10680         # header files by themselves before looking at the body files it is
10681         # told to compile.  For ncurses, those header files do not include
10682         # the config.h
10683         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10684         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10685         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10686
10687         echo "$as_me:10687: checking whether to use struct dirent64" >&5
10688 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10689 if test "${cf_cv_struct_dirent64+set}" = set; then
10690   echo $ECHO_N "(cached) $ECHO_C" >&6
10691 else
10692
10693                 cat >conftest.$ac_ext <<_ACEOF
10694 #line 10694 "configure"
10695 #include "confdefs.h"
10696
10697 #include <sys/types.h>
10698 #include <dirent.h>
10699
10700 int
10701 main ()
10702 {
10703
10704                 /* if transitional largefile support is setup, this is true */
10705                 extern struct dirent64 * readdir(DIR *);
10706                 struct dirent64 *x = readdir((DIR *)0);
10707                 struct dirent *y = readdir((DIR *)0);
10708                 int z = x - y;
10709
10710   ;
10711   return 0;
10712 }
10713 _ACEOF
10714 rm -f conftest.$ac_objext
10715 if { (eval echo "$as_me:10715: \"$ac_compile\"") >&5
10716   (eval $ac_compile) 2>&5
10717   ac_status=$?
10718   echo "$as_me:10718: \$? = $ac_status" >&5
10719   (exit $ac_status); } &&
10720          { ac_try='test -s conftest.$ac_objext'
10721   { (eval echo "$as_me:10721: \"$ac_try\"") >&5
10722   (eval $ac_try) 2>&5
10723   ac_status=$?
10724   echo "$as_me:10724: \$? = $ac_status" >&5
10725   (exit $ac_status); }; }; then
10726   cf_cv_struct_dirent64=yes
10727 else
10728   echo "$as_me: failed program was:" >&5
10729 cat conftest.$ac_ext >&5
10730 cf_cv_struct_dirent64=no
10731 fi
10732 rm -f conftest.$ac_objext conftest.$ac_ext
10733
10734 fi
10735 echo "$as_me:10735: result: $cf_cv_struct_dirent64" >&5
10736 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10737         test "$cf_cv_struct_dirent64" = yes &&
10738 cat >>confdefs.h <<\EOF
10739 #define HAVE_STRUCT_DIRENT64 1
10740 EOF
10741
10742     fi
10743
10744 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10745 echo "$as_me:10745: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10746 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10747
10748 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10749 if test "${enable_tparm_varargs+set}" = set; then
10750   enableval="$enable_tparm_varargs"
10751   with_tparm_varargs=$enableval
10752 else
10753   with_tparm_varargs=yes
10754 fi;
10755 echo "$as_me:10755: result: $with_tparm_varargs" >&5
10756 echo "${ECHO_T}$with_tparm_varargs" >&6
10757 NCURSES_TPARM_VARARGS=0
10758 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10759
10760 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10761 if test "$with_ticlib" != no ; then
10762 echo "$as_me:10762: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10763 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10764
10765 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10766 if test "${enable_tic_depends+set}" = set; then
10767   enableval="$enable_tic_depends"
10768   with_tic_depends=$enableval
10769 else
10770   with_tic_depends=yes
10771 fi;
10772 echo "$as_me:10772: result: $with_tic_depends" >&5
10773 echo "${ECHO_T}$with_tic_depends" >&6
10774 else
10775         with_tic_depends=no
10776 fi
10777
10778 ###   use option --with-bool to override bool's type
10779 echo "$as_me:10779: checking for type of bool" >&5
10780 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10781
10782 # Check whether --with-bool or --without-bool was given.
10783 if test "${with_bool+set}" = set; then
10784   withval="$with_bool"
10785   NCURSES_BOOL="$withval"
10786 else
10787   NCURSES_BOOL=auto
10788 fi;
10789 echo "$as_me:10789: result: $NCURSES_BOOL" >&5
10790 echo "${ECHO_T}$NCURSES_BOOL" >&6
10791
10792 echo "$as_me:10792: checking for alternate terminal capabilities file" >&5
10793 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10794
10795 # Check whether --with-caps or --without-caps was given.
10796 if test "${with_caps+set}" = set; then
10797   withval="$with_caps"
10798   TERMINFO_CAPS=Caps.$withval
10799 else
10800   TERMINFO_CAPS=Caps
10801 fi;
10802 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10803 echo "$as_me:10803: result: $TERMINFO_CAPS" >&5
10804 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10805
10806 ###   use option --with-chtype to override chtype's type
10807 echo "$as_me:10807: checking for type of chtype" >&5
10808 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10809
10810 # Check whether --with-chtype or --without-chtype was given.
10811 if test "${with_chtype+set}" = set; then
10812   withval="$with_chtype"
10813   NCURSES_CHTYPE="$withval"
10814 else
10815   NCURSES_CHTYPE=auto
10816 fi;
10817 echo "$as_me:10817: result: $NCURSES_CHTYPE" >&5
10818 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10819
10820 ###   use option --with-ospeed to override ospeed's type
10821 echo "$as_me:10821: checking for type of ospeed" >&5
10822 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10823
10824 # Check whether --with-ospeed or --without-ospeed was given.
10825 if test "${with_ospeed+set}" = set; then
10826   withval="$with_ospeed"
10827   NCURSES_OSPEED="$withval"
10828 else
10829   NCURSES_OSPEED=short
10830 fi;
10831 echo "$as_me:10831: result: $NCURSES_OSPEED" >&5
10832 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10833
10834 ###   use option --with-mmask-t to override mmask_t's type
10835 echo "$as_me:10835: checking for type of mmask_t" >&5
10836 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10837
10838 # Check whether --with-mmask-t or --without-mmask-t was given.
10839 if test "${with_mmask_t+set}" = set; then
10840   withval="$with_mmask_t"
10841   NCURSES_MMASK_T="$withval"
10842 else
10843   NCURSES_MMASK_T=auto
10844 fi;
10845 echo "$as_me:10845: result: $NCURSES_MMASK_T" >&5
10846 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10847
10848 ###   use option --with-ccharw-max to override CCHARW_MAX size
10849 echo "$as_me:10849: checking for size CCHARW_MAX" >&5
10850 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10851
10852 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10853 if test "${with_ccharw_max+set}" = set; then
10854   withval="$with_ccharw_max"
10855   NCURSES_CCHARW_MAX="$withval"
10856 else
10857   NCURSES_CCHARW_MAX=5
10858 fi;
10859 echo "$as_me:10859: result: $NCURSES_CCHARW_MAX" >&5
10860 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10861
10862 ###   use option --with-tparm-arg to override tparm's argument type
10863 echo "$as_me:10863: checking for type of tparm args" >&5
10864 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10865
10866 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10867 if test "${with_tparm_arg+set}" = set; then
10868   withval="$with_tparm_arg"
10869   NCURSES_TPARM_ARG="$withval"
10870 else
10871   NCURSES_TPARM_ARG=long
10872 fi;
10873 echo "$as_me:10873: result: $NCURSES_TPARM_ARG" >&5
10874 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10875
10876 ### Enable compiling-in rcs id's
10877 echo "$as_me:10877: checking if RCS identifiers should be compiled-in" >&5
10878 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10879
10880 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10881 if test "${with_rcs_ids+set}" = set; then
10882   withval="$with_rcs_ids"
10883   with_rcs_ids=$withval
10884 else
10885   with_rcs_ids=no
10886 fi;
10887 echo "$as_me:10887: result: $with_rcs_ids" >&5
10888 echo "${ECHO_T}$with_rcs_ids" >&6
10889 test "x$with_rcs_ids" = xyes &&
10890 cat >>confdefs.h <<\EOF
10891 #define USE_RCS_IDS 1
10892 EOF
10893
10894 ###############################################################################
10895
10896 echo "$as_me:10896: checking format of man-pages" >&5
10897 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10898
10899 # Check whether --with-manpage-format or --without-manpage-format was given.
10900 if test "${with_manpage_format+set}" = set; then
10901   withval="$with_manpage_format"
10902   MANPAGE_FORMAT=$withval
10903 else
10904   MANPAGE_FORMAT=unknown
10905 fi;
10906
10907 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10908 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10909
10910 cf_unknown=
10911
10912 case $MANPAGE_FORMAT in
10913 unknown)
10914   if test -z "$MANPATH" ; then
10915     MANPATH="/usr/man:/usr/share/man"
10916   fi
10917
10918   # look for the 'date' man-page (it's most likely to be installed!)
10919   MANPAGE_FORMAT=
10920   cf_preform=no
10921   cf_catonly=yes
10922   cf_example=date
10923
10924   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10925   for cf_dir in $MANPATH; do
10926     test -z "$cf_dir" && cf_dir=/usr/man
10927     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
10928     do
10929       cf_test=`echo $cf_name | sed -e 's/*//'`
10930       if test "x$cf_test" = "x$cf_name" ; then
10931
10932         case "$cf_name" in
10933         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10934         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10935         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10936         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10937         esac
10938
10939         case "$cf_name" in
10940         $cf_dir/man*)
10941           cf_catonly=no
10942           ;;
10943         $cf_dir/cat*)
10944           cf_preform=yes
10945           ;;
10946         esac
10947         break
10948       fi
10949
10950       # if we found a match in either man* or cat*, stop looking
10951       if test -n "$MANPAGE_FORMAT" ; then
10952         cf_found=no
10953         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10954         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10955         case "$cf_name" in
10956         $cf_dir/cat*)
10957           cf_found=yes
10958           ;;
10959         esac
10960         test $cf_found=yes && break
10961       fi
10962     done
10963     # only check the first directory in $MANPATH where we find manpages
10964     if test -n "$MANPAGE_FORMAT" ; then
10965        break
10966     fi
10967   done
10968   # if we did not find the example, just assume it is normal
10969   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10970   IFS="$ac_save_ifs"
10971   ;;
10972 *)
10973   for cf_option in $MANPAGE_FORMAT; do
10974      case $cf_option in #(vi
10975      gzip|compress|BSDI|normal|formatted|catonly)
10976        ;;
10977      *)
10978        cf_unknown="$cf_unknown $cf_option"
10979        ;;
10980      esac
10981   done
10982   ;;
10983 esac
10984
10985 echo "$as_me:10985: result: $MANPAGE_FORMAT" >&5
10986 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10987 if test -n "$cf_unknown" ; then
10988   { echo "$as_me:10988: WARNING: Unexpected manpage-format $cf_unknown" >&5
10989 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10990 fi
10991
10992 echo "$as_me:10992: checking for manpage renaming" >&5
10993 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10994
10995 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10996 if test "${with_manpage_renames+set}" = set; then
10997   withval="$with_manpage_renames"
10998   MANPAGE_RENAMES=$withval
10999 else
11000   MANPAGE_RENAMES=yes
11001 fi;
11002
11003 case ".$MANPAGE_RENAMES" in #(vi
11004 .no) #(vi
11005   ;;
11006 .|.yes)
11007   # Debian 'man' program?
11008   if test -f /etc/debian_version ; then
11009     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11010   else
11011     MANPAGE_RENAMES=no
11012   fi
11013   ;;
11014 esac
11015
11016 if test "$MANPAGE_RENAMES" != no ; then
11017   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11018     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11019   elif test ! -f $MANPAGE_RENAMES ; then
11020     { { echo "$as_me:11020: error: not a filename: $MANPAGE_RENAMES" >&5
11021 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11022    { (exit 1); exit 1; }; }
11023   fi
11024
11025   test ! -d man && mkdir man
11026
11027   # Construct a sed-script to perform renaming within man-pages
11028   if test -n "$MANPAGE_RENAMES" ; then
11029     test ! -d man && mkdir man
11030     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11031   fi
11032 fi
11033
11034 echo "$as_me:11034: result: $MANPAGE_RENAMES" >&5
11035 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11036
11037 echo "$as_me:11037: checking if manpage aliases will be installed" >&5
11038 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11039
11040 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11041 if test "${with_manpage_aliases+set}" = set; then
11042   withval="$with_manpage_aliases"
11043   MANPAGE_ALIASES=$withval
11044 else
11045   MANPAGE_ALIASES=yes
11046 fi;
11047
11048 echo "$as_me:11048: result: $MANPAGE_ALIASES" >&5
11049 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11050
11051 case "x$LN_S" in #(vi
11052 xln*) #(vi
11053         cf_use_symlinks=yes
11054         ;;
11055 *)
11056         cf_use_symlinks=no
11057         ;;
11058 esac
11059
11060 MANPAGE_SYMLINKS=no
11061 if test "$MANPAGE_ALIASES" = yes ; then
11062 echo "$as_me:11062: checking if manpage symlinks should be used" >&5
11063 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11064
11065 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11066 if test "${with_manpage_symlinks+set}" = set; then
11067   withval="$with_manpage_symlinks"
11068   MANPAGE_SYMLINKS=$withval
11069 else
11070   MANPAGE_SYMLINKS=$cf_use_symlinks
11071 fi;
11072
11073 if test "$$cf_use_symlinks" = no; then
11074 if test "$MANPAGE_SYMLINKS" = yes ; then
11075         { echo "$as_me:11075: WARNING: cannot make symlinks" >&5
11076 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11077         MANPAGE_SYMLINKS=no
11078 fi
11079 fi
11080
11081 echo "$as_me:11081: result: $MANPAGE_SYMLINKS" >&5
11082 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11083 fi
11084
11085 echo "$as_me:11085: checking for manpage tbl" >&5
11086 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11087
11088 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11089 if test "${with_manpage_tbl+set}" = set; then
11090   withval="$with_manpage_tbl"
11091   MANPAGE_TBL=$withval
11092 else
11093   MANPAGE_TBL=no
11094 fi;
11095
11096 echo "$as_me:11096: result: $MANPAGE_TBL" >&5
11097 echo "${ECHO_T}$MANPAGE_TBL" >&6
11098
11099   if test "$prefix" = "NONE" ; then
11100      cf_prefix="$ac_default_prefix"
11101   else
11102      cf_prefix="$prefix"
11103   fi
11104
11105   case "$MANPAGE_FORMAT" in # (vi
11106   *catonly*) # (vi
11107     cf_format=yes
11108     cf_inboth=no
11109     ;;
11110   *formatted*) # (vi
11111     cf_format=yes
11112     cf_inboth=yes
11113     ;;
11114   *)
11115     cf_format=no
11116     cf_inboth=no
11117     ;;
11118   esac
11119
11120 test ! -d man && mkdir man
11121
11122 cf_so_strip=
11123 cf_compress=
11124 case "$MANPAGE_FORMAT" in #(vi
11125 *compress*) #(vi
11126         cf_so_strip="Z"
11127         cf_compress=compress
11128   ;;
11129 *gzip*)
11130         cf_so_strip="gz"
11131         cf_compress=gzip
11132   ;;
11133 esac
11134
11135 cf_edit_man=./edit_man.sh
11136 cf_man_alias=`pwd`/man_alias.sed
11137
11138 cat >$cf_edit_man <<CF_EOF
11139 #! /bin/sh
11140 # this script is generated by the configure-script CF_MAN_PAGES macro.
11141
11142 prefix="$cf_prefix"
11143 datarootdir="$datarootdir"
11144 datadir="$datadir"
11145
11146 NCURSES_MAJOR="$NCURSES_MAJOR"
11147 NCURSES_MINOR="$NCURSES_MINOR"
11148 NCURSES_PATCH="$NCURSES_PATCH"
11149
11150 NCURSES_OSPEED="$NCURSES_OSPEED"
11151 TERMINFO="$TERMINFO"
11152
11153 INSTALL="$INSTALL"
11154 INSTALL_DATA="$INSTALL_DATA"
11155
11156 transform="$program_transform_name"
11157
11158 TMP=\${TMPDIR:=/tmp}/man\$\$
11159 trap "rm -f \$TMP" 0 1 2 5 15
11160
11161 form=\$1
11162 shift || exit 1
11163
11164 verb=\$1
11165 shift || exit 1
11166
11167 mandir=\$1
11168 shift || exit 1
11169
11170 srcdir=\$1
11171 top_srcdir=\$srcdir/..
11172 shift || exit 1
11173
11174 if test "\$form" = normal ; then
11175         if test "$cf_format" = yes ; then
11176         if test "$cf_inboth" = no ; then
11177                 sh \$0 format \$verb \$mandir \$srcdir \$*
11178                 exit $?
11179         fi
11180         fi
11181         cf_subdir=\$mandir/man
11182         cf_tables=$MANPAGE_TBL
11183 else
11184         cf_subdir=\$mandir/cat
11185         cf_tables=yes
11186 fi
11187
11188 # process the list of source-files
11189 for i in \$* ; do
11190 case \$i in #(vi
11191 *.orig|*.rej) ;; #(vi
11192 *.[0-9]*)
11193         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11194         if test \$verb = installing ; then
11195         if test ! -d \$cf_subdir\${section} ; then
11196                 mkdir -p \$cf_subdir\$section
11197         fi
11198         fi
11199
11200         # replace variables in man page
11201         if test ! -f $cf_man_alias ; then
11202 cat >>$cf_man_alias <<-CF_EOF2
11203                 s,@DATADIR@,\$datadir,g
11204                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11205                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11206                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11207                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11208                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11209                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11210 CF_EOF
11211
11212         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
11213         do
11214                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11215                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11216 cat >>$cf_edit_man <<-CF_EOF
11217                 s,@$cf_NAME@,$cf_name,g
11218 CF_EOF
11219         done
11220
11221 cat >>$cf_edit_man <<CF_EOF
11222 CF_EOF2
11223                 echo "...made $cf_man_alias"
11224         fi
11225
11226         aliases=
11227         cf_source=\`basename \$i\`
11228         inalias=\$cf_source
11229         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11230         if test ! -f \$inalias ; then
11231                 echo .. skipped \$cf_source
11232                 continue
11233         fi
11234 CF_EOF
11235
11236 if test "$MANPAGE_ALIASES" != no ; then
11237 cat >>$cf_edit_man <<CF_EOF
11238         nCurses=ignore.3x
11239         test $with_curses_h = yes && nCurses=ncurses.3x
11240         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11241 CF_EOF
11242 fi
11243
11244 if test "$MANPAGE_RENAMES" = no ; then
11245 cat >>$cf_edit_man <<CF_EOF
11246         # perform program transformations for section 1 man pages
11247         if test \$section = 1 ; then
11248                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11249         else
11250                 cf_target=\$cf_subdir\${section}/\$cf_source
11251         fi
11252 CF_EOF
11253 else
11254 cat >>$cf_edit_man <<CF_EOF
11255         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11256         if test -z "\$cf_target" ; then
11257                 echo '? missing rename for '\$cf_source
11258                 cf_target="\$cf_source"
11259         fi
11260         cf_target="\$cf_subdir\${section}/\${cf_target}"
11261
11262 CF_EOF
11263 fi
11264
11265 cat >>$cf_edit_man <<CF_EOF
11266         sed     -f $cf_man_alias \\
11267 CF_EOF
11268
11269 if test -f $MANPAGE_RENAMES ; then
11270 cat >>$cf_edit_man <<CF_EOF
11271                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11272 CF_EOF
11273 else
11274 cat >>$cf_edit_man <<CF_EOF
11275                 < \$i >\$TMP
11276 CF_EOF
11277 fi
11278
11279 cat >>$cf_edit_man <<CF_EOF
11280 if test \$cf_tables = yes ; then
11281         tbl \$TMP >\$TMP.out
11282         mv \$TMP.out \$TMP
11283 fi
11284 CF_EOF
11285
11286 if test $with_overwrite != yes ; then
11287 cat >>$cf_edit_man <<CF_EOF
11288         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11289         mv \$TMP.out \$TMP
11290 CF_EOF
11291 fi
11292
11293 if test $with_curses_h != yes ; then
11294 cat >>$cf_edit_man <<CF_EOF
11295         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11296         mv \$TMP.out \$TMP
11297 CF_EOF
11298 fi
11299
11300 cat >>$cf_edit_man <<CF_EOF
11301         if test \$form = format ; then
11302                 nroff -man \$TMP >\$TMP.out
11303                 mv \$TMP.out \$TMP
11304         fi
11305 CF_EOF
11306
11307 if test -n "$cf_compress" ; then
11308 cat >>$cf_edit_man <<CF_EOF
11309         if test \$verb = installing ; then
11310         if ( $cf_compress -f \$TMP )
11311         then
11312                 mv \$TMP.$cf_so_strip \$TMP
11313         fi
11314         fi
11315         cf_target="\$cf_target.$cf_so_strip"
11316 CF_EOF
11317 fi
11318
11319 case "$MANPAGE_FORMAT" in #(vi
11320 *BSDI*)
11321 cat >>$cf_edit_man <<CF_EOF
11322         if test \$form = format ; then
11323                 # BSDI installs only .0 suffixes in the cat directories
11324                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11325         fi
11326 CF_EOF
11327   ;;
11328 esac
11329
11330 cat >>$cf_edit_man <<CF_EOF
11331         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11332         if test \$verb = installing ; then
11333                 echo \$verb \$cf_target
11334                 \$INSTALL_DATA \$TMP \$cf_target
11335                 test -d \$cf_subdir\${section} &&
11336                 test -n "\$aliases" && (
11337                         cd \$cf_subdir\${section} && (
11338                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11339                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11340                                 cf_target=\`basename \$cf_target\`
11341                                 for cf_alias in \$aliases
11342                                 do
11343                                         if test \$section = 1 ; then
11344                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11345                                         fi
11346
11347                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11348                                                 if test -f \$cf_alias\${suffix} ; then
11349                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11350                                                         then
11351                                                                 continue
11352                                                         fi
11353                                                 fi
11354                                                 echo .. \$verb alias \$cf_alias\${suffix}
11355 CF_EOF
11356 case "x$LN_S" in #(vi
11357 *-f) #(vi
11358 cat >>$cf_edit_man <<CF_EOF
11359                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11360 CF_EOF
11361         ;;
11362 *)
11363 cat >>$cf_edit_man <<CF_EOF
11364                                                 rm -f \$cf_alias\${suffix}
11365                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11366 CF_EOF
11367         ;;
11368 esac
11369 cat >>$cf_edit_man <<CF_EOF
11370                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11371                                                 echo ".so \$cf_source" >\$TMP
11372 CF_EOF
11373 if test -n "$cf_compress" ; then
11374 cat >>$cf_edit_man <<CF_EOF
11375                                                 if test -n "$cf_so_strip" ; then
11376                                                         $cf_compress -f \$TMP
11377                                                         mv \$TMP.$cf_so_strip \$TMP
11378                                                 fi
11379 CF_EOF
11380 fi
11381 cat >>$cf_edit_man <<CF_EOF
11382                                                 echo .. \$verb alias \$cf_alias\${suffix}
11383                                                 rm -f \$cf_alias\${suffix}
11384                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11385                                         fi
11386                                 done
11387                         )
11388                 )
11389         elif test \$verb = removing ; then
11390                 test -f \$cf_target && (
11391                         echo \$verb \$cf_target
11392                         rm -f \$cf_target
11393                 )
11394                 test -d \$cf_subdir\${section} &&
11395                 test -n "\$aliases" && (
11396                         cd \$cf_subdir\${section} && (
11397                                 for cf_alias in \$aliases
11398                                 do
11399                                         if test \$section = 1 ; then
11400                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11401                                         fi
11402
11403                                         echo .. \$verb alias \$cf_alias\${suffix}
11404                                         rm -f \$cf_alias\${suffix}
11405                                 done
11406                         )
11407                 )
11408         else
11409 #               echo ".hy 0"
11410                 cat \$TMP
11411         fi
11412         ;;
11413 esac
11414 done
11415
11416 if test $cf_inboth = yes ; then
11417 if test \$form != format ; then
11418         sh \$0 format \$verb \$mandir \$srcdir \$*
11419 fi
11420 fi
11421
11422 exit 0
11423 CF_EOF
11424 chmod 755 $cf_edit_man
11425
11426 ###############################################################################
11427
11428 ### Note that some functions (such as const) are normally disabled anyway.
11429 echo "$as_me:11429: checking if you want to build with function extensions" >&5
11430 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11431
11432 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11433 if test "${enable_ext_funcs+set}" = set; then
11434   enableval="$enable_ext_funcs"
11435   with_ext_funcs=$enableval
11436 else
11437   with_ext_funcs=yes
11438 fi;
11439 echo "$as_me:11439: result: $with_ext_funcs" >&5
11440 echo "${ECHO_T}$with_ext_funcs" >&6
11441 if test "x$with_ext_funcs" = xyes ; then
11442         NCURSES_EXT_FUNCS=1
11443
11444 cat >>confdefs.h <<\EOF
11445 #define HAVE_ASSUME_DEFAULT_COLORS 1
11446 EOF
11447
11448 cat >>confdefs.h <<\EOF
11449 #define HAVE_CURSES_VERSION 1
11450 EOF
11451
11452 cat >>confdefs.h <<\EOF
11453 #define HAVE_HAS_KEY 1
11454 EOF
11455
11456 cat >>confdefs.h <<\EOF
11457 #define HAVE_RESIZETERM 1
11458 EOF
11459
11460 cat >>confdefs.h <<\EOF
11461 #define HAVE_RESIZE_TERM 1
11462 EOF
11463
11464 cat >>confdefs.h <<\EOF
11465 #define HAVE_TERM_ENTRY_H 1
11466 EOF
11467
11468 cat >>confdefs.h <<\EOF
11469 #define HAVE_USE_DEFAULT_COLORS 1
11470 EOF
11471
11472 cat >>confdefs.h <<\EOF
11473 #define HAVE_USE_SCREEN 1
11474 EOF
11475
11476 cat >>confdefs.h <<\EOF
11477 #define HAVE_USE_WINDOW 1
11478 EOF
11479
11480 cat >>confdefs.h <<\EOF
11481 #define HAVE_WRESIZE 1
11482 EOF
11483
11484 cat >>confdefs.h <<\EOF
11485 #define NCURSES_EXT_FUNCS 1
11486 EOF
11487
11488         GENERATED_EXT_FUNCS=generated
11489 else
11490         NCURSES_EXT_FUNCS=0
11491         GENERATED_EXT_FUNCS=
11492 fi
11493
11494 echo "$as_me:11494: checking if you want to build with experimental SCREEN extensions" >&5
11495 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
11496
11497 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11498 if test "${enable_sp_funcs+set}" = set; then
11499   enableval="$enable_sp_funcs"
11500   with_sp_funcs=$enableval
11501 else
11502   with_sp_funcs=no
11503 fi;
11504 echo "$as_me:11504: result: $with_sp_funcs" >&5
11505 echo "${ECHO_T}$with_sp_funcs" >&6
11506 if test "x$with_sp_funcs" = xyes ; then
11507         NCURSES_SP_FUNCS=1
11508
11509 cat >>confdefs.h <<\EOF
11510 #define NCURSES_SP_FUNCS 1
11511 EOF
11512
11513         GENERATED_SP_FUNCS=generated
11514 else
11515         NCURSES_SP_FUNCS=0
11516         GENERATED_SP_FUNCS=
11517 fi
11518
11519 echo "$as_me:11519: checking if you want to build with experimental terminal-driver" >&5
11520 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
11521
11522 # Check whether --enable-term-driver or --disable-term-driver was given.
11523 if test "${enable_term_driver+set}" = set; then
11524   enableval="$enable_term_driver"
11525   with_term_driver=$enableval
11526 else
11527   with_term_driver=no
11528 fi;
11529 echo "$as_me:11529: result: $with_term_driver" >&5
11530 echo "${ECHO_T}$with_term_driver" >&6
11531 if test "x$with_term_driver" = xyes ; then
11532
11533 cat >>confdefs.h <<\EOF
11534 #define USE_TERM_DRIVER 1
11535 EOF
11536
11537         if test "x$with_sp_funcs" != xyes ; then
11538                 { { echo "$as_me:11538: error: The term-driver option relies upon sp-funcs" >&5
11539 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11540    { (exit 1); exit 1; }; }
11541         fi
11542 fi
11543
11544 ###   use option --enable-const to turn on use of const beyond that in XSI.
11545 echo "$as_me:11545: checking for extended use of const keyword" >&5
11546 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11547
11548 # Check whether --enable-const or --disable-const was given.
11549 if test "${enable_const+set}" = set; then
11550   enableval="$enable_const"
11551   with_ext_const=$enableval
11552 else
11553   with_ext_const=no
11554 fi;
11555 echo "$as_me:11555: result: $with_ext_const" >&5
11556 echo "${ECHO_T}$with_ext_const" >&6
11557 NCURSES_CONST='/*nothing*/'
11558 if test "x$with_ext_const" = xyes ; then
11559         NCURSES_CONST=const
11560 fi
11561
11562 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11563 echo "$as_me:11563: checking if you want to use extended colors" >&5
11564 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11565
11566 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11567 if test "${enable_ext_colors+set}" = set; then
11568   enableval="$enable_ext_colors"
11569   with_ext_colors=$enableval
11570 else
11571   with_ext_colors=no
11572 fi;
11573 echo "$as_me:11573: result: $with_ext_colors" >&5
11574 echo "${ECHO_T}$with_ext_colors" >&6
11575 NCURSES_EXT_COLORS=0
11576 if test "x$with_ext_colors" = xyes ; then
11577         if test "x$with_widec" != xyes ; then
11578                 { { echo "$as_me:11578: error: This option applies only to wide-character library" >&5
11579 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11580    { (exit 1); exit 1; }; }
11581         else
11582                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11583
11584 if test "${with_abi_version+set}" != set; then
11585         case $cf_cv_rel_version in
11586         5.*)
11587                 cf_cv_rel_version=6.0
11588                 cf_cv_abi_version=6
11589                 { echo "$as_me:11589: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11590 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11591                 ;;
11592         esac
11593 fi
11594
11595         fi
11596         NCURSES_EXT_COLORS=1
11597
11598 cat >>confdefs.h <<\EOF
11599 #define NCURSES_EXT_COLORS 1
11600 EOF
11601
11602 fi
11603
11604 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11605 echo "$as_me:11605: checking if you want to use extended mouse encoding" >&5
11606 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11607
11608 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11609 if test "${enable_ext_mouse+set}" = set; then
11610   enableval="$enable_ext_mouse"
11611   with_ext_mouse=$enableval
11612 else
11613   with_ext_mouse=no
11614 fi;
11615 echo "$as_me:11615: result: $with_ext_mouse" >&5
11616 echo "${ECHO_T}$with_ext_mouse" >&6
11617 NCURSES_MOUSE_VERSION=1
11618 if test "x$with_ext_mouse" = xyes ; then
11619         NCURSES_MOUSE_VERSION=2
11620
11621 if test "${with_abi_version+set}" != set; then
11622         case $cf_cv_rel_version in
11623         5.*)
11624                 cf_cv_rel_version=6.0
11625                 cf_cv_abi_version=6
11626                 { echo "$as_me:11626: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11627 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11628                 ;;
11629         esac
11630 fi
11631
11632 fi
11633
11634 echo "$as_me:11634: checking if you want \$NCURSES_NO_PADDING code" >&5
11635 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11636
11637 # Check whether --enable-no-padding or --disable-no-padding was given.
11638 if test "${enable_no_padding+set}" = set; then
11639   enableval="$enable_no_padding"
11640   with_no_padding=$enableval
11641 else
11642   with_no_padding=$with_ext_funcs
11643 fi;
11644 echo "$as_me:11644: result: $with_no_padding" >&5
11645 echo "${ECHO_T}$with_no_padding" >&6
11646 test "x$with_no_padding" = xyes &&
11647 cat >>confdefs.h <<\EOF
11648 #define NCURSES_NO_PADDING 1
11649 EOF
11650
11651 echo "$as_me:11651: checking for ANSI C header files" >&5
11652 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11653 if test "${ac_cv_header_stdc+set}" = set; then
11654   echo $ECHO_N "(cached) $ECHO_C" >&6
11655 else
11656   cat >conftest.$ac_ext <<_ACEOF
11657 #line 11657 "configure"
11658 #include "confdefs.h"
11659 #include <stdlib.h>
11660 #include <stdarg.h>
11661 #include <string.h>
11662 #include <float.h>
11663
11664 _ACEOF
11665 if { (eval echo "$as_me:11665: \"$ac_cpp conftest.$ac_ext\"") >&5
11666   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11667   ac_status=$?
11668   egrep -v '^ *\+' conftest.er1 >conftest.err
11669   rm -f conftest.er1
11670   cat conftest.err >&5
11671   echo "$as_me:11671: \$? = $ac_status" >&5
11672   (exit $ac_status); } >/dev/null; then
11673   if test -s conftest.err; then
11674     ac_cpp_err=$ac_c_preproc_warn_flag
11675   else
11676     ac_cpp_err=
11677   fi
11678 else
11679   ac_cpp_err=yes
11680 fi
11681 if test -z "$ac_cpp_err"; then
11682   ac_cv_header_stdc=yes
11683 else
11684   echo "$as_me: failed program was:" >&5
11685   cat conftest.$ac_ext >&5
11686   ac_cv_header_stdc=no
11687 fi
11688 rm -f conftest.err conftest.$ac_ext
11689
11690 if test $ac_cv_header_stdc = yes; then
11691   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11692   cat >conftest.$ac_ext <<_ACEOF
11693 #line 11693 "configure"
11694 #include "confdefs.h"
11695 #include <string.h>
11696
11697 _ACEOF
11698 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11699   egrep "memchr" >/dev/null 2>&1; then
11700   :
11701 else
11702   ac_cv_header_stdc=no
11703 fi
11704 rm -rf conftest*
11705
11706 fi
11707
11708 if test $ac_cv_header_stdc = yes; then
11709   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11710   cat >conftest.$ac_ext <<_ACEOF
11711 #line 11711 "configure"
11712 #include "confdefs.h"
11713 #include <stdlib.h>
11714
11715 _ACEOF
11716 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11717   egrep "free" >/dev/null 2>&1; then
11718   :
11719 else
11720   ac_cv_header_stdc=no
11721 fi
11722 rm -rf conftest*
11723
11724 fi
11725
11726 if test $ac_cv_header_stdc = yes; then
11727   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11728   if test "$cross_compiling" = yes; then
11729   :
11730 else
11731   cat >conftest.$ac_ext <<_ACEOF
11732 #line 11732 "configure"
11733 #include "confdefs.h"
11734 #include <ctype.h>
11735 #if ((' ' & 0x0FF) == 0x020)
11736 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11737 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11738 #else
11739 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11740                      || ('j' <= (c) && (c) <= 'r') \
11741                      || ('s' <= (c) && (c) <= 'z'))
11742 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11743 #endif
11744
11745 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11746 int
11747 main ()
11748 {
11749   int i;
11750   for (i = 0; i < 256; i++)
11751     if (XOR (islower (i), ISLOWER (i))
11752         || toupper (i) != TOUPPER (i))
11753       $ac_main_return(2);
11754   $ac_main_return (0);
11755 }
11756 _ACEOF
11757 rm -f conftest$ac_exeext
11758 if { (eval echo "$as_me:11758: \"$ac_link\"") >&5
11759   (eval $ac_link) 2>&5
11760   ac_status=$?
11761   echo "$as_me:11761: \$? = $ac_status" >&5
11762   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11763   { (eval echo "$as_me:11763: \"$ac_try\"") >&5
11764   (eval $ac_try) 2>&5
11765   ac_status=$?
11766   echo "$as_me:11766: \$? = $ac_status" >&5
11767   (exit $ac_status); }; }; then
11768   :
11769 else
11770   echo "$as_me: program exited with status $ac_status" >&5
11771 echo "$as_me: failed program was:" >&5
11772 cat conftest.$ac_ext >&5
11773 ac_cv_header_stdc=no
11774 fi
11775 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11776 fi
11777 fi
11778 fi
11779 echo "$as_me:11779: result: $ac_cv_header_stdc" >&5
11780 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11781 if test $ac_cv_header_stdc = yes; then
11782
11783 cat >>confdefs.h <<\EOF
11784 #define STDC_HEADERS 1
11785 EOF
11786
11787 fi
11788
11789 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11790
11791 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11792                   inttypes.h stdint.h unistd.h
11793 do
11794 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11795 echo "$as_me:11795: checking for $ac_header" >&5
11796 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11797 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11798   echo $ECHO_N "(cached) $ECHO_C" >&6
11799 else
11800   cat >conftest.$ac_ext <<_ACEOF
11801 #line 11801 "configure"
11802 #include "confdefs.h"
11803 $ac_includes_default
11804 #include <$ac_header>
11805 _ACEOF
11806 rm -f conftest.$ac_objext
11807 if { (eval echo "$as_me:11807: \"$ac_compile\"") >&5
11808   (eval $ac_compile) 2>&5
11809   ac_status=$?
11810   echo "$as_me:11810: \$? = $ac_status" >&5
11811   (exit $ac_status); } &&
11812          { ac_try='test -s conftest.$ac_objext'
11813   { (eval echo "$as_me:11813: \"$ac_try\"") >&5
11814   (eval $ac_try) 2>&5
11815   ac_status=$?
11816   echo "$as_me:11816: \$? = $ac_status" >&5
11817   (exit $ac_status); }; }; then
11818   eval "$as_ac_Header=yes"
11819 else
11820   echo "$as_me: failed program was:" >&5
11821 cat conftest.$ac_ext >&5
11822 eval "$as_ac_Header=no"
11823 fi
11824 rm -f conftest.$ac_objext conftest.$ac_ext
11825 fi
11826 echo "$as_me:11826: result: `eval echo '${'$as_ac_Header'}'`" >&5
11827 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11828 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11829   cat >>confdefs.h <<EOF
11830 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11831 EOF
11832
11833 fi
11834 done
11835
11836 echo "$as_me:11836: checking for signed char" >&5
11837 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11838 if test "${ac_cv_type_signed_char+set}" = set; then
11839   echo $ECHO_N "(cached) $ECHO_C" >&6
11840 else
11841   cat >conftest.$ac_ext <<_ACEOF
11842 #line 11842 "configure"
11843 #include "confdefs.h"
11844 $ac_includes_default
11845 int
11846 main ()
11847 {
11848 if ((signed char *) 0)
11849   return 0;
11850 if (sizeof (signed char))
11851   return 0;
11852   ;
11853   return 0;
11854 }
11855 _ACEOF
11856 rm -f conftest.$ac_objext
11857 if { (eval echo "$as_me:11857: \"$ac_compile\"") >&5
11858   (eval $ac_compile) 2>&5
11859   ac_status=$?
11860   echo "$as_me:11860: \$? = $ac_status" >&5
11861   (exit $ac_status); } &&
11862          { ac_try='test -s conftest.$ac_objext'
11863   { (eval echo "$as_me:11863: \"$ac_try\"") >&5
11864   (eval $ac_try) 2>&5
11865   ac_status=$?
11866   echo "$as_me:11866: \$? = $ac_status" >&5
11867   (exit $ac_status); }; }; then
11868   ac_cv_type_signed_char=yes
11869 else
11870   echo "$as_me: failed program was:" >&5
11871 cat conftest.$ac_ext >&5
11872 ac_cv_type_signed_char=no
11873 fi
11874 rm -f conftest.$ac_objext conftest.$ac_ext
11875 fi
11876 echo "$as_me:11876: result: $ac_cv_type_signed_char" >&5
11877 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11878
11879 echo "$as_me:11879: checking size of signed char" >&5
11880 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11881 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11882   echo $ECHO_N "(cached) $ECHO_C" >&6
11883 else
11884   if test "$ac_cv_type_signed_char" = yes; then
11885   if test "$cross_compiling" = yes; then
11886   # Depending upon the size, compute the lo and hi bounds.
11887 cat >conftest.$ac_ext <<_ACEOF
11888 #line 11888 "configure"
11889 #include "confdefs.h"
11890 $ac_includes_default
11891 int
11892 main ()
11893 {
11894 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11895   ;
11896   return 0;
11897 }
11898 _ACEOF
11899 rm -f conftest.$ac_objext
11900 if { (eval echo "$as_me:11900: \"$ac_compile\"") >&5
11901   (eval $ac_compile) 2>&5
11902   ac_status=$?
11903   echo "$as_me:11903: \$? = $ac_status" >&5
11904   (exit $ac_status); } &&
11905          { ac_try='test -s conftest.$ac_objext'
11906   { (eval echo "$as_me:11906: \"$ac_try\"") >&5
11907   (eval $ac_try) 2>&5
11908   ac_status=$?
11909   echo "$as_me:11909: \$? = $ac_status" >&5
11910   (exit $ac_status); }; }; then
11911   ac_lo=0 ac_mid=0
11912   while :; do
11913     cat >conftest.$ac_ext <<_ACEOF
11914 #line 11914 "configure"
11915 #include "confdefs.h"
11916 $ac_includes_default
11917 int
11918 main ()
11919 {
11920 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11921   ;
11922   return 0;
11923 }
11924 _ACEOF
11925 rm -f conftest.$ac_objext
11926 if { (eval echo "$as_me:11926: \"$ac_compile\"") >&5
11927   (eval $ac_compile) 2>&5
11928   ac_status=$?
11929   echo "$as_me:11929: \$? = $ac_status" >&5
11930   (exit $ac_status); } &&
11931          { ac_try='test -s conftest.$ac_objext'
11932   { (eval echo "$as_me:11932: \"$ac_try\"") >&5
11933   (eval $ac_try) 2>&5
11934   ac_status=$?
11935   echo "$as_me:11935: \$? = $ac_status" >&5
11936   (exit $ac_status); }; }; then
11937   ac_hi=$ac_mid; break
11938 else
11939   echo "$as_me: failed program was:" >&5
11940 cat conftest.$ac_ext >&5
11941 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11942 fi
11943 rm -f conftest.$ac_objext conftest.$ac_ext
11944   done
11945 else
11946   echo "$as_me: failed program was:" >&5
11947 cat conftest.$ac_ext >&5
11948 ac_hi=-1 ac_mid=-1
11949   while :; do
11950     cat >conftest.$ac_ext <<_ACEOF
11951 #line 11951 "configure"
11952 #include "confdefs.h"
11953 $ac_includes_default
11954 int
11955 main ()
11956 {
11957 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11958   ;
11959   return 0;
11960 }
11961 _ACEOF
11962 rm -f conftest.$ac_objext
11963 if { (eval echo "$as_me:11963: \"$ac_compile\"") >&5
11964   (eval $ac_compile) 2>&5
11965   ac_status=$?
11966   echo "$as_me:11966: \$? = $ac_status" >&5
11967   (exit $ac_status); } &&
11968          { ac_try='test -s conftest.$ac_objext'
11969   { (eval echo "$as_me:11969: \"$ac_try\"") >&5
11970   (eval $ac_try) 2>&5
11971   ac_status=$?
11972   echo "$as_me:11972: \$? = $ac_status" >&5
11973   (exit $ac_status); }; }; then
11974   ac_lo=$ac_mid; break
11975 else
11976   echo "$as_me: failed program was:" >&5
11977 cat conftest.$ac_ext >&5
11978 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11979 fi
11980 rm -f conftest.$ac_objext conftest.$ac_ext
11981   done
11982 fi
11983 rm -f conftest.$ac_objext conftest.$ac_ext
11984 # Binary search between lo and hi bounds.
11985 while test "x$ac_lo" != "x$ac_hi"; do
11986   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11987   cat >conftest.$ac_ext <<_ACEOF
11988 #line 11988 "configure"
11989 #include "confdefs.h"
11990 $ac_includes_default
11991 int
11992 main ()
11993 {
11994 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11995   ;
11996   return 0;
11997 }
11998 _ACEOF
11999 rm -f conftest.$ac_objext
12000 if { (eval echo "$as_me:12000: \"$ac_compile\"") >&5
12001   (eval $ac_compile) 2>&5
12002   ac_status=$?
12003   echo "$as_me:12003: \$? = $ac_status" >&5
12004   (exit $ac_status); } &&
12005          { ac_try='test -s conftest.$ac_objext'
12006   { (eval echo "$as_me:12006: \"$ac_try\"") >&5
12007   (eval $ac_try) 2>&5
12008   ac_status=$?
12009   echo "$as_me:12009: \$? = $ac_status" >&5
12010   (exit $ac_status); }; }; then
12011   ac_hi=$ac_mid
12012 else
12013   echo "$as_me: failed program was:" >&5
12014 cat conftest.$ac_ext >&5
12015 ac_lo=`expr $ac_mid + 1`
12016 fi
12017 rm -f conftest.$ac_objext conftest.$ac_ext
12018 done
12019 ac_cv_sizeof_signed_char=$ac_lo
12020 else
12021   if test "$cross_compiling" = yes; then
12022   { { echo "$as_me:12022: error: cannot run test program while cross compiling" >&5
12023 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12024    { (exit 1); exit 1; }; }
12025 else
12026   cat >conftest.$ac_ext <<_ACEOF
12027 #line 12027 "configure"
12028 #include "confdefs.h"
12029 $ac_includes_default
12030 int
12031 main ()
12032 {
12033 FILE *f = fopen ("conftest.val", "w");
12034 if (!f)
12035   $ac_main_return (1);
12036 fprintf (f, "%d", (sizeof (signed char)));
12037 fclose (f);
12038   ;
12039   return 0;
12040 }
12041 _ACEOF
12042 rm -f conftest$ac_exeext
12043 if { (eval echo "$as_me:12043: \"$ac_link\"") >&5
12044   (eval $ac_link) 2>&5
12045   ac_status=$?
12046   echo "$as_me:12046: \$? = $ac_status" >&5
12047   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12048   { (eval echo "$as_me:12048: \"$ac_try\"") >&5
12049   (eval $ac_try) 2>&5
12050   ac_status=$?
12051   echo "$as_me:12051: \$? = $ac_status" >&5
12052   (exit $ac_status); }; }; then
12053   ac_cv_sizeof_signed_char=`cat conftest.val`
12054 else
12055   echo "$as_me: program exited with status $ac_status" >&5
12056 echo "$as_me: failed program was:" >&5
12057 cat conftest.$ac_ext >&5
12058 fi
12059 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12060 fi
12061 fi
12062 rm -f conftest.val
12063 else
12064   ac_cv_sizeof_signed_char=0
12065 fi
12066 fi
12067 echo "$as_me:12067: result: $ac_cv_sizeof_signed_char" >&5
12068 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12069 cat >>confdefs.h <<EOF
12070 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12071 EOF
12072
12073 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12074         NCURSES_SBOOL="signed char"
12075 else
12076         NCURSES_SBOOL="char"
12077 fi
12078 echo "$as_me:12078: checking if you want to use signed Boolean array in term.h" >&5
12079 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12080
12081 # Check whether --enable-signed-char or --disable-signed-char was given.
12082 if test "${enable_signed_char+set}" = set; then
12083   enableval="$enable_signed_char"
12084   with_signed_char=$enableval
12085 else
12086   with_signed_char=no
12087 fi;
12088 echo "$as_me:12088: result: $with_signed_char" >&5
12089 echo "${ECHO_T}$with_signed_char" >&6
12090 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12091
12092 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12093 echo "$as_me:12093: checking if you want SIGWINCH handler" >&5
12094 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12095
12096 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12097 if test "${enable_sigwinch+set}" = set; then
12098   enableval="$enable_sigwinch"
12099   with_sigwinch=$enableval
12100 else
12101   with_sigwinch=$with_ext_funcs
12102 fi;
12103 echo "$as_me:12103: result: $with_sigwinch" >&5
12104 echo "${ECHO_T}$with_sigwinch" >&6
12105 test "x$with_sigwinch" = xyes &&
12106 cat >>confdefs.h <<\EOF
12107 #define USE_SIGWINCH 1
12108 EOF
12109
12110 ###   use option --enable-tcap-names to allow user to define new capabilities
12111 echo "$as_me:12111: checking if you want user-definable terminal capabilities like termcap" >&5
12112 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12113
12114 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12115 if test "${enable_tcap_names+set}" = set; then
12116   enableval="$enable_tcap_names"
12117   with_tcap_names=$enableval
12118 else
12119   with_tcap_names=$with_ext_funcs
12120 fi;
12121 echo "$as_me:12121: result: $with_tcap_names" >&5
12122 echo "${ECHO_T}$with_tcap_names" >&6
12123 NCURSES_XNAMES=0
12124 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12125
12126 ###############################################################################
12127 # These options are relatively safe to experiment with.
12128
12129 echo "$as_me:12129: checking if you want all development code" >&5
12130 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12131
12132 # Check whether --with-develop or --without-develop was given.
12133 if test "${with_develop+set}" = set; then
12134   withval="$with_develop"
12135   with_develop=$withval
12136 else
12137   with_develop=no
12138 fi;
12139 echo "$as_me:12139: result: $with_develop" >&5
12140 echo "${ECHO_T}$with_develop" >&6
12141
12142 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12143 echo "$as_me:12143: checking if you want hard-tabs code" >&5
12144 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12145
12146 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12147 if test "${enable_hard_tabs+set}" = set; then
12148   enableval="$enable_hard_tabs"
12149
12150 else
12151   enable_hard_tabs=$with_develop
12152 fi;
12153 echo "$as_me:12153: result: $enable_hard_tabs" >&5
12154 echo "${ECHO_T}$enable_hard_tabs" >&6
12155 test "x$enable_hard_tabs" = xyes &&
12156 cat >>confdefs.h <<\EOF
12157 #define USE_HARD_TABS 1
12158 EOF
12159
12160 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12161 echo "$as_me:12161: checking if you want limited support for xmc" >&5
12162 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12163
12164 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12165 if test "${enable_xmc_glitch+set}" = set; then
12166   enableval="$enable_xmc_glitch"
12167
12168 else
12169   enable_xmc_glitch=$with_develop
12170 fi;
12171 echo "$as_me:12171: result: $enable_xmc_glitch" >&5
12172 echo "${ECHO_T}$enable_xmc_glitch" >&6
12173 test "x$enable_xmc_glitch" = xyes &&
12174 cat >>confdefs.h <<\EOF
12175 #define USE_XMC_SUPPORT 1
12176 EOF
12177
12178 ###############################################################################
12179 # These are just experimental, probably should not be in a package:
12180
12181 echo "$as_me:12181: checking if you do not want to assume colors are white-on-black" >&5
12182 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12183
12184 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12185 if test "${enable_assumed_color+set}" = set; then
12186   enableval="$enable_assumed_color"
12187   with_assumed_color=$enableval
12188 else
12189   with_assumed_color=yes
12190 fi;
12191 echo "$as_me:12191: result: $with_assumed_color" >&5
12192 echo "${ECHO_T}$with_assumed_color" >&6
12193 test "x$with_assumed_color" = xyes &&
12194 cat >>confdefs.h <<\EOF
12195 #define USE_ASSUMED_COLOR 1
12196 EOF
12197
12198 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12199 echo "$as_me:12199: checking if you want hashmap scrolling-optimization code" >&5
12200 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12201
12202 # Check whether --enable-hashmap or --disable-hashmap was given.
12203 if test "${enable_hashmap+set}" = set; then
12204   enableval="$enable_hashmap"
12205   with_hashmap=$enableval
12206 else
12207   with_hashmap=yes
12208 fi;
12209 echo "$as_me:12209: result: $with_hashmap" >&5
12210 echo "${ECHO_T}$with_hashmap" >&6
12211 test "x$with_hashmap" = xyes &&
12212 cat >>confdefs.h <<\EOF
12213 #define USE_HASHMAP 1
12214 EOF
12215
12216 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12217 echo "$as_me:12217: checking if you want colorfgbg code" >&5
12218 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12219
12220 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12221 if test "${enable_colorfgbg+set}" = set; then
12222   enableval="$enable_colorfgbg"
12223   with_colorfgbg=$enableval
12224 else
12225   with_colorfgbg=no
12226 fi;
12227 echo "$as_me:12227: result: $with_colorfgbg" >&5
12228 echo "${ECHO_T}$with_colorfgbg" >&6
12229 test "x$with_colorfgbg" = xyes &&
12230 cat >>confdefs.h <<\EOF
12231 #define USE_COLORFGBG 1
12232 EOF
12233
12234 ###   use option --enable-interop to turn on use of bindings used for interop
12235 echo "$as_me:12235: checking if you want interop bindings" >&5
12236 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12237
12238 # Check whether --enable-interop or --disable-interop was given.
12239 if test "${enable_interop+set}" = set; then
12240   enableval="$enable_interop"
12241   with_exp_interop=$enableval
12242 else
12243   with_exp_interop=no
12244 fi;
12245 echo "$as_me:12245: result: $with_exp_interop" >&5
12246 echo "${ECHO_T}$with_exp_interop" >&6
12247
12248 NCURSES_INTEROP_FUNCS=0
12249 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12250
12251 # This is still experimental (20080329), but should ultimately be moved to
12252 # the script-block --with-normal, etc.
12253
12254 echo "$as_me:12254: checking if you want to link with the pthread library" >&5
12255 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12256
12257 # Check whether --with-pthread or --without-pthread was given.
12258 if test "${with_pthread+set}" = set; then
12259   withval="$with_pthread"
12260   with_pthread=$withval
12261 else
12262   with_pthread=no
12263 fi;
12264 echo "$as_me:12264: result: $with_pthread" >&5
12265 echo "${ECHO_T}$with_pthread" >&6
12266
12267 if test "$with_pthread" != no ; then
12268     echo "$as_me:12268: checking for pthread.h" >&5
12269 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12270 if test "${ac_cv_header_pthread_h+set}" = set; then
12271   echo $ECHO_N "(cached) $ECHO_C" >&6
12272 else
12273   cat >conftest.$ac_ext <<_ACEOF
12274 #line 12274 "configure"
12275 #include "confdefs.h"
12276 #include <pthread.h>
12277 _ACEOF
12278 if { (eval echo "$as_me:12278: \"$ac_cpp conftest.$ac_ext\"") >&5
12279   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12280   ac_status=$?
12281   egrep -v '^ *\+' conftest.er1 >conftest.err
12282   rm -f conftest.er1
12283   cat conftest.err >&5
12284   echo "$as_me:12284: \$? = $ac_status" >&5
12285   (exit $ac_status); } >/dev/null; then
12286   if test -s conftest.err; then
12287     ac_cpp_err=$ac_c_preproc_warn_flag
12288   else
12289     ac_cpp_err=
12290   fi
12291 else
12292   ac_cpp_err=yes
12293 fi
12294 if test -z "$ac_cpp_err"; then
12295   ac_cv_header_pthread_h=yes
12296 else
12297   echo "$as_me: failed program was:" >&5
12298   cat conftest.$ac_ext >&5
12299   ac_cv_header_pthread_h=no
12300 fi
12301 rm -f conftest.err conftest.$ac_ext
12302 fi
12303 echo "$as_me:12303: result: $ac_cv_header_pthread_h" >&5
12304 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12305 if test $ac_cv_header_pthread_h = yes; then
12306
12307 cat >>confdefs.h <<\EOF
12308 #define HAVE_PTHREADS_H 1
12309 EOF
12310
12311         for cf_lib_pthread in pthread c_r
12312         do
12313             echo "$as_me:12313: checking if we can link with the $cf_lib_pthread library" >&5
12314 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12315             cf_save_LIBS="$LIBS"
12316
12317 cf_add_libs="-l$cf_lib_pthread"
12318 # Filter out duplicates - this happens with badly-designed ".pc" files...
12319 for cf_add_1lib in $LIBS
12320 do
12321         for cf_add_2lib in $cf_add_libs
12322         do
12323                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12324                 then
12325                         cf_add_1lib=
12326                         break
12327                 fi
12328         done
12329         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12330 done
12331 LIBS="$cf_add_libs"
12332
12333             cat >conftest.$ac_ext <<_ACEOF
12334 #line 12334 "configure"
12335 #include "confdefs.h"
12336
12337 #include <pthread.h>
12338
12339 int
12340 main ()
12341 {
12342
12343                 int rc = pthread_create(0,0,0,0);
12344                 int r2 = pthread_mutexattr_settype(0, 0);
12345
12346   ;
12347   return 0;
12348 }
12349 _ACEOF
12350 rm -f conftest.$ac_objext conftest$ac_exeext
12351 if { (eval echo "$as_me:12351: \"$ac_link\"") >&5
12352   (eval $ac_link) 2>&5
12353   ac_status=$?
12354   echo "$as_me:12354: \$? = $ac_status" >&5
12355   (exit $ac_status); } &&
12356          { ac_try='test -s conftest$ac_exeext'
12357   { (eval echo "$as_me:12357: \"$ac_try\"") >&5
12358   (eval $ac_try) 2>&5
12359   ac_status=$?
12360   echo "$as_me:12360: \$? = $ac_status" >&5
12361   (exit $ac_status); }; }; then
12362   with_pthread=yes
12363 else
12364   echo "$as_me: failed program was:" >&5
12365 cat conftest.$ac_ext >&5
12366 with_pthread=no
12367 fi
12368 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12369             LIBS="$cf_save_LIBS"
12370             echo "$as_me:12370: result: $with_pthread" >&5
12371 echo "${ECHO_T}$with_pthread" >&6
12372             test "$with_pthread" = yes && break
12373         done
12374
12375         if test "$with_pthread" = yes ; then
12376
12377 cf_add_libs="-l$cf_lib_pthread"
12378 # Filter out duplicates - this happens with badly-designed ".pc" files...
12379 for cf_add_1lib in $LIBS
12380 do
12381         for cf_add_2lib in $cf_add_libs
12382         do
12383                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12384                 then
12385                         cf_add_1lib=
12386                         break
12387                 fi
12388         done
12389         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12390 done
12391 LIBS="$cf_add_libs"
12392
12393 cat >>confdefs.h <<\EOF
12394 #define HAVE_LIBPTHREADS 1
12395 EOF
12396
12397         else
12398             { { echo "$as_me:12398: error: Cannot link with pthread library" >&5
12399 echo "$as_me: error: Cannot link with pthread library" >&2;}
12400    { (exit 1); exit 1; }; }
12401         fi
12402
12403 fi
12404
12405 fi
12406
12407 if test "x$with_pthread" != xno; then
12408         echo "$as_me:12408: checking for pthread_kill" >&5
12409 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12410 if test "${ac_cv_func_pthread_kill+set}" = set; then
12411   echo $ECHO_N "(cached) $ECHO_C" >&6
12412 else
12413   cat >conftest.$ac_ext <<_ACEOF
12414 #line 12414 "configure"
12415 #include "confdefs.h"
12416 /* System header to define __stub macros and hopefully few prototypes,
12417     which can conflict with char pthread_kill (); below.  */
12418 #include <assert.h>
12419 /* Override any gcc2 internal prototype to avoid an error.  */
12420 #ifdef __cplusplus
12421 extern "C"
12422 #endif
12423 /* We use char because int might match the return type of a gcc2
12424    builtin and then its argument prototype would still apply.  */
12425 char pthread_kill ();
12426 char (*f) ();
12427
12428 int
12429 main ()
12430 {
12431 /* The GNU C library defines this for functions which it implements
12432     to always fail with ENOSYS.  Some functions are actually named
12433     something starting with __ and the normal name is an alias.  */
12434 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12435 choke me
12436 #else
12437 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12438 #endif
12439
12440   ;
12441   return 0;
12442 }
12443 _ACEOF
12444 rm -f conftest.$ac_objext conftest$ac_exeext
12445 if { (eval echo "$as_me:12445: \"$ac_link\"") >&5
12446   (eval $ac_link) 2>&5
12447   ac_status=$?
12448   echo "$as_me:12448: \$? = $ac_status" >&5
12449   (exit $ac_status); } &&
12450          { ac_try='test -s conftest$ac_exeext'
12451   { (eval echo "$as_me:12451: \"$ac_try\"") >&5
12452   (eval $ac_try) 2>&5
12453   ac_status=$?
12454   echo "$as_me:12454: \$? = $ac_status" >&5
12455   (exit $ac_status); }; }; then
12456   ac_cv_func_pthread_kill=yes
12457 else
12458   echo "$as_me: failed program was:" >&5
12459 cat conftest.$ac_ext >&5
12460 ac_cv_func_pthread_kill=no
12461 fi
12462 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12463 fi
12464 echo "$as_me:12464: result: $ac_cv_func_pthread_kill" >&5
12465 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12466 if test $ac_cv_func_pthread_kill = yes; then
12467
12468                 echo "$as_me:12468: checking if you want to allow EINTR in wgetch with pthreads" >&5
12469 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12470
12471 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12472 if test "${enable_pthreads_eintr+set}" = set; then
12473   enableval="$enable_pthreads_eintr"
12474   use_pthreads_eintr=$enableval
12475 else
12476   use_pthreads_eintr=no
12477 fi;
12478                 echo "$as_me:12478: result: $use_pthreads_eintr" >&5
12479 echo "${ECHO_T}$use_pthreads_eintr" >&6
12480                 if test "x$use_pthreads_eintr" = xyes ; then
12481
12482 cat >>confdefs.h <<\EOF
12483 #define USE_PTHREADS_EINTR 1
12484 EOF
12485
12486                 fi
12487 fi
12488
12489         echo "$as_me:12489: checking if you want to use weak-symbols for pthreads" >&5
12490 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12491
12492 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12493 if test "${enable_weak_symbols+set}" = set; then
12494   enableval="$enable_weak_symbols"
12495   use_weak_symbols=$enableval
12496 else
12497   use_weak_symbols=no
12498 fi;
12499         echo "$as_me:12499: result: $use_weak_symbols" >&5
12500 echo "${ECHO_T}$use_weak_symbols" >&6
12501         if test "x$use_weak_symbols" = xyes ; then
12502
12503 echo "$as_me:12503: checking if $CC supports weak symbols" >&5
12504 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12505 if test "${cf_cv_weak_symbols+set}" = set; then
12506   echo $ECHO_N "(cached) $ECHO_C" >&6
12507 else
12508
12509 cat >conftest.$ac_ext <<_ACEOF
12510 #line 12510 "configure"
12511 #include "confdefs.h"
12512
12513 #include <stdio.h>
12514 int
12515 main ()
12516 {
12517
12518 #if defined(__GNUC__)
12519 #  if defined __USE_ISOC99
12520 #    define _cat_pragma(exp)    _Pragma(#exp)
12521 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12522 #  else
12523 #    define _weak_pragma(exp)
12524 #  endif
12525 #  define _declare(name)        __extension__ extern __typeof__(name) name
12526 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12527 #endif
12528
12529 weak_symbol(fopen);
12530
12531   ;
12532   return 0;
12533 }
12534 _ACEOF
12535 rm -f conftest.$ac_objext
12536 if { (eval echo "$as_me:12536: \"$ac_compile\"") >&5
12537   (eval $ac_compile) 2>&5
12538   ac_status=$?
12539   echo "$as_me:12539: \$? = $ac_status" >&5
12540   (exit $ac_status); } &&
12541          { ac_try='test -s conftest.$ac_objext'
12542   { (eval echo "$as_me:12542: \"$ac_try\"") >&5
12543   (eval $ac_try) 2>&5
12544   ac_status=$?
12545   echo "$as_me:12545: \$? = $ac_status" >&5
12546   (exit $ac_status); }; }; then
12547   cf_cv_weak_symbols=yes
12548 else
12549   echo "$as_me: failed program was:" >&5
12550 cat conftest.$ac_ext >&5
12551 cf_cv_weak_symbols=no
12552 fi
12553 rm -f conftest.$ac_objext conftest.$ac_ext
12554
12555 fi
12556 echo "$as_me:12556: result: $cf_cv_weak_symbols" >&5
12557 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12558
12559         else
12560                 cf_cv_weak_symbols=no
12561         fi
12562
12563         if test "x$cf_cv_weak_symbols" = xyes ; then
12564
12565 cat >>confdefs.h <<\EOF
12566 #define USE_WEAK_SYMBOLS 1
12567 EOF
12568
12569         fi
12570 fi
12571
12572 PTHREAD=
12573 if test "x$with_pthread" = "xyes" ; then
12574
12575 cat >>confdefs.h <<\EOF
12576 #define USE_PTHREADS 1
12577 EOF
12578
12579     enable_reentrant=yes
12580     if test "x$cf_cv_weak_symbols" = xyes ; then
12581         PTHREAD=-lpthread
12582     fi
12583 fi
12584
12585 # Reentrant code has to be opaque; there's little advantage to making ncurses
12586 # opaque outside of that, so there is no --enable-opaque option.  We can use
12587 # this option without --with-pthreads, but this will be always set for
12588 # pthreads.
12589 echo "$as_me:12589: checking if you want experimental reentrant code" >&5
12590 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12591
12592 # Check whether --enable-reentrant or --disable-reentrant was given.
12593 if test "${enable_reentrant+set}" = set; then
12594   enableval="$enable_reentrant"
12595   with_reentrant=$enableval
12596 else
12597   with_reentrant=no
12598 fi;
12599 echo "$as_me:12599: result: $with_reentrant" >&5
12600 echo "${ECHO_T}$with_reentrant" >&6
12601 if test "x$with_reentrant" = xyes ; then
12602         cf_cv_enable_reentrant=1
12603         cf_cv_enable_opaque="NCURSES_INTERNALS"
12604         NCURSES_OPAQUE=1
12605         NCURSES_SIZE_T=int
12606         if test "x$cf_cv_weak_symbols" = xyes ; then
12607
12608 # remove pthread library from $LIBS
12609 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12610
12611 cf_add_libs="-lpthread"
12612 # Filter out duplicates - this happens with badly-designed ".pc" files...
12613 for cf_add_1lib in $TEST_LIBS
12614 do
12615         for cf_add_2lib in $cf_add_libs
12616         do
12617                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12618                 then
12619                         cf_add_1lib=
12620                         break
12621                 fi
12622         done
12623         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12624 done
12625 TEST_LIBS="$cf_add_libs"
12626
12627 cf_add_libs="-lpthread"
12628 # Filter out duplicates - this happens with badly-designed ".pc" files...
12629 for cf_add_1lib in $TEST_LIBS2
12630 do
12631         for cf_add_2lib in $cf_add_libs
12632         do
12633                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12634                 then
12635                         cf_add_1lib=
12636                         break
12637                 fi
12638         done
12639         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12640 done
12641 TEST_LIBS2="$cf_add_libs"
12642
12643         else
12644                 # when not using weak symbols but with_reentrant,
12645                 # add 't' to the library suffix on all platforms
12646                 # except cygwin, where we only do that if ALSO
12647                 # compiling with full thread support.
12648                 case "$host" in
12649                 *cygwin* | *msys*) #(vi
12650                         if test "$with_pthread" = "yes" ; then
12651                                 if test "x$disable_lib_suffixes" = "xno" ; then
12652                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12653                                 fi
12654                         fi ;;
12655                 *)
12656                         if test "x$disable_lib_suffixes" = "xno" ; then
12657                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12658                         fi
12659                         ;;
12660                 esac
12661         fi
12662
12663 cat >>confdefs.h <<\EOF
12664 #define USE_REENTRANT 1
12665 EOF
12666
12667 if test "${with_abi_version+set}" != set; then
12668         case $cf_cv_rel_version in
12669         5.*)
12670                 cf_cv_rel_version=6.0
12671                 cf_cv_abi_version=6
12672                 { echo "$as_me:12672: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12673 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12674                 ;;
12675         esac
12676 fi
12677
12678 else
12679         cf_cv_enable_reentrant=0
12680         cf_cv_enable_opaque="NCURSES_OPAQUE"
12681         NCURSES_OPAQUE=0
12682         NCURSES_SIZE_T=short
12683 fi
12684
12685 ### Allow using a different wrap-prefix
12686 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12687         echo "$as_me:12687: checking for prefix used to wrap public variables" >&5
12688 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12689
12690 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12691 if test "${with_wrap_prefix+set}" = set; then
12692   withval="$with_wrap_prefix"
12693   NCURSES_WRAP_PREFIX=$withval
12694 else
12695   NCURSES_WRAP_PREFIX=_nc_
12696 fi;
12697         echo "$as_me:12697: result: $NCURSES_WRAP_PREFIX" >&5
12698 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12699 else
12700         NCURSES_WRAP_PREFIX=_nc_
12701 fi
12702
12703 cat >>confdefs.h <<EOF
12704 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12705 EOF
12706
12707 echo "$as_me:12707: checking if you want experimental safe-sprintf code" >&5
12708 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12709
12710 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12711 if test "${enable_safe_sprintf+set}" = set; then
12712   enableval="$enable_safe_sprintf"
12713   with_safe_sprintf=$enableval
12714 else
12715   with_safe_sprintf=no
12716 fi;
12717 echo "$as_me:12717: result: $with_safe_sprintf" >&5
12718 echo "${ECHO_T}$with_safe_sprintf" >&6
12719 test "x$with_safe_sprintf" = xyes &&
12720 cat >>confdefs.h <<\EOF
12721 #define USE_SAFE_SPRINTF 1
12722 EOF
12723
12724 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12725 # when hashmap is used scroll hints are useless
12726 if test "$with_hashmap" = no ; then
12727 echo "$as_me:12727: checking if you want to experiment without scrolling-hints code" >&5
12728 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12729
12730 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12731 if test "${enable_scroll_hints+set}" = set; then
12732   enableval="$enable_scroll_hints"
12733   with_scroll_hints=$enableval
12734 else
12735   with_scroll_hints=yes
12736 fi;
12737 echo "$as_me:12737: result: $with_scroll_hints" >&5
12738 echo "${ECHO_T}$with_scroll_hints" >&6
12739 test "x$with_scroll_hints" = xyes &&
12740 cat >>confdefs.h <<\EOF
12741 #define USE_SCROLL_HINTS 1
12742 EOF
12743
12744 fi
12745
12746 echo "$as_me:12746: checking if you want experimental wgetch-events code" >&5
12747 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12748
12749 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12750 if test "${enable_wgetch_events+set}" = set; then
12751   enableval="$enable_wgetch_events"
12752   with_wgetch_events=$enableval
12753 else
12754   with_wgetch_events=no
12755 fi;
12756 echo "$as_me:12756: result: $with_wgetch_events" >&5
12757 echo "${ECHO_T}$with_wgetch_events" >&6
12758 test "x$with_wgetch_events" = xyes &&
12759 cat >>confdefs.h <<\EOF
12760 #define NCURSES_WGETCH_EVENTS 1
12761 EOF
12762
12763 ###############################################################################
12764
12765 ###     use option --disable-echo to suppress full display compiling commands
12766
12767 echo "$as_me:12767: checking if you want to see long compiling messages" >&5
12768 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12769
12770 # Check whether --enable-echo or --disable-echo was given.
12771 if test "${enable_echo+set}" = set; then
12772   enableval="$enable_echo"
12773   test "$enableval" != no && enableval=yes
12774   if test "$enableval" != "yes" ; then
12775
12776     ECHO_LT='--silent'
12777     ECHO_LD='@echo linking $@;'
12778     RULE_CC='@echo compiling $<'
12779     SHOW_CC='@echo compiling $@'
12780     ECHO_CC='@'
12781
12782   else
12783
12784     ECHO_LT=''
12785     ECHO_LD=''
12786     RULE_CC=''
12787     SHOW_CC=''
12788     ECHO_CC=''
12789
12790   fi
12791 else
12792   enableval=yes
12793
12794     ECHO_LT=''
12795     ECHO_LD=''
12796     RULE_CC=''
12797     SHOW_CC=''
12798     ECHO_CC=''
12799
12800 fi;
12801 echo "$as_me:12801: result: $enableval" >&5
12802 echo "${ECHO_T}$enableval" >&6
12803
12804 if test "x$enable_echo" = xyes; then
12805         ECHO_LINK=
12806 else
12807         ECHO_LINK='@ echo linking $@ ... ;'
12808         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12809         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12810 fi
12811
12812 ###     use option --enable-warnings to turn on all gcc warnings
12813 echo "$as_me:12813: checking if you want to see compiler warnings" >&5
12814 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12815
12816 # Check whether --enable-warnings or --disable-warnings was given.
12817 if test "${enable_warnings+set}" = set; then
12818   enableval="$enable_warnings"
12819   with_warnings=$enableval
12820 fi;
12821 echo "$as_me:12821: result: $with_warnings" >&5
12822 echo "${ECHO_T}$with_warnings" >&6
12823
12824 if test "x$with_warnings" = "xyes"; then
12825
12826         ADAFLAGS="$ADAFLAGS -gnatg"
12827
12828 INTEL_COMPILER=no
12829
12830 if test "$GCC" = yes ; then
12831         case $host_os in
12832         linux*|gnu*)
12833                 echo "$as_me:12833: checking if this is really Intel C compiler" >&5
12834 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12835                 cf_save_CFLAGS="$CFLAGS"
12836                 CFLAGS="$CFLAGS -no-gcc"
12837                 cat >conftest.$ac_ext <<_ACEOF
12838 #line 12838 "configure"
12839 #include "confdefs.h"
12840
12841 int
12842 main ()
12843 {
12844
12845 #ifdef __INTEL_COMPILER
12846 #else
12847 make an error
12848 #endif
12849
12850   ;
12851   return 0;
12852 }
12853 _ACEOF
12854 rm -f conftest.$ac_objext
12855 if { (eval echo "$as_me:12855: \"$ac_compile\"") >&5
12856   (eval $ac_compile) 2>&5
12857   ac_status=$?
12858   echo "$as_me:12858: \$? = $ac_status" >&5
12859   (exit $ac_status); } &&
12860          { ac_try='test -s conftest.$ac_objext'
12861   { (eval echo "$as_me:12861: \"$ac_try\"") >&5
12862   (eval $ac_try) 2>&5
12863   ac_status=$?
12864   echo "$as_me:12864: \$? = $ac_status" >&5
12865   (exit $ac_status); }; }; then
12866   INTEL_COMPILER=yes
12867 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12868
12869 else
12870   echo "$as_me: failed program was:" >&5
12871 cat conftest.$ac_ext >&5
12872 fi
12873 rm -f conftest.$ac_objext conftest.$ac_ext
12874                 CFLAGS="$cf_save_CFLAGS"
12875                 echo "$as_me:12875: result: $INTEL_COMPILER" >&5
12876 echo "${ECHO_T}$INTEL_COMPILER" >&6
12877                 ;;
12878         esac
12879 fi
12880
12881 CLANG_COMPILER=no
12882
12883 if test "$GCC" = yes ; then
12884         echo "$as_me:12884: checking if this is really Clang C compiler" >&5
12885 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12886         cf_save_CFLAGS="$CFLAGS"
12887         CFLAGS="$CFLAGS -Qunused-arguments"
12888         cat >conftest.$ac_ext <<_ACEOF
12889 #line 12889 "configure"
12890 #include "confdefs.h"
12891
12892 int
12893 main ()
12894 {
12895
12896 #ifdef __clang__
12897 #else
12898 make an error
12899 #endif
12900
12901   ;
12902   return 0;
12903 }
12904 _ACEOF
12905 rm -f conftest.$ac_objext
12906 if { (eval echo "$as_me:12906: \"$ac_compile\"") >&5
12907   (eval $ac_compile) 2>&5
12908   ac_status=$?
12909   echo "$as_me:12909: \$? = $ac_status" >&5
12910   (exit $ac_status); } &&
12911          { ac_try='test -s conftest.$ac_objext'
12912   { (eval echo "$as_me:12912: \"$ac_try\"") >&5
12913   (eval $ac_try) 2>&5
12914   ac_status=$?
12915   echo "$as_me:12915: \$? = $ac_status" >&5
12916   (exit $ac_status); }; }; then
12917   CLANG_COMPILER=yes
12918 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12919
12920 else
12921   echo "$as_me: failed program was:" >&5
12922 cat conftest.$ac_ext >&5
12923 fi
12924 rm -f conftest.$ac_objext conftest.$ac_ext
12925         CFLAGS="$cf_save_CFLAGS"
12926         echo "$as_me:12926: result: $CLANG_COMPILER" >&5
12927 echo "${ECHO_T}$CLANG_COMPILER" >&6
12928 fi
12929
12930 cat > conftest.$ac_ext <<EOF
12931 #line 12931 "${as_me:-configure}"
12932 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12933 EOF
12934
12935 if test "$INTEL_COMPILER" = yes
12936 then
12937 # The "-wdXXX" options suppress warnings:
12938 # remark #1419: external declaration in primary source file
12939 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12940 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12941 # remark #193: zero used for undefined preprocessing identifier
12942 # remark #593: variable "curs_sb_left_arrow" was set but never used
12943 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12944 # remark #869: parameter "tw" was never referenced
12945 # remark #981: operands are evaluated in unspecified order
12946 # warning #279: controlling expression is constant
12947
12948         { echo "$as_me:12948: checking for $CC warning options..." >&5
12949 echo "$as_me: checking for $CC warning options..." >&6;}
12950         cf_save_CFLAGS="$CFLAGS"
12951         EXTRA_CFLAGS="-Wall"
12952         for cf_opt in \
12953                 wd1419 \
12954                 wd1683 \
12955                 wd1684 \
12956                 wd193 \
12957                 wd593 \
12958                 wd279 \
12959                 wd810 \
12960                 wd869 \
12961                 wd981
12962         do
12963                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12964                 if { (eval echo "$as_me:12964: \"$ac_compile\"") >&5
12965   (eval $ac_compile) 2>&5
12966   ac_status=$?
12967   echo "$as_me:12967: \$? = $ac_status" >&5
12968   (exit $ac_status); }; then
12969                         test -n "$verbose" && echo "$as_me:12969: result: ... -$cf_opt" >&5
12970 echo "${ECHO_T}... -$cf_opt" >&6
12971                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12972                 fi
12973         done
12974         CFLAGS="$cf_save_CFLAGS"
12975
12976 elif test "$GCC" = yes
12977 then
12978         { echo "$as_me:12978: checking for $CC warning options..." >&5
12979 echo "$as_me: checking for $CC warning options..." >&6;}
12980         cf_save_CFLAGS="$CFLAGS"
12981         EXTRA_CFLAGS=
12982         cf_warn_CONST=""
12983         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12984         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12985         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12986         for cf_opt in W Wall \
12987                 Wbad-function-cast \
12988                 Wcast-align \
12989                 Wcast-qual \
12990                 Wdeclaration-after-statement \
12991                 Wextra \
12992                 Winline \
12993                 Wmissing-declarations \
12994                 Wmissing-prototypes \
12995                 Wnested-externs \
12996                 Wpointer-arith \
12997                 Wshadow \
12998                 Wstrict-prototypes \
12999                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13000         do
13001                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13002                 if { (eval echo "$as_me:13002: \"$ac_compile\"") >&5
13003   (eval $ac_compile) 2>&5
13004   ac_status=$?
13005   echo "$as_me:13005: \$? = $ac_status" >&5
13006   (exit $ac_status); }; then
13007                         test -n "$verbose" && echo "$as_me:13007: result: ... -$cf_opt" >&5
13008 echo "${ECHO_T}... -$cf_opt" >&6
13009                         case $cf_opt in #(vi
13010                         Wcast-qual) #(vi
13011                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13012                                 ;;
13013                         Winline) #(vi
13014                                 case $GCC_VERSION in
13015                                 [34].*)
13016                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13017
13018 echo "${as_me:-configure}:13018: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13019
13020                                         continue;;
13021                                 esac
13022                                 ;;
13023                         Wpointer-arith) #(vi
13024                                 case $GCC_VERSION in
13025                                 [12].*)
13026                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13027
13028 echo "${as_me:-configure}:13028: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13029
13030                                         continue;;
13031                                 esac
13032                                 ;;
13033                         esac
13034                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13035                 fi
13036         done
13037         CFLAGS="$cf_save_CFLAGS"
13038 fi
13039 rm -rf conftest*
13040
13041         if test "x$cf_with_cxx" = xyes ; then
13042
13043 INTEL_CPLUSPLUS=no
13044
13045 if test "$GCC" = yes ; then
13046         case $host_os in
13047         linux*|gnu*)
13048                 echo "$as_me:13048: checking if this is really Intel C++ compiler" >&5
13049 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13050                 cf_save_CFLAGS="$CXXFLAGS"
13051                 CXXFLAGS="$CXXFLAGS -no-gcc"
13052                 cat >conftest.$ac_ext <<_ACEOF
13053 #line 13053 "configure"
13054 #include "confdefs.h"
13055
13056 int
13057 main ()
13058 {
13059
13060 #ifdef __INTEL_COMPILER
13061 #else
13062 make an error
13063 #endif
13064
13065   ;
13066   return 0;
13067 }
13068 _ACEOF
13069 rm -f conftest.$ac_objext
13070 if { (eval echo "$as_me:13070: \"$ac_compile\"") >&5
13071   (eval $ac_compile) 2>&5
13072   ac_status=$?
13073   echo "$as_me:13073: \$? = $ac_status" >&5
13074   (exit $ac_status); } &&
13075          { ac_try='test -s conftest.$ac_objext'
13076   { (eval echo "$as_me:13076: \"$ac_try\"") >&5
13077   (eval $ac_try) 2>&5
13078   ac_status=$?
13079   echo "$as_me:13079: \$? = $ac_status" >&5
13080   (exit $ac_status); }; }; then
13081   INTEL_CPLUSPLUS=yes
13082 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13083
13084 else
13085   echo "$as_me: failed program was:" >&5
13086 cat conftest.$ac_ext >&5
13087 fi
13088 rm -f conftest.$ac_objext conftest.$ac_ext
13089                 CXXFLAGS="$cf_save_CFLAGS"
13090                 echo "$as_me:13090: result: $INTEL_CPLUSPLUS" >&5
13091 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13092                 ;;
13093         esac
13094 fi
13095
13096 CLANG_CPLUSPLUS=no
13097
13098 if test "$GCC" = yes ; then
13099         echo "$as_me:13099: checking if this is really Clang C++ compiler" >&5
13100 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13101         cf_save_CFLAGS="$CXXFLAGS"
13102         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13103         cat >conftest.$ac_ext <<_ACEOF
13104 #line 13104 "configure"
13105 #include "confdefs.h"
13106
13107 int
13108 main ()
13109 {
13110
13111 #ifdef __clang__
13112 #else
13113 make an error
13114 #endif
13115
13116   ;
13117   return 0;
13118 }
13119 _ACEOF
13120 rm -f conftest.$ac_objext
13121 if { (eval echo "$as_me:13121: \"$ac_compile\"") >&5
13122   (eval $ac_compile) 2>&5
13123   ac_status=$?
13124   echo "$as_me:13124: \$? = $ac_status" >&5
13125   (exit $ac_status); } &&
13126          { ac_try='test -s conftest.$ac_objext'
13127   { (eval echo "$as_me:13127: \"$ac_try\"") >&5
13128   (eval $ac_try) 2>&5
13129   ac_status=$?
13130   echo "$as_me:13130: \$? = $ac_status" >&5
13131   (exit $ac_status); }; }; then
13132   CLANG_CPLUSPLUS=yes
13133 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13134
13135 else
13136   echo "$as_me: failed program was:" >&5
13137 cat conftest.$ac_ext >&5
13138 fi
13139 rm -f conftest.$ac_objext conftest.$ac_ext
13140         CXXFLAGS="$cf_save_CFLAGS"
13141         echo "$as_me:13141: result: $CLANG_CPLUSPLUS" >&5
13142 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13143 fi
13144
13145 ac_ext=cc
13146 ac_cpp='$CXXCPP $CPPFLAGS'
13147 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13148 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13149 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13150 ac_main_return=return
13151
13152 cat > conftest.$ac_ext <<EOF
13153 #line 13153 "configure"
13154 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13155 EOF
13156
13157 if test "$INTEL_CPLUSPLUS" = yes
13158 then
13159 # The "-wdXXX" options suppress warnings:
13160 # remark #1419: external declaration in primary source file
13161 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13162 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13163 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13164 # remark #193: zero used for undefined preprocessing identifier
13165 # remark #593: variable "curs_sb_left_arrow" was set but never used
13166 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13167 # remark #869: parameter "tw" was never referenced
13168 # remark #981: operands are evaluated in unspecified order
13169 # warning #269: invalid format string conversion
13170
13171         { echo "$as_me:13171: checking for $CC warning options..." >&5
13172 echo "$as_me: checking for $CC warning options..." >&6;}
13173         cf_save_CXXFLAGS="$CXXFLAGS"
13174         EXTRA_CXXFLAGS="-Wall"
13175         for cf_opt in \
13176                 wd1419 \
13177                 wd1682 \
13178                 wd1683 \
13179                 wd1684 \
13180                 wd193 \
13181                 wd279 \
13182                 wd593 \
13183                 wd810 \
13184                 wd869 \
13185                 wd981
13186         do
13187                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13188                 if { (eval echo "$as_me:13188: \"$ac_compile\"") >&5
13189   (eval $ac_compile) 2>&5
13190   ac_status=$?
13191   echo "$as_me:13191: \$? = $ac_status" >&5
13192   (exit $ac_status); }; then
13193                         test -n "$verbose" && echo "$as_me:13193: result: ... -$cf_opt" >&5
13194 echo "${ECHO_T}... -$cf_opt" >&6
13195                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13196                 fi
13197         done
13198         CXXFLAGS="$cf_save_CXXFLAGS"
13199
13200 elif test "$GXX" = yes
13201 then
13202         { echo "$as_me:13202: checking for $CXX warning options..." >&5
13203 echo "$as_me: checking for $CXX warning options..." >&6;}
13204         cf_save_CXXFLAGS="$CXXFLAGS"
13205         EXTRA_CXXFLAGS="-W -Wall"
13206         cf_gxx_extra_warnings=""
13207         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13208         case "$GCC_VERSION" in
13209         [1-2].*)
13210                 ;;
13211         *)
13212                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13213                 ;;
13214         esac
13215         for cf_opt in \
13216                 Wabi \
13217                 fabi-version=0 \
13218                 Wextra \
13219                 Wignored-qualifiers \
13220                 Wlogical-op \
13221                 Woverloaded-virtual \
13222                 Wsign-promo \
13223                 Wsynth \
13224                 Wold-style-cast \
13225                 Wcast-align \
13226                 Wcast-qual \
13227                 Wpointer-arith \
13228                 Wshadow \
13229                 Wundef $cf_gxx_extra_warnings Wno-unused
13230         do
13231                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13232                 if { (eval echo "$as_me:13232: \"$ac_compile\"") >&5
13233   (eval $ac_compile) 2>&5
13234   ac_status=$?
13235   echo "$as_me:13235: \$? = $ac_status" >&5
13236   (exit $ac_status); }; then
13237                         test -n "$verbose" && echo "$as_me:13237: result: ... -$cf_opt" >&5
13238 echo "${ECHO_T}... -$cf_opt" >&6
13239                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13240                 else
13241                         test -n "$verbose" && echo "$as_me:13241: result: ... no -$cf_opt" >&5
13242 echo "${ECHO_T}... no -$cf_opt" >&6
13243                 fi
13244         done
13245         CXXFLAGS="$cf_save_CXXFLAGS"
13246 fi
13247
13248 rm -rf conftest*
13249 ac_ext=c
13250 ac_cpp='$CPP $CPPFLAGS'
13251 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13252 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13253 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13254 ac_main_return=return
13255
13256         fi
13257 fi
13258
13259 if test "$GCC" = yes
13260 then
13261 cat > conftest.i <<EOF
13262 #ifndef GCC_PRINTF
13263 #define GCC_PRINTF 0
13264 #endif
13265 #ifndef GCC_SCANF
13266 #define GCC_SCANF 0
13267 #endif
13268 #ifndef GCC_NORETURN
13269 #define GCC_NORETURN /* nothing */
13270 #endif
13271 #ifndef GCC_UNUSED
13272 #define GCC_UNUSED /* nothing */
13273 #endif
13274 EOF
13275 if test "$GCC" = yes
13276 then
13277         { echo "$as_me:13277: checking for $CC __attribute__ directives..." >&5
13278 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13279 cat > conftest.$ac_ext <<EOF
13280 #line 13280 "${as_me:-configure}"
13281 #include "confdefs.h"
13282 #include "conftest.h"
13283 #include "conftest.i"
13284 #if     GCC_PRINTF
13285 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13286 #else
13287 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13288 #endif
13289 #if     GCC_SCANF
13290 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13291 #else
13292 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13293 #endif
13294 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13295 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13296 extern void foo(void) GCC_NORETURN;
13297 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13298 EOF
13299         cf_printf_attribute=no
13300         cf_scanf_attribute=no
13301         for cf_attribute in scanf printf unused noreturn
13302         do
13303
13304 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13305
13306                 cf_directive="__attribute__(($cf_attribute))"
13307                 echo "checking for $CC $cf_directive" 1>&5
13308
13309                 case $cf_attribute in #(vi
13310                 printf) #(vi
13311                         cf_printf_attribute=yes
13312                         cat >conftest.h <<EOF
13313 #define GCC_$cf_ATTRIBUTE 1
13314 EOF
13315                         ;;
13316                 scanf) #(vi
13317                         cf_scanf_attribute=yes
13318                         cat >conftest.h <<EOF
13319 #define GCC_$cf_ATTRIBUTE 1
13320 EOF
13321                         ;;
13322                 *) #(vi
13323                         cat >conftest.h <<EOF
13324 #define GCC_$cf_ATTRIBUTE $cf_directive
13325 EOF
13326                         ;;
13327                 esac
13328
13329                 if { (eval echo "$as_me:13329: \"$ac_compile\"") >&5
13330   (eval $ac_compile) 2>&5
13331   ac_status=$?
13332   echo "$as_me:13332: \$? = $ac_status" >&5
13333   (exit $ac_status); }; then
13334                         test -n "$verbose" && echo "$as_me:13334: result: ... $cf_attribute" >&5
13335 echo "${ECHO_T}... $cf_attribute" >&6
13336                         cat conftest.h >>confdefs.h
13337                         case $cf_attribute in #(vi
13338                         noreturn) #(vi
13339
13340 cat >>confdefs.h <<EOF
13341 #define GCC_NORETURN $cf_directive
13342 EOF
13343
13344                                 ;;
13345                         printf) #(vi
13346                                 cf_value='/* nothing */'
13347                                 if test "$cf_printf_attribute" != no ; then
13348                                         cf_value='__attribute__((format(printf,fmt,var)))'
13349
13350 cat >>confdefs.h <<\EOF
13351 #define GCC_PRINTF 1
13352 EOF
13353
13354                                 fi
13355
13356 cat >>confdefs.h <<EOF
13357 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13358 EOF
13359
13360                                 ;;
13361                         scanf) #(vi
13362                                 cf_value='/* nothing */'
13363                                 if test "$cf_scanf_attribute" != no ; then
13364                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13365
13366 cat >>confdefs.h <<\EOF
13367 #define GCC_SCANF 1
13368 EOF
13369
13370                                 fi
13371
13372 cat >>confdefs.h <<EOF
13373 #define GCC_SCANFLIKE(fmt,var) $cf_value
13374 EOF
13375
13376                                 ;;
13377                         unused) #(vi
13378
13379 cat >>confdefs.h <<EOF
13380 #define GCC_UNUSED $cf_directive
13381 EOF
13382
13383                                 ;;
13384                         esac
13385                 fi
13386         done
13387 else
13388         fgrep define conftest.i >>confdefs.h
13389 fi
13390 rm -rf conftest*
13391 fi
13392
13393 echo "$as_me:13393: checking if you want to work around bogus compiler/loader warnings" >&5
13394 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13395
13396 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13397 if test "${enable_string_hacks+set}" = set; then
13398   enableval="$enable_string_hacks"
13399   with_string_hacks=$enableval
13400 else
13401   with_string_hacks=no
13402 fi;
13403 echo "$as_me:13403: result: $with_string_hacks" >&5
13404 echo "${ECHO_T}$with_string_hacks" >&6
13405
13406 if test "x$with_string_hacks" = "xyes"; then
13407
13408 cat >>confdefs.h <<\EOF
13409 #define USE_STRING_HACKS 1
13410 EOF
13411
13412         { echo "$as_me:13412: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13413 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13414
13415 for ac_func in strlcat strlcpy snprintf
13416 do
13417 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13418 echo "$as_me:13418: checking for $ac_func" >&5
13419 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13420 if eval "test \"\${$as_ac_var+set}\" = set"; then
13421   echo $ECHO_N "(cached) $ECHO_C" >&6
13422 else
13423   cat >conftest.$ac_ext <<_ACEOF
13424 #line 13424 "configure"
13425 #include "confdefs.h"
13426 /* System header to define __stub macros and hopefully few prototypes,
13427     which can conflict with char $ac_func (); below.  */
13428 #include <assert.h>
13429 /* Override any gcc2 internal prototype to avoid an error.  */
13430 #ifdef __cplusplus
13431 extern "C"
13432 #endif
13433 /* We use char because int might match the return type of a gcc2
13434    builtin and then its argument prototype would still apply.  */
13435 char $ac_func ();
13436 char (*f) ();
13437
13438 int
13439 main ()
13440 {
13441 /* The GNU C library defines this for functions which it implements
13442     to always fail with ENOSYS.  Some functions are actually named
13443     something starting with __ and the normal name is an alias.  */
13444 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13445 choke me
13446 #else
13447 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13448 #endif
13449
13450   ;
13451   return 0;
13452 }
13453 _ACEOF
13454 rm -f conftest.$ac_objext conftest$ac_exeext
13455 if { (eval echo "$as_me:13455: \"$ac_link\"") >&5
13456   (eval $ac_link) 2>&5
13457   ac_status=$?
13458   echo "$as_me:13458: \$? = $ac_status" >&5
13459   (exit $ac_status); } &&
13460          { ac_try='test -s conftest$ac_exeext'
13461   { (eval echo "$as_me:13461: \"$ac_try\"") >&5
13462   (eval $ac_try) 2>&5
13463   ac_status=$?
13464   echo "$as_me:13464: \$? = $ac_status" >&5
13465   (exit $ac_status); }; }; then
13466   eval "$as_ac_var=yes"
13467 else
13468   echo "$as_me: failed program was:" >&5
13469 cat conftest.$ac_ext >&5
13470 eval "$as_ac_var=no"
13471 fi
13472 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13473 fi
13474 echo "$as_me:13474: result: `eval echo '${'$as_ac_var'}'`" >&5
13475 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13476 if test `eval echo '${'$as_ac_var'}'` = yes; then
13477   cat >>confdefs.h <<EOF
13478 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13479 EOF
13480
13481 fi
13482 done
13483
13484 fi
13485
13486 ###     use option --enable-assertions to turn on generation of assertion code
13487 echo "$as_me:13487: checking if you want to enable runtime assertions" >&5
13488 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13489
13490 # Check whether --enable-assertions or --disable-assertions was given.
13491 if test "${enable_assertions+set}" = set; then
13492   enableval="$enable_assertions"
13493   with_assertions=$enableval
13494 else
13495   with_assertions=no
13496 fi;
13497 echo "$as_me:13497: result: $with_assertions" >&5
13498 echo "${ECHO_T}$with_assertions" >&6
13499 if test -n "$GCC"
13500 then
13501         if test "$with_assertions" = no
13502         then
13503                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13504         else
13505
13506         ADAFLAGS="$ADAFLAGS -gnata"
13507
13508         fi
13509 fi
13510
13511 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13512
13513 echo "$as_me:13513: checking if you want to use dmalloc for testing" >&5
13514 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13515
13516 # Check whether --with-dmalloc or --without-dmalloc was given.
13517 if test "${with_dmalloc+set}" = set; then
13518   withval="$with_dmalloc"
13519
13520 cat >>confdefs.h <<EOF
13521 #define USE_DMALLOC 1
13522 EOF
13523
13524         : ${with_cflags:=-g}
13525         : ${with_no_leaks:=yes}
13526          with_dmalloc=yes
13527 else
13528   with_dmalloc=
13529 fi;
13530 echo "$as_me:13530: result: ${with_dmalloc:-no}" >&5
13531 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13532
13533 case .$with_cflags in #(vi
13534 .*-g*)
13535         case .$CFLAGS in #(vi
13536         .*-g*) #(vi
13537                 ;;
13538         *)
13539
13540 cf_fix_cppflags=no
13541 cf_new_cflags=
13542 cf_new_cppflags=
13543 cf_new_extra_cppflags=
13544
13545 for cf_add_cflags in -g
13546 do
13547 case $cf_fix_cppflags in
13548 no)
13549         case $cf_add_cflags in #(vi
13550         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13551                 case $cf_add_cflags in
13552                 -D*)
13553                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13554
13555                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13556                                 && test -z "${cf_tst_cflags}" \
13557                                 && cf_fix_cppflags=yes
13558
13559                         if test $cf_fix_cppflags = yes ; then
13560                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13561                                 continue
13562                         elif test "${cf_tst_cflags}" = "\"'" ; then
13563                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13564                                 continue
13565                         fi
13566                         ;;
13567                 esac
13568                 case "$CPPFLAGS" in
13569                 *$cf_add_cflags) #(vi
13570                         ;;
13571                 *) #(vi
13572                         case $cf_add_cflags in #(vi
13573                         -D*)
13574                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13575
13576 CPPFLAGS=`echo "$CPPFLAGS" | \
13577         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13578                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13579
13580                                 ;;
13581                         esac
13582                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13583                         ;;
13584                 esac
13585                 ;;
13586         *)
13587                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13588                 ;;
13589         esac
13590         ;;
13591 yes)
13592         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13593
13594         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13595
13596         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13597                 && test -z "${cf_tst_cflags}" \
13598                 && cf_fix_cppflags=no
13599         ;;
13600 esac
13601 done
13602
13603 if test -n "$cf_new_cflags" ; then
13604
13605         CFLAGS="$CFLAGS $cf_new_cflags"
13606 fi
13607
13608 if test -n "$cf_new_cppflags" ; then
13609
13610         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13611 fi
13612
13613 if test -n "$cf_new_extra_cppflags" ; then
13614
13615         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13616 fi
13617
13618                 ;;
13619         esac
13620         ;;
13621 esac
13622
13623 if test "$with_dmalloc" = yes ; then
13624         echo "$as_me:13624: checking for dmalloc.h" >&5
13625 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13626 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13627   echo $ECHO_N "(cached) $ECHO_C" >&6
13628 else
13629   cat >conftest.$ac_ext <<_ACEOF
13630 #line 13630 "configure"
13631 #include "confdefs.h"
13632 #include <dmalloc.h>
13633 _ACEOF
13634 if { (eval echo "$as_me:13634: \"$ac_cpp conftest.$ac_ext\"") >&5
13635   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13636   ac_status=$?
13637   egrep -v '^ *\+' conftest.er1 >conftest.err
13638   rm -f conftest.er1
13639   cat conftest.err >&5
13640   echo "$as_me:13640: \$? = $ac_status" >&5
13641   (exit $ac_status); } >/dev/null; then
13642   if test -s conftest.err; then
13643     ac_cpp_err=$ac_c_preproc_warn_flag
13644   else
13645     ac_cpp_err=
13646   fi
13647 else
13648   ac_cpp_err=yes
13649 fi
13650 if test -z "$ac_cpp_err"; then
13651   ac_cv_header_dmalloc_h=yes
13652 else
13653   echo "$as_me: failed program was:" >&5
13654   cat conftest.$ac_ext >&5
13655   ac_cv_header_dmalloc_h=no
13656 fi
13657 rm -f conftest.err conftest.$ac_ext
13658 fi
13659 echo "$as_me:13659: result: $ac_cv_header_dmalloc_h" >&5
13660 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13661 if test $ac_cv_header_dmalloc_h = yes; then
13662
13663 echo "$as_me:13663: checking for dmalloc_debug in -ldmalloc" >&5
13664 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13665 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13666   echo $ECHO_N "(cached) $ECHO_C" >&6
13667 else
13668   ac_check_lib_save_LIBS=$LIBS
13669 LIBS="-ldmalloc  $LIBS"
13670 cat >conftest.$ac_ext <<_ACEOF
13671 #line 13671 "configure"
13672 #include "confdefs.h"
13673
13674 /* Override any gcc2 internal prototype to avoid an error.  */
13675 #ifdef __cplusplus
13676 extern "C"
13677 #endif
13678 /* We use char because int might match the return type of a gcc2
13679    builtin and then its argument prototype would still apply.  */
13680 char dmalloc_debug ();
13681 int
13682 main ()
13683 {
13684 dmalloc_debug ();
13685   ;
13686   return 0;
13687 }
13688 _ACEOF
13689 rm -f conftest.$ac_objext conftest$ac_exeext
13690 if { (eval echo "$as_me:13690: \"$ac_link\"") >&5
13691   (eval $ac_link) 2>&5
13692   ac_status=$?
13693   echo "$as_me:13693: \$? = $ac_status" >&5
13694   (exit $ac_status); } &&
13695          { ac_try='test -s conftest$ac_exeext'
13696   { (eval echo "$as_me:13696: \"$ac_try\"") >&5
13697   (eval $ac_try) 2>&5
13698   ac_status=$?
13699   echo "$as_me:13699: \$? = $ac_status" >&5
13700   (exit $ac_status); }; }; then
13701   ac_cv_lib_dmalloc_dmalloc_debug=yes
13702 else
13703   echo "$as_me: failed program was:" >&5
13704 cat conftest.$ac_ext >&5
13705 ac_cv_lib_dmalloc_dmalloc_debug=no
13706 fi
13707 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13708 LIBS=$ac_check_lib_save_LIBS
13709 fi
13710 echo "$as_me:13710: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13711 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13712 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13713   cat >>confdefs.h <<EOF
13714 #define HAVE_LIBDMALLOC 1
13715 EOF
13716
13717   LIBS="-ldmalloc $LIBS"
13718
13719 fi
13720
13721 fi
13722
13723 fi
13724
13725 echo "$as_me:13725: checking if you want to use dbmalloc for testing" >&5
13726 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13727
13728 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13729 if test "${with_dbmalloc+set}" = set; then
13730   withval="$with_dbmalloc"
13731
13732 cat >>confdefs.h <<EOF
13733 #define USE_DBMALLOC 1
13734 EOF
13735
13736         : ${with_cflags:=-g}
13737         : ${with_no_leaks:=yes}
13738          with_dbmalloc=yes
13739 else
13740   with_dbmalloc=
13741 fi;
13742 echo "$as_me:13742: result: ${with_dbmalloc:-no}" >&5
13743 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13744
13745 case .$with_cflags in #(vi
13746 .*-g*)
13747         case .$CFLAGS in #(vi
13748         .*-g*) #(vi
13749                 ;;
13750         *)
13751
13752 cf_fix_cppflags=no
13753 cf_new_cflags=
13754 cf_new_cppflags=
13755 cf_new_extra_cppflags=
13756
13757 for cf_add_cflags in -g
13758 do
13759 case $cf_fix_cppflags in
13760 no)
13761         case $cf_add_cflags in #(vi
13762         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13763                 case $cf_add_cflags in
13764                 -D*)
13765                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13766
13767                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13768                                 && test -z "${cf_tst_cflags}" \
13769                                 && cf_fix_cppflags=yes
13770
13771                         if test $cf_fix_cppflags = yes ; then
13772                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13773                                 continue
13774                         elif test "${cf_tst_cflags}" = "\"'" ; then
13775                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13776                                 continue
13777                         fi
13778                         ;;
13779                 esac
13780                 case "$CPPFLAGS" in
13781                 *$cf_add_cflags) #(vi
13782                         ;;
13783                 *) #(vi
13784                         case $cf_add_cflags in #(vi
13785                         -D*)
13786                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13787
13788 CPPFLAGS=`echo "$CPPFLAGS" | \
13789         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13790                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13791
13792                                 ;;
13793                         esac
13794                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13795                         ;;
13796                 esac
13797                 ;;
13798         *)
13799                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13800                 ;;
13801         esac
13802         ;;
13803 yes)
13804         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13805
13806         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13807
13808         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13809                 && test -z "${cf_tst_cflags}" \
13810                 && cf_fix_cppflags=no
13811         ;;
13812 esac
13813 done
13814
13815 if test -n "$cf_new_cflags" ; then
13816
13817         CFLAGS="$CFLAGS $cf_new_cflags"
13818 fi
13819
13820 if test -n "$cf_new_cppflags" ; then
13821
13822         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13823 fi
13824
13825 if test -n "$cf_new_extra_cppflags" ; then
13826
13827         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13828 fi
13829
13830                 ;;
13831         esac
13832         ;;
13833 esac
13834
13835 if test "$with_dbmalloc" = yes ; then
13836         echo "$as_me:13836: checking for dbmalloc.h" >&5
13837 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13838 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13839   echo $ECHO_N "(cached) $ECHO_C" >&6
13840 else
13841   cat >conftest.$ac_ext <<_ACEOF
13842 #line 13842 "configure"
13843 #include "confdefs.h"
13844 #include <dbmalloc.h>
13845 _ACEOF
13846 if { (eval echo "$as_me:13846: \"$ac_cpp conftest.$ac_ext\"") >&5
13847   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13848   ac_status=$?
13849   egrep -v '^ *\+' conftest.er1 >conftest.err
13850   rm -f conftest.er1
13851   cat conftest.err >&5
13852   echo "$as_me:13852: \$? = $ac_status" >&5
13853   (exit $ac_status); } >/dev/null; then
13854   if test -s conftest.err; then
13855     ac_cpp_err=$ac_c_preproc_warn_flag
13856   else
13857     ac_cpp_err=
13858   fi
13859 else
13860   ac_cpp_err=yes
13861 fi
13862 if test -z "$ac_cpp_err"; then
13863   ac_cv_header_dbmalloc_h=yes
13864 else
13865   echo "$as_me: failed program was:" >&5
13866   cat conftest.$ac_ext >&5
13867   ac_cv_header_dbmalloc_h=no
13868 fi
13869 rm -f conftest.err conftest.$ac_ext
13870 fi
13871 echo "$as_me:13871: result: $ac_cv_header_dbmalloc_h" >&5
13872 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13873 if test $ac_cv_header_dbmalloc_h = yes; then
13874
13875 echo "$as_me:13875: checking for debug_malloc in -ldbmalloc" >&5
13876 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13877 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13878   echo $ECHO_N "(cached) $ECHO_C" >&6
13879 else
13880   ac_check_lib_save_LIBS=$LIBS
13881 LIBS="-ldbmalloc  $LIBS"
13882 cat >conftest.$ac_ext <<_ACEOF
13883 #line 13883 "configure"
13884 #include "confdefs.h"
13885
13886 /* Override any gcc2 internal prototype to avoid an error.  */
13887 #ifdef __cplusplus
13888 extern "C"
13889 #endif
13890 /* We use char because int might match the return type of a gcc2
13891    builtin and then its argument prototype would still apply.  */
13892 char debug_malloc ();
13893 int
13894 main ()
13895 {
13896 debug_malloc ();
13897   ;
13898   return 0;
13899 }
13900 _ACEOF
13901 rm -f conftest.$ac_objext conftest$ac_exeext
13902 if { (eval echo "$as_me:13902: \"$ac_link\"") >&5
13903   (eval $ac_link) 2>&5
13904   ac_status=$?
13905   echo "$as_me:13905: \$? = $ac_status" >&5
13906   (exit $ac_status); } &&
13907          { ac_try='test -s conftest$ac_exeext'
13908   { (eval echo "$as_me:13908: \"$ac_try\"") >&5
13909   (eval $ac_try) 2>&5
13910   ac_status=$?
13911   echo "$as_me:13911: \$? = $ac_status" >&5
13912   (exit $ac_status); }; }; then
13913   ac_cv_lib_dbmalloc_debug_malloc=yes
13914 else
13915   echo "$as_me: failed program was:" >&5
13916 cat conftest.$ac_ext >&5
13917 ac_cv_lib_dbmalloc_debug_malloc=no
13918 fi
13919 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13920 LIBS=$ac_check_lib_save_LIBS
13921 fi
13922 echo "$as_me:13922: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13923 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13924 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13925   cat >>confdefs.h <<EOF
13926 #define HAVE_LIBDBMALLOC 1
13927 EOF
13928
13929   LIBS="-ldbmalloc $LIBS"
13930
13931 fi
13932
13933 fi
13934
13935 fi
13936
13937 echo "$as_me:13937: checking if you want to use valgrind for testing" >&5
13938 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13939
13940 # Check whether --with-valgrind or --without-valgrind was given.
13941 if test "${with_valgrind+set}" = set; then
13942   withval="$with_valgrind"
13943
13944 cat >>confdefs.h <<EOF
13945 #define USE_VALGRIND 1
13946 EOF
13947
13948         : ${with_cflags:=-g}
13949         : ${with_no_leaks:=yes}
13950          with_valgrind=yes
13951 else
13952   with_valgrind=
13953 fi;
13954 echo "$as_me:13954: result: ${with_valgrind:-no}" >&5
13955 echo "${ECHO_T}${with_valgrind:-no}" >&6
13956
13957 case .$with_cflags in #(vi
13958 .*-g*)
13959         case .$CFLAGS in #(vi
13960         .*-g*) #(vi
13961                 ;;
13962         *)
13963
13964 cf_fix_cppflags=no
13965 cf_new_cflags=
13966 cf_new_cppflags=
13967 cf_new_extra_cppflags=
13968
13969 for cf_add_cflags in -g
13970 do
13971 case $cf_fix_cppflags in
13972 no)
13973         case $cf_add_cflags in #(vi
13974         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13975                 case $cf_add_cflags in
13976                 -D*)
13977                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13978
13979                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13980                                 && test -z "${cf_tst_cflags}" \
13981                                 && cf_fix_cppflags=yes
13982
13983                         if test $cf_fix_cppflags = yes ; then
13984                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13985                                 continue
13986                         elif test "${cf_tst_cflags}" = "\"'" ; then
13987                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13988                                 continue
13989                         fi
13990                         ;;
13991                 esac
13992                 case "$CPPFLAGS" in
13993                 *$cf_add_cflags) #(vi
13994                         ;;
13995                 *) #(vi
13996                         case $cf_add_cflags in #(vi
13997                         -D*)
13998                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13999
14000 CPPFLAGS=`echo "$CPPFLAGS" | \
14001         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14002                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14003
14004                                 ;;
14005                         esac
14006                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14007                         ;;
14008                 esac
14009                 ;;
14010         *)
14011                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14012                 ;;
14013         esac
14014         ;;
14015 yes)
14016         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14017
14018         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14019
14020         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14021                 && test -z "${cf_tst_cflags}" \
14022                 && cf_fix_cppflags=no
14023         ;;
14024 esac
14025 done
14026
14027 if test -n "$cf_new_cflags" ; then
14028
14029         CFLAGS="$CFLAGS $cf_new_cflags"
14030 fi
14031
14032 if test -n "$cf_new_cppflags" ; then
14033
14034         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14035 fi
14036
14037 if test -n "$cf_new_extra_cppflags" ; then
14038
14039         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14040 fi
14041
14042                 ;;
14043         esac
14044         ;;
14045 esac
14046
14047 echo "$as_me:14047: checking if you want to perform memory-leak testing" >&5
14048 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14049
14050 # Check whether --enable-leaks or --disable-leaks was given.
14051 if test "${enable_leaks+set}" = set; then
14052   enableval="$enable_leaks"
14053   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14054 else
14055   : ${with_no_leaks:=no}
14056 fi;
14057 echo "$as_me:14057: result: $with_no_leaks" >&5
14058 echo "${ECHO_T}$with_no_leaks" >&6
14059
14060 if test "$with_no_leaks" = yes ; then
14061
14062 cat >>confdefs.h <<\EOF
14063 #define NO_LEAKS 1
14064 EOF
14065
14066 cat >>confdefs.h <<\EOF
14067 #define YY_NO_LEAKS 1
14068 EOF
14069
14070 fi
14071
14072 cat >>confdefs.h <<\EOF
14073 #define HAVE_NC_ALLOC_H 1
14074 EOF
14075
14076 ###     use option --enable-expanded to generate certain macros as functions
14077
14078 # Check whether --enable-expanded or --disable-expanded was given.
14079 if test "${enable_expanded+set}" = set; then
14080   enableval="$enable_expanded"
14081   test "x$enableval" = xyes &&
14082 cat >>confdefs.h <<\EOF
14083 #define NCURSES_EXPANDED 1
14084 EOF
14085
14086 fi;
14087
14088 ###     use option --disable-macros to suppress macros in favor of functions
14089
14090 # Check whether --enable-macros or --disable-macros was given.
14091 if test "${enable_macros+set}" = set; then
14092   enableval="$enable_macros"
14093   test "$enableval" = no &&
14094 cat >>confdefs.h <<\EOF
14095 #define NCURSES_NOMACROS 1
14096 EOF
14097
14098 fi;
14099
14100 # Normally we only add trace() to the debug-library.  Allow this to be
14101 # extended to all models of the ncurses library:
14102 cf_all_traces=no
14103 case "$CFLAGS $CPPFLAGS" in
14104 *-DTRACE*)
14105         cf_all_traces=yes
14106         ;;
14107 esac
14108
14109 echo "$as_me:14109: checking whether to add trace feature to all models" >&5
14110 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14111
14112 # Check whether --with-trace or --without-trace was given.
14113 if test "${with_trace+set}" = set; then
14114   withval="$with_trace"
14115   cf_with_trace=$withval
14116 else
14117   cf_with_trace=$cf_all_traces
14118 fi;
14119 echo "$as_me:14119: result: $cf_with_trace" >&5
14120 echo "${ECHO_T}$cf_with_trace" >&6
14121
14122 if test "x$cf_with_trace" = xyes ; then
14123         LIB_TRACING=all
14124         ADA_TRACE=TRUE
14125
14126 cf_fix_cppflags=no
14127 cf_new_cflags=
14128 cf_new_cppflags=
14129 cf_new_extra_cppflags=
14130
14131 for cf_add_cflags in -DTRACE
14132 do
14133 case $cf_fix_cppflags in
14134 no)
14135         case $cf_add_cflags in #(vi
14136         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14137                 case $cf_add_cflags in
14138                 -D*)
14139                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14140
14141                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14142                                 && test -z "${cf_tst_cflags}" \
14143                                 && cf_fix_cppflags=yes
14144
14145                         if test $cf_fix_cppflags = yes ; then
14146                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14147                                 continue
14148                         elif test "${cf_tst_cflags}" = "\"'" ; then
14149                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14150                                 continue
14151                         fi
14152                         ;;
14153                 esac
14154                 case "$CPPFLAGS" in
14155                 *$cf_add_cflags) #(vi
14156                         ;;
14157                 *) #(vi
14158                         case $cf_add_cflags in #(vi
14159                         -D*)
14160                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14161
14162 CPPFLAGS=`echo "$CPPFLAGS" | \
14163         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14164                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14165
14166                                 ;;
14167                         esac
14168                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14169                         ;;
14170                 esac
14171                 ;;
14172         *)
14173                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14174                 ;;
14175         esac
14176         ;;
14177 yes)
14178         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14179
14180         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14181
14182         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14183                 && test -z "${cf_tst_cflags}" \
14184                 && cf_fix_cppflags=no
14185         ;;
14186 esac
14187 done
14188
14189 if test -n "$cf_new_cflags" ; then
14190
14191         CFLAGS="$CFLAGS $cf_new_cflags"
14192 fi
14193
14194 if test -n "$cf_new_cppflags" ; then
14195
14196         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14197 fi
14198
14199 if test -n "$cf_new_extra_cppflags" ; then
14200
14201         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14202 fi
14203
14204 else
14205         LIB_TRACING=DEBUG
14206         ADA_TRACE=FALSE
14207 fi
14208
14209 echo "$as_me:14209: checking if we want to use GNAT projects" >&5
14210 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14211
14212 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14213 if test "${enable_gnat_projects+set}" = set; then
14214   enableval="$enable_gnat_projects"
14215   test "$enableval" != no && enableval=yes
14216   if test "$enableval" != "yes" ; then
14217     enable_gnat_projects=no
14218   else
14219     enable_gnat_projects=yes
14220   fi
14221 else
14222   enableval=yes
14223   enable_gnat_projects=yes
14224
14225 fi;
14226 echo "$as_me:14226: result: $enable_gnat_projects" >&5
14227 echo "${ECHO_T}$enable_gnat_projects" >&6
14228
14229 ###     Checks for libraries.
14230 case $cf_cv_system_name in #(vi
14231 *mingw32*|*mingw64*) #(vi
14232         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
14233         LIBS=" -lpsapi $LIBS"
14234         ;;
14235 *)
14236 echo "$as_me:14236: checking for gettimeofday" >&5
14237 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14238 if test "${ac_cv_func_gettimeofday+set}" = set; then
14239   echo $ECHO_N "(cached) $ECHO_C" >&6
14240 else
14241   cat >conftest.$ac_ext <<_ACEOF
14242 #line 14242 "configure"
14243 #include "confdefs.h"
14244 /* System header to define __stub macros and hopefully few prototypes,
14245     which can conflict with char gettimeofday (); below.  */
14246 #include <assert.h>
14247 /* Override any gcc2 internal prototype to avoid an error.  */
14248 #ifdef __cplusplus
14249 extern "C"
14250 #endif
14251 /* We use char because int might match the return type of a gcc2
14252    builtin and then its argument prototype would still apply.  */
14253 char gettimeofday ();
14254 char (*f) ();
14255
14256 int
14257 main ()
14258 {
14259 /* The GNU C library defines this for functions which it implements
14260     to always fail with ENOSYS.  Some functions are actually named
14261     something starting with __ and the normal name is an alias.  */
14262 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14263 choke me
14264 #else
14265 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14266 #endif
14267
14268   ;
14269   return 0;
14270 }
14271 _ACEOF
14272 rm -f conftest.$ac_objext conftest$ac_exeext
14273 if { (eval echo "$as_me:14273: \"$ac_link\"") >&5
14274   (eval $ac_link) 2>&5
14275   ac_status=$?
14276   echo "$as_me:14276: \$? = $ac_status" >&5
14277   (exit $ac_status); } &&
14278          { ac_try='test -s conftest$ac_exeext'
14279   { (eval echo "$as_me:14279: \"$ac_try\"") >&5
14280   (eval $ac_try) 2>&5
14281   ac_status=$?
14282   echo "$as_me:14282: \$? = $ac_status" >&5
14283   (exit $ac_status); }; }; then
14284   ac_cv_func_gettimeofday=yes
14285 else
14286   echo "$as_me: failed program was:" >&5
14287 cat conftest.$ac_ext >&5
14288 ac_cv_func_gettimeofday=no
14289 fi
14290 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14291 fi
14292 echo "$as_me:14292: result: $ac_cv_func_gettimeofday" >&5
14293 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14294 if test $ac_cv_func_gettimeofday = yes; then
14295
14296 cat >>confdefs.h <<\EOF
14297 #define HAVE_GETTIMEOFDAY 1
14298 EOF
14299
14300 else
14301
14302 echo "$as_me:14302: checking for gettimeofday in -lbsd" >&5
14303 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14304 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14305   echo $ECHO_N "(cached) $ECHO_C" >&6
14306 else
14307   ac_check_lib_save_LIBS=$LIBS
14308 LIBS="-lbsd  $LIBS"
14309 cat >conftest.$ac_ext <<_ACEOF
14310 #line 14310 "configure"
14311 #include "confdefs.h"
14312
14313 /* Override any gcc2 internal prototype to avoid an error.  */
14314 #ifdef __cplusplus
14315 extern "C"
14316 #endif
14317 /* We use char because int might match the return type of a gcc2
14318    builtin and then its argument prototype would still apply.  */
14319 char gettimeofday ();
14320 int
14321 main ()
14322 {
14323 gettimeofday ();
14324   ;
14325   return 0;
14326 }
14327 _ACEOF
14328 rm -f conftest.$ac_objext conftest$ac_exeext
14329 if { (eval echo "$as_me:14329: \"$ac_link\"") >&5
14330   (eval $ac_link) 2>&5
14331   ac_status=$?
14332   echo "$as_me:14332: \$? = $ac_status" >&5
14333   (exit $ac_status); } &&
14334          { ac_try='test -s conftest$ac_exeext'
14335   { (eval echo "$as_me:14335: \"$ac_try\"") >&5
14336   (eval $ac_try) 2>&5
14337   ac_status=$?
14338   echo "$as_me:14338: \$? = $ac_status" >&5
14339   (exit $ac_status); }; }; then
14340   ac_cv_lib_bsd_gettimeofday=yes
14341 else
14342   echo "$as_me: failed program was:" >&5
14343 cat conftest.$ac_ext >&5
14344 ac_cv_lib_bsd_gettimeofday=no
14345 fi
14346 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14347 LIBS=$ac_check_lib_save_LIBS
14348 fi
14349 echo "$as_me:14349: result: $ac_cv_lib_bsd_gettimeofday" >&5
14350 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14351 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14352
14353 cat >>confdefs.h <<\EOF
14354 #define HAVE_GETTIMEOFDAY 1
14355 EOF
14356
14357 cf_add_libs="-lbsd"
14358 # Filter out duplicates - this happens with badly-designed ".pc" files...
14359 for cf_add_1lib in $LIBS
14360 do
14361         for cf_add_2lib in $cf_add_libs
14362         do
14363                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14364                 then
14365                         cf_add_1lib=
14366                         break
14367                 fi
14368         done
14369         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14370 done
14371 LIBS="$cf_add_libs"
14372
14373 fi
14374
14375 fi
14376         ;;
14377 esac
14378
14379 echo "$as_me:14379: checking if -lm needed for math functions" >&5
14380 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14381 if test "${cf_cv_need_libm+set}" = set; then
14382   echo $ECHO_N "(cached) $ECHO_C" >&6
14383 else
14384
14385         cat >conftest.$ac_ext <<_ACEOF
14386 #line 14386 "configure"
14387 #include "confdefs.h"
14388
14389         #include <stdio.h>
14390         #include <math.h>
14391
14392 int
14393 main ()
14394 {
14395 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14396   ;
14397   return 0;
14398 }
14399 _ACEOF
14400 rm -f conftest.$ac_objext conftest$ac_exeext
14401 if { (eval echo "$as_me:14401: \"$ac_link\"") >&5
14402   (eval $ac_link) 2>&5
14403   ac_status=$?
14404   echo "$as_me:14404: \$? = $ac_status" >&5
14405   (exit $ac_status); } &&
14406          { ac_try='test -s conftest$ac_exeext'
14407   { (eval echo "$as_me:14407: \"$ac_try\"") >&5
14408   (eval $ac_try) 2>&5
14409   ac_status=$?
14410   echo "$as_me:14410: \$? = $ac_status" >&5
14411   (exit $ac_status); }; }; then
14412   cf_cv_need_libm=no
14413 else
14414   echo "$as_me: failed program was:" >&5
14415 cat conftest.$ac_ext >&5
14416 cf_cv_need_libm=yes
14417 fi
14418 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14419 fi
14420 echo "$as_me:14420: result: $cf_cv_need_libm" >&5
14421 echo "${ECHO_T}$cf_cv_need_libm" >&6
14422 if test "$cf_cv_need_libm" = yes
14423 then
14424 MATH_LIB=-lm
14425 fi
14426
14427 ###     Checks for header files.
14428 echo "$as_me:14428: checking for ANSI C header files" >&5
14429 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14430 if test "${ac_cv_header_stdc+set}" = set; then
14431   echo $ECHO_N "(cached) $ECHO_C" >&6
14432 else
14433   cat >conftest.$ac_ext <<_ACEOF
14434 #line 14434 "configure"
14435 #include "confdefs.h"
14436 #include <stdlib.h>
14437 #include <stdarg.h>
14438 #include <string.h>
14439 #include <float.h>
14440
14441 _ACEOF
14442 if { (eval echo "$as_me:14442: \"$ac_cpp conftest.$ac_ext\"") >&5
14443   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14444   ac_status=$?
14445   egrep -v '^ *\+' conftest.er1 >conftest.err
14446   rm -f conftest.er1
14447   cat conftest.err >&5
14448   echo "$as_me:14448: \$? = $ac_status" >&5
14449   (exit $ac_status); } >/dev/null; then
14450   if test -s conftest.err; then
14451     ac_cpp_err=$ac_c_preproc_warn_flag
14452   else
14453     ac_cpp_err=
14454   fi
14455 else
14456   ac_cpp_err=yes
14457 fi
14458 if test -z "$ac_cpp_err"; then
14459   ac_cv_header_stdc=yes
14460 else
14461   echo "$as_me: failed program was:" >&5
14462   cat conftest.$ac_ext >&5
14463   ac_cv_header_stdc=no
14464 fi
14465 rm -f conftest.err conftest.$ac_ext
14466
14467 if test $ac_cv_header_stdc = yes; then
14468   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14469   cat >conftest.$ac_ext <<_ACEOF
14470 #line 14470 "configure"
14471 #include "confdefs.h"
14472 #include <string.h>
14473
14474 _ACEOF
14475 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14476   egrep "memchr" >/dev/null 2>&1; then
14477   :
14478 else
14479   ac_cv_header_stdc=no
14480 fi
14481 rm -rf conftest*
14482
14483 fi
14484
14485 if test $ac_cv_header_stdc = yes; then
14486   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14487   cat >conftest.$ac_ext <<_ACEOF
14488 #line 14488 "configure"
14489 #include "confdefs.h"
14490 #include <stdlib.h>
14491
14492 _ACEOF
14493 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14494   egrep "free" >/dev/null 2>&1; then
14495   :
14496 else
14497   ac_cv_header_stdc=no
14498 fi
14499 rm -rf conftest*
14500
14501 fi
14502
14503 if test $ac_cv_header_stdc = yes; then
14504   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14505   if test "$cross_compiling" = yes; then
14506   :
14507 else
14508   cat >conftest.$ac_ext <<_ACEOF
14509 #line 14509 "configure"
14510 #include "confdefs.h"
14511 #include <ctype.h>
14512 #if ((' ' & 0x0FF) == 0x020)
14513 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14514 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14515 #else
14516 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14517                      || ('j' <= (c) && (c) <= 'r') \
14518                      || ('s' <= (c) && (c) <= 'z'))
14519 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14520 #endif
14521
14522 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14523 int
14524 main ()
14525 {
14526   int i;
14527   for (i = 0; i < 256; i++)
14528     if (XOR (islower (i), ISLOWER (i))
14529         || toupper (i) != TOUPPER (i))
14530       $ac_main_return(2);
14531   $ac_main_return (0);
14532 }
14533 _ACEOF
14534 rm -f conftest$ac_exeext
14535 if { (eval echo "$as_me:14535: \"$ac_link\"") >&5
14536   (eval $ac_link) 2>&5
14537   ac_status=$?
14538   echo "$as_me:14538: \$? = $ac_status" >&5
14539   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14540   { (eval echo "$as_me:14540: \"$ac_try\"") >&5
14541   (eval $ac_try) 2>&5
14542   ac_status=$?
14543   echo "$as_me:14543: \$? = $ac_status" >&5
14544   (exit $ac_status); }; }; then
14545   :
14546 else
14547   echo "$as_me: program exited with status $ac_status" >&5
14548 echo "$as_me: failed program was:" >&5
14549 cat conftest.$ac_ext >&5
14550 ac_cv_header_stdc=no
14551 fi
14552 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14553 fi
14554 fi
14555 fi
14556 echo "$as_me:14556: result: $ac_cv_header_stdc" >&5
14557 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14558 if test $ac_cv_header_stdc = yes; then
14559
14560 cat >>confdefs.h <<\EOF
14561 #define STDC_HEADERS 1
14562 EOF
14563
14564 fi
14565
14566 ac_header_dirent=no
14567 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14568   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14569 echo "$as_me:14569: checking for $ac_hdr that defines DIR" >&5
14570 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14571 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14572   echo $ECHO_N "(cached) $ECHO_C" >&6
14573 else
14574   cat >conftest.$ac_ext <<_ACEOF
14575 #line 14575 "configure"
14576 #include "confdefs.h"
14577 #include <sys/types.h>
14578 #include <$ac_hdr>
14579
14580 int
14581 main ()
14582 {
14583 if ((DIR *) 0)
14584 return 0;
14585   ;
14586   return 0;
14587 }
14588 _ACEOF
14589 rm -f conftest.$ac_objext
14590 if { (eval echo "$as_me:14590: \"$ac_compile\"") >&5
14591   (eval $ac_compile) 2>&5
14592   ac_status=$?
14593   echo "$as_me:14593: \$? = $ac_status" >&5
14594   (exit $ac_status); } &&
14595          { ac_try='test -s conftest.$ac_objext'
14596   { (eval echo "$as_me:14596: \"$ac_try\"") >&5
14597   (eval $ac_try) 2>&5
14598   ac_status=$?
14599   echo "$as_me:14599: \$? = $ac_status" >&5
14600   (exit $ac_status); }; }; then
14601   eval "$as_ac_Header=yes"
14602 else
14603   echo "$as_me: failed program was:" >&5
14604 cat conftest.$ac_ext >&5
14605 eval "$as_ac_Header=no"
14606 fi
14607 rm -f conftest.$ac_objext conftest.$ac_ext
14608 fi
14609 echo "$as_me:14609: result: `eval echo '${'$as_ac_Header'}'`" >&5
14610 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14611 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14612   cat >>confdefs.h <<EOF
14613 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14614 EOF
14615
14616 ac_header_dirent=$ac_hdr; break
14617 fi
14618
14619 done
14620 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14621 if test $ac_header_dirent = dirent.h; then
14622   echo "$as_me:14622: checking for opendir in -ldir" >&5
14623 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14624 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14625   echo $ECHO_N "(cached) $ECHO_C" >&6
14626 else
14627   ac_check_lib_save_LIBS=$LIBS
14628 LIBS="-ldir  $LIBS"
14629 cat >conftest.$ac_ext <<_ACEOF
14630 #line 14630 "configure"
14631 #include "confdefs.h"
14632
14633 /* Override any gcc2 internal prototype to avoid an error.  */
14634 #ifdef __cplusplus
14635 extern "C"
14636 #endif
14637 /* We use char because int might match the return type of a gcc2
14638    builtin and then its argument prototype would still apply.  */
14639 char opendir ();
14640 int
14641 main ()
14642 {
14643 opendir ();
14644   ;
14645   return 0;
14646 }
14647 _ACEOF
14648 rm -f conftest.$ac_objext conftest$ac_exeext
14649 if { (eval echo "$as_me:14649: \"$ac_link\"") >&5
14650   (eval $ac_link) 2>&5
14651   ac_status=$?
14652   echo "$as_me:14652: \$? = $ac_status" >&5
14653   (exit $ac_status); } &&
14654          { ac_try='test -s conftest$ac_exeext'
14655   { (eval echo "$as_me:14655: \"$ac_try\"") >&5
14656   (eval $ac_try) 2>&5
14657   ac_status=$?
14658   echo "$as_me:14658: \$? = $ac_status" >&5
14659   (exit $ac_status); }; }; then
14660   ac_cv_lib_dir_opendir=yes
14661 else
14662   echo "$as_me: failed program was:" >&5
14663 cat conftest.$ac_ext >&5
14664 ac_cv_lib_dir_opendir=no
14665 fi
14666 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14667 LIBS=$ac_check_lib_save_LIBS
14668 fi
14669 echo "$as_me:14669: result: $ac_cv_lib_dir_opendir" >&5
14670 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14671 if test $ac_cv_lib_dir_opendir = yes; then
14672   LIBS="$LIBS -ldir"
14673 fi
14674
14675 else
14676   echo "$as_me:14676: checking for opendir in -lx" >&5
14677 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14678 if test "${ac_cv_lib_x_opendir+set}" = set; then
14679   echo $ECHO_N "(cached) $ECHO_C" >&6
14680 else
14681   ac_check_lib_save_LIBS=$LIBS
14682 LIBS="-lx  $LIBS"
14683 cat >conftest.$ac_ext <<_ACEOF
14684 #line 14684 "configure"
14685 #include "confdefs.h"
14686
14687 /* Override any gcc2 internal prototype to avoid an error.  */
14688 #ifdef __cplusplus
14689 extern "C"
14690 #endif
14691 /* We use char because int might match the return type of a gcc2
14692    builtin and then its argument prototype would still apply.  */
14693 char opendir ();
14694 int
14695 main ()
14696 {
14697 opendir ();
14698   ;
14699   return 0;
14700 }
14701 _ACEOF
14702 rm -f conftest.$ac_objext conftest$ac_exeext
14703 if { (eval echo "$as_me:14703: \"$ac_link\"") >&5
14704   (eval $ac_link) 2>&5
14705   ac_status=$?
14706   echo "$as_me:14706: \$? = $ac_status" >&5
14707   (exit $ac_status); } &&
14708          { ac_try='test -s conftest$ac_exeext'
14709   { (eval echo "$as_me:14709: \"$ac_try\"") >&5
14710   (eval $ac_try) 2>&5
14711   ac_status=$?
14712   echo "$as_me:14712: \$? = $ac_status" >&5
14713   (exit $ac_status); }; }; then
14714   ac_cv_lib_x_opendir=yes
14715 else
14716   echo "$as_me: failed program was:" >&5
14717 cat conftest.$ac_ext >&5
14718 ac_cv_lib_x_opendir=no
14719 fi
14720 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14721 LIBS=$ac_check_lib_save_LIBS
14722 fi
14723 echo "$as_me:14723: result: $ac_cv_lib_x_opendir" >&5
14724 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14725 if test $ac_cv_lib_x_opendir = yes; then
14726   LIBS="$LIBS -lx"
14727 fi
14728
14729 fi
14730
14731 echo "$as_me:14731: checking whether time.h and sys/time.h may both be included" >&5
14732 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14733 if test "${ac_cv_header_time+set}" = set; then
14734   echo $ECHO_N "(cached) $ECHO_C" >&6
14735 else
14736   cat >conftest.$ac_ext <<_ACEOF
14737 #line 14737 "configure"
14738 #include "confdefs.h"
14739 #include <sys/types.h>
14740 #include <sys/time.h>
14741 #include <time.h>
14742
14743 int
14744 main ()
14745 {
14746 if ((struct tm *) 0)
14747 return 0;
14748   ;
14749   return 0;
14750 }
14751 _ACEOF
14752 rm -f conftest.$ac_objext
14753 if { (eval echo "$as_me:14753: \"$ac_compile\"") >&5
14754   (eval $ac_compile) 2>&5
14755   ac_status=$?
14756   echo "$as_me:14756: \$? = $ac_status" >&5
14757   (exit $ac_status); } &&
14758          { ac_try='test -s conftest.$ac_objext'
14759   { (eval echo "$as_me:14759: \"$ac_try\"") >&5
14760   (eval $ac_try) 2>&5
14761   ac_status=$?
14762   echo "$as_me:14762: \$? = $ac_status" >&5
14763   (exit $ac_status); }; }; then
14764   ac_cv_header_time=yes
14765 else
14766   echo "$as_me: failed program was:" >&5
14767 cat conftest.$ac_ext >&5
14768 ac_cv_header_time=no
14769 fi
14770 rm -f conftest.$ac_objext conftest.$ac_ext
14771 fi
14772 echo "$as_me:14772: result: $ac_cv_header_time" >&5
14773 echo "${ECHO_T}$ac_cv_header_time" >&6
14774 if test $ac_cv_header_time = yes; then
14775
14776 cat >>confdefs.h <<\EOF
14777 #define TIME_WITH_SYS_TIME 1
14778 EOF
14779
14780 fi
14781
14782 cf_regex_func=no
14783
14784 cf_regex_libs="regex re"
14785 case $host_os in #(vi
14786 mingw*)
14787         cf_regex_libs="gnurx $cf_regex_libs"
14788         ;;
14789 esac
14790
14791 echo "$as_me:14791: checking for regcomp" >&5
14792 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14793 if test "${ac_cv_func_regcomp+set}" = set; then
14794   echo $ECHO_N "(cached) $ECHO_C" >&6
14795 else
14796   cat >conftest.$ac_ext <<_ACEOF
14797 #line 14797 "configure"
14798 #include "confdefs.h"
14799 /* System header to define __stub macros and hopefully few prototypes,
14800     which can conflict with char regcomp (); below.  */
14801 #include <assert.h>
14802 /* Override any gcc2 internal prototype to avoid an error.  */
14803 #ifdef __cplusplus
14804 extern "C"
14805 #endif
14806 /* We use char because int might match the return type of a gcc2
14807    builtin and then its argument prototype would still apply.  */
14808 char regcomp ();
14809 char (*f) ();
14810
14811 int
14812 main ()
14813 {
14814 /* The GNU C library defines this for functions which it implements
14815     to always fail with ENOSYS.  Some functions are actually named
14816     something starting with __ and the normal name is an alias.  */
14817 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14818 choke me
14819 #else
14820 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14821 #endif
14822
14823   ;
14824   return 0;
14825 }
14826 _ACEOF
14827 rm -f conftest.$ac_objext conftest$ac_exeext
14828 if { (eval echo "$as_me:14828: \"$ac_link\"") >&5
14829   (eval $ac_link) 2>&5
14830   ac_status=$?
14831   echo "$as_me:14831: \$? = $ac_status" >&5
14832   (exit $ac_status); } &&
14833          { ac_try='test -s conftest$ac_exeext'
14834   { (eval echo "$as_me:14834: \"$ac_try\"") >&5
14835   (eval $ac_try) 2>&5
14836   ac_status=$?
14837   echo "$as_me:14837: \$? = $ac_status" >&5
14838   (exit $ac_status); }; }; then
14839   ac_cv_func_regcomp=yes
14840 else
14841   echo "$as_me: failed program was:" >&5
14842 cat conftest.$ac_ext >&5
14843 ac_cv_func_regcomp=no
14844 fi
14845 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14846 fi
14847 echo "$as_me:14847: result: $ac_cv_func_regcomp" >&5
14848 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14849 if test $ac_cv_func_regcomp = yes; then
14850   cf_regex_func=regcomp
14851 else
14852
14853         for cf_regex_lib in $cf_regex_libs
14854         do
14855                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14856 echo "$as_me:14856: checking for regcomp in -l$cf_regex_lib" >&5
14857 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14858 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14859   echo $ECHO_N "(cached) $ECHO_C" >&6
14860 else
14861   ac_check_lib_save_LIBS=$LIBS
14862 LIBS="-l$cf_regex_lib  $LIBS"
14863 cat >conftest.$ac_ext <<_ACEOF
14864 #line 14864 "configure"
14865 #include "confdefs.h"
14866
14867 /* Override any gcc2 internal prototype to avoid an error.  */
14868 #ifdef __cplusplus
14869 extern "C"
14870 #endif
14871 /* We use char because int might match the return type of a gcc2
14872    builtin and then its argument prototype would still apply.  */
14873 char regcomp ();
14874 int
14875 main ()
14876 {
14877 regcomp ();
14878   ;
14879   return 0;
14880 }
14881 _ACEOF
14882 rm -f conftest.$ac_objext conftest$ac_exeext
14883 if { (eval echo "$as_me:14883: \"$ac_link\"") >&5
14884   (eval $ac_link) 2>&5
14885   ac_status=$?
14886   echo "$as_me:14886: \$? = $ac_status" >&5
14887   (exit $ac_status); } &&
14888          { ac_try='test -s conftest$ac_exeext'
14889   { (eval echo "$as_me:14889: \"$ac_try\"") >&5
14890   (eval $ac_try) 2>&5
14891   ac_status=$?
14892   echo "$as_me:14892: \$? = $ac_status" >&5
14893   (exit $ac_status); }; }; then
14894   eval "$as_ac_Lib=yes"
14895 else
14896   echo "$as_me: failed program was:" >&5
14897 cat conftest.$ac_ext >&5
14898 eval "$as_ac_Lib=no"
14899 fi
14900 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14901 LIBS=$ac_check_lib_save_LIBS
14902 fi
14903 echo "$as_me:14903: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14904 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14905 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14906
14907 cf_add_libs="-l$cf_regex_lib"
14908 # Filter out duplicates - this happens with badly-designed ".pc" files...
14909 for cf_add_1lib in $LIBS
14910 do
14911         for cf_add_2lib in $cf_add_libs
14912         do
14913                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14914                 then
14915                         cf_add_1lib=
14916                         break
14917                 fi
14918         done
14919         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14920 done
14921 LIBS="$cf_add_libs"
14922
14923                                 cf_regex_func=regcomp
14924                                 break
14925 fi
14926
14927         done
14928
14929 fi
14930
14931 if test "$cf_regex_func" = no ; then
14932         echo "$as_me:14932: checking for compile" >&5
14933 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14934 if test "${ac_cv_func_compile+set}" = set; then
14935   echo $ECHO_N "(cached) $ECHO_C" >&6
14936 else
14937   cat >conftest.$ac_ext <<_ACEOF
14938 #line 14938 "configure"
14939 #include "confdefs.h"
14940 /* System header to define __stub macros and hopefully few prototypes,
14941     which can conflict with char compile (); below.  */
14942 #include <assert.h>
14943 /* Override any gcc2 internal prototype to avoid an error.  */
14944 #ifdef __cplusplus
14945 extern "C"
14946 #endif
14947 /* We use char because int might match the return type of a gcc2
14948    builtin and then its argument prototype would still apply.  */
14949 char compile ();
14950 char (*f) ();
14951
14952 int
14953 main ()
14954 {
14955 /* The GNU C library defines this for functions which it implements
14956     to always fail with ENOSYS.  Some functions are actually named
14957     something starting with __ and the normal name is an alias.  */
14958 #if defined (__stub_compile) || defined (__stub___compile)
14959 choke me
14960 #else
14961 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14962 #endif
14963
14964   ;
14965   return 0;
14966 }
14967 _ACEOF
14968 rm -f conftest.$ac_objext conftest$ac_exeext
14969 if { (eval echo "$as_me:14969: \"$ac_link\"") >&5
14970   (eval $ac_link) 2>&5
14971   ac_status=$?
14972   echo "$as_me:14972: \$? = $ac_status" >&5
14973   (exit $ac_status); } &&
14974          { ac_try='test -s conftest$ac_exeext'
14975   { (eval echo "$as_me:14975: \"$ac_try\"") >&5
14976   (eval $ac_try) 2>&5
14977   ac_status=$?
14978   echo "$as_me:14978: \$? = $ac_status" >&5
14979   (exit $ac_status); }; }; then
14980   ac_cv_func_compile=yes
14981 else
14982   echo "$as_me: failed program was:" >&5
14983 cat conftest.$ac_ext >&5
14984 ac_cv_func_compile=no
14985 fi
14986 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14987 fi
14988 echo "$as_me:14988: result: $ac_cv_func_compile" >&5
14989 echo "${ECHO_T}$ac_cv_func_compile" >&6
14990 if test $ac_cv_func_compile = yes; then
14991   cf_regex_func=compile
14992 else
14993
14994                 echo "$as_me:14994: checking for compile in -lgen" >&5
14995 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14996 if test "${ac_cv_lib_gen_compile+set}" = set; then
14997   echo $ECHO_N "(cached) $ECHO_C" >&6
14998 else
14999   ac_check_lib_save_LIBS=$LIBS
15000 LIBS="-lgen  $LIBS"
15001 cat >conftest.$ac_ext <<_ACEOF
15002 #line 15002 "configure"
15003 #include "confdefs.h"
15004
15005 /* Override any gcc2 internal prototype to avoid an error.  */
15006 #ifdef __cplusplus
15007 extern "C"
15008 #endif
15009 /* We use char because int might match the return type of a gcc2
15010    builtin and then its argument prototype would still apply.  */
15011 char compile ();
15012 int
15013 main ()
15014 {
15015 compile ();
15016   ;
15017   return 0;
15018 }
15019 _ACEOF
15020 rm -f conftest.$ac_objext conftest$ac_exeext
15021 if { (eval echo "$as_me:15021: \"$ac_link\"") >&5
15022   (eval $ac_link) 2>&5
15023   ac_status=$?
15024   echo "$as_me:15024: \$? = $ac_status" >&5
15025   (exit $ac_status); } &&
15026          { ac_try='test -s conftest$ac_exeext'
15027   { (eval echo "$as_me:15027: \"$ac_try\"") >&5
15028   (eval $ac_try) 2>&5
15029   ac_status=$?
15030   echo "$as_me:15030: \$? = $ac_status" >&5
15031   (exit $ac_status); }; }; then
15032   ac_cv_lib_gen_compile=yes
15033 else
15034   echo "$as_me: failed program was:" >&5
15035 cat conftest.$ac_ext >&5
15036 ac_cv_lib_gen_compile=no
15037 fi
15038 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15039 LIBS=$ac_check_lib_save_LIBS
15040 fi
15041 echo "$as_me:15041: result: $ac_cv_lib_gen_compile" >&5
15042 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15043 if test $ac_cv_lib_gen_compile = yes; then
15044
15045 cf_add_libs="-lgen"
15046 # Filter out duplicates - this happens with badly-designed ".pc" files...
15047 for cf_add_1lib in $LIBS
15048 do
15049         for cf_add_2lib in $cf_add_libs
15050         do
15051                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15052                 then
15053                         cf_add_1lib=
15054                         break
15055                 fi
15056         done
15057         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15058 done
15059 LIBS="$cf_add_libs"
15060
15061                                 cf_regex_func=compile
15062 fi
15063
15064 fi
15065
15066 fi
15067
15068 if test "$cf_regex_func" = no ; then
15069         { echo "$as_me:15069: WARNING: cannot find regular expression library" >&5
15070 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15071 fi
15072
15073 echo "$as_me:15073: checking for regular-expression headers" >&5
15074 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15075 if test "${cf_cv_regex_hdrs+set}" = set; then
15076   echo $ECHO_N "(cached) $ECHO_C" >&6
15077 else
15078
15079 cf_cv_regex_hdrs=no
15080 case $cf_regex_func in #(vi
15081 compile) #(vi
15082         for cf_regex_hdr in regexp.h regexpr.h
15083         do
15084                 cat >conftest.$ac_ext <<_ACEOF
15085 #line 15085 "configure"
15086 #include "confdefs.h"
15087 #include <$cf_regex_hdr>
15088 int
15089 main ()
15090 {
15091
15092                         char *p = compile("", "", "", 0);
15093                         int x = step("", "");
15094
15095   ;
15096   return 0;
15097 }
15098 _ACEOF
15099 rm -f conftest.$ac_objext conftest$ac_exeext
15100 if { (eval echo "$as_me:15100: \"$ac_link\"") >&5
15101   (eval $ac_link) 2>&5
15102   ac_status=$?
15103   echo "$as_me:15103: \$? = $ac_status" >&5
15104   (exit $ac_status); } &&
15105          { ac_try='test -s conftest$ac_exeext'
15106   { (eval echo "$as_me:15106: \"$ac_try\"") >&5
15107   (eval $ac_try) 2>&5
15108   ac_status=$?
15109   echo "$as_me:15109: \$? = $ac_status" >&5
15110   (exit $ac_status); }; }; then
15111
15112                         cf_cv_regex_hdrs=$cf_regex_hdr
15113                         break
15114
15115 else
15116   echo "$as_me: failed program was:" >&5
15117 cat conftest.$ac_ext >&5
15118 fi
15119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15120         done
15121         ;;
15122 *)
15123         for cf_regex_hdr in regex.h
15124         do
15125                 cat >conftest.$ac_ext <<_ACEOF
15126 #line 15126 "configure"
15127 #include "confdefs.h"
15128 #include <sys/types.h>
15129 #include <$cf_regex_hdr>
15130 int
15131 main ()
15132 {
15133
15134                         regex_t *p;
15135                         int x = regcomp(p, "", 0);
15136                         int y = regexec(p, "", 0, 0, 0);
15137                         regfree(p);
15138
15139   ;
15140   return 0;
15141 }
15142 _ACEOF
15143 rm -f conftest.$ac_objext conftest$ac_exeext
15144 if { (eval echo "$as_me:15144: \"$ac_link\"") >&5
15145   (eval $ac_link) 2>&5
15146   ac_status=$?
15147   echo "$as_me:15147: \$? = $ac_status" >&5
15148   (exit $ac_status); } &&
15149          { ac_try='test -s conftest$ac_exeext'
15150   { (eval echo "$as_me:15150: \"$ac_try\"") >&5
15151   (eval $ac_try) 2>&5
15152   ac_status=$?
15153   echo "$as_me:15153: \$? = $ac_status" >&5
15154   (exit $ac_status); }; }; then
15155
15156                         cf_cv_regex_hdrs=$cf_regex_hdr
15157                         break
15158
15159 else
15160   echo "$as_me: failed program was:" >&5
15161 cat conftest.$ac_ext >&5
15162 fi
15163 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15164         done
15165         ;;
15166 esac
15167
15168 fi
15169 echo "$as_me:15169: result: $cf_cv_regex_hdrs" >&5
15170 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15171
15172 case $cf_cv_regex_hdrs in #(vi
15173     no)        { echo "$as_me:15173: WARNING: no regular expression header found" >&5
15174 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
15175     regex.h)
15176 cat >>confdefs.h <<\EOF
15177 #define HAVE_REGEX_H_FUNCS 1
15178 EOF
15179  ;; #(vi
15180     regexp.h)
15181 cat >>confdefs.h <<\EOF
15182 #define HAVE_REGEXP_H_FUNCS 1
15183 EOF
15184  ;; #(vi
15185     regexpr.h)
15186 cat >>confdefs.h <<\EOF
15187 #define HAVE_REGEXPR_H_FUNCS 1
15188 EOF
15189  ;;
15190 esac
15191
15192 for ac_header in \
15193 fcntl.h \
15194 getopt.h \
15195 limits.h \
15196 locale.h \
15197 math.h \
15198 poll.h \
15199 sys/bsdtypes.h \
15200 sys/ioctl.h \
15201 sys/param.h \
15202 sys/poll.h \
15203 sys/select.h \
15204 sys/time.h \
15205 sys/times.h \
15206 ttyent.h \
15207 unistd.h \
15208 wctype.h \
15209
15210 do
15211 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15212 echo "$as_me:15212: checking for $ac_header" >&5
15213 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15214 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15215   echo $ECHO_N "(cached) $ECHO_C" >&6
15216 else
15217   cat >conftest.$ac_ext <<_ACEOF
15218 #line 15218 "configure"
15219 #include "confdefs.h"
15220 #include <$ac_header>
15221 _ACEOF
15222 if { (eval echo "$as_me:15222: \"$ac_cpp conftest.$ac_ext\"") >&5
15223   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15224   ac_status=$?
15225   egrep -v '^ *\+' conftest.er1 >conftest.err
15226   rm -f conftest.er1
15227   cat conftest.err >&5
15228   echo "$as_me:15228: \$? = $ac_status" >&5
15229   (exit $ac_status); } >/dev/null; then
15230   if test -s conftest.err; then
15231     ac_cpp_err=$ac_c_preproc_warn_flag
15232   else
15233     ac_cpp_err=
15234   fi
15235 else
15236   ac_cpp_err=yes
15237 fi
15238 if test -z "$ac_cpp_err"; then
15239   eval "$as_ac_Header=yes"
15240 else
15241   echo "$as_me: failed program was:" >&5
15242   cat conftest.$ac_ext >&5
15243   eval "$as_ac_Header=no"
15244 fi
15245 rm -f conftest.err conftest.$ac_ext
15246 fi
15247 echo "$as_me:15247: result: `eval echo '${'$as_ac_Header'}'`" >&5
15248 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15249 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15250   cat >>confdefs.h <<EOF
15251 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15252 EOF
15253
15254 fi
15255 done
15256
15257 for ac_header in unistd.h getopt.h
15258 do
15259 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15260 echo "$as_me:15260: checking for $ac_header" >&5
15261 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15262 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15263   echo $ECHO_N "(cached) $ECHO_C" >&6
15264 else
15265   cat >conftest.$ac_ext <<_ACEOF
15266 #line 15266 "configure"
15267 #include "confdefs.h"
15268 #include <$ac_header>
15269 _ACEOF
15270 if { (eval echo "$as_me:15270: \"$ac_cpp conftest.$ac_ext\"") >&5
15271   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15272   ac_status=$?
15273   egrep -v '^ *\+' conftest.er1 >conftest.err
15274   rm -f conftest.er1
15275   cat conftest.err >&5
15276   echo "$as_me:15276: \$? = $ac_status" >&5
15277   (exit $ac_status); } >/dev/null; then
15278   if test -s conftest.err; then
15279     ac_cpp_err=$ac_c_preproc_warn_flag
15280   else
15281     ac_cpp_err=
15282   fi
15283 else
15284   ac_cpp_err=yes
15285 fi
15286 if test -z "$ac_cpp_err"; then
15287   eval "$as_ac_Header=yes"
15288 else
15289   echo "$as_me: failed program was:" >&5
15290   cat conftest.$ac_ext >&5
15291   eval "$as_ac_Header=no"
15292 fi
15293 rm -f conftest.err conftest.$ac_ext
15294 fi
15295 echo "$as_me:15295: result: `eval echo '${'$as_ac_Header'}'`" >&5
15296 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15297 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15298   cat >>confdefs.h <<EOF
15299 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15300 EOF
15301
15302 fi
15303 done
15304
15305 echo "$as_me:15305: checking for header declaring getopt variables" >&5
15306 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15307 if test "${cf_cv_getopt_header+set}" = set; then
15308   echo $ECHO_N "(cached) $ECHO_C" >&6
15309 else
15310
15311 cf_cv_getopt_header=none
15312 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15313 do
15314 cat >conftest.$ac_ext <<_ACEOF
15315 #line 15315 "configure"
15316 #include "confdefs.h"
15317
15318 #include <$cf_header>
15319 int
15320 main ()
15321 {
15322 int x = optind; char *y = optarg
15323   ;
15324   return 0;
15325 }
15326 _ACEOF
15327 rm -f conftest.$ac_objext
15328 if { (eval echo "$as_me:15328: \"$ac_compile\"") >&5
15329   (eval $ac_compile) 2>&5
15330   ac_status=$?
15331   echo "$as_me:15331: \$? = $ac_status" >&5
15332   (exit $ac_status); } &&
15333          { ac_try='test -s conftest.$ac_objext'
15334   { (eval echo "$as_me:15334: \"$ac_try\"") >&5
15335   (eval $ac_try) 2>&5
15336   ac_status=$?
15337   echo "$as_me:15337: \$? = $ac_status" >&5
15338   (exit $ac_status); }; }; then
15339   cf_cv_getopt_header=$cf_header
15340  break
15341 else
15342   echo "$as_me: failed program was:" >&5
15343 cat conftest.$ac_ext >&5
15344 fi
15345 rm -f conftest.$ac_objext conftest.$ac_ext
15346 done
15347
15348 fi
15349 echo "$as_me:15349: result: $cf_cv_getopt_header" >&5
15350 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15351 if test $cf_cv_getopt_header != none ; then
15352
15353 cat >>confdefs.h <<\EOF
15354 #define HAVE_GETOPT_HEADER 1
15355 EOF
15356
15357 fi
15358 if test $cf_cv_getopt_header = getopt.h ; then
15359
15360 cat >>confdefs.h <<\EOF
15361 #define NEED_GETOPT_H 1
15362 EOF
15363
15364 fi
15365
15366 # check for ISC (this may also define _POSIX_SOURCE)
15367 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15368 if test "x$ISC" = xyes ; then
15369
15370 echo "$as_me:15370: checking for main in -lcposix" >&5
15371 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15372 if test "${ac_cv_lib_cposix_main+set}" = set; then
15373   echo $ECHO_N "(cached) $ECHO_C" >&6
15374 else
15375   ac_check_lib_save_LIBS=$LIBS
15376 LIBS="-lcposix  $LIBS"
15377 cat >conftest.$ac_ext <<_ACEOF
15378 #line 15378 "configure"
15379 #include "confdefs.h"
15380
15381 int
15382 main ()
15383 {
15384 main ();
15385   ;
15386   return 0;
15387 }
15388 _ACEOF
15389 rm -f conftest.$ac_objext conftest$ac_exeext
15390 if { (eval echo "$as_me:15390: \"$ac_link\"") >&5
15391   (eval $ac_link) 2>&5
15392   ac_status=$?
15393   echo "$as_me:15393: \$? = $ac_status" >&5
15394   (exit $ac_status); } &&
15395          { ac_try='test -s conftest$ac_exeext'
15396   { (eval echo "$as_me:15396: \"$ac_try\"") >&5
15397   (eval $ac_try) 2>&5
15398   ac_status=$?
15399   echo "$as_me:15399: \$? = $ac_status" >&5
15400   (exit $ac_status); }; }; then
15401   ac_cv_lib_cposix_main=yes
15402 else
15403   echo "$as_me: failed program was:" >&5
15404 cat conftest.$ac_ext >&5
15405 ac_cv_lib_cposix_main=no
15406 fi
15407 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15408 LIBS=$ac_check_lib_save_LIBS
15409 fi
15410 echo "$as_me:15410: result: $ac_cv_lib_cposix_main" >&5
15411 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15412 if test $ac_cv_lib_cposix_main = yes; then
15413   cat >>confdefs.h <<EOF
15414 #define HAVE_LIBCPOSIX 1
15415 EOF
15416
15417   LIBS="-lcposix $LIBS"
15418
15419 fi
15420
15421         echo "$as_me:15421: checking for bzero in -linet" >&5
15422 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15423 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15424   echo $ECHO_N "(cached) $ECHO_C" >&6
15425 else
15426   ac_check_lib_save_LIBS=$LIBS
15427 LIBS="-linet  $LIBS"
15428 cat >conftest.$ac_ext <<_ACEOF
15429 #line 15429 "configure"
15430 #include "confdefs.h"
15431
15432 /* Override any gcc2 internal prototype to avoid an error.  */
15433 #ifdef __cplusplus
15434 extern "C"
15435 #endif
15436 /* We use char because int might match the return type of a gcc2
15437    builtin and then its argument prototype would still apply.  */
15438 char bzero ();
15439 int
15440 main ()
15441 {
15442 bzero ();
15443   ;
15444   return 0;
15445 }
15446 _ACEOF
15447 rm -f conftest.$ac_objext conftest$ac_exeext
15448 if { (eval echo "$as_me:15448: \"$ac_link\"") >&5
15449   (eval $ac_link) 2>&5
15450   ac_status=$?
15451   echo "$as_me:15451: \$? = $ac_status" >&5
15452   (exit $ac_status); } &&
15453          { ac_try='test -s conftest$ac_exeext'
15454   { (eval echo "$as_me:15454: \"$ac_try\"") >&5
15455   (eval $ac_try) 2>&5
15456   ac_status=$?
15457   echo "$as_me:15457: \$? = $ac_status" >&5
15458   (exit $ac_status); }; }; then
15459   ac_cv_lib_inet_bzero=yes
15460 else
15461   echo "$as_me: failed program was:" >&5
15462 cat conftest.$ac_ext >&5
15463 ac_cv_lib_inet_bzero=no
15464 fi
15465 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15466 LIBS=$ac_check_lib_save_LIBS
15467 fi
15468 echo "$as_me:15468: result: $ac_cv_lib_inet_bzero" >&5
15469 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15470 if test $ac_cv_lib_inet_bzero = yes; then
15471
15472 cf_add_libs="-linet"
15473 # Filter out duplicates - this happens with badly-designed ".pc" files...
15474 for cf_add_1lib in $LIBS
15475 do
15476         for cf_add_2lib in $cf_add_libs
15477         do
15478                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15479                 then
15480                         cf_add_1lib=
15481                         break
15482                 fi
15483         done
15484         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15485 done
15486 LIBS="$cf_add_libs"
15487
15488 fi
15489 fi
15490
15491 echo "$as_me:15491: checking if sys/time.h works with sys/select.h" >&5
15492 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15493 if test "${cf_cv_sys_time_select+set}" = set; then
15494   echo $ECHO_N "(cached) $ECHO_C" >&6
15495 else
15496
15497 cat >conftest.$ac_ext <<_ACEOF
15498 #line 15498 "configure"
15499 #include "confdefs.h"
15500
15501 #include <sys/types.h>
15502 #ifdef HAVE_SYS_TIME_H
15503 #include <sys/time.h>
15504 #endif
15505 #ifdef HAVE_SYS_SELECT_H
15506 #include <sys/select.h>
15507 #endif
15508
15509 int
15510 main ()
15511 {
15512
15513   ;
15514   return 0;
15515 }
15516 _ACEOF
15517 rm -f conftest.$ac_objext
15518 if { (eval echo "$as_me:15518: \"$ac_compile\"") >&5
15519   (eval $ac_compile) 2>&5
15520   ac_status=$?
15521   echo "$as_me:15521: \$? = $ac_status" >&5
15522   (exit $ac_status); } &&
15523          { ac_try='test -s conftest.$ac_objext'
15524   { (eval echo "$as_me:15524: \"$ac_try\"") >&5
15525   (eval $ac_try) 2>&5
15526   ac_status=$?
15527   echo "$as_me:15527: \$? = $ac_status" >&5
15528   (exit $ac_status); }; }; then
15529   cf_cv_sys_time_select=yes
15530 else
15531   echo "$as_me: failed program was:" >&5
15532 cat conftest.$ac_ext >&5
15533 cf_cv_sys_time_select=no
15534 fi
15535 rm -f conftest.$ac_objext conftest.$ac_ext
15536
15537 fi
15538
15539 echo "$as_me:15539: result: $cf_cv_sys_time_select" >&5
15540 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15541 test "$cf_cv_sys_time_select" = yes &&
15542 cat >>confdefs.h <<\EOF
15543 #define HAVE_SYS_TIME_SELECT 1
15544 EOF
15545
15546 ###     checks for compiler characteristics
15547 ac_ext=c
15548 ac_cpp='$CPP $CPPFLAGS'
15549 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15550 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15551 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15552 ac_main_return=return
15553
15554 echo "$as_me:15554: checking for an ANSI C-conforming const" >&5
15555 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15556 if test "${ac_cv_c_const+set}" = set; then
15557   echo $ECHO_N "(cached) $ECHO_C" >&6
15558 else
15559   cat >conftest.$ac_ext <<_ACEOF
15560 #line 15560 "configure"
15561 #include "confdefs.h"
15562
15563 int
15564 main ()
15565 {
15566 /* FIXME: Include the comments suggested by Paul. */
15567 #ifndef __cplusplus
15568   /* Ultrix mips cc rejects this.  */
15569   typedef int charset[2];
15570   const charset x;
15571   /* SunOS 4.1.1 cc rejects this.  */
15572   char const *const *ccp;
15573   char **p;
15574   /* NEC SVR4.0.2 mips cc rejects this.  */
15575   struct point {int x, y;};
15576   static struct point const zero = {0,0};
15577   /* AIX XL C 1.02.0.0 rejects this.
15578      It does not let you subtract one const X* pointer from another in
15579      an arm of an if-expression whose if-part is not a constant
15580      expression */
15581   const char *g = "string";
15582   ccp = &g + (g ? g-g : 0);
15583   /* HPUX 7.0 cc rejects these. */
15584   ++ccp;
15585   p = (char**) ccp;
15586   ccp = (char const *const *) p;
15587   { /* SCO 3.2v4 cc rejects this.  */
15588     char *t;
15589     char const *s = 0 ? (char *) 0 : (char const *) 0;
15590
15591     *t++ = 0;
15592   }
15593   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15594     int x[] = {25, 17};
15595     const int *foo = &x[0];
15596     ++foo;
15597   }
15598   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15599     typedef const int *iptr;
15600     iptr p = 0;
15601     ++p;
15602   }
15603   { /* AIX XL C 1.02.0.0 rejects this saying
15604        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15605     struct s { int j; const int *ap[3]; };
15606     struct s *b; b->j = 5;
15607   }
15608   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15609     const int foo = 10;
15610   }
15611 #endif
15612
15613   ;
15614   return 0;
15615 }
15616 _ACEOF
15617 rm -f conftest.$ac_objext
15618 if { (eval echo "$as_me:15618: \"$ac_compile\"") >&5
15619   (eval $ac_compile) 2>&5
15620   ac_status=$?
15621   echo "$as_me:15621: \$? = $ac_status" >&5
15622   (exit $ac_status); } &&
15623          { ac_try='test -s conftest.$ac_objext'
15624   { (eval echo "$as_me:15624: \"$ac_try\"") >&5
15625   (eval $ac_try) 2>&5
15626   ac_status=$?
15627   echo "$as_me:15627: \$? = $ac_status" >&5
15628   (exit $ac_status); }; }; then
15629   ac_cv_c_const=yes
15630 else
15631   echo "$as_me: failed program was:" >&5
15632 cat conftest.$ac_ext >&5
15633 ac_cv_c_const=no
15634 fi
15635 rm -f conftest.$ac_objext conftest.$ac_ext
15636 fi
15637 echo "$as_me:15637: result: $ac_cv_c_const" >&5
15638 echo "${ECHO_T}$ac_cv_c_const" >&6
15639 if test $ac_cv_c_const = no; then
15640
15641 cat >>confdefs.h <<\EOF
15642 #define const
15643 EOF
15644
15645 fi
15646
15647 echo "$as_me:15647: checking for inline" >&5
15648 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15649 if test "${ac_cv_c_inline+set}" = set; then
15650   echo $ECHO_N "(cached) $ECHO_C" >&6
15651 else
15652   ac_cv_c_inline=no
15653 for ac_kw in inline __inline__ __inline; do
15654   cat >conftest.$ac_ext <<_ACEOF
15655 #line 15655 "configure"
15656 #include "confdefs.h"
15657 #ifndef __cplusplus
15658 static $ac_kw int static_foo () {return 0; }
15659 $ac_kw int foo () {return 0; }
15660 #endif
15661
15662 _ACEOF
15663 rm -f conftest.$ac_objext
15664 if { (eval echo "$as_me:15664: \"$ac_compile\"") >&5
15665   (eval $ac_compile) 2>&5
15666   ac_status=$?
15667   echo "$as_me:15667: \$? = $ac_status" >&5
15668   (exit $ac_status); } &&
15669          { ac_try='test -s conftest.$ac_objext'
15670   { (eval echo "$as_me:15670: \"$ac_try\"") >&5
15671   (eval $ac_try) 2>&5
15672   ac_status=$?
15673   echo "$as_me:15673: \$? = $ac_status" >&5
15674   (exit $ac_status); }; }; then
15675   ac_cv_c_inline=$ac_kw; break
15676 else
15677   echo "$as_me: failed program was:" >&5
15678 cat conftest.$ac_ext >&5
15679 fi
15680 rm -f conftest.$ac_objext conftest.$ac_ext
15681 done
15682
15683 fi
15684 echo "$as_me:15684: result: $ac_cv_c_inline" >&5
15685 echo "${ECHO_T}$ac_cv_c_inline" >&6
15686 case $ac_cv_c_inline in
15687   inline | yes) ;;
15688   no)
15689 cat >>confdefs.h <<\EOF
15690 #define inline
15691 EOF
15692  ;;
15693   *)  cat >>confdefs.h <<EOF
15694 #define inline $ac_cv_c_inline
15695 EOF
15696  ;;
15697 esac
15698
15699 NCURSES_INLINE=
15700 if test "$ac_cv_c_inline" != no ; then
15701   NCURSES_INLINE=inline
15702   if test "$INTEL_COMPILER" = yes
15703   then
15704     :
15705   elif test "$CLANG_COMPILER" = yes
15706   then
15707     :
15708   elif test "$GCC" = yes
15709   then
15710     echo "$as_me:15710: checking if $CC supports options to tune inlining" >&5
15711 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15712 if test "${cf_cv_gcc_inline+set}" = set; then
15713   echo $ECHO_N "(cached) $ECHO_C" >&6
15714 else
15715
15716       cf_save_CFLAGS=$CFLAGS
15717       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15718       cat >conftest.$ac_ext <<_ACEOF
15719 #line 15719 "configure"
15720 #include "confdefs.h"
15721 inline int foo(void) { return 1; }
15722 int
15723 main ()
15724 {
15725 ${cf_cv_main_return:-return} foo()
15726   ;
15727   return 0;
15728 }
15729 _ACEOF
15730 rm -f conftest.$ac_objext
15731 if { (eval echo "$as_me:15731: \"$ac_compile\"") >&5
15732   (eval $ac_compile) 2>&5
15733   ac_status=$?
15734   echo "$as_me:15734: \$? = $ac_status" >&5
15735   (exit $ac_status); } &&
15736          { ac_try='test -s conftest.$ac_objext'
15737   { (eval echo "$as_me:15737: \"$ac_try\"") >&5
15738   (eval $ac_try) 2>&5
15739   ac_status=$?
15740   echo "$as_me:15740: \$? = $ac_status" >&5
15741   (exit $ac_status); }; }; then
15742   cf_cv_gcc_inline=yes
15743 else
15744   echo "$as_me: failed program was:" >&5
15745 cat conftest.$ac_ext >&5
15746 cf_cv_gcc_inline=no
15747 fi
15748 rm -f conftest.$ac_objext conftest.$ac_ext
15749       CFLAGS=$cf_save_CFLAGS
15750
15751 fi
15752 echo "$as_me:15752: result: $cf_cv_gcc_inline" >&5
15753 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15754     if test "$cf_cv_gcc_inline" = yes ; then
15755
15756 cf_fix_cppflags=no
15757 cf_new_cflags=
15758 cf_new_cppflags=
15759 cf_new_extra_cppflags=
15760
15761 for cf_add_cflags in --param max-inline-insns-single=1200
15762 do
15763 case $cf_fix_cppflags in
15764 no)
15765         case $cf_add_cflags in #(vi
15766         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15767                 case $cf_add_cflags in
15768                 -D*)
15769                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15770
15771                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15772                                 && test -z "${cf_tst_cflags}" \
15773                                 && cf_fix_cppflags=yes
15774
15775                         if test $cf_fix_cppflags = yes ; then
15776                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15777                                 continue
15778                         elif test "${cf_tst_cflags}" = "\"'" ; then
15779                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15780                                 continue
15781                         fi
15782                         ;;
15783                 esac
15784                 case "$CPPFLAGS" in
15785                 *$cf_add_cflags) #(vi
15786                         ;;
15787                 *) #(vi
15788                         case $cf_add_cflags in #(vi
15789                         -D*)
15790                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15791
15792 CPPFLAGS=`echo "$CPPFLAGS" | \
15793         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15794                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15795
15796                                 ;;
15797                         esac
15798                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15799                         ;;
15800                 esac
15801                 ;;
15802         *)
15803                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15804                 ;;
15805         esac
15806         ;;
15807 yes)
15808         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15809
15810         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15811
15812         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15813                 && test -z "${cf_tst_cflags}" \
15814                 && cf_fix_cppflags=no
15815         ;;
15816 esac
15817 done
15818
15819 if test -n "$cf_new_cflags" ; then
15820
15821         CFLAGS="$CFLAGS $cf_new_cflags"
15822 fi
15823
15824 if test -n "$cf_new_cppflags" ; then
15825
15826         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15827 fi
15828
15829 if test -n "$cf_new_extra_cppflags" ; then
15830
15831         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15832 fi
15833
15834     fi
15835   fi
15836 fi
15837
15838 echo "$as_me:15838: checking for signal global datatype" >&5
15839 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15840 if test "${cf_cv_sig_atomic_t+set}" = set; then
15841   echo $ECHO_N "(cached) $ECHO_C" >&6
15842 else
15843
15844         for cf_type in \
15845                 "volatile sig_atomic_t" \
15846                 "sig_atomic_t" \
15847                 "int"
15848         do
15849         cat >conftest.$ac_ext <<_ACEOF
15850 #line 15850 "configure"
15851 #include "confdefs.h"
15852
15853 #include <sys/types.h>
15854 #include <signal.h>
15855 #include <stdio.h>
15856
15857 extern $cf_type x;
15858 $cf_type x;
15859 static void handler(int sig)
15860 {
15861         x = 5;
15862 }
15863 int
15864 main ()
15865 {
15866 signal(SIGINT, handler);
15867                  x = 1
15868   ;
15869   return 0;
15870 }
15871 _ACEOF
15872 rm -f conftest.$ac_objext
15873 if { (eval echo "$as_me:15873: \"$ac_compile\"") >&5
15874   (eval $ac_compile) 2>&5
15875   ac_status=$?
15876   echo "$as_me:15876: \$? = $ac_status" >&5
15877   (exit $ac_status); } &&
15878          { ac_try='test -s conftest.$ac_objext'
15879   { (eval echo "$as_me:15879: \"$ac_try\"") >&5
15880   (eval $ac_try) 2>&5
15881   ac_status=$?
15882   echo "$as_me:15882: \$? = $ac_status" >&5
15883   (exit $ac_status); }; }; then
15884   cf_cv_sig_atomic_t=$cf_type
15885 else
15886   echo "$as_me: failed program was:" >&5
15887 cat conftest.$ac_ext >&5
15888 cf_cv_sig_atomic_t=no
15889 fi
15890 rm -f conftest.$ac_objext conftest.$ac_ext
15891                 test "$cf_cv_sig_atomic_t" != no && break
15892         done
15893
15894 fi
15895
15896 echo "$as_me:15896: result: $cf_cv_sig_atomic_t" >&5
15897 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15898 test "$cf_cv_sig_atomic_t" != no &&
15899 cat >>confdefs.h <<EOF
15900 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15901 EOF
15902
15903 if test $NCURSES_CHTYPE = auto ; then
15904
15905 echo "$as_me:15905: checking for type of chtype" >&5
15906 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15907 if test "${cf_cv_typeof_chtype+set}" = set; then
15908   echo $ECHO_N "(cached) $ECHO_C" >&6
15909 else
15910
15911                 if test "$cross_compiling" = yes; then
15912   cf_cv_typeof_chtype=long
15913 else
15914   cat >conftest.$ac_ext <<_ACEOF
15915 #line 15915 "configure"
15916 #include "confdefs.h"
15917
15918 #define WANT_BITS 31
15919 #include <stdio.h>
15920 int main()
15921 {
15922         FILE *fp = fopen("cf_test.out", "w");
15923         if (fp != 0) {
15924                 char *result = "long";
15925                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15926                         int n;
15927                         unsigned int x, y;
15928                         for (n = 0; n < WANT_BITS; n++) {
15929                                 x = (1 << n);
15930                                 y = (x >> n);
15931                                 if (y != 1 || x == 0) {
15932                                         x = 0;
15933                                         break;
15934                                 }
15935                         }
15936                         /*
15937                          * If x is nonzero, an int is big enough for the bits
15938                          * that we want.
15939                          */
15940                         result = (x != 0) ? "int" : "long";
15941                 }
15942                 fputs(result, fp);
15943                 fclose(fp);
15944         }
15945         ${cf_cv_main_return:-return}(0);
15946 }
15947
15948 _ACEOF
15949 rm -f conftest$ac_exeext
15950 if { (eval echo "$as_me:15950: \"$ac_link\"") >&5
15951   (eval $ac_link) 2>&5
15952   ac_status=$?
15953   echo "$as_me:15953: \$? = $ac_status" >&5
15954   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15955   { (eval echo "$as_me:15955: \"$ac_try\"") >&5
15956   (eval $ac_try) 2>&5
15957   ac_status=$?
15958   echo "$as_me:15958: \$? = $ac_status" >&5
15959   (exit $ac_status); }; }; then
15960   cf_cv_typeof_chtype=`cat cf_test.out`
15961 else
15962   echo "$as_me: program exited with status $ac_status" >&5
15963 echo "$as_me: failed program was:" >&5
15964 cat conftest.$ac_ext >&5
15965 cf_cv_typeof_chtype=long
15966 fi
15967 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15968 fi
15969                 rm -f cf_test.out
15970
15971 fi
15972
15973 echo "$as_me:15973: result: $cf_cv_typeof_chtype" >&5
15974 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15975
15976 cat >>confdefs.h <<EOF
15977 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15978 EOF
15979
15980 else
15981         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15982 fi
15983 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15984
15985 echo "$as_me:15985: checking if unsigned literals are legal" >&5
15986 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15987 if test "${cf_cv_unsigned_literals+set}" = set; then
15988   echo $ECHO_N "(cached) $ECHO_C" >&6
15989 else
15990
15991         cat >conftest.$ac_ext <<_ACEOF
15992 #line 15992 "configure"
15993 #include "confdefs.h"
15994
15995 int
15996 main ()
15997 {
15998 long x = 1L + 1UL + 1U + 1
15999   ;
16000   return 0;
16001 }
16002 _ACEOF
16003 rm -f conftest.$ac_objext
16004 if { (eval echo "$as_me:16004: \"$ac_compile\"") >&5
16005   (eval $ac_compile) 2>&5
16006   ac_status=$?
16007   echo "$as_me:16007: \$? = $ac_status" >&5
16008   (exit $ac_status); } &&
16009          { ac_try='test -s conftest.$ac_objext'
16010   { (eval echo "$as_me:16010: \"$ac_try\"") >&5
16011   (eval $ac_try) 2>&5
16012   ac_status=$?
16013   echo "$as_me:16013: \$? = $ac_status" >&5
16014   (exit $ac_status); }; }; then
16015   cf_cv_unsigned_literals=yes
16016 else
16017   echo "$as_me: failed program was:" >&5
16018 cat conftest.$ac_ext >&5
16019 cf_cv_unsigned_literals=no
16020 fi
16021 rm -f conftest.$ac_objext conftest.$ac_ext
16022
16023 fi
16024
16025 echo "$as_me:16025: result: $cf_cv_unsigned_literals" >&5
16026 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16027
16028 cf_cv_1UL="1"
16029 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16030 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
16031
16032 if test $NCURSES_MMASK_T = auto ; then
16033         cf_cv_typeof_mmask_t=long
16034 else
16035         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16036 fi
16037 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16038
16039 ###     Checks for external-data
16040
16041 echo "$as_me:16041: checking if external errno is declared" >&5
16042 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16043 if test "${cf_cv_dcl_errno+set}" = set; then
16044   echo $ECHO_N "(cached) $ECHO_C" >&6
16045 else
16046
16047     cat >conftest.$ac_ext <<_ACEOF
16048 #line 16048 "configure"
16049 #include "confdefs.h"
16050
16051 #ifdef HAVE_STDLIB_H
16052 #include <stdlib.h>
16053 #endif
16054 #include <stdio.h>
16055 #include <sys/types.h>
16056 #include <errno.h>
16057 int
16058 main ()
16059 {
16060 int x = (int) errno
16061   ;
16062   return 0;
16063 }
16064 _ACEOF
16065 rm -f conftest.$ac_objext
16066 if { (eval echo "$as_me:16066: \"$ac_compile\"") >&5
16067   (eval $ac_compile) 2>&5
16068   ac_status=$?
16069   echo "$as_me:16069: \$? = $ac_status" >&5
16070   (exit $ac_status); } &&
16071          { ac_try='test -s conftest.$ac_objext'
16072   { (eval echo "$as_me:16072: \"$ac_try\"") >&5
16073   (eval $ac_try) 2>&5
16074   ac_status=$?
16075   echo "$as_me:16075: \$? = $ac_status" >&5
16076   (exit $ac_status); }; }; then
16077   cf_cv_dcl_errno=yes
16078 else
16079   echo "$as_me: failed program was:" >&5
16080 cat conftest.$ac_ext >&5
16081 cf_cv_dcl_errno=no
16082 fi
16083 rm -f conftest.$ac_objext conftest.$ac_ext
16084
16085 fi
16086 echo "$as_me:16086: result: $cf_cv_dcl_errno" >&5
16087 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16088
16089 if test "$cf_cv_dcl_errno" = no ; then
16090
16091 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16092
16093     cat >>confdefs.h <<EOF
16094 #define $cf_result 1
16095 EOF
16096
16097 fi
16098
16099 # It's possible (for near-UNIX clones) that the data doesn't exist
16100
16101 echo "$as_me:16101: checking if external errno exists" >&5
16102 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16103 if test "${cf_cv_have_errno+set}" = set; then
16104   echo $ECHO_N "(cached) $ECHO_C" >&6
16105 else
16106
16107     cat >conftest.$ac_ext <<_ACEOF
16108 #line 16108 "configure"
16109 #include "confdefs.h"
16110
16111 #undef errno
16112 extern int errno;
16113
16114 int
16115 main ()
16116 {
16117 errno = 2
16118   ;
16119   return 0;
16120 }
16121 _ACEOF
16122 rm -f conftest.$ac_objext conftest$ac_exeext
16123 if { (eval echo "$as_me:16123: \"$ac_link\"") >&5
16124   (eval $ac_link) 2>&5
16125   ac_status=$?
16126   echo "$as_me:16126: \$? = $ac_status" >&5
16127   (exit $ac_status); } &&
16128          { ac_try='test -s conftest$ac_exeext'
16129   { (eval echo "$as_me:16129: \"$ac_try\"") >&5
16130   (eval $ac_try) 2>&5
16131   ac_status=$?
16132   echo "$as_me:16132: \$? = $ac_status" >&5
16133   (exit $ac_status); }; }; then
16134   cf_cv_have_errno=yes
16135 else
16136   echo "$as_me: failed program was:" >&5
16137 cat conftest.$ac_ext >&5
16138 cf_cv_have_errno=no
16139 fi
16140 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16141
16142 fi
16143 echo "$as_me:16143: result: $cf_cv_have_errno" >&5
16144 echo "${ECHO_T}$cf_cv_have_errno" >&6
16145
16146 if test "$cf_cv_have_errno" = yes ; then
16147
16148 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16149
16150     cat >>confdefs.h <<EOF
16151 #define $cf_result 1
16152 EOF
16153
16154 fi
16155
16156 echo "$as_me:16156: checking if data-only library module links" >&5
16157 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16158 if test "${cf_cv_link_dataonly+set}" = set; then
16159   echo $ECHO_N "(cached) $ECHO_C" >&6
16160 else
16161
16162         rm -f conftest.a
16163         cat >conftest.$ac_ext <<EOF
16164 #line 16164 "configure"
16165 int     testdata[3] = { 123, 456, 789 };
16166 EOF
16167         if { (eval echo "$as_me:16167: \"$ac_compile\"") >&5
16168   (eval $ac_compile) 2>&5
16169   ac_status=$?
16170   echo "$as_me:16170: \$? = $ac_status" >&5
16171   (exit $ac_status); } ; then
16172                 mv conftest.o data.o && \
16173                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16174         fi
16175         rm -f conftest.$ac_ext data.o
16176         cat >conftest.$ac_ext <<EOF
16177 #line 16177 "configure"
16178 int     testfunc()
16179 {
16180 #if defined(NeXT)
16181         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16182 #else
16183         extern int testdata[3];
16184         return testdata[0] == 123
16185            &&  testdata[1] == 456
16186            &&  testdata[2] == 789;
16187 #endif
16188 }
16189 EOF
16190         if { (eval echo "$as_me:16190: \"$ac_compile\"") >&5
16191   (eval $ac_compile) 2>&5
16192   ac_status=$?
16193   echo "$as_me:16193: \$? = $ac_status" >&5
16194   (exit $ac_status); }; then
16195                 mv conftest.o func.o && \
16196                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16197         fi
16198         rm -f conftest.$ac_ext func.o
16199         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16200         cf_saveLIBS="$LIBS"
16201         LIBS="conftest.a $LIBS"
16202         if test "$cross_compiling" = yes; then
16203   cf_cv_link_dataonly=unknown
16204 else
16205   cat >conftest.$ac_ext <<_ACEOF
16206 #line 16206 "configure"
16207 #include "confdefs.h"
16208
16209         int main()
16210         {
16211                 extern int testfunc();
16212                 ${cf_cv_main_return:-return} (!testfunc());
16213         }
16214
16215 _ACEOF
16216 rm -f conftest$ac_exeext
16217 if { (eval echo "$as_me:16217: \"$ac_link\"") >&5
16218   (eval $ac_link) 2>&5
16219   ac_status=$?
16220   echo "$as_me:16220: \$? = $ac_status" >&5
16221   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16222   { (eval echo "$as_me:16222: \"$ac_try\"") >&5
16223   (eval $ac_try) 2>&5
16224   ac_status=$?
16225   echo "$as_me:16225: \$? = $ac_status" >&5
16226   (exit $ac_status); }; }; then
16227   cf_cv_link_dataonly=yes
16228 else
16229   echo "$as_me: program exited with status $ac_status" >&5
16230 echo "$as_me: failed program was:" >&5
16231 cat conftest.$ac_ext >&5
16232 cf_cv_link_dataonly=no
16233 fi
16234 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16235 fi
16236         LIBS="$cf_saveLIBS"
16237
16238 fi
16239
16240 echo "$as_me:16240: result: $cf_cv_link_dataonly" >&5
16241 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16242
16243 if test "$cf_cv_link_dataonly" = no ; then
16244
16245 cat >>confdefs.h <<\EOF
16246 #define BROKEN_LINKER 1
16247 EOF
16248
16249         BROKEN_LINKER=1
16250 fi
16251
16252 ###     Checks for library functions.
16253
16254 for ac_func in \
16255 getcwd \
16256 getegid \
16257 geteuid \
16258 getopt \
16259 getttynam \
16260 issetugid \
16261 poll \
16262 putenv \
16263 remove \
16264 select \
16265 setbuf \
16266 setbuffer \
16267 setenv \
16268 setvbuf \
16269 sigaction \
16270 sigvec \
16271 strdup \
16272 strstr \
16273 tcgetpgrp \
16274 times \
16275 vsnprintf \
16276
16277 do
16278 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16279 echo "$as_me:16279: checking for $ac_func" >&5
16280 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16281 if eval "test \"\${$as_ac_var+set}\" = set"; then
16282   echo $ECHO_N "(cached) $ECHO_C" >&6
16283 else
16284   cat >conftest.$ac_ext <<_ACEOF
16285 #line 16285 "configure"
16286 #include "confdefs.h"
16287 /* System header to define __stub macros and hopefully few prototypes,
16288     which can conflict with char $ac_func (); below.  */
16289 #include <assert.h>
16290 /* Override any gcc2 internal prototype to avoid an error.  */
16291 #ifdef __cplusplus
16292 extern "C"
16293 #endif
16294 /* We use char because int might match the return type of a gcc2
16295    builtin and then its argument prototype would still apply.  */
16296 char $ac_func ();
16297 char (*f) ();
16298
16299 int
16300 main ()
16301 {
16302 /* The GNU C library defines this for functions which it implements
16303     to always fail with ENOSYS.  Some functions are actually named
16304     something starting with __ and the normal name is an alias.  */
16305 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16306 choke me
16307 #else
16308 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16309 #endif
16310
16311   ;
16312   return 0;
16313 }
16314 _ACEOF
16315 rm -f conftest.$ac_objext conftest$ac_exeext
16316 if { (eval echo "$as_me:16316: \"$ac_link\"") >&5
16317   (eval $ac_link) 2>&5
16318   ac_status=$?
16319   echo "$as_me:16319: \$? = $ac_status" >&5
16320   (exit $ac_status); } &&
16321          { ac_try='test -s conftest$ac_exeext'
16322   { (eval echo "$as_me:16322: \"$ac_try\"") >&5
16323   (eval $ac_try) 2>&5
16324   ac_status=$?
16325   echo "$as_me:16325: \$? = $ac_status" >&5
16326   (exit $ac_status); }; }; then
16327   eval "$as_ac_var=yes"
16328 else
16329   echo "$as_me: failed program was:" >&5
16330 cat conftest.$ac_ext >&5
16331 eval "$as_ac_var=no"
16332 fi
16333 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16334 fi
16335 echo "$as_me:16335: result: `eval echo '${'$as_ac_var'}'`" >&5
16336 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16337 if test `eval echo '${'$as_ac_var'}'` = yes; then
16338   cat >>confdefs.h <<EOF
16339 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16340 EOF
16341
16342 fi
16343 done
16344
16345 if test "x$ac_cv_func_getopt" = xno &&
16346    test "x$cf_with_progs$cf_with_tests" != xnono; then
16347         { { echo "$as_me:16347: error: getopt is required for building programs" >&5
16348 echo "$as_me: error: getopt is required for building programs" >&2;}
16349    { (exit 1); exit 1; }; }
16350 fi
16351
16352 if test "x$with_getcap" = "xyes" ; then
16353
16354 echo "$as_me:16354: checking for terminal-capability database functions" >&5
16355 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16356 if test "${cf_cv_cgetent+set}" = set; then
16357   echo $ECHO_N "(cached) $ECHO_C" >&6
16358 else
16359
16360 cat >conftest.$ac_ext <<_ACEOF
16361 #line 16361 "configure"
16362 #include "confdefs.h"
16363
16364 #include <stdlib.h>
16365 int
16366 main ()
16367 {
16368
16369         char temp[128];
16370         char *buf = temp;
16371         char *db_array = temp;
16372         cgetent(&buf, &db_array, "vt100");
16373         cgetcap(buf, "tc", '=');
16374         cgetmatch(buf, "tc");
16375
16376   ;
16377   return 0;
16378 }
16379 _ACEOF
16380 rm -f conftest.$ac_objext conftest$ac_exeext
16381 if { (eval echo "$as_me:16381: \"$ac_link\"") >&5
16382   (eval $ac_link) 2>&5
16383   ac_status=$?
16384   echo "$as_me:16384: \$? = $ac_status" >&5
16385   (exit $ac_status); } &&
16386          { ac_try='test -s conftest$ac_exeext'
16387   { (eval echo "$as_me:16387: \"$ac_try\"") >&5
16388   (eval $ac_try) 2>&5
16389   ac_status=$?
16390   echo "$as_me:16390: \$? = $ac_status" >&5
16391   (exit $ac_status); }; }; then
16392   cf_cv_cgetent=yes
16393 else
16394   echo "$as_me: failed program was:" >&5
16395 cat conftest.$ac_ext >&5
16396 cf_cv_cgetent=no
16397 fi
16398 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16399
16400 fi
16401 echo "$as_me:16401: result: $cf_cv_cgetent" >&5
16402 echo "${ECHO_T}$cf_cv_cgetent" >&6
16403
16404 if test "$cf_cv_cgetent" = yes
16405 then
16406
16407 cat >>confdefs.h <<\EOF
16408 #define HAVE_BSD_CGETENT 1
16409 EOF
16410
16411 echo "$as_me:16411: checking if cgetent uses const parameter" >&5
16412 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16413 if test "${cf_cv_cgetent_const+set}" = set; then
16414   echo $ECHO_N "(cached) $ECHO_C" >&6
16415 else
16416
16417 cat >conftest.$ac_ext <<_ACEOF
16418 #line 16418 "configure"
16419 #include "confdefs.h"
16420
16421 #include <stdlib.h>
16422 int
16423 main ()
16424 {
16425
16426         char temp[128];
16427         char *buf = temp;
16428 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16429         const char *db_array = temp;
16430         cgetent(&buf, &db_array, "vt100");
16431 #endif
16432         cgetcap(buf, "tc", '=');
16433         cgetmatch(buf, "tc");
16434
16435   ;
16436   return 0;
16437 }
16438 _ACEOF
16439 rm -f conftest.$ac_objext conftest$ac_exeext
16440 if { (eval echo "$as_me:16440: \"$ac_link\"") >&5
16441   (eval $ac_link) 2>&5
16442   ac_status=$?
16443   echo "$as_me:16443: \$? = $ac_status" >&5
16444   (exit $ac_status); } &&
16445          { ac_try='test -s conftest$ac_exeext'
16446   { (eval echo "$as_me:16446: \"$ac_try\"") >&5
16447   (eval $ac_try) 2>&5
16448   ac_status=$?
16449   echo "$as_me:16449: \$? = $ac_status" >&5
16450   (exit $ac_status); }; }; then
16451   cf_cv_cgetent_const=yes
16452 else
16453   echo "$as_me: failed program was:" >&5
16454 cat conftest.$ac_ext >&5
16455 cf_cv_cgetent_const=no
16456 fi
16457 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16458
16459 fi
16460 echo "$as_me:16460: result: $cf_cv_cgetent_const" >&5
16461 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16462         if test "$cf_cv_cgetent_const" = yes
16463         then
16464
16465 cat >>confdefs.h <<EOF
16466 #define CGETENT_CONST const
16467 EOF
16468
16469         fi
16470 fi
16471
16472 fi
16473
16474 echo "$as_me:16474: checking for isascii" >&5
16475 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16476 if test "${cf_cv_have_isascii+set}" = set; then
16477   echo $ECHO_N "(cached) $ECHO_C" >&6
16478 else
16479
16480         cat >conftest.$ac_ext <<_ACEOF
16481 #line 16481 "configure"
16482 #include "confdefs.h"
16483 #include <ctype.h>
16484 int
16485 main ()
16486 {
16487 int x = isascii(' ')
16488   ;
16489   return 0;
16490 }
16491 _ACEOF
16492 rm -f conftest.$ac_objext conftest$ac_exeext
16493 if { (eval echo "$as_me:16493: \"$ac_link\"") >&5
16494   (eval $ac_link) 2>&5
16495   ac_status=$?
16496   echo "$as_me:16496: \$? = $ac_status" >&5
16497   (exit $ac_status); } &&
16498          { ac_try='test -s conftest$ac_exeext'
16499   { (eval echo "$as_me:16499: \"$ac_try\"") >&5
16500   (eval $ac_try) 2>&5
16501   ac_status=$?
16502   echo "$as_me:16502: \$? = $ac_status" >&5
16503   (exit $ac_status); }; }; then
16504   cf_cv_have_isascii=yes
16505 else
16506   echo "$as_me: failed program was:" >&5
16507 cat conftest.$ac_ext >&5
16508 cf_cv_have_isascii=no
16509 fi
16510 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16511
16512 fi
16513 echo "$as_me:16513: result: $cf_cv_have_isascii" >&5
16514 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16515 test "$cf_cv_have_isascii" = yes &&
16516 cat >>confdefs.h <<\EOF
16517 #define HAVE_ISASCII 1
16518 EOF
16519
16520 if test "$ac_cv_func_sigaction" = yes; then
16521 echo "$as_me:16521: checking whether sigaction needs _POSIX_SOURCE" >&5
16522 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16523 cat >conftest.$ac_ext <<_ACEOF
16524 #line 16524 "configure"
16525 #include "confdefs.h"
16526
16527 #include <sys/types.h>
16528 #include <signal.h>
16529 int
16530 main ()
16531 {
16532 struct sigaction act
16533   ;
16534   return 0;
16535 }
16536 _ACEOF
16537 rm -f conftest.$ac_objext
16538 if { (eval echo "$as_me:16538: \"$ac_compile\"") >&5
16539   (eval $ac_compile) 2>&5
16540   ac_status=$?
16541   echo "$as_me:16541: \$? = $ac_status" >&5
16542   (exit $ac_status); } &&
16543          { ac_try='test -s conftest.$ac_objext'
16544   { (eval echo "$as_me:16544: \"$ac_try\"") >&5
16545   (eval $ac_try) 2>&5
16546   ac_status=$?
16547   echo "$as_me:16547: \$? = $ac_status" >&5
16548   (exit $ac_status); }; }; then
16549   sigact_bad=no
16550 else
16551   echo "$as_me: failed program was:" >&5
16552 cat conftest.$ac_ext >&5
16553
16554 cat >conftest.$ac_ext <<_ACEOF
16555 #line 16555 "configure"
16556 #include "confdefs.h"
16557
16558 #define _POSIX_SOURCE
16559 #include <sys/types.h>
16560 #include <signal.h>
16561 int
16562 main ()
16563 {
16564 struct sigaction act
16565   ;
16566   return 0;
16567 }
16568 _ACEOF
16569 rm -f conftest.$ac_objext
16570 if { (eval echo "$as_me:16570: \"$ac_compile\"") >&5
16571   (eval $ac_compile) 2>&5
16572   ac_status=$?
16573   echo "$as_me:16573: \$? = $ac_status" >&5
16574   (exit $ac_status); } &&
16575          { ac_try='test -s conftest.$ac_objext'
16576   { (eval echo "$as_me:16576: \"$ac_try\"") >&5
16577   (eval $ac_try) 2>&5
16578   ac_status=$?
16579   echo "$as_me:16579: \$? = $ac_status" >&5
16580   (exit $ac_status); }; }; then
16581   sigact_bad=yes
16582
16583 cat >>confdefs.h <<\EOF
16584 #define _POSIX_SOURCE 1
16585 EOF
16586
16587 else
16588   echo "$as_me: failed program was:" >&5
16589 cat conftest.$ac_ext >&5
16590 sigact_bad=unknown
16591 fi
16592 rm -f conftest.$ac_objext conftest.$ac_ext
16593 fi
16594 rm -f conftest.$ac_objext conftest.$ac_ext
16595 echo "$as_me:16595: result: $sigact_bad" >&5
16596 echo "${ECHO_T}$sigact_bad" >&6
16597 fi
16598
16599 echo "$as_me:16599: checking if nanosleep really works" >&5
16600 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16601 if test "${cf_cv_func_nanosleep+set}" = set; then
16602   echo $ECHO_N "(cached) $ECHO_C" >&6
16603 else
16604
16605 if test "$cross_compiling" = yes; then
16606   cf_cv_func_nanosleep=unknown
16607 else
16608   cat >conftest.$ac_ext <<_ACEOF
16609 #line 16609 "configure"
16610 #include "confdefs.h"
16611
16612 #include <stdio.h>
16613 #include <errno.h>
16614 #include <time.h>
16615
16616 #ifdef HAVE_SYS_TIME_H
16617 #include <sys/time.h>
16618 #endif
16619
16620 int main() {
16621         struct timespec ts1, ts2;
16622         int code;
16623         ts1.tv_sec  = 0;
16624         ts1.tv_nsec = 750000000;
16625         ts2.tv_sec  = 0;
16626         ts2.tv_nsec = 0;
16627         errno = 0;
16628         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16629         ${cf_cv_main_return:-return}(code != 0);
16630 }
16631
16632 _ACEOF
16633 rm -f conftest$ac_exeext
16634 if { (eval echo "$as_me:16634: \"$ac_link\"") >&5
16635   (eval $ac_link) 2>&5
16636   ac_status=$?
16637   echo "$as_me:16637: \$? = $ac_status" >&5
16638   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16639   { (eval echo "$as_me:16639: \"$ac_try\"") >&5
16640   (eval $ac_try) 2>&5
16641   ac_status=$?
16642   echo "$as_me:16642: \$? = $ac_status" >&5
16643   (exit $ac_status); }; }; then
16644   cf_cv_func_nanosleep=yes
16645 else
16646   echo "$as_me: program exited with status $ac_status" >&5
16647 echo "$as_me: failed program was:" >&5
16648 cat conftest.$ac_ext >&5
16649 cf_cv_func_nanosleep=no
16650 fi
16651 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16652 fi
16653 fi
16654 echo "$as_me:16654: result: $cf_cv_func_nanosleep" >&5
16655 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16656
16657 test "$cf_cv_func_nanosleep" = "yes" &&
16658 cat >>confdefs.h <<\EOF
16659 #define HAVE_NANOSLEEP 1
16660 EOF
16661
16662 for ac_header in \
16663 termio.h \
16664 termios.h \
16665 unistd.h \
16666
16667 do
16668 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16669 echo "$as_me:16669: checking for $ac_header" >&5
16670 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16671 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16672   echo $ECHO_N "(cached) $ECHO_C" >&6
16673 else
16674   cat >conftest.$ac_ext <<_ACEOF
16675 #line 16675 "configure"
16676 #include "confdefs.h"
16677 #include <$ac_header>
16678 _ACEOF
16679 if { (eval echo "$as_me:16679: \"$ac_cpp conftest.$ac_ext\"") >&5
16680   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16681   ac_status=$?
16682   egrep -v '^ *\+' conftest.er1 >conftest.err
16683   rm -f conftest.er1
16684   cat conftest.err >&5
16685   echo "$as_me:16685: \$? = $ac_status" >&5
16686   (exit $ac_status); } >/dev/null; then
16687   if test -s conftest.err; then
16688     ac_cpp_err=$ac_c_preproc_warn_flag
16689   else
16690     ac_cpp_err=
16691   fi
16692 else
16693   ac_cpp_err=yes
16694 fi
16695 if test -z "$ac_cpp_err"; then
16696   eval "$as_ac_Header=yes"
16697 else
16698   echo "$as_me: failed program was:" >&5
16699   cat conftest.$ac_ext >&5
16700   eval "$as_ac_Header=no"
16701 fi
16702 rm -f conftest.err conftest.$ac_ext
16703 fi
16704 echo "$as_me:16704: result: `eval echo '${'$as_ac_Header'}'`" >&5
16705 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16706 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16707   cat >>confdefs.h <<EOF
16708 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16709 EOF
16710
16711 fi
16712 done
16713
16714 if test "$ISC" = yes ; then
16715
16716 for ac_header in sys/termio.h
16717 do
16718 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16719 echo "$as_me:16719: checking for $ac_header" >&5
16720 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16721 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16722   echo $ECHO_N "(cached) $ECHO_C" >&6
16723 else
16724   cat >conftest.$ac_ext <<_ACEOF
16725 #line 16725 "configure"
16726 #include "confdefs.h"
16727 #include <$ac_header>
16728 _ACEOF
16729 if { (eval echo "$as_me:16729: \"$ac_cpp conftest.$ac_ext\"") >&5
16730   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16731   ac_status=$?
16732   egrep -v '^ *\+' conftest.er1 >conftest.err
16733   rm -f conftest.er1
16734   cat conftest.err >&5
16735   echo "$as_me:16735: \$? = $ac_status" >&5
16736   (exit $ac_status); } >/dev/null; then
16737   if test -s conftest.err; then
16738     ac_cpp_err=$ac_c_preproc_warn_flag
16739   else
16740     ac_cpp_err=
16741   fi
16742 else
16743   ac_cpp_err=yes
16744 fi
16745 if test -z "$ac_cpp_err"; then
16746   eval "$as_ac_Header=yes"
16747 else
16748   echo "$as_me: failed program was:" >&5
16749   cat conftest.$ac_ext >&5
16750   eval "$as_ac_Header=no"
16751 fi
16752 rm -f conftest.err conftest.$ac_ext
16753 fi
16754 echo "$as_me:16754: result: `eval echo '${'$as_ac_Header'}'`" >&5
16755 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16756 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16757   cat >>confdefs.h <<EOF
16758 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16759 EOF
16760
16761 fi
16762 done
16763
16764 fi
16765 if test "$ac_cv_header_termios_h" = yes ; then
16766         case "$CFLAGS $CPPFLAGS" in
16767         *-D_POSIX_SOURCE*)
16768                 termios_bad=dunno ;;
16769         *)      termios_bad=maybe ;;
16770         esac
16771         if test "$termios_bad" = maybe ; then
16772         echo "$as_me:16772: checking whether termios.h needs _POSIX_SOURCE" >&5
16773 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16774         cat >conftest.$ac_ext <<_ACEOF
16775 #line 16775 "configure"
16776 #include "confdefs.h"
16777 #include <termios.h>
16778 int
16779 main ()
16780 {
16781 struct termios foo; int x = foo.c_iflag
16782   ;
16783   return 0;
16784 }
16785 _ACEOF
16786 rm -f conftest.$ac_objext
16787 if { (eval echo "$as_me:16787: \"$ac_compile\"") >&5
16788   (eval $ac_compile) 2>&5
16789   ac_status=$?
16790   echo "$as_me:16790: \$? = $ac_status" >&5
16791   (exit $ac_status); } &&
16792          { ac_try='test -s conftest.$ac_objext'
16793   { (eval echo "$as_me:16793: \"$ac_try\"") >&5
16794   (eval $ac_try) 2>&5
16795   ac_status=$?
16796   echo "$as_me:16796: \$? = $ac_status" >&5
16797   (exit $ac_status); }; }; then
16798   termios_bad=no
16799 else
16800   echo "$as_me: failed program was:" >&5
16801 cat conftest.$ac_ext >&5
16802
16803                 cat >conftest.$ac_ext <<_ACEOF
16804 #line 16804 "configure"
16805 #include "confdefs.h"
16806
16807 #define _POSIX_SOURCE
16808 #include <termios.h>
16809 int
16810 main ()
16811 {
16812 struct termios foo; int x = foo.c_iflag
16813   ;
16814   return 0;
16815 }
16816 _ACEOF
16817 rm -f conftest.$ac_objext
16818 if { (eval echo "$as_me:16818: \"$ac_compile\"") >&5
16819   (eval $ac_compile) 2>&5
16820   ac_status=$?
16821   echo "$as_me:16821: \$? = $ac_status" >&5
16822   (exit $ac_status); } &&
16823          { ac_try='test -s conftest.$ac_objext'
16824   { (eval echo "$as_me:16824: \"$ac_try\"") >&5
16825   (eval $ac_try) 2>&5
16826   ac_status=$?
16827   echo "$as_me:16827: \$? = $ac_status" >&5
16828   (exit $ac_status); }; }; then
16829   termios_bad=unknown
16830 else
16831   echo "$as_me: failed program was:" >&5
16832 cat conftest.$ac_ext >&5
16833 termios_bad=yes
16834 cat >>confdefs.h <<\EOF
16835 #define _POSIX_SOURCE 1
16836 EOF
16837
16838 fi
16839 rm -f conftest.$ac_objext conftest.$ac_ext
16840
16841 fi
16842 rm -f conftest.$ac_objext conftest.$ac_ext
16843         echo "$as_me:16843: result: $termios_bad" >&5
16844 echo "${ECHO_T}$termios_bad" >&6
16845         fi
16846 fi
16847
16848 echo "$as_me:16848: checking for tcgetattr" >&5
16849 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16850 if test "${cf_cv_have_tcgetattr+set}" = set; then
16851   echo $ECHO_N "(cached) $ECHO_C" >&6
16852 else
16853
16854 cat >conftest.$ac_ext <<_ACEOF
16855 #line 16855 "configure"
16856 #include "confdefs.h"
16857
16858 #include <sys/types.h>
16859 #ifdef HAVE_UNISTD_H
16860 #include <unistd.h>
16861 #endif
16862 #ifdef HAVE_TERMIOS_H
16863 #include <termios.h>
16864 #define TTY struct termios
16865 #else
16866 #ifdef HAVE_TERMIO_H
16867 #include <termio.h>
16868 #define TTY struct termio
16869 #endif
16870 #endif
16871
16872 int
16873 main ()
16874 {
16875
16876 TTY foo;
16877 tcgetattr(1, &foo);
16878   ;
16879   return 0;
16880 }
16881 _ACEOF
16882 rm -f conftest.$ac_objext conftest$ac_exeext
16883 if { (eval echo "$as_me:16883: \"$ac_link\"") >&5
16884   (eval $ac_link) 2>&5
16885   ac_status=$?
16886   echo "$as_me:16886: \$? = $ac_status" >&5
16887   (exit $ac_status); } &&
16888          { ac_try='test -s conftest$ac_exeext'
16889   { (eval echo "$as_me:16889: \"$ac_try\"") >&5
16890   (eval $ac_try) 2>&5
16891   ac_status=$?
16892   echo "$as_me:16892: \$? = $ac_status" >&5
16893   (exit $ac_status); }; }; then
16894   cf_cv_have_tcgetattr=yes
16895 else
16896   echo "$as_me: failed program was:" >&5
16897 cat conftest.$ac_ext >&5
16898 cf_cv_have_tcgetattr=no
16899 fi
16900 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16901 fi
16902 echo "$as_me:16902: result: $cf_cv_have_tcgetattr" >&5
16903 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16904 test "$cf_cv_have_tcgetattr" = yes &&
16905 cat >>confdefs.h <<\EOF
16906 #define HAVE_TCGETATTR 1
16907 EOF
16908
16909 echo "$as_me:16909: checking for vsscanf function or workaround" >&5
16910 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16911 if test "${cf_cv_func_vsscanf+set}" = set; then
16912   echo $ECHO_N "(cached) $ECHO_C" >&6
16913 else
16914
16915 cat >conftest.$ac_ext <<_ACEOF
16916 #line 16916 "configure"
16917 #include "confdefs.h"
16918
16919 #include <stdarg.h>
16920 #include <stdio.h>
16921 int
16922 main ()
16923 {
16924
16925         va_list ap;
16926         vsscanf("from", "%d", ap)
16927   ;
16928   return 0;
16929 }
16930 _ACEOF
16931 rm -f conftest.$ac_objext conftest$ac_exeext
16932 if { (eval echo "$as_me:16932: \"$ac_link\"") >&5
16933   (eval $ac_link) 2>&5
16934   ac_status=$?
16935   echo "$as_me:16935: \$? = $ac_status" >&5
16936   (exit $ac_status); } &&
16937          { ac_try='test -s conftest$ac_exeext'
16938   { (eval echo "$as_me:16938: \"$ac_try\"") >&5
16939   (eval $ac_try) 2>&5
16940   ac_status=$?
16941   echo "$as_me:16941: \$? = $ac_status" >&5
16942   (exit $ac_status); }; }; then
16943   cf_cv_func_vsscanf=vsscanf
16944 else
16945   echo "$as_me: failed program was:" >&5
16946 cat conftest.$ac_ext >&5
16947
16948 cat >conftest.$ac_ext <<_ACEOF
16949 #line 16949 "configure"
16950 #include "confdefs.h"
16951
16952 #include <stdarg.h>
16953 #include <stdio.h>
16954 int
16955 main ()
16956 {
16957
16958     FILE strbuf;
16959     char *str = "from";
16960
16961     strbuf._flag = _IOREAD;
16962     strbuf._ptr = strbuf._base = (unsigned char *) str;
16963     strbuf._cnt = strlen(str);
16964     strbuf._file = _NFILE;
16965     return (vfscanf(&strbuf, "%d", ap))
16966   ;
16967   return 0;
16968 }
16969 _ACEOF
16970 rm -f conftest.$ac_objext conftest$ac_exeext
16971 if { (eval echo "$as_me:16971: \"$ac_link\"") >&5
16972   (eval $ac_link) 2>&5
16973   ac_status=$?
16974   echo "$as_me:16974: \$? = $ac_status" >&5
16975   (exit $ac_status); } &&
16976          { ac_try='test -s conftest$ac_exeext'
16977   { (eval echo "$as_me:16977: \"$ac_try\"") >&5
16978   (eval $ac_try) 2>&5
16979   ac_status=$?
16980   echo "$as_me:16980: \$? = $ac_status" >&5
16981   (exit $ac_status); }; }; then
16982   cf_cv_func_vsscanf=vfscanf
16983 else
16984   echo "$as_me: failed program was:" >&5
16985 cat conftest.$ac_ext >&5
16986
16987 cat >conftest.$ac_ext <<_ACEOF
16988 #line 16988 "configure"
16989 #include "confdefs.h"
16990
16991 #include <stdarg.h>
16992 #include <stdio.h>
16993 int
16994 main ()
16995 {
16996
16997     FILE strbuf;
16998     char *str = "from";
16999
17000     strbuf._flag = _IOREAD;
17001     strbuf._ptr = strbuf._base = (unsigned char *) str;
17002     strbuf._cnt = strlen(str);
17003     strbuf._file = _NFILE;
17004     return (_doscan(&strbuf, "%d", ap))
17005   ;
17006   return 0;
17007 }
17008 _ACEOF
17009 rm -f conftest.$ac_objext conftest$ac_exeext
17010 if { (eval echo "$as_me:17010: \"$ac_link\"") >&5
17011   (eval $ac_link) 2>&5
17012   ac_status=$?
17013   echo "$as_me:17013: \$? = $ac_status" >&5
17014   (exit $ac_status); } &&
17015          { ac_try='test -s conftest$ac_exeext'
17016   { (eval echo "$as_me:17016: \"$ac_try\"") >&5
17017   (eval $ac_try) 2>&5
17018   ac_status=$?
17019   echo "$as_me:17019: \$? = $ac_status" >&5
17020   (exit $ac_status); }; }; then
17021   cf_cv_func_vsscanf=_doscan
17022 else
17023   echo "$as_me: failed program was:" >&5
17024 cat conftest.$ac_ext >&5
17025
17026 cf_cv_func_vsscanf=no
17027 fi
17028 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17029 fi
17030 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17031 fi
17032 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17033 fi
17034 echo "$as_me:17034: result: $cf_cv_func_vsscanf" >&5
17035 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17036
17037 case $cf_cv_func_vsscanf in #(vi
17038 vsscanf)
17039 cat >>confdefs.h <<\EOF
17040 #define HAVE_VSSCANF 1
17041 EOF
17042 ;; #(vi
17043 vfscanf)
17044 cat >>confdefs.h <<\EOF
17045 #define HAVE_VFSCANF 1
17046 EOF
17047 ;; #(vi
17048 _doscan)
17049 cat >>confdefs.h <<\EOF
17050 #define HAVE__DOSCAN 1
17051 EOF
17052 ;;
17053 esac
17054
17055 echo "$as_me:17055: checking for working mkstemp" >&5
17056 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17057 if test "${cf_cv_func_mkstemp+set}" = set; then
17058   echo $ECHO_N "(cached) $ECHO_C" >&6
17059 else
17060
17061 rm -rf conftest*
17062 if test "$cross_compiling" = yes; then
17063   cf_cv_func_mkstemp=maybe
17064 else
17065   cat >conftest.$ac_ext <<_ACEOF
17066 #line 17066 "configure"
17067 #include "confdefs.h"
17068
17069 #include <sys/types.h>
17070 #include <stdlib.h>
17071 #include <stdio.h>
17072 #include <string.h>
17073 #include <sys/stat.h>
17074 int main()
17075 {
17076         char *tmpl = "conftestXXXXXX";
17077         char name[2][80];
17078         int n;
17079         int result = 0;
17080         int fd;
17081         struct stat sb;
17082
17083         umask(077);
17084         for (n = 0; n < 2; ++n) {
17085                 strcpy(name[n], tmpl);
17086                 if ((fd = mkstemp(name[n])) >= 0) {
17087                         if (!strcmp(name[n], tmpl)
17088                          || stat(name[n], &sb) != 0
17089                          || (sb.st_mode & S_IFMT) != S_IFREG
17090                          || (sb.st_mode & 077) != 0) {
17091                                 result = 1;
17092                         }
17093                         close(fd);
17094                 }
17095         }
17096         if (result == 0
17097          && !strcmp(name[0], name[1]))
17098                 result = 1;
17099         ${cf_cv_main_return:-return}(result);
17100 }
17101
17102 _ACEOF
17103 rm -f conftest$ac_exeext
17104 if { (eval echo "$as_me:17104: \"$ac_link\"") >&5
17105   (eval $ac_link) 2>&5
17106   ac_status=$?
17107   echo "$as_me:17107: \$? = $ac_status" >&5
17108   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17109   { (eval echo "$as_me:17109: \"$ac_try\"") >&5
17110   (eval $ac_try) 2>&5
17111   ac_status=$?
17112   echo "$as_me:17112: \$? = $ac_status" >&5
17113   (exit $ac_status); }; }; then
17114   cf_cv_func_mkstemp=yes
17115
17116 else
17117   echo "$as_me: program exited with status $ac_status" >&5
17118 echo "$as_me: failed program was:" >&5
17119 cat conftest.$ac_ext >&5
17120 cf_cv_func_mkstemp=no
17121
17122 fi
17123 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17124 fi
17125
17126 fi
17127 echo "$as_me:17127: result: $cf_cv_func_mkstemp" >&5
17128 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17129 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17130         echo "$as_me:17130: checking for mkstemp" >&5
17131 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17132 if test "${ac_cv_func_mkstemp+set}" = set; then
17133   echo $ECHO_N "(cached) $ECHO_C" >&6
17134 else
17135   cat >conftest.$ac_ext <<_ACEOF
17136 #line 17136 "configure"
17137 #include "confdefs.h"
17138 /* System header to define __stub macros and hopefully few prototypes,
17139     which can conflict with char mkstemp (); below.  */
17140 #include <assert.h>
17141 /* Override any gcc2 internal prototype to avoid an error.  */
17142 #ifdef __cplusplus
17143 extern "C"
17144 #endif
17145 /* We use char because int might match the return type of a gcc2
17146    builtin and then its argument prototype would still apply.  */
17147 char mkstemp ();
17148 char (*f) ();
17149
17150 int
17151 main ()
17152 {
17153 /* The GNU C library defines this for functions which it implements
17154     to always fail with ENOSYS.  Some functions are actually named
17155     something starting with __ and the normal name is an alias.  */
17156 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17157 choke me
17158 #else
17159 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17160 #endif
17161
17162   ;
17163   return 0;
17164 }
17165 _ACEOF
17166 rm -f conftest.$ac_objext conftest$ac_exeext
17167 if { (eval echo "$as_me:17167: \"$ac_link\"") >&5
17168   (eval $ac_link) 2>&5
17169   ac_status=$?
17170   echo "$as_me:17170: \$? = $ac_status" >&5
17171   (exit $ac_status); } &&
17172          { ac_try='test -s conftest$ac_exeext'
17173   { (eval echo "$as_me:17173: \"$ac_try\"") >&5
17174   (eval $ac_try) 2>&5
17175   ac_status=$?
17176   echo "$as_me:17176: \$? = $ac_status" >&5
17177   (exit $ac_status); }; }; then
17178   ac_cv_func_mkstemp=yes
17179 else
17180   echo "$as_me: failed program was:" >&5
17181 cat conftest.$ac_ext >&5
17182 ac_cv_func_mkstemp=no
17183 fi
17184 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17185 fi
17186 echo "$as_me:17186: result: $ac_cv_func_mkstemp" >&5
17187 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17188
17189 fi
17190 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17191
17192 cat >>confdefs.h <<\EOF
17193 #define HAVE_MKSTEMP 1
17194 EOF
17195
17196 fi
17197
17198 # setup for prototype of fallback for vsscanf()
17199
17200 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17201         HAVE_VSSCANF=1
17202 else
17203         HAVE_VSSCANF=0
17204 fi
17205
17206 if test "x$cross_compiling" = xyes ; then
17207         { echo "$as_me:17207: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17208 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17209 else
17210         echo "$as_me:17210: checking whether setvbuf arguments are reversed" >&5
17211 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17212 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17213   echo $ECHO_N "(cached) $ECHO_C" >&6
17214 else
17215   if test "$cross_compiling" = yes; then
17216   { { echo "$as_me:17216: error: cannot run test program while cross compiling" >&5
17217 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17218    { (exit 1); exit 1; }; }
17219 else
17220   cat >conftest.$ac_ext <<_ACEOF
17221 #line 17221 "configure"
17222 #include "confdefs.h"
17223 #include <stdio.h>
17224 /* If setvbuf has the reversed format, exit 0. */
17225 int
17226 main ()
17227 {
17228   /* This call has the arguments reversed.
17229      A reversed system may check and see that the address of main
17230      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17231   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17232     $ac_main_return(1);
17233   putc('\r', stdout);
17234   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17235 }
17236 _ACEOF
17237 rm -f conftest$ac_exeext
17238 if { (eval echo "$as_me:17238: \"$ac_link\"") >&5
17239   (eval $ac_link) 2>&5
17240   ac_status=$?
17241   echo "$as_me:17241: \$? = $ac_status" >&5
17242   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17243   { (eval echo "$as_me:17243: \"$ac_try\"") >&5
17244   (eval $ac_try) 2>&5
17245   ac_status=$?
17246   echo "$as_me:17246: \$? = $ac_status" >&5
17247   (exit $ac_status); }; }; then
17248   ac_cv_func_setvbuf_reversed=yes
17249 else
17250   echo "$as_me: program exited with status $ac_status" >&5
17251 echo "$as_me: failed program was:" >&5
17252 cat conftest.$ac_ext >&5
17253 ac_cv_func_setvbuf_reversed=no
17254 fi
17255 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17256 fi
17257 rm -f core core.* *.core
17258 fi
17259 echo "$as_me:17259: result: $ac_cv_func_setvbuf_reversed" >&5
17260 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17261 if test $ac_cv_func_setvbuf_reversed = yes; then
17262
17263 cat >>confdefs.h <<\EOF
17264 #define SETVBUF_REVERSED 1
17265 EOF
17266
17267 fi
17268
17269 fi
17270 echo "$as_me:17270: checking for intptr_t" >&5
17271 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17272 if test "${ac_cv_type_intptr_t+set}" = set; then
17273   echo $ECHO_N "(cached) $ECHO_C" >&6
17274 else
17275   cat >conftest.$ac_ext <<_ACEOF
17276 #line 17276 "configure"
17277 #include "confdefs.h"
17278 $ac_includes_default
17279 int
17280 main ()
17281 {
17282 if ((intptr_t *) 0)
17283   return 0;
17284 if (sizeof (intptr_t))
17285   return 0;
17286   ;
17287   return 0;
17288 }
17289 _ACEOF
17290 rm -f conftest.$ac_objext
17291 if { (eval echo "$as_me:17291: \"$ac_compile\"") >&5
17292   (eval $ac_compile) 2>&5
17293   ac_status=$?
17294   echo "$as_me:17294: \$? = $ac_status" >&5
17295   (exit $ac_status); } &&
17296          { ac_try='test -s conftest.$ac_objext'
17297   { (eval echo "$as_me:17297: \"$ac_try\"") >&5
17298   (eval $ac_try) 2>&5
17299   ac_status=$?
17300   echo "$as_me:17300: \$? = $ac_status" >&5
17301   (exit $ac_status); }; }; then
17302   ac_cv_type_intptr_t=yes
17303 else
17304   echo "$as_me: failed program was:" >&5
17305 cat conftest.$ac_ext >&5
17306 ac_cv_type_intptr_t=no
17307 fi
17308 rm -f conftest.$ac_objext conftest.$ac_ext
17309 fi
17310 echo "$as_me:17310: result: $ac_cv_type_intptr_t" >&5
17311 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17312 if test $ac_cv_type_intptr_t = yes; then
17313   :
17314 else
17315
17316 cat >>confdefs.h <<EOF
17317 #define intptr_t long
17318 EOF
17319
17320 fi
17321
17322 echo "$as_me:17322: checking for ssize_t" >&5
17323 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17324 if test "${ac_cv_type_ssize_t+set}" = set; then
17325   echo $ECHO_N "(cached) $ECHO_C" >&6
17326 else
17327   cat >conftest.$ac_ext <<_ACEOF
17328 #line 17328 "configure"
17329 #include "confdefs.h"
17330 $ac_includes_default
17331 int
17332 main ()
17333 {
17334 if ((ssize_t *) 0)
17335   return 0;
17336 if (sizeof (ssize_t))
17337   return 0;
17338   ;
17339   return 0;
17340 }
17341 _ACEOF
17342 rm -f conftest.$ac_objext
17343 if { (eval echo "$as_me:17343: \"$ac_compile\"") >&5
17344   (eval $ac_compile) 2>&5
17345   ac_status=$?
17346   echo "$as_me:17346: \$? = $ac_status" >&5
17347   (exit $ac_status); } &&
17348          { ac_try='test -s conftest.$ac_objext'
17349   { (eval echo "$as_me:17349: \"$ac_try\"") >&5
17350   (eval $ac_try) 2>&5
17351   ac_status=$?
17352   echo "$as_me:17352: \$? = $ac_status" >&5
17353   (exit $ac_status); }; }; then
17354   ac_cv_type_ssize_t=yes
17355 else
17356   echo "$as_me: failed program was:" >&5
17357 cat conftest.$ac_ext >&5
17358 ac_cv_type_ssize_t=no
17359 fi
17360 rm -f conftest.$ac_objext conftest.$ac_ext
17361 fi
17362 echo "$as_me:17362: result: $ac_cv_type_ssize_t" >&5
17363 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17364 if test $ac_cv_type_ssize_t = yes; then
17365   :
17366 else
17367
17368 cat >>confdefs.h <<EOF
17369 #define ssize_t int
17370 EOF
17371
17372 fi
17373
17374 echo "$as_me:17374: checking for type sigaction_t" >&5
17375 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17376 if test "${cf_cv_type_sigaction+set}" = set; then
17377   echo $ECHO_N "(cached) $ECHO_C" >&6
17378 else
17379
17380         cat >conftest.$ac_ext <<_ACEOF
17381 #line 17381 "configure"
17382 #include "confdefs.h"
17383
17384 #include <signal.h>
17385 int
17386 main ()
17387 {
17388 sigaction_t x
17389   ;
17390   return 0;
17391 }
17392 _ACEOF
17393 rm -f conftest.$ac_objext
17394 if { (eval echo "$as_me:17394: \"$ac_compile\"") >&5
17395   (eval $ac_compile) 2>&5
17396   ac_status=$?
17397   echo "$as_me:17397: \$? = $ac_status" >&5
17398   (exit $ac_status); } &&
17399          { ac_try='test -s conftest.$ac_objext'
17400   { (eval echo "$as_me:17400: \"$ac_try\"") >&5
17401   (eval $ac_try) 2>&5
17402   ac_status=$?
17403   echo "$as_me:17403: \$? = $ac_status" >&5
17404   (exit $ac_status); }; }; then
17405   cf_cv_type_sigaction=yes
17406 else
17407   echo "$as_me: failed program was:" >&5
17408 cat conftest.$ac_ext >&5
17409 cf_cv_type_sigaction=no
17410 fi
17411 rm -f conftest.$ac_objext conftest.$ac_ext
17412 fi
17413
17414 echo "$as_me:17414: result: $cf_cv_type_sigaction" >&5
17415 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17416 test "$cf_cv_type_sigaction" = yes &&
17417 cat >>confdefs.h <<\EOF
17418 #define HAVE_TYPE_SIGACTION 1
17419 EOF
17420
17421 echo "$as_me:17421: checking declaration of size-change" >&5
17422 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17423 if test "${cf_cv_sizechange+set}" = set; then
17424   echo $ECHO_N "(cached) $ECHO_C" >&6
17425 else
17426
17427     cf_cv_sizechange=unknown
17428     cf_save_CPPFLAGS="$CPPFLAGS"
17429
17430 for cf_opts in "" "NEED_PTEM_H"
17431 do
17432
17433     CPPFLAGS="$cf_save_CPPFLAGS"
17434     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17435     cat >conftest.$ac_ext <<_ACEOF
17436 #line 17436 "configure"
17437 #include "confdefs.h"
17438 #include <sys/types.h>
17439 #ifdef HAVE_TERMIOS_H
17440 #include <termios.h>
17441 #else
17442 #ifdef HAVE_TERMIO_H
17443 #include <termio.h>
17444 #endif
17445 #endif
17446 #ifdef NEED_PTEM_H
17447 /* This is a workaround for SCO:  they neglected to define struct winsize in
17448  * termios.h -- it's only in termio.h and ptem.h
17449  */
17450 #include        <sys/stream.h>
17451 #include        <sys/ptem.h>
17452 #endif
17453 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17454 #include <sys/ioctl.h>
17455 #endif
17456
17457 int
17458 main ()
17459 {
17460
17461 #ifdef TIOCGSIZE
17462         struct ttysize win;     /* FIXME: what system is this? */
17463         int y = win.ts_lines;
17464         int x = win.ts_cols;
17465 #else
17466 #ifdef TIOCGWINSZ
17467         struct winsize win;
17468         int y = win.ws_row;
17469         int x = win.ws_col;
17470 #else
17471         no TIOCGSIZE or TIOCGWINSZ
17472 #endif /* TIOCGWINSZ */
17473 #endif /* TIOCGSIZE */
17474
17475   ;
17476   return 0;
17477 }
17478 _ACEOF
17479 rm -f conftest.$ac_objext
17480 if { (eval echo "$as_me:17480: \"$ac_compile\"") >&5
17481   (eval $ac_compile) 2>&5
17482   ac_status=$?
17483   echo "$as_me:17483: \$? = $ac_status" >&5
17484   (exit $ac_status); } &&
17485          { ac_try='test -s conftest.$ac_objext'
17486   { (eval echo "$as_me:17486: \"$ac_try\"") >&5
17487   (eval $ac_try) 2>&5
17488   ac_status=$?
17489   echo "$as_me:17489: \$? = $ac_status" >&5
17490   (exit $ac_status); }; }; then
17491   cf_cv_sizechange=yes
17492 else
17493   echo "$as_me: failed program was:" >&5
17494 cat conftest.$ac_ext >&5
17495 cf_cv_sizechange=no
17496 fi
17497 rm -f conftest.$ac_objext conftest.$ac_ext
17498
17499         CPPFLAGS="$cf_save_CPPFLAGS"
17500         if test "$cf_cv_sizechange" = yes ; then
17501                 echo "size-change succeeded ($cf_opts)" >&5
17502                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17503                 break
17504         fi
17505 done
17506
17507 fi
17508 echo "$as_me:17508: result: $cf_cv_sizechange" >&5
17509 echo "${ECHO_T}$cf_cv_sizechange" >&6
17510 if test "$cf_cv_sizechange" != no ; then
17511
17512 cat >>confdefs.h <<\EOF
17513 #define HAVE_SIZECHANGE 1
17514 EOF
17515
17516         case $cf_cv_sizechange in #(vi
17517         NEED*)
17518                 cat >>confdefs.h <<EOF
17519 #define $cf_cv_sizechange  1
17520 EOF
17521
17522                 ;;
17523         esac
17524 fi
17525
17526 echo "$as_me:17526: checking for memmove" >&5
17527 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17528 if test "${ac_cv_func_memmove+set}" = set; then
17529   echo $ECHO_N "(cached) $ECHO_C" >&6
17530 else
17531   cat >conftest.$ac_ext <<_ACEOF
17532 #line 17532 "configure"
17533 #include "confdefs.h"
17534 /* System header to define __stub macros and hopefully few prototypes,
17535     which can conflict with char memmove (); below.  */
17536 #include <assert.h>
17537 /* Override any gcc2 internal prototype to avoid an error.  */
17538 #ifdef __cplusplus
17539 extern "C"
17540 #endif
17541 /* We use char because int might match the return type of a gcc2
17542    builtin and then its argument prototype would still apply.  */
17543 char memmove ();
17544 char (*f) ();
17545
17546 int
17547 main ()
17548 {
17549 /* The GNU C library defines this for functions which it implements
17550     to always fail with ENOSYS.  Some functions are actually named
17551     something starting with __ and the normal name is an alias.  */
17552 #if defined (__stub_memmove) || defined (__stub___memmove)
17553 choke me
17554 #else
17555 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17556 #endif
17557
17558   ;
17559   return 0;
17560 }
17561 _ACEOF
17562 rm -f conftest.$ac_objext conftest$ac_exeext
17563 if { (eval echo "$as_me:17563: \"$ac_link\"") >&5
17564   (eval $ac_link) 2>&5
17565   ac_status=$?
17566   echo "$as_me:17566: \$? = $ac_status" >&5
17567   (exit $ac_status); } &&
17568          { ac_try='test -s 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_memmove=yes
17575 else
17576   echo "$as_me: failed program was:" >&5
17577 cat conftest.$ac_ext >&5
17578 ac_cv_func_memmove=no
17579 fi
17580 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17581 fi
17582 echo "$as_me:17582: result: $ac_cv_func_memmove" >&5
17583 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17584 if test $ac_cv_func_memmove = yes; then
17585   :
17586 else
17587
17588 echo "$as_me:17588: checking for bcopy" >&5
17589 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17590 if test "${ac_cv_func_bcopy+set}" = set; then
17591   echo $ECHO_N "(cached) $ECHO_C" >&6
17592 else
17593   cat >conftest.$ac_ext <<_ACEOF
17594 #line 17594 "configure"
17595 #include "confdefs.h"
17596 /* System header to define __stub macros and hopefully few prototypes,
17597     which can conflict with char bcopy (); below.  */
17598 #include <assert.h>
17599 /* Override any gcc2 internal prototype to avoid an error.  */
17600 #ifdef __cplusplus
17601 extern "C"
17602 #endif
17603 /* We use char because int might match the return type of a gcc2
17604    builtin and then its argument prototype would still apply.  */
17605 char bcopy ();
17606 char (*f) ();
17607
17608 int
17609 main ()
17610 {
17611 /* The GNU C library defines this for functions which it implements
17612     to always fail with ENOSYS.  Some functions are actually named
17613     something starting with __ and the normal name is an alias.  */
17614 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17615 choke me
17616 #else
17617 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17618 #endif
17619
17620   ;
17621   return 0;
17622 }
17623 _ACEOF
17624 rm -f conftest.$ac_objext conftest$ac_exeext
17625 if { (eval echo "$as_me:17625: \"$ac_link\"") >&5
17626   (eval $ac_link) 2>&5
17627   ac_status=$?
17628   echo "$as_me:17628: \$? = $ac_status" >&5
17629   (exit $ac_status); } &&
17630          { ac_try='test -s conftest$ac_exeext'
17631   { (eval echo "$as_me:17631: \"$ac_try\"") >&5
17632   (eval $ac_try) 2>&5
17633   ac_status=$?
17634   echo "$as_me:17634: \$? = $ac_status" >&5
17635   (exit $ac_status); }; }; then
17636   ac_cv_func_bcopy=yes
17637 else
17638   echo "$as_me: failed program was:" >&5
17639 cat conftest.$ac_ext >&5
17640 ac_cv_func_bcopy=no
17641 fi
17642 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17643 fi
17644 echo "$as_me:17644: result: $ac_cv_func_bcopy" >&5
17645 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17646 if test $ac_cv_func_bcopy = yes; then
17647
17648         echo "$as_me:17648: checking if bcopy does overlapping moves" >&5
17649 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17650 if test "${cf_cv_good_bcopy+set}" = set; then
17651   echo $ECHO_N "(cached) $ECHO_C" >&6
17652 else
17653
17654                 if test "$cross_compiling" = yes; then
17655   cf_cv_good_bcopy=unknown
17656 else
17657   cat >conftest.$ac_ext <<_ACEOF
17658 #line 17658 "configure"
17659 #include "confdefs.h"
17660
17661 int main() {
17662         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17663         char temp[40];
17664         bcopy(data, temp, sizeof(data));
17665         bcopy(temp+10, temp, 15);
17666         bcopy(temp+5, temp+15, 10);
17667         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17668 }
17669
17670 _ACEOF
17671 rm -f conftest$ac_exeext
17672 if { (eval echo "$as_me:17672: \"$ac_link\"") >&5
17673   (eval $ac_link) 2>&5
17674   ac_status=$?
17675   echo "$as_me:17675: \$? = $ac_status" >&5
17676   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17677   { (eval echo "$as_me:17677: \"$ac_try\"") >&5
17678   (eval $ac_try) 2>&5
17679   ac_status=$?
17680   echo "$as_me:17680: \$? = $ac_status" >&5
17681   (exit $ac_status); }; }; then
17682   cf_cv_good_bcopy=yes
17683 else
17684   echo "$as_me: program exited with status $ac_status" >&5
17685 echo "$as_me: failed program was:" >&5
17686 cat conftest.$ac_ext >&5
17687 cf_cv_good_bcopy=no
17688 fi
17689 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17690 fi
17691
17692 fi
17693 echo "$as_me:17693: result: $cf_cv_good_bcopy" >&5
17694 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17695
17696 else
17697   cf_cv_good_bcopy=no
17698 fi
17699
17700         if test "$cf_cv_good_bcopy" = yes ; then
17701
17702 cat >>confdefs.h <<\EOF
17703 #define USE_OK_BCOPY 1
17704 EOF
17705
17706         else
17707
17708 cat >>confdefs.h <<\EOF
17709 #define USE_MY_MEMMOVE 1
17710 EOF
17711
17712         fi
17713
17714 fi
17715
17716 echo "$as_me:17716: checking if poll really works" >&5
17717 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17718 if test "${cf_cv_working_poll+set}" = set; then
17719   echo $ECHO_N "(cached) $ECHO_C" >&6
17720 else
17721
17722 if test "$cross_compiling" = yes; then
17723   cf_cv_working_poll=unknown
17724 else
17725   cat >conftest.$ac_ext <<_ACEOF
17726 #line 17726 "configure"
17727 #include "confdefs.h"
17728
17729 #include <stdlib.h>
17730 #include <stdio.h>
17731 #include <unistd.h>
17732 #include <fcntl.h>
17733 #ifdef HAVE_POLL_H
17734 #include <poll.h>
17735 #else
17736 #include <sys/poll.h>
17737 #endif
17738 int main() {
17739         struct pollfd myfds;
17740         int ret;
17741
17742         /* check for Darwin bug with respect to "devices" */
17743         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17744         if (myfds.fd < 0)
17745                 myfds.fd = 0;
17746         myfds.events = POLLIN;
17747         myfds.revents = 0;
17748
17749         ret = poll(&myfds, 1, 100);
17750
17751         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17752                 ret = -1;
17753         } else {
17754                 int fd = 0;
17755                 if (!isatty(fd)) {
17756                         fd = open("/dev/tty", 2);       /* O_RDWR */
17757                 }
17758
17759                 if (fd >= 0) {
17760                         /* also check with standard input */
17761                         myfds.fd = fd;
17762                         myfds.events = POLLIN;
17763                         myfds.revents = 0;
17764                         ret = poll(&myfds, 1, 100);
17765                 } else {
17766                         ret = -1;
17767                 }
17768         }
17769         ${cf_cv_main_return:-return}(ret < 0);
17770 }
17771 _ACEOF
17772 rm -f conftest$ac_exeext
17773 if { (eval echo "$as_me:17773: \"$ac_link\"") >&5
17774   (eval $ac_link) 2>&5
17775   ac_status=$?
17776   echo "$as_me:17776: \$? = $ac_status" >&5
17777   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17778   { (eval echo "$as_me:17778: \"$ac_try\"") >&5
17779   (eval $ac_try) 2>&5
17780   ac_status=$?
17781   echo "$as_me:17781: \$? = $ac_status" >&5
17782   (exit $ac_status); }; }; then
17783   cf_cv_working_poll=yes
17784 else
17785   echo "$as_me: program exited with status $ac_status" >&5
17786 echo "$as_me: failed program was:" >&5
17787 cat conftest.$ac_ext >&5
17788 cf_cv_working_poll=no
17789 fi
17790 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17791 fi
17792 fi
17793 echo "$as_me:17793: result: $cf_cv_working_poll" >&5
17794 echo "${ECHO_T}$cf_cv_working_poll" >&6
17795 test "$cf_cv_working_poll" = "yes" &&
17796 cat >>confdefs.h <<\EOF
17797 #define HAVE_WORKING_POLL 1
17798 EOF
17799
17800 echo "$as_me:17800: checking for va_copy" >&5
17801 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17802 if test "${cf_cv_have_va_copy+set}" = set; then
17803   echo $ECHO_N "(cached) $ECHO_C" >&6
17804 else
17805
17806 cat >conftest.$ac_ext <<_ACEOF
17807 #line 17807 "configure"
17808 #include "confdefs.h"
17809
17810 #include <stdarg.h>
17811
17812 int
17813 main ()
17814 {
17815
17816         static va_list dst;
17817         static va_list src;
17818         va_copy(dst, src)
17819   ;
17820   return 0;
17821 }
17822 _ACEOF
17823 rm -f conftest.$ac_objext conftest$ac_exeext
17824 if { (eval echo "$as_me:17824: \"$ac_link\"") >&5
17825   (eval $ac_link) 2>&5
17826   ac_status=$?
17827   echo "$as_me:17827: \$? = $ac_status" >&5
17828   (exit $ac_status); } &&
17829          { ac_try='test -s conftest$ac_exeext'
17830   { (eval echo "$as_me:17830: \"$ac_try\"") >&5
17831   (eval $ac_try) 2>&5
17832   ac_status=$?
17833   echo "$as_me:17833: \$? = $ac_status" >&5
17834   (exit $ac_status); }; }; then
17835   cf_cv_have_va_copy=yes
17836 else
17837   echo "$as_me: failed program was:" >&5
17838 cat conftest.$ac_ext >&5
17839 cf_cv_have_va_copy=no
17840 fi
17841 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17842 fi
17843 echo "$as_me:17843: result: $cf_cv_have_va_copy" >&5
17844 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17845
17846 test "$cf_cv_have_va_copy" = yes &&
17847 cat >>confdefs.h <<\EOF
17848 #define HAVE_VA_COPY 1
17849 EOF
17850
17851 echo "$as_me:17851: checking for __va_copy" >&5
17852 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17853 if test "${cf_cv_have___va_copy+set}" = set; then
17854   echo $ECHO_N "(cached) $ECHO_C" >&6
17855 else
17856
17857 cat >conftest.$ac_ext <<_ACEOF
17858 #line 17858 "configure"
17859 #include "confdefs.h"
17860
17861 #include <stdarg.h>
17862
17863 int
17864 main ()
17865 {
17866
17867         static va_list dst;
17868         static va_list src;
17869         __va_copy(dst, src)
17870   ;
17871   return 0;
17872 }
17873 _ACEOF
17874 rm -f conftest.$ac_objext conftest$ac_exeext
17875 if { (eval echo "$as_me:17875: \"$ac_link\"") >&5
17876   (eval $ac_link) 2>&5
17877   ac_status=$?
17878   echo "$as_me:17878: \$? = $ac_status" >&5
17879   (exit $ac_status); } &&
17880          { ac_try='test -s conftest$ac_exeext'
17881   { (eval echo "$as_me:17881: \"$ac_try\"") >&5
17882   (eval $ac_try) 2>&5
17883   ac_status=$?
17884   echo "$as_me:17884: \$? = $ac_status" >&5
17885   (exit $ac_status); }; }; then
17886   cf_cv_have___va_copy=yes
17887 else
17888   echo "$as_me: failed program was:" >&5
17889 cat conftest.$ac_ext >&5
17890 cf_cv_have___va_copy=no
17891 fi
17892 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17893 fi
17894 echo "$as_me:17894: result: $cf_cv_have___va_copy" >&5
17895 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17896
17897 test "$cf_cv_have___va_copy" = yes &&
17898 cat >>confdefs.h <<\EOF
17899 #define HAVE___VA_COPY 1
17900 EOF
17901
17902 echo "$as_me:17902: checking for pid_t" >&5
17903 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17904 if test "${ac_cv_type_pid_t+set}" = set; then
17905   echo $ECHO_N "(cached) $ECHO_C" >&6
17906 else
17907   cat >conftest.$ac_ext <<_ACEOF
17908 #line 17908 "configure"
17909 #include "confdefs.h"
17910 $ac_includes_default
17911 int
17912 main ()
17913 {
17914 if ((pid_t *) 0)
17915   return 0;
17916 if (sizeof (pid_t))
17917   return 0;
17918   ;
17919   return 0;
17920 }
17921 _ACEOF
17922 rm -f conftest.$ac_objext
17923 if { (eval echo "$as_me:17923: \"$ac_compile\"") >&5
17924   (eval $ac_compile) 2>&5
17925   ac_status=$?
17926   echo "$as_me:17926: \$? = $ac_status" >&5
17927   (exit $ac_status); } &&
17928          { ac_try='test -s conftest.$ac_objext'
17929   { (eval echo "$as_me:17929: \"$ac_try\"") >&5
17930   (eval $ac_try) 2>&5
17931   ac_status=$?
17932   echo "$as_me:17932: \$? = $ac_status" >&5
17933   (exit $ac_status); }; }; then
17934   ac_cv_type_pid_t=yes
17935 else
17936   echo "$as_me: failed program was:" >&5
17937 cat conftest.$ac_ext >&5
17938 ac_cv_type_pid_t=no
17939 fi
17940 rm -f conftest.$ac_objext conftest.$ac_ext
17941 fi
17942 echo "$as_me:17942: result: $ac_cv_type_pid_t" >&5
17943 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17944 if test $ac_cv_type_pid_t = yes; then
17945   :
17946 else
17947
17948 cat >>confdefs.h <<EOF
17949 #define pid_t int
17950 EOF
17951
17952 fi
17953
17954 for ac_header in unistd.h vfork.h
17955 do
17956 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17957 echo "$as_me:17957: checking for $ac_header" >&5
17958 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17959 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17960   echo $ECHO_N "(cached) $ECHO_C" >&6
17961 else
17962   cat >conftest.$ac_ext <<_ACEOF
17963 #line 17963 "configure"
17964 #include "confdefs.h"
17965 #include <$ac_header>
17966 _ACEOF
17967 if { (eval echo "$as_me:17967: \"$ac_cpp conftest.$ac_ext\"") >&5
17968   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17969   ac_status=$?
17970   egrep -v '^ *\+' conftest.er1 >conftest.err
17971   rm -f conftest.er1
17972   cat conftest.err >&5
17973   echo "$as_me:17973: \$? = $ac_status" >&5
17974   (exit $ac_status); } >/dev/null; then
17975   if test -s conftest.err; then
17976     ac_cpp_err=$ac_c_preproc_warn_flag
17977   else
17978     ac_cpp_err=
17979   fi
17980 else
17981   ac_cpp_err=yes
17982 fi
17983 if test -z "$ac_cpp_err"; then
17984   eval "$as_ac_Header=yes"
17985 else
17986   echo "$as_me: failed program was:" >&5
17987   cat conftest.$ac_ext >&5
17988   eval "$as_ac_Header=no"
17989 fi
17990 rm -f conftest.err conftest.$ac_ext
17991 fi
17992 echo "$as_me:17992: result: `eval echo '${'$as_ac_Header'}'`" >&5
17993 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17994 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17995   cat >>confdefs.h <<EOF
17996 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17997 EOF
17998
17999 fi
18000 done
18001
18002 for ac_func in fork vfork
18003 do
18004 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18005 echo "$as_me:18005: checking for $ac_func" >&5
18006 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18007 if eval "test \"\${$as_ac_var+set}\" = set"; then
18008   echo $ECHO_N "(cached) $ECHO_C" >&6
18009 else
18010   cat >conftest.$ac_ext <<_ACEOF
18011 #line 18011 "configure"
18012 #include "confdefs.h"
18013 /* System header to define __stub macros and hopefully few prototypes,
18014     which can conflict with char $ac_func (); below.  */
18015 #include <assert.h>
18016 /* Override any gcc2 internal prototype to avoid an error.  */
18017 #ifdef __cplusplus
18018 extern "C"
18019 #endif
18020 /* We use char because int might match the return type of a gcc2
18021    builtin and then its argument prototype would still apply.  */
18022 char $ac_func ();
18023 char (*f) ();
18024
18025 int
18026 main ()
18027 {
18028 /* The GNU C library defines this for functions which it implements
18029     to always fail with ENOSYS.  Some functions are actually named
18030     something starting with __ and the normal name is an alias.  */
18031 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18032 choke me
18033 #else
18034 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18035 #endif
18036
18037   ;
18038   return 0;
18039 }
18040 _ACEOF
18041 rm -f conftest.$ac_objext conftest$ac_exeext
18042 if { (eval echo "$as_me:18042: \"$ac_link\"") >&5
18043   (eval $ac_link) 2>&5
18044   ac_status=$?
18045   echo "$as_me:18045: \$? = $ac_status" >&5
18046   (exit $ac_status); } &&
18047          { ac_try='test -s conftest$ac_exeext'
18048   { (eval echo "$as_me:18048: \"$ac_try\"") >&5
18049   (eval $ac_try) 2>&5
18050   ac_status=$?
18051   echo "$as_me:18051: \$? = $ac_status" >&5
18052   (exit $ac_status); }; }; then
18053   eval "$as_ac_var=yes"
18054 else
18055   echo "$as_me: failed program was:" >&5
18056 cat conftest.$ac_ext >&5
18057 eval "$as_ac_var=no"
18058 fi
18059 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18060 fi
18061 echo "$as_me:18061: result: `eval echo '${'$as_ac_var'}'`" >&5
18062 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18063 if test `eval echo '${'$as_ac_var'}'` = yes; then
18064   cat >>confdefs.h <<EOF
18065 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18066 EOF
18067
18068 fi
18069 done
18070
18071 ac_cv_func_fork_works=$ac_cv_func_fork
18072 if test "x$ac_cv_func_fork" = xyes; then
18073   echo "$as_me:18073: checking for working fork" >&5
18074 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18075 if test "${ac_cv_func_fork_works+set}" = set; then
18076   echo $ECHO_N "(cached) $ECHO_C" >&6
18077 else
18078   if test "$cross_compiling" = yes; then
18079   ac_cv_func_fork_works=cross
18080 else
18081   cat >conftest.$ac_ext <<_ACEOF
18082 /* By Rüdiger Kuhlmann. */
18083       #include <sys/types.h>
18084       #if HAVE_UNISTD_H
18085       # include <unistd.h>
18086       #endif
18087       /* Some systems only have a dummy stub for fork() */
18088       int main ()
18089       {
18090         if (fork() < 0)
18091           $ac_main_return (1);
18092         $ac_main_return (0);
18093       }
18094 _ACEOF
18095 rm -f conftest$ac_exeext
18096 if { (eval echo "$as_me:18096: \"$ac_link\"") >&5
18097   (eval $ac_link) 2>&5
18098   ac_status=$?
18099   echo "$as_me:18099: \$? = $ac_status" >&5
18100   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18101   { (eval echo "$as_me:18101: \"$ac_try\"") >&5
18102   (eval $ac_try) 2>&5
18103   ac_status=$?
18104   echo "$as_me:18104: \$? = $ac_status" >&5
18105   (exit $ac_status); }; }; then
18106   ac_cv_func_fork_works=yes
18107 else
18108   echo "$as_me: program exited with status $ac_status" >&5
18109 echo "$as_me: failed program was:" >&5
18110 cat conftest.$ac_ext >&5
18111 ac_cv_func_fork_works=no
18112 fi
18113 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18114 fi
18115 fi
18116 echo "$as_me:18116: result: $ac_cv_func_fork_works" >&5
18117 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18118
18119 fi
18120 if test "x$ac_cv_func_fork_works" = xcross; then
18121   case $host in
18122     *-*-amigaos* | *-*-msdosdjgpp*)
18123       # Override, as these systems have only a dummy fork() stub
18124       ac_cv_func_fork_works=no
18125       ;;
18126     *)
18127       ac_cv_func_fork_works=yes
18128       ;;
18129   esac
18130   { echo "$as_me:18130: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18131 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18132 fi
18133 ac_cv_func_vfork_works=$ac_cv_func_vfork
18134 if test "x$ac_cv_func_vfork" = xyes; then
18135   echo "$as_me:18135: checking for working vfork" >&5
18136 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18137 if test "${ac_cv_func_vfork_works+set}" = set; then
18138   echo $ECHO_N "(cached) $ECHO_C" >&6
18139 else
18140   if test "$cross_compiling" = yes; then
18141   ac_cv_func_vfork_works=cross
18142 else
18143   cat >conftest.$ac_ext <<_ACEOF
18144 #line 18144 "configure"
18145 #include "confdefs.h"
18146 /* Thanks to Paul Eggert for this test.  */
18147 #include <stdio.h>
18148 #include <sys/types.h>
18149 #include <sys/stat.h>
18150 #if HAVE_UNISTD_H
18151 # include <unistd.h>
18152 #endif
18153 #if HAVE_VFORK_H
18154 # include <vfork.h>
18155 #endif
18156 /* On some sparc systems, changes by the child to local and incoming
18157    argument registers are propagated back to the parent.  The compiler
18158    is told about this with #include <vfork.h>, but some compilers
18159    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18160    static variable whose address is put into a register that is
18161    clobbered by the vfork.  */
18162 static
18163 #ifdef __cplusplus
18164 sparc_address_test (int arg)
18165 # else
18166 sparc_address_test (arg) int arg;
18167 #endif
18168 {
18169   static pid_t child;
18170   if (!child) {
18171     child = vfork ();
18172     if (child < 0) {
18173       perror ("vfork");
18174       _exit(2);
18175     }
18176     if (!child) {
18177       arg = getpid();
18178       write(-1, "", 0);
18179       _exit (arg);
18180     }
18181   }
18182 }
18183
18184 int
18185 main ()
18186 {
18187   pid_t parent = getpid ();
18188   pid_t child;
18189
18190   sparc_address_test ();
18191
18192   child = vfork ();
18193
18194   if (child == 0) {
18195     /* Here is another test for sparc vfork register problems.  This
18196        test uses lots of local variables, at least as many local
18197        variables as main has allocated so far including compiler
18198        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18199        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18200        reuse the register of parent for one of the local variables,
18201        since it will think that parent can't possibly be used any more
18202        in this routine.  Assigning to the local variable will thus
18203        munge parent in the parent process.  */
18204     pid_t
18205       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18206       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18207     /* Convince the compiler that p..p7 are live; otherwise, it might
18208        use the same hardware register for all 8 local variables.  */
18209     if (p != p1 || p != p2 || p != p3 || p != p4
18210         || p != p5 || p != p6 || p != p7)
18211       _exit(1);
18212
18213     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18214        from child file descriptors.  If the child closes a descriptor
18215        before it execs or exits, this munges the parent's descriptor
18216        as well.  Test for this by closing stdout in the child.  */
18217     _exit(close(fileno(stdout)) != 0);
18218   } else {
18219     int status;
18220     struct stat st;
18221
18222     while (wait(&status) != child)
18223       ;
18224     $ac_main_return(
18225          /* Was there some problem with vforking?  */
18226          child < 0
18227
18228          /* Did the child fail?  (This shouldn't happen.)  */
18229          || status
18230
18231          /* Did the vfork/compiler bug occur?  */
18232          || parent != getpid()
18233
18234          /* Did the file descriptor bug occur?  */
18235          || fstat(fileno(stdout), &st) != 0
18236          );
18237   }
18238 }
18239 _ACEOF
18240 rm -f conftest$ac_exeext
18241 if { (eval echo "$as_me:18241: \"$ac_link\"") >&5
18242   (eval $ac_link) 2>&5
18243   ac_status=$?
18244   echo "$as_me:18244: \$? = $ac_status" >&5
18245   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18246   { (eval echo "$as_me:18246: \"$ac_try\"") >&5
18247   (eval $ac_try) 2>&5
18248   ac_status=$?
18249   echo "$as_me:18249: \$? = $ac_status" >&5
18250   (exit $ac_status); }; }; then
18251   ac_cv_func_vfork_works=yes
18252 else
18253   echo "$as_me: program exited with status $ac_status" >&5
18254 echo "$as_me: failed program was:" >&5
18255 cat conftest.$ac_ext >&5
18256 ac_cv_func_vfork_works=no
18257 fi
18258 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18259 fi
18260 fi
18261 echo "$as_me:18261: result: $ac_cv_func_vfork_works" >&5
18262 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18263
18264 fi;
18265 if test "x$ac_cv_func_fork_works" = xcross; then
18266   ac_cv_func_vfork_works=ac_cv_func_vfork
18267   { echo "$as_me:18267: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18268 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18269 fi
18270
18271 if test "x$ac_cv_func_vfork_works" = xyes; then
18272
18273 cat >>confdefs.h <<\EOF
18274 #define HAVE_WORKING_VFORK 1
18275 EOF
18276
18277 else
18278
18279 cat >>confdefs.h <<\EOF
18280 #define vfork fork
18281 EOF
18282
18283 fi
18284 if test "x$ac_cv_func_fork_works" = xyes; then
18285
18286 cat >>confdefs.h <<\EOF
18287 #define HAVE_WORKING_FORK 1
18288 EOF
18289
18290 fi
18291
18292 # special check for test/ditto.c
18293
18294 echo "$as_me:18294: checking for openpty in -lutil" >&5
18295 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18296 if test "${ac_cv_lib_util_openpty+set}" = set; then
18297   echo $ECHO_N "(cached) $ECHO_C" >&6
18298 else
18299   ac_check_lib_save_LIBS=$LIBS
18300 LIBS="-lutil  $LIBS"
18301 cat >conftest.$ac_ext <<_ACEOF
18302 #line 18302 "configure"
18303 #include "confdefs.h"
18304
18305 /* Override any gcc2 internal prototype to avoid an error.  */
18306 #ifdef __cplusplus
18307 extern "C"
18308 #endif
18309 /* We use char because int might match the return type of a gcc2
18310    builtin and then its argument prototype would still apply.  */
18311 char openpty ();
18312 int
18313 main ()
18314 {
18315 openpty ();
18316   ;
18317   return 0;
18318 }
18319 _ACEOF
18320 rm -f conftest.$ac_objext conftest$ac_exeext
18321 if { (eval echo "$as_me:18321: \"$ac_link\"") >&5
18322   (eval $ac_link) 2>&5
18323   ac_status=$?
18324   echo "$as_me:18324: \$? = $ac_status" >&5
18325   (exit $ac_status); } &&
18326          { ac_try='test -s conftest$ac_exeext'
18327   { (eval echo "$as_me:18327: \"$ac_try\"") >&5
18328   (eval $ac_try) 2>&5
18329   ac_status=$?
18330   echo "$as_me:18330: \$? = $ac_status" >&5
18331   (exit $ac_status); }; }; then
18332   ac_cv_lib_util_openpty=yes
18333 else
18334   echo "$as_me: failed program was:" >&5
18335 cat conftest.$ac_ext >&5
18336 ac_cv_lib_util_openpty=no
18337 fi
18338 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18339 LIBS=$ac_check_lib_save_LIBS
18340 fi
18341 echo "$as_me:18341: result: $ac_cv_lib_util_openpty" >&5
18342 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18343 if test $ac_cv_lib_util_openpty = yes; then
18344   cf_cv_lib_util=yes
18345 else
18346   cf_cv_lib_util=no
18347 fi
18348
18349 echo "$as_me:18349: checking for openpty header" >&5
18350 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18351 if test "${cf_cv_func_openpty+set}" = set; then
18352   echo $ECHO_N "(cached) $ECHO_C" >&6
18353 else
18354
18355     cf_save_LIBS="$LIBS"
18356     test $cf_cv_lib_util = yes &&
18357 cf_add_libs="-lutil"
18358 # Filter out duplicates - this happens with badly-designed ".pc" files...
18359 for cf_add_1lib in $LIBS
18360 do
18361         for cf_add_2lib in $cf_add_libs
18362         do
18363                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18364                 then
18365                         cf_add_1lib=
18366                         break
18367                 fi
18368         done
18369         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18370 done
18371 LIBS="$cf_add_libs"
18372
18373     for cf_header in pty.h libutil.h util.h
18374     do
18375     cat >conftest.$ac_ext <<_ACEOF
18376 #line 18376 "configure"
18377 #include "confdefs.h"
18378
18379 #include <$cf_header>
18380
18381 int
18382 main ()
18383 {
18384
18385     int x = openpty((int *)0, (int *)0, (char *)0,
18386                    (struct termios *)0, (struct winsize *)0);
18387
18388   ;
18389   return 0;
18390 }
18391 _ACEOF
18392 rm -f conftest.$ac_objext conftest$ac_exeext
18393 if { (eval echo "$as_me:18393: \"$ac_link\"") >&5
18394   (eval $ac_link) 2>&5
18395   ac_status=$?
18396   echo "$as_me:18396: \$? = $ac_status" >&5
18397   (exit $ac_status); } &&
18398          { ac_try='test -s conftest$ac_exeext'
18399   { (eval echo "$as_me:18399: \"$ac_try\"") >&5
18400   (eval $ac_try) 2>&5
18401   ac_status=$?
18402   echo "$as_me:18402: \$? = $ac_status" >&5
18403   (exit $ac_status); }; }; then
18404
18405         cf_cv_func_openpty=$cf_header
18406         break
18407
18408 else
18409   echo "$as_me: failed program was:" >&5
18410 cat conftest.$ac_ext >&5
18411
18412         cf_cv_func_openpty=no
18413
18414 fi
18415 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18416     done
18417     LIBS="$cf_save_LIBS"
18418
18419 fi
18420 echo "$as_me:18420: result: $cf_cv_func_openpty" >&5
18421 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18422
18423 if test "$cf_cv_func_openpty" != no ; then
18424
18425 cat >>confdefs.h <<EOF
18426 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18427 EOF
18428
18429 cat >>confdefs.h <<\EOF
18430 #define USE_XTERM_PTY 1
18431 EOF
18432
18433     if test "x$cf_cv_lib_util" = xyes ; then
18434
18435 cf_add_libs="-lutil"
18436 # Filter out duplicates - this happens with badly-designed ".pc" files...
18437 for cf_add_1lib in $TEST_LIBS
18438 do
18439         for cf_add_2lib in $cf_add_libs
18440         do
18441                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18442                 then
18443                         cf_add_1lib=
18444                         break
18445                 fi
18446         done
18447         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18448 done
18449 TEST_LIBS="$cf_add_libs"
18450
18451     fi
18452 fi
18453
18454 if test "$with_hashed_db" != no ; then
18455
18456 cat >>confdefs.h <<\EOF
18457 #define USE_HASHED_DB 1
18458 EOF
18459
18460 case $with_hashed_db in #(vi
18461 yes|*able*) #(vi
18462     ;;
18463 *)
18464     if test -d "$with_hashed_db" ; then
18465
18466 if test -n "$with_hashed_db/include" ; then
18467   for cf_add_incdir in $with_hashed_db/include
18468   do
18469         while test $cf_add_incdir != /usr/include
18470         do
18471           if test -d $cf_add_incdir
18472           then
18473                 cf_have_incdir=no
18474                 if test -n "$CFLAGS$CPPFLAGS" ; then
18475                   # a loop is needed to ensure we can add subdirs of existing dirs
18476                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18477                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18478                           cf_have_incdir=yes; break
18479                         fi
18480                   done
18481                 fi
18482
18483                 if test "$cf_have_incdir" = no ; then
18484                   if test "$cf_add_incdir" = /usr/local/include ; then
18485                         if test "$GCC" = yes
18486                         then
18487                           cf_save_CPPFLAGS=$CPPFLAGS
18488                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18489                           cat >conftest.$ac_ext <<_ACEOF
18490 #line 18490 "configure"
18491 #include "confdefs.h"
18492 #include <stdio.h>
18493 int
18494 main ()
18495 {
18496 printf("Hello")
18497   ;
18498   return 0;
18499 }
18500 _ACEOF
18501 rm -f conftest.$ac_objext
18502 if { (eval echo "$as_me:18502: \"$ac_compile\"") >&5
18503   (eval $ac_compile) 2>&5
18504   ac_status=$?
18505   echo "$as_me:18505: \$? = $ac_status" >&5
18506   (exit $ac_status); } &&
18507          { ac_try='test -s conftest.$ac_objext'
18508   { (eval echo "$as_me:18508: \"$ac_try\"") >&5
18509   (eval $ac_try) 2>&5
18510   ac_status=$?
18511   echo "$as_me:18511: \$? = $ac_status" >&5
18512   (exit $ac_status); }; }; then
18513   :
18514 else
18515   echo "$as_me: failed program was:" >&5
18516 cat conftest.$ac_ext >&5
18517 cf_have_incdir=yes
18518 fi
18519 rm -f conftest.$ac_objext conftest.$ac_ext
18520                           CPPFLAGS=$cf_save_CPPFLAGS
18521                         fi
18522                   fi
18523                 fi
18524
18525                 if test "$cf_have_incdir" = no ; then
18526                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18527
18528 echo "${as_me:-configure}:18528: testing adding $cf_add_incdir to include-path ..." 1>&5
18529
18530                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18531
18532                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18533                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18534                   cf_add_incdir="$cf_top_incdir"
18535                 else
18536                   break
18537                 fi
18538           fi
18539         done
18540   done
18541 fi
18542
18543 if test -n "$with_hashed_db/lib" ; then
18544   for cf_add_libdir in $with_hashed_db/lib
18545   do
18546     if test $cf_add_libdir = /usr/lib ; then
18547       :
18548     elif test -d $cf_add_libdir
18549     then
18550       cf_have_libdir=no
18551       if test -n "$LDFLAGS$LIBS" ; then
18552         # a loop is needed to ensure we can add subdirs of existing dirs
18553         for cf_test_libdir in $LDFLAGS $LIBS ; do
18554           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18555             cf_have_libdir=yes; break
18556           fi
18557         done
18558       fi
18559       if test "$cf_have_libdir" = no ; then
18560         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18561
18562 echo "${as_me:-configure}:18562: testing adding $cf_add_libdir to library-path ..." 1>&5
18563
18564         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18565       fi
18566     fi
18567   done
18568 fi
18569
18570         else
18571                 case "$with_hashed_db" in #(vi
18572                 ./*|../*|/*)
18573                         { echo "$as_me:18573: WARNING: no such directory $with_hashed_db" >&5
18574 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18575                         ;; #(vi
18576                 *)
18577
18578 cf_search=
18579
18580 test "x$prefix" != "xNONE" && \
18581 test -d "$prefix" && \
18582  {
18583         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18584         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18585         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18586         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18587         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18588         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18589 }
18590
18591 for cf_subdir_prefix in \
18592         /usr \
18593         /usr/local \
18594         /usr/pkg \
18595         /opt \
18596         /opt/local \
18597         $HOME
18598 do
18599
18600 test "x$cf_subdir_prefix" != "x$prefix" && \
18601 test -d "$cf_subdir_prefix" && \
18602 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18603         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
18604         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
18605         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
18606         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
18607         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
18608         test -d $cf_subdir_prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include/$with_hashed_db"
18609 }
18610
18611 done
18612
18613         for cf_item in $cf_search
18614         do
18615                 case $cf_item in #(vi
18616                 */$with_hashed_db)
18617
18618 if test -n "$cf_item" ; then
18619   for cf_add_incdir in $cf_item
18620   do
18621         while test $cf_add_incdir != /usr/include
18622         do
18623           if test -d $cf_add_incdir
18624           then
18625                 cf_have_incdir=no
18626                 if test -n "$CFLAGS$CPPFLAGS" ; then
18627                   # a loop is needed to ensure we can add subdirs of existing dirs
18628                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18629                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18630                           cf_have_incdir=yes; break
18631                         fi
18632                   done
18633                 fi
18634
18635                 if test "$cf_have_incdir" = no ; then
18636                   if test "$cf_add_incdir" = /usr/local/include ; then
18637                         if test "$GCC" = yes
18638                         then
18639                           cf_save_CPPFLAGS=$CPPFLAGS
18640                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18641                           cat >conftest.$ac_ext <<_ACEOF
18642 #line 18642 "configure"
18643 #include "confdefs.h"
18644 #include <stdio.h>
18645 int
18646 main ()
18647 {
18648 printf("Hello")
18649   ;
18650   return 0;
18651 }
18652 _ACEOF
18653 rm -f conftest.$ac_objext
18654 if { (eval echo "$as_me:18654: \"$ac_compile\"") >&5
18655   (eval $ac_compile) 2>&5
18656   ac_status=$?
18657   echo "$as_me:18657: \$? = $ac_status" >&5
18658   (exit $ac_status); } &&
18659          { ac_try='test -s conftest.$ac_objext'
18660   { (eval echo "$as_me:18660: \"$ac_try\"") >&5
18661   (eval $ac_try) 2>&5
18662   ac_status=$?
18663   echo "$as_me:18663: \$? = $ac_status" >&5
18664   (exit $ac_status); }; }; then
18665   :
18666 else
18667   echo "$as_me: failed program was:" >&5
18668 cat conftest.$ac_ext >&5
18669 cf_have_incdir=yes
18670 fi
18671 rm -f conftest.$ac_objext conftest.$ac_ext
18672                           CPPFLAGS=$cf_save_CPPFLAGS
18673                         fi
18674                   fi
18675                 fi
18676
18677                 if test "$cf_have_incdir" = no ; then
18678                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18679
18680 echo "${as_me:-configure}:18680: testing adding $cf_add_incdir to include-path ..." 1>&5
18681
18682                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18683
18684                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18685                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18686                   cf_add_incdir="$cf_top_incdir"
18687                 else
18688                   break
18689                 fi
18690           fi
18691         done
18692   done
18693 fi
18694
18695                         ;;
18696                 esac
18697         done
18698
18699 cf_search=
18700
18701 test "x$prefix" != "xNONE" && \
18702 test -d "$prefix" && \
18703  {
18704         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18705         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18706         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18707         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18708         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18709         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18710 }
18711
18712 for cf_subdir_prefix in \
18713         /usr \
18714         /usr/local \
18715         /usr/pkg \
18716         /opt \
18717         /opt/local \
18718         $HOME
18719 do
18720
18721 test "x$cf_subdir_prefix" != "x$prefix" && \
18722 test -d "$cf_subdir_prefix" && \
18723 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18724         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
18725         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
18726         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
18727         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
18728         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
18729         test -d $cf_subdir_prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib/$with_hashed_db"
18730 }
18731
18732 done
18733
18734         for cf_item in $cf_search
18735         do
18736                 case $cf_item in #(vi
18737                 */$with_hashed_db)
18738
18739 if test -n "$cf_item" ; then
18740   for cf_add_libdir in $cf_item
18741   do
18742     if test $cf_add_libdir = /usr/lib ; then
18743       :
18744     elif test -d $cf_add_libdir
18745     then
18746       cf_have_libdir=no
18747       if test -n "$LDFLAGS$LIBS" ; then
18748         # a loop is needed to ensure we can add subdirs of existing dirs
18749         for cf_test_libdir in $LDFLAGS $LIBS ; do
18750           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18751             cf_have_libdir=yes; break
18752           fi
18753         done
18754       fi
18755       if test "$cf_have_libdir" = no ; then
18756         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18757
18758 echo "${as_me:-configure}:18758: testing adding $cf_add_libdir to library-path ..." 1>&5
18759
18760         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18761       fi
18762     fi
18763   done
18764 fi
18765
18766                         ;;
18767                 esac
18768         done
18769
18770                         ;;
18771                 esac
18772     fi
18773 esac
18774
18775 echo "$as_me:18775: checking for db.h" >&5
18776 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18777 if test "${ac_cv_header_db_h+set}" = set; then
18778   echo $ECHO_N "(cached) $ECHO_C" >&6
18779 else
18780   cat >conftest.$ac_ext <<_ACEOF
18781 #line 18781 "configure"
18782 #include "confdefs.h"
18783 #include <db.h>
18784 _ACEOF
18785 if { (eval echo "$as_me:18785: \"$ac_cpp conftest.$ac_ext\"") >&5
18786   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18787   ac_status=$?
18788   egrep -v '^ *\+' conftest.er1 >conftest.err
18789   rm -f conftest.er1
18790   cat conftest.err >&5
18791   echo "$as_me:18791: \$? = $ac_status" >&5
18792   (exit $ac_status); } >/dev/null; then
18793   if test -s conftest.err; then
18794     ac_cpp_err=$ac_c_preproc_warn_flag
18795   else
18796     ac_cpp_err=
18797   fi
18798 else
18799   ac_cpp_err=yes
18800 fi
18801 if test -z "$ac_cpp_err"; then
18802   ac_cv_header_db_h=yes
18803 else
18804   echo "$as_me: failed program was:" >&5
18805   cat conftest.$ac_ext >&5
18806   ac_cv_header_db_h=no
18807 fi
18808 rm -f conftest.err conftest.$ac_ext
18809 fi
18810 echo "$as_me:18810: result: $ac_cv_header_db_h" >&5
18811 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18812 if test $ac_cv_header_db_h = yes; then
18813
18814 echo "$as_me:18814: checking for version of db" >&5
18815 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18816 if test "${cf_cv_hashed_db_version+set}" = set; then
18817   echo $ECHO_N "(cached) $ECHO_C" >&6
18818 else
18819
18820 cf_cv_hashed_db_version=unknown
18821
18822 for cf_db_version in 1 2 3 4 5 6
18823 do
18824
18825 echo "${as_me:-configure}:18825: testing checking for db version $cf_db_version ..." 1>&5
18826
18827         cat >conftest.$ac_ext <<_ACEOF
18828 #line 18828 "configure"
18829 #include "confdefs.h"
18830
18831 $ac_includes_default
18832 #include <db.h>
18833
18834 #ifdef DB_VERSION_MAJOR
18835         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18836 #if $cf_db_version == DB_VERSION_MAJOR
18837         /* ok */
18838 #else
18839         make an error
18840 #endif
18841 #else
18842 #if $cf_db_version == 1
18843         /* ok: assuming this is DB 1.8.5 */
18844 #else
18845         make an error
18846 #endif
18847 #endif
18848
18849 int
18850 main ()
18851 {
18852 DBT *foo = 0
18853   ;
18854   return 0;
18855 }
18856 _ACEOF
18857 rm -f conftest.$ac_objext
18858 if { (eval echo "$as_me:18858: \"$ac_compile\"") >&5
18859   (eval $ac_compile) 2>&5
18860   ac_status=$?
18861   echo "$as_me:18861: \$? = $ac_status" >&5
18862   (exit $ac_status); } &&
18863          { ac_try='test -s conftest.$ac_objext'
18864   { (eval echo "$as_me:18864: \"$ac_try\"") >&5
18865   (eval $ac_try) 2>&5
18866   ac_status=$?
18867   echo "$as_me:18867: \$? = $ac_status" >&5
18868   (exit $ac_status); }; }; then
18869
18870         cf_cv_hashed_db_version=$cf_db_version
18871         break
18872
18873 else
18874   echo "$as_me: failed program was:" >&5
18875 cat conftest.$ac_ext >&5
18876 fi
18877 rm -f conftest.$ac_objext conftest.$ac_ext
18878 done
18879
18880 fi
18881 echo "$as_me:18881: result: $cf_cv_hashed_db_version" >&5
18882 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
18883
18884 if test "$cf_cv_hashed_db_version" = unknown ; then
18885         { { echo "$as_me:18885: error: Cannot determine version of db" >&5
18886 echo "$as_me: error: Cannot determine version of db" >&2;}
18887    { (exit 1); exit 1; }; }
18888 else
18889
18890 echo "$as_me:18890: checking for db libraries" >&5
18891 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
18892 if test "${cf_cv_hashed_db_libs+set}" = set; then
18893   echo $ECHO_N "(cached) $ECHO_C" >&6
18894 else
18895
18896 cf_cv_hashed_db_libs=unknown
18897 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
18898 do
18899         cf_save_libs="$LIBS"
18900         if test -n "$cf_db_libs"; then
18901
18902 cf_add_libs="-l$cf_db_libs"
18903 # Filter out duplicates - this happens with badly-designed ".pc" files...
18904 for cf_add_1lib in $LIBS
18905 do
18906         for cf_add_2lib in $cf_add_libs
18907         do
18908                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18909                 then
18910                         cf_add_1lib=
18911                         break
18912                 fi
18913         done
18914         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18915 done
18916 LIBS="$cf_add_libs"
18917
18918         fi
18919
18920 echo "${as_me:-configure}:18920: testing checking for library "$cf_db_libs" ..." 1>&5
18921
18922         cat >conftest.$ac_ext <<_ACEOF
18923 #line 18923 "configure"
18924 #include "confdefs.h"
18925
18926 $ac_includes_default
18927 #include <db.h>
18928
18929 int
18930 main ()
18931 {
18932
18933         char *path = "/tmp/foo";
18934 #ifdef DB_VERSION_MAJOR
18935 #if DB_VERSION_MAJOR >= 4
18936         DB *result = 0;
18937         db_create(&result, NULL, 0);
18938         result->open(result,
18939                 NULL,
18940                 path,
18941                 path,
18942                 DB_HASH,
18943                 DB_CREATE,
18944                 0644);
18945 #elif DB_VERSION_MAJOR >= 3
18946         DB *result = 0;
18947         db_create(&result, NULL, 0);
18948         result->open(result,
18949                 path,
18950                 path,
18951                 DB_HASH,
18952                 DB_CREATE,
18953                 0644);
18954 #elif DB_VERSION_MAJOR >= 2
18955         DB *result = 0;
18956         db_open(path,
18957                 DB_HASH,
18958                 DB_CREATE,
18959                 0644,
18960                 (DB_ENV *) 0,
18961                 (DB_INFO *) 0,
18962                 &result);
18963 #endif /* DB_VERSION_MAJOR */
18964 #else
18965         DB *result = dbopen(path,
18966                      2,
18967                      0644,
18968                      DB_HASH,
18969                      0);
18970 #endif
18971         ${cf_cv_main_return:-return}(result != 0)
18972
18973   ;
18974   return 0;
18975 }
18976 _ACEOF
18977 rm -f conftest.$ac_objext conftest$ac_exeext
18978 if { (eval echo "$as_me:18978: \"$ac_link\"") >&5
18979   (eval $ac_link) 2>&5
18980   ac_status=$?
18981   echo "$as_me:18981: \$? = $ac_status" >&5
18982   (exit $ac_status); } &&
18983          { ac_try='test -s conftest$ac_exeext'
18984   { (eval echo "$as_me:18984: \"$ac_try\"") >&5
18985   (eval $ac_try) 2>&5
18986   ac_status=$?
18987   echo "$as_me:18987: \$? = $ac_status" >&5
18988   (exit $ac_status); }; }; then
18989
18990         if test -n "$cf_db_libs" ; then
18991                 cf_cv_hashed_db_libs=$cf_db_libs
18992         else
18993                 cf_cv_hashed_db_libs=default
18994         fi
18995         LIBS="$cf_save_libs"
18996         break
18997
18998 else
18999   echo "$as_me: failed program was:" >&5
19000 cat conftest.$ac_ext >&5
19001 fi
19002 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19003         LIBS="$cf_save_libs"
19004 done
19005
19006 fi
19007 echo "$as_me:19007: result: $cf_cv_hashed_db_libs" >&5
19008 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19009
19010         if test "$cf_cv_hashed_db_libs" = unknown ; then
19011                 { { echo "$as_me:19011: error: Cannot determine library for db" >&5
19012 echo "$as_me: error: Cannot determine library for db" >&2;}
19013    { (exit 1); exit 1; }; }
19014         elif test "$cf_cv_hashed_db_libs" != default ; then
19015
19016 cf_add_libs="-l$cf_cv_hashed_db_libs"
19017 # Filter out duplicates - this happens with badly-designed ".pc" files...
19018 for cf_add_1lib in $LIBS
19019 do
19020         for cf_add_2lib in $cf_add_libs
19021         do
19022                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19023                 then
19024                         cf_add_1lib=
19025                         break
19026                 fi
19027         done
19028         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19029 done
19030 LIBS="$cf_add_libs"
19031
19032         fi
19033 fi
19034
19035 else
19036
19037         { { echo "$as_me:19037: error: Cannot find db.h" >&5
19038 echo "$as_me: error: Cannot find db.h" >&2;}
19039    { (exit 1); exit 1; }; }
19040
19041 fi
19042
19043 fi
19044
19045 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19046         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19047         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19048 fi
19049
19050 # Just in case, check if the C compiler has a bool type.
19051
19052 echo "$as_me:19052: checking if we should include stdbool.h" >&5
19053 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19054
19055 if test "${cf_cv_header_stdbool_h+set}" = set; then
19056   echo $ECHO_N "(cached) $ECHO_C" >&6
19057 else
19058
19059         cat >conftest.$ac_ext <<_ACEOF
19060 #line 19060 "configure"
19061 #include "confdefs.h"
19062
19063 int
19064 main ()
19065 {
19066 bool foo = false
19067   ;
19068   return 0;
19069 }
19070 _ACEOF
19071 rm -f conftest.$ac_objext
19072 if { (eval echo "$as_me:19072: \"$ac_compile\"") >&5
19073   (eval $ac_compile) 2>&5
19074   ac_status=$?
19075   echo "$as_me:19075: \$? = $ac_status" >&5
19076   (exit $ac_status); } &&
19077          { ac_try='test -s conftest.$ac_objext'
19078   { (eval echo "$as_me:19078: \"$ac_try\"") >&5
19079   (eval $ac_try) 2>&5
19080   ac_status=$?
19081   echo "$as_me:19081: \$? = $ac_status" >&5
19082   (exit $ac_status); }; }; then
19083   cf_cv_header_stdbool_h=0
19084 else
19085   echo "$as_me: failed program was:" >&5
19086 cat conftest.$ac_ext >&5
19087 cat >conftest.$ac_ext <<_ACEOF
19088 #line 19088 "configure"
19089 #include "confdefs.h"
19090
19091 #ifndef __BEOS__
19092 #include <stdbool.h>
19093 #endif
19094
19095 int
19096 main ()
19097 {
19098 bool foo = false
19099   ;
19100   return 0;
19101 }
19102 _ACEOF
19103 rm -f conftest.$ac_objext
19104 if { (eval echo "$as_me:19104: \"$ac_compile\"") >&5
19105   (eval $ac_compile) 2>&5
19106   ac_status=$?
19107   echo "$as_me:19107: \$? = $ac_status" >&5
19108   (exit $ac_status); } &&
19109          { ac_try='test -s conftest.$ac_objext'
19110   { (eval echo "$as_me:19110: \"$ac_try\"") >&5
19111   (eval $ac_try) 2>&5
19112   ac_status=$?
19113   echo "$as_me:19113: \$? = $ac_status" >&5
19114   (exit $ac_status); }; }; then
19115   cf_cv_header_stdbool_h=1
19116 else
19117   echo "$as_me: failed program was:" >&5
19118 cat conftest.$ac_ext >&5
19119 cf_cv_header_stdbool_h=0
19120 fi
19121 rm -f conftest.$ac_objext conftest.$ac_ext
19122 fi
19123 rm -f conftest.$ac_objext conftest.$ac_ext
19124 fi
19125
19126 if test "$cf_cv_header_stdbool_h" = 1
19127 then    echo "$as_me:19127: result: yes" >&5
19128 echo "${ECHO_T}yes" >&6
19129 else    echo "$as_me:19129: result: no" >&5
19130 echo "${ECHO_T}no" >&6
19131 fi
19132
19133 echo "$as_me:19133: checking for builtin bool type" >&5
19134 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19135
19136 if test "${cf_cv_cc_bool_type+set}" = set; then
19137   echo $ECHO_N "(cached) $ECHO_C" >&6
19138 else
19139
19140         cat >conftest.$ac_ext <<_ACEOF
19141 #line 19141 "configure"
19142 #include "confdefs.h"
19143
19144 #include <stdio.h>
19145 #include <sys/types.h>
19146
19147 int
19148 main ()
19149 {
19150 bool x = false
19151   ;
19152   return 0;
19153 }
19154 _ACEOF
19155 rm -f conftest.$ac_objext
19156 if { (eval echo "$as_me:19156: \"$ac_compile\"") >&5
19157   (eval $ac_compile) 2>&5
19158   ac_status=$?
19159   echo "$as_me:19159: \$? = $ac_status" >&5
19160   (exit $ac_status); } &&
19161          { ac_try='test -s conftest.$ac_objext'
19162   { (eval echo "$as_me:19162: \"$ac_try\"") >&5
19163   (eval $ac_try) 2>&5
19164   ac_status=$?
19165   echo "$as_me:19165: \$? = $ac_status" >&5
19166   (exit $ac_status); }; }; then
19167   cf_cv_cc_bool_type=1
19168 else
19169   echo "$as_me: failed program was:" >&5
19170 cat conftest.$ac_ext >&5
19171 cf_cv_cc_bool_type=0
19172 fi
19173 rm -f conftest.$ac_objext conftest.$ac_ext
19174
19175 fi
19176
19177 if test "$cf_cv_cc_bool_type" = 1
19178 then    echo "$as_me:19178: result: yes" >&5
19179 echo "${ECHO_T}yes" >&6
19180 else    echo "$as_me:19180: result: no" >&5
19181 echo "${ECHO_T}no" >&6
19182 fi
19183
19184 # Check for C++ compiler characteristics (and ensure that it's there!)
19185 if test -n "$CXX" ; then
19186         ac_ext=cc
19187 ac_cpp='$CXXCPP $CPPFLAGS'
19188 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19189 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19190 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19191 ac_main_return=return
19192
19193 if test -n "$GXX" ; then
19194 case $cf_cv_system_name in #(vi
19195 os2*) #(vi
19196         cf_stdcpp_libname=stdcpp
19197         ;;
19198 *)
19199         cf_stdcpp_libname=stdc++
19200         ;;
19201 esac
19202 echo "$as_me:19202: checking for library $cf_stdcpp_libname" >&5
19203 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19204 if test "${cf_cv_libstdcpp+set}" = set; then
19205   echo $ECHO_N "(cached) $ECHO_C" >&6
19206 else
19207
19208         cf_save="$LIBS"
19209
19210 cf_add_libs="-l$cf_stdcpp_libname"
19211 # Filter out duplicates - this happens with badly-designed ".pc" files...
19212 for cf_add_1lib in $LIBS
19213 do
19214         for cf_add_2lib in $cf_add_libs
19215         do
19216                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19217                 then
19218                         cf_add_1lib=
19219                         break
19220                 fi
19221         done
19222         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19223 done
19224 LIBS="$cf_add_libs"
19225
19226 cat >conftest.$ac_ext <<_ACEOF
19227 #line 19227 "configure"
19228 #include "confdefs.h"
19229
19230 #include <strstream.h>
19231 int
19232 main ()
19233 {
19234
19235 char buf[80];
19236 strstreambuf foo(buf, sizeof(buf))
19237
19238   ;
19239   return 0;
19240 }
19241 _ACEOF
19242 rm -f conftest.$ac_objext 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); } &&
19248          { ac_try='test -s conftest$ac_exeext'
19249   { (eval echo "$as_me:19249: \"$ac_try\"") >&5
19250   (eval $ac_try) 2>&5
19251   ac_status=$?
19252   echo "$as_me:19252: \$? = $ac_status" >&5
19253   (exit $ac_status); }; }; then
19254   cf_cv_libstdcpp=yes
19255 else
19256   echo "$as_me: failed program was:" >&5
19257 cat conftest.$ac_ext >&5
19258 cf_cv_libstdcpp=no
19259 fi
19260 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19261         LIBS="$cf_save"
19262
19263 fi
19264 echo "$as_me:19264: result: $cf_cv_libstdcpp" >&5
19265 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19266 test "$cf_cv_libstdcpp" = yes &&
19267 cf_add_libs="-l$cf_stdcpp_libname"
19268 # Filter out duplicates - this happens with badly-designed ".pc" files...
19269 for cf_add_1lib in $CXXLIBS
19270 do
19271         for cf_add_2lib in $cf_add_libs
19272         do
19273                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19274                 then
19275                         cf_add_1lib=
19276                         break
19277                 fi
19278         done
19279         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19280 done
19281 CXXLIBS="$cf_add_libs"
19282
19283 fi
19284
19285         echo "$as_me:19285: checking whether $CXX understands -c and -o together" >&5
19286 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19287 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19288   echo $ECHO_N "(cached) $ECHO_C" >&6
19289 else
19290
19291 cat > conftest.$ac_ext <<CF_EOF
19292 #include <stdio.h>
19293 int main()
19294 {
19295         ${cf_cv_main_return:-return}(0);
19296 }
19297 CF_EOF
19298 # We do the test twice because some compilers refuse to overwrite an
19299 # existing .o file with -o, though they will create one.
19300 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19301 if { (eval echo "$as_me:19301: \"$ac_try\"") >&5
19302   (eval $ac_try) 2>&5
19303   ac_status=$?
19304   echo "$as_me:19304: \$? = $ac_status" >&5
19305   (exit $ac_status); } &&
19306   test -f conftest2.$ac_objext && { (eval echo "$as_me:19306: \"$ac_try\"") >&5
19307   (eval $ac_try) 2>&5
19308   ac_status=$?
19309   echo "$as_me:19309: \$? = $ac_status" >&5
19310   (exit $ac_status); };
19311 then
19312   eval cf_cv_prog_CXX_c_o=yes
19313 else
19314   eval cf_cv_prog_CXX_c_o=no
19315 fi
19316 rm -rf conftest*
19317
19318 fi
19319 if test $cf_cv_prog_CXX_c_o = yes; then
19320   echo "$as_me:19320: result: yes" >&5
19321 echo "${ECHO_T}yes" >&6
19322 else
19323   echo "$as_me:19323: result: no" >&5
19324 echo "${ECHO_T}no" >&6
19325 fi
19326
19327         case $GXX_VERSION in
19328         1*|2.0-6*)
19329                 cf_cxx_library=yes
19330                 ;;
19331         *-2.7*|2.7*)
19332
19333 cf_cxx_library=unknown
19334 case $cf_cv_system_name in #(vi
19335 os2*) #(vi
19336         cf_gpp_libname=gpp
19337         ;;
19338 *)
19339         cf_gpp_libname=g++
19340         ;;
19341 esac
19342 if test "$GXX" = yes; then
19343         echo "$as_me:19343: checking for lib$cf_gpp_libname" >&5
19344 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19345         cf_save="$LIBS"
19346
19347 cf_add_libs="-l$cf_gpp_libname"
19348 # Filter out duplicates - this happens with badly-designed ".pc" files...
19349 for cf_add_1lib in $LIBS
19350 do
19351         for cf_add_2lib in $cf_add_libs
19352         do
19353                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19354                 then
19355                         cf_add_1lib=
19356                         break
19357                 fi
19358         done
19359         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19360 done
19361 LIBS="$cf_add_libs"
19362
19363         cat >conftest.$ac_ext <<_ACEOF
19364 #line 19364 "configure"
19365 #include "confdefs.h"
19366
19367 #include <$cf_gpp_libname/builtin.h>
19368
19369 int
19370 main ()
19371 {
19372 two_arg_error_handler_t foo2 = lib_error_handler
19373   ;
19374   return 0;
19375 }
19376 _ACEOF
19377 rm -f conftest.$ac_objext conftest$ac_exeext
19378 if { (eval echo "$as_me:19378: \"$ac_link\"") >&5
19379   (eval $ac_link) 2>&5
19380   ac_status=$?
19381   echo "$as_me:19381: \$? = $ac_status" >&5
19382   (exit $ac_status); } &&
19383          { ac_try='test -s conftest$ac_exeext'
19384   { (eval echo "$as_me:19384: \"$ac_try\"") >&5
19385   (eval $ac_try) 2>&5
19386   ac_status=$?
19387   echo "$as_me:19387: \$? = $ac_status" >&5
19388   (exit $ac_status); }; }; then
19389   cf_cxx_library=yes
19390
19391 cf_add_libs="-l$cf_gpp_libname"
19392 # Filter out duplicates - this happens with badly-designed ".pc" files...
19393 for cf_add_1lib in $CXXLIBS
19394 do
19395         for cf_add_2lib in $cf_add_libs
19396         do
19397                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19398                 then
19399                         cf_add_1lib=
19400                         break
19401                 fi
19402         done
19403         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19404 done
19405 CXXLIBS="$cf_add_libs"
19406
19407          if test "$cf_gpp_libname" = cpp ; then
19408
19409 cat >>confdefs.h <<\EOF
19410 #define HAVE_GPP_BUILTIN_H 1
19411 EOF
19412
19413          else
19414
19415 cat >>confdefs.h <<\EOF
19416 #define HAVE_GXX_BUILTIN_H 1
19417 EOF
19418
19419          fi
19420 else
19421   echo "$as_me: failed program was:" >&5
19422 cat conftest.$ac_ext >&5
19423 cat >conftest.$ac_ext <<_ACEOF
19424 #line 19424 "configure"
19425 #include "confdefs.h"
19426
19427 #include <builtin.h>
19428
19429 int
19430 main ()
19431 {
19432 two_arg_error_handler_t foo2 = lib_error_handler
19433   ;
19434   return 0;
19435 }
19436 _ACEOF
19437 rm -f conftest.$ac_objext conftest$ac_exeext
19438 if { (eval echo "$as_me:19438: \"$ac_link\"") >&5
19439   (eval $ac_link) 2>&5
19440   ac_status=$?
19441   echo "$as_me:19441: \$? = $ac_status" >&5
19442   (exit $ac_status); } &&
19443          { ac_try='test -s conftest$ac_exeext'
19444   { (eval echo "$as_me:19444: \"$ac_try\"") >&5
19445   (eval $ac_try) 2>&5
19446   ac_status=$?
19447   echo "$as_me:19447: \$? = $ac_status" >&5
19448   (exit $ac_status); }; }; then
19449   cf_cxx_library=yes
19450
19451 cf_add_libs="-l$cf_gpp_libname"
19452 # Filter out duplicates - this happens with badly-designed ".pc" files...
19453 for cf_add_1lib in $CXXLIBS
19454 do
19455         for cf_add_2lib in $cf_add_libs
19456         do
19457                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19458                 then
19459                         cf_add_1lib=
19460                         break
19461                 fi
19462         done
19463         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19464 done
19465 CXXLIBS="$cf_add_libs"
19466
19467 cat >>confdefs.h <<\EOF
19468 #define HAVE_BUILTIN_H 1
19469 EOF
19470
19471 else
19472   echo "$as_me: failed program was:" >&5
19473 cat conftest.$ac_ext >&5
19474 cf_cxx_library=no
19475 fi
19476 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19477 fi
19478 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19479         LIBS="$cf_save"
19480         echo "$as_me:19480: result: $cf_cxx_library" >&5
19481 echo "${ECHO_T}$cf_cxx_library" >&6
19482 fi
19483
19484                 ;;
19485         *)
19486                 cf_cxx_library=no
19487                 ;;
19488         esac
19489
19490         ac_ext=cc
19491 ac_cpp='$CXXCPP $CPPFLAGS'
19492 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19493 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19494 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19495 ac_main_return=return
19496 echo "$as_me:19496: checking how to run the C++ preprocessor" >&5
19497 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19498 if test -z "$CXXCPP"; then
19499   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19500   echo $ECHO_N "(cached) $ECHO_C" >&6
19501 else
19502       # Double quotes because CXXCPP needs to be expanded
19503     for CXXCPP in "$CXX -E" "/lib/cpp"
19504     do
19505       ac_preproc_ok=false
19506 for ac_cxx_preproc_warn_flag in '' yes
19507 do
19508   # Use a header file that comes with gcc, so configuring glibc
19509   # with a fresh cross-compiler works.
19510   # On the NeXT, cc -E runs the code through the compiler's parser,
19511   # not just through cpp. "Syntax error" is here to catch this case.
19512   cat >conftest.$ac_ext <<_ACEOF
19513 #line 19513 "configure"
19514 #include "confdefs.h"
19515 #include <assert.h>
19516                      Syntax error
19517 _ACEOF
19518 if { (eval echo "$as_me:19518: \"$ac_cpp conftest.$ac_ext\"") >&5
19519   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19520   ac_status=$?
19521   egrep -v '^ *\+' conftest.er1 >conftest.err
19522   rm -f conftest.er1
19523   cat conftest.err >&5
19524   echo "$as_me:19524: \$? = $ac_status" >&5
19525   (exit $ac_status); } >/dev/null; then
19526   if test -s conftest.err; then
19527     ac_cpp_err=$ac_cxx_preproc_warn_flag
19528   else
19529     ac_cpp_err=
19530   fi
19531 else
19532   ac_cpp_err=yes
19533 fi
19534 if test -z "$ac_cpp_err"; then
19535   :
19536 else
19537   echo "$as_me: failed program was:" >&5
19538   cat conftest.$ac_ext >&5
19539   # Broken: fails on valid input.
19540 continue
19541 fi
19542 rm -f conftest.err conftest.$ac_ext
19543
19544   # OK, works on sane cases.  Now check whether non-existent headers
19545   # can be detected and how.
19546   cat >conftest.$ac_ext <<_ACEOF
19547 #line 19547 "configure"
19548 #include "confdefs.h"
19549 #include <ac_nonexistent.h>
19550 _ACEOF
19551 if { (eval echo "$as_me:19551: \"$ac_cpp conftest.$ac_ext\"") >&5
19552   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19553   ac_status=$?
19554   egrep -v '^ *\+' conftest.er1 >conftest.err
19555   rm -f conftest.er1
19556   cat conftest.err >&5
19557   echo "$as_me:19557: \$? = $ac_status" >&5
19558   (exit $ac_status); } >/dev/null; then
19559   if test -s conftest.err; then
19560     ac_cpp_err=$ac_cxx_preproc_warn_flag
19561   else
19562     ac_cpp_err=
19563   fi
19564 else
19565   ac_cpp_err=yes
19566 fi
19567 if test -z "$ac_cpp_err"; then
19568   # Broken: success on invalid input.
19569 continue
19570 else
19571   echo "$as_me: failed program was:" >&5
19572   cat conftest.$ac_ext >&5
19573   # Passes both tests.
19574 ac_preproc_ok=:
19575 break
19576 fi
19577 rm -f conftest.err conftest.$ac_ext
19578
19579 done
19580 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19581 rm -f conftest.err conftest.$ac_ext
19582 if $ac_preproc_ok; then
19583   break
19584 fi
19585
19586     done
19587     ac_cv_prog_CXXCPP=$CXXCPP
19588
19589 fi
19590   CXXCPP=$ac_cv_prog_CXXCPP
19591 else
19592   ac_cv_prog_CXXCPP=$CXXCPP
19593 fi
19594 echo "$as_me:19594: result: $CXXCPP" >&5
19595 echo "${ECHO_T}$CXXCPP" >&6
19596 ac_preproc_ok=false
19597 for ac_cxx_preproc_warn_flag in '' yes
19598 do
19599   # Use a header file that comes with gcc, so configuring glibc
19600   # with a fresh cross-compiler works.
19601   # On the NeXT, cc -E runs the code through the compiler's parser,
19602   # not just through cpp. "Syntax error" is here to catch this case.
19603   cat >conftest.$ac_ext <<_ACEOF
19604 #line 19604 "configure"
19605 #include "confdefs.h"
19606 #include <assert.h>
19607                      Syntax error
19608 _ACEOF
19609 if { (eval echo "$as_me:19609: \"$ac_cpp conftest.$ac_ext\"") >&5
19610   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19611   ac_status=$?
19612   egrep -v '^ *\+' conftest.er1 >conftest.err
19613   rm -f conftest.er1
19614   cat conftest.err >&5
19615   echo "$as_me:19615: \$? = $ac_status" >&5
19616   (exit $ac_status); } >/dev/null; then
19617   if test -s conftest.err; then
19618     ac_cpp_err=$ac_cxx_preproc_warn_flag
19619   else
19620     ac_cpp_err=
19621   fi
19622 else
19623   ac_cpp_err=yes
19624 fi
19625 if test -z "$ac_cpp_err"; then
19626   :
19627 else
19628   echo "$as_me: failed program was:" >&5
19629   cat conftest.$ac_ext >&5
19630   # Broken: fails on valid input.
19631 continue
19632 fi
19633 rm -f conftest.err conftest.$ac_ext
19634
19635   # OK, works on sane cases.  Now check whether non-existent headers
19636   # can be detected and how.
19637   cat >conftest.$ac_ext <<_ACEOF
19638 #line 19638 "configure"
19639 #include "confdefs.h"
19640 #include <ac_nonexistent.h>
19641 _ACEOF
19642 if { (eval echo "$as_me:19642: \"$ac_cpp conftest.$ac_ext\"") >&5
19643   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19644   ac_status=$?
19645   egrep -v '^ *\+' conftest.er1 >conftest.err
19646   rm -f conftest.er1
19647   cat conftest.err >&5
19648   echo "$as_me:19648: \$? = $ac_status" >&5
19649   (exit $ac_status); } >/dev/null; then
19650   if test -s conftest.err; then
19651     ac_cpp_err=$ac_cxx_preproc_warn_flag
19652   else
19653     ac_cpp_err=
19654   fi
19655 else
19656   ac_cpp_err=yes
19657 fi
19658 if test -z "$ac_cpp_err"; then
19659   # Broken: success on invalid input.
19660 continue
19661 else
19662   echo "$as_me: failed program was:" >&5
19663   cat conftest.$ac_ext >&5
19664   # Passes both tests.
19665 ac_preproc_ok=:
19666 break
19667 fi
19668 rm -f conftest.err conftest.$ac_ext
19669
19670 done
19671 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19672 rm -f conftest.err conftest.$ac_ext
19673 if $ac_preproc_ok; then
19674   :
19675 else
19676   { { echo "$as_me:19676: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19677 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19678    { (exit 1); exit 1; }; }
19679 fi
19680
19681 ac_ext=cc
19682 ac_cpp='$CXXCPP $CPPFLAGS'
19683 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19684 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19685 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19686 ac_main_return=return
19687
19688 for ac_header in typeinfo
19689 do
19690 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19691 echo "$as_me:19691: checking for $ac_header" >&5
19692 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19693 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19694   echo $ECHO_N "(cached) $ECHO_C" >&6
19695 else
19696   cat >conftest.$ac_ext <<_ACEOF
19697 #line 19697 "configure"
19698 #include "confdefs.h"
19699 #include <$ac_header>
19700 _ACEOF
19701 if { (eval echo "$as_me:19701: \"$ac_cpp conftest.$ac_ext\"") >&5
19702   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19703   ac_status=$?
19704   egrep -v '^ *\+' conftest.er1 >conftest.err
19705   rm -f conftest.er1
19706   cat conftest.err >&5
19707   echo "$as_me:19707: \$? = $ac_status" >&5
19708   (exit $ac_status); } >/dev/null; then
19709   if test -s conftest.err; then
19710     ac_cpp_err=$ac_cxx_preproc_warn_flag
19711   else
19712     ac_cpp_err=
19713   fi
19714 else
19715   ac_cpp_err=yes
19716 fi
19717 if test -z "$ac_cpp_err"; then
19718   eval "$as_ac_Header=yes"
19719 else
19720   echo "$as_me: failed program was:" >&5
19721   cat conftest.$ac_ext >&5
19722   eval "$as_ac_Header=no"
19723 fi
19724 rm -f conftest.err conftest.$ac_ext
19725 fi
19726 echo "$as_me:19726: result: `eval echo '${'$as_ac_Header'}'`" >&5
19727 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19728 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19729   cat >>confdefs.h <<EOF
19730 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19731 EOF
19732
19733 fi
19734 done
19735
19736 for ac_header in iostream
19737 do
19738 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19739 echo "$as_me:19739: checking for $ac_header" >&5
19740 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19741 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19742   echo $ECHO_N "(cached) $ECHO_C" >&6
19743 else
19744   cat >conftest.$ac_ext <<_ACEOF
19745 #line 19745 "configure"
19746 #include "confdefs.h"
19747 #include <$ac_header>
19748 _ACEOF
19749 if { (eval echo "$as_me:19749: \"$ac_cpp conftest.$ac_ext\"") >&5
19750   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19751   ac_status=$?
19752   egrep -v '^ *\+' conftest.er1 >conftest.err
19753   rm -f conftest.er1
19754   cat conftest.err >&5
19755   echo "$as_me:19755: \$? = $ac_status" >&5
19756   (exit $ac_status); } >/dev/null; then
19757   if test -s conftest.err; then
19758     ac_cpp_err=$ac_cxx_preproc_warn_flag
19759   else
19760     ac_cpp_err=
19761   fi
19762 else
19763   ac_cpp_err=yes
19764 fi
19765 if test -z "$ac_cpp_err"; then
19766   eval "$as_ac_Header=yes"
19767 else
19768   echo "$as_me: failed program was:" >&5
19769   cat conftest.$ac_ext >&5
19770   eval "$as_ac_Header=no"
19771 fi
19772 rm -f conftest.err conftest.$ac_ext
19773 fi
19774 echo "$as_me:19774: result: `eval echo '${'$as_ac_Header'}'`" >&5
19775 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19776 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19777   cat >>confdefs.h <<EOF
19778 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19779 EOF
19780
19781 fi
19782 done
19783
19784 if test x"$ac_cv_header_iostream" = xyes ; then
19785         echo "$as_me:19785: checking if iostream uses std-namespace" >&5
19786 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
19787         cat >conftest.$ac_ext <<_ACEOF
19788 #line 19788 "configure"
19789 #include "confdefs.h"
19790
19791 #include <iostream>
19792 using std::endl;
19793 using std::cerr;
19794 int
19795 main ()
19796 {
19797
19798 cerr << "testing" << endl;
19799
19800   ;
19801   return 0;
19802 }
19803 _ACEOF
19804 rm -f conftest.$ac_objext
19805 if { (eval echo "$as_me:19805: \"$ac_compile\"") >&5
19806   (eval $ac_compile) 2>&5
19807   ac_status=$?
19808   echo "$as_me:19808: \$? = $ac_status" >&5
19809   (exit $ac_status); } &&
19810          { ac_try='test -s conftest.$ac_objext'
19811   { (eval echo "$as_me:19811: \"$ac_try\"") >&5
19812   (eval $ac_try) 2>&5
19813   ac_status=$?
19814   echo "$as_me:19814: \$? = $ac_status" >&5
19815   (exit $ac_status); }; }; then
19816   cf_iostream_namespace=yes
19817 else
19818   echo "$as_me: failed program was:" >&5
19819 cat conftest.$ac_ext >&5
19820 cf_iostream_namespace=no
19821 fi
19822 rm -f conftest.$ac_objext conftest.$ac_ext
19823         echo "$as_me:19823: result: $cf_iostream_namespace" >&5
19824 echo "${ECHO_T}$cf_iostream_namespace" >&6
19825         if test "$cf_iostream_namespace" = yes ; then
19826
19827 cat >>confdefs.h <<\EOF
19828 #define IOSTREAM_NAMESPACE 1
19829 EOF
19830
19831         fi
19832 fi
19833
19834 echo "$as_me:19834: checking if we should include stdbool.h" >&5
19835 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19836
19837 if test "${cf_cv_header_stdbool_h+set}" = set; then
19838   echo $ECHO_N "(cached) $ECHO_C" >&6
19839 else
19840
19841         cat >conftest.$ac_ext <<_ACEOF
19842 #line 19842 "configure"
19843 #include "confdefs.h"
19844
19845 int
19846 main ()
19847 {
19848 bool foo = false
19849   ;
19850   return 0;
19851 }
19852 _ACEOF
19853 rm -f conftest.$ac_objext
19854 if { (eval echo "$as_me:19854: \"$ac_compile\"") >&5
19855   (eval $ac_compile) 2>&5
19856   ac_status=$?
19857   echo "$as_me:19857: \$? = $ac_status" >&5
19858   (exit $ac_status); } &&
19859          { ac_try='test -s conftest.$ac_objext'
19860   { (eval echo "$as_me:19860: \"$ac_try\"") >&5
19861   (eval $ac_try) 2>&5
19862   ac_status=$?
19863   echo "$as_me:19863: \$? = $ac_status" >&5
19864   (exit $ac_status); }; }; then
19865   cf_cv_header_stdbool_h=0
19866 else
19867   echo "$as_me: failed program was:" >&5
19868 cat conftest.$ac_ext >&5
19869 cat >conftest.$ac_ext <<_ACEOF
19870 #line 19870 "configure"
19871 #include "confdefs.h"
19872
19873 #ifndef __BEOS__
19874 #include <stdbool.h>
19875 #endif
19876
19877 int
19878 main ()
19879 {
19880 bool foo = false
19881   ;
19882   return 0;
19883 }
19884 _ACEOF
19885 rm -f conftest.$ac_objext
19886 if { (eval echo "$as_me:19886: \"$ac_compile\"") >&5
19887   (eval $ac_compile) 2>&5
19888   ac_status=$?
19889   echo "$as_me:19889: \$? = $ac_status" >&5
19890   (exit $ac_status); } &&
19891          { ac_try='test -s conftest.$ac_objext'
19892   { (eval echo "$as_me:19892: \"$ac_try\"") >&5
19893   (eval $ac_try) 2>&5
19894   ac_status=$?
19895   echo "$as_me:19895: \$? = $ac_status" >&5
19896   (exit $ac_status); }; }; then
19897   cf_cv_header_stdbool_h=1
19898 else
19899   echo "$as_me: failed program was:" >&5
19900 cat conftest.$ac_ext >&5
19901 cf_cv_header_stdbool_h=0
19902 fi
19903 rm -f conftest.$ac_objext conftest.$ac_ext
19904 fi
19905 rm -f conftest.$ac_objext conftest.$ac_ext
19906 fi
19907
19908 if test "$cf_cv_header_stdbool_h" = 1
19909 then    echo "$as_me:19909: result: yes" >&5
19910 echo "${ECHO_T}yes" >&6
19911 else    echo "$as_me:19911: result: no" >&5
19912 echo "${ECHO_T}no" >&6
19913 fi
19914
19915 echo "$as_me:19915: checking for builtin bool type" >&5
19916 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19917
19918 if test "${cf_cv_builtin_bool+set}" = set; then
19919   echo $ECHO_N "(cached) $ECHO_C" >&6
19920 else
19921
19922         cat >conftest.$ac_ext <<_ACEOF
19923 #line 19923 "configure"
19924 #include "confdefs.h"
19925
19926 #include <stdio.h>
19927 #include <sys/types.h>
19928
19929 int
19930 main ()
19931 {
19932 bool x = false
19933   ;
19934   return 0;
19935 }
19936 _ACEOF
19937 rm -f conftest.$ac_objext
19938 if { (eval echo "$as_me:19938: \"$ac_compile\"") >&5
19939   (eval $ac_compile) 2>&5
19940   ac_status=$?
19941   echo "$as_me:19941: \$? = $ac_status" >&5
19942   (exit $ac_status); } &&
19943          { ac_try='test -s conftest.$ac_objext'
19944   { (eval echo "$as_me:19944: \"$ac_try\"") >&5
19945   (eval $ac_try) 2>&5
19946   ac_status=$?
19947   echo "$as_me:19947: \$? = $ac_status" >&5
19948   (exit $ac_status); }; }; then
19949   cf_cv_builtin_bool=1
19950 else
19951   echo "$as_me: failed program was:" >&5
19952 cat conftest.$ac_ext >&5
19953 cf_cv_builtin_bool=0
19954 fi
19955 rm -f conftest.$ac_objext conftest.$ac_ext
19956
19957 fi
19958
19959 if test "$cf_cv_builtin_bool" = 1
19960 then    echo "$as_me:19960: result: yes" >&5
19961 echo "${ECHO_T}yes" >&6
19962 else    echo "$as_me:19962: result: no" >&5
19963 echo "${ECHO_T}no" >&6
19964 fi
19965
19966 echo "$as_me:19966: checking for size of bool" >&5
19967 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19968 if test "${cf_cv_type_of_bool+set}" = set; then
19969   echo $ECHO_N "(cached) $ECHO_C" >&6
19970 else
19971
19972         rm -f cf_test.out
19973         if test "$cross_compiling" = yes; then
19974   cf_cv_type_of_bool=unknown
19975 else
19976   cat >conftest.$ac_ext <<_ACEOF
19977 #line 19977 "configure"
19978 #include "confdefs.h"
19979
19980 #include <stdlib.h>
19981 #include <stdio.h>
19982
19983 #if defined(__cplusplus)
19984
19985 #ifdef HAVE_GXX_BUILTIN_H
19986 #include <g++/builtin.h>
19987 #elif HAVE_GPP_BUILTIN_H
19988 #include <gpp/builtin.h>
19989 #elif HAVE_BUILTIN_H
19990 #include <builtin.h>
19991 #endif
19992
19993 #else
19994
19995 #if $cf_cv_header_stdbool_h
19996 #include <stdbool.h>
19997 #endif
19998
19999 #endif
20000
20001 int main()
20002 {
20003         FILE *fp = fopen("cf_test.out", "w");
20004         if (fp != 0) {
20005                 bool x = true;
20006                 if ((bool)(-x) >= 0)
20007                         fputs("unsigned ", fp);
20008                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20009                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20010                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20011                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20012                 fclose(fp);
20013         }
20014         ${cf_cv_main_return:-return}(0);
20015 }
20016
20017 _ACEOF
20018 rm -f conftest$ac_exeext
20019 if { (eval echo "$as_me:20019: \"$ac_link\"") >&5
20020   (eval $ac_link) 2>&5
20021   ac_status=$?
20022   echo "$as_me:20022: \$? = $ac_status" >&5
20023   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20024   { (eval echo "$as_me:20024: \"$ac_try\"") >&5
20025   (eval $ac_try) 2>&5
20026   ac_status=$?
20027   echo "$as_me:20027: \$? = $ac_status" >&5
20028   (exit $ac_status); }; }; then
20029   cf_cv_type_of_bool=`cat cf_test.out`
20030                  if test -z "$cf_cv_type_of_bool"; then
20031                    cf_cv_type_of_bool=unknown
20032                  fi
20033 else
20034   echo "$as_me: program exited with status $ac_status" >&5
20035 echo "$as_me: failed program was:" >&5
20036 cat conftest.$ac_ext >&5
20037 cf_cv_type_of_bool=unknown
20038 fi
20039 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20040 fi
20041
20042 fi
20043
20044         rm -f cf_test.out
20045 echo "$as_me:20045: result: $cf_cv_type_of_bool" >&5
20046 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20047 if test "$cf_cv_type_of_bool" = unknown ; then
20048         case .$NCURSES_BOOL in #(vi
20049         .auto|.) NCURSES_BOOL=unsigned;;
20050         esac
20051         { echo "$as_me:20051: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20052 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20053         cf_cv_type_of_bool=$NCURSES_BOOL
20054 fi
20055
20056 echo "$as_me:20056: checking for special defines needed for etip.h" >&5
20057 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20058 cf_save_CXXFLAGS="$CXXFLAGS"
20059 cf_result="none"
20060
20061 # etip.h includes ncurses.h which includes ncurses_dll.h
20062 # But ncurses_dll.h is generated - fix here.
20063 test -d include || mkdir include
20064 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
20065
20066 for cf_math in "" MATH_H
20067 do
20068 for cf_excp in "" MATH_EXCEPTION
20069 do
20070         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
20071         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20072         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20073 cat >conftest.$ac_ext <<_ACEOF
20074 #line 20074 "configure"
20075 #include "confdefs.h"
20076
20077 #include <etip.h.in>
20078
20079 int
20080 main ()
20081 {
20082
20083   ;
20084   return 0;
20085 }
20086 _ACEOF
20087 rm -f conftest.$ac_objext
20088 if { (eval echo "$as_me:20088: \"$ac_compile\"") >&5
20089   (eval $ac_compile) 2>&5
20090   ac_status=$?
20091   echo "$as_me:20091: \$? = $ac_status" >&5
20092   (exit $ac_status); } &&
20093          { ac_try='test -s conftest.$ac_objext'
20094   { (eval echo "$as_me:20094: \"$ac_try\"") >&5
20095   (eval $ac_try) 2>&5
20096   ac_status=$?
20097   echo "$as_me:20097: \$? = $ac_status" >&5
20098   (exit $ac_status); }; }; then
20099
20100         test -n "$cf_math" && cat >>confdefs.h <<EOF
20101 #define ETIP_NEEDS_${cf_math} 1
20102 EOF
20103
20104         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20105 #define ETIP_NEEDS_${cf_excp} 1
20106 EOF
20107
20108         cf_result="$cf_math $cf_excp"
20109         break 2
20110
20111 else
20112   echo "$as_me: failed program was:" >&5
20113 cat conftest.$ac_ext >&5
20114 fi
20115 rm -f conftest.$ac_objext conftest.$ac_ext
20116 done
20117 done
20118 echo "$as_me:20118: result: $cf_result" >&5
20119 echo "${ECHO_T}$cf_result" >&6
20120 CXXFLAGS="$cf_save_CXXFLAGS"
20121
20122 if test -n "$CXX"; then
20123 echo "$as_me:20123: checking if $CXX accepts parameter initialization" >&5
20124 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20125 if test "${cf_cv_cpp_param_init+set}" = set; then
20126   echo $ECHO_N "(cached) $ECHO_C" >&6
20127 else
20128
20129         ac_ext=cc
20130 ac_cpp='$CXXCPP $CPPFLAGS'
20131 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20132 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20133 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20134 ac_main_return=return
20135
20136         if test "$cross_compiling" = yes; then
20137   cf_cv_cpp_param_init=unknown
20138 else
20139   cat >conftest.$ac_ext <<_ACEOF
20140 #line 20140 "configure"
20141 #include "confdefs.h"
20142
20143 class TEST {
20144 private:
20145         int value;
20146 public:
20147         TEST(int x = 1);
20148         ~TEST();
20149 };
20150
20151 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20152 {
20153         value = x;
20154 }
20155 int main() { }
20156
20157 _ACEOF
20158 rm -f conftest$ac_exeext
20159 if { (eval echo "$as_me:20159: \"$ac_link\"") >&5
20160   (eval $ac_link) 2>&5
20161   ac_status=$?
20162   echo "$as_me:20162: \$? = $ac_status" >&5
20163   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20164   { (eval echo "$as_me:20164: \"$ac_try\"") >&5
20165   (eval $ac_try) 2>&5
20166   ac_status=$?
20167   echo "$as_me:20167: \$? = $ac_status" >&5
20168   (exit $ac_status); }; }; then
20169   cf_cv_cpp_param_init=yes
20170 else
20171   echo "$as_me: program exited with status $ac_status" >&5
20172 echo "$as_me: failed program was:" >&5
20173 cat conftest.$ac_ext >&5
20174 cf_cv_cpp_param_init=no
20175 fi
20176 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20177 fi
20178         ac_ext=cc
20179 ac_cpp='$CXXCPP $CPPFLAGS'
20180 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20181 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20182 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20183 ac_main_return=return
20184
20185 fi
20186 echo "$as_me:20186: result: $cf_cv_cpp_param_init" >&5
20187 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20188 fi
20189 test "$cf_cv_cpp_param_init" = yes &&
20190 cat >>confdefs.h <<\EOF
20191 #define CPP_HAS_PARAM_INIT 1
20192 EOF
20193
20194 if test -n "$CXX"; then
20195
20196 echo "$as_me:20196: checking if $CXX accepts static_cast" >&5
20197 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20198 if test "${cf_cv_cpp_static_cast+set}" = set; then
20199   echo $ECHO_N "(cached) $ECHO_C" >&6
20200 else
20201
20202         ac_ext=cc
20203 ac_cpp='$CXXCPP $CPPFLAGS'
20204 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20205 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20206 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20207 ac_main_return=return
20208
20209         cat >conftest.$ac_ext <<_ACEOF
20210 #line 20210 "configure"
20211 #include "confdefs.h"
20212
20213 class NCursesPanel
20214 {
20215 public:
20216   NCursesPanel(int nlines,
20217                int ncols,
20218                int begin_y = 0,
20219                int begin_x = 0)
20220   {
20221   }
20222   NCursesPanel();
20223   ~NCursesPanel();
20224 };
20225
20226 template<class T> class NCursesUserPanel : public NCursesPanel
20227 {
20228 public:
20229   NCursesUserPanel (int nlines,
20230                     int ncols,
20231                     int begin_y = 0,
20232                     int begin_x = 0,
20233                     const T* p_UserData = static_cast<T*>(0))
20234     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20235   {
20236   };
20237   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20238   {
20239   };
20240
20241   virtual ~NCursesUserPanel() {};
20242 };
20243
20244 int
20245 main ()
20246 {
20247
20248         const char* p_UserData = static_cast<char*>(0)
20249   ;
20250   return 0;
20251 }
20252 _ACEOF
20253 rm -f conftest.$ac_objext
20254 if { (eval echo "$as_me:20254: \"$ac_compile\"") >&5
20255   (eval $ac_compile) 2>&5
20256   ac_status=$?
20257   echo "$as_me:20257: \$? = $ac_status" >&5
20258   (exit $ac_status); } &&
20259          { ac_try='test -s conftest.$ac_objext'
20260   { (eval echo "$as_me:20260: \"$ac_try\"") >&5
20261   (eval $ac_try) 2>&5
20262   ac_status=$?
20263   echo "$as_me:20263: \$? = $ac_status" >&5
20264   (exit $ac_status); }; }; then
20265   cf_cv_cpp_static_cast=yes
20266 else
20267   echo "$as_me: failed program was:" >&5
20268 cat conftest.$ac_ext >&5
20269 cf_cv_cpp_static_cast=no
20270 fi
20271 rm -f conftest.$ac_objext conftest.$ac_ext
20272
20273         ac_ext=cc
20274 ac_cpp='$CXXCPP $CPPFLAGS'
20275 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20276 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20277 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20278 ac_main_return=return
20279
20280 fi
20281 echo "$as_me:20281: result: $cf_cv_cpp_static_cast" >&5
20282 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20283
20284 fi
20285
20286 test "$cf_cv_cpp_static_cast" = yes &&
20287 cat >>confdefs.h <<\EOF
20288 #define CPP_HAS_STATIC_CAST 1
20289 EOF
20290
20291         CXX_AR='$(AR)'
20292         CXX_ARFLAGS='$(ARFLAGS)'
20293         case $cf_cv_system_name in #(vi
20294         irix*) #(vi
20295             if test "$GXX" != yes ; then
20296                 CXX_AR='$(CXX)'
20297                 CXX_ARFLAGS='-ar -o'
20298             fi
20299             ;;
20300         sco3.2v5*) #(vi
20301             CXXLDFLAGS="-u main"
20302             ;;
20303         solaris2*)
20304             if test "$GXX" != yes ; then
20305                 CXX_AR='$(CXX)'
20306                 CXX_ARFLAGS='-xar -o'
20307             fi
20308             ;;
20309         esac
20310
20311 else
20312         cf_cxx_library=no
20313         cf_cv_builtin_bool=1
20314
20315         # Just because we are not configuring against C++ right now does not
20316         # mean that a user will not want to use C++.  Some distributors disable
20317         # the C++ portion of this configuration as a shortcut (or just to avoid
20318         # compiling the demo in the c++ directory).  So we need a reasonable
20319         # default for the 'bool' type.
20320         #
20321         # Caveat: since the storage of the bool type is not standardized, it
20322         # may change.
20323
20324         if test "$NCURSES_BOOL" != auto ; then
20325                 cf_cv_type_of_bool=$NCURSES_BOOL
20326                 cf_cv_header_stdbool_h=0
20327         else
20328                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20329
20330 echo "$as_me:20330: checking for size of bool" >&5
20331 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20332 if test "${cf_cv_type_of_bool+set}" = set; then
20333   echo $ECHO_N "(cached) $ECHO_C" >&6
20334 else
20335
20336         rm -f cf_test.out
20337         if test "$cross_compiling" = yes; then
20338   cf_cv_type_of_bool=unknown
20339 else
20340   cat >conftest.$ac_ext <<_ACEOF
20341 #line 20341 "configure"
20342 #include "confdefs.h"
20343
20344 #include <stdlib.h>
20345 #include <stdio.h>
20346
20347 #if defined(__cplusplus)
20348
20349 #ifdef HAVE_GXX_BUILTIN_H
20350 #include <g++/builtin.h>
20351 #elif HAVE_GPP_BUILTIN_H
20352 #include <gpp/builtin.h>
20353 #elif HAVE_BUILTIN_H
20354 #include <builtin.h>
20355 #endif
20356
20357 #else
20358
20359 #if $cf_cv_header_stdbool_h
20360 #include <stdbool.h>
20361 #endif
20362
20363 #endif
20364
20365 int main()
20366 {
20367         FILE *fp = fopen("cf_test.out", "w");
20368         if (fp != 0) {
20369                 bool x = true;
20370                 if ((bool)(-x) >= 0)
20371                         fputs("unsigned ", fp);
20372                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20373                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20374                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20375                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20376                 fclose(fp);
20377         }
20378         ${cf_cv_main_return:-return}(0);
20379 }
20380
20381 _ACEOF
20382 rm -f conftest$ac_exeext
20383 if { (eval echo "$as_me:20383: \"$ac_link\"") >&5
20384   (eval $ac_link) 2>&5
20385   ac_status=$?
20386   echo "$as_me:20386: \$? = $ac_status" >&5
20387   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20388   { (eval echo "$as_me:20388: \"$ac_try\"") >&5
20389   (eval $ac_try) 2>&5
20390   ac_status=$?
20391   echo "$as_me:20391: \$? = $ac_status" >&5
20392   (exit $ac_status); }; }; then
20393   cf_cv_type_of_bool=`cat cf_test.out`
20394                  if test -z "$cf_cv_type_of_bool"; then
20395                    cf_cv_type_of_bool=unknown
20396                  fi
20397 else
20398   echo "$as_me: program exited with status $ac_status" >&5
20399 echo "$as_me: failed program was:" >&5
20400 cat conftest.$ac_ext >&5
20401 cf_cv_type_of_bool=unknown
20402 fi
20403 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20404 fi
20405
20406 fi
20407
20408         rm -f cf_test.out
20409 echo "$as_me:20409: result: $cf_cv_type_of_bool" >&5
20410 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20411 if test "$cf_cv_type_of_bool" = unknown ; then
20412         case .$NCURSES_BOOL in #(vi
20413         .auto|.) NCURSES_BOOL=unsigned;;
20414         esac
20415         { echo "$as_me:20415: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20416 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20417         cf_cv_type_of_bool=$NCURSES_BOOL
20418 fi
20419
20420                 else
20421                         echo "$as_me:20421: checking for fallback type of bool" >&5
20422 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20423                         case "$host_cpu" in #(vi
20424                         i?86)   cf_cv_type_of_bool=char ;; #(vi
20425                         *)      cf_cv_type_of_bool=int  ;;
20426                         esac
20427                         echo "$as_me:20427: result: $cf_cv_type_of_bool" >&5
20428 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20429                 fi
20430         fi
20431 fi
20432
20433 # If the C compiler did not declare bool, and we did not determine that the C++
20434 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20435 # ncurses library use the same type as C++ bool.  Note that this allows one to
20436 # specify the type of bool in a configure-script option and postpone
20437 # integration with the C++ compiler provided that the types are compatible.
20438 USE_CXX_BOOL=1
20439 if test $cf_cv_cc_bool_type = 1
20440 then
20441         # oops: C has a bool.  Unlikely, but C++ could differ.
20442         USE_CXX_BOOL=0
20443 elif test $cf_cv_builtin_bool = 0
20444 then
20445         # C++ has no bool
20446         USE_CXX_BOOL=0
20447 else
20448         # this is the normal case
20449         USE_CXX_BOOL='defined(__cplusplus)'
20450 fi
20451
20452 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20453
20454         if test "$cf_with_ada" != "no" ; then
20455                 if test "$with_libtool" != "no"; then
20456                         { echo "$as_me:20456: WARNING: libtool does not support Ada - disabling feature" >&5
20457 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20458                         cf_with_ada=no
20459                 fi
20460         fi
20461
20462         if test "$cf_with_ada" != "no" ; then
20463
20464 cf_ada_make=gnatmake
20465 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20466 set dummy $cf_ada_make; ac_word=$2
20467 echo "$as_me:20467: checking for $ac_word" >&5
20468 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20469 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20470   echo $ECHO_N "(cached) $ECHO_C" >&6
20471 else
20472   if test -n "$gnat_exists"; then
20473   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20474 else
20475   ac_save_IFS=$IFS; IFS=$ac_path_separator
20476 ac_dummy="$PATH"
20477 for ac_dir in $ac_dummy; do
20478   IFS=$ac_save_IFS
20479   test -z "$ac_dir" && ac_dir=.
20480   $as_executable_p "$ac_dir/$ac_word" || continue
20481 ac_cv_prog_gnat_exists="yes"
20482 echo "$as_me:20482: found $ac_dir/$ac_word" >&5
20483 break
20484 done
20485
20486   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20487 fi
20488 fi
20489 gnat_exists=$ac_cv_prog_gnat_exists
20490 if test -n "$gnat_exists"; then
20491   echo "$as_me:20491: result: $gnat_exists" >&5
20492 echo "${ECHO_T}$gnat_exists" >&6
20493 else
20494   echo "$as_me:20494: result: no" >&5
20495 echo "${ECHO_T}no" >&6
20496 fi
20497
20498 if test "$ac_cv_prog_gnat_exists" = no; then
20499    cf_ada_make=
20500    cf_cv_prog_gnat_correct=no
20501 else
20502
20503 echo "$as_me:20503: checking for gnat version" >&5
20504 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20505 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20506         grep '[0-9].[0-9][0-9]*' |\
20507     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20508 echo "$as_me:20508: result: $cf_gnat_version" >&5
20509 echo "${ECHO_T}$cf_gnat_version" >&6
20510
20511 case $cf_gnat_version in #(vi
20512 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
20513         cf_cv_prog_gnat_correct=yes
20514         ;;
20515 *)
20516         { echo "$as_me:20516: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20517 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20518         cf_cv_prog_gnat_correct=no
20519         ;;
20520 esac
20521
20522    # Extract the first word of "m4", so it can be a program name with args.
20523 set dummy m4; ac_word=$2
20524 echo "$as_me:20524: checking for $ac_word" >&5
20525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20526 if test "${ac_cv_prog_M4_exists+set}" = set; then
20527   echo $ECHO_N "(cached) $ECHO_C" >&6
20528 else
20529   if test -n "$M4_exists"; then
20530   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20531 else
20532   ac_save_IFS=$IFS; IFS=$ac_path_separator
20533 ac_dummy="$PATH"
20534 for ac_dir in $ac_dummy; do
20535   IFS=$ac_save_IFS
20536   test -z "$ac_dir" && ac_dir=.
20537   $as_executable_p "$ac_dir/$ac_word" || continue
20538 ac_cv_prog_M4_exists="yes"
20539 echo "$as_me:20539: found $ac_dir/$ac_word" >&5
20540 break
20541 done
20542
20543   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20544 fi
20545 fi
20546 M4_exists=$ac_cv_prog_M4_exists
20547 if test -n "$M4_exists"; then
20548   echo "$as_me:20548: result: $M4_exists" >&5
20549 echo "${ECHO_T}$M4_exists" >&6
20550 else
20551   echo "$as_me:20551: result: no" >&5
20552 echo "${ECHO_T}no" >&6
20553 fi
20554
20555    if test "$ac_cv_prog_M4_exists" = no; then
20556       cf_cv_prog_gnat_correct=no
20557       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20558    fi
20559    if test "$cf_cv_prog_gnat_correct" = yes; then
20560       echo "$as_me:20560: checking if GNAT works" >&5
20561 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20562
20563 rm -rf conftest* *~conftest*
20564 cat >>conftest.ads <<CF_EOF
20565 procedure conftest;
20566 CF_EOF
20567 cat >>conftest.adb <<CF_EOF
20568 with Text_IO;
20569 with GNAT.OS_Lib;
20570 procedure conftest is
20571 begin
20572    Text_IO.Put ("Hello World");
20573    Text_IO.New_Line;
20574    GNAT.OS_Lib.OS_Exit (0);
20575 end conftest;
20576 CF_EOF
20577 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20578    if ( ./conftest 1>&5 2>&1 ) ; then
20579       cf_cv_prog_gnat_correct=yes
20580    else
20581       cf_cv_prog_gnat_correct=no
20582    fi
20583 else
20584    cf_cv_prog_gnat_correct=no
20585 fi
20586 rm -rf conftest* *~conftest*
20587
20588       echo "$as_me:20588: result: $cf_cv_prog_gnat_correct" >&5
20589 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20590    fi
20591 fi
20592
20593                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20594
20595         ADAFLAGS="$ADAFLAGS -gnatpn"
20596
20597         echo "$as_me:20597: checking optimization options for ADAFLAGS" >&5
20598 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20599         case "$CFLAGS" in
20600         *-g*)
20601
20602         ADAFLAGS="$ADAFLAGS -g"
20603
20604                 ;;
20605         esac
20606         case "$CFLAGS" in
20607         *-O*)
20608                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20609
20610         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20611
20612                 ;;
20613         esac
20614         echo "$as_me:20614: result: $ADAFLAGS" >&5
20615 echo "${ECHO_T}$ADAFLAGS" >&6
20616
20617 echo "$as_me:20617: checking if GNATPREP supports -T option" >&5
20618 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20619 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20620   echo $ECHO_N "(cached) $ECHO_C" >&6
20621 else
20622
20623 cf_cv_gnatprep_opt_t=no
20624 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20625
20626 fi
20627 echo "$as_me:20627: result: $cf_cv_gnatprep_opt_t" >&5
20628 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20629 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20630
20631 echo "$as_me:20631: checking if GNAT supports generics" >&5
20632 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20633 case $cf_gnat_version in #(vi
20634 3.[1-9]*|[4-9].*) #(vi
20635         cf_gnat_generics=yes
20636         ;;
20637 *)
20638         cf_gnat_generics=no
20639         ;;
20640 esac
20641 echo "$as_me:20641: result: $cf_gnat_generics" >&5
20642 echo "${ECHO_T}$cf_gnat_generics" >&6
20643
20644 if test "$cf_gnat_generics" = yes
20645 then
20646         cf_compile_generics=generics
20647         cf_generic_objects="\${GENOBJS}"
20648 else
20649         cf_compile_generics=
20650         cf_generic_objects=
20651 fi
20652
20653 echo "$as_me:20653: checking if GNAT supports SIGINT" >&5
20654 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20655 if test "${cf_cv_gnat_sigint+set}" = set; then
20656   echo $ECHO_N "(cached) $ECHO_C" >&6
20657 else
20658
20659 rm -rf conftest* *~conftest*
20660 cat >>conftest.ads <<CF_EOF
20661 with Ada.Interrupts.Names;
20662
20663 package ConfTest is
20664
20665    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20666    pragma Unreserve_All_Interrupts;
20667    pragma Warnings (On);
20668
20669    protected Process is
20670       procedure Stop;
20671       function Continue return Boolean;
20672       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20673    private
20674       Done : Boolean := False;
20675    end Process;
20676
20677 end ConfTest;
20678 CF_EOF
20679 cat >>conftest.adb <<CF_EOF
20680 package body ConfTest is
20681    protected body Process is
20682       procedure Stop is
20683       begin
20684          Done := True;
20685       end Stop;
20686       function Continue return Boolean is
20687       begin
20688          return not Done;
20689       end Continue;
20690    end Process;
20691 end ConfTest;
20692 CF_EOF
20693 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20694       cf_cv_gnat_sigint=yes
20695 else
20696    cf_cv_gnat_sigint=no
20697 fi
20698 rm -rf conftest* *~conftest*
20699
20700 fi
20701 echo "$as_me:20701: result: $cf_cv_gnat_sigint" >&5
20702 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20703
20704 if test $cf_cv_gnat_sigint = yes ; then
20705         USE_GNAT_SIGINT=""
20706 else
20707         USE_GNAT_SIGINT="#"
20708 fi
20709
20710 cf_gnat_libraries=no
20711 cf_gnat_projects=no
20712
20713 if test "$enable_gnat_projects" != no ; then
20714 echo "$as_me:20714: checking if GNAT supports project files" >&5
20715 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20716 case $cf_gnat_version in #(vi
20717 3.[0-9]*) #(vi
20718         ;;
20719 *)
20720         case $cf_cv_system_name in #(vi
20721         cygwin*|msys*) #(vi
20722                 ;;
20723         *)
20724                 mkdir conftest.src conftest.bin conftest.lib
20725                 cd conftest.src
20726                 rm -rf conftest* *~conftest*
20727                 cat >>library.gpr <<CF_EOF
20728 project Library is
20729   Kind := External ("LIB_KIND");
20730   for Library_Name use "ConfTest";
20731   for Object_Dir use ".";
20732   for Library_ALI_Dir use External("LIBRARY_DIR");
20733   for Library_Version use External ("SONAME");
20734   for Library_Kind use Kind;
20735   for Library_Dir use External("BUILD_DIR");
20736   Source_Dir := External ("SOURCE_DIR");
20737   for Source_Dirs use (Source_Dir);
20738 end Library;
20739 CF_EOF
20740                 cat >>confpackage.ads <<CF_EOF
20741 package ConfPackage is
20742    procedure conftest;
20743 end ConfPackage;
20744 CF_EOF
20745                 cat >>confpackage.adb <<CF_EOF
20746 with Text_IO;
20747 package body ConfPackage is
20748    procedure conftest is
20749    begin
20750       Text_IO.Put ("Hello World");
20751       Text_IO.New_Line;
20752    end conftest;
20753 end ConfPackage;
20754 CF_EOF
20755                 if ( $cf_ada_make $ADAFLAGS \
20756                                 -Plibrary.gpr \
20757                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
20758                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
20759                                 -XSOURCE_DIR=`pwd` \
20760                                 -XSONAME=libConfTest.so.1 \
20761                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
20762                         cf_gnat_projects=yes
20763                 fi
20764                 cd ..
20765                 if test -f conftest.lib/confpackage.ali
20766                 then
20767                         cf_gnat_libraries=yes
20768                 fi
20769                 rm -rf conftest* *~conftest*
20770                 ;;
20771         esac
20772         ;;
20773 esac
20774 echo "$as_me:20774: result: $cf_gnat_projects" >&5
20775 echo "${ECHO_T}$cf_gnat_projects" >&6
20776 fi # enable_gnat_projects
20777
20778 if test $cf_gnat_projects = yes
20779 then
20780         echo "$as_me:20780: checking if GNAT supports libraries" >&5
20781 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
20782         echo "$as_me:20782: result: $cf_gnat_libraries" >&5
20783 echo "${ECHO_T}$cf_gnat_libraries" >&6
20784 fi
20785
20786 if test "$cf_gnat_projects" = yes
20787 then
20788         USE_OLD_MAKERULES="#"
20789         USE_GNAT_PROJECTS=""
20790 else
20791         USE_OLD_MAKERULES=""
20792         USE_GNAT_PROJECTS="#"
20793 fi
20794
20795 if test "$cf_gnat_libraries" = yes
20796 then
20797         USE_GNAT_LIBRARIES=""
20798 else
20799         USE_GNAT_LIBRARIES="#"
20800 fi
20801
20802 echo "$as_me:20802: checking for ada-compiler" >&5
20803 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
20804
20805 # Check whether --with-ada-compiler or --without-ada-compiler was given.
20806 if test "${with_ada_compiler+set}" = set; then
20807   withval="$with_ada_compiler"
20808   cf_ada_compiler=$withval
20809 else
20810   cf_ada_compiler=gnatmake
20811 fi;
20812
20813 echo "$as_me:20813: result: $cf_ada_compiler" >&5
20814 echo "${ECHO_T}$cf_ada_compiler" >&6
20815
20816                         cf_ada_package=terminal_interface
20817
20818 echo "$as_me:20818: checking for ada-include" >&5
20819 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
20820
20821 # Check whether --with-ada-include or --without-ada-include was given.
20822 if test "${with_ada_include+set}" = set; then
20823   withval="$with_ada_include"
20824
20825 else
20826   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20827 fi; if test -n "$prefix/share/ada/adainclude" ; then
20828
20829 if test "x$prefix" != xNONE; then
20830   cf_path_syntax="$prefix"
20831 else
20832   cf_path_syntax="$ac_default_prefix"
20833 fi
20834
20835 case ".$withval" in #(vi
20836 .\$\(*\)*|.\'*\'*) #(vi
20837   ;;
20838 ..|./*|.\\*) #(vi
20839   ;;
20840 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20841   ;;
20842 .\${*prefix}*|.\${*dir}*) #(vi
20843   eval withval="$withval"
20844   case ".$withval" in #(vi
20845   .NONE/*)
20846     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20847     ;;
20848   esac
20849   ;; #(vi
20850 .no|.NONE/*)
20851   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20852   ;;
20853 *)
20854   { { echo "$as_me:20854: error: expected a pathname, not \"$withval\"" >&5
20855 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20856    { (exit 1); exit 1; }; }
20857   ;;
20858 esac
20859
20860 fi
20861 eval ADA_INCLUDE="$withval"
20862
20863 echo "$as_me:20863: result: $ADA_INCLUDE" >&5
20864 echo "${ECHO_T}$ADA_INCLUDE" >&6
20865
20866 echo "$as_me:20866: checking for ada-objects" >&5
20867 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
20868
20869 # Check whether --with-ada-objects or --without-ada-objects was given.
20870 if test "${with_ada_objects+set}" = set; then
20871   withval="$with_ada_objects"
20872
20873 else
20874   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
20875 fi; if test -n "$prefix/lib/ada/adalib" ; then
20876
20877 if test "x$prefix" != xNONE; then
20878   cf_path_syntax="$prefix"
20879 else
20880   cf_path_syntax="$ac_default_prefix"
20881 fi
20882
20883 case ".$withval" in #(vi
20884 .\$\(*\)*|.\'*\'*) #(vi
20885   ;;
20886 ..|./*|.\\*) #(vi
20887   ;;
20888 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20889   ;;
20890 .\${*prefix}*|.\${*dir}*) #(vi
20891   eval withval="$withval"
20892   case ".$withval" in #(vi
20893   .NONE/*)
20894     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20895     ;;
20896   esac
20897   ;; #(vi
20898 .no|.NONE/*)
20899   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20900   ;;
20901 *)
20902   { { echo "$as_me:20902: error: expected a pathname, not \"$withval\"" >&5
20903 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20904    { (exit 1); exit 1; }; }
20905   ;;
20906 esac
20907
20908 fi
20909 eval ADA_OBJECTS="$withval"
20910
20911 echo "$as_me:20911: result: $ADA_OBJECTS" >&5
20912 echo "${ECHO_T}$ADA_OBJECTS" >&6
20913
20914 echo "$as_me:20914: checking if an Ada95 shared-library should be built" >&5
20915 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
20916
20917 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
20918 if test "${with_ada_sharedlib+set}" = set; then
20919   withval="$with_ada_sharedlib"
20920   with_ada_sharedlib=$withval
20921 else
20922   with_ada_sharedlib=no
20923 fi;
20924 echo "$as_me:20924: result: $with_ada_sharedlib" >&5
20925 echo "${ECHO_T}$with_ada_sharedlib" >&6
20926
20927 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
20928 MAKE_ADA_SHAREDLIB="#"
20929
20930 if test "x$with_ada_sharedlib" != xno
20931 then
20932         MAKE_ADA_SHAREDLIB=
20933         if test "x$with_ada_sharedlib" != xyes
20934         then
20935                 ADA_SHAREDLIB="$with_ada_sharedlib"
20936         fi
20937 fi
20938
20939                 fi
20940         fi
20941 else
20942         cf_with_ada=no
20943 fi
20944
20945 # do this "late" to avoid conflict with header-checks
20946 if test "x$with_widec" = xyes ; then
20947         echo "$as_me:20947: checking for wchar_t" >&5
20948 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
20949 if test "${ac_cv_type_wchar_t+set}" = set; then
20950   echo $ECHO_N "(cached) $ECHO_C" >&6
20951 else
20952   cat >conftest.$ac_ext <<_ACEOF
20953 #line 20953 "configure"
20954 #include "confdefs.h"
20955 $ac_includes_default
20956 int
20957 main ()
20958 {
20959 if ((wchar_t *) 0)
20960   return 0;
20961 if (sizeof (wchar_t))
20962   return 0;
20963   ;
20964   return 0;
20965 }
20966 _ACEOF
20967 rm -f conftest.$ac_objext
20968 if { (eval echo "$as_me:20968: \"$ac_compile\"") >&5
20969   (eval $ac_compile) 2>&5
20970   ac_status=$?
20971   echo "$as_me:20971: \$? = $ac_status" >&5
20972   (exit $ac_status); } &&
20973          { ac_try='test -s conftest.$ac_objext'
20974   { (eval echo "$as_me:20974: \"$ac_try\"") >&5
20975   (eval $ac_try) 2>&5
20976   ac_status=$?
20977   echo "$as_me:20977: \$? = $ac_status" >&5
20978   (exit $ac_status); }; }; then
20979   ac_cv_type_wchar_t=yes
20980 else
20981   echo "$as_me: failed program was:" >&5
20982 cat conftest.$ac_ext >&5
20983 ac_cv_type_wchar_t=no
20984 fi
20985 rm -f conftest.$ac_objext conftest.$ac_ext
20986 fi
20987 echo "$as_me:20987: result: $ac_cv_type_wchar_t" >&5
20988 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
20989
20990 echo "$as_me:20990: checking size of wchar_t" >&5
20991 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
20992 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
20993   echo $ECHO_N "(cached) $ECHO_C" >&6
20994 else
20995   if test "$ac_cv_type_wchar_t" = yes; then
20996   if test "$cross_compiling" = yes; then
20997   # Depending upon the size, compute the lo and hi bounds.
20998 cat >conftest.$ac_ext <<_ACEOF
20999 #line 20999 "configure"
21000 #include "confdefs.h"
21001 $ac_includes_default
21002 int
21003 main ()
21004 {
21005 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21006   ;
21007   return 0;
21008 }
21009 _ACEOF
21010 rm -f conftest.$ac_objext
21011 if { (eval echo "$as_me:21011: \"$ac_compile\"") >&5
21012   (eval $ac_compile) 2>&5
21013   ac_status=$?
21014   echo "$as_me:21014: \$? = $ac_status" >&5
21015   (exit $ac_status); } &&
21016          { ac_try='test -s conftest.$ac_objext'
21017   { (eval echo "$as_me:21017: \"$ac_try\"") >&5
21018   (eval $ac_try) 2>&5
21019   ac_status=$?
21020   echo "$as_me:21020: \$? = $ac_status" >&5
21021   (exit $ac_status); }; }; then
21022   ac_lo=0 ac_mid=0
21023   while :; do
21024     cat >conftest.$ac_ext <<_ACEOF
21025 #line 21025 "configure"
21026 #include "confdefs.h"
21027 $ac_includes_default
21028 int
21029 main ()
21030 {
21031 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21032   ;
21033   return 0;
21034 }
21035 _ACEOF
21036 rm -f conftest.$ac_objext
21037 if { (eval echo "$as_me:21037: \"$ac_compile\"") >&5
21038   (eval $ac_compile) 2>&5
21039   ac_status=$?
21040   echo "$as_me:21040: \$? = $ac_status" >&5
21041   (exit $ac_status); } &&
21042          { ac_try='test -s conftest.$ac_objext'
21043   { (eval echo "$as_me:21043: \"$ac_try\"") >&5
21044   (eval $ac_try) 2>&5
21045   ac_status=$?
21046   echo "$as_me:21046: \$? = $ac_status" >&5
21047   (exit $ac_status); }; }; then
21048   ac_hi=$ac_mid; break
21049 else
21050   echo "$as_me: failed program was:" >&5
21051 cat conftest.$ac_ext >&5
21052 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21053 fi
21054 rm -f conftest.$ac_objext conftest.$ac_ext
21055   done
21056 else
21057   echo "$as_me: failed program was:" >&5
21058 cat conftest.$ac_ext >&5
21059 ac_hi=-1 ac_mid=-1
21060   while :; do
21061     cat >conftest.$ac_ext <<_ACEOF
21062 #line 21062 "configure"
21063 #include "confdefs.h"
21064 $ac_includes_default
21065 int
21066 main ()
21067 {
21068 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21069   ;
21070   return 0;
21071 }
21072 _ACEOF
21073 rm -f conftest.$ac_objext
21074 if { (eval echo "$as_me:21074: \"$ac_compile\"") >&5
21075   (eval $ac_compile) 2>&5
21076   ac_status=$?
21077   echo "$as_me:21077: \$? = $ac_status" >&5
21078   (exit $ac_status); } &&
21079          { ac_try='test -s conftest.$ac_objext'
21080   { (eval echo "$as_me:21080: \"$ac_try\"") >&5
21081   (eval $ac_try) 2>&5
21082   ac_status=$?
21083   echo "$as_me:21083: \$? = $ac_status" >&5
21084   (exit $ac_status); }; }; then
21085   ac_lo=$ac_mid; break
21086 else
21087   echo "$as_me: failed program was:" >&5
21088 cat conftest.$ac_ext >&5
21089 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21090 fi
21091 rm -f conftest.$ac_objext conftest.$ac_ext
21092   done
21093 fi
21094 rm -f conftest.$ac_objext conftest.$ac_ext
21095 # Binary search between lo and hi bounds.
21096 while test "x$ac_lo" != "x$ac_hi"; do
21097   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21098   cat >conftest.$ac_ext <<_ACEOF
21099 #line 21099 "configure"
21100 #include "confdefs.h"
21101 $ac_includes_default
21102 int
21103 main ()
21104 {
21105 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21106   ;
21107   return 0;
21108 }
21109 _ACEOF
21110 rm -f conftest.$ac_objext
21111 if { (eval echo "$as_me:21111: \"$ac_compile\"") >&5
21112   (eval $ac_compile) 2>&5
21113   ac_status=$?
21114   echo "$as_me:21114: \$? = $ac_status" >&5
21115   (exit $ac_status); } &&
21116          { ac_try='test -s conftest.$ac_objext'
21117   { (eval echo "$as_me:21117: \"$ac_try\"") >&5
21118   (eval $ac_try) 2>&5
21119   ac_status=$?
21120   echo "$as_me:21120: \$? = $ac_status" >&5
21121   (exit $ac_status); }; }; then
21122   ac_hi=$ac_mid
21123 else
21124   echo "$as_me: failed program was:" >&5
21125 cat conftest.$ac_ext >&5
21126 ac_lo=`expr $ac_mid + 1`
21127 fi
21128 rm -f conftest.$ac_objext conftest.$ac_ext
21129 done
21130 ac_cv_sizeof_wchar_t=$ac_lo
21131 else
21132   if test "$cross_compiling" = yes; then
21133   { { echo "$as_me:21133: error: cannot run test program while cross compiling" >&5
21134 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21135    { (exit 1); exit 1; }; }
21136 else
21137   cat >conftest.$ac_ext <<_ACEOF
21138 #line 21138 "configure"
21139 #include "confdefs.h"
21140 $ac_includes_default
21141 int
21142 main ()
21143 {
21144 FILE *f = fopen ("conftest.val", "w");
21145 if (!f)
21146   $ac_main_return (1);
21147 fprintf (f, "%d", (sizeof (wchar_t)));
21148 fclose (f);
21149   ;
21150   return 0;
21151 }
21152 _ACEOF
21153 rm -f conftest$ac_exeext
21154 if { (eval echo "$as_me:21154: \"$ac_link\"") >&5
21155   (eval $ac_link) 2>&5
21156   ac_status=$?
21157   echo "$as_me:21157: \$? = $ac_status" >&5
21158   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21159   { (eval echo "$as_me:21159: \"$ac_try\"") >&5
21160   (eval $ac_try) 2>&5
21161   ac_status=$?
21162   echo "$as_me:21162: \$? = $ac_status" >&5
21163   (exit $ac_status); }; }; then
21164   ac_cv_sizeof_wchar_t=`cat conftest.val`
21165 else
21166   echo "$as_me: program exited with status $ac_status" >&5
21167 echo "$as_me: failed program was:" >&5
21168 cat conftest.$ac_ext >&5
21169 fi
21170 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21171 fi
21172 fi
21173 rm -f conftest.val
21174 else
21175   ac_cv_sizeof_wchar_t=0
21176 fi
21177 fi
21178 echo "$as_me:21178: result: $ac_cv_sizeof_wchar_t" >&5
21179 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21180 cat >>confdefs.h <<EOF
21181 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21182 EOF
21183
21184 fi
21185
21186 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21187 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21188 ###
21189 ### ticlib modules may be a separate library, otherwise contained in termlib.
21190 ### termlib modules may be a separate library, otherwise contained in ncurses.
21191 ###
21192 ### The of "+" or " " between the tokens controls the way the script
21193 ### chooses to split module lists into libraries.
21194 ###
21195 ### (see CF_LIB_RULES).
21196 echo "$as_me:21196: checking for library subsets" >&5
21197 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21198 LIB_SUBSETS=
21199
21200 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21201         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21202         if test "$with_ticlib" != no ; then
21203                 LIB_SUBSETS="${LIB_SUBSETS} "
21204         else
21205                 LIB_SUBSETS="${LIB_SUBSETS}+"
21206         fi
21207 fi
21208
21209 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21210 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21211
21212 if test "$with_termlib" != no ; then
21213         LIB_SUBSETS="${LIB_SUBSETS} "
21214 else
21215         LIB_SUBSETS="${LIB_SUBSETS}+"
21216 fi
21217
21218 LIB_SUBSETS="${LIB_SUBSETS}base"
21219
21220 # Most term-driver calls are to tinfo, but some like init_pair are to the
21221 # base library (so it resides in base).
21222 if test "$with_term_driver" != no ; then
21223         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21224         case $cf_cv_system_name in #(vi
21225         *mingw32*|*mingw64*) #(vi
21226                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21227                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21228                 ;;
21229         *) #(vi
21230                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21231                 ;;
21232         esac
21233 fi
21234
21235 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21236 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21237
21238 echo "$as_me:21238: result: $LIB_SUBSETS" >&5
21239 echo "${ECHO_T}$LIB_SUBSETS" >&6
21240
21241 ### Construct the list of include-directories to be generated
21242
21243 if test "$srcdir" != "."; then
21244         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21245 fi
21246 CPPFLAGS="-I../include $CPPFLAGS"
21247 if test "$srcdir" != "."; then
21248         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21249 fi
21250 CPPFLAGS="-I. $CPPFLAGS"
21251
21252 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21253 if test "$srcdir" != "."; then
21254         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21255 fi
21256 if test "$GCC" != yes; then
21257         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21258 elif test "$includedir" != "/usr/include"; then
21259         if test "$includedir" = '${prefix}/include' ; then
21260                 if test x$prefix != x/usr ; then
21261                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21262                 fi
21263         else
21264                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21265         fi
21266 fi
21267
21268 ### Build up pieces for makefile rules
21269 echo "$as_me:21269: checking default library suffix" >&5
21270 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21271
21272         case $DFT_LWR_MODEL in
21273         libtool) DFT_ARG_SUFFIX=''   ;;
21274         normal)  DFT_ARG_SUFFIX=''   ;;
21275         debug)   DFT_ARG_SUFFIX='_g' ;;
21276         profile) DFT_ARG_SUFFIX='_p' ;;
21277         shared)  DFT_ARG_SUFFIX=''   ;;
21278         esac
21279         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21280 echo "$as_me:21280: result: $DFT_ARG_SUFFIX" >&5
21281 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21282
21283 echo "$as_me:21283: checking default library-dependency suffix" >&5
21284 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21285
21286         case X$DFT_LWR_MODEL in #(vi
21287         Xlibtool) #(vi
21288                 DFT_LIB_SUFFIX='.la'
21289                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21290                 ;;
21291         Xdebug) #(vi
21292                 DFT_LIB_SUFFIX='_g.a'
21293                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21294                 ;;
21295         Xprofile) #(vi
21296                 DFT_LIB_SUFFIX='_p.a'
21297                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21298                 ;;
21299         Xshared) #(vi
21300                 case $cf_cv_system_name in
21301                 aix[5-7]*) #(vi
21302                         DFT_LIB_SUFFIX='.so'
21303                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21304                         ;;
21305                 cygwin*|msys*|mingw*) #(vi
21306                         DFT_LIB_SUFFIX='.dll'
21307                         DFT_DEP_SUFFIX='.dll.a'
21308                         ;;
21309                 darwin*) #(vi
21310                         DFT_LIB_SUFFIX='.dylib'
21311                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21312                         ;;
21313                 hpux*) #(vi
21314                         case $target in
21315                         ia64*) #(vi
21316                                 DFT_LIB_SUFFIX='.so'
21317                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21318                                 ;;
21319                         *) #(vi
21320                                 DFT_LIB_SUFFIX='.sl'
21321                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21322                                 ;;
21323                         esac
21324                         ;;
21325                 *) #(vi
21326                         DFT_LIB_SUFFIX='.so'
21327                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21328                         ;;
21329                 esac
21330                 ;;
21331         *)
21332                 DFT_LIB_SUFFIX='.a'
21333                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21334                 ;;
21335         esac
21336         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
21337         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
21338 echo "$as_me:21338: result: $DFT_DEP_SUFFIX" >&5
21339 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21340
21341 echo "$as_me:21341: checking default object directory" >&5
21342 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21343
21344         case $DFT_LWR_MODEL in
21345         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21346         normal)  DFT_OBJ_SUBDIR='objects' ;;
21347         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21348         profile) DFT_OBJ_SUBDIR='obj_p' ;;
21349         shared)
21350                 case $cf_cv_system_name in #(vi
21351                 cygwin|msys) #(vi
21352                         DFT_OBJ_SUBDIR='objects' ;;
21353                 *)
21354                         DFT_OBJ_SUBDIR='obj_s' ;;
21355                 esac
21356         esac
21357 echo "$as_me:21357: result: $DFT_OBJ_SUBDIR" >&5
21358 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21359
21360 if test "x$cf_with_cxx" = xyes ; then
21361 echo "$as_me:21361: checking c++ library-dependency suffix" >&5
21362 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21363 if test "$with_libtool" != "no"; then
21364         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21365         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21366 elif test "$with_shared_cxx" != "no"; then
21367         # also for g++ users...
21368         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21369 else
21370         # we normally make a static library because C/C++ library rules differ
21371
21372         case Xnormal in #(vi
21373         Xlibtool) #(vi
21374                 CXX_LIB_SUFFIX='.la'
21375                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21376                 ;;
21377         Xdebug) #(vi
21378                 CXX_LIB_SUFFIX='_g.a'
21379                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21380                 ;;
21381         Xprofile) #(vi
21382                 CXX_LIB_SUFFIX='_p.a'
21383                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21384                 ;;
21385         Xshared) #(vi
21386                 case $cf_cv_system_name in
21387                 aix[5-7]*) #(vi
21388                         CXX_LIB_SUFFIX='.so'
21389                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21390                         ;;
21391                 cygwin*|msys*|mingw*) #(vi
21392                         CXX_LIB_SUFFIX='.dll'
21393                         CXX_DEP_SUFFIX='.dll.a'
21394                         ;;
21395                 darwin*) #(vi
21396                         CXX_LIB_SUFFIX='.dylib'
21397                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21398                         ;;
21399                 hpux*) #(vi
21400                         case $target in
21401                         ia64*) #(vi
21402                                 CXX_LIB_SUFFIX='.so'
21403                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21404                                 ;;
21405                         *) #(vi
21406                                 CXX_LIB_SUFFIX='.sl'
21407                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21408                                 ;;
21409                         esac
21410                         ;;
21411                 *) #(vi
21412                         CXX_LIB_SUFFIX='.so'
21413                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21414                         ;;
21415                 esac
21416                 ;;
21417         *)
21418                 CXX_LIB_SUFFIX='.a'
21419                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21420                 ;;
21421         esac
21422         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
21423         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
21424
21425 fi
21426 echo "$as_me:21426: result: $CXX_LIB_SUFFIX" >&5
21427 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21428
21429 fi
21430
21431 # do not want -ldl in build except as needed for -lncurses dependency
21432 if test "x$with_dlsym" = xyes ; then
21433 if test $DFT_LWR_MODEL = shared || \
21434    test $DFT_LWR_MODEL = libtool ; then
21435
21436 # remove dl library from $LIBS
21437 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21438
21439 fi
21440 fi
21441 ### Set up low-level terminfo dependencies for makefiles.
21442
21443 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21444 # do not need libdl
21445 TICS_LIST=
21446 if test "x$with_dlsym" = xyes ; then
21447
21448 # remove dl library from $SHLIB_LIST
21449 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21450
21451 fi
21452
21453 if test "$with_ticlib" != no ; then
21454
21455         if test "x$with_ticlib" != xyes ; then
21456                 TICS_NAME=$with_ticlib
21457                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21458                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21459                 TICS_LIB_SUFFIX="${with_ticlib}"
21460         else
21461                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
21462                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21463                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
21464         fi
21465         TICS_LDFLAGS="-L${LIB_DIR}"
21466         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21467 else
21468         TICS_LDFLAGS="-L${LIB_DIR}"
21469         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21470 fi
21471
21472 if test "$with_termlib" != no ; then
21473
21474         if test "x$with_termlib" != xyes ; then
21475                 TINFO_NAME=$with_termlib
21476                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21477                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21478                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21479                 TINFO_LIB_SUFFIX="${with_termlib}"
21480         else
21481                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21482                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
21483                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21484                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
21485         fi
21486
21487         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21488         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21489         if test "$DFT_LWR_MODEL" = "libtool"; then
21490                 TEST_ARGS="${TEST_DEPS}"
21491                 TEST_ARG2="${TEST_DEP2}"
21492                 TINFO_LDFLAGS="-L${LIB_DIR}"
21493                 TINFO_LIBS="$TEST_ARGS"
21494                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21495                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21496         else
21497                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21498                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21499                 if test "x$with_term_driver" != xno ; then
21500                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21501                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21502                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21503                 else
21504                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21505                         TINFO_LIBS="$TEST_ARGS"
21506                 fi
21507                 TINFO_LDFLAGS="-L${LIB_DIR}"
21508                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21509         fi
21510 else
21511         # the next lines are needed for linking libtic over libncurses
21512         TINFO_NAME=${LIB_NAME}
21513         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21514         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
21515         if test "x$with_tic_depends" = xyes ; then
21516                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21517         else
21518                 TICS_LIST="$SHLIB_LIST"
21519         fi
21520
21521         TINFO_LDFLAGS="-L${LIB_DIR}"
21522         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21523 fi
21524
21525 if test "$DFT_LWR_MODEL" = shared ; then
21526         case $cf_cv_system_name in #(vi
21527         cygwin*|msys*)
21528                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21529                 TINFO_SUFFIX=.dll
21530                 ;;
21531         esac
21532 fi
21533
21534 if test "x$with_dlsym" = xyes ; then
21535
21536 # remove dl library from $TICS_LIST
21537 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21538
21539 fi
21540
21541 if test "$DFT_LWR_MODEL" = "libtool"; then
21542     OBJEXT=lo
21543 fi
21544
21545 # needed for Ada95
21546 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21547
21548 case $DFT_LWR_MODEL in
21549 normal|debug|profile)
21550
21551 if test "$GCC" = yes ; then
21552         case $cf_cv_system_name in #(
21553         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
21554                 LDFLAGS_STATIC=
21555                 LDFLAGS_SHARED=
21556                 ;;
21557     *)  #( normally, except when broken
21558         LDFLAGS_STATIC=-static
21559         LDFLAGS_SHARED=-dynamic
21560         ;;
21561     esac
21562 else
21563         case $cf_cv_system_name in #(
21564         aix[4-7]*)      #( from ld manpage
21565                 LDFLAGS_STATIC=-bstatic
21566                 LDFLAGS_SHARED=-bdynamic
21567                 ;;
21568         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
21569                 # We could also use just "archive" and "shared".
21570                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21571                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21572                 ;;
21573         irix*)          #( from ld manpage IRIX64
21574                 LDFLAGS_STATIC=-Bstatic
21575                 LDFLAGS_SHARED=-Bdynamic
21576                 ;;
21577         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
21578                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21579                 LDFLAGS_STATIC=-noso
21580                 LDFLAGS_SHARED=-so_archive
21581                 ;;
21582         solaris2*)
21583                 LDFLAGS_STATIC=-Bstatic
21584                 LDFLAGS_SHARED=-Bdynamic
21585                 ;;
21586         esac
21587 fi
21588
21589 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21590 then
21591         echo "$as_me:21591: checking if linker supports switching between static/dynamic" >&5
21592 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21593
21594         rm -f libconftest.a
21595         cat >conftest.$ac_ext <<EOF
21596 #line 21596 "configure"
21597 #include <stdio.h>
21598 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21599 EOF
21600         if { (eval echo "$as_me:21600: \"$ac_compile\"") >&5
21601   (eval $ac_compile) 2>&5
21602   ac_status=$?
21603   echo "$as_me:21603: \$? = $ac_status" >&5
21604   (exit $ac_status); } ; then
21605                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21606                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21607         fi
21608         rm -f conftest.*
21609
21610         cf_save_LIBS="$LIBS"
21611
21612         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21613         cat >conftest.$ac_ext <<_ACEOF
21614 #line 21614 "configure"
21615 #include "confdefs.h"
21616
21617 #line 21617 "configure"
21618 #include <stdio.h>
21619 int cf_ldflags_static(FILE *fp);
21620
21621 int
21622 main ()
21623 {
21624
21625         return cf_ldflags_static(stdin);
21626
21627   ;
21628   return 0;
21629 }
21630 _ACEOF
21631 rm -f conftest.$ac_objext conftest$ac_exeext
21632 if { (eval echo "$as_me:21632: \"$ac_link\"") >&5
21633   (eval $ac_link) 2>&5
21634   ac_status=$?
21635   echo "$as_me:21635: \$? = $ac_status" >&5
21636   (exit $ac_status); } &&
21637          { ac_try='test -s conftest$ac_exeext'
21638   { (eval echo "$as_me:21638: \"$ac_try\"") >&5
21639   (eval $ac_try) 2>&5
21640   ac_status=$?
21641   echo "$as_me:21641: \$? = $ac_status" >&5
21642   (exit $ac_status); }; }; then
21643
21644         # some linkers simply ignore the -dynamic
21645         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
21646         *static*) # (vi
21647                 cf_ldflags_static=no
21648                 ;;
21649         *)
21650                 cf_ldflags_static=yes
21651                 ;;
21652         esac
21653
21654 else
21655   echo "$as_me: failed program was:" >&5
21656 cat conftest.$ac_ext >&5
21657 cf_ldflags_static=no
21658 fi
21659 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21660
21661         rm -f libconftest.*
21662         LIBS="$cf_save_LIBS"
21663
21664         echo "$as_me:21664: result: $cf_ldflags_static" >&5
21665 echo "${ECHO_T}$cf_ldflags_static" >&6
21666
21667         if test $cf_ldflags_static != yes
21668         then
21669                 LDFLAGS_STATIC=
21670                 LDFLAGS_SHARED=
21671         fi
21672 else
21673         LDFLAGS_STATIC=
21674         LDFLAGS_SHARED=
21675 fi
21676
21677         ;;
21678 esac
21679
21680 echo "$as_me:21680: checking where we will install curses.h" >&5
21681 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21682
21683 includesubdir=
21684 if test "$with_overwrite" = no && \
21685  ( test "x$includedir" = 'x${prefix}/include' || \
21686    test "x$includedir" = "x${prefix}/include" )
21687 then
21688         includesubdir="/ncurses${LIB_SUFFIX}"
21689 fi
21690 echo "$as_me:21690: result: ${includedir}${includesubdir}" >&5
21691 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21692
21693 ### Resolve a conflict between normal and wide-curses by forcing applications
21694 ### that will need libutf8 to add it to their configure script.
21695 if test "$with_overwrite" != no ; then
21696 if test "$NCURSES_LIBUTF8" = 1 ; then
21697         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21698         { echo "$as_me:21698: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21699 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21700 fi
21701 fi
21702 WITH_OVERWRITE=$with_overwrite
21703
21704 # used to separate tack out of the tree
21705 NCURSES_TREE=
21706
21707 ### predefined stuff for the test programs
21708
21709 cat >>confdefs.h <<\EOF
21710 #define HAVE_SLK_COLOR 1
21711 EOF
21712
21713 ### Construct the list of subdirectories for which we'll customize makefiles
21714 ### with the appropriate compile-rules.
21715
21716 echo "$as_me:21716: checking for src modules" >&5
21717 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21718
21719 # dependencies and linker-arguments for test-programs
21720 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21721 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21722 if test "$DFT_LWR_MODEL" = "libtool"; then
21723         TEST_ARGS="${TEST_DEPS}"
21724         TEST_ARG2="${TEST_DEP2}"
21725 else
21726         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21727         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
21728 fi
21729
21730 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
21731 cf_cv_src_modules=
21732 for cf_dir in $modules_to_build
21733 do
21734         if test -f $srcdir/$cf_dir/modules; then
21735
21736                 # We may/may not have tack in the distribution, though the
21737                 # makefile is.
21738                 if test $cf_dir = tack ; then
21739                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
21740                                 continue
21741                         fi
21742                 fi
21743
21744                 if test -z "$cf_cv_src_modules"; then
21745                         cf_cv_src_modules=$cf_dir
21746                 else
21747                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
21748                 fi
21749
21750                 # Make the ncurses_cfg.h file record the library interface files as
21751                 # well.  These are header files that are the same name as their
21752                 # directory.  Ncurses is the only library that does not follow
21753                 # that pattern.
21754                 if test $cf_dir = tack ; then
21755                         continue
21756                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
21757
21758 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21759
21760                         cat >>confdefs.h <<EOF
21761 #define HAVE_${cf_have_include}_H 1
21762 EOF
21763
21764                         cat >>confdefs.h <<EOF
21765 #define HAVE_LIB${cf_have_include} 1
21766 EOF
21767
21768                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
21769                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
21770                         if test "$DFT_LWR_MODEL" = "libtool"; then
21771                                 TEST_ARGS="${TEST_DEPS}"
21772                                 TEST_ARG2="${TEST_DEP2}"
21773                         else
21774                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
21775                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
21776                         fi
21777                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
21778                 fi
21779         fi
21780 done
21781 echo "$as_me:21781: result: $cf_cv_src_modules" >&5
21782 echo "${ECHO_T}$cf_cv_src_modules" >&6
21783
21784 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21785 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21786
21787 SRC_SUBDIRS=
21788 if test "x$cf_with_manpages" != xno ; then
21789         SRC_SUBDIRS="$SRC_SUBDIRS man"
21790 fi
21791 SRC_SUBDIRS="$SRC_SUBDIRS include"
21792 for cf_dir in $cf_cv_src_modules
21793 do
21794         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21795 done
21796 if test "x$cf_with_tests" != "xno" ; then
21797         SRC_SUBDIRS="$SRC_SUBDIRS test"
21798 fi
21799 # always make this, to install the ncurses-config script
21800 SRC_SUBDIRS="$SRC_SUBDIRS misc"
21801 if test "$cf_with_cxx_binding" != no; then
21802         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
21803         SRC_SUBDIRS="$SRC_SUBDIRS c++"
21804 fi
21805
21806 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21807 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
21808
21809 ADA_SUBDIRS=
21810 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
21811         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
21812         ADA_SUBDIRS="gen src"
21813         if test "x$cf_with_tests" != "xno" ; then
21814                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
21815         fi
21816 fi
21817
21818 SUB_MAKEFILES=
21819 for cf_dir in $SRC_SUBDIRS
21820 do
21821         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
21822 done
21823
21824 if test -n "$ADA_SUBDIRS"; then
21825         for cf_dir in $ADA_SUBDIRS
21826         do
21827                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
21828         done
21829
21830 fi
21831
21832 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21833    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
21834    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
21835 fi
21836
21837 DIRS_TO_MAKE="lib"
21838 for cf_item in $cf_list_models
21839 do
21840
21841         case $cf_item in
21842         libtool) cf_subdir='obj_lo'  ;;
21843         normal)  cf_subdir='objects' ;;
21844         debug)   cf_subdir='obj_g' ;;
21845         profile) cf_subdir='obj_p' ;;
21846         shared)
21847                 case $cf_cv_system_name in #(vi
21848                 cygwin|msys) #(vi
21849                         cf_subdir='objects' ;;
21850                 *)
21851                         cf_subdir='obj_s' ;;
21852                 esac
21853         esac
21854
21855         for cf_item2 in $DIRS_TO_MAKE
21856         do
21857                 test $cf_item2 = $cf_subdir && break
21858         done
21859         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21860 done
21861 for cf_dir in $DIRS_TO_MAKE
21862 do
21863         test ! -d $cf_dir && mkdir $cf_dir
21864 done
21865
21866 # symbols that differ when compiling Ada95 by itself.
21867 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
21868
21869 # values to use as strings
21870
21871 cat >>confdefs.h <<EOF
21872 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
21873 EOF
21874
21875 cat >>confdefs.h <<EOF
21876 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
21877 EOF
21878
21879 ### Now that we're done running tests, add the compiler-warnings, if any
21880
21881 cf_fix_cppflags=no
21882 cf_new_cflags=
21883 cf_new_cppflags=
21884 cf_new_extra_cppflags=
21885
21886 for cf_add_cflags in $EXTRA_CFLAGS
21887 do
21888 case $cf_fix_cppflags in
21889 no)
21890         case $cf_add_cflags in #(vi
21891         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
21892                 case $cf_add_cflags in
21893                 -D*)
21894                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21895
21896                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21897                                 && test -z "${cf_tst_cflags}" \
21898                                 && cf_fix_cppflags=yes
21899
21900                         if test $cf_fix_cppflags = yes ; then
21901                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21902                                 continue
21903                         elif test "${cf_tst_cflags}" = "\"'" ; then
21904                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21905                                 continue
21906                         fi
21907                         ;;
21908                 esac
21909                 case "$CPPFLAGS" in
21910                 *$cf_add_cflags) #(vi
21911                         ;;
21912                 *) #(vi
21913                         case $cf_add_cflags in #(vi
21914                         -D*)
21915                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21916
21917 CPPFLAGS=`echo "$CPPFLAGS" | \
21918         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21919                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21920
21921                                 ;;
21922                         esac
21923                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
21924                         ;;
21925                 esac
21926                 ;;
21927         *)
21928                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
21929                 ;;
21930         esac
21931         ;;
21932 yes)
21933         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21934
21935         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21936
21937         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21938                 && test -z "${cf_tst_cflags}" \
21939                 && cf_fix_cppflags=no
21940         ;;
21941 esac
21942 done
21943
21944 if test -n "$cf_new_cflags" ; then
21945
21946         CFLAGS="$CFLAGS $cf_new_cflags"
21947 fi
21948
21949 if test -n "$cf_new_cppflags" ; then
21950
21951         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
21952 fi
21953
21954 if test -n "$cf_new_extra_cppflags" ; then
21955
21956         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
21957 fi
21958
21959 ### Define substitutions for header files to avoid name-pollution
21960
21961 if test "x$cf_cv_have_tcgetattr" = xyes ; then
21962         HAVE_TCGETATTR=1
21963 else
21964         HAVE_TCGETATTR=0
21965 fi
21966
21967 if test "x$ac_cv_header_stdint_h" = xyes ; then
21968         HAVE_STDINT_H=1
21969 else
21970         HAVE_STDINT_H=0
21971 fi
21972
21973 if test "x$ac_cv_header_termio_h" = xyes ; then
21974         HAVE_TERMIO_H=1
21975 else
21976         HAVE_TERMIO_H=0
21977 fi
21978
21979 if test "x$ac_cv_header_termios_h" = xyes ; then
21980         HAVE_TERMIOS_H=1
21981 else
21982         HAVE_TERMIOS_H=0
21983 fi
21984
21985 ################################################################################
21986 test "x$use_database" = xyes && \
21987 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
21988
21989 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
21990 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
21991
21992 if test "x$enable_pc_files" = xyes ; then \
21993 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
21994 MAKE_PC_FILES=
21995 else
21996 MAKE_PC_FILES="#"
21997 fi
21998
21999 # Extract the first word of "tic", so it can be a program name with args.
22000 set dummy tic; ac_word=$2
22001 echo "$as_me:22001: checking for $ac_word" >&5
22002 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22003 if test "${ac_cv_path_TIC_PATH+set}" = set; then
22004   echo $ECHO_N "(cached) $ECHO_C" >&6
22005 else
22006   case $TIC_PATH in
22007   [\\/]* | ?:[\\/]*)
22008   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22009   ;;
22010   *)
22011   ac_save_IFS=$IFS; IFS=$ac_path_separator
22012 ac_dummy="$PATH:/usr/local/ncurses/bin"
22013 for ac_dir in $ac_dummy; do
22014   IFS=$ac_save_IFS
22015   test -z "$ac_dir" && ac_dir=.
22016   if $as_executable_p "$ac_dir/$ac_word"; then
22017    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
22018    echo "$as_me:22018: found $ac_dir/$ac_word" >&5
22019    break
22020 fi
22021 done
22022
22023   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22024   ;;
22025 esac
22026 fi
22027 TIC_PATH=$ac_cv_path_TIC_PATH
22028
22029 if test -n "$TIC_PATH"; then
22030   echo "$as_me:22030: result: $TIC_PATH" >&5
22031 echo "${ECHO_T}$TIC_PATH" >&6
22032 else
22033   echo "$as_me:22033: result: no" >&5
22034 echo "${ECHO_T}no" >&6
22035 fi
22036
22037 if test -n "$FALLBACK_LIST"
22038 then
22039         if test "$TIC_PATH" = unknown
22040         then
22041                 { echo "$as_me:22041: WARNING: no tic program found for fallbacks" >&5
22042 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22043         fi
22044 fi
22045
22046 if test "x$cf_with_tests" != xno ; then
22047         MAKE_TESTS=
22048 else
22049         MAKE_TESTS="#"
22050 fi
22051
22052 ADAHTML_DIR=../../doc/html/ada
22053
22054 # these could be configurable, but are not currently
22055 PANEL_NAME=panel
22056 MENU_NAME=menu
22057 FORM_NAME=form
22058 CXX_NAME=ncurses++
22059
22060 # workaround for g++ versus Solaris (20131116)
22061 case $cf_cv_system_name in #(vi
22062 solaris2*) #(vi
22063         case "x$CPPFLAGS" in #(vi
22064         *-D_XOPEN_SOURCE_EXTENDED*)
22065                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
22066
22067 echo "${as_me:-configure}:22067: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22068
22069                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22070                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22071                 ;;
22072         esac
22073         ;;
22074 esac
22075
22076 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
22077 case "x$NCURSES_OSPEED" in #(vi
22078 *short*) #(vi
22079         cf_compatible=1
22080         ;;
22081 *)
22082         cf_compatible=0
22083         ;;
22084 esac
22085
22086 cat >>confdefs.h <<EOF
22087 #define NCURSES_OSPEED_COMPAT $cf_compatible
22088 EOF
22089
22090 case "x$cf_cv_typeof_chtype" in
22091 xshort|xint|xlong)
22092         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22093         ;;
22094 esac
22095
22096 case "x$cf_cv_typeof_mmask_t" in
22097 xshort|xint|xlong)
22098         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22099         ;;
22100 esac
22101
22102 # substitute into misc/Makefile to suppress
22103 # (un)install.data from the
22104 # (un)install rules.
22105 if test "x$cf_with_db_install" = "xno"; then
22106         MISC_INSTALL_DATA=
22107         MISC_UNINSTALL_DATA=
22108 else
22109         MISC_INSTALL_DATA=install.data
22110         MISC_UNINSTALL_DATA=uninstall.data
22111 fi
22112
22113 SUB_SCRIPTS=
22114
22115 if test -n "$PACKAGE"
22116 then
22117         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22118         export PACKAGE
22119         echo "package: $PACKAGE"
22120 fi
22121
22122 UNALTERED_SYMS=
22123 cf_filter_syms=no
22124
22125 if test -n "$RESULTING_SYMS"
22126 then
22127         case $cf_cv_abi_version in
22128         [6789])
22129                 test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
22130
22131 echo "${as_me:-configure}:22131: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22132
22133                 cf_filter_syms=yes
22134                 ;;
22135         *)
22136                 test -n "$verbose" && echo "    will map symbols to default ABI" 1>&6
22137
22138 echo "${as_me:-configure}:22138: testing will map symbols to default ABI ..." 1>&5
22139
22140                 ;;
22141         esac
22142 fi
22143
22144 if test "x$WILDCARD_SYMS" = xno
22145 then
22146         cf_filter_syms=yes
22147 fi
22148
22149 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22150 if test $cf_filter_syms = yes
22151 then
22152         RESULTING_SYMS=resulting.map
22153 fi
22154
22155 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"
22156 ac_config_commands="$ac_config_commands default"
22157 cat >confcache <<\_ACEOF
22158 # This file is a shell script that caches the results of configure
22159 # tests run on this system so they can be shared between configure
22160 # scripts and configure runs, see configure's option --config-cache.
22161 # It is not useful on other systems.  If it contains results you don't
22162 # want to keep, you may remove or edit it.
22163 #
22164 # config.status only pays attention to the cache file if you give it
22165 # the --recheck option to rerun configure.
22166 #
22167 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22168 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22169 # following values.
22170
22171 _ACEOF
22172
22173 # The following way of writing the cache mishandles newlines in values,
22174 # but we know of no workaround that is simple, portable, and efficient.
22175 # So, don't put newlines in cache variables' values.
22176 # Ultrix sh set writes to stderr and can't be redirected directly,
22177 # and sets the high bit in the cache file unless we assign to the vars.
22178 {
22179   (set) 2>&1 |
22180     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22181     *ac_space=\ *)
22182       # `set' does not quote correctly, so add quotes (double-quote
22183       # substitution turns \\\\ into \\, and sed turns \\ into \).
22184       sed -n \
22185         "s/'/'\\\\''/g;
22186           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22187       ;;
22188     *)
22189       # `set' quotes correctly as required by POSIX, so do not add quotes.
22190       sed -n \
22191         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22192       ;;
22193     esac;
22194 } |
22195   sed '
22196      t clear
22197      : clear
22198      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22199      t end
22200      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22201      : end' >>confcache
22202 if cmp -s $cache_file confcache; then :; else
22203   if test -w $cache_file; then
22204     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22205     cat confcache >$cache_file
22206   else
22207     echo "not updating unwritable cache $cache_file"
22208   fi
22209 fi
22210 rm -f confcache
22211
22212 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22213 # Let make expand exec_prefix.
22214 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22215
22216 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22217 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22218 # trailing colons and then remove the whole line if VPATH becomes empty
22219 # (actually we leave an empty line to preserve line numbers).
22220 if test "x$srcdir" = x.; then
22221   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22222 s/:*\$(srcdir):*/:/;
22223 s/:*\${srcdir}:*/:/;
22224 s/:*@srcdir@:*/:/;
22225 s/^\([^=]*=[    ]*\):*/\1/;
22226 s/:*$//;
22227 s/^[^=]*=[      ]*$//;
22228 }'
22229 fi
22230
22231 DEFS=-DHAVE_CONFIG_H
22232
22233 : ${CONFIG_STATUS=./config.status}
22234 ac_clean_files_save=$ac_clean_files
22235 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22236 { echo "$as_me:22236: creating $CONFIG_STATUS" >&5
22237 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22238 cat >$CONFIG_STATUS <<_ACEOF
22239 #! $SHELL
22240 # Generated automatically by configure.
22241 # Run this file to recreate the current configuration.
22242 # Compiler output produced by configure, useful for debugging
22243 # configure, is in config.log if it exists.
22244
22245 debug=false
22246 SHELL=\${CONFIG_SHELL-$SHELL}
22247 ac_cs_invocation="\$0 \$@"
22248
22249 _ACEOF
22250
22251 cat >>$CONFIG_STATUS <<\_ACEOF
22252 # Be Bourne compatible
22253 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22254   emulate sh
22255   NULLCMD=:
22256 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22257   set -o posix
22258 fi
22259
22260 # Name of the executable.
22261 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22262
22263 if expr a : '\(a\)' >/dev/null 2>&1; then
22264   as_expr=expr
22265 else
22266   as_expr=false
22267 fi
22268
22269 rm -f conf$$ conf$$.exe conf$$.file
22270 echo >conf$$.file
22271 if ln -s conf$$.file conf$$ 2>/dev/null; then
22272   # We could just check for DJGPP; but this test a) works b) is more generic
22273   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22274   if test -f conf$$.exe; then
22275     # Don't use ln at all; we don't have any links
22276     as_ln_s='cp -p'
22277   else
22278     as_ln_s='ln -s'
22279   fi
22280 elif ln conf$$.file conf$$ 2>/dev/null; then
22281   as_ln_s=ln
22282 else
22283   as_ln_s='cp -p'
22284 fi
22285 rm -f conf$$ conf$$.exe conf$$.file
22286
22287 as_executable_p="test -f"
22288
22289 # Support unset when possible.
22290 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22291   as_unset=unset
22292 else
22293   as_unset=false
22294 fi
22295
22296 # NLS nuisances.
22297 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22298 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22299 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22300 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22301 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22302 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22303 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22304 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22305
22306 # IFS
22307 # We need space, tab and new line, in precisely that order.
22308 as_nl='
22309 '
22310 IFS="   $as_nl"
22311
22312 # CDPATH.
22313 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22314
22315 exec 6>&1
22316
22317 _ACEOF
22318
22319 # Files that config.status was made for.
22320 if test -n "$ac_config_files"; then
22321   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22322 fi
22323
22324 if test -n "$ac_config_headers"; then
22325   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22326 fi
22327
22328 if test -n "$ac_config_links"; then
22329   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22330 fi
22331
22332 if test -n "$ac_config_commands"; then
22333   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22334 fi
22335
22336 cat >>$CONFIG_STATUS <<\EOF
22337
22338 ac_cs_usage="\
22339 \`$as_me' instantiates files from templates according to the
22340 current configuration.
22341
22342 Usage: $0 [OPTIONS] [FILE]...
22343
22344   -h, --help       print this help, then exit
22345   -V, --version    print version number, then exit
22346   -d, --debug      don't remove temporary files
22347       --recheck    update $as_me by reconfiguring in the same conditions
22348   --file=FILE[:TEMPLATE]
22349                    instantiate the configuration file FILE
22350   --header=FILE[:TEMPLATE]
22351                    instantiate the configuration header FILE
22352
22353 Configuration files:
22354 $config_files
22355
22356 Configuration headers:
22357 $config_headers
22358
22359 Configuration commands:
22360 $config_commands
22361
22362 Report bugs to <dickey@invisible-island.net>."
22363 EOF
22364
22365 cat >>$CONFIG_STATUS <<EOF
22366 ac_cs_version="\\
22367 config.status
22368 configured by $0, generated by GNU Autoconf 2.52.20141204,
22369   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22370
22371 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22372 Free Software Foundation, Inc.
22373 This config.status script is free software; the Free Software Foundation
22374 gives unlimited permission to copy, distribute and modify it."
22375 srcdir=$srcdir
22376 INSTALL="$INSTALL"
22377 EOF
22378
22379 cat >>$CONFIG_STATUS <<\EOF
22380 # If no file are specified by the user, then we need to provide default
22381 # value.  By we need to know if files were specified by the user.
22382 ac_need_defaults=:
22383 while test $# != 0
22384 do
22385   case $1 in
22386   --*=*)
22387     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22388     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22389     shift
22390     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22391     shift
22392     ;;
22393   -*);;
22394   *) # This is not an option, so the user has probably given explicit
22395      # arguments.
22396      ac_need_defaults=false;;
22397   esac
22398
22399   case $1 in
22400   # Handling of the options.
22401 EOF
22402 cat >>$CONFIG_STATUS <<EOF
22403   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22404     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22405     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22406 EOF
22407 cat >>$CONFIG_STATUS <<\EOF
22408   --version | --vers* | -V )
22409     echo "$ac_cs_version"; exit 0 ;;
22410   --he | --h)
22411     # Conflict between --help and --header
22412     { { echo "$as_me:22412: error: ambiguous option: $1
22413 Try \`$0 --help' for more information." >&5
22414 echo "$as_me: error: ambiguous option: $1
22415 Try \`$0 --help' for more information." >&2;}
22416    { (exit 1); exit 1; }; };;
22417   --help | --hel | -h )
22418     echo "$ac_cs_usage"; exit 0 ;;
22419   --debug | --d* | -d )
22420     debug=: ;;
22421   --file | --fil | --fi | --f )
22422     shift
22423     CONFIG_FILES="$CONFIG_FILES $1"
22424     ac_need_defaults=false;;
22425   --header | --heade | --head | --hea )
22426     shift
22427     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22428     ac_need_defaults=false;;
22429
22430   # This is an error.
22431   -*) { { echo "$as_me:22431: error: unrecognized option: $1
22432 Try \`$0 --help' for more information." >&5
22433 echo "$as_me: error: unrecognized option: $1
22434 Try \`$0 --help' for more information." >&2;}
22435    { (exit 1); exit 1; }; } ;;
22436
22437   *) ac_config_targets="$ac_config_targets $1" ;;
22438
22439   esac
22440   shift
22441 done
22442
22443 exec 5>>config.log
22444 cat >&5 << _ACEOF
22445
22446 ## ----------------------- ##
22447 ## Running config.status.  ##
22448 ## ----------------------- ##
22449
22450 This file was extended by $as_me 2.52.20141204, executed with
22451   CONFIG_FILES    = $CONFIG_FILES
22452   CONFIG_HEADERS  = $CONFIG_HEADERS
22453   CONFIG_LINKS    = $CONFIG_LINKS
22454   CONFIG_COMMANDS = $CONFIG_COMMANDS
22455   > $ac_cs_invocation
22456 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22457
22458 _ACEOF
22459 EOF
22460
22461 cat >>$CONFIG_STATUS <<EOF
22462 #
22463 # INIT-COMMANDS section.
22464 #
22465
22466 ### Special initialization commands, used to pass information from the
22467 ### configuration-run into config.status
22468
22469 AWK="$AWK"
22470 ALTERNATE_SYMS="$ALTERNATE_SYMS"
22471 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22472 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22473 ECHO_LD="$ECHO_LD"
22474 LDCONFIG="$LDCONFIG"
22475 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22476 LIB_NAME="$LIB_NAME"
22477 LIB_PREFIX="$LIB_PREFIX"
22478 LIB_SUBSETS="$LIB_SUBSETS"
22479 LIB_SUFFIX="$LIB_SUFFIX"
22480 LIB_TRACING="$LIB_TRACING"
22481 LN_S="$LN_S"
22482 MAKE_TERMINFO="$MAKE_TERMINFO"
22483 NCURSES_MAJOR="$NCURSES_MAJOR"
22484 NCURSES_MINOR="$NCURSES_MINOR"
22485 NCURSES_OSPEED="$NCURSES_OSPEED"
22486 NCURSES_PATCH="$NCURSES_PATCH"
22487 SRC_SUBDIRS="$SRC_SUBDIRS"
22488 TERMINFO="$TERMINFO"
22489 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22490 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22491 TICS_NAME="$TICS_NAME"
22492 TIC_PATH="$TIC_PATH"
22493 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22494 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22495 TINFO_NAME="$TINFO_NAME"
22496 TINFO_SUFFIX="$TINFO_SUFFIX"
22497 UNALTERED_SYMS="$UNALTERED_SYMS"
22498 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22499 WILDCARD_SYMS="$WILDCARD_SYMS"
22500 WITH_CURSES_H="$with_curses_h"
22501 WITH_ECHO="${enable_echo:=yes}"
22502 WITH_OVERWRITE="$with_overwrite"
22503 cf_LIST_MODELS="$cf_list_models"
22504 cf_cv_abi_version="$cf_cv_abi_version"
22505 cf_cv_do_relink="$cf_cv_do_relink"
22506 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22507 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22508 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22509 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22510 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22511 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22512 cf_cv_rel_version="$cf_cv_rel_version"
22513 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22514 cf_cv_shared_soname='$cf_cv_shared_soname'
22515 cf_cv_shlib_version="$cf_cv_shlib_version"
22516 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22517 cf_cv_system_name="$cf_cv_system_name"
22518 cf_cv_term_driver="$with_term_driver"
22519 cf_with_ada="$cf_with_ada"
22520 cf_with_cxx_binding="$cf_with_cxx_binding"
22521 cf_with_db_install="$cf_with_db_install"
22522 cf_with_manpages="$cf_with_manpages"
22523 cf_with_tests="$cf_with_tests"
22524 host="$host"
22525 target="$target"
22526 with_shared_cxx="$with_shared_cxx"
22527
22528 EOF
22529
22530 cat >>$CONFIG_STATUS <<\EOF
22531 for ac_config_target in $ac_config_targets
22532 do
22533   case "$ac_config_target" in
22534   # Handling of arguments.
22535   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22536   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22537   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22538   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22539   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22540   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22541   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22542   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22543   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22544   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22545   *) { { echo "$as_me:22545: error: invalid argument: $ac_config_target" >&5
22546 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22547    { (exit 1); exit 1; }; };;
22548   esac
22549 done
22550
22551 # If the user did not use the arguments to specify the items to instantiate,
22552 # then the envvar interface is used.  Set only those that are not.
22553 # We use the long form for the default assignment because of an extremely
22554 # bizarre bug on SunOS 4.1.3.
22555 if $ac_need_defaults; then
22556   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22557   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22558   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22559 fi
22560
22561 # Create a temporary directory, and hook for its removal unless debugging.
22562 $debug ||
22563 {
22564   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22565   trap '{ (exit 1); exit 1; }' 1 2 13 15
22566 }
22567
22568 # Create a (secure) tmp directory for tmp files.
22569 : ${TMPDIR=/tmp}
22570 {
22571   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22572   test -n "$tmp" && test -d "$tmp"
22573 }  ||
22574 {
22575   tmp=$TMPDIR/cs$$-$RANDOM
22576   (umask 077 && mkdir $tmp)
22577 } ||
22578 {
22579    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22580    { (exit 1); exit 1; }
22581 }
22582
22583 EOF
22584
22585 cat >>$CONFIG_STATUS <<EOF
22586
22587 #
22588 # CONFIG_FILES section.
22589 #
22590
22591 # No need to generate the scripts if there are no CONFIG_FILES.
22592 # This happens for instance when ./config.status config.h
22593 if test -n "\$CONFIG_FILES"; then
22594   # Protect against being on the right side of a sed subst in config.status.
22595   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22596    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22597 s,@SHELL@,$SHELL,;t t
22598 s,@exec_prefix@,$exec_prefix,;t t
22599 s,@prefix@,$prefix,;t t
22600 s,@program_transform_name@,$program_transform_name,;t t
22601 s,@bindir@,$bindir,;t t
22602 s,@sbindir@,$sbindir,;t t
22603 s,@libexecdir@,$libexecdir,;t t
22604 s,@datarootdir@,$datarootdir,;t t
22605 s,@datadir@,$datadir,;t t
22606 s,@sysconfdir@,$sysconfdir,;t t
22607 s,@sharedstatedir@,$sharedstatedir,;t t
22608 s,@localstatedir@,$localstatedir,;t t
22609 s,@libdir@,$libdir,;t t
22610 s,@includedir@,$includedir,;t t
22611 s,@oldincludedir@,$oldincludedir,;t t
22612 s,@infodir@,$infodir,;t t
22613 s,@mandir@,$mandir,;t t
22614 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22615 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22616 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22617 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22618 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22619 s,@build_alias@,$build_alias,;t t
22620 s,@host_alias@,$host_alias,;t t
22621 s,@target_alias@,$target_alias,;t t
22622 s,@ECHO_C@,$ECHO_C,;t t
22623 s,@ECHO_N@,$ECHO_N,;t t
22624 s,@ECHO_T@,$ECHO_T,;t t
22625 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22626 s,@DEFS@,$DEFS,;t t
22627 s,@LIBS@,$LIBS,;t t
22628 s,@top_builddir@,$top_builddir,;t t
22629 s,@EGREP@,$EGREP,;t t
22630 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22631 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22632 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22633 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22634 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22635 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22636 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22637 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22638 s,@VERSION@,$VERSION,;t t
22639 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
22640 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
22641 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
22642 s,@PACKAGE@,$PACKAGE,;t t
22643 s,@build@,$build,;t t
22644 s,@build_cpu@,$build_cpu,;t t
22645 s,@build_vendor@,$build_vendor,;t t
22646 s,@build_os@,$build_os,;t t
22647 s,@host@,$host,;t t
22648 s,@host_cpu@,$host_cpu,;t t
22649 s,@host_vendor@,$host_vendor,;t t
22650 s,@host_os@,$host_os,;t t
22651 s,@target@,$target,;t t
22652 s,@target_cpu@,$target_cpu,;t t
22653 s,@target_vendor@,$target_vendor,;t t
22654 s,@target_os@,$target_os,;t t
22655 s,@CC@,$CC,;t t
22656 s,@CFLAGS@,$CFLAGS,;t t
22657 s,@LDFLAGS@,$LDFLAGS,;t t
22658 s,@CPPFLAGS@,$CPPFLAGS,;t t
22659 s,@ac_ct_CC@,$ac_ct_CC,;t t
22660 s,@EXEEXT@,$EXEEXT,;t t
22661 s,@OBJEXT@,$OBJEXT,;t t
22662 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22663 s,@CPP@,$CPP,;t t
22664 s,@LDCONFIG@,$LDCONFIG,;t t
22665 s,@CXX@,$CXX,;t t
22666 s,@CXXFLAGS@,$CXXFLAGS,;t t
22667 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22668 s,@AWK@,$AWK,;t t
22669 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22670 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22671 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22672 s,@LINT@,$LINT,;t t
22673 s,@LINT_OPTS@,$LINT_OPTS,;t t
22674 s,@LN_S@,$LN_S,;t t
22675 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22676 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22677 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22678 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22679 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
22680 s,@SET_MAKE@,$SET_MAKE,;t t
22681 s,@CTAGS@,$CTAGS,;t t
22682 s,@ETAGS@,$ETAGS,;t t
22683 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22684 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22685 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22686 s,@RANLIB@,$RANLIB,;t t
22687 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22688 s,@LD@,$LD,;t t
22689 s,@ac_ct_LD@,$ac_ct_LD,;t t
22690 s,@AR@,$AR,;t t
22691 s,@ac_ct_AR@,$ac_ct_AR,;t t
22692 s,@NM@,$NM,;t t
22693 s,@ac_ct_NM@,$ac_ct_NM,;t t
22694 s,@ARFLAGS@,$ARFLAGS,;t t
22695 s,@DESTDIR@,$DESTDIR,;t t
22696 s,@BUILD_CC@,$BUILD_CC,;t t
22697 s,@BUILD_CPP@,$BUILD_CPP,;t t
22698 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22699 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22700 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22701 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22702 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22703 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22704 s,@cf_list_models@,$cf_list_models,;t t
22705 s,@ABI_VERSION@,$ABI_VERSION,;t t
22706 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
22707 s,@LIBTOOL@,$LIBTOOL,;t t
22708 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22709 s,@LT_UNDEF@,$LT_UNDEF,;t t
22710 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22711 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22712 s,@LIB_CREATE@,$LIB_CREATE,;t t
22713 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22714 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22715 s,@LIB_PREP@,$LIB_PREP,;t t
22716 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22717 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22718 s,@LIB_LINK@,$LIB_LINK,;t t
22719 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22720 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
22721 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
22722 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
22723 s,@TICS_NAME@,$TICS_NAME,;t t
22724 s,@TINFO_NAME@,$TINFO_NAME,;t t
22725 s,@LIB_NAME@,$LIB_NAME,;t t
22726 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
22727 s,@CC_G_OPT@,$CC_G_OPT,;t t
22728 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
22729 s,@LD_MODEL@,$LD_MODEL,;t t
22730 s,@shlibdir@,$shlibdir,;t t
22731 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
22732 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
22733 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
22734 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
22735 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
22736 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
22737 s,@LINK_PROGS@,$LINK_PROGS,;t t
22738 s,@LINK_TESTS@,$LINK_TESTS,;t t
22739 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22740 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
22741 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
22742 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
22743 s,@RPATH_LIST@,$RPATH_LIST,;t t
22744 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
22745 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
22746 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
22747 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
22748 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22749 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
22750 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
22751 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
22752 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
22753 s,@XTERM_KBS@,$XTERM_KBS,;t t
22754 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
22755 s,@TERMINFO@,$TERMINFO,;t t
22756 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
22757 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
22758 s,@TERMPATH@,$TERMPATH,;t t
22759 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
22760 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
22761 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
22762 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
22763 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
22764 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
22765 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
22766 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
22767 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
22768 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
22769 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
22770 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
22771 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
22772 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
22773 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
22774 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
22775 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
22776 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
22777 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
22778 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
22779 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
22780 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
22781 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
22782 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
22783 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
22784 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
22785 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
22786 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
22787 s,@PTHREAD@,$PTHREAD,;t t
22788 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
22789 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
22790 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
22791 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
22792 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
22793 s,@ECHO_LT@,$ECHO_LT,;t t
22794 s,@ECHO_LD@,$ECHO_LD,;t t
22795 s,@RULE_CC@,$RULE_CC,;t t
22796 s,@SHOW_CC@,$SHOW_CC,;t t
22797 s,@ECHO_CC@,$ECHO_CC,;t t
22798 s,@ECHO_LINK@,$ECHO_LINK,;t t
22799 s,@ADAFLAGS@,$ADAFLAGS,;t t
22800 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
22801 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
22802 s,@ADA_TRACE@,$ADA_TRACE,;t t
22803 s,@MATH_LIB@,$MATH_LIB,;t t
22804 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
22805 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
22806 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
22807 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
22808 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
22809 s,@TEST_LIBS@,$TEST_LIBS,;t t
22810 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
22811 s,@CXXCPP@,$CXXCPP,;t t
22812 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
22813 s,@CXX_AR@,$CXX_AR,;t t
22814 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
22815 s,@CXXLIBS@,$CXXLIBS,;t t
22816 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
22817 s,@gnat_exists@,$gnat_exists,;t t
22818 s,@M4_exists@,$M4_exists,;t t
22819 s,@cf_ada_make@,$cf_ada_make,;t t
22820 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
22821 s,@cf_compile_generics@,$cf_compile_generics,;t t
22822 s,@cf_generic_objects@,$cf_generic_objects,;t t
22823 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
22824 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
22825 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
22826 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
22827 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
22828 s,@cf_ada_package@,$cf_ada_package,;t t
22829 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
22830 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
22831 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
22832 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
22833 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
22834 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
22835 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
22836 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
22837 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
22838 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
22839 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
22840 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
22841 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
22842 s,@TICS_LIBS@,$TICS_LIBS,;t t
22843 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
22844 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
22845 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
22846 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
22847 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
22848 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
22849 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
22850 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
22851 s,@includesubdir@,$includesubdir,;t t
22852 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
22853 s,@TICS_LIST@,$TICS_LIST,;t t
22854 s,@TINFO_LIST@,$TINFO_LIST,;t t
22855 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
22856 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
22857 s,@TEST_ARGS@,$TEST_ARGS,;t t
22858 s,@TEST_DEPS@,$TEST_DEPS,;t t
22859 s,@TEST_ARG2@,$TEST_ARG2,;t t
22860 s,@TEST_DEP2@,$TEST_DEP2,;t t
22861 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
22862 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
22863 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
22864 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
22865 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
22866 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
22867 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
22868 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
22869 s,@cross_compiling@,$cross_compiling,;t t
22870 s,@TIC_PATH@,$TIC_PATH,;t t
22871 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
22872 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
22873 s,@PANEL_NAME@,$PANEL_NAME,;t t
22874 s,@MENU_NAME@,$MENU_NAME,;t t
22875 s,@FORM_NAME@,$FORM_NAME,;t t
22876 s,@CXX_NAME@,$CXX_NAME,;t t
22877 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
22878 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
22879 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
22880 CEOF
22881
22882 EOF
22883
22884   cat >>$CONFIG_STATUS <<\EOF
22885   # Split the substitutions into bite-sized pieces for seds with
22886   # small command number limits, like on Digital OSF/1 and HP-UX.
22887   ac_max_sed_lines=48
22888   ac_sed_frag=1 # Number of current file.
22889   ac_beg=1 # First line for current file.
22890   ac_end=$ac_max_sed_lines # Line after last line for current file.
22891   ac_more_lines=:
22892   ac_sed_cmds=
22893   while $ac_more_lines; do
22894     if test $ac_beg -gt 1; then
22895       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22896     else
22897       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22898     fi
22899     if test ! -s $tmp/subs.frag; then
22900       ac_more_lines=false
22901     else
22902       # The purpose of the label and of the branching condition is to
22903       # speed up the sed processing (if there are no `@' at all, there
22904       # is no need to browse any of the substitutions).
22905       # These are the two extra sed commands mentioned above.
22906       (echo ':t
22907   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22908       if test -z "$ac_sed_cmds"; then
22909         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
22910       else
22911         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22912       fi
22913       ac_sed_frag=`expr $ac_sed_frag + 1`
22914       ac_beg=$ac_end
22915       ac_end=`expr $ac_end + $ac_max_sed_lines`
22916     fi
22917   done
22918   if test -z "$ac_sed_cmds"; then
22919     ac_sed_cmds=cat
22920   fi
22921 fi # test -n "$CONFIG_FILES"
22922
22923 EOF
22924 cat >>$CONFIG_STATUS <<\EOF
22925 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22926   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22927   case $ac_file in
22928   - | *:- | *:-:* ) # input from stdin
22929         cat >$tmp/stdin
22930         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22931         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22932   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22933         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22934   * )   ac_file_in=$ac_file.in ;;
22935   esac
22936
22937   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22938   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22939          X"$ac_file" : 'X\(//\)[^/]' \| \
22940          X"$ac_file" : 'X\(//\)$' \| \
22941          X"$ac_file" : 'X\(/\)' \| \
22942          .     : '\(.\)' 2>/dev/null ||
22943 echo X"$ac_file" |
22944     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22945           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22946           /^X\(\/\/\)$/{ s//\1/; q; }
22947           /^X\(\/\).*/{ s//\1/; q; }
22948           s/.*/./; q'`
22949   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22950     { case "$ac_dir" in
22951   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22952   *)                      as_incr_dir=.;;
22953 esac
22954 as_dummy="$ac_dir"
22955 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22956   case $as_mkdir_dir in
22957     # Skip DOS drivespec
22958     ?:) as_incr_dir=$as_mkdir_dir ;;
22959     *)
22960       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22961       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22962     ;;
22963   esac
22964 done; }
22965
22966     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
22967     # A "../" for each directory in $ac_dir_suffix.
22968     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
22969   else
22970     ac_dir_suffix= ac_dots=
22971   fi
22972
22973   case $srcdir in
22974   .)  ac_srcdir=.
22975       if test -z "$ac_dots"; then
22976          ac_top_srcdir=.
22977       else
22978          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
22979       fi ;;
22980   [\\/]* | ?:[\\/]* )
22981       ac_srcdir=$srcdir$ac_dir_suffix;
22982       ac_top_srcdir=$srcdir ;;
22983   *) # Relative path.
22984     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
22985     ac_top_srcdir=$ac_dots$srcdir ;;
22986   esac
22987
22988   case $INSTALL in
22989   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22990   *) ac_INSTALL=$ac_dots$INSTALL ;;
22991   esac
22992
22993   if test x"$ac_file" != x-; then
22994     { echo "$as_me:22994: creating $ac_file" >&5
22995 echo "$as_me: creating $ac_file" >&6;}
22996     rm -f "$ac_file"
22997   fi
22998   # Let's still pretend it is `configure' which instantiates (i.e., don't
22999   # use $as_me), people would be surprised to read:
23000   #    /* config.h.  Generated automatically by config.status.  */
23001   configure_input="Generated automatically from `echo $ac_file_in |
23002                                                  sed 's,.*/,,'` by configure."
23003
23004   # First look for the input files in the build tree, otherwise in the
23005   # src tree.
23006   ac_file_inputs=`IFS=:
23007     for f in $ac_file_in; do
23008       case $f in
23009       -) echo $tmp/stdin ;;
23010       [\\/$]*)
23011          # Absolute (can't be DOS-style, as IFS=:)
23012          test -f "$f" || { { echo "$as_me:23012: error: cannot find input file: $f" >&5
23013 echo "$as_me: error: cannot find input file: $f" >&2;}
23014    { (exit 1); exit 1; }; }
23015          echo $f;;
23016       *) # Relative
23017          if test -f "$f"; then
23018            # Build tree
23019            echo $f
23020          elif test -f "$srcdir/$f"; then
23021            # Source tree
23022            echo $srcdir/$f
23023          else
23024            # /dev/null tree
23025            { { echo "$as_me:23025: error: cannot find input file: $f" >&5
23026 echo "$as_me: error: cannot find input file: $f" >&2;}
23027    { (exit 1); exit 1; }; }
23028          fi;;
23029       esac
23030     done` || { (exit 1); exit 1; }
23031 EOF
23032 cat >>$CONFIG_STATUS <<\EOF
23033   ac_warn_datarootdir=no
23034   if test x"$ac_file" != x-; then
23035     for ac_item in $ac_file_inputs
23036     do
23037       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23038       if test -n "$ac_seen"; then
23039         ac_used=`grep '@datarootdir@' $ac_item`
23040         if test -z "$ac_used"; then
23041           { echo "$as_me:23041: WARNING: datarootdir was used implicitly but not set:
23042 $ac_seen" >&5
23043 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23044 $ac_seen" >&2;}
23045           ac_warn_datarootdir=yes
23046         fi
23047       fi
23048       ac_seen=`grep '${datarootdir}' $ac_item`
23049       if test -n "$ac_seen"; then
23050         { echo "$as_me:23050: WARNING: datarootdir was used explicitly but not set:
23051 $ac_seen" >&5
23052 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23053 $ac_seen" >&2;}
23054         ac_warn_datarootdir=yes
23055       fi
23056     done
23057   fi
23058
23059 if test "x$ac_warn_datarootdir" = xyes; then
23060   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23061 fi
23062
23063 EOF
23064 cat >>$CONFIG_STATUS <<EOF
23065   sed "$ac_vpsub
23066 $extrasub
23067 EOF
23068 cat >>$CONFIG_STATUS <<\EOF
23069 :t
23070 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23071 s,@configure_input@,$configure_input,;t t
23072 s,@srcdir@,$ac_srcdir,;t t
23073 s,@top_srcdir@,$ac_top_srcdir,;t t
23074 s,@INSTALL@,$ac_INSTALL,;t t
23075 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23076   rm -f $tmp/stdin
23077   if test x"$ac_file" != x-; then
23078     cp $tmp/out $ac_file
23079
23080     for ac_name in prefix exec_prefix datarootdir
23081     do
23082         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23083         if test -n "$ac_seen"; then
23084             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
23085             if test -z "$ac_init"; then
23086               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23087               { echo "$as_me:23087: WARNING: Variable $ac_name is used but was not set:
23088 $ac_seen" >&5
23089 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23090 $ac_seen" >&2;}
23091             fi
23092         fi
23093     done
23094     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23095     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23096     if test -s $tmp/out; then
23097       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23098       { echo "$as_me:23098: WARNING: Some variables may not be substituted:
23099 $ac_seen" >&5
23100 echo "$as_me: WARNING: Some variables may not be substituted:
23101 $ac_seen" >&2;}
23102     fi
23103   else
23104     cat $tmp/out
23105   fi
23106   rm -f $tmp/out
23107
23108 done
23109 EOF
23110 cat >>$CONFIG_STATUS <<\EOF
23111
23112 #
23113 # CONFIG_HEADER section.
23114 #
23115
23116 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23117 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23118 #
23119 # ac_d sets the value in "#define NAME VALUE" lines.
23120 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23121 ac_dB='[        ].*$,\1#\2'
23122 ac_dC=' '
23123 ac_dD=',;t'
23124 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23125 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23126 ac_iB='\([      ]\),\1#\2define\3'
23127 ac_iC=' '
23128 ac_iD='\4,;t'
23129 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23130 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23131 ac_uB='$,\1#\2define\3'
23132 ac_uC=' '
23133 ac_uD=',;t'
23134
23135 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23136   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23137   case $ac_file in
23138   - | *:- | *:-:* ) # input from stdin
23139         cat >$tmp/stdin
23140         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23141         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23142   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23143         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23144   * )   ac_file_in=$ac_file.in ;;
23145   esac
23146
23147   test x"$ac_file" != x- && { echo "$as_me:23147: creating $ac_file" >&5
23148 echo "$as_me: creating $ac_file" >&6;}
23149
23150   # First look for the input files in the build tree, otherwise in the
23151   # src tree.
23152   ac_file_inputs=`IFS=:
23153     for f in $ac_file_in; do
23154       case $f in
23155       -) echo $tmp/stdin ;;
23156       [\\/$]*)
23157          # Absolute (can't be DOS-style, as IFS=:)
23158          test -f "$f" || { { echo "$as_me:23158: error: cannot find input file: $f" >&5
23159 echo "$as_me: error: cannot find input file: $f" >&2;}
23160    { (exit 1); exit 1; }; }
23161          echo $f;;
23162       *) # Relative
23163          if test -f "$f"; then
23164            # Build tree
23165            echo $f
23166          elif test -f "$srcdir/$f"; then
23167            # Source tree
23168            echo $srcdir/$f
23169          else
23170            # /dev/null tree
23171            { { echo "$as_me:23171: error: cannot find input file: $f" >&5
23172 echo "$as_me: error: cannot find input file: $f" >&2;}
23173    { (exit 1); exit 1; }; }
23174          fi;;
23175       esac
23176     done` || { (exit 1); exit 1; }
23177   # Remove the trailing spaces.
23178   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23179
23180 EOF
23181
23182 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23183 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23184 # be either 'cat' or 'sort'.
23185 cat confdefs.h | uniq >conftest.vals
23186
23187 # Break up conftest.vals because some shells have a limit on
23188 # the size of here documents, and old seds have small limits too.
23189
23190 rm -f conftest.tail
23191 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23192 while grep . conftest.vals >/dev/null
23193 do
23194   # Write chunks of a limited-size here document to conftest.frag.
23195   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23196   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23197   echo 'CEOF' >> $CONFIG_STATUS
23198   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23199   rm -f conftest.vals
23200   mv conftest.tail conftest.vals
23201 done
23202 rm -f conftest.vals
23203
23204 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23205 # marker @DEFS@.
23206 echo '  cat >> conftest.edit <<CEOF
23207 /@DEFS@/r conftest.frag
23208 /@DEFS@/d
23209 CEOF
23210 sed -f conftest.edit $tmp/in > $tmp/out
23211 rm -f $tmp/in
23212 mv $tmp/out $tmp/in
23213 rm -f conftest.edit conftest.frag
23214 ' >> $CONFIG_STATUS
23215
23216 cat >>$CONFIG_STATUS <<\EOF
23217   # Let's still pretend it is `configure' which instantiates (i.e., don't
23218   # use $as_me), people would be surprised to read:
23219   #    /* config.h.  Generated automatically by config.status.  */
23220   if test x"$ac_file" = x-; then
23221     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23222   else
23223     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23224   fi
23225   cat $tmp/in >>$tmp/config.h
23226   rm -f $tmp/in
23227   if test x"$ac_file" != x-; then
23228     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23229       { echo "$as_me:23229: $ac_file is unchanged" >&5
23230 echo "$as_me: $ac_file is unchanged" >&6;}
23231     else
23232       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23233          X"$ac_file" : 'X\(//\)[^/]' \| \
23234          X"$ac_file" : 'X\(//\)$' \| \
23235          X"$ac_file" : 'X\(/\)' \| \
23236          .     : '\(.\)' 2>/dev/null ||
23237 echo X"$ac_file" |
23238     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23239           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23240           /^X\(\/\/\)$/{ s//\1/; q; }
23241           /^X\(\/\).*/{ s//\1/; q; }
23242           s/.*/./; q'`
23243       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23244         { case "$ac_dir" in
23245   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23246   *)                      as_incr_dir=.;;
23247 esac
23248 as_dummy="$ac_dir"
23249 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23250   case $as_mkdir_dir in
23251     # Skip DOS drivespec
23252     ?:) as_incr_dir=$as_mkdir_dir ;;
23253     *)
23254       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23255       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23256     ;;
23257   esac
23258 done; }
23259
23260       fi
23261       rm -f $ac_file
23262       mv $tmp/config.h $ac_file
23263     fi
23264   else
23265     cat $tmp/config.h
23266     rm -f $tmp/config.h
23267   fi
23268 done
23269 EOF
23270 cat >>$CONFIG_STATUS <<\EOF
23271 #
23272 # CONFIG_COMMANDS section.
23273 #
23274 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23275   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23276   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23277
23278   case $ac_dest in
23279     default )
23280 if test "x$cf_with_tests" != xno ; then
23281
23282 for cf_dir in test
23283 do
23284         if test ! -d $srcdir/$cf_dir; then
23285                 continue
23286         elif test -f $srcdir/$cf_dir/programs; then
23287                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23288         fi
23289 done
23290
23291 fi
23292
23293 cf_prefix=$LIB_PREFIX
23294
23295 case $cf_cv_shlib_version in #(vi
23296 cygdll|msysdll|mingw)
23297         TINFO_NAME=$TINFO_ARG_SUFFIX
23298         TINFO_SUFFIX=.dll
23299         ;;
23300 esac
23301
23302 if test -n "$TINFO_SUFFIX" ; then
23303         case $TINFO_SUFFIX in
23304         tw*)
23305                 TINFO_NAME="${TINFO_NAME}tw"
23306                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
23307                 ;;
23308         t*)
23309                 TINFO_NAME="${TINFO_NAME}t"
23310                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
23311                 ;;
23312         w*)
23313                 TINFO_NAME="${TINFO_NAME}w"
23314                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
23315                 ;;
23316         esac
23317 fi
23318
23319 for cf_dir in $SRC_SUBDIRS
23320 do
23321         if test ! -d $srcdir/$cf_dir ; then
23322                 continue
23323         elif test -f $srcdir/$cf_dir/modules; then
23324
23325                 SHARED_LIB=
23326                 Libs_To_Make=
23327
23328                 cf_sed_options=
23329                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23330                 then
23331                         cf_sed_options="$cf_sed_options -e \"s/NCURSES\\([WT]\\+\\)\?_/NCURSES\\1${cf_cv_abi_version}_/g\""
23332                 fi
23333
23334                 if test "x$WILDCARD_SYMS" = xno
23335                 then
23336                         cf_sed_options="$cf_sed_options -e \"s/_\*;//g\""
23337                 fi
23338
23339                 if test "x$cf_sed_options" != "x"
23340                 then
23341                         cat >>$cf_dir/Makefile <<CF_EOF
23342
23343 # Generated by CF_LIB_RULES
23344 resulting.map: $UNALTERED_SYMS
23345         sed $cf_sed_options < $UNALTERED_SYMS >\$@
23346
23347 clean::
23348         rm -f resulting.map
23349 CF_EOF
23350                 fi
23351
23352                 for cf_item in $cf_LIST_MODELS
23353                 do
23354
23355         case X$cf_item in #(vi
23356         Xlibtool) #(vi
23357                 cf_suffix='.la'
23358                 cf_depsuf=$cf_suffix
23359                 ;;
23360         Xdebug) #(vi
23361                 cf_suffix='_g.a'
23362                 cf_depsuf=$cf_suffix
23363                 ;;
23364         Xprofile) #(vi
23365                 cf_suffix='_p.a'
23366                 cf_depsuf=$cf_suffix
23367                 ;;
23368         Xshared) #(vi
23369                 case $cf_cv_system_name in
23370                 aix[5-7]*) #(vi
23371                         cf_suffix='.so'
23372                         cf_depsuf=$cf_suffix
23373                         ;;
23374                 cygwin*|msys*|mingw*) #(vi
23375                         cf_suffix='.dll'
23376                         cf_depsuf='.dll.a'
23377                         ;;
23378                 darwin*) #(vi
23379                         cf_suffix='.dylib'
23380                         cf_depsuf=$cf_suffix
23381                         ;;
23382                 hpux*) #(vi
23383                         case $target in
23384                         ia64*) #(vi
23385                                 cf_suffix='.so'
23386                                 cf_depsuf=$cf_suffix
23387                                 ;;
23388                         *) #(vi
23389                                 cf_suffix='.sl'
23390                                 cf_depsuf=$cf_suffix
23391                                 ;;
23392                         esac
23393                         ;;
23394                 *) #(vi
23395                         cf_suffix='.so'
23396                         cf_depsuf=$cf_suffix
23397                         ;;
23398                 esac
23399                 ;;
23400         *)
23401                 cf_suffix='.a'
23402                 cf_depsuf=$cf_suffix
23403                 ;;
23404         esac
23405         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23406         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23407
23408                         cf_libname=$cf_dir
23409                         test "$cf_dir" = c++ && cf_libname=ncurses++
23410                         if test $cf_item = shared ; then
23411                                 if test -n "${LIB_SUFFIX}"
23412                                 then
23413                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
23414                                 else
23415                                         cf_shared_suffix="$cf_suffix"
23416                                 fi
23417                                 if test "$cf_cv_do_symlinks" = yes ; then
23418                                         cf_version_name=
23419
23420                                         case "$cf_cv_shlib_version" in #(vi
23421                                         rel) #(vi
23422                                                 cf_version_name=REL_VERSION
23423                                                 ;;
23424                                         abi)
23425                                                 cf_version_name=ABI_VERSION
23426                                                 ;;
23427                                         esac
23428
23429                                         if test -n "$cf_version_name"
23430                                         then
23431                                                 case "$cf_cv_system_name" in #(vi
23432                                                 darwin*)
23433                                                         # "w", etc?
23434                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23435                                                         ;; #(vi
23436                                                 *)
23437                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23438                                                         ;;
23439                                                 esac
23440                                         fi
23441                                         if test -n "${LIB_SUFFIX}"
23442                                         then
23443                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
23444                                         else
23445                                                 cf_shared_suffix="$cf_suffix"
23446                                         fi
23447                                 fi
23448                                 # cygwin needs import library, and has unique naming convention
23449                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23450                                 # use 'cyg' prefix for shared lib.
23451                                 case $cf_cv_shlib_version in #(vi
23452                                 cygdll) #(vi
23453                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23454                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
23455                                         continue
23456                                         ;;
23457                                 msysdll) #(vi
23458                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23459                                         Libs_To_Make="$Libs_To_Make ../lib/msys-${cf_libname}${cf_cygsuf}"
23460                                         continue
23461                                         ;;
23462                                 mingw)
23463                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23464                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
23465                                         continue
23466                                         ;;
23467                                 esac
23468                         fi
23469                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23470                 done
23471
23472                 if test $cf_dir = ncurses ; then
23473                         cf_subsets="$LIB_SUBSETS"
23474                         cf_r_parts="$cf_subsets"
23475                         cf_liblist="$Libs_To_Make"
23476
23477                         while test -n "$cf_r_parts"
23478                         do
23479                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
23480                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
23481                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
23482                                         cf_item=
23483                                         case $cf_l_parts in #(vi
23484                                         *termlib*) #(vi
23485                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
23486                                                 ;;
23487                                         *ticlib*)
23488                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
23489                                                 ;;
23490                                         *)
23491                                                 break
23492                                                 ;;
23493                                         esac
23494                                         if test -n "$cf_item"; then
23495                                                 Libs_To_Make="$cf_item $Libs_To_Make"
23496                                         fi
23497                                 else
23498                                         break
23499                                 fi
23500                         done
23501                 else
23502                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23503                 fi
23504
23505                 if test $cf_dir = c++; then
23506                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23507                                 cf_list=
23508                                 for cf_item in $Libs_To_Make
23509                                 do
23510                                         case $cf_item in
23511                                         *.a)
23512                                                 ;;
23513                                         *)
23514                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23515                                                 ;;
23516                                         esac
23517                                         for cf_test in $cf_list
23518                                         do
23519                                                 if test "$cf_test" = "$cf_item"
23520                                                 then
23521                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23522                                                         cf_item=
23523                                                         break
23524                                                 fi
23525                                         done
23526                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
23527                                 done
23528                                 Libs_To_Make="$cf_list"
23529                         fi
23530                 fi
23531
23532                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23533                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23534                         $cf_dir/Makefile >$cf_dir/Makefile.out
23535                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23536
23537                 $AWK -f $srcdir/mk-0th.awk \
23538                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23539                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23540
23541                 for cf_subset in $cf_subsets
23542                 do
23543                         cf_subdirs=
23544                         for cf_item in $cf_LIST_MODELS
23545                         do
23546
23547                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23548
23549 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23550
23551                         CXX_MODEL=$cf_ITEM
23552                         if test "$CXX_MODEL" = SHARED; then
23553                                 case $cf_cv_shlib_version in #(vi
23554                                 cygdll|msysdll|mingw) #(vi
23555                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23556
23557 echo "${as_me:-configure}:23557: testing overriding CXX_MODEL to SHARED ..." 1>&5
23558
23559                                         with_shared_cxx=yes
23560                                         ;;
23561                                 *)
23562                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23563                                         ;;
23564                                 esac
23565                         fi
23566
23567         case X$cf_item in #(vi
23568         Xlibtool) #(vi
23569                 cf_suffix='.la'
23570                 cf_depsuf=$cf_suffix
23571                 ;;
23572         Xdebug) #(vi
23573                 cf_suffix='_g.a'
23574                 cf_depsuf=$cf_suffix
23575                 ;;
23576         Xprofile) #(vi
23577                 cf_suffix='_p.a'
23578                 cf_depsuf=$cf_suffix
23579                 ;;
23580         Xshared) #(vi
23581                 case $cf_cv_system_name in
23582                 aix[5-7]*) #(vi
23583                         cf_suffix='.so'
23584                         cf_depsuf=$cf_suffix
23585                         ;;
23586                 cygwin*|msys*|mingw*) #(vi
23587                         cf_suffix='.dll'
23588                         cf_depsuf='.dll.a'
23589                         ;;
23590                 darwin*) #(vi
23591                         cf_suffix='.dylib'
23592                         cf_depsuf=$cf_suffix
23593                         ;;
23594                 hpux*) #(vi
23595                         case $target in
23596                         ia64*) #(vi
23597                                 cf_suffix='.so'
23598                                 cf_depsuf=$cf_suffix
23599                                 ;;
23600                         *) #(vi
23601                                 cf_suffix='.sl'
23602                                 cf_depsuf=$cf_suffix
23603                                 ;;
23604                         esac
23605                         ;;
23606                 *) #(vi
23607                         cf_suffix='.so'
23608                         cf_depsuf=$cf_suffix
23609                         ;;
23610                 esac
23611                 ;;
23612         *)
23613                 cf_suffix='.a'
23614                 cf_depsuf=$cf_suffix
23615                 ;;
23616         esac
23617         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23618         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23619
23620         case $cf_item in
23621         libtool) cf_subdir='obj_lo'  ;;
23622         normal)  cf_subdir='objects' ;;
23623         debug)   cf_subdir='obj_g' ;;
23624         profile) cf_subdir='obj_p' ;;
23625         shared)
23626                 case $cf_cv_system_name in #(vi
23627                 cygwin|msys) #(vi
23628                         cf_subdir='objects' ;;
23629                 *)
23630                         cf_subdir='obj_s' ;;
23631                 esac
23632         esac
23633
23634                         # Test for case where we build libtinfo with a different name.
23635                         cf_libname=$cf_dir
23636                         if test $cf_dir = ncurses ; then
23637                                 case $cf_subset in
23638                                 *base*)
23639                                         cf_libname=${cf_libname}$LIB_SUFFIX
23640                                         ;;
23641                                 *termlib*)
23642                                         cf_libname=$TINFO_LIB_SUFFIX
23643                                         ;;
23644                                 ticlib*)
23645                                         cf_libname=$TICS_LIB_SUFFIX
23646                                         ;;
23647                                 esac
23648                         elif test $cf_dir = c++ ; then
23649                                 cf_libname=ncurses++$LIB_SUFFIX
23650                         else
23651                                 cf_libname=${cf_libname}$LIB_SUFFIX
23652                         fi
23653                         if test -n "${DFT_ARG_SUFFIX}" ; then
23654                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
23655                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
23656                         fi
23657
23658                         # These dependencies really are for development, not
23659                         # builds, but they are useful in porting, too.
23660                         cf_depend="../include/ncurses_cfg.h"
23661                         if test "$srcdir" = "."; then
23662                                 cf_reldir="."
23663                         else
23664                                 cf_reldir="\${srcdir}"
23665                         fi
23666
23667                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
23668                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
23669                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
23670                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
23671                         fi
23672
23673                         cf_dir_suffix=
23674                         old_cf_suffix="$cf_suffix"
23675                         if test "$cf_cv_shlib_version_infix" = yes ; then
23676                         if test -n "$LIB_SUFFIX" ; then
23677                                 case $LIB_SUFFIX in
23678                                 tw*)
23679                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
23680                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
23681                                         cf_dir_suffix=tw
23682                                         ;;
23683                                 t*)
23684                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
23685                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
23686                                         cf_dir_suffix=t
23687                                         ;;
23688                                 w*)
23689                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
23690                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
23691                                         cf_dir_suffix=w
23692                                         ;;
23693                                 esac
23694                         fi
23695                         fi
23696
23697                         $AWK -f $srcdir/mk-1st.awk \
23698                                 name=${cf_libname}${cf_dir_suffix} \
23699                                 traces=$LIB_TRACING \
23700                                 MODEL=$cf_ITEM \
23701                                 CXX_MODEL=$CXX_MODEL \
23702                                 model=$cf_subdir \
23703                                 prefix=$cf_prefix \
23704                                 suffix=$cf_suffix \
23705                                 subset=$cf_subset \
23706                                 driver=$cf_cv_term_driver \
23707                                 SymLink="$LN_S" \
23708                                 TermlibRoot=$TINFO_NAME \
23709                                 TermlibSuffix=$TINFO_SUFFIX \
23710                                 ShlibVer=$cf_cv_shlib_version \
23711                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
23712                                 ReLink=${cf_cv_do_relink:-no} \
23713                                 DoLinks=$cf_cv_do_symlinks \
23714                                 rmSoLocs=$cf_cv_rm_so_locs \
23715                                 ldconfig="$LDCONFIG" \
23716                                 overwrite=$WITH_OVERWRITE \
23717                                 depend="$cf_depend" \
23718                                 host="$host" \
23719                                 libtool_version="$LIBTOOL_VERSION" \
23720                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23721
23722                         cf_suffix="$old_cf_suffix"
23723
23724                         for cf_subdir2 in $cf_subdirs lib
23725                         do
23726                                 test $cf_subdir = $cf_subdir2 && break
23727                         done
23728                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
23729                         $AWK -f $srcdir/mk-2nd.awk \
23730                                 name=$cf_dir \
23731                                 traces=$LIB_TRACING \
23732                                 MODEL=$cf_ITEM \
23733                                 model=$cf_subdir \
23734                                 subset=$cf_subset \
23735                                 srcdir=$srcdir \
23736                                 echo=$WITH_ECHO \
23737                                 crenames=$cf_cv_prog_CC_c_o \
23738                                 cxxrenames=$cf_cv_prog_CXX_c_o \
23739                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23740                         cf_subdirs="$cf_subdirs $cf_subdir"
23741                         done
23742                 done
23743         fi
23744
23745         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
23746 done
23747
23748 for cf_dir in $SRC_SUBDIRS
23749 do
23750         if test ! -d $srcdir/$cf_dir ; then
23751                 continue
23752         fi
23753
23754         if test -f $cf_dir/Makefile ; then
23755                 case "$cf_dir" in
23756                 Ada95) #(vi
23757                         echo 'libs \' >> Makefile
23758                         echo 'install.libs \' >> Makefile
23759                         echo 'uninstall.libs ::' >> Makefile
23760                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
23761                         ;;
23762                 esac
23763         fi
23764
23765         if test -f $srcdir/$cf_dir/modules; then
23766                 echo >> Makefile
23767                 if test -f $srcdir/$cf_dir/headers; then
23768 cat >> Makefile <<CF_EOF
23769 install.includes \\
23770 uninstall.includes \\
23771 CF_EOF
23772                 fi
23773 if test "$cf_dir" != "c++" ; then
23774 echo 'lint \' >> Makefile
23775 fi
23776 cat >> Makefile <<CF_EOF
23777 libs \\
23778 lintlib \\
23779 install.libs \\
23780 uninstall.libs \\
23781 install.$cf_dir \\
23782 uninstall.$cf_dir ::
23783         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23784 CF_EOF
23785         elif test -f $srcdir/$cf_dir/headers; then
23786 cat >> Makefile <<CF_EOF
23787
23788 libs \\
23789 install.libs \\
23790 uninstall.libs \\
23791 install.includes \\
23792 uninstall.includes ::
23793         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23794 CF_EOF
23795 fi
23796 done
23797
23798 if test "x$cf_with_db_install" = xyes; then
23799 cat >> Makefile <<CF_EOF
23800
23801 install.libs uninstall.libs \\
23802 install.data uninstall.data ::
23803 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23804 CF_EOF
23805 else
23806 cat >> Makefile <<CF_EOF
23807
23808 install.libs uninstall.libs ::
23809         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23810 CF_EOF
23811 fi
23812
23813 if test "x$cf_with_manpages" = xyes; then
23814 cat >> Makefile <<CF_EOF
23815
23816 install.man \\
23817 uninstall.man ::
23818         cd man && \${MAKE} \${TOP_MFLAGS} \$@
23819 CF_EOF
23820 fi
23821
23822 cat >> Makefile <<CF_EOF
23823
23824 distclean ::
23825         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
23826         rm -f headers.sh headers.sed mk_shared_lib.sh
23827         rm -f edit_man.* man_alias.*
23828         rm -rf \${DIRS_TO_MAKE}
23829 CF_EOF
23830
23831 # Special case: tack's manpage lives in its own directory.
23832 if test "x$cf_with_manpages" = xyes; then
23833 if test -d tack ; then
23834 if test -f $srcdir/$tack.h; then
23835 cat >> Makefile <<CF_EOF
23836
23837 install.man \\
23838 uninstall.man ::
23839         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
23840 CF_EOF
23841 fi
23842 fi
23843 fi
23844
23845 rm -f headers.sed headers.sh
23846
23847 echo creating headers.sh
23848 cat >headers.sh <<CF_EOF
23849 #! /bin/sh
23850 # This shell script is generated by the 'configure' script.  It is invoked in a
23851 # subdirectory of the build tree.  It generates a sed-script in the parent
23852 # directory that is used to adjust includes for header files that reside in a
23853 # subdirectory of /usr/include, etc.
23854 PRG=""
23855 while test \$# != 3
23856 do
23857 PRG="\$PRG \$1"; shift
23858 done
23859 DST=\$1
23860 REF=\$2
23861 SRC=\$3
23862 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
23863 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
23864 echo installing \$SRC in \$DST
23865 CF_EOF
23866
23867 if test $WITH_CURSES_H = yes; then
23868         cat >>headers.sh <<CF_EOF
23869 case \$DST in
23870 /*/include/*)
23871         END=\`basename \$DST\`
23872         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23873         do
23874                 NAME=\`basename \$i\`
23875                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23876         done
23877         ;;
23878 *)
23879         echo "" >> \$TMPSED
23880         ;;
23881 esac
23882 CF_EOF
23883
23884 else
23885         cat >>headers.sh <<CF_EOF
23886 case \$DST in
23887 /*/include/*)
23888         END=\`basename \$DST\`
23889         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23890         do
23891                 NAME=\`basename \$i\`
23892                 if test "\$NAME" = "curses.h"
23893                 then
23894                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23895                         NAME=ncurses.h
23896                 fi
23897                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23898         done
23899         ;;
23900 *)
23901         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23902         ;;
23903 esac
23904 CF_EOF
23905 fi
23906 cat >>headers.sh <<CF_EOF
23907 rm -f \$TMPSRC
23908 sed -f \$TMPSED \$SRC > \$TMPSRC
23909 NAME=\`basename \$SRC\`
23910 CF_EOF
23911 if test $WITH_CURSES_H != yes; then
23912         cat >>headers.sh <<CF_EOF
23913 test "\$NAME" = "curses.h" && NAME=ncurses.h
23914 CF_EOF
23915 fi
23916 cat >>headers.sh <<CF_EOF
23917 # Just in case someone gzip'd manpages, remove the conflicting copy.
23918 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
23919
23920 eval \$PRG \$TMPSRC \$DST/\$NAME
23921 rm -f \$TMPSRC \$TMPSED
23922 CF_EOF
23923
23924 chmod 0755 headers.sh
23925
23926 for cf_dir in $SRC_SUBDIRS
23927 do
23928         if test ! -d $srcdir/$cf_dir ; then
23929                 continue
23930         fi
23931
23932         if test -f $srcdir/$cf_dir/headers; then
23933                 $AWK -f $srcdir/mk-hdr.awk \
23934                         subset="$LIB_SUBSETS" \
23935                         compat="$WITH_CURSES_H" \
23936                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
23937         fi
23938
23939         if test -f $srcdir/$cf_dir/modules; then
23940                 if test "$cf_dir" != "c++" ; then
23941                         cat >>$cf_dir/Makefile <<"CF_EOF"
23942 depend : ${AUTO_SRC}
23943         makedepend -- ${CPPFLAGS} -- ${C_SRC}
23944
23945 # DO NOT DELETE THIS LINE -- make depend depends on it.
23946 CF_EOF
23947                 fi
23948         fi
23949 done
23950
23951 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23952 if test -z "$USE_OLD_MAKERULES" ; then
23953         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
23954 fi
23955 fi
23956  ;;
23957   esac
23958 done
23959 EOF
23960
23961 cat >>$CONFIG_STATUS <<\EOF
23962
23963 { (exit 0); exit 0; }
23964 EOF
23965 chmod +x $CONFIG_STATUS
23966 ac_clean_files=$ac_clean_files_save
23967
23968 # configure is writing to config.log, and then calls config.status.
23969 # config.status does its own redirection, appending to config.log.
23970 # Unfortunately, on DOS this fails, as config.log is still kept open
23971 # by configure, so config.status won't be able to write to it; its
23972 # output is simply discarded.  So we exec the FD to /dev/null,
23973 # effectively closing config.log, so it can be properly (re)opened and
23974 # appended to by config.status.  When coming back to configure, we
23975 # need to make the FD available again.
23976 if test "$no_create" != yes; then
23977   ac_cs_success=:
23978   exec 5>/dev/null
23979   $SHELL $CONFIG_STATUS || ac_cs_success=false
23980   exec 5>>config.log
23981   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23982   # would make configure fail if this is the last instruction.
23983   $ac_cs_success || { (exit 1); exit 1; }
23984 fi
23985 ${MAKE:-make} preinstall