]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
83d27323b6c7b8b05b34b3a52e80dc4fadc2ed40
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.576 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20121002.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tests         suppress build/install with test-programs
713   --without-curses-h      install curses.h as ncurses.h only
714   --with-pkg-config{=path} enable/disable use of pkg-config
715   --with-pkg-config-libdir=XXX use given directory for installing pc-files
716   --enable-pc-files       generate and install .pc files for pkg-config
717   --enable-mixed-case     tic should assume mixed-case filenames
718   --with-install-prefix   prefixes actual install-location ($DESTDIR)
719 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
720   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
721   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
722   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
723   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
724   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
725   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
726 Options to Specify the Libraries Built/Used:
727   --disable-libtool-version  enable to use libtool's incompatible naming scheme
728   --with-libtool          generate libraries with libtool
729   --with-shared           generate shared-libraries
730   --with-normal           generate normal-libraries (default)
731   --with-debug            generate debug-libraries (default)
732   --with-profile          generate profile-libraries
733   --with-cxx-shared       generate C++ shared-libraries
734   --with-lib-prefix       override library-prefix
735   --with-termlib          generate separate terminfo library
736   --with-ticlib           generate separate tic library
737   --with-gpm              use Alessandro Rubini's GPM library
738   --without-dlsym         do not use dlsym() to load GPM dynamically
739   --with-sysmouse         use sysmouse (FreeBSD console)
740   --enable-rpath          use rpath option when generating shared libraries
741   --disable-relink        relink shared libraries during install
742   --with-shlib-version=X  Specify rel or abi version for shared libs
743   --disable-rpath-hack    don't add rpath options for additional libraries
744 Fine-Tuning Your Configuration:
745   --disable-overwrite     leave out the link to -lcurses
746   --disable-database      do not use terminfo, only fallbacks/termcap
747   --with-database=XXX     specify terminfo source to install
748   --with-hashed-db        specify hashed-database library
749   --with-fallbacks=XXX    specify list of fallback terminal descriptions
750   --without-xterm-new     specify if xterm terminfo should be old version
751   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
752   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
753   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
754   --disable-big-core      assume machine has little memory
755   --disable-big-strings   assume compiler has only standard-size strings
756   --enable-termcap        compile in termcap fallback support
757   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
758   --enable-getcap         fast termcap load, no xrefs to terminfo
759   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
760   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
761   --disable-root-environ  restrict environment when running as root
762   --enable-symlinks       make tic use symbolic links not hard links
763   --enable-broken_linker  compile with broken-linker support code
764   --enable-bsdpad         recognize BSD-style prefix padding
765   --enable-widec          compile with wide-char/UTF-8 code
766   --disable-lp64          allow chtype to be long (ignore _LP64)
767   --disable-largefile     omit support for large files
768   --disable-tparm-varargs compile tparm() without varargs interface
769   --disable-tic-depends   link tic library without explicit dependency on ncurses library
770   --with-bool=TYPE        override fallback type of bool variable
771   --with-caps=alt         compile with alternate Caps file
772   --with-chtype=TYPE      override type of chtype
773   --with-ospeed=TYPE      override type of ospeed variable
774   --with-mmask-t=TYPE     override type of mmask_t
775   --with-ccharw-max=XXX   override size CCHARW_MAX
776   --with-tparm-arg=TYPE   override parameter type of tparm
777   --with-rcs-ids          compile-in RCS identifiers
778 Options to Specify How Manpages are Installed:
779   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
780                           optionally formatted/catonly, e.g., gzip,formatted
781   --with-manpage-renames  specify manpage-renaming
782   --with-manpage-aliases  specify manpage-aliases using .so
783   --with-manpage-symlinks specify manpage-aliases using symlinks
784   --with-manpage-tbl      specify manpage processing with tbl
785 Extensions:
786   --disable-ext-funcs     disable function-extensions
787   --enable-sp-funcs       enable experimental SCREEN-extensions
788   --enable-term-driver    enable experimental terminal-driver
789   --enable-const          compile with extra/non-standard const
790   --enable-ext-colors     compile for 256-color support
791   --enable-ext-mouse      compile for extended mouse-encoding
792   --enable-no-padding     compile with $NCURSES_NO_PADDING code
793   --enable-signed-char    compile using signed Boolean's in term.h
794   --enable-sigwinch       compile with SIGWINCH handler
795   --enable-tcap-names     compile with user-definable terminal capabilities
796 Development Code:
797   --without-develop       disable development options
798   --enable-hard-tabs      compile with hard-tabs code
799   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
800 Experimental Code:
801   --disable-assumed-color do not assume anything about default-colors
802   --disable-hashmap       compile without hashmap scrolling-optimization
803   --enable-colorfgbg      compile-in experimental $COLORFGBG code
804   --enable-interop        compile-in experimental interop bindings
805   --with-pthread          use POSIX thread library
806   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
807   --enable-weak-symbols   enable weak-symbols for pthreads
808   --enable-reentrant      compile with experimental reentrant code
809   --with-wrap-prefix=XXX  override prefix used for public variables
810   --enable-safe-sprintf   compile with experimental safe-sprintf code
811   --disable-scroll-hints  compile without scroll-hints code
812   --enable-wgetch-events  compile with experimental wgetch-events code
813 Testing/development Options:
814   --disable-echo          do not display "compiling" commands
815   --enable-warnings       build: turn on GCC compiler warnings
816   --enable-string-hacks   work around bogus compiler/loader warnings
817   --enable-assertions     test: turn on generation of assertion code
818   --with-dmalloc          test: use Gray Watson's dmalloc library
819   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
820   --with-valgrind         test: use valgrind
821   --disable-leaks         test: free permanent memory, analyze leaks
822   --enable-expanded       test: generate functions for certain macros
823   --disable-macros        test: use functions rather than macros
824   --with-trace            test: add trace() function to all models of ncurses
825 Ada95 Binding Options:
826   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
827   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
828   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
829   --with-ada-sharedlib=XX build Ada95 shared-library
830
831 Some influential environment variables:
832   CC          C compiler command
833   CFLAGS      C compiler flags
834   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
835               nonstandard directory <lib dir>
836   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
837               headers in a nonstandard directory <include dir>
838   CPP         C preprocessor
839   CXX         C++ compiler command
840   CXXFLAGS    C++ compiler flags
841   CXXCPP      C++ preprocessor
842
843 Use these variables to override the choices made by `configure' or to help
844 it to find libraries and programs with nonstandard names/locations.
845
846 EOF
847 fi
848
849 if test "$ac_init_help" = "recursive"; then
850   # If there are subdirs, report their specific --help.
851   ac_popdir=`pwd`
852   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
853     cd $ac_subdir
854     # A "../" for each directory in /$ac_subdir.
855     ac_dots=`echo $ac_subdir |
856              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
857
858     case $srcdir in
859     .) # No --srcdir option.  We are building in place.
860       ac_sub_srcdir=$srcdir ;;
861     [\\/]* | ?:[\\/]* ) # Absolute path.
862       ac_sub_srcdir=$srcdir/$ac_subdir ;;
863     *) # Relative path.
864       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
865     esac
866
867     # Check for guested configure; otherwise get Cygnus style configure.
868     if test -f $ac_sub_srcdir/configure.gnu; then
869       echo
870       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
871     elif test -f $ac_sub_srcdir/configure; then
872       echo
873       $SHELL $ac_sub_srcdir/configure  --help=recursive
874     elif test -f $ac_sub_srcdir/configure.ac ||
875            test -f $ac_sub_srcdir/configure.in; then
876       echo
877       $ac_configure --help
878     else
879       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
880     fi
881     cd $ac_popdir
882   done
883 fi
884
885 test -n "$ac_init_help" && exit 0
886 if $ac_init_version; then
887   cat <<\EOF
888
889 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
890 Free Software Foundation, Inc.
891 This configure script is free software; the Free Software Foundation
892 gives unlimited permission to copy, distribute and modify it.
893 EOF
894   exit 0
895 fi
896 exec 5>config.log
897 cat >&5 <<EOF
898 This file contains any messages produced by compilers while
899 running configure, to aid debugging if configure makes a mistake.
900
901 It was created by $as_me, which was
902 generated by GNU Autoconf 2.52.20121002.  Invocation command line was
903
904   $ $0 $@
905
906 EOF
907 {
908 cat <<_ASUNAME
909 ## ---------- ##
910 ## Platform.  ##
911 ## ---------- ##
912
913 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
914 uname -m = `(uname -m) 2>/dev/null || echo unknown`
915 uname -r = `(uname -r) 2>/dev/null || echo unknown`
916 uname -s = `(uname -s) 2>/dev/null || echo unknown`
917 uname -v = `(uname -v) 2>/dev/null || echo unknown`
918
919 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
920 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
921
922 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
923 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
924 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
925 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
926 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
927 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
928 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
929
930 PATH = $PATH
931
932 _ASUNAME
933 } >&5
934
935 cat >&5 <<EOF
936 ## ------------ ##
937 ## Core tests.  ##
938 ## ------------ ##
939
940 EOF
941
942 # Keep a trace of the command line.
943 # Strip out --no-create and --no-recursion so they do not pile up.
944 # Also quote any args containing shell meta-characters.
945 ac_configure_args=
946 ac_sep=
947 for ac_arg
948 do
949   case $ac_arg in
950   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
951   | --no-cr | --no-c) ;;
952   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
953   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
954   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
955     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
956     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
957     ac_sep=" " ;;
958   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
959      ac_sep=" " ;;
960   esac
961   # Get rid of the leading space.
962 done
963
964 # When interrupted or exit'd, cleanup temporary files, and complete
965 # config.log.  We remove comments because anyway the quotes in there
966 # would cause problems or look ugly.
967 trap 'exit_status=$?
968   # Save into config.log some information that might help in debugging.
969   echo >&5
970   echo "## ----------------- ##" >&5
971   echo "## Cache variables.  ##" >&5
972   echo "## ----------------- ##" >&5
973   echo >&5
974   # The following way of writing the cache mishandles newlines in values,
975 {
976   (set) 2>&1 |
977     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
978     *ac_space=\ *)
979       sed -n \
980         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
981           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
982       ;;
983     *)
984       sed -n \
985         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
986       ;;
987     esac;
988 } >&5
989   sed "/^$/d" confdefs.h >conftest.log
990   if test -s conftest.log; then
991     echo >&5
992     echo "## ------------ ##" >&5
993     echo "## confdefs.h.  ##" >&5
994     echo "## ------------ ##" >&5
995     echo >&5
996     cat conftest.log >&5
997   fi
998   (echo; echo) >&5
999   test "$ac_signal" != 0 &&
1000     echo "$as_me: caught signal $ac_signal" >&5
1001   echo "$as_me: exit $exit_status" >&5
1002   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1003     exit $exit_status
1004      ' 0
1005 for ac_signal in 1 2 13 15; do
1006   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1007 done
1008 ac_signal=0
1009
1010 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1011 rm -rf conftest* confdefs.h
1012 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1013 echo >confdefs.h
1014
1015 # Let the site file select an alternate cache file if it wants to.
1016 # Prefer explicitly selected file to automatically selected ones.
1017 if test -z "$CONFIG_SITE"; then
1018   if test "x$prefix" != xNONE; then
1019     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1020   else
1021     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1022   fi
1023 fi
1024 for ac_site_file in $CONFIG_SITE; do
1025   if test -r "$ac_site_file"; then
1026     { echo "$as_me:1026: loading site script $ac_site_file" >&5
1027 echo "$as_me: loading site script $ac_site_file" >&6;}
1028     cat "$ac_site_file" >&5
1029     . "$ac_site_file"
1030   fi
1031 done
1032
1033 if test -r "$cache_file"; then
1034   # Some versions of bash will fail to source /dev/null (special
1035   # files actually), so we avoid doing that.
1036   if test -f "$cache_file"; then
1037     { echo "$as_me:1037: loading cache $cache_file" >&5
1038 echo "$as_me: loading cache $cache_file" >&6;}
1039     case $cache_file in
1040       [\\/]* | ?:[\\/]* ) . $cache_file;;
1041       *)                      . ./$cache_file;;
1042     esac
1043   fi
1044 else
1045   { echo "$as_me:1045: creating cache $cache_file" >&5
1046 echo "$as_me: creating cache $cache_file" >&6;}
1047   >$cache_file
1048 fi
1049
1050 # Check that the precious variables saved in the cache have kept the same
1051 # value.
1052 ac_cache_corrupted=false
1053 for ac_var in `(set) 2>&1 |
1054                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1055   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1056   eval ac_new_set=\$ac_env_${ac_var}_set
1057   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1058   eval ac_new_val="\$ac_env_${ac_var}_value"
1059   case $ac_old_set,$ac_new_set in
1060     set,)
1061       { echo "$as_me:1061: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1062 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1063       ac_cache_corrupted=: ;;
1064     ,set)
1065       { echo "$as_me:1065: error: \`$ac_var' was not set in the previous run" >&5
1066 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1067       ac_cache_corrupted=: ;;
1068     ,);;
1069     *)
1070       if test "x$ac_old_val" != "x$ac_new_val"; then
1071         { echo "$as_me:1071: error: \`$ac_var' has changed since the previous run:" >&5
1072 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1073         { echo "$as_me:1073:   former value:  $ac_old_val" >&5
1074 echo "$as_me:   former value:  $ac_old_val" >&2;}
1075         { echo "$as_me:1075:   current value: $ac_new_val" >&5
1076 echo "$as_me:   current value: $ac_new_val" >&2;}
1077         ac_cache_corrupted=:
1078       fi;;
1079   esac
1080   # Pass precious variables to config.status.  It doesn't matter if
1081   # we pass some twice (in addition to the command line arguments).
1082   if test "$ac_new_set" = set; then
1083     case $ac_new_val in
1084     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1085       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1086       ac_configure_args="$ac_configure_args '$ac_arg'"
1087       ;;
1088     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1089        ;;
1090     esac
1091   fi
1092 done
1093 if $ac_cache_corrupted; then
1094   { echo "$as_me:1094: error: changes in the environment can compromise the build" >&5
1095 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1096   { { echo "$as_me:1096: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1097 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1098    { (exit 1); exit 1; }; }
1099 fi
1100
1101 ac_ext=c
1102 ac_cpp='$CPP $CPPFLAGS'
1103 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1104 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1105 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1106 ac_main_return=return
1107
1108 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1109   *c*,-n*) ECHO_N= ECHO_C='
1110 ' ECHO_T='      ' ;;
1111   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1112   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1113 esac
1114 echo "#! $SHELL" >conftest.sh
1115 echo  "exit 0"   >>conftest.sh
1116 chmod +x conftest.sh
1117 if { (echo "$as_me:1117: PATH=\".;.\"; conftest.sh") >&5
1118   (PATH=".;."; conftest.sh) 2>&5
1119   ac_status=$?
1120   echo "$as_me:1120: \$? = $ac_status" >&5
1121   (exit $ac_status); }; then
1122   ac_path_separator=';'
1123 else
1124   ac_path_separator=:
1125 fi
1126 PATH_SEPARATOR="$ac_path_separator"
1127 rm -f conftest.sh
1128
1129 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1130
1131 top_builddir=`pwd`
1132
1133 echo "$as_me:1133: checking for egrep" >&5
1134 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1135 if test "${ac_cv_prog_egrep+set}" = set; then
1136   echo $ECHO_N "(cached) $ECHO_C" >&6
1137 else
1138   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1139     then ac_cv_prog_egrep='grep -E'
1140     else ac_cv_prog_egrep='egrep'
1141     fi
1142 fi
1143 echo "$as_me:1143: result: $ac_cv_prog_egrep" >&5
1144 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1145  EGREP=$ac_cv_prog_egrep
1146
1147 test -z "$EGREP" && { { echo "$as_me:1147: error: No egrep program found" >&5
1148 echo "$as_me: error: No egrep program found" >&2;}
1149    { (exit 1); exit 1; }; }
1150
1151 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1152 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1153 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1154 cf_cv_abi_version=${NCURSES_MAJOR}
1155 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1156 cf_cv_timestamp=`date`
1157 echo "$as_me:1157: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1158 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1159
1160 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1161
1162 # Check whether --with-rel-version or --without-rel-version was given.
1163 if test "${with_rel_version+set}" = set; then
1164   withval="$with_rel_version"
1165   { echo "$as_me:1165: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1166 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1167  cf_cv_rel_version=$withval
1168 fi;
1169
1170  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1171  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1172
1173 if test -n "$NCURSES_MAJOR" ; then
1174   case $NCURSES_MAJOR in #(vi
1175   [0-9]*) #(vi
1176         ;;
1177   *)
1178         { { echo "$as_me:1178: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1179 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1180    { (exit 1); exit 1; }; }
1181         ;;
1182   esac
1183 else
1184   { { echo "$as_me:1184: error: Release major-version value is empty" >&5
1185 echo "$as_me: error: Release major-version value is empty" >&2;}
1186    { (exit 1); exit 1; }; }
1187 fi
1188
1189 if test -n "$NCURSES_MINOR" ; then
1190   case $NCURSES_MINOR in #(vi
1191   [0-9]*) #(vi
1192         ;;
1193   *)
1194         { { echo "$as_me:1194: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1195 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1196    { (exit 1); exit 1; }; }
1197         ;;
1198   esac
1199 else
1200   { { echo "$as_me:1200: error: Release minor-version value is empty" >&5
1201 echo "$as_me: error: Release minor-version value is empty" >&2;}
1202    { (exit 1); exit 1; }; }
1203 fi
1204
1205 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1206
1207 # Check whether --with-abi-version or --without-abi-version was given.
1208 if test "${with_abi_version+set}" = set; then
1209   withval="$with_abi_version"
1210   { echo "$as_me:1210: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1211 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1212  cf_cv_abi_version=$withval
1213 fi;
1214
1215 if test -n "$cf_cv_abi_version" ; then
1216   case $cf_cv_abi_version in #(vi
1217   [0-9]*) #(vi
1218         ;;
1219   *)
1220         { { echo "$as_me:1220: error: ABI version is not a number: $cf_cv_abi_version" >&5
1221 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1222    { (exit 1); exit 1; }; }
1223         ;;
1224   esac
1225 else
1226   { { echo "$as_me:1226: error: ABI version value is empty" >&5
1227 echo "$as_me: error: ABI version value is empty" >&2;}
1228    { (exit 1); exit 1; }; }
1229 fi
1230
1231 ac_aux_dir=
1232 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1233   if test -f $ac_dir/install-sh; then
1234     ac_aux_dir=$ac_dir
1235     ac_install_sh="$ac_aux_dir/install-sh -c"
1236     break
1237   elif test -f $ac_dir/install.sh; then
1238     ac_aux_dir=$ac_dir
1239     ac_install_sh="$ac_aux_dir/install.sh -c"
1240     break
1241   elif test -f $ac_dir/shtool; then
1242     ac_aux_dir=$ac_dir
1243     ac_install_sh="$ac_aux_dir/shtool install -c"
1244     break
1245   fi
1246 done
1247 if test -z "$ac_aux_dir"; then
1248   { { echo "$as_me:1248: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1249 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1250    { (exit 1); exit 1; }; }
1251 fi
1252 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1253 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1254 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1255
1256 # Make sure we can run config.sub.
1257 $ac_config_sub sun4 >/dev/null 2>&1 ||
1258   { { echo "$as_me:1258: error: cannot run $ac_config_sub" >&5
1259 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1260    { (exit 1); exit 1; }; }
1261
1262 echo "$as_me:1262: checking build system type" >&5
1263 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1264 if test "${ac_cv_build+set}" = set; then
1265   echo $ECHO_N "(cached) $ECHO_C" >&6
1266 else
1267   ac_cv_build_alias=$build_alias
1268 test -z "$ac_cv_build_alias" &&
1269   ac_cv_build_alias=`$ac_config_guess`
1270 test -z "$ac_cv_build_alias" &&
1271   { { echo "$as_me:1271: error: cannot guess build type; you must specify one" >&5
1272 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1273    { (exit 1); exit 1; }; }
1274 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1275   { { echo "$as_me:1275: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1276 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1277    { (exit 1); exit 1; }; }
1278
1279 fi
1280 echo "$as_me:1280: result: $ac_cv_build" >&5
1281 echo "${ECHO_T}$ac_cv_build" >&6
1282 build=$ac_cv_build
1283 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1284 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1285 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1286
1287 echo "$as_me:1287: checking host system type" >&5
1288 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1289 if test "${ac_cv_host+set}" = set; then
1290   echo $ECHO_N "(cached) $ECHO_C" >&6
1291 else
1292   ac_cv_host_alias=$host_alias
1293 test -z "$ac_cv_host_alias" &&
1294   ac_cv_host_alias=$ac_cv_build_alias
1295 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1296   { { echo "$as_me:1296: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1297 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1298    { (exit 1); exit 1; }; }
1299
1300 fi
1301 echo "$as_me:1301: result: $ac_cv_host" >&5
1302 echo "${ECHO_T}$ac_cv_host" >&6
1303 host=$ac_cv_host
1304 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1305 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1306 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1307
1308 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1309         echo "$as_me:1309: checking target system type" >&5
1310 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1311 if test "${ac_cv_target+set}" = set; then
1312   echo $ECHO_N "(cached) $ECHO_C" >&6
1313 else
1314   ac_cv_target_alias=$target_alias
1315 test "x$ac_cv_target_alias" = "x" &&
1316   ac_cv_target_alias=$ac_cv_host_alias
1317 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1318   { { echo "$as_me:1318: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1319 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1320    { (exit 1); exit 1; }; }
1321
1322 fi
1323 echo "$as_me:1323: result: $ac_cv_target" >&5
1324 echo "${ECHO_T}$ac_cv_target" >&6
1325 target=$ac_cv_target
1326 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1327 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1328 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1329
1330 # The aliases save the names the user supplied, while $host etc.
1331 # will get canonicalized.
1332 test -n "$target_alias" &&
1333   test "$program_prefix$program_suffix$program_transform_name" = \
1334     NONENONEs,x,x, &&
1335   program_prefix=${target_alias}-
1336         system_name="$host_os"
1337 else
1338         system_name="`(uname -s -r) 2>/dev/null`"
1339         if test -z "$system_name" ; then
1340                 system_name="`(hostname) 2>/dev/null`"
1341         fi
1342 fi
1343 test -n "$system_name" &&
1344 cat >>confdefs.h <<EOF
1345 #define SYSTEM_NAME "$system_name"
1346 EOF
1347
1348 if test "${cf_cv_system_name+set}" = set; then
1349   echo $ECHO_N "(cached) $ECHO_C" >&6
1350 else
1351   cf_cv_system_name="$system_name"
1352 fi
1353
1354 test -z "$system_name" && system_name="$cf_cv_system_name"
1355 test -n "$cf_cv_system_name" && echo "$as_me:1355: result: Configuring for $cf_cv_system_name" >&5
1356 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1357
1358 if test ".$system_name" != ".$cf_cv_system_name" ; then
1359         echo "$as_me:1359: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1360 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1361         { { echo "$as_me:1361: error: \"Please remove config.cache and try again.\"" >&5
1362 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1363    { (exit 1); exit 1; }; }
1364 fi
1365
1366 # Check whether --with-system-type or --without-system-type was given.
1367 if test "${with_system_type+set}" = set; then
1368   withval="$with_system_type"
1369   { echo "$as_me:1369: WARNING: overriding system type to $withval" >&5
1370 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1371         cf_cv_system_name=$withval
1372         host_os=$withval
1373
1374 fi;
1375
1376 ###     Save the given $CFLAGS to allow user-override.
1377 cf_user_CFLAGS="$CFLAGS"
1378
1379 ###     Default install-location
1380
1381 echo "$as_me:1381: checking for prefix" >&5
1382 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1383 if test "x$prefix" = "xNONE" ; then
1384         case "$cf_cv_system_name" in
1385                 # non-vendor systems don't have a conflict
1386         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1387                 prefix=/usr
1388                 ;;
1389         *)      prefix=$ac_default_prefix
1390                 ;;
1391         esac
1392 fi
1393 echo "$as_me:1393: result: $prefix" >&5
1394 echo "${ECHO_T}$prefix" >&6
1395
1396 if test "x$prefix" = "xNONE" ; then
1397 echo "$as_me:1397: checking for default include-directory" >&5
1398 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1399 test -n "$verbose" && echo 1>&6
1400 for cf_symbol in \
1401         $includedir \
1402         $includedir/ncurses \
1403         $prefix/include \
1404         $prefix/include/ncurses \
1405         /usr/local/include \
1406         /usr/local/include/ncurses \
1407         /usr/include \
1408         /usr/include/ncurses
1409 do
1410         cf_dir=`eval echo $cf_symbol`
1411         if test -f $cf_dir/curses.h ; then
1412         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1413                 includedir="$cf_symbol"
1414                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1415                 break
1416         fi
1417         fi
1418         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1419 done
1420 echo "$as_me:1420: result: $includedir" >&5
1421 echo "${ECHO_T}$includedir" >&6
1422 fi
1423
1424 ###     Checks for programs.
1425
1426 # Check whether --with-ada or --without-ada was given.
1427 if test "${with_ada+set}" = set; then
1428   withval="$with_ada"
1429   cf_with_ada=$withval
1430 else
1431   cf_with_ada=yes
1432 fi;
1433 if test "x$cf_with_ada" = xyes
1434 then
1435         cf_PROG_CC="gnatgcc gcc cc"
1436 else
1437         cf_PROG_CC="gcc cc"
1438 fi
1439
1440 ac_ext=c
1441 ac_cpp='$CPP $CPPFLAGS'
1442 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1443 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1444 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1445 ac_main_return=return
1446 if test -n "$ac_tool_prefix"; then
1447   for ac_prog in $cf_PROG_CC
1448   do
1449     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1450 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1451 echo "$as_me:1451: checking for $ac_word" >&5
1452 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1453 if test "${ac_cv_prog_CC+set}" = set; then
1454   echo $ECHO_N "(cached) $ECHO_C" >&6
1455 else
1456   if test -n "$CC"; then
1457   ac_cv_prog_CC="$CC" # Let the user override the test.
1458 else
1459   ac_save_IFS=$IFS; IFS=$ac_path_separator
1460 ac_dummy="$PATH"
1461 for ac_dir in $ac_dummy; do
1462   IFS=$ac_save_IFS
1463   test -z "$ac_dir" && ac_dir=.
1464   $as_executable_p "$ac_dir/$ac_word" || continue
1465 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1466 echo "$as_me:1466: found $ac_dir/$ac_word" >&5
1467 break
1468 done
1469
1470 fi
1471 fi
1472 CC=$ac_cv_prog_CC
1473 if test -n "$CC"; then
1474   echo "$as_me:1474: result: $CC" >&5
1475 echo "${ECHO_T}$CC" >&6
1476 else
1477   echo "$as_me:1477: result: no" >&5
1478 echo "${ECHO_T}no" >&6
1479 fi
1480
1481     test -n "$CC" && break
1482   done
1483 fi
1484 if test -z "$CC"; then
1485   ac_ct_CC=$CC
1486   for ac_prog in $cf_PROG_CC
1487 do
1488   # Extract the first word of "$ac_prog", so it can be a program name with args.
1489 set dummy $ac_prog; ac_word=$2
1490 echo "$as_me:1490: checking for $ac_word" >&5
1491 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1492 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1493   echo $ECHO_N "(cached) $ECHO_C" >&6
1494 else
1495   if test -n "$ac_ct_CC"; then
1496   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1497 else
1498   ac_save_IFS=$IFS; IFS=$ac_path_separator
1499 ac_dummy="$PATH"
1500 for ac_dir in $ac_dummy; do
1501   IFS=$ac_save_IFS
1502   test -z "$ac_dir" && ac_dir=.
1503   $as_executable_p "$ac_dir/$ac_word" || continue
1504 ac_cv_prog_ac_ct_CC="$ac_prog"
1505 echo "$as_me:1505: found $ac_dir/$ac_word" >&5
1506 break
1507 done
1508
1509 fi
1510 fi
1511 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1512 if test -n "$ac_ct_CC"; then
1513   echo "$as_me:1513: result: $ac_ct_CC" >&5
1514 echo "${ECHO_T}$ac_ct_CC" >&6
1515 else
1516   echo "$as_me:1516: result: no" >&5
1517 echo "${ECHO_T}no" >&6
1518 fi
1519
1520   test -n "$ac_ct_CC" && break
1521 done
1522
1523   CC=$ac_ct_CC
1524 fi
1525
1526 test -z "$CC" && { { echo "$as_me:1526: error: no acceptable cc found in \$PATH" >&5
1527 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1528    { (exit 1); exit 1; }; }
1529
1530 # Provide some information about the compiler.
1531 echo "$as_me:1531:" \
1532      "checking for C compiler version" >&5
1533 ac_compiler=`set X $ac_compile; echo $2`
1534 { (eval echo "$as_me:1534: \"$ac_compiler --version </dev/null >&5\"") >&5
1535   (eval $ac_compiler --version </dev/null >&5) 2>&5
1536   ac_status=$?
1537   echo "$as_me:1537: \$? = $ac_status" >&5
1538   (exit $ac_status); }
1539 { (eval echo "$as_me:1539: \"$ac_compiler -v </dev/null >&5\"") >&5
1540   (eval $ac_compiler -v </dev/null >&5) 2>&5
1541   ac_status=$?
1542   echo "$as_me:1542: \$? = $ac_status" >&5
1543   (exit $ac_status); }
1544 { (eval echo "$as_me:1544: \"$ac_compiler -V </dev/null >&5\"") >&5
1545   (eval $ac_compiler -V </dev/null >&5) 2>&5
1546   ac_status=$?
1547   echo "$as_me:1547: \$? = $ac_status" >&5
1548   (exit $ac_status); }
1549
1550 cat >conftest.$ac_ext <<_ACEOF
1551 #line 1551 "configure"
1552 #include "confdefs.h"
1553
1554 int
1555 main ()
1556 {
1557
1558   ;
1559   return 0;
1560 }
1561 _ACEOF
1562 ac_clean_files_save=$ac_clean_files
1563 ac_clean_files="$ac_clean_files a.out a.exe"
1564 # Try to create an executable without -o first, disregard a.out.
1565 # It will help us diagnose broken compilers, and finding out an intuition
1566 # of exeext.
1567 echo "$as_me:1567: checking for C compiler default output" >&5
1568 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1569 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1570 if { (eval echo "$as_me:1570: \"$ac_link_default\"") >&5
1571   (eval $ac_link_default) 2>&5
1572   ac_status=$?
1573   echo "$as_me:1573: \$? = $ac_status" >&5
1574   (exit $ac_status); }; then
1575   # Find the output, starting from the most likely.  This scheme is
1576 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1577 # resort.
1578 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1579                 ls a.out conftest 2>/dev/null;
1580                 ls a.* conftest.* 2>/dev/null`; do
1581   case $ac_file in
1582     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1583     a.out ) # We found the default executable, but exeext='' is most
1584             # certainly right.
1585             break;;
1586     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1587           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1588           export ac_cv_exeext
1589           break;;
1590     * ) break;;
1591   esac
1592 done
1593 else
1594   echo "$as_me: failed program was:" >&5
1595 cat conftest.$ac_ext >&5
1596 { { echo "$as_me:1596: error: C compiler cannot create executables" >&5
1597 echo "$as_me: error: C compiler cannot create executables" >&2;}
1598    { (exit 77); exit 77; }; }
1599 fi
1600
1601 ac_exeext=$ac_cv_exeext
1602 echo "$as_me:1602: result: $ac_file" >&5
1603 echo "${ECHO_T}$ac_file" >&6
1604
1605 # Check the compiler produces executables we can run.  If not, either
1606 # the compiler is broken, or we cross compile.
1607 echo "$as_me:1607: checking whether the C compiler works" >&5
1608 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1609 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1610 # If not cross compiling, check that we can run a simple program.
1611 if test "$cross_compiling" != yes; then
1612   if { ac_try='./$ac_file'
1613   { (eval echo "$as_me:1613: \"$ac_try\"") >&5
1614   (eval $ac_try) 2>&5
1615   ac_status=$?
1616   echo "$as_me:1616: \$? = $ac_status" >&5
1617   (exit $ac_status); }; }; then
1618     cross_compiling=no
1619   else
1620     if test "$cross_compiling" = maybe; then
1621         cross_compiling=yes
1622     else
1623         { { echo "$as_me:1623: error: cannot run C compiled programs.
1624 If you meant to cross compile, use \`--host'." >&5
1625 echo "$as_me: error: cannot run C compiled programs.
1626 If you meant to cross compile, use \`--host'." >&2;}
1627    { (exit 1); exit 1; }; }
1628     fi
1629   fi
1630 fi
1631 echo "$as_me:1631: result: yes" >&5
1632 echo "${ECHO_T}yes" >&6
1633
1634 rm -f a.out a.exe conftest$ac_cv_exeext
1635 ac_clean_files=$ac_clean_files_save
1636 # Check the compiler produces executables we can run.  If not, either
1637 # the compiler is broken, or we cross compile.
1638 echo "$as_me:1638: checking whether we are cross compiling" >&5
1639 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1640 echo "$as_me:1640: result: $cross_compiling" >&5
1641 echo "${ECHO_T}$cross_compiling" >&6
1642
1643 echo "$as_me:1643: checking for executable suffix" >&5
1644 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1645 if { (eval echo "$as_me:1645: \"$ac_link\"") >&5
1646   (eval $ac_link) 2>&5
1647   ac_status=$?
1648   echo "$as_me:1648: \$? = $ac_status" >&5
1649   (exit $ac_status); }; then
1650   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1651 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1652 # work properly (i.e., refer to `conftest.exe'), while it won't with
1653 # `rm'.
1654 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1655   case $ac_file in
1656     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1657     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1658           export ac_cv_exeext
1659           break;;
1660     * ) break;;
1661   esac
1662 done
1663 else
1664   { { echo "$as_me:1664: error: cannot compute EXEEXT: cannot compile and link" >&5
1665 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1666    { (exit 1); exit 1; }; }
1667 fi
1668
1669 rm -f conftest$ac_cv_exeext
1670 echo "$as_me:1670: result: $ac_cv_exeext" >&5
1671 echo "${ECHO_T}$ac_cv_exeext" >&6
1672
1673 rm -f conftest.$ac_ext
1674 EXEEXT=$ac_cv_exeext
1675 ac_exeext=$EXEEXT
1676 echo "$as_me:1676: checking for object suffix" >&5
1677 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1678 if test "${ac_cv_objext+set}" = set; then
1679   echo $ECHO_N "(cached) $ECHO_C" >&6
1680 else
1681   cat >conftest.$ac_ext <<_ACEOF
1682 #line 1682 "configure"
1683 #include "confdefs.h"
1684
1685 int
1686 main ()
1687 {
1688
1689   ;
1690   return 0;
1691 }
1692 _ACEOF
1693 rm -f conftest.o conftest.obj
1694 if { (eval echo "$as_me:1694: \"$ac_compile\"") >&5
1695   (eval $ac_compile) 2>&5
1696   ac_status=$?
1697   echo "$as_me:1697: \$? = $ac_status" >&5
1698   (exit $ac_status); }; then
1699   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1700   case $ac_file in
1701     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1702     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1703        break;;
1704   esac
1705 done
1706 else
1707   echo "$as_me: failed program was:" >&5
1708 cat conftest.$ac_ext >&5
1709 { { echo "$as_me:1709: error: cannot compute OBJEXT: cannot compile" >&5
1710 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1711    { (exit 1); exit 1; }; }
1712 fi
1713
1714 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1715 fi
1716 echo "$as_me:1716: result: $ac_cv_objext" >&5
1717 echo "${ECHO_T}$ac_cv_objext" >&6
1718 OBJEXT=$ac_cv_objext
1719 ac_objext=$OBJEXT
1720 echo "$as_me:1720: checking whether we are using the GNU C compiler" >&5
1721 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1722 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1723   echo $ECHO_N "(cached) $ECHO_C" >&6
1724 else
1725   cat >conftest.$ac_ext <<_ACEOF
1726 #line 1726 "configure"
1727 #include "confdefs.h"
1728
1729 int
1730 main ()
1731 {
1732 #ifndef __GNUC__
1733        choke me
1734 #endif
1735
1736   ;
1737   return 0;
1738 }
1739 _ACEOF
1740 rm -f conftest.$ac_objext
1741 if { (eval echo "$as_me:1741: \"$ac_compile\"") >&5
1742   (eval $ac_compile) 2>&5
1743   ac_status=$?
1744   echo "$as_me:1744: \$? = $ac_status" >&5
1745   (exit $ac_status); } &&
1746          { ac_try='test -s conftest.$ac_objext'
1747   { (eval echo "$as_me:1747: \"$ac_try\"") >&5
1748   (eval $ac_try) 2>&5
1749   ac_status=$?
1750   echo "$as_me:1750: \$? = $ac_status" >&5
1751   (exit $ac_status); }; }; then
1752   ac_compiler_gnu=yes
1753 else
1754   echo "$as_me: failed program was:" >&5
1755 cat conftest.$ac_ext >&5
1756 ac_compiler_gnu=no
1757 fi
1758 rm -f conftest.$ac_objext conftest.$ac_ext
1759 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1760
1761 fi
1762 echo "$as_me:1762: result: $ac_cv_c_compiler_gnu" >&5
1763 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1764 GCC=`test $ac_compiler_gnu = yes && echo yes`
1765 ac_test_CFLAGS=${CFLAGS+set}
1766 ac_save_CFLAGS=$CFLAGS
1767 CFLAGS="-g"
1768 echo "$as_me:1768: checking whether $CC accepts -g" >&5
1769 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1770 if test "${ac_cv_prog_cc_g+set}" = set; then
1771   echo $ECHO_N "(cached) $ECHO_C" >&6
1772 else
1773   cat >conftest.$ac_ext <<_ACEOF
1774 #line 1774 "configure"
1775 #include "confdefs.h"
1776
1777 int
1778 main ()
1779 {
1780
1781   ;
1782   return 0;
1783 }
1784 _ACEOF
1785 rm -f conftest.$ac_objext
1786 if { (eval echo "$as_me:1786: \"$ac_compile\"") >&5
1787   (eval $ac_compile) 2>&5
1788   ac_status=$?
1789   echo "$as_me:1789: \$? = $ac_status" >&5
1790   (exit $ac_status); } &&
1791          { ac_try='test -s conftest.$ac_objext'
1792   { (eval echo "$as_me:1792: \"$ac_try\"") >&5
1793   (eval $ac_try) 2>&5
1794   ac_status=$?
1795   echo "$as_me:1795: \$? = $ac_status" >&5
1796   (exit $ac_status); }; }; then
1797   ac_cv_prog_cc_g=yes
1798 else
1799   echo "$as_me: failed program was:" >&5
1800 cat conftest.$ac_ext >&5
1801 ac_cv_prog_cc_g=no
1802 fi
1803 rm -f conftest.$ac_objext conftest.$ac_ext
1804 fi
1805 echo "$as_me:1805: result: $ac_cv_prog_cc_g" >&5
1806 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1807 if test "$ac_test_CFLAGS" = set; then
1808   CFLAGS=$ac_save_CFLAGS
1809 elif test $ac_cv_prog_cc_g = yes; then
1810   if test "$GCC" = yes; then
1811     CFLAGS="-g -O2"
1812   else
1813     CFLAGS="-g"
1814   fi
1815 else
1816   if test "$GCC" = yes; then
1817     CFLAGS="-O2"
1818   else
1819     CFLAGS=
1820   fi
1821 fi
1822 # Some people use a C++ compiler to compile C.  Since we use `exit',
1823 # in C++ we need to declare it.  In case someone uses the same compiler
1824 # for both compiling C and C++ we need to have the C++ compiler decide
1825 # the declaration of exit, since it's the most demanding environment.
1826 cat >conftest.$ac_ext <<_ACEOF
1827 #ifndef __cplusplus
1828   choke me
1829 #endif
1830 _ACEOF
1831 rm -f conftest.$ac_objext
1832 if { (eval echo "$as_me:1832: \"$ac_compile\"") >&5
1833   (eval $ac_compile) 2>&5
1834   ac_status=$?
1835   echo "$as_me:1835: \$? = $ac_status" >&5
1836   (exit $ac_status); } &&
1837          { ac_try='test -s conftest.$ac_objext'
1838   { (eval echo "$as_me:1838: \"$ac_try\"") >&5
1839   (eval $ac_try) 2>&5
1840   ac_status=$?
1841   echo "$as_me:1841: \$? = $ac_status" >&5
1842   (exit $ac_status); }; }; then
1843   for ac_declaration in \
1844    ''\
1845    '#include <stdlib.h>' \
1846    'extern "C" void std::exit (int) throw (); using std::exit;' \
1847    'extern "C" void std::exit (int); using std::exit;' \
1848    'extern "C" void exit (int) throw ();' \
1849    'extern "C" void exit (int);' \
1850    'void exit (int);'
1851 do
1852   cat >conftest.$ac_ext <<_ACEOF
1853 #line 1853 "configure"
1854 #include "confdefs.h"
1855 #include <stdlib.h>
1856 $ac_declaration
1857 int
1858 main ()
1859 {
1860 exit (42);
1861   ;
1862   return 0;
1863 }
1864 _ACEOF
1865 rm -f conftest.$ac_objext
1866 if { (eval echo "$as_me:1866: \"$ac_compile\"") >&5
1867   (eval $ac_compile) 2>&5
1868   ac_status=$?
1869   echo "$as_me:1869: \$? = $ac_status" >&5
1870   (exit $ac_status); } &&
1871          { ac_try='test -s conftest.$ac_objext'
1872   { (eval echo "$as_me:1872: \"$ac_try\"") >&5
1873   (eval $ac_try) 2>&5
1874   ac_status=$?
1875   echo "$as_me:1875: \$? = $ac_status" >&5
1876   (exit $ac_status); }; }; then
1877   :
1878 else
1879   echo "$as_me: failed program was:" >&5
1880 cat conftest.$ac_ext >&5
1881 continue
1882 fi
1883 rm -f conftest.$ac_objext conftest.$ac_ext
1884   cat >conftest.$ac_ext <<_ACEOF
1885 #line 1885 "configure"
1886 #include "confdefs.h"
1887 $ac_declaration
1888 int
1889 main ()
1890 {
1891 exit (42);
1892   ;
1893   return 0;
1894 }
1895 _ACEOF
1896 rm -f conftest.$ac_objext
1897 if { (eval echo "$as_me:1897: \"$ac_compile\"") >&5
1898   (eval $ac_compile) 2>&5
1899   ac_status=$?
1900   echo "$as_me:1900: \$? = $ac_status" >&5
1901   (exit $ac_status); } &&
1902          { ac_try='test -s conftest.$ac_objext'
1903   { (eval echo "$as_me:1903: \"$ac_try\"") >&5
1904   (eval $ac_try) 2>&5
1905   ac_status=$?
1906   echo "$as_me:1906: \$? = $ac_status" >&5
1907   (exit $ac_status); }; }; then
1908   break
1909 else
1910   echo "$as_me: failed program was:" >&5
1911 cat conftest.$ac_ext >&5
1912 fi
1913 rm -f conftest.$ac_objext conftest.$ac_ext
1914 done
1915 rm -rf conftest*
1916 if test -n "$ac_declaration"; then
1917   echo '#ifdef __cplusplus' >>confdefs.h
1918   echo $ac_declaration      >>confdefs.h
1919   echo '#endif'             >>confdefs.h
1920 fi
1921
1922 else
1923   echo "$as_me: failed program was:" >&5
1924 cat conftest.$ac_ext >&5
1925 fi
1926 rm -f conftest.$ac_objext conftest.$ac_ext
1927 ac_ext=c
1928 ac_cpp='$CPP $CPPFLAGS'
1929 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1930 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1931 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1932 ac_main_return=return
1933
1934 GCC_VERSION=none
1935 if test "$GCC" = yes ; then
1936         echo "$as_me:1936: checking version of $CC" >&5
1937 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1938         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.].*//'`"
1939         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1940         echo "$as_me:1940: result: $GCC_VERSION" >&5
1941 echo "${ECHO_T}$GCC_VERSION" >&6
1942 fi
1943
1944 echo "$as_me:1944: checking for $CC option to accept ANSI C" >&5
1945 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1946 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1947   echo $ECHO_N "(cached) $ECHO_C" >&6
1948 else
1949   ac_cv_prog_cc_stdc=no
1950 ac_save_CC=$CC
1951 cat >conftest.$ac_ext <<_ACEOF
1952 #line 1952 "configure"
1953 #include "confdefs.h"
1954 #include <stdarg.h>
1955 #include <stdio.h>
1956 #include <sys/types.h>
1957 #include <sys/stat.h>
1958 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1959 struct buf { int x; };
1960 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1961 static char *e (p, i)
1962      char **p;
1963      int i;
1964 {
1965   return p[i];
1966 }
1967 static char *f (char * (*g) (char **, int), char **p, ...)
1968 {
1969   char *s;
1970   va_list v;
1971   va_start (v,p);
1972   s = g (p, va_arg (v,int));
1973   va_end (v);
1974   return s;
1975 }
1976 int test (int i, double x);
1977 struct s1 {int (*f) (int a);};
1978 struct s2 {int (*f) (double a);};
1979 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1980 int argc;
1981 char **argv;
1982 int
1983 main ()
1984 {
1985 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1986   ;
1987   return 0;
1988 }
1989 _ACEOF
1990 # Don't try gcc -ansi; that turns off useful extensions and
1991 # breaks some systems' header files.
1992 # AIX                   -qlanglvl=ansi
1993 # Ultrix and OSF/1      -std1
1994 # HP-UX 10.20 and later -Ae
1995 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1996 # SVR4                  -Xc -D__EXTENSIONS__
1997 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1998 do
1999   CC="$ac_save_CC $ac_arg"
2000   rm -f conftest.$ac_objext
2001 if { (eval echo "$as_me:2001: \"$ac_compile\"") >&5
2002   (eval $ac_compile) 2>&5
2003   ac_status=$?
2004   echo "$as_me:2004: \$? = $ac_status" >&5
2005   (exit $ac_status); } &&
2006          { ac_try='test -s conftest.$ac_objext'
2007   { (eval echo "$as_me:2007: \"$ac_try\"") >&5
2008   (eval $ac_try) 2>&5
2009   ac_status=$?
2010   echo "$as_me:2010: \$? = $ac_status" >&5
2011   (exit $ac_status); }; }; then
2012   ac_cv_prog_cc_stdc=$ac_arg
2013 break
2014 else
2015   echo "$as_me: failed program was:" >&5
2016 cat conftest.$ac_ext >&5
2017 fi
2018 rm -f conftest.$ac_objext
2019 done
2020 rm -f conftest.$ac_ext conftest.$ac_objext
2021 CC=$ac_save_CC
2022
2023 fi
2024
2025 case "x$ac_cv_prog_cc_stdc" in
2026   x|xno)
2027     echo "$as_me:2027: result: none needed" >&5
2028 echo "${ECHO_T}none needed" >&6 ;;
2029   *)
2030     echo "$as_me:2030: result: $ac_cv_prog_cc_stdc" >&5
2031 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2032     CC="$CC $ac_cv_prog_cc_stdc" ;;
2033 esac
2034
2035 # This should have been defined by AC_PROG_CC
2036 : ${CC:=cc}
2037
2038 echo "$as_me:2038: checking \$CC variable" >&5
2039 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2040 case "$CC" in #(vi
2041 *[\ \   ]-[IUD]*)
2042         echo "$as_me:2042: result: broken" >&5
2043 echo "${ECHO_T}broken" >&6
2044         { echo "$as_me:2044: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2045 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2046         # humor him...
2047         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2048         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2049
2050 cf_fix_cppflags=no
2051 cf_new_cflags=
2052 cf_new_cppflags=
2053 cf_new_extra_cppflags=
2054
2055 for cf_add_cflags in $cf_flags
2056 do
2057 case $cf_fix_cppflags in
2058 no)
2059         case $cf_add_cflags in #(vi
2060         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2061                 case $cf_add_cflags in
2062                 -D*)
2063                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2064
2065                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2066                                 && test -z "${cf_tst_cflags}" \
2067                                 && cf_fix_cppflags=yes
2068
2069                         if test $cf_fix_cppflags = yes ; then
2070                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2071                                 continue
2072                         elif test "${cf_tst_cflags}" = "\"'" ; then
2073                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2074                                 continue
2075                         fi
2076                         ;;
2077                 esac
2078                 case "$CPPFLAGS" in
2079                 *$cf_add_cflags) #(vi
2080                         ;;
2081                 *) #(vi
2082                         case $cf_add_cflags in #(vi
2083                         -D*)
2084                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2085
2086 CPPFLAGS=`echo "$CPPFLAGS" | \
2087         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2088                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2089
2090                                 ;;
2091                         esac
2092                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2093                         ;;
2094                 esac
2095                 ;;
2096         *)
2097                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2098                 ;;
2099         esac
2100         ;;
2101 yes)
2102         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2103
2104         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2105
2106         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2107                 && test -z "${cf_tst_cflags}" \
2108                 && cf_fix_cppflags=no
2109         ;;
2110 esac
2111 done
2112
2113 if test -n "$cf_new_cflags" ; then
2114
2115         CFLAGS="$CFLAGS $cf_new_cflags"
2116 fi
2117
2118 if test -n "$cf_new_cppflags" ; then
2119
2120         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2121 fi
2122
2123 if test -n "$cf_new_extra_cppflags" ; then
2124
2125         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2126 fi
2127
2128         ;;
2129 *)
2130         echo "$as_me:2130: result: ok" >&5
2131 echo "${ECHO_T}ok" >&6
2132         ;;
2133 esac
2134
2135 ac_ext=c
2136 ac_cpp='$CPP $CPPFLAGS'
2137 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2138 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2139 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2140 ac_main_return=return
2141 echo "$as_me:2141: checking how to run the C preprocessor" >&5
2142 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2143 # On Suns, sometimes $CPP names a directory.
2144 if test -n "$CPP" && test -d "$CPP"; then
2145   CPP=
2146 fi
2147 if test -z "$CPP"; then
2148   if test "${ac_cv_prog_CPP+set}" = set; then
2149   echo $ECHO_N "(cached) $ECHO_C" >&6
2150 else
2151       # Double quotes because CPP needs to be expanded
2152     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2153     do
2154       ac_preproc_ok=false
2155 for ac_c_preproc_warn_flag in '' yes
2156 do
2157   # Use a header file that comes with gcc, so configuring glibc
2158   # with a fresh cross-compiler works.
2159   # On the NeXT, cc -E runs the code through the compiler's parser,
2160   # not just through cpp. "Syntax error" is here to catch this case.
2161   cat >conftest.$ac_ext <<_ACEOF
2162 #line 2162 "configure"
2163 #include "confdefs.h"
2164 #include <assert.h>
2165                      Syntax error
2166 _ACEOF
2167 if { (eval echo "$as_me:2167: \"$ac_cpp conftest.$ac_ext\"") >&5
2168   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2169   ac_status=$?
2170   egrep -v '^ *\+' conftest.er1 >conftest.err
2171   rm -f conftest.er1
2172   cat conftest.err >&5
2173   echo "$as_me:2173: \$? = $ac_status" >&5
2174   (exit $ac_status); } >/dev/null; then
2175   if test -s conftest.err; then
2176     ac_cpp_err=$ac_c_preproc_warn_flag
2177   else
2178     ac_cpp_err=
2179   fi
2180 else
2181   ac_cpp_err=yes
2182 fi
2183 if test -z "$ac_cpp_err"; then
2184   :
2185 else
2186   echo "$as_me: failed program was:" >&5
2187   cat conftest.$ac_ext >&5
2188   # Broken: fails on valid input.
2189 continue
2190 fi
2191 rm -f conftest.err conftest.$ac_ext
2192
2193   # OK, works on sane cases.  Now check whether non-existent headers
2194   # can be detected and how.
2195   cat >conftest.$ac_ext <<_ACEOF
2196 #line 2196 "configure"
2197 #include "confdefs.h"
2198 #include <ac_nonexistent.h>
2199 _ACEOF
2200 if { (eval echo "$as_me:2200: \"$ac_cpp conftest.$ac_ext\"") >&5
2201   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2202   ac_status=$?
2203   egrep -v '^ *\+' conftest.er1 >conftest.err
2204   rm -f conftest.er1
2205   cat conftest.err >&5
2206   echo "$as_me:2206: \$? = $ac_status" >&5
2207   (exit $ac_status); } >/dev/null; then
2208   if test -s conftest.err; then
2209     ac_cpp_err=$ac_c_preproc_warn_flag
2210   else
2211     ac_cpp_err=
2212   fi
2213 else
2214   ac_cpp_err=yes
2215 fi
2216 if test -z "$ac_cpp_err"; then
2217   # Broken: success on invalid input.
2218 continue
2219 else
2220   echo "$as_me: failed program was:" >&5
2221   cat conftest.$ac_ext >&5
2222   # Passes both tests.
2223 ac_preproc_ok=:
2224 break
2225 fi
2226 rm -f conftest.err conftest.$ac_ext
2227
2228 done
2229 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2230 rm -f conftest.err conftest.$ac_ext
2231 if $ac_preproc_ok; then
2232   break
2233 fi
2234
2235     done
2236     ac_cv_prog_CPP=$CPP
2237
2238 fi
2239   CPP=$ac_cv_prog_CPP
2240 else
2241   ac_cv_prog_CPP=$CPP
2242 fi
2243 echo "$as_me:2243: result: $CPP" >&5
2244 echo "${ECHO_T}$CPP" >&6
2245 ac_preproc_ok=false
2246 for ac_c_preproc_warn_flag in '' yes
2247 do
2248   # Use a header file that comes with gcc, so configuring glibc
2249   # with a fresh cross-compiler works.
2250   # On the NeXT, cc -E runs the code through the compiler's parser,
2251   # not just through cpp. "Syntax error" is here to catch this case.
2252   cat >conftest.$ac_ext <<_ACEOF
2253 #line 2253 "configure"
2254 #include "confdefs.h"
2255 #include <assert.h>
2256                      Syntax error
2257 _ACEOF
2258 if { (eval echo "$as_me:2258: \"$ac_cpp conftest.$ac_ext\"") >&5
2259   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2260   ac_status=$?
2261   egrep -v '^ *\+' conftest.er1 >conftest.err
2262   rm -f conftest.er1
2263   cat conftest.err >&5
2264   echo "$as_me:2264: \$? = $ac_status" >&5
2265   (exit $ac_status); } >/dev/null; then
2266   if test -s conftest.err; then
2267     ac_cpp_err=$ac_c_preproc_warn_flag
2268   else
2269     ac_cpp_err=
2270   fi
2271 else
2272   ac_cpp_err=yes
2273 fi
2274 if test -z "$ac_cpp_err"; then
2275   :
2276 else
2277   echo "$as_me: failed program was:" >&5
2278   cat conftest.$ac_ext >&5
2279   # Broken: fails on valid input.
2280 continue
2281 fi
2282 rm -f conftest.err conftest.$ac_ext
2283
2284   # OK, works on sane cases.  Now check whether non-existent headers
2285   # can be detected and how.
2286   cat >conftest.$ac_ext <<_ACEOF
2287 #line 2287 "configure"
2288 #include "confdefs.h"
2289 #include <ac_nonexistent.h>
2290 _ACEOF
2291 if { (eval echo "$as_me:2291: \"$ac_cpp conftest.$ac_ext\"") >&5
2292   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2293   ac_status=$?
2294   egrep -v '^ *\+' conftest.er1 >conftest.err
2295   rm -f conftest.er1
2296   cat conftest.err >&5
2297   echo "$as_me:2297: \$? = $ac_status" >&5
2298   (exit $ac_status); } >/dev/null; then
2299   if test -s conftest.err; then
2300     ac_cpp_err=$ac_c_preproc_warn_flag
2301   else
2302     ac_cpp_err=
2303   fi
2304 else
2305   ac_cpp_err=yes
2306 fi
2307 if test -z "$ac_cpp_err"; then
2308   # Broken: success on invalid input.
2309 continue
2310 else
2311   echo "$as_me: failed program was:" >&5
2312   cat conftest.$ac_ext >&5
2313   # Passes both tests.
2314 ac_preproc_ok=:
2315 break
2316 fi
2317 rm -f conftest.err conftest.$ac_ext
2318
2319 done
2320 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2321 rm -f conftest.err conftest.$ac_ext
2322 if $ac_preproc_ok; then
2323   :
2324 else
2325   { { echo "$as_me:2325: error: C preprocessor \"$CPP\" fails sanity check" >&5
2326 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2327    { (exit 1); exit 1; }; }
2328 fi
2329
2330 ac_ext=c
2331 ac_cpp='$CPP $CPPFLAGS'
2332 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2333 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2334 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2335 ac_main_return=return
2336
2337 if test $ac_cv_c_compiler_gnu = yes; then
2338     echo "$as_me:2338: checking whether $CC needs -traditional" >&5
2339 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2340 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2341   echo $ECHO_N "(cached) $ECHO_C" >&6
2342 else
2343     ac_pattern="Autoconf.*'x'"
2344   cat >conftest.$ac_ext <<_ACEOF
2345 #line 2345 "configure"
2346 #include "confdefs.h"
2347 #include <sgtty.h>
2348 int Autoconf = TIOCGETP;
2349 _ACEOF
2350 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2351   egrep "$ac_pattern" >/dev/null 2>&1; then
2352   ac_cv_prog_gcc_traditional=yes
2353 else
2354   ac_cv_prog_gcc_traditional=no
2355 fi
2356 rm -rf conftest*
2357
2358   if test $ac_cv_prog_gcc_traditional = no; then
2359     cat >conftest.$ac_ext <<_ACEOF
2360 #line 2360 "configure"
2361 #include "confdefs.h"
2362 #include <termio.h>
2363 int Autoconf = TCGETA;
2364 _ACEOF
2365 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2366   egrep "$ac_pattern" >/dev/null 2>&1; then
2367   ac_cv_prog_gcc_traditional=yes
2368 fi
2369 rm -rf conftest*
2370
2371   fi
2372 fi
2373 echo "$as_me:2373: result: $ac_cv_prog_gcc_traditional" >&5
2374 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2375   if test $ac_cv_prog_gcc_traditional = yes; then
2376     CC="$CC -traditional"
2377   fi
2378 fi
2379
2380 echo "$as_me:2380: checking whether $CC understands -c and -o together" >&5
2381 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2382 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2383   echo $ECHO_N "(cached) $ECHO_C" >&6
2384 else
2385
2386 cat > conftest.$ac_ext <<CF_EOF
2387 #include <stdio.h>
2388 int main()
2389 {
2390         ${cf_cv_main_return:-return}(0);
2391 }
2392 CF_EOF
2393 # We do the test twice because some compilers refuse to overwrite an
2394 # existing .o file with -o, though they will create one.
2395 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2396 if { (eval echo "$as_me:2396: \"$ac_try\"") >&5
2397   (eval $ac_try) 2>&5
2398   ac_status=$?
2399   echo "$as_me:2399: \$? = $ac_status" >&5
2400   (exit $ac_status); } &&
2401   test -f conftest2.$ac_objext && { (eval echo "$as_me:2401: \"$ac_try\"") >&5
2402   (eval $ac_try) 2>&5
2403   ac_status=$?
2404   echo "$as_me:2404: \$? = $ac_status" >&5
2405   (exit $ac_status); };
2406 then
2407   eval cf_cv_prog_CC_c_o=yes
2408 else
2409   eval cf_cv_prog_CC_c_o=no
2410 fi
2411 rm -rf conftest*
2412
2413 fi
2414 if test $cf_cv_prog_CC_c_o = yes; then
2415   echo "$as_me:2415: result: yes" >&5
2416 echo "${ECHO_T}yes" >&6
2417 else
2418   echo "$as_me:2418: result: no" >&5
2419 echo "${ECHO_T}no" >&6
2420 fi
2421
2422 if test "$cross_compiling" = yes ; then
2423   LDCONFIG=:
2424 else
2425 case "$cf_cv_system_name" in #(vi
2426 dragonfly*|mirbsd*|freebsd*) #(vi
2427   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2428   ;;
2429 *) LDPATH=$PATH:/sbin:/usr/sbin
2430   # Extract the first word of "ldconfig", so it can be a program name with args.
2431 set dummy ldconfig; ac_word=$2
2432 echo "$as_me:2432: checking for $ac_word" >&5
2433 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2434 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2435   echo $ECHO_N "(cached) $ECHO_C" >&6
2436 else
2437   case $LDCONFIG in
2438   [\\/]* | ?:[\\/]*)
2439   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2440   ;;
2441   *)
2442   ac_save_IFS=$IFS; IFS=$ac_path_separator
2443 ac_dummy="$LDPATH"
2444 for ac_dir in $ac_dummy; do
2445   IFS=$ac_save_IFS
2446   test -z "$ac_dir" && ac_dir=.
2447   if $as_executable_p "$ac_dir/$ac_word"; then
2448    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2449    echo "$as_me:2449: found $ac_dir/$ac_word" >&5
2450    break
2451 fi
2452 done
2453
2454   ;;
2455 esac
2456 fi
2457 LDCONFIG=$ac_cv_path_LDCONFIG
2458
2459 if test -n "$LDCONFIG"; then
2460   echo "$as_me:2460: result: $LDCONFIG" >&5
2461 echo "${ECHO_T}$LDCONFIG" >&6
2462 else
2463   echo "$as_me:2463: result: no" >&5
2464 echo "${ECHO_T}no" >&6
2465 fi
2466
2467   ;;
2468 esac
2469 fi
2470
2471 echo "$as_me:2471: checking if you want to ensure bool is consistent with C++" >&5
2472 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2473
2474 # Check whether --with-cxx or --without-cxx was given.
2475 if test "${with_cxx+set}" = set; then
2476   withval="$with_cxx"
2477   cf_with_cxx=$withval
2478 else
2479   cf_with_cxx=yes
2480 fi;
2481 echo "$as_me:2481: result: $cf_with_cxx" >&5
2482 echo "${ECHO_T}$cf_with_cxx" >&6
2483 if test "X$cf_with_cxx" = Xno ; then
2484         CXX=""
2485         GXX=""
2486 else
2487         # with autoconf 2.13, we can change the error to a warning:
2488                 ac_ext=cc
2489 ac_cpp='$CXXCPP $CPPFLAGS'
2490 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2491 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2492 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2493 ac_main_return=return
2494 if test -n "$ac_tool_prefix"; then
2495   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2496   do
2497     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2498 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2499 echo "$as_me:2499: checking for $ac_word" >&5
2500 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2501 if test "${ac_cv_prog_CXX+set}" = set; then
2502   echo $ECHO_N "(cached) $ECHO_C" >&6
2503 else
2504   if test -n "$CXX"; then
2505   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2506 else
2507   ac_save_IFS=$IFS; IFS=$ac_path_separator
2508 ac_dummy="$PATH"
2509 for ac_dir in $ac_dummy; do
2510   IFS=$ac_save_IFS
2511   test -z "$ac_dir" && ac_dir=.
2512   $as_executable_p "$ac_dir/$ac_word" || continue
2513 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2514 echo "$as_me:2514: found $ac_dir/$ac_word" >&5
2515 break
2516 done
2517
2518 fi
2519 fi
2520 CXX=$ac_cv_prog_CXX
2521 if test -n "$CXX"; then
2522   echo "$as_me:2522: result: $CXX" >&5
2523 echo "${ECHO_T}$CXX" >&6
2524 else
2525   echo "$as_me:2525: result: no" >&5
2526 echo "${ECHO_T}no" >&6
2527 fi
2528
2529     test -n "$CXX" && break
2530   done
2531 fi
2532 if test -z "$CXX"; then
2533   ac_ct_CXX=$CXX
2534   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2535 do
2536   # Extract the first word of "$ac_prog", so it can be a program name with args.
2537 set dummy $ac_prog; ac_word=$2
2538 echo "$as_me:2538: checking for $ac_word" >&5
2539 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2540 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2541   echo $ECHO_N "(cached) $ECHO_C" >&6
2542 else
2543   if test -n "$ac_ct_CXX"; then
2544   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2545 else
2546   ac_save_IFS=$IFS; IFS=$ac_path_separator
2547 ac_dummy="$PATH"
2548 for ac_dir in $ac_dummy; do
2549   IFS=$ac_save_IFS
2550   test -z "$ac_dir" && ac_dir=.
2551   $as_executable_p "$ac_dir/$ac_word" || continue
2552 ac_cv_prog_ac_ct_CXX="$ac_prog"
2553 echo "$as_me:2553: found $ac_dir/$ac_word" >&5
2554 break
2555 done
2556
2557 fi
2558 fi
2559 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2560 if test -n "$ac_ct_CXX"; then
2561   echo "$as_me:2561: result: $ac_ct_CXX" >&5
2562 echo "${ECHO_T}$ac_ct_CXX" >&6
2563 else
2564   echo "$as_me:2564: result: no" >&5
2565 echo "${ECHO_T}no" >&6
2566 fi
2567
2568   test -n "$ac_ct_CXX" && break
2569 done
2570 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2571
2572   CXX=$ac_ct_CXX
2573 fi
2574
2575 # Provide some information about the compiler.
2576 echo "$as_me:2576:" \
2577      "checking for C++ compiler version" >&5
2578 ac_compiler=`set X $ac_compile; echo $2`
2579 { (eval echo "$as_me:2579: \"$ac_compiler --version </dev/null >&5\"") >&5
2580   (eval $ac_compiler --version </dev/null >&5) 2>&5
2581   ac_status=$?
2582   echo "$as_me:2582: \$? = $ac_status" >&5
2583   (exit $ac_status); }
2584 { (eval echo "$as_me:2584: \"$ac_compiler -v </dev/null >&5\"") >&5
2585   (eval $ac_compiler -v </dev/null >&5) 2>&5
2586   ac_status=$?
2587   echo "$as_me:2587: \$? = $ac_status" >&5
2588   (exit $ac_status); }
2589 { (eval echo "$as_me:2589: \"$ac_compiler -V </dev/null >&5\"") >&5
2590   (eval $ac_compiler -V </dev/null >&5) 2>&5
2591   ac_status=$?
2592   echo "$as_me:2592: \$? = $ac_status" >&5
2593   (exit $ac_status); }
2594
2595 echo "$as_me:2595: checking whether we are using the GNU C++ compiler" >&5
2596 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2597 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2598   echo $ECHO_N "(cached) $ECHO_C" >&6
2599 else
2600   cat >conftest.$ac_ext <<_ACEOF
2601 #line 2601 "configure"
2602 #include "confdefs.h"
2603
2604 int
2605 main ()
2606 {
2607 #ifndef __GNUC__
2608        choke me
2609 #endif
2610
2611   ;
2612   return 0;
2613 }
2614 _ACEOF
2615 rm -f conftest.$ac_objext
2616 if { (eval echo "$as_me:2616: \"$ac_compile\"") >&5
2617   (eval $ac_compile) 2>&5
2618   ac_status=$?
2619   echo "$as_me:2619: \$? = $ac_status" >&5
2620   (exit $ac_status); } &&
2621          { ac_try='test -s conftest.$ac_objext'
2622   { (eval echo "$as_me:2622: \"$ac_try\"") >&5
2623   (eval $ac_try) 2>&5
2624   ac_status=$?
2625   echo "$as_me:2625: \$? = $ac_status" >&5
2626   (exit $ac_status); }; }; then
2627   ac_compiler_gnu=yes
2628 else
2629   echo "$as_me: failed program was:" >&5
2630 cat conftest.$ac_ext >&5
2631 ac_compiler_gnu=no
2632 fi
2633 rm -f conftest.$ac_objext conftest.$ac_ext
2634 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2635
2636 fi
2637 echo "$as_me:2637: result: $ac_cv_cxx_compiler_gnu" >&5
2638 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2639 GXX=`test $ac_compiler_gnu = yes && echo yes`
2640 ac_test_CXXFLAGS=${CXXFLAGS+set}
2641 ac_save_CXXFLAGS=$CXXFLAGS
2642 CXXFLAGS="-g"
2643 echo "$as_me:2643: checking whether $CXX accepts -g" >&5
2644 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2645 if test "${ac_cv_prog_cxx_g+set}" = set; then
2646   echo $ECHO_N "(cached) $ECHO_C" >&6
2647 else
2648   cat >conftest.$ac_ext <<_ACEOF
2649 #line 2649 "configure"
2650 #include "confdefs.h"
2651
2652 int
2653 main ()
2654 {
2655
2656   ;
2657   return 0;
2658 }
2659 _ACEOF
2660 rm -f conftest.$ac_objext
2661 if { (eval echo "$as_me:2661: \"$ac_compile\"") >&5
2662   (eval $ac_compile) 2>&5
2663   ac_status=$?
2664   echo "$as_me:2664: \$? = $ac_status" >&5
2665   (exit $ac_status); } &&
2666          { ac_try='test -s conftest.$ac_objext'
2667   { (eval echo "$as_me:2667: \"$ac_try\"") >&5
2668   (eval $ac_try) 2>&5
2669   ac_status=$?
2670   echo "$as_me:2670: \$? = $ac_status" >&5
2671   (exit $ac_status); }; }; then
2672   ac_cv_prog_cxx_g=yes
2673 else
2674   echo "$as_me: failed program was:" >&5
2675 cat conftest.$ac_ext >&5
2676 ac_cv_prog_cxx_g=no
2677 fi
2678 rm -f conftest.$ac_objext conftest.$ac_ext
2679 fi
2680 echo "$as_me:2680: result: $ac_cv_prog_cxx_g" >&5
2681 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2682 if test "$ac_test_CXXFLAGS" = set; then
2683   CXXFLAGS=$ac_save_CXXFLAGS
2684 elif test $ac_cv_prog_cxx_g = yes; then
2685   if test "$GXX" = yes; then
2686     CXXFLAGS="-g -O2"
2687   else
2688     CXXFLAGS="-g"
2689   fi
2690 else
2691   if test "$GXX" = yes; then
2692     CXXFLAGS="-O2"
2693   else
2694     CXXFLAGS=
2695   fi
2696 fi
2697 for ac_declaration in \
2698    ''\
2699    '#include <stdlib.h>' \
2700    'extern "C" void std::exit (int) throw (); using std::exit;' \
2701    'extern "C" void std::exit (int); using std::exit;' \
2702    'extern "C" void exit (int) throw ();' \
2703    'extern "C" void exit (int);' \
2704    'void exit (int);'
2705 do
2706   cat >conftest.$ac_ext <<_ACEOF
2707 #line 2707 "configure"
2708 #include "confdefs.h"
2709 #include <stdlib.h>
2710 $ac_declaration
2711 int
2712 main ()
2713 {
2714 exit (42);
2715   ;
2716   return 0;
2717 }
2718 _ACEOF
2719 rm -f conftest.$ac_objext
2720 if { (eval echo "$as_me:2720: \"$ac_compile\"") >&5
2721   (eval $ac_compile) 2>&5
2722   ac_status=$?
2723   echo "$as_me:2723: \$? = $ac_status" >&5
2724   (exit $ac_status); } &&
2725          { ac_try='test -s conftest.$ac_objext'
2726   { (eval echo "$as_me:2726: \"$ac_try\"") >&5
2727   (eval $ac_try) 2>&5
2728   ac_status=$?
2729   echo "$as_me:2729: \$? = $ac_status" >&5
2730   (exit $ac_status); }; }; then
2731   :
2732 else
2733   echo "$as_me: failed program was:" >&5
2734 cat conftest.$ac_ext >&5
2735 continue
2736 fi
2737 rm -f conftest.$ac_objext conftest.$ac_ext
2738   cat >conftest.$ac_ext <<_ACEOF
2739 #line 2739 "configure"
2740 #include "confdefs.h"
2741 $ac_declaration
2742 int
2743 main ()
2744 {
2745 exit (42);
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   break
2763 else
2764   echo "$as_me: failed program was:" >&5
2765 cat conftest.$ac_ext >&5
2766 fi
2767 rm -f conftest.$ac_objext conftest.$ac_ext
2768 done
2769 rm -rf conftest*
2770 if test -n "$ac_declaration"; then
2771   echo '#ifdef __cplusplus' >>confdefs.h
2772   echo $ac_declaration      >>confdefs.h
2773   echo '#endif'             >>confdefs.h
2774 fi
2775
2776 ac_ext=c
2777 ac_cpp='$CPP $CPPFLAGS'
2778 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2779 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2780 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2781 ac_main_return=return
2782
2783                 # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2784         if test "$CXX" = "g++" ; then
2785                 # Extract the first word of "g++", so it can be a program name with args.
2786 set dummy g++; ac_word=$2
2787 echo "$as_me:2787: checking for $ac_word" >&5
2788 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2789 if test "${ac_cv_path_CXX+set}" = set; then
2790   echo $ECHO_N "(cached) $ECHO_C" >&6
2791 else
2792   case $CXX in
2793   [\\/]* | ?:[\\/]*)
2794   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2795   ;;
2796   *)
2797   ac_save_IFS=$IFS; IFS=$ac_path_separator
2798 ac_dummy="$PATH"
2799 for ac_dir in $ac_dummy; do
2800   IFS=$ac_save_IFS
2801   test -z "$ac_dir" && ac_dir=.
2802   if $as_executable_p "$ac_dir/$ac_word"; then
2803    ac_cv_path_CXX="$ac_dir/$ac_word"
2804    echo "$as_me:2804: found $ac_dir/$ac_word" >&5
2805    break
2806 fi
2807 done
2808
2809   ;;
2810 esac
2811 fi
2812 CXX=$ac_cv_path_CXX
2813
2814 if test -n "$CXX"; then
2815   echo "$as_me:2815: result: $CXX" >&5
2816 echo "${ECHO_T}$CXX" >&6
2817 else
2818   echo "$as_me:2818: result: no" >&5
2819 echo "${ECHO_T}no" >&6
2820 fi
2821
2822         fi
2823         case "x$CXX" in #(vi
2824         x|xg++)
2825                 { echo "$as_me:2825: WARNING: You don't have any C++ compiler, too bad" >&5
2826 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2827                 cf_with_cxx=no; CXX=""; GXX="";
2828                 ;;
2829         esac
2830 fi
2831
2832 GXX_VERSION=none
2833 if test "$GXX" = yes; then
2834         echo "$as_me:2834: checking version of ${CXX:-g++}" >&5
2835 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2836         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2837         test -z "$GXX_VERSION" && GXX_VERSION=unknown
2838         echo "$as_me:2838: result: $GXX_VERSION" >&5
2839 echo "${ECHO_T}$GXX_VERSION" >&6
2840 fi
2841
2842 case $GXX_VERSION in
2843 1*|2.[0-6]*)
2844         # GXX=""; CXX=""; ac_cv_prog_gxx=no
2845         # cf_cxx_library=no
2846         { echo "$as_me:2846: WARNING: templates do not work" >&5
2847 echo "$as_me: WARNING: templates do not work" >&2;}
2848         ;;
2849 esac
2850
2851 echo "$as_me:2851: checking if you want to build C++ binding and demo" >&5
2852 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
2853
2854 # Check whether --with-cxx-binding or --without-cxx-binding was given.
2855 if test "${with_cxx_binding+set}" = set; then
2856   withval="$with_cxx_binding"
2857   cf_with_cxx_binding=$withval
2858 else
2859   cf_with_cxx_binding=$cf_with_cxx
2860 fi;
2861 echo "$as_me:2861: result: $cf_with_cxx_binding" >&5
2862 echo "${ECHO_T}$cf_with_cxx_binding" >&6
2863
2864 echo "$as_me:2864: checking if you want to build with Ada95" >&5
2865 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
2866 echo "$as_me:2866: result: $cf_with_ada" >&5
2867 echo "${ECHO_T}$cf_with_ada" >&6
2868
2869 echo "$as_me:2869: checking if you want to install terminal database" >&5
2870 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
2871
2872 # Check whether --enable-db-install or --disable-db-install was given.
2873 if test "${enable_db_install+set}" = set; then
2874   enableval="$enable_db_install"
2875   cf_with_db_install=$enableval
2876 else
2877   cf_with_db_install=yes
2878 fi;
2879 echo "$as_me:2879: result: $cf_with_db_install" >&5
2880 echo "${ECHO_T}$cf_with_db_install" >&6
2881
2882 echo "$as_me:2882: checking if you want to install manpages" >&5
2883 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
2884
2885 # Check whether --with-manpages or --without-manpages was given.
2886 if test "${with_manpages+set}" = set; then
2887   withval="$with_manpages"
2888   cf_with_manpages=$withval
2889 else
2890   cf_with_manpages=yes
2891 fi;
2892 echo "$as_me:2892: result: $cf_with_manpages" >&5
2893 echo "${ECHO_T}$cf_with_manpages" >&6
2894
2895 echo "$as_me:2895: checking if you want to build programs such as tic" >&5
2896 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
2897
2898 # Check whether --with-progs or --without-progs was given.
2899 if test "${with_progs+set}" = set; then
2900   withval="$with_progs"
2901   cf_with_progs=$withval
2902 else
2903   cf_with_progs=yes
2904 fi;
2905 echo "$as_me:2905: result: $cf_with_progs" >&5
2906 echo "${ECHO_T}$cf_with_progs" >&6
2907
2908 echo "$as_me:2908: checking if you want to build test-programs" >&5
2909 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2910
2911 # Check whether --with-tests or --without-tests was given.
2912 if test "${with_tests+set}" = set; then
2913   withval="$with_tests"
2914   cf_with_tests=$withval
2915 else
2916   cf_with_tests=yes
2917 fi;
2918 echo "$as_me:2918: result: $cf_with_tests" >&5
2919 echo "${ECHO_T}$cf_with_tests" >&6
2920
2921 echo "$as_me:2921: checking if you wish to install curses.h" >&5
2922 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
2923
2924 # Check whether --with-curses-h or --without-curses-h was given.
2925 if test "${with_curses_h+set}" = set; then
2926   withval="$with_curses_h"
2927   with_curses_h=$withval
2928 else
2929   with_curses_h=yes
2930 fi;
2931 echo "$as_me:2931: result: $with_curses_h" >&5
2932 echo "${ECHO_T}$with_curses_h" >&6
2933
2934 modules_to_build="ncurses"
2935 if test "X$cf_with_progs" != Xno ; then
2936 modules_to_build="$modules_to_build progs tack"
2937 fi
2938 modules_to_build="$modules_to_build panel menu form"
2939
2940 test "$program_prefix" != NONE &&
2941   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2942 # Use a double $ so make ignores it.
2943 test "$program_suffix" != NONE &&
2944   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2945 # Double any \ or $.  echo might interpret backslashes.
2946 # By default was `s,x,x', remove it if useless.
2947 cat <<\_ACEOF >conftest.sed
2948 s/[\\$]/&&/g;s/;s,x,x,$//
2949 _ACEOF
2950 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2951 rm conftest.sed
2952
2953 for ac_prog in mawk gawk nawk awk
2954 do
2955   # Extract the first word of "$ac_prog", so it can be a program name with args.
2956 set dummy $ac_prog; ac_word=$2
2957 echo "$as_me:2957: checking for $ac_word" >&5
2958 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2959 if test "${ac_cv_prog_AWK+set}" = set; then
2960   echo $ECHO_N "(cached) $ECHO_C" >&6
2961 else
2962   if test -n "$AWK"; then
2963   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2964 else
2965   ac_save_IFS=$IFS; IFS=$ac_path_separator
2966 ac_dummy="$PATH"
2967 for ac_dir in $ac_dummy; do
2968   IFS=$ac_save_IFS
2969   test -z "$ac_dir" && ac_dir=.
2970   $as_executable_p "$ac_dir/$ac_word" || continue
2971 ac_cv_prog_AWK="$ac_prog"
2972 echo "$as_me:2972: found $ac_dir/$ac_word" >&5
2973 break
2974 done
2975
2976 fi
2977 fi
2978 AWK=$ac_cv_prog_AWK
2979 if test -n "$AWK"; then
2980   echo "$as_me:2980: result: $AWK" >&5
2981 echo "${ECHO_T}$AWK" >&6
2982 else
2983   echo "$as_me:2983: result: no" >&5
2984 echo "${ECHO_T}no" >&6
2985 fi
2986
2987   test -n "$AWK" && break
2988 done
2989
2990 test -z "$AWK" && { { echo "$as_me:2990: error: No awk program found" >&5
2991 echo "$as_me: error: No awk program found" >&2;}
2992    { (exit 1); exit 1; }; }
2993
2994 echo "$as_me:2994: checking for egrep" >&5
2995 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2996 if test "${ac_cv_prog_egrep+set}" = set; then
2997   echo $ECHO_N "(cached) $ECHO_C" >&6
2998 else
2999   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3000     then ac_cv_prog_egrep='grep -E'
3001     else ac_cv_prog_egrep='egrep'
3002     fi
3003 fi
3004 echo "$as_me:3004: result: $ac_cv_prog_egrep" >&5
3005 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3006  EGREP=$ac_cv_prog_egrep
3007
3008 test -z "$EGREP" && { { echo "$as_me:3008: error: No egrep program found" >&5
3009 echo "$as_me: error: No egrep program found" >&2;}
3010    { (exit 1); exit 1; }; }
3011
3012 # Find a good install program.  We prefer a C program (faster),
3013 # so one script is as good as another.  But avoid the broken or
3014 # incompatible versions:
3015 # SysV /etc/install, /usr/sbin/install
3016 # SunOS /usr/etc/install
3017 # IRIX /sbin/install
3018 # AIX /bin/install
3019 # AmigaOS /C/install, which installs bootblocks on floppy discs
3020 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3021 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3022 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3023 # ./install, which can be erroneously created by make from ./install.sh.
3024 echo "$as_me:3024: checking for a BSD compatible install" >&5
3025 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3026 if test -z "$INSTALL"; then
3027 if test "${ac_cv_path_install+set}" = set; then
3028   echo $ECHO_N "(cached) $ECHO_C" >&6
3029 else
3030     ac_save_IFS=$IFS; IFS=$ac_path_separator
3031   for ac_dir in $PATH; do
3032     IFS=$ac_save_IFS
3033     # Account for people who put trailing slashes in PATH elements.
3034     case $ac_dir/ in
3035     / | ./ | .// | /cC/* \
3036     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3037     | /usr/ucb/* ) ;;
3038     *)
3039       # OSF1 and SCO ODT 3.0 have their own names for install.
3040       # Don't use installbsd from OSF since it installs stuff as root
3041       # by default.
3042       for ac_prog in ginstall scoinst install; do
3043         if $as_executable_p "$ac_dir/$ac_prog"; then
3044           if test $ac_prog = install &&
3045             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3046             # AIX install.  It has an incompatible calling convention.
3047             :
3048           elif test $ac_prog = install &&
3049             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3050             # program-specific install script used by HP pwplus--don't use.
3051             :
3052           else
3053             ac_cv_path_install="$ac_dir/$ac_prog -c"
3054             break 2
3055           fi
3056         fi
3057       done
3058       ;;
3059     esac
3060   done
3061
3062 fi
3063   if test "${ac_cv_path_install+set}" = set; then
3064     INSTALL=$ac_cv_path_install
3065   else
3066     # As a last resort, use the slow shell script.  We don't cache a
3067     # path for INSTALL within a source directory, because that will
3068     # break other packages using the cache if that directory is
3069     # removed, or if the path is relative.
3070     INSTALL=$ac_install_sh
3071   fi
3072 fi
3073 echo "$as_me:3073: result: $INSTALL" >&5
3074 echo "${ECHO_T}$INSTALL" >&6
3075
3076 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3077 # It thinks the first close brace ends the variable substitution.
3078 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3079
3080 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3081
3082 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3083
3084 case $INSTALL in
3085 /*)
3086   ;;
3087 *)
3088   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3089   test -z "$cf_dir" && cf_dir=.
3090   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3091   ;;
3092 esac
3093
3094 for ac_prog in tdlint lint alint splint lclint
3095 do
3096   # Extract the first word of "$ac_prog", so it can be a program name with args.
3097 set dummy $ac_prog; ac_word=$2
3098 echo "$as_me:3098: checking for $ac_word" >&5
3099 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3100 if test "${ac_cv_prog_LINT+set}" = set; then
3101   echo $ECHO_N "(cached) $ECHO_C" >&6
3102 else
3103   if test -n "$LINT"; then
3104   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3105 else
3106   ac_save_IFS=$IFS; IFS=$ac_path_separator
3107 ac_dummy="$PATH"
3108 for ac_dir in $ac_dummy; do
3109   IFS=$ac_save_IFS
3110   test -z "$ac_dir" && ac_dir=.
3111   $as_executable_p "$ac_dir/$ac_word" || continue
3112 ac_cv_prog_LINT="$ac_prog"
3113 echo "$as_me:3113: found $ac_dir/$ac_word" >&5
3114 break
3115 done
3116
3117 fi
3118 fi
3119 LINT=$ac_cv_prog_LINT
3120 if test -n "$LINT"; then
3121   echo "$as_me:3121: result: $LINT" >&5
3122 echo "${ECHO_T}$LINT" >&6
3123 else
3124   echo "$as_me:3124: result: no" >&5
3125 echo "${ECHO_T}no" >&6
3126 fi
3127
3128   test -n "$LINT" && break
3129 done
3130
3131 echo "$as_me:3131: checking whether ln -s works" >&5
3132 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3133 LN_S=$as_ln_s
3134 if test "$LN_S" = "ln -s"; then
3135   echo "$as_me:3135: result: yes" >&5
3136 echo "${ECHO_T}yes" >&6
3137 else
3138   echo "$as_me:3138: result: no, using $LN_S" >&5
3139 echo "${ECHO_T}no, using $LN_S" >&6
3140 fi
3141
3142 echo "$as_me:3142: checking if $LN_S -f options work" >&5
3143 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3144
3145 rm -f conf$$.src conf$$dst
3146 echo >conf$$.dst
3147 echo first >conf$$.src
3148 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3149         cf_prog_ln_sf=yes
3150 else
3151         cf_prog_ln_sf=no
3152 fi
3153 rm -f conf$$.dst conf$$src
3154 echo "$as_me:3154: result: $cf_prog_ln_sf" >&5
3155 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3156
3157 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3158
3159 echo "$as_me:3159: checking for long file names" >&5
3160 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3161 if test "${ac_cv_sys_long_file_names+set}" = set; then
3162   echo $ECHO_N "(cached) $ECHO_C" >&6
3163 else
3164   ac_cv_sys_long_file_names=yes
3165 # Test for long file names in all the places we know might matter:
3166 #      .                the current directory, where building will happen
3167 #      $prefix/lib      where we will be installing things
3168 #      $exec_prefix/lib likewise
3169 # eval it to expand exec_prefix.
3170 #      $TMPDIR          if set, where it might want to write temporary files
3171 # if $TMPDIR is not set:
3172 #      /tmp             where it might want to write temporary files
3173 #      /var/tmp         likewise
3174 #      /usr/tmp         likewise
3175 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3176   ac_tmpdirs=$TMPDIR
3177 else
3178   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3179 fi
3180 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3181   test -d $ac_dir || continue
3182   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3183   ac_xdir=$ac_dir/cf$$
3184   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3185   ac_tf1=$ac_xdir/conftest9012345
3186   ac_tf2=$ac_xdir/conftest9012346
3187   (echo 1 >$ac_tf1) 2>/dev/null
3188   (echo 2 >$ac_tf2) 2>/dev/null
3189   ac_val=`cat $ac_tf1 2>/dev/null`
3190   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3191     ac_cv_sys_long_file_names=no
3192     rm -rf $ac_xdir 2>/dev/null
3193     break
3194   fi
3195   rm -rf $ac_xdir 2>/dev/null
3196 done
3197 fi
3198 echo "$as_me:3198: result: $ac_cv_sys_long_file_names" >&5
3199 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3200 if test $ac_cv_sys_long_file_names = yes; then
3201
3202 cat >>confdefs.h <<\EOF
3203 #define HAVE_LONG_FILE_NAMES 1
3204 EOF
3205
3206 fi
3207
3208 # if we find pkg-config, check if we should install the ".pc" files.
3209
3210 echo "$as_me:3210: checking if you want to use pkg-config" >&5
3211 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3212
3213 # Check whether --with-pkg-config or --without-pkg-config was given.
3214 if test "${with_pkg_config+set}" = set; then
3215   withval="$with_pkg_config"
3216   cf_pkg_config=$withval
3217 else
3218   cf_pkg_config=yes
3219 fi;
3220 echo "$as_me:3220: result: $cf_pkg_config" >&5
3221 echo "${ECHO_T}$cf_pkg_config" >&6
3222
3223 case $cf_pkg_config in #(vi
3224 no) #(vi
3225         PKG_CONFIG=none
3226         ;;
3227 yes) #(vi
3228
3229 if test -n "$ac_tool_prefix"; then
3230   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3231 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3232 echo "$as_me:3232: checking for $ac_word" >&5
3233 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3234 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3235   echo $ECHO_N "(cached) $ECHO_C" >&6
3236 else
3237   case $PKG_CONFIG in
3238   [\\/]* | ?:[\\/]*)
3239   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3240   ;;
3241   *)
3242   ac_save_IFS=$IFS; IFS=$ac_path_separator
3243 ac_dummy="$PATH"
3244 for ac_dir in $ac_dummy; do
3245   IFS=$ac_save_IFS
3246   test -z "$ac_dir" && ac_dir=.
3247   if $as_executable_p "$ac_dir/$ac_word"; then
3248    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3249    echo "$as_me:3249: found $ac_dir/$ac_word" >&5
3250    break
3251 fi
3252 done
3253
3254   ;;
3255 esac
3256 fi
3257 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3258
3259 if test -n "$PKG_CONFIG"; then
3260   echo "$as_me:3260: result: $PKG_CONFIG" >&5
3261 echo "${ECHO_T}$PKG_CONFIG" >&6
3262 else
3263   echo "$as_me:3263: result: no" >&5
3264 echo "${ECHO_T}no" >&6
3265 fi
3266
3267 fi
3268 if test -z "$ac_cv_path_PKG_CONFIG"; then
3269   ac_pt_PKG_CONFIG=$PKG_CONFIG
3270   # Extract the first word of "pkg-config", so it can be a program name with args.
3271 set dummy pkg-config; ac_word=$2
3272 echo "$as_me:3272: checking for $ac_word" >&5
3273 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3274 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3275   echo $ECHO_N "(cached) $ECHO_C" >&6
3276 else
3277   case $ac_pt_PKG_CONFIG in
3278   [\\/]* | ?:[\\/]*)
3279   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3280   ;;
3281   *)
3282   ac_save_IFS=$IFS; IFS=$ac_path_separator
3283 ac_dummy="$PATH"
3284 for ac_dir in $ac_dummy; do
3285   IFS=$ac_save_IFS
3286   test -z "$ac_dir" && ac_dir=.
3287   if $as_executable_p "$ac_dir/$ac_word"; then
3288    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3289    echo "$as_me:3289: found $ac_dir/$ac_word" >&5
3290    break
3291 fi
3292 done
3293
3294   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3295   ;;
3296 esac
3297 fi
3298 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3299
3300 if test -n "$ac_pt_PKG_CONFIG"; then
3301   echo "$as_me:3301: result: $ac_pt_PKG_CONFIG" >&5
3302 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3303 else
3304   echo "$as_me:3304: result: no" >&5
3305 echo "${ECHO_T}no" >&6
3306 fi
3307
3308   PKG_CONFIG=$ac_pt_PKG_CONFIG
3309 else
3310   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3311 fi
3312
3313         ;;
3314 *)
3315         PKG_CONFIG=$withval
3316         ;;
3317 esac
3318
3319 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3320 if test "$PKG_CONFIG" != none ; then
3321
3322 if test "x$prefix" != xNONE; then
3323   cf_path_syntax="$prefix"
3324 else
3325   cf_path_syntax="$ac_default_prefix"
3326 fi
3327
3328 case ".$PKG_CONFIG" in #(vi
3329 .\$\(*\)*|.\'*\'*) #(vi
3330   ;;
3331 ..|./*|.\\*) #(vi
3332   ;;
3333 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3334   ;;
3335 .\${*prefix}*|.\${*dir}*) #(vi
3336   eval PKG_CONFIG="$PKG_CONFIG"
3337   case ".$PKG_CONFIG" in #(vi
3338   .NONE/*)
3339     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3340     ;;
3341   esac
3342   ;; #(vi
3343 .no|.NONE/*)
3344   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3345   ;;
3346 *)
3347   { { echo "$as_me:3347: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3348 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3349    { (exit 1); exit 1; }; }
3350   ;;
3351 esac
3352
3353 fi
3354
3355 if test "$PKG_CONFIG" != none ; then
3356         echo "$as_me:3356: checking for $PKG_CONFIG library directory" >&5
3357 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3358
3359 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3360 if test "${with_pkg_config_libdir+set}" = set; then
3361   withval="$with_pkg_config_libdir"
3362   PKG_CONFIG_LIBDIR=$withval
3363 else
3364   PKG_CONFIG_LIBDIR=yes
3365 fi;
3366
3367         case x$PKG_CONFIG_LIBDIR in #(vi
3368         x/*) #(vi
3369                 ;;
3370         xyes) #(vi
3371                 # look for the library directory using the same prefix as the executable
3372                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3373                 case x`(arch) 2>/dev/null` in #(vi
3374                 *64) #(vi
3375                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3376                         do
3377                                 if test -d $cf_config/pkgconfig
3378                                 then
3379                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3380                                         break
3381                                 fi
3382                         done
3383                         ;;
3384                 *)
3385                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3386                         ;;
3387                 esac
3388                 ;;
3389         *)
3390                 ;;
3391         esac
3392
3393         echo "$as_me:3393: result: $PKG_CONFIG_LIBDIR" >&5
3394 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3395 fi
3396
3397 if test "$PKG_CONFIG" != none ; then
3398         echo "$as_me:3398: checking if we should install .pc files for $PKG_CONFIG" >&5
3399 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3400
3401 # Check whether --enable-pc-files or --disable-pc-files was given.
3402 if test "${enable_pc_files+set}" = set; then
3403   enableval="$enable_pc_files"
3404   enable_pc_files=$enableval
3405 else
3406   enable_pc_files=no
3407 fi;
3408         echo "$as_me:3408: result: $enable_pc_files" >&5
3409 echo "${ECHO_T}$enable_pc_files" >&6
3410         if test "$enable_pc_files" != no
3411         then
3412
3413 if test "x$prefix" != xNONE; then
3414   cf_path_syntax="$prefix"
3415 else
3416   cf_path_syntax="$ac_default_prefix"
3417 fi
3418
3419 case ".$PKG_CONFIG_LIBDIR" in #(vi
3420 .\$\(*\)*|.\'*\'*) #(vi
3421   ;;
3422 ..|./*|.\\*) #(vi
3423   ;;
3424 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3425   ;;
3426 .\${*prefix}*|.\${*dir}*) #(vi
3427   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3428   case ".$PKG_CONFIG_LIBDIR" in #(vi
3429   .NONE/*)
3430     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3431     ;;
3432   esac
3433   ;; #(vi
3434 .no|.NONE/*)
3435   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3436   ;;
3437 *)
3438   { { echo "$as_me:3438: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3439 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3440    { (exit 1); exit 1; }; }
3441   ;;
3442 esac
3443
3444         fi
3445 else
3446         enable_pc_files=no
3447 fi
3448
3449 echo "$as_me:3449: checking if we should assume mixed-case filenames" >&5
3450 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3451
3452 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3453 if test "${enable_mixed_case+set}" = set; then
3454   enableval="$enable_mixed_case"
3455   enable_mixedcase=$enableval
3456 else
3457   enable_mixedcase=auto
3458 fi;
3459 echo "$as_me:3459: result: $enable_mixedcase" >&5
3460 echo "${ECHO_T}$enable_mixedcase" >&6
3461 if test "$enable_mixedcase" = "auto" ; then
3462
3463 echo "$as_me:3463: checking if filesystem supports mixed-case filenames" >&5
3464 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3465 if test "${cf_cv_mixedcase+set}" = set; then
3466   echo $ECHO_N "(cached) $ECHO_C" >&6
3467 else
3468
3469 if test "$cross_compiling" = yes ; then
3470         case $target_alias in #(vi
3471         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
3472                 cf_cv_mixedcase=no
3473                 ;;
3474         *)
3475                 cf_cv_mixedcase=yes
3476                 ;;
3477         esac
3478 else
3479         rm -f conftest CONFTEST
3480         echo test >conftest
3481         if test -f CONFTEST ; then
3482                 cf_cv_mixedcase=no
3483         else
3484                 cf_cv_mixedcase=yes
3485         fi
3486         rm -f conftest CONFTEST
3487 fi
3488
3489 fi
3490 echo "$as_me:3490: result: $cf_cv_mixedcase" >&5
3491 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3492 test "$cf_cv_mixedcase" = yes &&
3493 cat >>confdefs.h <<\EOF
3494 #define MIXEDCASE_FILENAMES 1
3495 EOF
3496
3497 else
3498     cf_cv_mixedcase=$enable_mixedcase
3499     if test "x$enable_mixedcase" = "xyes" ; then
3500
3501 cat >>confdefs.h <<\EOF
3502 #define MIXEDCASE_FILENAMES 1
3503 EOF
3504
3505     fi
3506 fi
3507
3508 # do this after mixed-case option (tags/TAGS is not as important as tic).
3509 echo "$as_me:3509: checking whether ${MAKE-make} sets \${MAKE}" >&5
3510 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3511 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3512 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3513   echo $ECHO_N "(cached) $ECHO_C" >&6
3514 else
3515   cat >conftest.make <<\EOF
3516 all:
3517         @echo 'ac_maketemp="${MAKE}"'
3518 EOF
3519 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3520 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3521 if test -n "$ac_maketemp"; then
3522   eval ac_cv_prog_make_${ac_make}_set=yes
3523 else
3524   eval ac_cv_prog_make_${ac_make}_set=no
3525 fi
3526 rm -f conftest.make
3527 fi
3528 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3529   echo "$as_me:3529: result: yes" >&5
3530 echo "${ECHO_T}yes" >&6
3531   SET_MAKE=
3532 else
3533   echo "$as_me:3533: result: no" >&5
3534 echo "${ECHO_T}no" >&6
3535   SET_MAKE="MAKE=${MAKE-make}"
3536 fi
3537
3538 for ac_prog in exctags ctags
3539 do
3540   # Extract the first word of "$ac_prog", so it can be a program name with args.
3541 set dummy $ac_prog; ac_word=$2
3542 echo "$as_me:3542: checking for $ac_word" >&5
3543 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3544 if test "${ac_cv_prog_CTAGS+set}" = set; then
3545   echo $ECHO_N "(cached) $ECHO_C" >&6
3546 else
3547   if test -n "$CTAGS"; then
3548   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3549 else
3550   ac_save_IFS=$IFS; IFS=$ac_path_separator
3551 ac_dummy="$PATH"
3552 for ac_dir in $ac_dummy; do
3553   IFS=$ac_save_IFS
3554   test -z "$ac_dir" && ac_dir=.
3555   $as_executable_p "$ac_dir/$ac_word" || continue
3556 ac_cv_prog_CTAGS="$ac_prog"
3557 echo "$as_me:3557: found $ac_dir/$ac_word" >&5
3558 break
3559 done
3560
3561 fi
3562 fi
3563 CTAGS=$ac_cv_prog_CTAGS
3564 if test -n "$CTAGS"; then
3565   echo "$as_me:3565: result: $CTAGS" >&5
3566 echo "${ECHO_T}$CTAGS" >&6
3567 else
3568   echo "$as_me:3568: result: no" >&5
3569 echo "${ECHO_T}no" >&6
3570 fi
3571
3572   test -n "$CTAGS" && break
3573 done
3574
3575 for ac_prog in exetags etags
3576 do
3577   # Extract the first word of "$ac_prog", so it can be a program name with args.
3578 set dummy $ac_prog; ac_word=$2
3579 echo "$as_me:3579: checking for $ac_word" >&5
3580 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3581 if test "${ac_cv_prog_ETAGS+set}" = set; then
3582   echo $ECHO_N "(cached) $ECHO_C" >&6
3583 else
3584   if test -n "$ETAGS"; then
3585   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3586 else
3587   ac_save_IFS=$IFS; IFS=$ac_path_separator
3588 ac_dummy="$PATH"
3589 for ac_dir in $ac_dummy; do
3590   IFS=$ac_save_IFS
3591   test -z "$ac_dir" && ac_dir=.
3592   $as_executable_p "$ac_dir/$ac_word" || continue
3593 ac_cv_prog_ETAGS="$ac_prog"
3594 echo "$as_me:3594: found $ac_dir/$ac_word" >&5
3595 break
3596 done
3597
3598 fi
3599 fi
3600 ETAGS=$ac_cv_prog_ETAGS
3601 if test -n "$ETAGS"; then
3602   echo "$as_me:3602: result: $ETAGS" >&5
3603 echo "${ECHO_T}$ETAGS" >&6
3604 else
3605   echo "$as_me:3605: result: no" >&5
3606 echo "${ECHO_T}no" >&6
3607 fi
3608
3609   test -n "$ETAGS" && break
3610 done
3611
3612 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3613 set dummy ${CTAGS:-ctags}; ac_word=$2
3614 echo "$as_me:3614: checking for $ac_word" >&5
3615 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3616 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3617   echo $ECHO_N "(cached) $ECHO_C" >&6
3618 else
3619   if test -n "$MAKE_LOWER_TAGS"; then
3620   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3621 else
3622   ac_save_IFS=$IFS; IFS=$ac_path_separator
3623 ac_dummy="$PATH"
3624 for ac_dir in $ac_dummy; do
3625   IFS=$ac_save_IFS
3626   test -z "$ac_dir" && ac_dir=.
3627   $as_executable_p "$ac_dir/$ac_word" || continue
3628 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3629 echo "$as_me:3629: found $ac_dir/$ac_word" >&5
3630 break
3631 done
3632
3633   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3634 fi
3635 fi
3636 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3637 if test -n "$MAKE_LOWER_TAGS"; then
3638   echo "$as_me:3638: result: $MAKE_LOWER_TAGS" >&5
3639 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3640 else
3641   echo "$as_me:3641: result: no" >&5
3642 echo "${ECHO_T}no" >&6
3643 fi
3644
3645 if test "$cf_cv_mixedcase" = yes ; then
3646         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3647 set dummy ${ETAGS:-etags}; ac_word=$2
3648 echo "$as_me:3648: checking for $ac_word" >&5
3649 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3650 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3651   echo $ECHO_N "(cached) $ECHO_C" >&6
3652 else
3653   if test -n "$MAKE_UPPER_TAGS"; then
3654   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3655 else
3656   ac_save_IFS=$IFS; IFS=$ac_path_separator
3657 ac_dummy="$PATH"
3658 for ac_dir in $ac_dummy; do
3659   IFS=$ac_save_IFS
3660   test -z "$ac_dir" && ac_dir=.
3661   $as_executable_p "$ac_dir/$ac_word" || continue
3662 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3663 echo "$as_me:3663: found $ac_dir/$ac_word" >&5
3664 break
3665 done
3666
3667   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3668 fi
3669 fi
3670 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3671 if test -n "$MAKE_UPPER_TAGS"; then
3672   echo "$as_me:3672: result: $MAKE_UPPER_TAGS" >&5
3673 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3674 else
3675   echo "$as_me:3675: result: no" >&5
3676 echo "${ECHO_T}no" >&6
3677 fi
3678
3679 else
3680         MAKE_UPPER_TAGS=no
3681 fi
3682
3683 if test "$MAKE_UPPER_TAGS" = yes ; then
3684         MAKE_UPPER_TAGS=
3685 else
3686         MAKE_UPPER_TAGS="#"
3687 fi
3688
3689 if test "$MAKE_LOWER_TAGS" = yes ; then
3690         MAKE_LOWER_TAGS=
3691 else
3692         MAKE_LOWER_TAGS="#"
3693 fi
3694
3695 echo "$as_me:3695: checking for makeflags variable" >&5
3696 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3697 if test "${cf_cv_makeflags+set}" = set; then
3698   echo $ECHO_N "(cached) $ECHO_C" >&6
3699 else
3700
3701         cf_cv_makeflags=''
3702         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3703         do
3704                 cat >cf_makeflags.tmp <<CF_EOF
3705 SHELL = /bin/sh
3706 all :
3707         @ echo '.$cf_option'
3708 CF_EOF
3709                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3710                 case "$cf_result" in
3711                 .*k)
3712                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3713                         case "$cf_result" in
3714                         .*CC=*) cf_cv_makeflags=
3715                                 ;;
3716                         *)      cf_cv_makeflags=$cf_option
3717                                 ;;
3718                         esac
3719                         break
3720                         ;;
3721                 .-)     ;;
3722                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3723                         ;;
3724                 esac
3725         done
3726         rm -f cf_makeflags.tmp
3727
3728 fi
3729 echo "$as_me:3729: result: $cf_cv_makeflags" >&5
3730 echo "${ECHO_T}$cf_cv_makeflags" >&6
3731
3732 if test -n "$ac_tool_prefix"; then
3733   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3734 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3735 echo "$as_me:3735: checking for $ac_word" >&5
3736 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3737 if test "${ac_cv_prog_RANLIB+set}" = set; then
3738   echo $ECHO_N "(cached) $ECHO_C" >&6
3739 else
3740   if test -n "$RANLIB"; then
3741   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3742 else
3743   ac_save_IFS=$IFS; IFS=$ac_path_separator
3744 ac_dummy="$PATH"
3745 for ac_dir in $ac_dummy; do
3746   IFS=$ac_save_IFS
3747   test -z "$ac_dir" && ac_dir=.
3748   $as_executable_p "$ac_dir/$ac_word" || continue
3749 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3750 echo "$as_me:3750: found $ac_dir/$ac_word" >&5
3751 break
3752 done
3753
3754 fi
3755 fi
3756 RANLIB=$ac_cv_prog_RANLIB
3757 if test -n "$RANLIB"; then
3758   echo "$as_me:3758: result: $RANLIB" >&5
3759 echo "${ECHO_T}$RANLIB" >&6
3760 else
3761   echo "$as_me:3761: result: no" >&5
3762 echo "${ECHO_T}no" >&6
3763 fi
3764
3765 fi
3766 if test -z "$ac_cv_prog_RANLIB"; then
3767   ac_ct_RANLIB=$RANLIB
3768   # Extract the first word of "ranlib", so it can be a program name with args.
3769 set dummy ranlib; ac_word=$2
3770 echo "$as_me:3770: checking for $ac_word" >&5
3771 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3772 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3773   echo $ECHO_N "(cached) $ECHO_C" >&6
3774 else
3775   if test -n "$ac_ct_RANLIB"; then
3776   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3777 else
3778   ac_save_IFS=$IFS; IFS=$ac_path_separator
3779 ac_dummy="$PATH"
3780 for ac_dir in $ac_dummy; do
3781   IFS=$ac_save_IFS
3782   test -z "$ac_dir" && ac_dir=.
3783   $as_executable_p "$ac_dir/$ac_word" || continue
3784 ac_cv_prog_ac_ct_RANLIB="ranlib"
3785 echo "$as_me:3785: found $ac_dir/$ac_word" >&5
3786 break
3787 done
3788
3789   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3790 fi
3791 fi
3792 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3793 if test -n "$ac_ct_RANLIB"; then
3794   echo "$as_me:3794: result: $ac_ct_RANLIB" >&5
3795 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3796 else
3797   echo "$as_me:3797: result: no" >&5
3798 echo "${ECHO_T}no" >&6
3799 fi
3800
3801   RANLIB=$ac_ct_RANLIB
3802 else
3803   RANLIB="$ac_cv_prog_RANLIB"
3804 fi
3805
3806 if test -n "$ac_tool_prefix"; then
3807   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3808 set dummy ${ac_tool_prefix}ld; ac_word=$2
3809 echo "$as_me:3809: checking for $ac_word" >&5
3810 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3811 if test "${ac_cv_prog_LD+set}" = set; then
3812   echo $ECHO_N "(cached) $ECHO_C" >&6
3813 else
3814   if test -n "$LD"; then
3815   ac_cv_prog_LD="$LD" # Let the user override the test.
3816 else
3817   ac_save_IFS=$IFS; IFS=$ac_path_separator
3818 ac_dummy="$PATH"
3819 for ac_dir in $ac_dummy; do
3820   IFS=$ac_save_IFS
3821   test -z "$ac_dir" && ac_dir=.
3822   $as_executable_p "$ac_dir/$ac_word" || continue
3823 ac_cv_prog_LD="${ac_tool_prefix}ld"
3824 echo "$as_me:3824: found $ac_dir/$ac_word" >&5
3825 break
3826 done
3827
3828 fi
3829 fi
3830 LD=$ac_cv_prog_LD
3831 if test -n "$LD"; then
3832   echo "$as_me:3832: result: $LD" >&5
3833 echo "${ECHO_T}$LD" >&6
3834 else
3835   echo "$as_me:3835: result: no" >&5
3836 echo "${ECHO_T}no" >&6
3837 fi
3838
3839 fi
3840 if test -z "$ac_cv_prog_LD"; then
3841   ac_ct_LD=$LD
3842   # Extract the first word of "ld", so it can be a program name with args.
3843 set dummy ld; ac_word=$2
3844 echo "$as_me:3844: checking for $ac_word" >&5
3845 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3846 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3847   echo $ECHO_N "(cached) $ECHO_C" >&6
3848 else
3849   if test -n "$ac_ct_LD"; then
3850   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3851 else
3852   ac_save_IFS=$IFS; IFS=$ac_path_separator
3853 ac_dummy="$PATH"
3854 for ac_dir in $ac_dummy; do
3855   IFS=$ac_save_IFS
3856   test -z "$ac_dir" && ac_dir=.
3857   $as_executable_p "$ac_dir/$ac_word" || continue
3858 ac_cv_prog_ac_ct_LD="ld"
3859 echo "$as_me:3859: found $ac_dir/$ac_word" >&5
3860 break
3861 done
3862
3863   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3864 fi
3865 fi
3866 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3867 if test -n "$ac_ct_LD"; then
3868   echo "$as_me:3868: result: $ac_ct_LD" >&5
3869 echo "${ECHO_T}$ac_ct_LD" >&6
3870 else
3871   echo "$as_me:3871: result: no" >&5
3872 echo "${ECHO_T}no" >&6
3873 fi
3874
3875   LD=$ac_ct_LD
3876 else
3877   LD="$ac_cv_prog_LD"
3878 fi
3879
3880 if test -n "$ac_tool_prefix"; then
3881   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3882 set dummy ${ac_tool_prefix}ar; ac_word=$2
3883 echo "$as_me:3883: checking for $ac_word" >&5
3884 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3885 if test "${ac_cv_prog_AR+set}" = set; then
3886   echo $ECHO_N "(cached) $ECHO_C" >&6
3887 else
3888   if test -n "$AR"; then
3889   ac_cv_prog_AR="$AR" # Let the user override the test.
3890 else
3891   ac_save_IFS=$IFS; IFS=$ac_path_separator
3892 ac_dummy="$PATH"
3893 for ac_dir in $ac_dummy; do
3894   IFS=$ac_save_IFS
3895   test -z "$ac_dir" && ac_dir=.
3896   $as_executable_p "$ac_dir/$ac_word" || continue
3897 ac_cv_prog_AR="${ac_tool_prefix}ar"
3898 echo "$as_me:3898: found $ac_dir/$ac_word" >&5
3899 break
3900 done
3901
3902 fi
3903 fi
3904 AR=$ac_cv_prog_AR
3905 if test -n "$AR"; then
3906   echo "$as_me:3906: result: $AR" >&5
3907 echo "${ECHO_T}$AR" >&6
3908 else
3909   echo "$as_me:3909: result: no" >&5
3910 echo "${ECHO_T}no" >&6
3911 fi
3912
3913 fi
3914 if test -z "$ac_cv_prog_AR"; then
3915   ac_ct_AR=$AR
3916   # Extract the first word of "ar", so it can be a program name with args.
3917 set dummy ar; ac_word=$2
3918 echo "$as_me:3918: checking for $ac_word" >&5
3919 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3920 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3921   echo $ECHO_N "(cached) $ECHO_C" >&6
3922 else
3923   if test -n "$ac_ct_AR"; then
3924   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3925 else
3926   ac_save_IFS=$IFS; IFS=$ac_path_separator
3927 ac_dummy="$PATH"
3928 for ac_dir in $ac_dummy; do
3929   IFS=$ac_save_IFS
3930   test -z "$ac_dir" && ac_dir=.
3931   $as_executable_p "$ac_dir/$ac_word" || continue
3932 ac_cv_prog_ac_ct_AR="ar"
3933 echo "$as_me:3933: found $ac_dir/$ac_word" >&5
3934 break
3935 done
3936
3937   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3938 fi
3939 fi
3940 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3941 if test -n "$ac_ct_AR"; then
3942   echo "$as_me:3942: result: $ac_ct_AR" >&5
3943 echo "${ECHO_T}$ac_ct_AR" >&6
3944 else
3945   echo "$as_me:3945: result: no" >&5
3946 echo "${ECHO_T}no" >&6
3947 fi
3948
3949   AR=$ac_ct_AR
3950 else
3951   AR="$ac_cv_prog_AR"
3952 fi
3953
3954 if test -n "$ac_tool_prefix"; then
3955   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
3956 set dummy ${ac_tool_prefix}nm; ac_word=$2
3957 echo "$as_me:3957: checking for $ac_word" >&5
3958 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3959 if test "${ac_cv_prog_NM+set}" = set; then
3960   echo $ECHO_N "(cached) $ECHO_C" >&6
3961 else
3962   if test -n "$NM"; then
3963   ac_cv_prog_NM="$NM" # Let the user override the test.
3964 else
3965   ac_save_IFS=$IFS; IFS=$ac_path_separator
3966 ac_dummy="$PATH"
3967 for ac_dir in $ac_dummy; do
3968   IFS=$ac_save_IFS
3969   test -z "$ac_dir" && ac_dir=.
3970   $as_executable_p "$ac_dir/$ac_word" || continue
3971 ac_cv_prog_NM="${ac_tool_prefix}nm"
3972 echo "$as_me:3972: found $ac_dir/$ac_word" >&5
3973 break
3974 done
3975
3976 fi
3977 fi
3978 NM=$ac_cv_prog_NM
3979 if test -n "$NM"; then
3980   echo "$as_me:3980: result: $NM" >&5
3981 echo "${ECHO_T}$NM" >&6
3982 else
3983   echo "$as_me:3983: result: no" >&5
3984 echo "${ECHO_T}no" >&6
3985 fi
3986
3987 fi
3988 if test -z "$ac_cv_prog_NM"; then
3989   ac_ct_NM=$NM
3990   # Extract the first word of "nm", so it can be a program name with args.
3991 set dummy nm; ac_word=$2
3992 echo "$as_me:3992: checking for $ac_word" >&5
3993 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3994 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
3995   echo $ECHO_N "(cached) $ECHO_C" >&6
3996 else
3997   if test -n "$ac_ct_NM"; then
3998   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
3999 else
4000   ac_save_IFS=$IFS; IFS=$ac_path_separator
4001 ac_dummy="$PATH"
4002 for ac_dir in $ac_dummy; do
4003   IFS=$ac_save_IFS
4004   test -z "$ac_dir" && ac_dir=.
4005   $as_executable_p "$ac_dir/$ac_word" || continue
4006 ac_cv_prog_ac_ct_NM="nm"
4007 echo "$as_me:4007: found $ac_dir/$ac_word" >&5
4008 break
4009 done
4010
4011   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4012 fi
4013 fi
4014 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4015 if test -n "$ac_ct_NM"; then
4016   echo "$as_me:4016: result: $ac_ct_NM" >&5
4017 echo "${ECHO_T}$ac_ct_NM" >&6
4018 else
4019   echo "$as_me:4019: result: no" >&5
4020 echo "${ECHO_T}no" >&6
4021 fi
4022
4023   NM=$ac_ct_NM
4024 else
4025   NM="$ac_cv_prog_NM"
4026 fi
4027
4028 if test -n "$ac_tool_prefix"; then
4029   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4030 set dummy ${ac_tool_prefix}ar; ac_word=$2
4031 echo "$as_me:4031: checking for $ac_word" >&5
4032 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4033 if test "${ac_cv_prog_AR+set}" = set; then
4034   echo $ECHO_N "(cached) $ECHO_C" >&6
4035 else
4036   if test -n "$AR"; then
4037   ac_cv_prog_AR="$AR" # Let the user override the test.
4038 else
4039   ac_save_IFS=$IFS; IFS=$ac_path_separator
4040 ac_dummy="$PATH"
4041 for ac_dir in $ac_dummy; do
4042   IFS=$ac_save_IFS
4043   test -z "$ac_dir" && ac_dir=.
4044   $as_executable_p "$ac_dir/$ac_word" || continue
4045 ac_cv_prog_AR="${ac_tool_prefix}ar"
4046 echo "$as_me:4046: found $ac_dir/$ac_word" >&5
4047 break
4048 done
4049
4050 fi
4051 fi
4052 AR=$ac_cv_prog_AR
4053 if test -n "$AR"; then
4054   echo "$as_me:4054: result: $AR" >&5
4055 echo "${ECHO_T}$AR" >&6
4056 else
4057   echo "$as_me:4057: result: no" >&5
4058 echo "${ECHO_T}no" >&6
4059 fi
4060
4061 fi
4062 if test -z "$ac_cv_prog_AR"; then
4063   ac_ct_AR=$AR
4064   # Extract the first word of "ar", so it can be a program name with args.
4065 set dummy ar; ac_word=$2
4066 echo "$as_me:4066: checking for $ac_word" >&5
4067 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4068 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4069   echo $ECHO_N "(cached) $ECHO_C" >&6
4070 else
4071   if test -n "$ac_ct_AR"; then
4072   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4073 else
4074   ac_save_IFS=$IFS; IFS=$ac_path_separator
4075 ac_dummy="$PATH"
4076 for ac_dir in $ac_dummy; do
4077   IFS=$ac_save_IFS
4078   test -z "$ac_dir" && ac_dir=.
4079   $as_executable_p "$ac_dir/$ac_word" || continue
4080 ac_cv_prog_ac_ct_AR="ar"
4081 echo "$as_me:4081: found $ac_dir/$ac_word" >&5
4082 break
4083 done
4084
4085   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4086 fi
4087 fi
4088 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4089 if test -n "$ac_ct_AR"; then
4090   echo "$as_me:4090: result: $ac_ct_AR" >&5
4091 echo "${ECHO_T}$ac_ct_AR" >&6
4092 else
4093   echo "$as_me:4093: result: no" >&5
4094 echo "${ECHO_T}no" >&6
4095 fi
4096
4097   AR=$ac_ct_AR
4098 else
4099   AR="$ac_cv_prog_AR"
4100 fi
4101
4102 echo "$as_me:4102: checking for options to update archives" >&5
4103 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4104 if test "${cf_cv_ar_flags+set}" = set; then
4105   echo $ECHO_N "(cached) $ECHO_C" >&6
4106 else
4107
4108         cf_cv_ar_flags=unknown
4109         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4110         do
4111
4112                 # check if $ARFLAGS already contains this choice
4113                 if test "x$ARFLAGS" != "x" ; then
4114                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4115                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4116                                 cf_cv_ar_flags=
4117                                 break
4118                         fi
4119                 fi
4120
4121                 rm -f conftest.$ac_cv_objext
4122                 rm -f conftest.a
4123
4124                 cat >conftest.$ac_ext <<EOF
4125 #line 4125 "configure"
4126 int     testdata[3] = { 123, 456, 789 };
4127 EOF
4128                 if { (eval echo "$as_me:4128: \"$ac_compile\"") >&5
4129   (eval $ac_compile) 2>&5
4130   ac_status=$?
4131   echo "$as_me:4131: \$? = $ac_status" >&5
4132   (exit $ac_status); } ; then
4133                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4134                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4135                         if test -f conftest.a ; then
4136                                 cf_cv_ar_flags=$cf_ar_flags
4137                                 break
4138                         fi
4139                 else
4140                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4141
4142 echo "${as_me:-configure}:4142: testing cannot compile test-program ..." 1>&5
4143
4144                         break
4145                 fi
4146         done
4147         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4148
4149 fi
4150 echo "$as_me:4150: result: $cf_cv_ar_flags" >&5
4151 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4152
4153 if test -n "$ARFLAGS" ; then
4154         if test -n "$cf_cv_ar_flags" ; then
4155                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4156         fi
4157 else
4158         ARFLAGS=$cf_cv_ar_flags
4159 fi
4160
4161 echo "$as_me:4161: checking if you have specified an install-prefix" >&5
4162 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4163
4164 # Check whether --with-install-prefix or --without-install-prefix was given.
4165 if test "${with_install_prefix+set}" = set; then
4166   withval="$with_install_prefix"
4167   case "x$withval" in #(vi
4168         xyes|xno) #(vi
4169                 ;;
4170         *)      DESTDIR="$withval"
4171                 ;;
4172         esac
4173 fi;
4174 echo "$as_me:4174: result: $DESTDIR" >&5
4175 echo "${ECHO_T}$DESTDIR" >&6
4176
4177 ###############################################################################
4178
4179 # If we're cross-compiling, allow the user to override the tools and their
4180 # options.  The configure script is oriented toward identifying the host
4181 # compiler, etc., but we need a build compiler to generate parts of the source.
4182
4183 if test "$cross_compiling" = yes ; then
4184
4185         # defaults that we might want to override
4186         : ${BUILD_CFLAGS:=''}
4187         : ${BUILD_CPPFLAGS:=''}
4188         : ${BUILD_LDFLAGS:=''}
4189         : ${BUILD_LIBS:=''}
4190         : ${BUILD_EXEEXT:='$x'}
4191         : ${BUILD_OBJEXT:='o'}
4192
4193 # Check whether --with-build-cc or --without-build-cc was given.
4194 if test "${with_build_cc+set}" = set; then
4195   withval="$with_build_cc"
4196   BUILD_CC="$withval"
4197 else
4198   for ac_prog in gcc cc cl
4199 do
4200   # Extract the first word of "$ac_prog", so it can be a program name with args.
4201 set dummy $ac_prog; ac_word=$2
4202 echo "$as_me:4202: checking for $ac_word" >&5
4203 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4204 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4205   echo $ECHO_N "(cached) $ECHO_C" >&6
4206 else
4207   if test -n "$BUILD_CC"; then
4208   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4209 else
4210   ac_save_IFS=$IFS; IFS=$ac_path_separator
4211 ac_dummy="$PATH"
4212 for ac_dir in $ac_dummy; do
4213   IFS=$ac_save_IFS
4214   test -z "$ac_dir" && ac_dir=.
4215   $as_executable_p "$ac_dir/$ac_word" || continue
4216 ac_cv_prog_BUILD_CC="$ac_prog"
4217 echo "$as_me:4217: found $ac_dir/$ac_word" >&5
4218 break
4219 done
4220
4221 fi
4222 fi
4223 BUILD_CC=$ac_cv_prog_BUILD_CC
4224 if test -n "$BUILD_CC"; then
4225   echo "$as_me:4225: result: $BUILD_CC" >&5
4226 echo "${ECHO_T}$BUILD_CC" >&6
4227 else
4228   echo "$as_me:4228: result: no" >&5
4229 echo "${ECHO_T}no" >&6
4230 fi
4231
4232   test -n "$BUILD_CC" && break
4233 done
4234
4235 fi;
4236         echo "$as_me:4236: checking for native build C compiler" >&5
4237 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4238         echo "$as_me:4238: result: $BUILD_CC" >&5
4239 echo "${ECHO_T}$BUILD_CC" >&6
4240
4241         echo "$as_me:4241: checking for native build C preprocessor" >&5
4242 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4243
4244 # Check whether --with-build-cpp or --without-build-cpp was given.
4245 if test "${with_build_cpp+set}" = set; then
4246   withval="$with_build_cpp"
4247   BUILD_CPP="$withval"
4248 else
4249   BUILD_CPP='${BUILD_CC} -E'
4250 fi;
4251         echo "$as_me:4251: result: $BUILD_CPP" >&5
4252 echo "${ECHO_T}$BUILD_CPP" >&6
4253
4254         echo "$as_me:4254: checking for native build C flags" >&5
4255 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4256
4257 # Check whether --with-build-cflags or --without-build-cflags was given.
4258 if test "${with_build_cflags+set}" = set; then
4259   withval="$with_build_cflags"
4260   BUILD_CFLAGS="$withval"
4261 fi;
4262         echo "$as_me:4262: result: $BUILD_CFLAGS" >&5
4263 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4264
4265         echo "$as_me:4265: checking for native build C preprocessor-flags" >&5
4266 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4267
4268 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4269 if test "${with_build_cppflags+set}" = set; then
4270   withval="$with_build_cppflags"
4271   BUILD_CPPFLAGS="$withval"
4272 fi;
4273         echo "$as_me:4273: result: $BUILD_CPPFLAGS" >&5
4274 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4275
4276         echo "$as_me:4276: checking for native build linker-flags" >&5
4277 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4278
4279 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4280 if test "${with_build_ldflags+set}" = set; then
4281   withval="$with_build_ldflags"
4282   BUILD_LDFLAGS="$withval"
4283 fi;
4284         echo "$as_me:4284: result: $BUILD_LDFLAGS" >&5
4285 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4286
4287         echo "$as_me:4287: checking for native build linker-libraries" >&5
4288 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4289
4290 # Check whether --with-build-libs or --without-build-libs was given.
4291 if test "${with_build_libs+set}" = set; then
4292   withval="$with_build_libs"
4293   BUILD_LIBS="$withval"
4294 fi;
4295         echo "$as_me:4295: result: $BUILD_LIBS" >&5
4296 echo "${ECHO_T}$BUILD_LIBS" >&6
4297
4298         # this assumes we're on Unix.
4299         BUILD_EXEEXT=
4300         BUILD_OBJEXT=o
4301
4302         : ${BUILD_CC:='${CC}'}
4303
4304         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4305                 { { echo "$as_me:4305: error: Cross-build requires two compilers.
4306 Use --with-build-cc to specify the native compiler." >&5
4307 echo "$as_me: error: Cross-build requires two compilers.
4308 Use --with-build-cc to specify the native compiler." >&2;}
4309    { (exit 1); exit 1; }; }
4310         fi
4311
4312 else
4313         : ${BUILD_CC:='${CC}'}
4314         : ${BUILD_CPP:='${CPP}'}
4315         : ${BUILD_CFLAGS:='${CFLAGS}'}
4316         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4317         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4318         : ${BUILD_LIBS:='${LIBS}'}
4319         : ${BUILD_EXEEXT:='$x'}
4320         : ${BUILD_OBJEXT:='o'}
4321 fi
4322
4323 ###############################################################################
4324
4325 ### Options to allow the user to specify the set of libraries which are used.
4326 ### Use "--without-normal --with-shared" to allow the default model to be
4327 ### shared, for example.
4328 cf_list_models=""
4329
4330 echo "$as_me:4330: checking if libtool -version-number should be used" >&5
4331 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4332
4333 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4334 if test "${enable_libtool_version+set}" = set; then
4335   enableval="$enable_libtool_version"
4336   test "$enableval" != no && enableval=yes
4337   if test "$enableval" != "yes" ; then
4338     cf_libtool_version=no
4339   else
4340     cf_libtool_version=yes
4341   fi
4342 else
4343   enableval=yes
4344   cf_libtool_version=yes
4345
4346 fi;
4347 echo "$as_me:4347: result: $cf_libtool_version" >&5
4348 echo "${ECHO_T}$cf_libtool_version" >&6
4349
4350 if test "$cf_libtool_version" = yes ; then
4351         LIBTOOL_VERSION="-version-number"
4352 else
4353         LIBTOOL_VERSION="-version-info"
4354 fi
4355
4356 LIBTOOL=
4357
4358 # common library maintenance symbols that are convenient for libtool scripts:
4359 LIB_CREATE='${AR} -cr'
4360 LIB_OBJECT='${OBJECTS}'
4361 LIB_SUFFIX=.a
4362 LIB_PREP="$RANLIB"
4363
4364 # symbols used to prop libtool up to enable it to determine what it should be
4365 # doing:
4366 LIB_CLEAN=
4367 LIB_COMPILE=
4368 LIB_LINK='${CC}'
4369 LIB_INSTALL=
4370 LIB_UNINSTALL=
4371
4372 echo "$as_me:4372: checking if you want to build libraries with libtool" >&5
4373 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4374
4375 # Check whether --with-libtool or --without-libtool was given.
4376 if test "${with_libtool+set}" = set; then
4377   withval="$with_libtool"
4378   with_libtool=$withval
4379 else
4380   with_libtool=no
4381 fi;
4382 echo "$as_me:4382: result: $with_libtool" >&5
4383 echo "${ECHO_T}$with_libtool" >&6
4384 if test "$with_libtool" != "no"; then
4385
4386         if test "$with_libtool" != "yes" ; then
4387
4388 if test "x$prefix" != xNONE; then
4389   cf_path_syntax="$prefix"
4390 else
4391   cf_path_syntax="$ac_default_prefix"
4392 fi
4393
4394 case ".$with_libtool" in #(vi
4395 .\$\(*\)*|.\'*\'*) #(vi
4396   ;;
4397 ..|./*|.\\*) #(vi
4398   ;;
4399 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4400   ;;
4401 .\${*prefix}*|.\${*dir}*) #(vi
4402   eval with_libtool="$with_libtool"
4403   case ".$with_libtool" in #(vi
4404   .NONE/*)
4405     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4406     ;;
4407   esac
4408   ;; #(vi
4409 .no|.NONE/*)
4410   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4411   ;;
4412 *)
4413   { { echo "$as_me:4413: error: expected a pathname, not \"$with_libtool\"" >&5
4414 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4415    { (exit 1); exit 1; }; }
4416   ;;
4417 esac
4418
4419                 LIBTOOL=$with_libtool
4420         else
4421                 if test -n "$ac_tool_prefix"; then
4422   for ac_prog in libtool glibtool
4423   do
4424     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4425 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4426 echo "$as_me:4426: checking for $ac_word" >&5
4427 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4428 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4429   echo $ECHO_N "(cached) $ECHO_C" >&6
4430 else
4431   if test -n "$LIBTOOL"; then
4432   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4433 else
4434   ac_save_IFS=$IFS; IFS=$ac_path_separator
4435 ac_dummy="$PATH"
4436 for ac_dir in $ac_dummy; do
4437   IFS=$ac_save_IFS
4438   test -z "$ac_dir" && ac_dir=.
4439   $as_executable_p "$ac_dir/$ac_word" || continue
4440 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4441 echo "$as_me:4441: found $ac_dir/$ac_word" >&5
4442 break
4443 done
4444
4445 fi
4446 fi
4447 LIBTOOL=$ac_cv_prog_LIBTOOL
4448 if test -n "$LIBTOOL"; then
4449   echo "$as_me:4449: result: $LIBTOOL" >&5
4450 echo "${ECHO_T}$LIBTOOL" >&6
4451 else
4452   echo "$as_me:4452: result: no" >&5
4453 echo "${ECHO_T}no" >&6
4454 fi
4455
4456     test -n "$LIBTOOL" && break
4457   done
4458 fi
4459 if test -z "$LIBTOOL"; then
4460   ac_ct_LIBTOOL=$LIBTOOL
4461   for ac_prog in libtool glibtool
4462 do
4463   # Extract the first word of "$ac_prog", so it can be a program name with args.
4464 set dummy $ac_prog; ac_word=$2
4465 echo "$as_me:4465: checking for $ac_word" >&5
4466 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4467 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4468   echo $ECHO_N "(cached) $ECHO_C" >&6
4469 else
4470   if test -n "$ac_ct_LIBTOOL"; then
4471   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4472 else
4473   ac_save_IFS=$IFS; IFS=$ac_path_separator
4474 ac_dummy="$PATH"
4475 for ac_dir in $ac_dummy; do
4476   IFS=$ac_save_IFS
4477   test -z "$ac_dir" && ac_dir=.
4478   $as_executable_p "$ac_dir/$ac_word" || continue
4479 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4480 echo "$as_me:4480: found $ac_dir/$ac_word" >&5
4481 break
4482 done
4483
4484 fi
4485 fi
4486 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4487 if test -n "$ac_ct_LIBTOOL"; then
4488   echo "$as_me:4488: result: $ac_ct_LIBTOOL" >&5
4489 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4490 else
4491   echo "$as_me:4491: result: no" >&5
4492 echo "${ECHO_T}no" >&6
4493 fi
4494
4495   test -n "$ac_ct_LIBTOOL" && break
4496 done
4497 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4498
4499   LIBTOOL=$ac_ct_LIBTOOL
4500 fi
4501
4502 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4503 then
4504         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.].*//'`
4505 else
4506         cf_cv_libtool_version=
4507 fi
4508 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4509
4510                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4511                 then
4512
4513 unset ac_cv_prog_ac_ct_LIBTOOL
4514 unset ac_ct_LIBTOOL
4515 unset LIBTOOL
4516
4517                         if test -n "$ac_tool_prefix"; then
4518   for ac_prog in glibtool
4519   do
4520     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4521 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4522 echo "$as_me:4522: checking for $ac_word" >&5
4523 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4524 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4525   echo $ECHO_N "(cached) $ECHO_C" >&6
4526 else
4527   if test -n "$LIBTOOL"; then
4528   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4529 else
4530   ac_save_IFS=$IFS; IFS=$ac_path_separator
4531 ac_dummy="$PATH"
4532 for ac_dir in $ac_dummy; do
4533   IFS=$ac_save_IFS
4534   test -z "$ac_dir" && ac_dir=.
4535   $as_executable_p "$ac_dir/$ac_word" || continue
4536 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4537 echo "$as_me:4537: found $ac_dir/$ac_word" >&5
4538 break
4539 done
4540
4541 fi
4542 fi
4543 LIBTOOL=$ac_cv_prog_LIBTOOL
4544 if test -n "$LIBTOOL"; then
4545   echo "$as_me:4545: result: $LIBTOOL" >&5
4546 echo "${ECHO_T}$LIBTOOL" >&6
4547 else
4548   echo "$as_me:4548: result: no" >&5
4549 echo "${ECHO_T}no" >&6
4550 fi
4551
4552     test -n "$LIBTOOL" && break
4553   done
4554 fi
4555 if test -z "$LIBTOOL"; then
4556   ac_ct_LIBTOOL=$LIBTOOL
4557   for ac_prog in glibtool
4558 do
4559   # Extract the first word of "$ac_prog", so it can be a program name with args.
4560 set dummy $ac_prog; ac_word=$2
4561 echo "$as_me:4561: checking for $ac_word" >&5
4562 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4563 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4564   echo $ECHO_N "(cached) $ECHO_C" >&6
4565 else
4566   if test -n "$ac_ct_LIBTOOL"; then
4567   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4568 else
4569   ac_save_IFS=$IFS; IFS=$ac_path_separator
4570 ac_dummy="$PATH"
4571 for ac_dir in $ac_dummy; do
4572   IFS=$ac_save_IFS
4573   test -z "$ac_dir" && ac_dir=.
4574   $as_executable_p "$ac_dir/$ac_word" || continue
4575 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4576 echo "$as_me:4576: found $ac_dir/$ac_word" >&5
4577 break
4578 done
4579
4580 fi
4581 fi
4582 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4583 if test -n "$ac_ct_LIBTOOL"; then
4584   echo "$as_me:4584: result: $ac_ct_LIBTOOL" >&5
4585 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4586 else
4587   echo "$as_me:4587: result: no" >&5
4588 echo "${ECHO_T}no" >&6
4589 fi
4590
4591   test -n "$ac_ct_LIBTOOL" && break
4592 done
4593 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4594
4595   LIBTOOL=$ac_ct_LIBTOOL
4596 fi
4597
4598 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4599 then
4600         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.].*//'`
4601 else
4602         cf_cv_libtool_version=
4603 fi
4604 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4605
4606                 fi
4607         fi
4608         if test -z "$LIBTOOL" ; then
4609                 { { echo "$as_me:4609: error: Cannot find libtool" >&5
4610 echo "$as_me: error: Cannot find libtool" >&2;}
4611    { (exit 1); exit 1; }; }
4612         fi
4613         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4614         LIB_OBJECT='${OBJECTS:.o=.lo}'
4615         LIB_SUFFIX=.la
4616         LIB_CLEAN='${LIBTOOL} --mode=clean'
4617         LIB_COMPILE='${LIBTOOL} --mode=compile'
4618         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4619         LIB_INSTALL='${LIBTOOL} --mode=install'
4620         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4621         LIB_PREP=:
4622
4623 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4624 then
4625         echo "$as_me:4625: checking version of $LIBTOOL" >&5
4626 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4627
4628 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4629 then
4630         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.].*//'`
4631 else
4632         cf_cv_libtool_version=
4633 fi
4634 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4635
4636         echo "$as_me:4636: result: $cf_cv_libtool_version" >&5
4637 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4638         if test -z "$cf_cv_libtool_version" ; then
4639                 { { echo "$as_me:4639: error: This is not GNU libtool" >&5
4640 echo "$as_me: error: This is not GNU libtool" >&2;}
4641    { (exit 1); exit 1; }; }
4642         fi
4643 else
4644         { { echo "$as_me:4644: error: GNU libtool has not been found" >&5
4645 echo "$as_me: error: GNU libtool has not been found" >&2;}
4646    { (exit 1); exit 1; }; }
4647 fi
4648
4649         # special hack to add -no-undefined (which libtool should do for itself)
4650         LT_UNDEF=
4651         case "$cf_cv_system_name" in #(vi
4652         cygwin*|msys*|mingw32*|uwin*|aix[4-7]) #(vi
4653                 LT_UNDEF=-no-undefined
4654                 ;;
4655         esac
4656
4657         # special hack to add --tag option for C++ compiler
4658         case $cf_cv_libtool_version in #(vi
4659         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4660                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4661                 LIBTOOL="$LIBTOOL --tag=CC"
4662                 ;;
4663         *)
4664                 LIBTOOL_CXX="$LIBTOOL"
4665                 ;;
4666         esac
4667 else
4668         LIBTOOL=""
4669         LIBTOOL_CXX=""
4670 fi
4671
4672 test -z "$LIBTOOL" && ECHO_LT=
4673
4674 if test "$with_libtool" != "no" ; then
4675
4676 cf_list_models="$cf_list_models libtool"
4677
4678 else
4679
4680 echo "$as_me:4680: checking if you want to build shared libraries" >&5
4681 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4682
4683 # Check whether --with-shared or --without-shared was given.
4684 if test "${with_shared+set}" = set; then
4685   withval="$with_shared"
4686   with_shared=$withval
4687 else
4688   with_shared=no
4689 fi;
4690 echo "$as_me:4690: result: $with_shared" >&5
4691 echo "${ECHO_T}$with_shared" >&6
4692 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4693
4694 echo "$as_me:4694: checking if you want to build static libraries" >&5
4695 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4696
4697 # Check whether --with-normal or --without-normal was given.
4698 if test "${with_normal+set}" = set; then
4699   withval="$with_normal"
4700   with_normal=$withval
4701 else
4702   with_normal=yes
4703 fi;
4704 echo "$as_me:4704: result: $with_normal" >&5
4705 echo "${ECHO_T}$with_normal" >&6
4706 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4707
4708 echo "$as_me:4708: checking if you want to build debug libraries" >&5
4709 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4710
4711 # Check whether --with-debug or --without-debug was given.
4712 if test "${with_debug+set}" = set; then
4713   withval="$with_debug"
4714   with_debug=$withval
4715 else
4716   with_debug=yes
4717 fi;
4718 echo "$as_me:4718: result: $with_debug" >&5
4719 echo "${ECHO_T}$with_debug" >&6
4720 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4721
4722 echo "$as_me:4722: checking if you want to build profiling libraries" >&5
4723 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4724
4725 # Check whether --with-profile or --without-profile was given.
4726 if test "${with_profile+set}" = set; then
4727   withval="$with_profile"
4728   with_profile=$withval
4729 else
4730   with_profile=no
4731 fi;
4732 echo "$as_me:4732: result: $with_profile" >&5
4733 echo "${ECHO_T}$with_profile" >&6
4734 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4735
4736 fi
4737
4738 if test "X$cf_with_cxx_binding" != Xno; then
4739 if test "x$with_shared" = "xyes"; then
4740 echo "$as_me:4740: checking if you want to build C++ shared libraries" >&5
4741 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
4742
4743 # Check whether --with-cxx-shared or --without-cxx-shared was given.
4744 if test "${with_cxx_shared+set}" = set; then
4745   withval="$with_cxx_shared"
4746   with_shared_cxx=$withval
4747 else
4748   with_shared_cxx=no
4749 fi;
4750 echo "$as_me:4750: result: $with_shared_cxx" >&5
4751 echo "${ECHO_T}$with_shared_cxx" >&6
4752 fi
4753 fi
4754
4755 ###############################################################################
4756
4757 echo "$as_me:4757: checking for specified models" >&5
4758 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4759 test -z "$cf_list_models" && cf_list_models=normal
4760 test "$with_libtool" != "no" && cf_list_models=libtool
4761 echo "$as_me:4761: result: $cf_list_models" >&5
4762 echo "${ECHO_T}$cf_list_models" >&6
4763
4764 ### Use the first model as the default, and save its suffix for use in building
4765 ### up test-applications.
4766 echo "$as_me:4766: checking for default model" >&5
4767 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4768 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4769 echo "$as_me:4769: result: $DFT_LWR_MODEL" >&5
4770 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4771
4772 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4773
4774 TICS_NAME=tic
4775
4776 TINFO_NAME=tinfo
4777
4778 LIB_NAME=ncurses
4779
4780 LIB_DIR=../lib
4781 LIB_2ND=../../lib
4782
4783 echo "$as_me:4783: checking if you want to have a library-prefix" >&5
4784 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4785
4786 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4787 if test "${with_lib_prefix+set}" = set; then
4788   withval="$with_lib_prefix"
4789   with_lib_prefix=$withval
4790 else
4791   with_lib_prefix=auto
4792 fi;
4793 echo "$as_me:4793: result: $with_lib_prefix" >&5
4794 echo "${ECHO_T}$with_lib_prefix" >&6
4795
4796 if test $with_lib_prefix = auto
4797 then
4798
4799         case $cf_cv_system_name in #(vi
4800         OS/2*|os2*) #(vi
4801         LIB_PREFIX=''
4802         ;;
4803         *)      LIB_PREFIX='lib'
4804         ;;
4805         esac
4806 cf_prefix=$LIB_PREFIX
4807
4808 elif test $with_lib_prefix = no
4809 then
4810         LIB_PREFIX=
4811 else
4812         LIB_PREFIX=$with_lib_prefix
4813 fi
4814
4815 LIB_SUFFIX=
4816
4817         echo "$as_me:4817: checking for PATH separator" >&5
4818 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4819         case $cf_cv_system_name in
4820         os2*)   PATH_SEPARATOR=';'  ;;
4821         *)      ${PATH_SEPARATOR:=':'}  ;;
4822         esac
4823
4824         echo "$as_me:4824: result: $PATH_SEPARATOR" >&5
4825 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4826
4827 ###############################################################################
4828
4829 echo "$as_me:4829: checking if you want to build a separate terminfo library" >&5
4830 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4831
4832 # Check whether --with-termlib or --without-termlib was given.
4833 if test "${with_termlib+set}" = set; then
4834   withval="$with_termlib"
4835   with_termlib=$withval
4836 else
4837   with_termlib=no
4838 fi;
4839 echo "$as_me:4839: result: $with_termlib" >&5
4840 echo "${ECHO_T}$with_termlib" >&6
4841
4842 echo "$as_me:4842: checking if you want to build a separate tic library" >&5
4843 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4844
4845 # Check whether --with-ticlib or --without-ticlib was given.
4846 if test "${with_ticlib+set}" = set; then
4847   withval="$with_ticlib"
4848   with_ticlib=$withval
4849 else
4850   with_ticlib=no
4851 fi;
4852 echo "$as_me:4852: result: $with_ticlib" >&5
4853 echo "${ECHO_T}$with_ticlib" >&6
4854
4855 ### Checks for special libraries, must be done up-front.
4856 SHLIB_LIST=""
4857
4858 echo "$as_me:4858: checking if you want to link with the GPM mouse library" >&5
4859 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4860
4861 # Check whether --with-gpm or --without-gpm was given.
4862 if test "${with_gpm+set}" = set; then
4863   withval="$with_gpm"
4864   with_gpm=$withval
4865 else
4866   with_gpm=maybe
4867 fi;
4868 echo "$as_me:4868: result: $with_gpm" >&5
4869 echo "${ECHO_T}$with_gpm" >&6
4870
4871 if test "$with_gpm" != no ; then
4872         echo "$as_me:4872: checking for gpm.h" >&5
4873 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4874 if test "${ac_cv_header_gpm_h+set}" = set; then
4875   echo $ECHO_N "(cached) $ECHO_C" >&6
4876 else
4877   cat >conftest.$ac_ext <<_ACEOF
4878 #line 4878 "configure"
4879 #include "confdefs.h"
4880 #include <gpm.h>
4881 _ACEOF
4882 if { (eval echo "$as_me:4882: \"$ac_cpp conftest.$ac_ext\"") >&5
4883   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4884   ac_status=$?
4885   egrep -v '^ *\+' conftest.er1 >conftest.err
4886   rm -f conftest.er1
4887   cat conftest.err >&5
4888   echo "$as_me:4888: \$? = $ac_status" >&5
4889   (exit $ac_status); } >/dev/null; then
4890   if test -s conftest.err; then
4891     ac_cpp_err=$ac_c_preproc_warn_flag
4892   else
4893     ac_cpp_err=
4894   fi
4895 else
4896   ac_cpp_err=yes
4897 fi
4898 if test -z "$ac_cpp_err"; then
4899   ac_cv_header_gpm_h=yes
4900 else
4901   echo "$as_me: failed program was:" >&5
4902   cat conftest.$ac_ext >&5
4903   ac_cv_header_gpm_h=no
4904 fi
4905 rm -f conftest.err conftest.$ac_ext
4906 fi
4907 echo "$as_me:4907: result: $ac_cv_header_gpm_h" >&5
4908 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4909 if test $ac_cv_header_gpm_h = yes; then
4910
4911 cat >>confdefs.h <<\EOF
4912 #define HAVE_GPM_H 1
4913 EOF
4914
4915                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4916                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4917
4918 echo "${as_me:-configure}:4918: testing assuming we really have GPM library ..." 1>&5
4919
4920 cat >>confdefs.h <<\EOF
4921 #define HAVE_LIBGPM 1
4922 EOF
4923
4924                 else
4925                         echo "$as_me:4925: checking for Gpm_Open in -lgpm" >&5
4926 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4927 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4928   echo $ECHO_N "(cached) $ECHO_C" >&6
4929 else
4930   ac_check_lib_save_LIBS=$LIBS
4931 LIBS="-lgpm  $LIBS"
4932 cat >conftest.$ac_ext <<_ACEOF
4933 #line 4933 "configure"
4934 #include "confdefs.h"
4935
4936 /* Override any gcc2 internal prototype to avoid an error.  */
4937 #ifdef __cplusplus
4938 extern "C"
4939 #endif
4940 /* We use char because int might match the return type of a gcc2
4941    builtin and then its argument prototype would still apply.  */
4942 char Gpm_Open ();
4943 int
4944 main ()
4945 {
4946 Gpm_Open ();
4947   ;
4948   return 0;
4949 }
4950 _ACEOF
4951 rm -f conftest.$ac_objext conftest$ac_exeext
4952 if { (eval echo "$as_me:4952: \"$ac_link\"") >&5
4953   (eval $ac_link) 2>&5
4954   ac_status=$?
4955   echo "$as_me:4955: \$? = $ac_status" >&5
4956   (exit $ac_status); } &&
4957          { ac_try='test -s conftest$ac_exeext'
4958   { (eval echo "$as_me:4958: \"$ac_try\"") >&5
4959   (eval $ac_try) 2>&5
4960   ac_status=$?
4961   echo "$as_me:4961: \$? = $ac_status" >&5
4962   (exit $ac_status); }; }; then
4963   ac_cv_lib_gpm_Gpm_Open=yes
4964 else
4965   echo "$as_me: failed program was:" >&5
4966 cat conftest.$ac_ext >&5
4967 ac_cv_lib_gpm_Gpm_Open=no
4968 fi
4969 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4970 LIBS=$ac_check_lib_save_LIBS
4971 fi
4972 echo "$as_me:4972: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4973 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4974 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4975   :
4976 else
4977
4978                                 { { echo "$as_me:4978: error: Cannot link with GPM library" >&5
4979 echo "$as_me: error: Cannot link with GPM library" >&2;}
4980    { (exit 1); exit 1; }; }
4981                 fi
4982                 with_gpm=yes
4983
4984 fi
4985
4986 else
4987
4988                 test "$with_gpm" != maybe && { echo "$as_me:4988: WARNING: Cannot find GPM header" >&5
4989 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4990                 with_gpm=no
4991
4992 fi
4993
4994 fi
4995
4996 if test "$with_gpm" != no ; then
4997         echo "$as_me:4997: checking if you want to load GPM dynamically" >&5
4998 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4999
5000 # Check whether --with-dlsym or --without-dlsym was given.
5001 if test "${with_dlsym+set}" = set; then
5002   withval="$with_dlsym"
5003   with_dlsym=$withval
5004 else
5005   with_dlsym=yes
5006 fi;
5007         echo "$as_me:5007: result: $with_dlsym" >&5
5008 echo "${ECHO_T}$with_dlsym" >&6
5009         if test "x$with_dlsym" = xyes ; then
5010
5011 cf_have_dlsym=no
5012 echo "$as_me:5012: checking for dlsym" >&5
5013 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5014 if test "${ac_cv_func_dlsym+set}" = set; then
5015   echo $ECHO_N "(cached) $ECHO_C" >&6
5016 else
5017   cat >conftest.$ac_ext <<_ACEOF
5018 #line 5018 "configure"
5019 #include "confdefs.h"
5020 /* System header to define __stub macros and hopefully few prototypes,
5021     which can conflict with char dlsym (); below.  */
5022 #include <assert.h>
5023 /* Override any gcc2 internal prototype to avoid an error.  */
5024 #ifdef __cplusplus
5025 extern "C"
5026 #endif
5027 /* We use char because int might match the return type of a gcc2
5028    builtin and then its argument prototype would still apply.  */
5029 char dlsym ();
5030 char (*f) ();
5031
5032 int
5033 main ()
5034 {
5035 /* The GNU C library defines this for functions which it implements
5036     to always fail with ENOSYS.  Some functions are actually named
5037     something starting with __ and the normal name is an alias.  */
5038 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5039 choke me
5040 #else
5041 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5042 #endif
5043
5044   ;
5045   return 0;
5046 }
5047 _ACEOF
5048 rm -f conftest.$ac_objext conftest$ac_exeext
5049 if { (eval echo "$as_me:5049: \"$ac_link\"") >&5
5050   (eval $ac_link) 2>&5
5051   ac_status=$?
5052   echo "$as_me:5052: \$? = $ac_status" >&5
5053   (exit $ac_status); } &&
5054          { ac_try='test -s conftest$ac_exeext'
5055   { (eval echo "$as_me:5055: \"$ac_try\"") >&5
5056   (eval $ac_try) 2>&5
5057   ac_status=$?
5058   echo "$as_me:5058: \$? = $ac_status" >&5
5059   (exit $ac_status); }; }; then
5060   ac_cv_func_dlsym=yes
5061 else
5062   echo "$as_me: failed program was:" >&5
5063 cat conftest.$ac_ext >&5
5064 ac_cv_func_dlsym=no
5065 fi
5066 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5067 fi
5068 echo "$as_me:5068: result: $ac_cv_func_dlsym" >&5
5069 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5070 if test $ac_cv_func_dlsym = yes; then
5071   cf_have_dlsym=yes
5072 else
5073
5074 cf_have_libdl=no
5075 echo "$as_me:5075: checking for dlsym in -ldl" >&5
5076 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5077 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5078   echo $ECHO_N "(cached) $ECHO_C" >&6
5079 else
5080   ac_check_lib_save_LIBS=$LIBS
5081 LIBS="-ldl  $LIBS"
5082 cat >conftest.$ac_ext <<_ACEOF
5083 #line 5083 "configure"
5084 #include "confdefs.h"
5085
5086 /* Override any gcc2 internal prototype to avoid an error.  */
5087 #ifdef __cplusplus
5088 extern "C"
5089 #endif
5090 /* We use char because int might match the return type of a gcc2
5091    builtin and then its argument prototype would still apply.  */
5092 char dlsym ();
5093 int
5094 main ()
5095 {
5096 dlsym ();
5097   ;
5098   return 0;
5099 }
5100 _ACEOF
5101 rm -f conftest.$ac_objext conftest$ac_exeext
5102 if { (eval echo "$as_me:5102: \"$ac_link\"") >&5
5103   (eval $ac_link) 2>&5
5104   ac_status=$?
5105   echo "$as_me:5105: \$? = $ac_status" >&5
5106   (exit $ac_status); } &&
5107          { ac_try='test -s conftest$ac_exeext'
5108   { (eval echo "$as_me:5108: \"$ac_try\"") >&5
5109   (eval $ac_try) 2>&5
5110   ac_status=$?
5111   echo "$as_me:5111: \$? = $ac_status" >&5
5112   (exit $ac_status); }; }; then
5113   ac_cv_lib_dl_dlsym=yes
5114 else
5115   echo "$as_me: failed program was:" >&5
5116 cat conftest.$ac_ext >&5
5117 ac_cv_lib_dl_dlsym=no
5118 fi
5119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5120 LIBS=$ac_check_lib_save_LIBS
5121 fi
5122 echo "$as_me:5122: result: $ac_cv_lib_dl_dlsym" >&5
5123 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5124 if test $ac_cv_lib_dl_dlsym = yes; then
5125
5126         cf_have_dlsym=yes
5127         cf_have_libdl=yes
5128 fi
5129
5130 fi
5131
5132 if test "$cf_have_dlsym" = yes ; then
5133         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5134
5135         echo "$as_me:5135: checking whether able to link to dl*() functions" >&5
5136 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5137         cat >conftest.$ac_ext <<_ACEOF
5138 #line 5138 "configure"
5139 #include "confdefs.h"
5140 #include <dlfcn.h>
5141 int
5142 main ()
5143 {
5144
5145                 void *obj;
5146                 if ((obj = dlopen("filename", 0)) != 0) {
5147                         if (dlsym(obj, "symbolname") == 0) {
5148                         dlclose(obj);
5149                         }
5150                 }
5151   ;
5152   return 0;
5153 }
5154 _ACEOF
5155 rm -f conftest.$ac_objext conftest$ac_exeext
5156 if { (eval echo "$as_me:5156: \"$ac_link\"") >&5
5157   (eval $ac_link) 2>&5
5158   ac_status=$?
5159   echo "$as_me:5159: \$? = $ac_status" >&5
5160   (exit $ac_status); } &&
5161          { ac_try='test -s conftest$ac_exeext'
5162   { (eval echo "$as_me:5162: \"$ac_try\"") >&5
5163   (eval $ac_try) 2>&5
5164   ac_status=$?
5165   echo "$as_me:5165: \$? = $ac_status" >&5
5166   (exit $ac_status); }; }; then
5167
5168 cat >>confdefs.h <<\EOF
5169 #define HAVE_LIBDL 1
5170 EOF
5171
5172 else
5173   echo "$as_me: failed program was:" >&5
5174 cat conftest.$ac_ext >&5
5175
5176                 { { echo "$as_me:5176: error: Cannot link test program for libdl" >&5
5177 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5178    { (exit 1); exit 1; }; }
5179 fi
5180 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5181         echo "$as_me:5181: result: ok" >&5
5182 echo "${ECHO_T}ok" >&6
5183 else
5184         { { echo "$as_me:5184: error: Cannot find dlsym function" >&5
5185 echo "$as_me: error: Cannot find dlsym function" >&2;}
5186    { (exit 1); exit 1; }; }
5187 fi
5188
5189                 if test "x$with_gpm" != xyes ; then
5190                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5191
5192 echo "${as_me:-configure}:5192: testing assuming soname for gpm is $with_gpm ..." 1>&5
5193
5194                         cf_cv_gpm_soname="$with_gpm"
5195                 else
5196
5197 echo "$as_me:5197: checking for soname of gpm library" >&5
5198 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5199 if test "${cf_cv_gpm_soname+set}" = set; then
5200   echo $ECHO_N "(cached) $ECHO_C" >&6
5201 else
5202
5203 cf_cv_gpm_soname=unknown
5204 if test "$cross_compiling" != yes ; then
5205 cat >conftest.$ac_ext <<CF_EOF
5206 #include <gpm.h>
5207 int main()
5208 {
5209 if (Gpm_Open(0,0)) Gpm_Close();
5210         ${cf_cv_main_return:-return}(0);
5211 }
5212 CF_EOF
5213 cf_save_LIBS="$LIBS"
5214         LIBS="-lgpm $LIBS"
5215         if { (eval echo "$as_me:5215: \"$ac_compile\"") >&5
5216   (eval $ac_compile) 2>&5
5217   ac_status=$?
5218   echo "$as_me:5218: \$? = $ac_status" >&5
5219   (exit $ac_status); } ; then
5220                 if { (eval echo "$as_me:5220: \"$ac_link\"") >&5
5221   (eval $ac_link) 2>&5
5222   ac_status=$?
5223   echo "$as_me:5223: \$? = $ac_status" >&5
5224   (exit $ac_status); } ; then
5225                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5226                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5227                 fi
5228         fi
5229 rm -rf conftest*
5230 LIBS="$cf_save_LIBS"
5231 fi
5232
5233 fi
5234 echo "$as_me:5234: result: $cf_cv_gpm_soname" >&5
5235 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5236
5237                 fi
5238                 test "$cf_cv_gpm_soname" != "unknown" &&
5239 cat >>confdefs.h <<EOF
5240 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5241 EOF
5242
5243                 SHLIB_LIST="-ldl $SHLIB_LIST"
5244         else
5245                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5246                 TEST_LIBS="-lgpm $TEST_LIBS"
5247         fi
5248
5249 cat >>confdefs.h <<\EOF
5250 #define HAVE_LIBGPM 1
5251 EOF
5252
5253 echo "$as_me:5253: checking for Gpm_Wgetch in -lgpm" >&5
5254 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5255 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5256   echo $ECHO_N "(cached) $ECHO_C" >&6
5257 else
5258   ac_check_lib_save_LIBS=$LIBS
5259 LIBS="-lgpm  $LIBS"
5260 cat >conftest.$ac_ext <<_ACEOF
5261 #line 5261 "configure"
5262 #include "confdefs.h"
5263
5264 /* Override any gcc2 internal prototype to avoid an error.  */
5265 #ifdef __cplusplus
5266 extern "C"
5267 #endif
5268 /* We use char because int might match the return type of a gcc2
5269    builtin and then its argument prototype would still apply.  */
5270 char Gpm_Wgetch ();
5271 int
5272 main ()
5273 {
5274 Gpm_Wgetch ();
5275   ;
5276   return 0;
5277 }
5278 _ACEOF
5279 rm -f conftest.$ac_objext conftest$ac_exeext
5280 if { (eval echo "$as_me:5280: \"$ac_link\"") >&5
5281   (eval $ac_link) 2>&5
5282   ac_status=$?
5283   echo "$as_me:5283: \$? = $ac_status" >&5
5284   (exit $ac_status); } &&
5285          { ac_try='test -s conftest$ac_exeext'
5286   { (eval echo "$as_me:5286: \"$ac_try\"") >&5
5287   (eval $ac_try) 2>&5
5288   ac_status=$?
5289   echo "$as_me:5289: \$? = $ac_status" >&5
5290   (exit $ac_status); }; }; then
5291   ac_cv_lib_gpm_Gpm_Wgetch=yes
5292 else
5293   echo "$as_me: failed program was:" >&5
5294 cat conftest.$ac_ext >&5
5295 ac_cv_lib_gpm_Gpm_Wgetch=no
5296 fi
5297 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5298 LIBS=$ac_check_lib_save_LIBS
5299 fi
5300 echo "$as_me:5300: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5301 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5302 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5303
5304 echo "$as_me:5304: checking if GPM is weakly bound to curses library" >&5
5305 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5306 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5307   echo $ECHO_N "(cached) $ECHO_C" >&6
5308 else
5309
5310 cf_cv_check_gpm_wgetch=unknown
5311 if test "$cross_compiling" != yes ; then
5312
5313 cat >conftest.$ac_ext <<CF_EOF
5314 #include <gpm.h>
5315 int main()
5316 {
5317         Gpm_Wgetch();
5318         ${cf_cv_main_return:-return}(0);
5319 }
5320 CF_EOF
5321
5322         cf_save_LIBS="$LIBS"
5323         # This only works if we can look at the symbol table.  If a shared
5324         # library is stripped for install, we cannot use that.  So we're forced
5325         # to rely on the static library, noting that some packagers may not
5326         # include it.
5327         LIBS="-static -lgpm -dynamic $LIBS"
5328         if { (eval echo "$as_me:5328: \"$ac_compile\"") >&5
5329   (eval $ac_compile) 2>&5
5330   ac_status=$?
5331   echo "$as_me:5331: \$? = $ac_status" >&5
5332   (exit $ac_status); } ; then
5333                 if { (eval echo "$as_me:5333: \"$ac_link\"") >&5
5334   (eval $ac_link) 2>&5
5335   ac_status=$?
5336   echo "$as_me:5336: \$? = $ac_status" >&5
5337   (exit $ac_status); } ; then
5338                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5339                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5340                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5341                 fi
5342         fi
5343         rm -rf conftest*
5344         LIBS="$cf_save_LIBS"
5345 fi
5346
5347 fi
5348 echo "$as_me:5348: result: $cf_cv_check_gpm_wgetch" >&5
5349 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5350
5351 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5352         { echo "$as_me:5352: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5353 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5354 fi
5355
5356 fi
5357
5358 fi
5359
5360 # not everyone has "test -c"
5361 if test -c /dev/sysmouse 2>/dev/null ; then
5362 echo "$as_me:5362: checking if you want to use sysmouse" >&5
5363 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5364
5365 # Check whether --with-sysmouse or --without-sysmouse was given.
5366 if test "${with_sysmouse+set}" = set; then
5367   withval="$with_sysmouse"
5368   cf_with_sysmouse=$withval
5369 else
5370   cf_with_sysmouse=maybe
5371 fi;
5372         if test "$cf_with_sysmouse" != no ; then
5373         cat >conftest.$ac_ext <<_ACEOF
5374 #line 5374 "configure"
5375 #include "confdefs.h"
5376
5377 #include <osreldate.h>
5378 #if (__FreeBSD_version >= 400017)
5379 #include <sys/consio.h>
5380 #include <sys/fbio.h>
5381 #else
5382 #include <machine/console.h>
5383 #endif
5384
5385 int
5386 main ()
5387 {
5388
5389         struct mouse_info the_mouse;
5390         ioctl(0, CONS_MOUSECTL, &the_mouse);
5391
5392   ;
5393   return 0;
5394 }
5395 _ACEOF
5396 rm -f conftest.$ac_objext
5397 if { (eval echo "$as_me:5397: \"$ac_compile\"") >&5
5398   (eval $ac_compile) 2>&5
5399   ac_status=$?
5400   echo "$as_me:5400: \$? = $ac_status" >&5
5401   (exit $ac_status); } &&
5402          { ac_try='test -s conftest.$ac_objext'
5403   { (eval echo "$as_me:5403: \"$ac_try\"") >&5
5404   (eval $ac_try) 2>&5
5405   ac_status=$?
5406   echo "$as_me:5406: \$? = $ac_status" >&5
5407   (exit $ac_status); }; }; then
5408   cf_with_sysmouse=yes
5409 else
5410   echo "$as_me: failed program was:" >&5
5411 cat conftest.$ac_ext >&5
5412 cf_with_sysmouse=no
5413 fi
5414 rm -f conftest.$ac_objext conftest.$ac_ext
5415         fi
5416 echo "$as_me:5416: result: $cf_with_sysmouse" >&5
5417 echo "${ECHO_T}$cf_with_sysmouse" >&6
5418 test "$cf_with_sysmouse" = yes &&
5419 cat >>confdefs.h <<\EOF
5420 #define USE_SYSMOUSE 1
5421 EOF
5422
5423 fi
5424
5425 if test X"$CC_G_OPT" = X"" ; then
5426         CC_G_OPT='-g'
5427         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5428 fi
5429
5430 if test X"$CXX_G_OPT" = X"" ; then
5431         CXX_G_OPT='-g'
5432         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5433 fi
5434
5435 echo "$as_me:5435: checking for default loader flags" >&5
5436 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5437 case $DFT_LWR_MODEL in
5438 libtool) LD_MODEL=''   ;;
5439 normal)  LD_MODEL=''   ;;
5440 debug)   LD_MODEL=$CC_G_OPT ;;
5441 profile) LD_MODEL='-pg';;
5442 shared)  LD_MODEL=''   ;;
5443 esac
5444 echo "$as_me:5444: result: $LD_MODEL" >&5
5445 echo "${ECHO_T}$LD_MODEL" >&6
5446
5447 case $DFT_LWR_MODEL in
5448 shared)
5449
5450 echo "$as_me:5450: checking if rpath option should be used" >&5
5451 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5452
5453 # Check whether --enable-rpath or --disable-rpath was given.
5454 if test "${enable_rpath+set}" = set; then
5455   enableval="$enable_rpath"
5456   cf_cv_enable_rpath=$enableval
5457 else
5458   cf_cv_enable_rpath=no
5459 fi;
5460 echo "$as_me:5460: result: $cf_cv_enable_rpath" >&5
5461 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5462
5463 echo "$as_me:5463: checking if shared libraries should be relinked during install" >&5
5464 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5465
5466 # Check whether --enable-relink or --disable-relink was given.
5467 if test "${enable_relink+set}" = set; then
5468   enableval="$enable_relink"
5469   cf_cv_do_relink=$enableval
5470 else
5471   cf_cv_do_relink=yes
5472 fi;
5473 echo "$as_me:5473: result: $cf_cv_do_relink" >&5
5474 echo "${ECHO_T}$cf_cv_do_relink" >&6
5475         ;;
5476 esac
5477
5478 # we will build libraries one-level down.
5479 rel_builddir=..
5480
5481 LD_RPATH_OPT=
5482 echo "$as_me:5482: checking for an rpath option" >&5
5483 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5484 case $cf_cv_system_name in #(vi
5485 irix*) #(vi
5486         if test "$GCC" = yes; then
5487                 LD_RPATH_OPT="-Wl,-rpath,"
5488         else
5489                 LD_RPATH_OPT="-rpath "
5490         fi
5491         ;;
5492 linux*|gnu*|k*bsd*-gnu) #(vi
5493         LD_RPATH_OPT="-Wl,-rpath,"
5494         ;;
5495 openbsd[2-9].*|mirbsd*) #(vi
5496         LD_RPATH_OPT="-Wl,-rpath,"
5497         ;;
5498 dragonfly*|freebsd*) #(vi
5499         LD_RPATH_OPT="-rpath "
5500         ;;
5501 netbsd*) #(vi
5502         LD_RPATH_OPT="-Wl,-rpath,"
5503         ;;
5504 osf*|mls+*) #(vi
5505         LD_RPATH_OPT="-rpath "
5506         ;;
5507 solaris2*) #(vi
5508         LD_RPATH_OPT="-R"
5509         ;;
5510 *)
5511         ;;
5512 esac
5513 echo "$as_me:5513: result: $LD_RPATH_OPT" >&5
5514 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5515
5516 case "x$LD_RPATH_OPT" in #(vi
5517 x-R*)
5518         echo "$as_me:5518: checking if we need a space after rpath option" >&5
5519 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5520         cf_save_LIBS="$LIBS"
5521         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5522         cat >conftest.$ac_ext <<_ACEOF
5523 #line 5523 "configure"
5524 #include "confdefs.h"
5525
5526 int
5527 main ()
5528 {
5529
5530   ;
5531   return 0;
5532 }
5533 _ACEOF
5534 rm -f conftest.$ac_objext conftest$ac_exeext
5535 if { (eval echo "$as_me:5535: \"$ac_link\"") >&5
5536   (eval $ac_link) 2>&5
5537   ac_status=$?
5538   echo "$as_me:5538: \$? = $ac_status" >&5
5539   (exit $ac_status); } &&
5540          { ac_try='test -s conftest$ac_exeext'
5541   { (eval echo "$as_me:5541: \"$ac_try\"") >&5
5542   (eval $ac_try) 2>&5
5543   ac_status=$?
5544   echo "$as_me:5544: \$? = $ac_status" >&5
5545   (exit $ac_status); }; }; then
5546   cf_rpath_space=no
5547 else
5548   echo "$as_me: failed program was:" >&5
5549 cat conftest.$ac_ext >&5
5550 cf_rpath_space=yes
5551 fi
5552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5553         LIBS="$cf_save_LIBS"
5554         echo "$as_me:5554: result: $cf_rpath_space" >&5
5555 echo "${ECHO_T}$cf_rpath_space" >&6
5556         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5557         ;;
5558 esac
5559
5560         RM_SHARED_OPTS=
5561         LOCAL_LDFLAGS=
5562         LOCAL_LDFLAGS2=
5563         LD_SHARED_OPTS=
5564         INSTALL_LIB="-m 644"
5565         : ${rel_builddir:=.}
5566
5567         shlibdir=$libdir
5568
5569         MAKE_DLLS="#"
5570
5571         cf_cv_do_symlinks=no
5572         cf_ld_rpath_opt=
5573         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5574
5575         echo "$as_me:5575: checking if release/abi version should be used for shared libs" >&5
5576 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5577
5578 # Check whether --with-shlib-version or --without-shlib-version was given.
5579 if test "${with_shlib_version+set}" = set; then
5580   withval="$with_shlib_version"
5581   test -z "$withval" && withval=auto
5582         case $withval in #(vi
5583         yes) #(vi
5584                 cf_cv_shlib_version=auto
5585                 ;;
5586         rel|abi|auto|no) #(vi
5587                 cf_cv_shlib_version=$withval
5588                 ;;
5589         *)
5590                 { { echo "$as_me:5590: error: option value must be one of: rel, abi, auto or no" >&5
5591 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5592    { (exit 1); exit 1; }; }
5593                 ;;
5594         esac
5595
5596 else
5597   cf_cv_shlib_version=auto
5598 fi;
5599         echo "$as_me:5599: result: $cf_cv_shlib_version" >&5
5600 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5601
5602         cf_cv_rm_so_locs=no
5603         cf_try_cflags=
5604
5605         # Some less-capable ports of gcc support only -fpic
5606         CC_SHARED_OPTS=
5607         if test "$GCC" = yes
5608         then
5609                 echo "$as_me:5609: checking which $CC option to use" >&5
5610 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5611                 cf_save_CFLAGS="$CFLAGS"
5612                 for CC_SHARED_OPTS in -fPIC -fpic ''
5613                 do
5614                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5615                         cat >conftest.$ac_ext <<_ACEOF
5616 #line 5616 "configure"
5617 #include "confdefs.h"
5618 #include <stdio.h>
5619 int
5620 main ()
5621 {
5622 int x = 1
5623   ;
5624   return 0;
5625 }
5626 _ACEOF
5627 rm -f conftest.$ac_objext
5628 if { (eval echo "$as_me:5628: \"$ac_compile\"") >&5
5629   (eval $ac_compile) 2>&5
5630   ac_status=$?
5631   echo "$as_me:5631: \$? = $ac_status" >&5
5632   (exit $ac_status); } &&
5633          { ac_try='test -s conftest.$ac_objext'
5634   { (eval echo "$as_me:5634: \"$ac_try\"") >&5
5635   (eval $ac_try) 2>&5
5636   ac_status=$?
5637   echo "$as_me:5637: \$? = $ac_status" >&5
5638   (exit $ac_status); }; }; then
5639   break
5640 else
5641   echo "$as_me: failed program was:" >&5
5642 cat conftest.$ac_ext >&5
5643 fi
5644 rm -f conftest.$ac_objext conftest.$ac_ext
5645                 done
5646                 echo "$as_me:5646: result: $CC_SHARED_OPTS" >&5
5647 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5648                 CFLAGS="$cf_save_CFLAGS"
5649         fi
5650
5651         cf_cv_shlib_version_infix=no
5652
5653         case $cf_cv_system_name in #(vi
5654         aix4.3-9*|aix[5-7]*) #(vi
5655                 if test "$GCC" = yes; then
5656                         CC_SHARED_OPTS=
5657                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5658                 else
5659                         # CC_SHARED_OPTS='-qpic=large -G'
5660                         # perhaps "-bM:SRE -bnoentry -bexpall"
5661                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5662                 fi
5663                 ;;
5664         beos*) #(vi
5665                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5666                 ;;
5667         cygwin*) #(vi
5668                 CC_SHARED_OPTS=
5669                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5670                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5671                 cf_cv_shlib_version=cygdll
5672                 cf_cv_shlib_version_infix=cygdll
5673                 shlibdir=$bindir
5674                 MAKE_DLLS=
5675                 cat >mk_shared_lib.sh <<-CF_EOF
5676                 #!/bin/sh
5677                 SHARED_LIB=\$1
5678                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5679                 shift
5680                 cat <<-EOF
5681                 Linking shared library
5682                 ** SHARED_LIB \$SHARED_LIB
5683                 ** IMPORT_LIB \$IMPORT_LIB
5684 EOF
5685                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5686 CF_EOF
5687                 chmod +x mk_shared_lib.sh
5688                 ;;
5689         msys*) #(vi
5690                 CC_SHARED_OPTS=
5691                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5692                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5693                 cf_cv_shlib_version=msysdll
5694                 cf_cv_shlib_version_infix=msysdll
5695                 shlibdir=$bindir
5696                 MAKE_DLLS=
5697                 cat >mk_shared_lib.sh <<-CF_EOF
5698                 #!/bin/sh
5699                 SHARED_LIB=\$1
5700                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5701                 shift
5702                 cat <<-EOF
5703                 Linking shared library
5704                 ** SHARED_LIB \$SHARED_LIB
5705                 ** IMPORT_LIB \$IMPORT_LIB
5706 EOF
5707                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5708 CF_EOF
5709                 chmod +x mk_shared_lib.sh
5710                 ;;
5711         darwin*) #(vi
5712                 cf_try_cflags="no-cpp-precomp"
5713                 CC_SHARED_OPTS="-dynamic"
5714                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5715                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5716                 cf_cv_shlib_version_infix=yes
5717                 echo "$as_me:5717: checking if ld -search_paths_first works" >&5
5718 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5719 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5720   echo $ECHO_N "(cached) $ECHO_C" >&6
5721 else
5722
5723                         cf_save_LDFLAGS=$LDFLAGS
5724                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5725                         cat >conftest.$ac_ext <<_ACEOF
5726 #line 5726 "configure"
5727 #include "confdefs.h"
5728
5729 int
5730 main ()
5731 {
5732 int i;
5733   ;
5734   return 0;
5735 }
5736 _ACEOF
5737 rm -f conftest.$ac_objext conftest$ac_exeext
5738 if { (eval echo "$as_me:5738: \"$ac_link\"") >&5
5739   (eval $ac_link) 2>&5
5740   ac_status=$?
5741   echo "$as_me:5741: \$? = $ac_status" >&5
5742   (exit $ac_status); } &&
5743          { ac_try='test -s conftest$ac_exeext'
5744   { (eval echo "$as_me:5744: \"$ac_try\"") >&5
5745   (eval $ac_try) 2>&5
5746   ac_status=$?
5747   echo "$as_me:5747: \$? = $ac_status" >&5
5748   (exit $ac_status); }; }; then
5749   cf_cv_ldflags_search_paths_first=yes
5750 else
5751   echo "$as_me: failed program was:" >&5
5752 cat conftest.$ac_ext >&5
5753 cf_cv_ldflags_search_paths_first=no
5754 fi
5755 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5756                                 LDFLAGS=$cf_save_LDFLAGS
5757 fi
5758 echo "$as_me:5758: result: $cf_cv_ldflags_search_paths_first" >&5
5759 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5760                 if test $cf_cv_ldflags_search_paths_first = yes; then
5761                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5762                 fi
5763                 ;;
5764         hpux[7-8]*) #(vi
5765                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5766                 if test "$GCC" != yes; then
5767                         CC_SHARED_OPTS='+Z'
5768                 fi
5769                 MK_SHARED_LIB='${LD} -b -o $@'
5770                 INSTALL_LIB="-m 555"
5771                 ;;
5772         hpux*) #(vi
5773                 # (tested with gcc 2.7.2 -- I don't have c89)
5774                 if test "$GCC" = yes; then
5775                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5776                 else
5777                         CC_SHARED_OPTS='+Z'
5778                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5779                 fi
5780                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5781                 # HP-UX shared libraries must be executable, and should be
5782                 # readonly to exploit a quirk in the memory manager.
5783                 INSTALL_LIB="-m 555"
5784                 ;;
5785         interix*)
5786                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5787                 if test "$cf_cv_shlib_version" = rel; then
5788                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5789                 else
5790                         cf_shared_soname='`basename `'
5791                 fi
5792                 CC_SHARED_OPTS=
5793                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5794                 ;;
5795         irix*) #(vi
5796                 if test "$cf_cv_enable_rpath" = yes ; then
5797                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5798                 fi
5799                 # tested with IRIX 5.2 and 'cc'.
5800                 if test "$GCC" != yes; then
5801                         CC_SHARED_OPTS='-KPIC'
5802                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5803                 else
5804                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5805                 fi
5806                 cf_cv_rm_so_locs=yes
5807                 ;;
5808         linux*|gnu*|k*bsd*-gnu) #(vi
5809                 if test "$DFT_LWR_MODEL" = "shared" ; then
5810                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5811                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5812                 fi
5813                 if test "$cf_cv_enable_rpath" = yes ; then
5814                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5815                 fi
5816
5817         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5818         if test "$cf_cv_shlib_version" = rel; then
5819                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5820         else
5821                 cf_cv_shared_soname='`basename $@`'
5822         fi
5823
5824                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5825                 ;;
5826         mingw*) #(vi
5827                 cf_cv_shlib_version=mingw
5828                 cf_cv_shlib_version_infix=mingw
5829                 shlibdir=$bindir
5830                 MAKE_DLLS=
5831                 if test "$DFT_LWR_MODEL" = "shared" ; then
5832                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5833                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5834                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5835                 fi
5836                 CC_SHARED_OPTS=
5837                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5838                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5839                 cat >mk_shared_lib.sh <<-CF_EOF
5840                 #!/bin/sh
5841                 SHARED_LIB=\$1
5842                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5843                 shift
5844                 cat <<-EOF
5845                 Linking shared library
5846                 ** SHARED_LIB \$SHARED_LIB
5847                 ** IMPORT_LIB \$IMPORT_LIB
5848 EOF
5849                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5850 CF_EOF
5851                 chmod +x mk_shared_lib.sh
5852                 ;;
5853         openbsd[2-9].*|mirbsd*) #(vi
5854                 if test "$DFT_LWR_MODEL" = "shared" ; then
5855                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5856                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5857                 fi
5858                 if test "$cf_cv_enable_rpath" = yes ; then
5859                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5860                 fi
5861                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5862
5863         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5864         if test "$cf_cv_shlib_version" = rel; then
5865                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5866         else
5867                 cf_cv_shared_soname='`basename $@`'
5868         fi
5869
5870                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5871                 ;;
5872         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5873                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5874                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5875                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5876                 ;;
5877         dragonfly*|freebsd*) #(vi
5878                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5879                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5880                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5881                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5882                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5883                 fi
5884
5885         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5886         if test "$cf_cv_shlib_version" = rel; then
5887                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5888         else
5889                 cf_cv_shared_soname='`basename $@`'
5890         fi
5891
5892                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5893                 ;;
5894         netbsd*) #(vi
5895                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5896                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5897                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5898                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5899                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5900                         if test "$cf_cv_shlib_version" = auto; then
5901                         if test -f /usr/libexec/ld.elf_so; then
5902                                 cf_cv_shlib_version=abi
5903                         else
5904                                 cf_cv_shlib_version=rel
5905                         fi
5906                         fi
5907
5908         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5909         if test "$cf_cv_shlib_version" = rel; then
5910                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5911         else
5912                 cf_cv_shared_soname='`basename $@`'
5913         fi
5914
5915                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5916                 else
5917                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
5918                 fi
5919                 ;;
5920         osf*|mls+*) #(vi
5921                 # tested with OSF/1 V3.2 and 'cc'
5922                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5923                 # link with shared libs).
5924                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5925                 case $host_os in #(vi
5926                 osf4*)
5927                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5928                         ;;
5929                 esac
5930                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5931                 if test "$DFT_LWR_MODEL" = "shared" ; then
5932                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5933                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5934                 fi
5935                 cf_cv_rm_so_locs=yes
5936                 ;;
5937         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5938                 # tested with osr5.0.5
5939                 if test "$GCC" != yes; then
5940                         CC_SHARED_OPTS='-belf -KPIC'
5941                 fi
5942                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5943                 if test "$cf_cv_enable_rpath" = yes ; then
5944                         # only way is to set LD_RUN_PATH but no switch for it
5945                         RUN_PATH=$libdir
5946                 fi
5947                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5948                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5949                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5950                 ;;
5951         sunos4*) #(vi
5952                 # tested with SunOS 4.1.1 and gcc 2.7.0
5953                 if test "$GCC" != yes; then
5954                         CC_SHARED_OPTS='-KPIC'
5955                 fi
5956                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5957                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5958                 ;;
5959         solaris2*) #(vi
5960                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5961                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5962                 if test "$DFT_LWR_MODEL" = "shared" ; then
5963                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5964                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5965                 fi
5966                 if test "$cf_cv_enable_rpath" = yes ; then
5967                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5968                 fi
5969
5970         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5971         if test "$cf_cv_shlib_version" = rel; then
5972                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5973         else
5974                 cf_cv_shared_soname='`basename $@`'
5975         fi
5976
5977                 if test "$GCC" != yes; then
5978                         cf_save_CFLAGS="$CFLAGS"
5979                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5980                         do
5981                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5982                                 cat >conftest.$ac_ext <<_ACEOF
5983 #line 5983 "configure"
5984 #include "confdefs.h"
5985 #include <stdio.h>
5986 int
5987 main ()
5988 {
5989 printf("Hello\n");
5990   ;
5991   return 0;
5992 }
5993 _ACEOF
5994 rm -f conftest.$ac_objext
5995 if { (eval echo "$as_me:5995: \"$ac_compile\"") >&5
5996   (eval $ac_compile) 2>&5
5997   ac_status=$?
5998   echo "$as_me:5998: \$? = $ac_status" >&5
5999   (exit $ac_status); } &&
6000          { ac_try='test -s conftest.$ac_objext'
6001   { (eval echo "$as_me:6001: \"$ac_try\"") >&5
6002   (eval $ac_try) 2>&5
6003   ac_status=$?
6004   echo "$as_me:6004: \$? = $ac_status" >&5
6005   (exit $ac_status); }; }; then
6006   break
6007 else
6008   echo "$as_me: failed program was:" >&5
6009 cat conftest.$ac_ext >&5
6010 fi
6011 rm -f conftest.$ac_objext conftest.$ac_ext
6012                         done
6013                         CFLAGS="$cf_save_CFLAGS"
6014                         CC_SHARED_OPTS=$cf_shared_opts
6015                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6016                 else
6017                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6018                 fi
6019                 ;;
6020         sysv5uw7*|unix_sv*) #(vi
6021                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6022                 if test "$GCC" != yes; then
6023                         CC_SHARED_OPTS='-KPIC'
6024                 fi
6025                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6026                 ;;
6027         *)
6028                 CC_SHARED_OPTS='unknown'
6029                 MK_SHARED_LIB='echo unknown'
6030                 ;;
6031         esac
6032
6033         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6034         case "$cf_cv_shlib_version" in #(vi
6035         rel|abi)
6036                 case "$MK_SHARED_LIB" in #(vi
6037                 *'-o $@') #(vi
6038                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6039                         ;;
6040                 *)
6041                         { echo "$as_me:6041: WARNING: ignored --with-shlib-version" >&5
6042 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6043                         ;;
6044                 esac
6045                 ;;
6046         esac
6047
6048         if test -n "$cf_try_cflags"
6049         then
6050 cat > conftest.$ac_ext <<EOF
6051 #line 6051 "${as_me:-configure}"
6052 #include <stdio.h>
6053 int main(int argc, char *argv[])
6054 {
6055         printf("hello\n");
6056         return (argv[argc-1] == 0) ;
6057 }
6058 EOF
6059                 cf_save_CFLAGS="$CFLAGS"
6060                 for cf_opt in $cf_try_cflags
6061                 do
6062                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6063                         echo "$as_me:6063: checking if CFLAGS option -$cf_opt works" >&5
6064 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6065                         if { (eval echo "$as_me:6065: \"$ac_compile\"") >&5
6066   (eval $ac_compile) 2>&5
6067   ac_status=$?
6068   echo "$as_me:6068: \$? = $ac_status" >&5
6069   (exit $ac_status); }; then
6070                                 echo "$as_me:6070: result: yes" >&5
6071 echo "${ECHO_T}yes" >&6
6072                                 cf_save_CFLAGS="$CFLAGS"
6073                         else
6074                                 echo "$as_me:6074: result: no" >&5
6075 echo "${ECHO_T}no" >&6
6076                         fi
6077                 done
6078                 CFLAGS="$cf_save_CFLAGS"
6079         fi
6080
6081         # RPATH_LIST is a colon-separated list of directories
6082         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6083         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6084
6085         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6086
6087         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6088
6089 echo "${as_me:-configure}:6089: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6090
6091         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6092
6093 echo "${as_me:-configure}:6093: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6094
6095 if test "$CC_SHARED_OPTS" = "unknown"; then
6096         for model in $cf_list_models; do
6097                 if test "$model" = "shared"; then
6098                         { { echo "$as_me:6098: error: Shared libraries are not supported in this version" >&5
6099 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6100    { (exit 1); exit 1; }; }
6101                 fi
6102         done
6103 fi
6104
6105 ### If we're building with rpath, try to link non-standard libs that way too.
6106 if test "$DFT_LWR_MODEL" = "shared"; then
6107
6108 echo "$as_me:6108: checking if rpath-hack should be disabled" >&5
6109 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6110
6111 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6112 if test "${enable_rpath_hack+set}" = set; then
6113   enableval="$enable_rpath_hack"
6114   test "$enableval" != no && enableval=yes
6115   if test "$enableval" != "yes" ; then
6116     cf_disable_rpath_hack=yes
6117   else
6118     cf_disable_rpath_hack=no
6119   fi
6120 else
6121   enableval=yes
6122   cf_disable_rpath_hack=no
6123
6124 fi;
6125 echo "$as_me:6125: result: $cf_disable_rpath_hack" >&5
6126 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6127 if test "$cf_disable_rpath_hack" = no ; then
6128
6129 echo "$as_me:6129: checking for updated LDFLAGS" >&5
6130 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6131 if test -n "$LD_RPATH_OPT" ; then
6132         echo "$as_me:6132: result: maybe" >&5
6133 echo "${ECHO_T}maybe" >&6
6134
6135         for ac_prog in ldd
6136 do
6137   # Extract the first word of "$ac_prog", so it can be a program name with args.
6138 set dummy $ac_prog; ac_word=$2
6139 echo "$as_me:6139: checking for $ac_word" >&5
6140 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6141 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6142   echo $ECHO_N "(cached) $ECHO_C" >&6
6143 else
6144   if test -n "$cf_ldd_prog"; then
6145   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6146 else
6147   ac_save_IFS=$IFS; IFS=$ac_path_separator
6148 ac_dummy="$PATH"
6149 for ac_dir in $ac_dummy; do
6150   IFS=$ac_save_IFS
6151   test -z "$ac_dir" && ac_dir=.
6152   $as_executable_p "$ac_dir/$ac_word" || continue
6153 ac_cv_prog_cf_ldd_prog="$ac_prog"
6154 echo "$as_me:6154: found $ac_dir/$ac_word" >&5
6155 break
6156 done
6157
6158 fi
6159 fi
6160 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6161 if test -n "$cf_ldd_prog"; then
6162   echo "$as_me:6162: result: $cf_ldd_prog" >&5
6163 echo "${ECHO_T}$cf_ldd_prog" >&6
6164 else
6165   echo "$as_me:6165: result: no" >&5
6166 echo "${ECHO_T}no" >&6
6167 fi
6168
6169   test -n "$cf_ldd_prog" && break
6170 done
6171 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6172
6173         cf_rpath_list="/usr/lib /lib"
6174         if test "$cf_ldd_prog" != no
6175         then
6176                 cf_rpath_oops=
6177
6178 cat >conftest.$ac_ext <<_ACEOF
6179 #line 6179 "configure"
6180 #include "confdefs.h"
6181 #include <stdio.h>
6182 int
6183 main ()
6184 {
6185 printf("Hello");
6186   ;
6187   return 0;
6188 }
6189 _ACEOF
6190 rm -f conftest.$ac_objext conftest$ac_exeext
6191 if { (eval echo "$as_me:6191: \"$ac_link\"") >&5
6192   (eval $ac_link) 2>&5
6193   ac_status=$?
6194   echo "$as_me:6194: \$? = $ac_status" >&5
6195   (exit $ac_status); } &&
6196          { ac_try='test -s conftest$ac_exeext'
6197   { (eval echo "$as_me:6197: \"$ac_try\"") >&5
6198   (eval $ac_try) 2>&5
6199   ac_status=$?
6200   echo "$as_me:6200: \$? = $ac_status" >&5
6201   (exit $ac_status); }; }; then
6202   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6203                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6204 else
6205   echo "$as_me: failed program was:" >&5
6206 cat conftest.$ac_ext >&5
6207 fi
6208 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6209
6210                 # If we passed the link-test, but get a "not found" on a given library,
6211                 # this could be due to inept reconfiguration of gcc to make it only
6212                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6213                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6214                 # /usr/local libraries.
6215                 if test -n "$cf_rpath_oops"
6216                 then
6217                         for cf_rpath_src in $cf_rpath_oops
6218                         do
6219                                 for cf_rpath_dir in \
6220                                         /usr/local \
6221                                         /usr/pkg \
6222                                         /opt/sfw
6223                                 do
6224                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6225                                         then
6226                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6227
6228 echo "${as_me:-configure}:6228: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6229
6230                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6231                                                 break
6232                                         fi
6233                                 done
6234                         done
6235                 fi
6236         fi
6237
6238         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6239
6240 echo "${as_me:-configure}:6240: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6241
6242 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6243
6244 echo "${as_me:-configure}:6244: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6245
6246 cf_rpath_dst=
6247 for cf_rpath_src in $LDFLAGS
6248 do
6249         case $cf_rpath_src in #(vi
6250         -L*) #(vi
6251
6252                 # check if this refers to a directory which we will ignore
6253                 cf_rpath_skip=no
6254                 if test -n "$cf_rpath_list"
6255                 then
6256                         for cf_rpath_item in $cf_rpath_list
6257                         do
6258                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6259                                 then
6260                                         cf_rpath_skip=yes
6261                                         break
6262                                 fi
6263                         done
6264                 fi
6265
6266                 if test "$cf_rpath_skip" = no
6267                 then
6268                         # transform the option
6269                         if test "$LD_RPATH_OPT" = "-R " ; then
6270                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6271                         else
6272                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6273                         fi
6274
6275                         # if we have not already added this, add it now
6276                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6277                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6278                         then
6279                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6280
6281 echo "${as_me:-configure}:6281: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6282
6283                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6284                         fi
6285                 fi
6286                 ;;
6287         esac
6288         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6289 done
6290 LDFLAGS=$cf_rpath_dst
6291
6292 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6293
6294 echo "${as_me:-configure}:6294: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6295
6296 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6297
6298 echo "${as_me:-configure}:6298: testing ...checking LIBS $LIBS ..." 1>&5
6299
6300 cf_rpath_dst=
6301 for cf_rpath_src in $LIBS
6302 do
6303         case $cf_rpath_src in #(vi
6304         -L*) #(vi
6305
6306                 # check if this refers to a directory which we will ignore
6307                 cf_rpath_skip=no
6308                 if test -n "$cf_rpath_list"
6309                 then
6310                         for cf_rpath_item in $cf_rpath_list
6311                         do
6312                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6313                                 then
6314                                         cf_rpath_skip=yes
6315                                         break
6316                                 fi
6317                         done
6318                 fi
6319
6320                 if test "$cf_rpath_skip" = no
6321                 then
6322                         # transform the option
6323                         if test "$LD_RPATH_OPT" = "-R " ; then
6324                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6325                         else
6326                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6327                         fi
6328
6329                         # if we have not already added this, add it now
6330                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6331                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6332                         then
6333                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6334
6335 echo "${as_me:-configure}:6335: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6336
6337                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6338                         fi
6339                 fi
6340                 ;;
6341         esac
6342         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6343 done
6344 LIBS=$cf_rpath_dst
6345
6346 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6347
6348 echo "${as_me:-configure}:6348: testing ...checked LIBS $LIBS ..." 1>&5
6349
6350         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6351
6352 echo "${as_me:-configure}:6352: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6353
6354 else
6355         echo "$as_me:6355: result: no" >&5
6356 echo "${ECHO_T}no" >&6
6357 fi
6358
6359 fi
6360
6361 fi
6362
6363 ###############################################################################
6364
6365 ###     use option --disable-overwrite to leave out the link to -lcurses
6366 echo "$as_me:6366: checking if you wish to install ncurses overwriting curses" >&5
6367 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6368
6369 # Check whether --enable-overwrite or --disable-overwrite was given.
6370 if test "${enable_overwrite+set}" = set; then
6371   enableval="$enable_overwrite"
6372   with_overwrite=$enableval
6373 else
6374   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6375 fi;
6376 echo "$as_me:6376: result: $with_overwrite" >&5
6377 echo "${ECHO_T}$with_overwrite" >&6
6378
6379 echo "$as_me:6379: checking if external terminfo-database is used" >&5
6380 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6381
6382 # Check whether --enable-database or --disable-database was given.
6383 if test "${enable_database+set}" = set; then
6384   enableval="$enable_database"
6385   use_database=$enableval
6386 else
6387   use_database=yes
6388 fi;
6389 echo "$as_me:6389: result: $use_database" >&5
6390 echo "${ECHO_T}$use_database" >&6
6391
6392 case $host_os in #(vi
6393 os2*) #(vi
6394         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6395         ;;
6396 *) #(vi
6397         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6398         ;;
6399 esac
6400
6401 NCURSES_USE_DATABASE=0
6402 if test "$use_database" != no ; then
6403         NCURSES_USE_DATABASE=1
6404
6405         echo "$as_me:6405: checking which terminfo source-file will be installed" >&5
6406 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6407
6408 # Check whether --with-database or --without-database was given.
6409 if test "${with_database+set}" = set; then
6410   withval="$with_database"
6411   TERMINFO_SRC=$withval
6412 fi;
6413         echo "$as_me:6413: result: $TERMINFO_SRC" >&5
6414 echo "${ECHO_T}$TERMINFO_SRC" >&6
6415
6416         echo "$as_me:6416: checking whether to use hashed database instead of directory/tree" >&5
6417 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6418
6419 # Check whether --with-hashed-db or --without-hashed-db was given.
6420 if test "${with_hashed_db+set}" = set; then
6421   withval="$with_hashed_db"
6422
6423 else
6424   with_hashed_db=no
6425 fi;
6426         echo "$as_me:6426: result: $with_hashed_db" >&5
6427 echo "${ECHO_T}$with_hashed_db" >&6
6428 else
6429         with_hashed_db=no
6430 fi
6431
6432 echo "$as_me:6432: checking for list of fallback descriptions" >&5
6433 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6434
6435 # Check whether --with-fallbacks or --without-fallbacks was given.
6436 if test "${with_fallbacks+set}" = set; then
6437   withval="$with_fallbacks"
6438   with_fallback=$withval
6439 else
6440   with_fallback=
6441 fi;
6442 echo "$as_me:6442: result: $with_fallback" >&5
6443 echo "${ECHO_T}$with_fallback" >&6
6444 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6445
6446 echo "$as_me:6446: checking if you want modern xterm or antique" >&5
6447 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6448
6449 # Check whether --with-xterm-new or --without-xterm-new was given.
6450 if test "${with_xterm_new+set}" = set; then
6451   withval="$with_xterm_new"
6452   with_xterm_new=$withval
6453 else
6454   with_xterm_new=yes
6455 fi;
6456 case $with_xterm_new in
6457 no)     with_xterm_new=xterm-old;;
6458 *)      with_xterm_new=xterm-new;;
6459 esac
6460 echo "$as_me:6460: result: $with_xterm_new" >&5
6461 echo "${ECHO_T}$with_xterm_new" >&6
6462 WHICH_XTERM=$with_xterm_new
6463
6464 echo "$as_me:6464: checking if xterm backspace sends BS or DEL" >&5
6465 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6466
6467 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6468 if test "${with_xterm_kbs+set}" = set; then
6469   withval="$with_xterm_kbs"
6470   with_xterm_kbs=$withval
6471 else
6472   with_xterm_kbs=BS
6473 fi;
6474 case x$with_xterm_kbs in
6475 xyes|xno|xBS|xbs|x8)
6476         with_xterm_kbs=BS
6477         ;;
6478 xDEL|xdel|x127)
6479         with_xterm_kbs=DEL
6480         ;;
6481 *)
6482         with_xterm_kbs=$withval
6483         ;;
6484 esac
6485 echo "$as_me:6485: result: $with_xterm_kbs" >&5
6486 echo "${ECHO_T}$with_xterm_kbs" >&6
6487 XTERM_KBS=$with_xterm_kbs
6488
6489 MAKE_TERMINFO=
6490 if test "$use_database" = no ; then
6491         TERMINFO="${datadir}/terminfo"
6492         MAKE_TERMINFO="#"
6493 else
6494
6495 echo "$as_me:6495: checking for list of terminfo directories" >&5
6496 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6497
6498 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6499 if test "${with_terminfo_dirs+set}" = set; then
6500   withval="$with_terminfo_dirs"
6501
6502 else
6503   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6504 fi;
6505 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6506 cf_dst_path=
6507 for cf_src_path in $withval
6508 do
6509
6510 if test "x$prefix" != xNONE; then
6511   cf_path_syntax="$prefix"
6512 else
6513   cf_path_syntax="$ac_default_prefix"
6514 fi
6515
6516 case ".$cf_src_path" in #(vi
6517 .\$\(*\)*|.\'*\'*) #(vi
6518   ;;
6519 ..|./*|.\\*) #(vi
6520   ;;
6521 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6522   ;;
6523 .\${*prefix}*|.\${*dir}*) #(vi
6524   eval cf_src_path="$cf_src_path"
6525   case ".$cf_src_path" in #(vi
6526   .NONE/*)
6527     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6528     ;;
6529   esac
6530   ;; #(vi
6531 .no|.NONE/*)
6532   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6533   ;;
6534 *)
6535   { { echo "$as_me:6535: error: expected a pathname, not \"$cf_src_path\"" >&5
6536 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6537    { (exit 1); exit 1; }; }
6538   ;;
6539 esac
6540
6541   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6542   cf_dst_path="${cf_dst_path}${cf_src_path}"
6543 done
6544 IFS="$ac_save_ifs"
6545
6546 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6547 # so we have to check/work around.  We do prefer the result of "eval"...
6548 eval cf_dst_eval="$cf_dst_path"
6549 case "x$cf_dst_eval" in #(vi
6550 xNONE*) #(vi
6551         TERMINFO_DIRS=$cf_dst_path
6552         ;;
6553 *)
6554         TERMINFO_DIRS="$cf_dst_eval"
6555         ;;
6556 esac
6557
6558 echo "$as_me:6558: result: $TERMINFO_DIRS" >&5
6559 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6560 test -n "$TERMINFO_DIRS" &&
6561 cat >>confdefs.h <<EOF
6562 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6563 EOF
6564
6565 echo "$as_me:6565: checking for default terminfo directory" >&5
6566 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6567
6568 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6569 if test "${with_default_terminfo_dir+set}" = set; then
6570   withval="$with_default_terminfo_dir"
6571
6572 else
6573   withval="${TERMINFO:-${datadir}/terminfo}"
6574 fi; if test -n "${datadir}/terminfo" ; then
6575
6576 if test "x$prefix" != xNONE; then
6577   cf_path_syntax="$prefix"
6578 else
6579   cf_path_syntax="$ac_default_prefix"
6580 fi
6581
6582 case ".$withval" in #(vi
6583 .\$\(*\)*|.\'*\'*) #(vi
6584   ;;
6585 ..|./*|.\\*) #(vi
6586   ;;
6587 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6588   ;;
6589 .\${*prefix}*|.\${*dir}*) #(vi
6590   eval withval="$withval"
6591   case ".$withval" in #(vi
6592   .NONE/*)
6593     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6594     ;;
6595   esac
6596   ;; #(vi
6597 .no|.NONE/*)
6598   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6599   ;;
6600 *)
6601   { { echo "$as_me:6601: error: expected a pathname, not \"$withval\"" >&5
6602 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6603    { (exit 1); exit 1; }; }
6604   ;;
6605 esac
6606
6607 fi
6608 eval TERMINFO="$withval"
6609
6610 echo "$as_me:6610: result: $TERMINFO" >&5
6611 echo "${ECHO_T}$TERMINFO" >&6
6612
6613 cat >>confdefs.h <<EOF
6614 #define TERMINFO "$TERMINFO"
6615 EOF
6616
6617 fi
6618
6619 ###     use option --disable-big-core to make tic run on small machines
6620 ###     We need 4Mb, check if we can allocate 50% more than that.
6621 echo "$as_me:6621: checking if big-core option selected" >&5
6622 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6623
6624 # Check whether --enable-big-core or --disable-big-core was given.
6625 if test "${enable_big_core+set}" = set; then
6626   enableval="$enable_big_core"
6627   with_big_core=$enableval
6628 else
6629   if test "$cross_compiling" = yes; then
6630   with_big_core=no
6631 else
6632   cat >conftest.$ac_ext <<_ACEOF
6633 #line 6633 "configure"
6634 #include "confdefs.h"
6635
6636 #include <stdlib.h>
6637 #include <string.h>
6638 int main() {
6639         unsigned long n = 6000000L;
6640         char *s = malloc(n);
6641         if (s != 0)
6642                 s[0] = s[n-1] = 0;
6643         ${cf_cv_main_return:-return}(s == 0);
6644 }
6645 _ACEOF
6646 rm -f conftest$ac_exeext
6647 if { (eval echo "$as_me:6647: \"$ac_link\"") >&5
6648   (eval $ac_link) 2>&5
6649   ac_status=$?
6650   echo "$as_me:6650: \$? = $ac_status" >&5
6651   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6652   { (eval echo "$as_me:6652: \"$ac_try\"") >&5
6653   (eval $ac_try) 2>&5
6654   ac_status=$?
6655   echo "$as_me:6655: \$? = $ac_status" >&5
6656   (exit $ac_status); }; }; then
6657   with_big_core=yes
6658 else
6659   echo "$as_me: program exited with status $ac_status" >&5
6660 echo "$as_me: failed program was:" >&5
6661 cat conftest.$ac_ext >&5
6662 with_big_core=no
6663 fi
6664 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6665 fi
6666 fi;
6667 echo "$as_me:6667: result: $with_big_core" >&5
6668 echo "${ECHO_T}$with_big_core" >&6
6669 test "x$with_big_core" = "xyes" &&
6670 cat >>confdefs.h <<\EOF
6671 #define HAVE_BIG_CORE 1
6672 EOF
6673
6674 ### ISO C only guarantees 512-char strings, we have tables which load faster
6675 ### when constructed using "big" strings.  More than the C compiler, the awk
6676 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6677 echo "$as_me:6677: checking if big-strings option selected" >&5
6678 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6679
6680 # Check whether --enable-big-strings or --disable-big-strings was given.
6681 if test "${enable_big_strings+set}" = set; then
6682   enableval="$enable_big_strings"
6683   with_big_strings=$enableval
6684 else
6685
6686         case x$AWK in #(vi
6687         x)
6688                 eval with_big_strings=no
6689                 ;;
6690         *) #(vi
6691                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6692                         | $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
6693                         eval with_big_strings=yes
6694                 else
6695                         eval with_big_strings=no
6696                 fi
6697                 ;;
6698         esac
6699
6700 fi;
6701 echo "$as_me:6701: result: $with_big_strings" >&5
6702 echo "${ECHO_T}$with_big_strings" >&6
6703
6704 USE_BIG_STRINGS=0
6705 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
6706
6707 ###     use option --enable-termcap to compile in the termcap fallback support
6708 echo "$as_me:6708: checking if you want termcap-fallback support" >&5
6709 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6710
6711 # Check whether --enable-termcap or --disable-termcap was given.
6712 if test "${enable_termcap+set}" = set; then
6713   enableval="$enable_termcap"
6714   with_termcap=$enableval
6715 else
6716   with_termcap=no
6717 fi;
6718 echo "$as_me:6718: result: $with_termcap" >&5
6719 echo "${ECHO_T}$with_termcap" >&6
6720
6721 NCURSES_USE_TERMCAP=0
6722 if test "x$with_termcap" != "xyes" ; then
6723         if test "$use_database" = no ; then
6724                 if test -z "$with_fallback" ; then
6725                         { { echo "$as_me:6725: error: You have disabled the database w/o specifying fallbacks" >&5
6726 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6727    { (exit 1); exit 1; }; }
6728                 fi
6729         fi
6730
6731 cat >>confdefs.h <<\EOF
6732 #define PURE_TERMINFO 1
6733 EOF
6734
6735 else
6736
6737         if test "$with_ticlib" != no ; then
6738                 { { echo "$as_me:6738: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6739 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6740    { (exit 1); exit 1; }; }
6741         fi
6742
6743         NCURSES_USE_TERMCAP=1
6744         echo "$as_me:6744: checking for list of termcap files" >&5
6745 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6746
6747 # Check whether --with-termpath or --without-termpath was given.
6748 if test "${with_termpath+set}" = set; then
6749   withval="$with_termpath"
6750
6751 else
6752   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6753 fi;
6754 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6755 cf_dst_path=
6756 for cf_src_path in $withval
6757 do
6758
6759 if test "x$prefix" != xNONE; then
6760   cf_path_syntax="$prefix"
6761 else
6762   cf_path_syntax="$ac_default_prefix"
6763 fi
6764
6765 case ".$cf_src_path" in #(vi
6766 .\$\(*\)*|.\'*\'*) #(vi
6767   ;;
6768 ..|./*|.\\*) #(vi
6769   ;;
6770 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6771   ;;
6772 .\${*prefix}*|.\${*dir}*) #(vi
6773   eval cf_src_path="$cf_src_path"
6774   case ".$cf_src_path" in #(vi
6775   .NONE/*)
6776     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6777     ;;
6778   esac
6779   ;; #(vi
6780 .no|.NONE/*)
6781   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6782   ;;
6783 *)
6784   { { echo "$as_me:6784: error: expected a pathname, not \"$cf_src_path\"" >&5
6785 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6786    { (exit 1); exit 1; }; }
6787   ;;
6788 esac
6789
6790   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6791   cf_dst_path="${cf_dst_path}${cf_src_path}"
6792 done
6793 IFS="$ac_save_ifs"
6794
6795 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6796 # so we have to check/work around.  We do prefer the result of "eval"...
6797 eval cf_dst_eval="$cf_dst_path"
6798 case "x$cf_dst_eval" in #(vi
6799 xNONE*) #(vi
6800         TERMPATH=$cf_dst_path
6801         ;;
6802 *)
6803         TERMPATH="$cf_dst_eval"
6804         ;;
6805 esac
6806
6807         echo "$as_me:6807: result: $TERMPATH" >&5
6808 echo "${ECHO_T}$TERMPATH" >&6
6809         test -n "$TERMPATH" &&
6810 cat >>confdefs.h <<EOF
6811 #define TERMPATH "$TERMPATH"
6812 EOF
6813
6814         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6815         echo "$as_me:6815: checking if fast termcap-loader is needed" >&5
6816 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6817
6818 # Check whether --enable-getcap or --disable-getcap was given.
6819 if test "${enable_getcap+set}" = set; then
6820   enableval="$enable_getcap"
6821   with_getcap=$enableval
6822 else
6823   with_getcap=no
6824 fi;
6825         echo "$as_me:6825: result: $with_getcap" >&5
6826 echo "${ECHO_T}$with_getcap" >&6
6827         test "x$with_getcap" = "xyes" &&
6828 cat >>confdefs.h <<\EOF
6829 #define USE_GETCAP 1
6830 EOF
6831
6832         echo "$as_me:6832: checking if translated termcaps will be cached in ~/.terminfo" >&5
6833 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6834
6835 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6836 if test "${enable_getcap_cache+set}" = set; then
6837   enableval="$enable_getcap_cache"
6838   with_getcap_cache=$enableval
6839 else
6840   with_getcap_cache=no
6841 fi;
6842         echo "$as_me:6842: result: $with_getcap_cache" >&5
6843 echo "${ECHO_T}$with_getcap_cache" >&6
6844         test "x$with_getcap_cache" = "xyes" &&
6845 cat >>confdefs.h <<\EOF
6846 #define USE_GETCAP_CACHE 1
6847 EOF
6848
6849 fi
6850
6851 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6852 echo "$as_me:6852: checking if ~/.terminfo is wanted" >&5
6853 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6854
6855 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6856 if test "${enable_home_terminfo+set}" = set; then
6857   enableval="$enable_home_terminfo"
6858   with_home_terminfo=$enableval
6859 else
6860   with_home_terminfo=yes
6861 fi;
6862 echo "$as_me:6862: result: $with_home_terminfo" >&5
6863 echo "${ECHO_T}$with_home_terminfo" >&6
6864 test "x$with_home_terminfo" = "xyes" &&
6865 cat >>confdefs.h <<\EOF
6866 #define USE_HOME_TERMINFO 1
6867 EOF
6868
6869 echo "$as_me:6869: checking if you want to use restricted environment when running as root" >&5
6870 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6871
6872 # Check whether --enable-root-environ or --disable-root-environ was given.
6873 if test "${enable_root_environ+set}" = set; then
6874   enableval="$enable_root_environ"
6875   with_root_environ=$enableval
6876 else
6877   with_root_environ=yes
6878 fi;
6879 echo "$as_me:6879: result: $with_root_environ" >&5
6880 echo "${ECHO_T}$with_root_environ" >&6
6881 test "x$with_root_environ" = xyes &&
6882 cat >>confdefs.h <<\EOF
6883 #define USE_ROOT_ENVIRON 1
6884 EOF
6885
6886 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6887 ###   to reduce storage requirements for the terminfo database.
6888
6889 for ac_func in \
6890         remove \
6891         unlink
6892 do
6893 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6894 echo "$as_me:6894: checking for $ac_func" >&5
6895 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6896 if eval "test \"\${$as_ac_var+set}\" = set"; then
6897   echo $ECHO_N "(cached) $ECHO_C" >&6
6898 else
6899   cat >conftest.$ac_ext <<_ACEOF
6900 #line 6900 "configure"
6901 #include "confdefs.h"
6902 /* System header to define __stub macros and hopefully few prototypes,
6903     which can conflict with char $ac_func (); below.  */
6904 #include <assert.h>
6905 /* Override any gcc2 internal prototype to avoid an error.  */
6906 #ifdef __cplusplus
6907 extern "C"
6908 #endif
6909 /* We use char because int might match the return type of a gcc2
6910    builtin and then its argument prototype would still apply.  */
6911 char $ac_func ();
6912 char (*f) ();
6913
6914 int
6915 main ()
6916 {
6917 /* The GNU C library defines this for functions which it implements
6918     to always fail with ENOSYS.  Some functions are actually named
6919     something starting with __ and the normal name is an alias.  */
6920 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6921 choke me
6922 #else
6923 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6924 #endif
6925
6926   ;
6927   return 0;
6928 }
6929 _ACEOF
6930 rm -f conftest.$ac_objext conftest$ac_exeext
6931 if { (eval echo "$as_me:6931: \"$ac_link\"") >&5
6932   (eval $ac_link) 2>&5
6933   ac_status=$?
6934   echo "$as_me:6934: \$? = $ac_status" >&5
6935   (exit $ac_status); } &&
6936          { ac_try='test -s conftest$ac_exeext'
6937   { (eval echo "$as_me:6937: \"$ac_try\"") >&5
6938   (eval $ac_try) 2>&5
6939   ac_status=$?
6940   echo "$as_me:6940: \$? = $ac_status" >&5
6941   (exit $ac_status); }; }; then
6942   eval "$as_ac_var=yes"
6943 else
6944   echo "$as_me: failed program was:" >&5
6945 cat conftest.$ac_ext >&5
6946 eval "$as_ac_var=no"
6947 fi
6948 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6949 fi
6950 echo "$as_me:6950: result: `eval echo '${'$as_ac_var'}'`" >&5
6951 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6952 if test `eval echo '${'$as_ac_var'}'` = yes; then
6953   cat >>confdefs.h <<EOF
6954 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6955 EOF
6956
6957 fi
6958 done
6959
6960 if test "$cross_compiling" = yes ; then
6961
6962 for ac_func in \
6963                 link \
6964                 symlink
6965 do
6966 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6967 echo "$as_me:6967: checking for $ac_func" >&5
6968 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6969 if eval "test \"\${$as_ac_var+set}\" = set"; then
6970   echo $ECHO_N "(cached) $ECHO_C" >&6
6971 else
6972   cat >conftest.$ac_ext <<_ACEOF
6973 #line 6973 "configure"
6974 #include "confdefs.h"
6975 /* System header to define __stub macros and hopefully few prototypes,
6976     which can conflict with char $ac_func (); below.  */
6977 #include <assert.h>
6978 /* Override any gcc2 internal prototype to avoid an error.  */
6979 #ifdef __cplusplus
6980 extern "C"
6981 #endif
6982 /* We use char because int might match the return type of a gcc2
6983    builtin and then its argument prototype would still apply.  */
6984 char $ac_func ();
6985 char (*f) ();
6986
6987 int
6988 main ()
6989 {
6990 /* The GNU C library defines this for functions which it implements
6991     to always fail with ENOSYS.  Some functions are actually named
6992     something starting with __ and the normal name is an alias.  */
6993 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6994 choke me
6995 #else
6996 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6997 #endif
6998
6999   ;
7000   return 0;
7001 }
7002 _ACEOF
7003 rm -f conftest.$ac_objext conftest$ac_exeext
7004 if { (eval echo "$as_me:7004: \"$ac_link\"") >&5
7005   (eval $ac_link) 2>&5
7006   ac_status=$?
7007   echo "$as_me:7007: \$? = $ac_status" >&5
7008   (exit $ac_status); } &&
7009          { ac_try='test -s conftest$ac_exeext'
7010   { (eval echo "$as_me:7010: \"$ac_try\"") >&5
7011   (eval $ac_try) 2>&5
7012   ac_status=$?
7013   echo "$as_me:7013: \$? = $ac_status" >&5
7014   (exit $ac_status); }; }; then
7015   eval "$as_ac_var=yes"
7016 else
7017   echo "$as_me: failed program was:" >&5
7018 cat conftest.$ac_ext >&5
7019 eval "$as_ac_var=no"
7020 fi
7021 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7022 fi
7023 echo "$as_me:7023: result: `eval echo '${'$as_ac_var'}'`" >&5
7024 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7025 if test `eval echo '${'$as_ac_var'}'` = yes; then
7026   cat >>confdefs.h <<EOF
7027 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7028 EOF
7029
7030 fi
7031 done
7032
7033 else
7034         echo "$as_me:7034: checking if link/symlink functions work" >&5
7035 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7036 if test "${cf_cv_link_funcs+set}" = set; then
7037   echo $ECHO_N "(cached) $ECHO_C" >&6
7038 else
7039
7040                 cf_cv_link_funcs=
7041                 for cf_func in link symlink ; do
7042                         if test "$cross_compiling" = yes; then
7043
7044                         eval 'ac_cv_func_'$cf_func'=error'
7045 else
7046   cat >conftest.$ac_ext <<_ACEOF
7047 #line 7047 "configure"
7048 #include "confdefs.h"
7049
7050 #include <sys/types.h>
7051 #include <sys/stat.h>
7052 #ifdef HAVE_UNISTD_H
7053 #include <unistd.h>
7054 #endif
7055 int main()
7056 {
7057         int fail = 0;
7058         char *src = "config.log";
7059         char *dst = "conftest.chk";
7060         struct stat src_sb;
7061         struct stat dst_sb;
7062
7063         stat(src, &src_sb);
7064         fail = ($cf_func("config.log", "conftest.chk") < 0)
7065             || (stat(dst, &dst_sb) < 0)
7066             || (dst_sb.st_mtime != src_sb.st_mtime);
7067 #ifdef HAVE_UNLINK
7068         unlink(dst);
7069 #else
7070         remove(dst);
7071 #endif
7072         ${cf_cv_main_return:-return} (fail);
7073 }
7074
7075 _ACEOF
7076 rm -f conftest$ac_exeext
7077 if { (eval echo "$as_me:7077: \"$ac_link\"") >&5
7078   (eval $ac_link) 2>&5
7079   ac_status=$?
7080   echo "$as_me:7080: \$? = $ac_status" >&5
7081   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7082   { (eval echo "$as_me:7082: \"$ac_try\"") >&5
7083   (eval $ac_try) 2>&5
7084   ac_status=$?
7085   echo "$as_me:7085: \$? = $ac_status" >&5
7086   (exit $ac_status); }; }; then
7087
7088                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7089                         eval 'ac_cv_func_'$cf_func'=yes'
7090 else
7091   echo "$as_me: program exited with status $ac_status" >&5
7092 echo "$as_me: failed program was:" >&5
7093 cat conftest.$ac_ext >&5
7094
7095                         eval 'ac_cv_func_'$cf_func'=no'
7096 fi
7097 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7098 fi
7099                 done
7100                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7101
7102 fi
7103 echo "$as_me:7103: result: $cf_cv_link_funcs" >&5
7104 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7105         test "$ac_cv_func_link"    = yes &&
7106 cat >>confdefs.h <<\EOF
7107 #define HAVE_LINK 1
7108 EOF
7109
7110         test "$ac_cv_func_symlink" = yes &&
7111 cat >>confdefs.h <<\EOF
7112 #define HAVE_SYMLINK 1
7113 EOF
7114
7115 fi
7116
7117 with_links=no
7118 with_symlinks=no
7119
7120 # soft links (symbolic links) are useful for some systems where hard links do
7121 # not work, or to make it simpler to copy terminfo trees around.
7122 if test "x$ac_cv_func_symlink" = xyes ; then
7123     echo "$as_me:7123: checking if tic should use symbolic links" >&5
7124 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7125
7126 # Check whether --enable-symlinks or --disable-symlinks was given.
7127 if test "${enable_symlinks+set}" = set; then
7128   enableval="$enable_symlinks"
7129   with_symlinks=$enableval
7130 else
7131   with_symlinks=no
7132 fi;
7133     echo "$as_me:7133: result: $with_symlinks" >&5
7134 echo "${ECHO_T}$with_symlinks" >&6
7135 fi
7136
7137 # If we have hard links and did not choose to use soft links instead, there is
7138 # no reason to make this choice optional - use the hard links.
7139 if test "$with_symlinks" = no ; then
7140     echo "$as_me:7140: checking if tic should use hard links" >&5
7141 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7142     if test "x$ac_cv_func_link" = xyes ; then
7143         with_links=yes
7144     else
7145         with_links=no
7146     fi
7147     echo "$as_me:7147: result: $with_links" >&5
7148 echo "${ECHO_T}$with_links" >&6
7149 fi
7150
7151 test "x$with_links" = xyes &&
7152 cat >>confdefs.h <<\EOF
7153 #define USE_LINKS 1
7154 EOF
7155
7156 test "x$with_symlinks" = xyes &&
7157 cat >>confdefs.h <<\EOF
7158 #define USE_SYMLINKS 1
7159 EOF
7160
7161 ###   use option --enable-broken-linker to force on use of broken-linker support
7162 echo "$as_me:7162: checking if you want broken-linker support code" >&5
7163 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7164
7165 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7166 if test "${enable_broken_linker+set}" = set; then
7167   enableval="$enable_broken_linker"
7168   with_broken_linker=$enableval
7169 else
7170   with_broken_linker=${BROKEN_LINKER:-no}
7171 fi;
7172 echo "$as_me:7172: result: $with_broken_linker" >&5
7173 echo "${ECHO_T}$with_broken_linker" >&6
7174
7175 BROKEN_LINKER=0
7176 if test "x$with_broken_linker" = xyes ; then
7177
7178 cat >>confdefs.h <<\EOF
7179 #define BROKEN_LINKER 1
7180 EOF
7181
7182         BROKEN_LINKER=1
7183 elif test "$DFT_LWR_MODEL" = shared ; then
7184         case $cf_cv_system_name in #(vi
7185         cygwin*)
7186
7187 cat >>confdefs.h <<\EOF
7188 #define BROKEN_LINKER 1
7189 EOF
7190
7191                 BROKEN_LINKER=1
7192                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7193
7194 echo "${as_me:-configure}:7194: testing cygwin linker is broken anyway ..." 1>&5
7195
7196                 ;;
7197         esac
7198 fi
7199
7200 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7201 echo "$as_me:7201: checking if tputs should process BSD-style prefix padding" >&5
7202 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7203
7204 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7205 if test "${enable_bsdpad+set}" = set; then
7206   enableval="$enable_bsdpad"
7207   with_bsdpad=$enableval
7208 else
7209   with_bsdpad=no
7210 fi;
7211 echo "$as_me:7211: result: $with_bsdpad" >&5
7212 echo "${ECHO_T}$with_bsdpad" >&6
7213 test "x$with_bsdpad" = xyes &&
7214 cat >>confdefs.h <<\EOF
7215 #define BSD_TPUTS 1
7216 EOF
7217
7218 ###   use option --enable-widec to turn on use of wide-character support
7219 NCURSES_CH_T=chtype
7220 NCURSES_LIBUTF8=0
7221
7222 NEED_WCHAR_H=0
7223 NCURSES_MBSTATE_T=0
7224 NCURSES_WCHAR_T=0
7225 NCURSES_WINT_T=0
7226
7227 # Check to define _XOPEN_SOURCE "automatically"
7228
7229 cf_XOPEN_SOURCE=500
7230 cf_POSIX_C_SOURCE=199506L
7231 cf_xopen_source=
7232
7233 case $host_os in #(vi
7234 aix[4-7]*) #(vi
7235         cf_xopen_source="-D_ALL_SOURCE"
7236         ;;
7237 cygwin|msys) #(vi
7238         cf_XOPEN_SOURCE=600
7239         ;;
7240 darwin[0-8].*) #(vi
7241         cf_xopen_source="-D_APPLE_C_SOURCE"
7242         ;;
7243 darwin*) #(vi
7244         cf_xopen_source="-D_DARWIN_C_SOURCE"
7245         cf_XOPEN_SOURCE=
7246         ;;
7247 freebsd*|dragonfly*) #(vi
7248         # 5.x headers associate
7249         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7250         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7251         cf_POSIX_C_SOURCE=200112L
7252         cf_XOPEN_SOURCE=600
7253         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7254         ;;
7255 hpux11*) #(vi
7256         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7257         ;;
7258 hpux*) #(vi
7259         cf_xopen_source="-D_HPUX_SOURCE"
7260         ;;
7261 irix[56].*) #(vi
7262         cf_xopen_source="-D_SGI_SOURCE"
7263         cf_XOPEN_SOURCE=
7264         ;;
7265 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7266
7267 echo "$as_me:7267: checking if we must define _GNU_SOURCE" >&5
7268 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7269 if test "${cf_cv_gnu_source+set}" = set; then
7270   echo $ECHO_N "(cached) $ECHO_C" >&6
7271 else
7272
7273 cat >conftest.$ac_ext <<_ACEOF
7274 #line 7274 "configure"
7275 #include "confdefs.h"
7276 #include <sys/types.h>
7277 int
7278 main ()
7279 {
7280
7281 #ifndef _XOPEN_SOURCE
7282 make an error
7283 #endif
7284   ;
7285   return 0;
7286 }
7287 _ACEOF
7288 rm -f conftest.$ac_objext
7289 if { (eval echo "$as_me:7289: \"$ac_compile\"") >&5
7290   (eval $ac_compile) 2>&5
7291   ac_status=$?
7292   echo "$as_me:7292: \$? = $ac_status" >&5
7293   (exit $ac_status); } &&
7294          { ac_try='test -s conftest.$ac_objext'
7295   { (eval echo "$as_me:7295: \"$ac_try\"") >&5
7296   (eval $ac_try) 2>&5
7297   ac_status=$?
7298   echo "$as_me:7298: \$? = $ac_status" >&5
7299   (exit $ac_status); }; }; then
7300   cf_cv_gnu_source=no
7301 else
7302   echo "$as_me: failed program was:" >&5
7303 cat conftest.$ac_ext >&5
7304 cf_save="$CPPFLAGS"
7305          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7306          cat >conftest.$ac_ext <<_ACEOF
7307 #line 7307 "configure"
7308 #include "confdefs.h"
7309 #include <sys/types.h>
7310 int
7311 main ()
7312 {
7313
7314 #ifdef _XOPEN_SOURCE
7315 make an error
7316 #endif
7317   ;
7318   return 0;
7319 }
7320 _ACEOF
7321 rm -f conftest.$ac_objext
7322 if { (eval echo "$as_me:7322: \"$ac_compile\"") >&5
7323   (eval $ac_compile) 2>&5
7324   ac_status=$?
7325   echo "$as_me:7325: \$? = $ac_status" >&5
7326   (exit $ac_status); } &&
7327          { ac_try='test -s conftest.$ac_objext'
7328   { (eval echo "$as_me:7328: \"$ac_try\"") >&5
7329   (eval $ac_try) 2>&5
7330   ac_status=$?
7331   echo "$as_me:7331: \$? = $ac_status" >&5
7332   (exit $ac_status); }; }; then
7333   cf_cv_gnu_source=no
7334 else
7335   echo "$as_me: failed program was:" >&5
7336 cat conftest.$ac_ext >&5
7337 cf_cv_gnu_source=yes
7338 fi
7339 rm -f conftest.$ac_objext conftest.$ac_ext
7340         CPPFLAGS="$cf_save"
7341
7342 fi
7343 rm -f conftest.$ac_objext conftest.$ac_ext
7344
7345 fi
7346 echo "$as_me:7346: result: $cf_cv_gnu_source" >&5
7347 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7348 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7349
7350         ;;
7351 mirbsd*) #(vi
7352         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7353         cf_XOPEN_SOURCE=
7354
7355 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7356
7357 cf_save_CFLAGS="$CFLAGS"
7358 cf_save_CPPFLAGS="$CPPFLAGS"
7359
7360 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7361         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7362                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7363
7364 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7365         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7366                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7367
7368 echo "$as_me:7368: checking if we should define _POSIX_C_SOURCE" >&5
7369 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7370 if test "${cf_cv_posix_c_source+set}" = set; then
7371   echo $ECHO_N "(cached) $ECHO_C" >&6
7372 else
7373
7374 echo "${as_me:-configure}:7374: testing if the symbol is already defined go no further ..." 1>&5
7375
7376         cat >conftest.$ac_ext <<_ACEOF
7377 #line 7377 "configure"
7378 #include "confdefs.h"
7379 #include <sys/types.h>
7380 int
7381 main ()
7382 {
7383
7384 #ifndef _POSIX_C_SOURCE
7385 make an error
7386 #endif
7387   ;
7388   return 0;
7389 }
7390 _ACEOF
7391 rm -f conftest.$ac_objext
7392 if { (eval echo "$as_me:7392: \"$ac_compile\"") >&5
7393   (eval $ac_compile) 2>&5
7394   ac_status=$?
7395   echo "$as_me:7395: \$? = $ac_status" >&5
7396   (exit $ac_status); } &&
7397          { ac_try='test -s conftest.$ac_objext'
7398   { (eval echo "$as_me:7398: \"$ac_try\"") >&5
7399   (eval $ac_try) 2>&5
7400   ac_status=$?
7401   echo "$as_me:7401: \$? = $ac_status" >&5
7402   (exit $ac_status); }; }; then
7403   cf_cv_posix_c_source=no
7404 else
7405   echo "$as_me: failed program was:" >&5
7406 cat conftest.$ac_ext >&5
7407 cf_want_posix_source=no
7408          case .$cf_POSIX_C_SOURCE in #(vi
7409          .[12]??*) #(vi
7410                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7411                 ;;
7412          .2) #(vi
7413                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7414                 cf_want_posix_source=yes
7415                 ;;
7416          .*)
7417                 cf_want_posix_source=yes
7418                 ;;
7419          esac
7420          if test "$cf_want_posix_source" = yes ; then
7421                 cat >conftest.$ac_ext <<_ACEOF
7422 #line 7422 "configure"
7423 #include "confdefs.h"
7424 #include <sys/types.h>
7425 int
7426 main ()
7427 {
7428
7429 #ifdef _POSIX_SOURCE
7430 make an error
7431 #endif
7432   ;
7433   return 0;
7434 }
7435 _ACEOF
7436 rm -f conftest.$ac_objext
7437 if { (eval echo "$as_me:7437: \"$ac_compile\"") >&5
7438   (eval $ac_compile) 2>&5
7439   ac_status=$?
7440   echo "$as_me:7440: \$? = $ac_status" >&5
7441   (exit $ac_status); } &&
7442          { ac_try='test -s conftest.$ac_objext'
7443   { (eval echo "$as_me:7443: \"$ac_try\"") >&5
7444   (eval $ac_try) 2>&5
7445   ac_status=$?
7446   echo "$as_me:7446: \$? = $ac_status" >&5
7447   (exit $ac_status); }; }; then
7448   :
7449 else
7450   echo "$as_me: failed program was:" >&5
7451 cat conftest.$ac_ext >&5
7452 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7453 fi
7454 rm -f conftest.$ac_objext conftest.$ac_ext
7455          fi
7456
7457 echo "${as_me:-configure}:7457: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7458
7459          CFLAGS="$cf_trim_CFLAGS"
7460          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7461
7462 echo "${as_me:-configure}:7462: testing if the second compile does not leave our definition intact error ..." 1>&5
7463
7464          cat >conftest.$ac_ext <<_ACEOF
7465 #line 7465 "configure"
7466 #include "confdefs.h"
7467 #include <sys/types.h>
7468 int
7469 main ()
7470 {
7471
7472 #ifndef _POSIX_C_SOURCE
7473 make an error
7474 #endif
7475   ;
7476   return 0;
7477 }
7478 _ACEOF
7479 rm -f conftest.$ac_objext
7480 if { (eval echo "$as_me:7480: \"$ac_compile\"") >&5
7481   (eval $ac_compile) 2>&5
7482   ac_status=$?
7483   echo "$as_me:7483: \$? = $ac_status" >&5
7484   (exit $ac_status); } &&
7485          { ac_try='test -s conftest.$ac_objext'
7486   { (eval echo "$as_me:7486: \"$ac_try\"") >&5
7487   (eval $ac_try) 2>&5
7488   ac_status=$?
7489   echo "$as_me:7489: \$? = $ac_status" >&5
7490   (exit $ac_status); }; }; then
7491   :
7492 else
7493   echo "$as_me: failed program was:" >&5
7494 cat conftest.$ac_ext >&5
7495 cf_cv_posix_c_source=no
7496 fi
7497 rm -f conftest.$ac_objext conftest.$ac_ext
7498          CFLAGS="$cf_save_CFLAGS"
7499          CPPFLAGS="$cf_save_CPPFLAGS"
7500
7501 fi
7502 rm -f conftest.$ac_objext conftest.$ac_ext
7503
7504 fi
7505 echo "$as_me:7505: result: $cf_cv_posix_c_source" >&5
7506 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7507
7508 if test "$cf_cv_posix_c_source" != no ; then
7509         CFLAGS="$cf_trim_CFLAGS"
7510         CPPFLAGS="$cf_trim_CPPFLAGS"
7511
7512 cf_fix_cppflags=no
7513 cf_new_cflags=
7514 cf_new_cppflags=
7515 cf_new_extra_cppflags=
7516
7517 for cf_add_cflags in $cf_cv_posix_c_source
7518 do
7519 case $cf_fix_cppflags in
7520 no)
7521         case $cf_add_cflags in #(vi
7522         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7523                 case $cf_add_cflags in
7524                 -D*)
7525                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7526
7527                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7528                                 && test -z "${cf_tst_cflags}" \
7529                                 && cf_fix_cppflags=yes
7530
7531                         if test $cf_fix_cppflags = yes ; then
7532                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7533                                 continue
7534                         elif test "${cf_tst_cflags}" = "\"'" ; then
7535                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7536                                 continue
7537                         fi
7538                         ;;
7539                 esac
7540                 case "$CPPFLAGS" in
7541                 *$cf_add_cflags) #(vi
7542                         ;;
7543                 *) #(vi
7544                         case $cf_add_cflags in #(vi
7545                         -D*)
7546                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7547
7548 CPPFLAGS=`echo "$CPPFLAGS" | \
7549         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7550                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7551
7552                                 ;;
7553                         esac
7554                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7555                         ;;
7556                 esac
7557                 ;;
7558         *)
7559                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7560                 ;;
7561         esac
7562         ;;
7563 yes)
7564         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7565
7566         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7567
7568         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7569                 && test -z "${cf_tst_cflags}" \
7570                 && cf_fix_cppflags=no
7571         ;;
7572 esac
7573 done
7574
7575 if test -n "$cf_new_cflags" ; then
7576
7577         CFLAGS="$CFLAGS $cf_new_cflags"
7578 fi
7579
7580 if test -n "$cf_new_cppflags" ; then
7581
7582         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7583 fi
7584
7585 if test -n "$cf_new_extra_cppflags" ; then
7586
7587         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7588 fi
7589
7590 fi
7591
7592         ;;
7593 netbsd*) #(vi
7594         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7595         ;;
7596 openbsd[4-9]*) #(vi
7597         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7598         cf_xopen_source="-D_BSD_SOURCE"
7599         cf_XOPEN_SOURCE=600
7600         ;;
7601 openbsd*) #(vi
7602         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7603         ;;
7604 osf[45]*) #(vi
7605         cf_xopen_source="-D_OSF_SOURCE"
7606         ;;
7607 nto-qnx*) #(vi
7608         cf_xopen_source="-D_QNX_SOURCE"
7609         ;;
7610 sco*) #(vi
7611         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7612         ;;
7613 solaris2.*) #(vi
7614         cf_xopen_source="-D__EXTENSIONS__"
7615         ;;
7616 *)
7617
7618 echo "$as_me:7618: checking if we should define _XOPEN_SOURCE" >&5
7619 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7620 if test "${cf_cv_xopen_source+set}" = set; then
7621   echo $ECHO_N "(cached) $ECHO_C" >&6
7622 else
7623
7624         cat >conftest.$ac_ext <<_ACEOF
7625 #line 7625 "configure"
7626 #include "confdefs.h"
7627
7628 #include <stdlib.h>
7629 #include <string.h>
7630 #include <sys/types.h>
7631
7632 int
7633 main ()
7634 {
7635
7636 #ifndef _XOPEN_SOURCE
7637 make an error
7638 #endif
7639   ;
7640   return 0;
7641 }
7642 _ACEOF
7643 rm -f conftest.$ac_objext
7644 if { (eval echo "$as_me:7644: \"$ac_compile\"") >&5
7645   (eval $ac_compile) 2>&5
7646   ac_status=$?
7647   echo "$as_me:7647: \$? = $ac_status" >&5
7648   (exit $ac_status); } &&
7649          { ac_try='test -s conftest.$ac_objext'
7650   { (eval echo "$as_me:7650: \"$ac_try\"") >&5
7651   (eval $ac_try) 2>&5
7652   ac_status=$?
7653   echo "$as_me:7653: \$? = $ac_status" >&5
7654   (exit $ac_status); }; }; then
7655   cf_cv_xopen_source=no
7656 else
7657   echo "$as_me: failed program was:" >&5
7658 cat conftest.$ac_ext >&5
7659 cf_save="$CPPFLAGS"
7660          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7661          cat >conftest.$ac_ext <<_ACEOF
7662 #line 7662 "configure"
7663 #include "confdefs.h"
7664
7665 #include <stdlib.h>
7666 #include <string.h>
7667 #include <sys/types.h>
7668
7669 int
7670 main ()
7671 {
7672
7673 #ifdef _XOPEN_SOURCE
7674 make an error
7675 #endif
7676   ;
7677   return 0;
7678 }
7679 _ACEOF
7680 rm -f conftest.$ac_objext
7681 if { (eval echo "$as_me:7681: \"$ac_compile\"") >&5
7682   (eval $ac_compile) 2>&5
7683   ac_status=$?
7684   echo "$as_me:7684: \$? = $ac_status" >&5
7685   (exit $ac_status); } &&
7686          { ac_try='test -s conftest.$ac_objext'
7687   { (eval echo "$as_me:7687: \"$ac_try\"") >&5
7688   (eval $ac_try) 2>&5
7689   ac_status=$?
7690   echo "$as_me:7690: \$? = $ac_status" >&5
7691   (exit $ac_status); }; }; then
7692   cf_cv_xopen_source=no
7693 else
7694   echo "$as_me: failed program was:" >&5
7695 cat conftest.$ac_ext >&5
7696 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7697 fi
7698 rm -f conftest.$ac_objext conftest.$ac_ext
7699         CPPFLAGS="$cf_save"
7700
7701 fi
7702 rm -f conftest.$ac_objext conftest.$ac_ext
7703
7704 fi
7705 echo "$as_me:7705: result: $cf_cv_xopen_source" >&5
7706 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7707
7708 if test "$cf_cv_xopen_source" != no ; then
7709
7710 CFLAGS=`echo "$CFLAGS" | \
7711         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7712                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7713
7714 CPPFLAGS=`echo "$CPPFLAGS" | \
7715         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7716                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7717
7718         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7719
7720 cf_fix_cppflags=no
7721 cf_new_cflags=
7722 cf_new_cppflags=
7723 cf_new_extra_cppflags=
7724
7725 for cf_add_cflags in $cf_temp_xopen_source
7726 do
7727 case $cf_fix_cppflags in
7728 no)
7729         case $cf_add_cflags in #(vi
7730         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7731                 case $cf_add_cflags in
7732                 -D*)
7733                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7734
7735                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7736                                 && test -z "${cf_tst_cflags}" \
7737                                 && cf_fix_cppflags=yes
7738
7739                         if test $cf_fix_cppflags = yes ; then
7740                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7741                                 continue
7742                         elif test "${cf_tst_cflags}" = "\"'" ; then
7743                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7744                                 continue
7745                         fi
7746                         ;;
7747                 esac
7748                 case "$CPPFLAGS" in
7749                 *$cf_add_cflags) #(vi
7750                         ;;
7751                 *) #(vi
7752                         case $cf_add_cflags in #(vi
7753                         -D*)
7754                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7755
7756 CPPFLAGS=`echo "$CPPFLAGS" | \
7757         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7758                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7759
7760                                 ;;
7761                         esac
7762                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7763                         ;;
7764                 esac
7765                 ;;
7766         *)
7767                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7768                 ;;
7769         esac
7770         ;;
7771 yes)
7772         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7773
7774         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7775
7776         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7777                 && test -z "${cf_tst_cflags}" \
7778                 && cf_fix_cppflags=no
7779         ;;
7780 esac
7781 done
7782
7783 if test -n "$cf_new_cflags" ; then
7784
7785         CFLAGS="$CFLAGS $cf_new_cflags"
7786 fi
7787
7788 if test -n "$cf_new_cppflags" ; then
7789
7790         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7791 fi
7792
7793 if test -n "$cf_new_extra_cppflags" ; then
7794
7795         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7796 fi
7797
7798 fi
7799
7800 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7801
7802 cf_save_CFLAGS="$CFLAGS"
7803 cf_save_CPPFLAGS="$CPPFLAGS"
7804
7805 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7806         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7807                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7808
7809 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7810         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7811                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7812
7813 echo "$as_me:7813: checking if we should define _POSIX_C_SOURCE" >&5
7814 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7815 if test "${cf_cv_posix_c_source+set}" = set; then
7816   echo $ECHO_N "(cached) $ECHO_C" >&6
7817 else
7818
7819 echo "${as_me:-configure}:7819: testing if the symbol is already defined go no further ..." 1>&5
7820
7821         cat >conftest.$ac_ext <<_ACEOF
7822 #line 7822 "configure"
7823 #include "confdefs.h"
7824 #include <sys/types.h>
7825 int
7826 main ()
7827 {
7828
7829 #ifndef _POSIX_C_SOURCE
7830 make an error
7831 #endif
7832   ;
7833   return 0;
7834 }
7835 _ACEOF
7836 rm -f conftest.$ac_objext
7837 if { (eval echo "$as_me:7837: \"$ac_compile\"") >&5
7838   (eval $ac_compile) 2>&5
7839   ac_status=$?
7840   echo "$as_me:7840: \$? = $ac_status" >&5
7841   (exit $ac_status); } &&
7842          { ac_try='test -s conftest.$ac_objext'
7843   { (eval echo "$as_me:7843: \"$ac_try\"") >&5
7844   (eval $ac_try) 2>&5
7845   ac_status=$?
7846   echo "$as_me:7846: \$? = $ac_status" >&5
7847   (exit $ac_status); }; }; then
7848   cf_cv_posix_c_source=no
7849 else
7850   echo "$as_me: failed program was:" >&5
7851 cat conftest.$ac_ext >&5
7852 cf_want_posix_source=no
7853          case .$cf_POSIX_C_SOURCE in #(vi
7854          .[12]??*) #(vi
7855                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7856                 ;;
7857          .2) #(vi
7858                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7859                 cf_want_posix_source=yes
7860                 ;;
7861          .*)
7862                 cf_want_posix_source=yes
7863                 ;;
7864          esac
7865          if test "$cf_want_posix_source" = yes ; then
7866                 cat >conftest.$ac_ext <<_ACEOF
7867 #line 7867 "configure"
7868 #include "confdefs.h"
7869 #include <sys/types.h>
7870 int
7871 main ()
7872 {
7873
7874 #ifdef _POSIX_SOURCE
7875 make an error
7876 #endif
7877   ;
7878   return 0;
7879 }
7880 _ACEOF
7881 rm -f conftest.$ac_objext
7882 if { (eval echo "$as_me:7882: \"$ac_compile\"") >&5
7883   (eval $ac_compile) 2>&5
7884   ac_status=$?
7885   echo "$as_me:7885: \$? = $ac_status" >&5
7886   (exit $ac_status); } &&
7887          { ac_try='test -s conftest.$ac_objext'
7888   { (eval echo "$as_me:7888: \"$ac_try\"") >&5
7889   (eval $ac_try) 2>&5
7890   ac_status=$?
7891   echo "$as_me:7891: \$? = $ac_status" >&5
7892   (exit $ac_status); }; }; then
7893   :
7894 else
7895   echo "$as_me: failed program was:" >&5
7896 cat conftest.$ac_ext >&5
7897 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7898 fi
7899 rm -f conftest.$ac_objext conftest.$ac_ext
7900          fi
7901
7902 echo "${as_me:-configure}:7902: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7903
7904          CFLAGS="$cf_trim_CFLAGS"
7905          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7906
7907 echo "${as_me:-configure}:7907: testing if the second compile does not leave our definition intact error ..." 1>&5
7908
7909          cat >conftest.$ac_ext <<_ACEOF
7910 #line 7910 "configure"
7911 #include "confdefs.h"
7912 #include <sys/types.h>
7913 int
7914 main ()
7915 {
7916
7917 #ifndef _POSIX_C_SOURCE
7918 make an error
7919 #endif
7920   ;
7921   return 0;
7922 }
7923 _ACEOF
7924 rm -f conftest.$ac_objext
7925 if { (eval echo "$as_me:7925: \"$ac_compile\"") >&5
7926   (eval $ac_compile) 2>&5
7927   ac_status=$?
7928   echo "$as_me:7928: \$? = $ac_status" >&5
7929   (exit $ac_status); } &&
7930          { ac_try='test -s conftest.$ac_objext'
7931   { (eval echo "$as_me:7931: \"$ac_try\"") >&5
7932   (eval $ac_try) 2>&5
7933   ac_status=$?
7934   echo "$as_me:7934: \$? = $ac_status" >&5
7935   (exit $ac_status); }; }; then
7936   :
7937 else
7938   echo "$as_me: failed program was:" >&5
7939 cat conftest.$ac_ext >&5
7940 cf_cv_posix_c_source=no
7941 fi
7942 rm -f conftest.$ac_objext conftest.$ac_ext
7943          CFLAGS="$cf_save_CFLAGS"
7944          CPPFLAGS="$cf_save_CPPFLAGS"
7945
7946 fi
7947 rm -f conftest.$ac_objext conftest.$ac_ext
7948
7949 fi
7950 echo "$as_me:7950: result: $cf_cv_posix_c_source" >&5
7951 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7952
7953 if test "$cf_cv_posix_c_source" != no ; then
7954         CFLAGS="$cf_trim_CFLAGS"
7955         CPPFLAGS="$cf_trim_CPPFLAGS"
7956
7957 cf_fix_cppflags=no
7958 cf_new_cflags=
7959 cf_new_cppflags=
7960 cf_new_extra_cppflags=
7961
7962 for cf_add_cflags in $cf_cv_posix_c_source
7963 do
7964 case $cf_fix_cppflags in
7965 no)
7966         case $cf_add_cflags in #(vi
7967         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7968                 case $cf_add_cflags in
7969                 -D*)
7970                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7971
7972                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7973                                 && test -z "${cf_tst_cflags}" \
7974                                 && cf_fix_cppflags=yes
7975
7976                         if test $cf_fix_cppflags = yes ; then
7977                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7978                                 continue
7979                         elif test "${cf_tst_cflags}" = "\"'" ; then
7980                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7981                                 continue
7982                         fi
7983                         ;;
7984                 esac
7985                 case "$CPPFLAGS" in
7986                 *$cf_add_cflags) #(vi
7987                         ;;
7988                 *) #(vi
7989                         case $cf_add_cflags in #(vi
7990                         -D*)
7991                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7992
7993 CPPFLAGS=`echo "$CPPFLAGS" | \
7994         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7995                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7996
7997                                 ;;
7998                         esac
7999                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8000                         ;;
8001                 esac
8002                 ;;
8003         *)
8004                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8005                 ;;
8006         esac
8007         ;;
8008 yes)
8009         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8010
8011         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8012
8013         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8014                 && test -z "${cf_tst_cflags}" \
8015                 && cf_fix_cppflags=no
8016         ;;
8017 esac
8018 done
8019
8020 if test -n "$cf_new_cflags" ; then
8021
8022         CFLAGS="$CFLAGS $cf_new_cflags"
8023 fi
8024
8025 if test -n "$cf_new_cppflags" ; then
8026
8027         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8028 fi
8029
8030 if test -n "$cf_new_extra_cppflags" ; then
8031
8032         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8033 fi
8034
8035 fi
8036
8037         ;;
8038 esac
8039
8040 if test -n "$cf_xopen_source" ; then
8041
8042 cf_fix_cppflags=no
8043 cf_new_cflags=
8044 cf_new_cppflags=
8045 cf_new_extra_cppflags=
8046
8047 for cf_add_cflags in $cf_xopen_source
8048 do
8049 case $cf_fix_cppflags in
8050 no)
8051         case $cf_add_cflags in #(vi
8052         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8053                 case $cf_add_cflags in
8054                 -D*)
8055                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8056
8057                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8058                                 && test -z "${cf_tst_cflags}" \
8059                                 && cf_fix_cppflags=yes
8060
8061                         if test $cf_fix_cppflags = yes ; then
8062                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8063                                 continue
8064                         elif test "${cf_tst_cflags}" = "\"'" ; then
8065                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8066                                 continue
8067                         fi
8068                         ;;
8069                 esac
8070                 case "$CPPFLAGS" in
8071                 *$cf_add_cflags) #(vi
8072                         ;;
8073                 *) #(vi
8074                         case $cf_add_cflags in #(vi
8075                         -D*)
8076                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8077
8078 CPPFLAGS=`echo "$CPPFLAGS" | \
8079         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8080                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8081
8082                                 ;;
8083                         esac
8084                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8085                         ;;
8086                 esac
8087                 ;;
8088         *)
8089                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8090                 ;;
8091         esac
8092         ;;
8093 yes)
8094         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8095
8096         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8097
8098         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8099                 && test -z "${cf_tst_cflags}" \
8100                 && cf_fix_cppflags=no
8101         ;;
8102 esac
8103 done
8104
8105 if test -n "$cf_new_cflags" ; then
8106
8107         CFLAGS="$CFLAGS $cf_new_cflags"
8108 fi
8109
8110 if test -n "$cf_new_cppflags" ; then
8111
8112         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8113 fi
8114
8115 if test -n "$cf_new_extra_cppflags" ; then
8116
8117         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8118 fi
8119
8120 fi
8121
8122 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8123         echo "$as_me:8123: checking if _XOPEN_SOURCE really is set" >&5
8124 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8125         cat >conftest.$ac_ext <<_ACEOF
8126 #line 8126 "configure"
8127 #include "confdefs.h"
8128 #include <stdlib.h>
8129 int
8130 main ()
8131 {
8132
8133 #ifndef _XOPEN_SOURCE
8134 make an error
8135 #endif
8136   ;
8137   return 0;
8138 }
8139 _ACEOF
8140 rm -f conftest.$ac_objext
8141 if { (eval echo "$as_me:8141: \"$ac_compile\"") >&5
8142   (eval $ac_compile) 2>&5
8143   ac_status=$?
8144   echo "$as_me:8144: \$? = $ac_status" >&5
8145   (exit $ac_status); } &&
8146          { ac_try='test -s conftest.$ac_objext'
8147   { (eval echo "$as_me:8147: \"$ac_try\"") >&5
8148   (eval $ac_try) 2>&5
8149   ac_status=$?
8150   echo "$as_me:8150: \$? = $ac_status" >&5
8151   (exit $ac_status); }; }; then
8152   cf_XOPEN_SOURCE_set=yes
8153 else
8154   echo "$as_me: failed program was:" >&5
8155 cat conftest.$ac_ext >&5
8156 cf_XOPEN_SOURCE_set=no
8157 fi
8158 rm -f conftest.$ac_objext conftest.$ac_ext
8159         echo "$as_me:8159: result: $cf_XOPEN_SOURCE_set" >&5
8160 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8161         if test $cf_XOPEN_SOURCE_set = yes
8162         then
8163                 cat >conftest.$ac_ext <<_ACEOF
8164 #line 8164 "configure"
8165 #include "confdefs.h"
8166 #include <stdlib.h>
8167 int
8168 main ()
8169 {
8170
8171 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8172 make an error
8173 #endif
8174   ;
8175   return 0;
8176 }
8177 _ACEOF
8178 rm -f conftest.$ac_objext
8179 if { (eval echo "$as_me:8179: \"$ac_compile\"") >&5
8180   (eval $ac_compile) 2>&5
8181   ac_status=$?
8182   echo "$as_me:8182: \$? = $ac_status" >&5
8183   (exit $ac_status); } &&
8184          { ac_try='test -s conftest.$ac_objext'
8185   { (eval echo "$as_me:8185: \"$ac_try\"") >&5
8186   (eval $ac_try) 2>&5
8187   ac_status=$?
8188   echo "$as_me:8188: \$? = $ac_status" >&5
8189   (exit $ac_status); }; }; then
8190   cf_XOPEN_SOURCE_set_ok=yes
8191 else
8192   echo "$as_me: failed program was:" >&5
8193 cat conftest.$ac_ext >&5
8194 cf_XOPEN_SOURCE_set_ok=no
8195 fi
8196 rm -f conftest.$ac_objext conftest.$ac_ext
8197                 if test $cf_XOPEN_SOURCE_set_ok = no
8198                 then
8199                         { echo "$as_me:8199: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8200 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8201                 fi
8202         else
8203
8204 echo "$as_me:8204: checking if we should define _XOPEN_SOURCE" >&5
8205 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8206 if test "${cf_cv_xopen_source+set}" = set; then
8207   echo $ECHO_N "(cached) $ECHO_C" >&6
8208 else
8209
8210         cat >conftest.$ac_ext <<_ACEOF
8211 #line 8211 "configure"
8212 #include "confdefs.h"
8213
8214 #include <stdlib.h>
8215 #include <string.h>
8216 #include <sys/types.h>
8217
8218 int
8219 main ()
8220 {
8221
8222 #ifndef _XOPEN_SOURCE
8223 make an error
8224 #endif
8225   ;
8226   return 0;
8227 }
8228 _ACEOF
8229 rm -f conftest.$ac_objext
8230 if { (eval echo "$as_me:8230: \"$ac_compile\"") >&5
8231   (eval $ac_compile) 2>&5
8232   ac_status=$?
8233   echo "$as_me:8233: \$? = $ac_status" >&5
8234   (exit $ac_status); } &&
8235          { ac_try='test -s conftest.$ac_objext'
8236   { (eval echo "$as_me:8236: \"$ac_try\"") >&5
8237   (eval $ac_try) 2>&5
8238   ac_status=$?
8239   echo "$as_me:8239: \$? = $ac_status" >&5
8240   (exit $ac_status); }; }; then
8241   cf_cv_xopen_source=no
8242 else
8243   echo "$as_me: failed program was:" >&5
8244 cat conftest.$ac_ext >&5
8245 cf_save="$CPPFLAGS"
8246          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8247          cat >conftest.$ac_ext <<_ACEOF
8248 #line 8248 "configure"
8249 #include "confdefs.h"
8250
8251 #include <stdlib.h>
8252 #include <string.h>
8253 #include <sys/types.h>
8254
8255 int
8256 main ()
8257 {
8258
8259 #ifdef _XOPEN_SOURCE
8260 make an error
8261 #endif
8262   ;
8263   return 0;
8264 }
8265 _ACEOF
8266 rm -f conftest.$ac_objext
8267 if { (eval echo "$as_me:8267: \"$ac_compile\"") >&5
8268   (eval $ac_compile) 2>&5
8269   ac_status=$?
8270   echo "$as_me:8270: \$? = $ac_status" >&5
8271   (exit $ac_status); } &&
8272          { ac_try='test -s conftest.$ac_objext'
8273   { (eval echo "$as_me:8273: \"$ac_try\"") >&5
8274   (eval $ac_try) 2>&5
8275   ac_status=$?
8276   echo "$as_me:8276: \$? = $ac_status" >&5
8277   (exit $ac_status); }; }; then
8278   cf_cv_xopen_source=no
8279 else
8280   echo "$as_me: failed program was:" >&5
8281 cat conftest.$ac_ext >&5
8282 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8283 fi
8284 rm -f conftest.$ac_objext conftest.$ac_ext
8285         CPPFLAGS="$cf_save"
8286
8287 fi
8288 rm -f conftest.$ac_objext conftest.$ac_ext
8289
8290 fi
8291 echo "$as_me:8291: result: $cf_cv_xopen_source" >&5
8292 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8293
8294 if test "$cf_cv_xopen_source" != no ; then
8295
8296 CFLAGS=`echo "$CFLAGS" | \
8297         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8298                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8299
8300 CPPFLAGS=`echo "$CPPFLAGS" | \
8301         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8302                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8303
8304         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8305
8306 cf_fix_cppflags=no
8307 cf_new_cflags=
8308 cf_new_cppflags=
8309 cf_new_extra_cppflags=
8310
8311 for cf_add_cflags in $cf_temp_xopen_source
8312 do
8313 case $cf_fix_cppflags in
8314 no)
8315         case $cf_add_cflags in #(vi
8316         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8317                 case $cf_add_cflags in
8318                 -D*)
8319                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8320
8321                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8322                                 && test -z "${cf_tst_cflags}" \
8323                                 && cf_fix_cppflags=yes
8324
8325                         if test $cf_fix_cppflags = yes ; then
8326                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8327                                 continue
8328                         elif test "${cf_tst_cflags}" = "\"'" ; then
8329                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8330                                 continue
8331                         fi
8332                         ;;
8333                 esac
8334                 case "$CPPFLAGS" in
8335                 *$cf_add_cflags) #(vi
8336                         ;;
8337                 *) #(vi
8338                         case $cf_add_cflags in #(vi
8339                         -D*)
8340                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8341
8342 CPPFLAGS=`echo "$CPPFLAGS" | \
8343         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8344                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8345
8346                                 ;;
8347                         esac
8348                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8349                         ;;
8350                 esac
8351                 ;;
8352         *)
8353                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8354                 ;;
8355         esac
8356         ;;
8357 yes)
8358         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8359
8360         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8361
8362         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8363                 && test -z "${cf_tst_cflags}" \
8364                 && cf_fix_cppflags=no
8365         ;;
8366 esac
8367 done
8368
8369 if test -n "$cf_new_cflags" ; then
8370
8371         CFLAGS="$CFLAGS $cf_new_cflags"
8372 fi
8373
8374 if test -n "$cf_new_cppflags" ; then
8375
8376         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8377 fi
8378
8379 if test -n "$cf_new_extra_cppflags" ; then
8380
8381         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8382 fi
8383
8384 fi
8385
8386         fi
8387 fi
8388
8389 # Work around breakage on OS X
8390
8391 echo "$as_me:8391: checking if SIGWINCH is defined" >&5
8392 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8393 if test "${cf_cv_define_sigwinch+set}" = set; then
8394   echo $ECHO_N "(cached) $ECHO_C" >&6
8395 else
8396
8397         cat >conftest.$ac_ext <<_ACEOF
8398 #line 8398 "configure"
8399 #include "confdefs.h"
8400
8401 #include <sys/types.h>
8402 #include <sys/signal.h>
8403
8404 int
8405 main ()
8406 {
8407 int x = SIGWINCH
8408   ;
8409   return 0;
8410 }
8411 _ACEOF
8412 rm -f conftest.$ac_objext
8413 if { (eval echo "$as_me:8413: \"$ac_compile\"") >&5
8414   (eval $ac_compile) 2>&5
8415   ac_status=$?
8416   echo "$as_me:8416: \$? = $ac_status" >&5
8417   (exit $ac_status); } &&
8418          { ac_try='test -s conftest.$ac_objext'
8419   { (eval echo "$as_me:8419: \"$ac_try\"") >&5
8420   (eval $ac_try) 2>&5
8421   ac_status=$?
8422   echo "$as_me:8422: \$? = $ac_status" >&5
8423   (exit $ac_status); }; }; then
8424   cf_cv_define_sigwinch=yes
8425 else
8426   echo "$as_me: failed program was:" >&5
8427 cat conftest.$ac_ext >&5
8428 cat >conftest.$ac_ext <<_ACEOF
8429 #line 8429 "configure"
8430 #include "confdefs.h"
8431
8432 #undef _XOPEN_SOURCE
8433 #undef _POSIX_SOURCE
8434 #undef _POSIX_C_SOURCE
8435 #include <sys/types.h>
8436 #include <sys/signal.h>
8437
8438 int
8439 main ()
8440 {
8441 int x = SIGWINCH
8442   ;
8443   return 0;
8444 }
8445 _ACEOF
8446 rm -f conftest.$ac_objext
8447 if { (eval echo "$as_me:8447: \"$ac_compile\"") >&5
8448   (eval $ac_compile) 2>&5
8449   ac_status=$?
8450   echo "$as_me:8450: \$? = $ac_status" >&5
8451   (exit $ac_status); } &&
8452          { ac_try='test -s conftest.$ac_objext'
8453   { (eval echo "$as_me:8453: \"$ac_try\"") >&5
8454   (eval $ac_try) 2>&5
8455   ac_status=$?
8456   echo "$as_me:8456: \$? = $ac_status" >&5
8457   (exit $ac_status); }; }; then
8458   cf_cv_define_sigwinch=maybe
8459 else
8460   echo "$as_me: failed program was:" >&5
8461 cat conftest.$ac_ext >&5
8462 cf_cv_define_sigwinch=no
8463 fi
8464 rm -f conftest.$ac_objext conftest.$ac_ext
8465
8466 fi
8467 rm -f conftest.$ac_objext conftest.$ac_ext
8468
8469 fi
8470 echo "$as_me:8470: result: $cf_cv_define_sigwinch" >&5
8471 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8472
8473 if test "$cf_cv_define_sigwinch" = maybe ; then
8474 echo "$as_me:8474: checking for actual SIGWINCH definition" >&5
8475 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8476 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8477   echo $ECHO_N "(cached) $ECHO_C" >&6
8478 else
8479
8480 cf_cv_fixup_sigwinch=unknown
8481 cf_sigwinch=32
8482 while test $cf_sigwinch != 1
8483 do
8484         cat >conftest.$ac_ext <<_ACEOF
8485 #line 8485 "configure"
8486 #include "confdefs.h"
8487
8488 #undef _XOPEN_SOURCE
8489 #undef _POSIX_SOURCE
8490 #undef _POSIX_C_SOURCE
8491 #include <sys/types.h>
8492 #include <sys/signal.h>
8493
8494 int
8495 main ()
8496 {
8497
8498 #if SIGWINCH != $cf_sigwinch
8499 make an error
8500 #endif
8501 int x = SIGWINCH
8502   ;
8503   return 0;
8504 }
8505 _ACEOF
8506 rm -f conftest.$ac_objext
8507 if { (eval echo "$as_me:8507: \"$ac_compile\"") >&5
8508   (eval $ac_compile) 2>&5
8509   ac_status=$?
8510   echo "$as_me:8510: \$? = $ac_status" >&5
8511   (exit $ac_status); } &&
8512          { ac_try='test -s conftest.$ac_objext'
8513   { (eval echo "$as_me:8513: \"$ac_try\"") >&5
8514   (eval $ac_try) 2>&5
8515   ac_status=$?
8516   echo "$as_me:8516: \$? = $ac_status" >&5
8517   (exit $ac_status); }; }; then
8518   cf_cv_fixup_sigwinch=$cf_sigwinch
8519          break
8520 else
8521   echo "$as_me: failed program was:" >&5
8522 cat conftest.$ac_ext >&5
8523 fi
8524 rm -f conftest.$ac_objext conftest.$ac_ext
8525
8526 cf_sigwinch=`expr $cf_sigwinch - 1`
8527 done
8528
8529 fi
8530 echo "$as_me:8530: result: $cf_cv_fixup_sigwinch" >&5
8531 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8532
8533         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8534                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8535         fi
8536 fi
8537
8538 # Checks for CODESET support.
8539
8540   echo "$as_me:8540: checking for nl_langinfo and CODESET" >&5
8541 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8542 if test "${am_cv_langinfo_codeset+set}" = set; then
8543   echo $ECHO_N "(cached) $ECHO_C" >&6
8544 else
8545   cat >conftest.$ac_ext <<_ACEOF
8546 #line 8546 "configure"
8547 #include "confdefs.h"
8548 #include <langinfo.h>
8549 int
8550 main ()
8551 {
8552 char* cs = nl_langinfo(CODESET);
8553   ;
8554   return 0;
8555 }
8556 _ACEOF
8557 rm -f conftest.$ac_objext conftest$ac_exeext
8558 if { (eval echo "$as_me:8558: \"$ac_link\"") >&5
8559   (eval $ac_link) 2>&5
8560   ac_status=$?
8561   echo "$as_me:8561: \$? = $ac_status" >&5
8562   (exit $ac_status); } &&
8563          { ac_try='test -s conftest$ac_exeext'
8564   { (eval echo "$as_me:8564: \"$ac_try\"") >&5
8565   (eval $ac_try) 2>&5
8566   ac_status=$?
8567   echo "$as_me:8567: \$? = $ac_status" >&5
8568   (exit $ac_status); }; }; then
8569   am_cv_langinfo_codeset=yes
8570 else
8571   echo "$as_me: failed program was:" >&5
8572 cat conftest.$ac_ext >&5
8573 am_cv_langinfo_codeset=no
8574 fi
8575 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8576
8577 fi
8578 echo "$as_me:8578: result: $am_cv_langinfo_codeset" >&5
8579 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8580   if test $am_cv_langinfo_codeset = yes; then
8581
8582 cat >>confdefs.h <<\EOF
8583 #define HAVE_LANGINFO_CODESET 1
8584 EOF
8585
8586   fi
8587
8588 # use these variables to work around a defect in gcc's fixincludes.
8589 NCURSES_OK_WCHAR_T=
8590 NCURSES_OK_WINT_T=
8591
8592 echo "$as_me:8592: checking if you want wide-character code" >&5
8593 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8594
8595 # Check whether --enable-widec or --disable-widec was given.
8596 if test "${enable_widec+set}" = set; then
8597   enableval="$enable_widec"
8598   with_widec=$enableval
8599 else
8600   with_widec=no
8601 fi;
8602 echo "$as_me:8602: result: $with_widec" >&5
8603 echo "${ECHO_T}$with_widec" >&6
8604 if test "x$with_widec" = xyes ; then
8605         LIB_SUFFIX="w${LIB_SUFFIX}"
8606
8607 cat >>confdefs.h <<\EOF
8608 #define USE_WIDEC_SUPPORT 1
8609 EOF
8610
8611 cat >>confdefs.h <<\EOF
8612 #define NCURSES_WIDECHAR 1
8613 EOF
8614
8615 echo "$as_me:8615: checking if wchar.h can be used as is" >&5
8616 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8617 if test "${cf_cv_wchar_h_okay+set}" = set; then
8618   echo $ECHO_N "(cached) $ECHO_C" >&6
8619 else
8620
8621 cat >conftest.$ac_ext <<_ACEOF
8622 #line 8622 "configure"
8623 #include "confdefs.h"
8624
8625 #include <stdlib.h>
8626 #include <wchar.h>
8627
8628 int
8629 main ()
8630 {
8631
8632         wint_t foo = 0;
8633         int bar = iswpunct(foo)
8634   ;
8635   return 0;
8636 }
8637 _ACEOF
8638 rm -f conftest.$ac_objext
8639 if { (eval echo "$as_me:8639: \"$ac_compile\"") >&5
8640   (eval $ac_compile) 2>&5
8641   ac_status=$?
8642   echo "$as_me:8642: \$? = $ac_status" >&5
8643   (exit $ac_status); } &&
8644          { ac_try='test -s conftest.$ac_objext'
8645   { (eval echo "$as_me:8645: \"$ac_try\"") >&5
8646   (eval $ac_try) 2>&5
8647   ac_status=$?
8648   echo "$as_me:8648: \$? = $ac_status" >&5
8649   (exit $ac_status); }; }; then
8650   cf_cv_wchar_h_okay=yes
8651 else
8652   echo "$as_me: failed program was:" >&5
8653 cat conftest.$ac_ext >&5
8654 cf_cv_wchar_h_okay=no
8655 fi
8656 rm -f conftest.$ac_objext conftest.$ac_ext
8657 fi
8658 echo "$as_me:8658: result: $cf_cv_wchar_h_okay" >&5
8659 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8660
8661 if test $cf_cv_wchar_h_okay = no
8662 then
8663
8664 echo "$as_me:8664: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8665 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8666 cat >conftest.$ac_ext <<_ACEOF
8667 #line 8667 "configure"
8668 #include "confdefs.h"
8669 #include <sys/types.h>
8670
8671 int
8672 main ()
8673 {
8674
8675 #ifndef _XOPEN_SOURCE_EXTENDED
8676 make an error
8677 #endif
8678   ;
8679   return 0;
8680 }
8681 _ACEOF
8682 rm -f conftest.$ac_objext
8683 if { (eval echo "$as_me:8683: \"$ac_compile\"") >&5
8684   (eval $ac_compile) 2>&5
8685   ac_status=$?
8686   echo "$as_me:8686: \$? = $ac_status" >&5
8687   (exit $ac_status); } &&
8688          { ac_try='test -s conftest.$ac_objext'
8689   { (eval echo "$as_me:8689: \"$ac_try\"") >&5
8690   (eval $ac_try) 2>&5
8691   ac_status=$?
8692   echo "$as_me:8692: \$? = $ac_status" >&5
8693   (exit $ac_status); }; }; then
8694   cf_result=no
8695 else
8696   echo "$as_me: failed program was:" >&5
8697 cat conftest.$ac_ext >&5
8698 cf_result=yes
8699 fi
8700 rm -f conftest.$ac_objext conftest.$ac_ext
8701 echo "$as_me:8701: result: $cf_result" >&5
8702 echo "${ECHO_T}$cf_result" >&6
8703
8704 if test "$cf_result" = yes ; then
8705         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8706 elif test "x" != "x" ; then
8707         echo "$as_me:8707: checking checking for compatible value versus " >&5
8708 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8709         cat >conftest.$ac_ext <<_ACEOF
8710 #line 8710 "configure"
8711 #include "confdefs.h"
8712 #include <sys/types.h>
8713
8714 int
8715 main ()
8716 {
8717
8718 #if _XOPEN_SOURCE_EXTENDED- < 0
8719 make an error
8720 #endif
8721   ;
8722   return 0;
8723 }
8724 _ACEOF
8725 rm -f conftest.$ac_objext
8726 if { (eval echo "$as_me:8726: \"$ac_compile\"") >&5
8727   (eval $ac_compile) 2>&5
8728   ac_status=$?
8729   echo "$as_me:8729: \$? = $ac_status" >&5
8730   (exit $ac_status); } &&
8731          { ac_try='test -s conftest.$ac_objext'
8732   { (eval echo "$as_me:8732: \"$ac_try\"") >&5
8733   (eval $ac_try) 2>&5
8734   ac_status=$?
8735   echo "$as_me:8735: \$? = $ac_status" >&5
8736   (exit $ac_status); }; }; then
8737   cf_result=yes
8738 else
8739   echo "$as_me: failed program was:" >&5
8740 cat conftest.$ac_ext >&5
8741 cf_result=no
8742 fi
8743 rm -f conftest.$ac_objext conftest.$ac_ext
8744         echo "$as_me:8744: result: $cf_result" >&5
8745 echo "${ECHO_T}$cf_result" >&6
8746         if test "$cf_result" = no ; then
8747                 # perhaps we can override it - try...
8748                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8749         fi
8750 fi
8751
8752 fi
8753
8754         # with_overwrite=no
8755         NCURSES_CH_T=cchar_t
8756
8757 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8758 do
8759 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8760 echo "$as_me:8760: checking for $ac_func" >&5
8761 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8762 if eval "test \"\${$as_ac_var+set}\" = set"; then
8763   echo $ECHO_N "(cached) $ECHO_C" >&6
8764 else
8765   cat >conftest.$ac_ext <<_ACEOF
8766 #line 8766 "configure"
8767 #include "confdefs.h"
8768 /* System header to define __stub macros and hopefully few prototypes,
8769     which can conflict with char $ac_func (); below.  */
8770 #include <assert.h>
8771 /* Override any gcc2 internal prototype to avoid an error.  */
8772 #ifdef __cplusplus
8773 extern "C"
8774 #endif
8775 /* We use char because int might match the return type of a gcc2
8776    builtin and then its argument prototype would still apply.  */
8777 char $ac_func ();
8778 char (*f) ();
8779
8780 int
8781 main ()
8782 {
8783 /* The GNU C library defines this for functions which it implements
8784     to always fail with ENOSYS.  Some functions are actually named
8785     something starting with __ and the normal name is an alias.  */
8786 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8787 choke me
8788 #else
8789 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8790 #endif
8791
8792   ;
8793   return 0;
8794 }
8795 _ACEOF
8796 rm -f conftest.$ac_objext conftest$ac_exeext
8797 if { (eval echo "$as_me:8797: \"$ac_link\"") >&5
8798   (eval $ac_link) 2>&5
8799   ac_status=$?
8800   echo "$as_me:8800: \$? = $ac_status" >&5
8801   (exit $ac_status); } &&
8802          { ac_try='test -s conftest$ac_exeext'
8803   { (eval echo "$as_me:8803: \"$ac_try\"") >&5
8804   (eval $ac_try) 2>&5
8805   ac_status=$?
8806   echo "$as_me:8806: \$? = $ac_status" >&5
8807   (exit $ac_status); }; }; then
8808   eval "$as_ac_var=yes"
8809 else
8810   echo "$as_me: failed program was:" >&5
8811 cat conftest.$ac_ext >&5
8812 eval "$as_ac_var=no"
8813 fi
8814 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8815 fi
8816 echo "$as_me:8816: result: `eval echo '${'$as_ac_var'}'`" >&5
8817 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8818 if test `eval echo '${'$as_ac_var'}'` = yes; then
8819   cat >>confdefs.h <<EOF
8820 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8821 EOF
8822
8823 fi
8824 done
8825
8826         if test "x$ac_cv_func_putwc" != xyes ; then
8827
8828 echo "$as_me:8828: checking for multibyte character support" >&5
8829 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8830 if test "${cf_cv_utf8_lib+set}" = set; then
8831   echo $ECHO_N "(cached) $ECHO_C" >&6
8832 else
8833
8834         cf_save_LIBS="$LIBS"
8835         cat >conftest.$ac_ext <<_ACEOF
8836 #line 8836 "configure"
8837 #include "confdefs.h"
8838
8839 #include <stdlib.h>
8840 int
8841 main ()
8842 {
8843 putwc(0,0);
8844   ;
8845   return 0;
8846 }
8847 _ACEOF
8848 rm -f conftest.$ac_objext conftest$ac_exeext
8849 if { (eval echo "$as_me:8849: \"$ac_link\"") >&5
8850   (eval $ac_link) 2>&5
8851   ac_status=$?
8852   echo "$as_me:8852: \$? = $ac_status" >&5
8853   (exit $ac_status); } &&
8854          { ac_try='test -s conftest$ac_exeext'
8855   { (eval echo "$as_me:8855: \"$ac_try\"") >&5
8856   (eval $ac_try) 2>&5
8857   ac_status=$?
8858   echo "$as_me:8858: \$? = $ac_status" >&5
8859   (exit $ac_status); }; }; then
8860   cf_cv_utf8_lib=yes
8861 else
8862   echo "$as_me: failed program was:" >&5
8863 cat conftest.$ac_ext >&5
8864
8865 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8866 # will be set on completion of the AC_TRY_LINK below.
8867 cf_cv_header_path_utf8=
8868 cf_cv_library_path_utf8=
8869
8870 echo "${as_me:-configure}:8870: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8871
8872 cf_save_LIBS="$LIBS"
8873
8874 cat >conftest.$ac_ext <<_ACEOF
8875 #line 8875 "configure"
8876 #include "confdefs.h"
8877
8878 #include <libutf8.h>
8879 int
8880 main ()
8881 {
8882 putwc(0,0);
8883   ;
8884   return 0;
8885 }
8886 _ACEOF
8887 rm -f conftest.$ac_objext conftest$ac_exeext
8888 if { (eval echo "$as_me:8888: \"$ac_link\"") >&5
8889   (eval $ac_link) 2>&5
8890   ac_status=$?
8891   echo "$as_me:8891: \$? = $ac_status" >&5
8892   (exit $ac_status); } &&
8893          { ac_try='test -s conftest$ac_exeext'
8894   { (eval echo "$as_me:8894: \"$ac_try\"") >&5
8895   (eval $ac_try) 2>&5
8896   ac_status=$?
8897   echo "$as_me:8897: \$? = $ac_status" >&5
8898   (exit $ac_status); }; }; then
8899
8900         cf_cv_find_linkage_utf8=yes
8901         cf_cv_header_path_utf8=/usr/include
8902         cf_cv_library_path_utf8=/usr/lib
8903
8904 else
8905   echo "$as_me: failed program was:" >&5
8906 cat conftest.$ac_ext >&5
8907
8908 LIBS="-lutf8  $cf_save_LIBS"
8909
8910 cat >conftest.$ac_ext <<_ACEOF
8911 #line 8911 "configure"
8912 #include "confdefs.h"
8913
8914 #include <libutf8.h>
8915 int
8916 main ()
8917 {
8918 putwc(0,0);
8919   ;
8920   return 0;
8921 }
8922 _ACEOF
8923 rm -f conftest.$ac_objext conftest$ac_exeext
8924 if { (eval echo "$as_me:8924: \"$ac_link\"") >&5
8925   (eval $ac_link) 2>&5
8926   ac_status=$?
8927   echo "$as_me:8927: \$? = $ac_status" >&5
8928   (exit $ac_status); } &&
8929          { ac_try='test -s conftest$ac_exeext'
8930   { (eval echo "$as_me:8930: \"$ac_try\"") >&5
8931   (eval $ac_try) 2>&5
8932   ac_status=$?
8933   echo "$as_me:8933: \$? = $ac_status" >&5
8934   (exit $ac_status); }; }; then
8935
8936         cf_cv_find_linkage_utf8=yes
8937         cf_cv_header_path_utf8=/usr/include
8938         cf_cv_library_path_utf8=/usr/lib
8939         cf_cv_library_file_utf8="-lutf8"
8940
8941 else
8942   echo "$as_me: failed program was:" >&5
8943 cat conftest.$ac_ext >&5
8944
8945         cf_cv_find_linkage_utf8=no
8946         LIBS="$cf_save_LIBS"
8947
8948     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8949
8950 echo "${as_me:-configure}:8950: testing find linkage for utf8 library ..." 1>&5
8951
8952 echo "${as_me:-configure}:8952: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8953
8954     cf_save_CPPFLAGS="$CPPFLAGS"
8955     cf_test_CPPFLAGS="$CPPFLAGS"
8956
8957 cf_search=
8958
8959 # collect the current set of include-directories from compiler flags
8960 cf_header_path_list=""
8961 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8962         for cf_header_path in $CPPFLAGS $CFLAGS
8963         do
8964                 case $cf_header_path in #(vi
8965                 -I*)
8966                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8967
8968 test "x$cf_header_path" != "xNONE" && \
8969 test -d "$cf_header_path" && \
8970  {
8971         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8972         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8973         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8974         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8975         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8976         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8977 }
8978
8979                         cf_header_path_list="$cf_header_path_list $cf_search"
8980                         ;;
8981                 esac
8982         done
8983 fi
8984
8985 # add the variations for the package we are looking for
8986
8987 cf_search=
8988
8989 test "x/usr" != "x$prefix" && \
8990 test -d "/usr" && \
8991 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
8992         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8993         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8994         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8995         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8996         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8997         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8998 }
8999
9000 test "x$prefix" != "xNONE" && \
9001 test -d "$prefix" && \
9002  {
9003         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9004         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9005         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9006         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9007         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9008         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9009 }
9010
9011 test "x/usr/local" != "x$prefix" && \
9012 test -d "/usr/local" && \
9013 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
9014         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
9015         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
9016         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
9017         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
9018         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
9019         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
9020 }
9021
9022 test "x/opt" != "x$prefix" && \
9023 test -d "/opt" && \
9024 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
9025         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
9026         test -d /opt/include &&          cf_search="$cf_search /opt/include"
9027         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
9028         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
9029         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
9030         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
9031 }
9032
9033 test "x$HOME" != "x$prefix" && \
9034 test -d "$HOME" && \
9035 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
9036         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
9037         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
9038         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
9039         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
9040         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
9041         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
9042 }
9043
9044 test "$includedir" != NONE && \
9045 test "$includedir" != "/usr/include" && \
9046 test -d "$includedir" && {
9047         test -d $includedir &&    cf_search="$cf_search $includedir"
9048         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9049 }
9050
9051 test "$oldincludedir" != NONE && \
9052 test "$oldincludedir" != "/usr/include" && \
9053 test -d "$oldincludedir" && {
9054         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9055         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9056 }
9057
9058 cf_search="$cf_search $cf_header_path_list"
9059
9060     for cf_cv_header_path_utf8 in $cf_search
9061     do
9062       if test -d $cf_cv_header_path_utf8 ; then
9063         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9064
9065 echo "${as_me:-configure}:9065: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9066
9067         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9068         cat >conftest.$ac_ext <<_ACEOF
9069 #line 9069 "configure"
9070 #include "confdefs.h"
9071
9072 #include <libutf8.h>
9073 int
9074 main ()
9075 {
9076 putwc(0,0);
9077   ;
9078   return 0;
9079 }
9080 _ACEOF
9081 rm -f conftest.$ac_objext
9082 if { (eval echo "$as_me:9082: \"$ac_compile\"") >&5
9083   (eval $ac_compile) 2>&5
9084   ac_status=$?
9085   echo "$as_me:9085: \$? = $ac_status" >&5
9086   (exit $ac_status); } &&
9087          { ac_try='test -s conftest.$ac_objext'
9088   { (eval echo "$as_me:9088: \"$ac_try\"") >&5
9089   (eval $ac_try) 2>&5
9090   ac_status=$?
9091   echo "$as_me:9091: \$? = $ac_status" >&5
9092   (exit $ac_status); }; }; then
9093
9094             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9095
9096 echo "${as_me:-configure}:9096: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9097
9098             cf_cv_find_linkage_utf8=maybe
9099             cf_test_CPPFLAGS="$CPPFLAGS"
9100             break
9101 else
9102   echo "$as_me: failed program was:" >&5
9103 cat conftest.$ac_ext >&5
9104
9105             CPPFLAGS="$cf_save_CPPFLAGS"
9106
9107 fi
9108 rm -f conftest.$ac_objext conftest.$ac_ext
9109       fi
9110     done
9111
9112     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9113
9114 echo "${as_me:-configure}:9114: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9115
9116       cf_save_LIBS="$LIBS"
9117       cf_save_LDFLAGS="$LDFLAGS"
9118
9119       if test "$cf_cv_find_linkage_utf8" != yes ; then
9120
9121 cf_search=
9122 cf_library_path_list=""
9123 if test -n "${LDFLAGS}${LIBS}" ; then
9124         for cf_library_path in $LDFLAGS $LIBS
9125         do
9126                 case $cf_library_path in #(vi
9127                 -L*)
9128                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9129
9130 test "x$cf_library_path" != "xNONE" && \
9131 test -d "$cf_library_path" && \
9132  {
9133         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9134         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9135         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9136         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9137         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9138         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9139 }
9140
9141                         cf_library_path_list="$cf_library_path_list $cf_search"
9142                         ;;
9143                 esac
9144         done
9145 fi
9146
9147 cf_search=
9148
9149 test "x/usr" != "x$prefix" && \
9150 test -d "/usr" && \
9151 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
9152         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9153         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9154         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9155         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9156         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9157         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9158 }
9159
9160 test "x$prefix" != "xNONE" && \
9161 test -d "$prefix" && \
9162  {
9163         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9164         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9165         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9166         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9167         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9168         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9169 }
9170
9171 test "x/usr/local" != "x$prefix" && \
9172 test -d "/usr/local" && \
9173 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
9174         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9175         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9176         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9177         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9178         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9179         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9180 }
9181
9182 test "x/opt" != "x$prefix" && \
9183 test -d "/opt" && \
9184 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
9185         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9186         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9187         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9188         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9189         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9190         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9191 }
9192
9193 test "x$HOME" != "x$prefix" && \
9194 test -d "$HOME" && \
9195 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
9196         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9197         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9198         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9199         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9200         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9201         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9202 }
9203
9204 cf_search="$cf_library_path_list $cf_search"
9205
9206         for cf_cv_library_path_utf8 in $cf_search
9207         do
9208           if test -d $cf_cv_library_path_utf8 ; then
9209             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9210
9211 echo "${as_me:-configure}:9211: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9212
9213             CPPFLAGS="$cf_test_CPPFLAGS"
9214             LIBS="-lutf8  $cf_save_LIBS"
9215             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9216             cat >conftest.$ac_ext <<_ACEOF
9217 #line 9217 "configure"
9218 #include "confdefs.h"
9219
9220 #include <libutf8.h>
9221 int
9222 main ()
9223 {
9224 putwc(0,0);
9225   ;
9226   return 0;
9227 }
9228 _ACEOF
9229 rm -f conftest.$ac_objext conftest$ac_exeext
9230 if { (eval echo "$as_me:9230: \"$ac_link\"") >&5
9231   (eval $ac_link) 2>&5
9232   ac_status=$?
9233   echo "$as_me:9233: \$? = $ac_status" >&5
9234   (exit $ac_status); } &&
9235          { ac_try='test -s conftest$ac_exeext'
9236   { (eval echo "$as_me:9236: \"$ac_try\"") >&5
9237   (eval $ac_try) 2>&5
9238   ac_status=$?
9239   echo "$as_me:9239: \$? = $ac_status" >&5
9240   (exit $ac_status); }; }; then
9241
9242                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9243
9244 echo "${as_me:-configure}:9244: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9245
9246                 cf_cv_find_linkage_utf8=yes
9247                 cf_cv_library_file_utf8="-lutf8"
9248                 break
9249 else
9250   echo "$as_me: failed program was:" >&5
9251 cat conftest.$ac_ext >&5
9252
9253                 CPPFLAGS="$cf_save_CPPFLAGS"
9254                 LIBS="$cf_save_LIBS"
9255                 LDFLAGS="$cf_save_LDFLAGS"
9256
9257 fi
9258 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9259           fi
9260         done
9261         CPPFLAGS="$cf_save_CPPFLAGS"
9262         LDFLAGS="$cf_save_LDFLAGS"
9263       fi
9264
9265     else
9266       cf_cv_find_linkage_utf8=no
9267     fi
9268
9269 fi
9270 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9271
9272 fi
9273 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9274
9275 LIBS="$cf_save_LIBS"
9276
9277 if test "$cf_cv_find_linkage_utf8" = yes ; then
9278 cf_cv_utf8_lib=add-on
9279 else
9280 cf_cv_utf8_lib=no
9281 fi
9282
9283 fi
9284 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9285 fi
9286 echo "$as_me:9286: result: $cf_cv_utf8_lib" >&5
9287 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9288
9289 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9290 # ncurses/ncursesw:
9291 if test "$cf_cv_utf8_lib" = "add-on" ; then
9292
9293 cat >>confdefs.h <<\EOF
9294 #define HAVE_LIBUTF8_H 1
9295 EOF
9296
9297 if test -n "$cf_cv_header_path_utf8" ; then
9298   for cf_add_incdir in $cf_cv_header_path_utf8
9299   do
9300         while test $cf_add_incdir != /usr/include
9301         do
9302           if test -d $cf_add_incdir
9303           then
9304                 cf_have_incdir=no
9305                 if test -n "$CFLAGS$CPPFLAGS" ; then
9306                   # a loop is needed to ensure we can add subdirs of existing dirs
9307                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9308                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9309                           cf_have_incdir=yes; break
9310                         fi
9311                   done
9312                 fi
9313
9314                 if test "$cf_have_incdir" = no ; then
9315                   if test "$cf_add_incdir" = /usr/local/include ; then
9316                         if test "$GCC" = yes
9317                         then
9318                           cf_save_CPPFLAGS=$CPPFLAGS
9319                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9320                           cat >conftest.$ac_ext <<_ACEOF
9321 #line 9321 "configure"
9322 #include "confdefs.h"
9323 #include <stdio.h>
9324 int
9325 main ()
9326 {
9327 printf("Hello")
9328   ;
9329   return 0;
9330 }
9331 _ACEOF
9332 rm -f conftest.$ac_objext
9333 if { (eval echo "$as_me:9333: \"$ac_compile\"") >&5
9334   (eval $ac_compile) 2>&5
9335   ac_status=$?
9336   echo "$as_me:9336: \$? = $ac_status" >&5
9337   (exit $ac_status); } &&
9338          { ac_try='test -s conftest.$ac_objext'
9339   { (eval echo "$as_me:9339: \"$ac_try\"") >&5
9340   (eval $ac_try) 2>&5
9341   ac_status=$?
9342   echo "$as_me:9342: \$? = $ac_status" >&5
9343   (exit $ac_status); }; }; then
9344   :
9345 else
9346   echo "$as_me: failed program was:" >&5
9347 cat conftest.$ac_ext >&5
9348 cf_have_incdir=yes
9349 fi
9350 rm -f conftest.$ac_objext conftest.$ac_ext
9351                           CPPFLAGS=$cf_save_CPPFLAGS
9352                         fi
9353                   fi
9354                 fi
9355
9356                 if test "$cf_have_incdir" = no ; then
9357                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9358
9359 echo "${as_me:-configure}:9359: testing adding $cf_add_incdir to include-path ..." 1>&5
9360
9361                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9362
9363                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9364                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9365                   cf_add_incdir="$cf_top_incdir"
9366                 else
9367                   break
9368                 fi
9369           fi
9370         done
9371   done
9372 fi
9373
9374 if test -n "$cf_cv_library_path_utf8" ; then
9375   for cf_add_libdir in $cf_cv_library_path_utf8
9376   do
9377     if test $cf_add_libdir = /usr/lib ; then
9378       :
9379     elif test -d $cf_add_libdir
9380     then
9381       cf_have_libdir=no
9382       if test -n "$LDFLAGS$LIBS" ; then
9383         # a loop is needed to ensure we can add subdirs of existing dirs
9384         for cf_test_libdir in $LDFLAGS $LIBS ; do
9385           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9386             cf_have_libdir=yes; break
9387           fi
9388         done
9389       fi
9390       if test "$cf_have_libdir" = no ; then
9391         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9392
9393 echo "${as_me:-configure}:9393: testing adding $cf_add_libdir to library-path ..." 1>&5
9394
9395         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9396       fi
9397     fi
9398   done
9399 fi
9400
9401         LIBS="$cf_cv_library_file_utf8 $LIBS"
9402 fi
9403
9404                 if test "$cf_cv_utf8_lib" != no ; then
9405                         NCURSES_LIBUTF8=1
9406                 fi
9407         fi
9408
9409 # This is needed on Tru64 5.0 to declare mbstate_t
9410 echo "$as_me:9410: checking if we must include wchar.h to declare mbstate_t" >&5
9411 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9412 if test "${cf_cv_mbstate_t+set}" = set; then
9413   echo $ECHO_N "(cached) $ECHO_C" >&6
9414 else
9415
9416 cat >conftest.$ac_ext <<_ACEOF
9417 #line 9417 "configure"
9418 #include "confdefs.h"
9419
9420 #include <stdlib.h>
9421 #include <stdarg.h>
9422 #include <stdio.h>
9423 #ifdef HAVE_LIBUTF8_H
9424 #include <libutf8.h>
9425 #endif
9426 int
9427 main ()
9428 {
9429 mbstate_t state
9430   ;
9431   return 0;
9432 }
9433 _ACEOF
9434 rm -f conftest.$ac_objext
9435 if { (eval echo "$as_me:9435: \"$ac_compile\"") >&5
9436   (eval $ac_compile) 2>&5
9437   ac_status=$?
9438   echo "$as_me:9438: \$? = $ac_status" >&5
9439   (exit $ac_status); } &&
9440          { ac_try='test -s conftest.$ac_objext'
9441   { (eval echo "$as_me:9441: \"$ac_try\"") >&5
9442   (eval $ac_try) 2>&5
9443   ac_status=$?
9444   echo "$as_me:9444: \$? = $ac_status" >&5
9445   (exit $ac_status); }; }; then
9446   cf_cv_mbstate_t=no
9447 else
9448   echo "$as_me: failed program was:" >&5
9449 cat conftest.$ac_ext >&5
9450 cat >conftest.$ac_ext <<_ACEOF
9451 #line 9451 "configure"
9452 #include "confdefs.h"
9453
9454 #include <stdlib.h>
9455 #include <stdarg.h>
9456 #include <stdio.h>
9457 #include <wchar.h>
9458 #ifdef HAVE_LIBUTF8_H
9459 #include <libutf8.h>
9460 #endif
9461 int
9462 main ()
9463 {
9464 mbstate_t value
9465   ;
9466   return 0;
9467 }
9468 _ACEOF
9469 rm -f conftest.$ac_objext
9470 if { (eval echo "$as_me:9470: \"$ac_compile\"") >&5
9471   (eval $ac_compile) 2>&5
9472   ac_status=$?
9473   echo "$as_me:9473: \$? = $ac_status" >&5
9474   (exit $ac_status); } &&
9475          { ac_try='test -s conftest.$ac_objext'
9476   { (eval echo "$as_me:9476: \"$ac_try\"") >&5
9477   (eval $ac_try) 2>&5
9478   ac_status=$?
9479   echo "$as_me:9479: \$? = $ac_status" >&5
9480   (exit $ac_status); }; }; then
9481   cf_cv_mbstate_t=yes
9482 else
9483   echo "$as_me: failed program was:" >&5
9484 cat conftest.$ac_ext >&5
9485 cf_cv_mbstate_t=unknown
9486 fi
9487 rm -f conftest.$ac_objext conftest.$ac_ext
9488 fi
9489 rm -f conftest.$ac_objext conftest.$ac_ext
9490 fi
9491 echo "$as_me:9491: result: $cf_cv_mbstate_t" >&5
9492 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9493
9494 if test "$cf_cv_mbstate_t" = yes ; then
9495
9496 cat >>confdefs.h <<\EOF
9497 #define NEED_WCHAR_H 1
9498 EOF
9499
9500         NEED_WCHAR_H=1
9501 fi
9502
9503 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9504 if test "$cf_cv_mbstate_t" = unknown ; then
9505         NCURSES_MBSTATE_T=1
9506 fi
9507
9508 # This is needed on Tru64 5.0 to declare wchar_t
9509 echo "$as_me:9509: checking if we must include wchar.h to declare wchar_t" >&5
9510 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9511 if test "${cf_cv_wchar_t+set}" = set; then
9512   echo $ECHO_N "(cached) $ECHO_C" >&6
9513 else
9514
9515 cat >conftest.$ac_ext <<_ACEOF
9516 #line 9516 "configure"
9517 #include "confdefs.h"
9518
9519 #include <stdlib.h>
9520 #include <stdarg.h>
9521 #include <stdio.h>
9522 #ifdef HAVE_LIBUTF8_H
9523 #include <libutf8.h>
9524 #endif
9525 int
9526 main ()
9527 {
9528 wchar_t state
9529   ;
9530   return 0;
9531 }
9532 _ACEOF
9533 rm -f conftest.$ac_objext
9534 if { (eval echo "$as_me:9534: \"$ac_compile\"") >&5
9535   (eval $ac_compile) 2>&5
9536   ac_status=$?
9537   echo "$as_me:9537: \$? = $ac_status" >&5
9538   (exit $ac_status); } &&
9539          { ac_try='test -s conftest.$ac_objext'
9540   { (eval echo "$as_me:9540: \"$ac_try\"") >&5
9541   (eval $ac_try) 2>&5
9542   ac_status=$?
9543   echo "$as_me:9543: \$? = $ac_status" >&5
9544   (exit $ac_status); }; }; then
9545   cf_cv_wchar_t=no
9546 else
9547   echo "$as_me: failed program was:" >&5
9548 cat conftest.$ac_ext >&5
9549 cat >conftest.$ac_ext <<_ACEOF
9550 #line 9550 "configure"
9551 #include "confdefs.h"
9552
9553 #include <stdlib.h>
9554 #include <stdarg.h>
9555 #include <stdio.h>
9556 #include <wchar.h>
9557 #ifdef HAVE_LIBUTF8_H
9558 #include <libutf8.h>
9559 #endif
9560 int
9561 main ()
9562 {
9563 wchar_t value
9564   ;
9565   return 0;
9566 }
9567 _ACEOF
9568 rm -f conftest.$ac_objext
9569 if { (eval echo "$as_me:9569: \"$ac_compile\"") >&5
9570   (eval $ac_compile) 2>&5
9571   ac_status=$?
9572   echo "$as_me:9572: \$? = $ac_status" >&5
9573   (exit $ac_status); } &&
9574          { ac_try='test -s conftest.$ac_objext'
9575   { (eval echo "$as_me:9575: \"$ac_try\"") >&5
9576   (eval $ac_try) 2>&5
9577   ac_status=$?
9578   echo "$as_me:9578: \$? = $ac_status" >&5
9579   (exit $ac_status); }; }; then
9580   cf_cv_wchar_t=yes
9581 else
9582   echo "$as_me: failed program was:" >&5
9583 cat conftest.$ac_ext >&5
9584 cf_cv_wchar_t=unknown
9585 fi
9586 rm -f conftest.$ac_objext conftest.$ac_ext
9587 fi
9588 rm -f conftest.$ac_objext conftest.$ac_ext
9589 fi
9590 echo "$as_me:9590: result: $cf_cv_wchar_t" >&5
9591 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9592
9593 if test "$cf_cv_wchar_t" = yes ; then
9594
9595 cat >>confdefs.h <<\EOF
9596 #define NEED_WCHAR_H 1
9597 EOF
9598
9599         NEED_WCHAR_H=1
9600 fi
9601
9602 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9603 if test "$cf_cv_wchar_t" = unknown ; then
9604         NCURSES_WCHAR_T=1
9605 fi
9606
9607 # if we find wchar_t in either place, use substitution to provide a fallback.
9608 if test "$cf_cv_wchar_t" != unknown ; then
9609         NCURSES_OK_WCHAR_T=1
9610 fi
9611
9612 # This is needed on Tru64 5.0 to declare wint_t
9613 echo "$as_me:9613: checking if we must include wchar.h to declare wint_t" >&5
9614 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9615 if test "${cf_cv_wint_t+set}" = set; then
9616   echo $ECHO_N "(cached) $ECHO_C" >&6
9617 else
9618
9619 cat >conftest.$ac_ext <<_ACEOF
9620 #line 9620 "configure"
9621 #include "confdefs.h"
9622
9623 #include <stdlib.h>
9624 #include <stdarg.h>
9625 #include <stdio.h>
9626 #ifdef HAVE_LIBUTF8_H
9627 #include <libutf8.h>
9628 #endif
9629 int
9630 main ()
9631 {
9632 wint_t state
9633   ;
9634   return 0;
9635 }
9636 _ACEOF
9637 rm -f conftest.$ac_objext
9638 if { (eval echo "$as_me:9638: \"$ac_compile\"") >&5
9639   (eval $ac_compile) 2>&5
9640   ac_status=$?
9641   echo "$as_me:9641: \$? = $ac_status" >&5
9642   (exit $ac_status); } &&
9643          { ac_try='test -s conftest.$ac_objext'
9644   { (eval echo "$as_me:9644: \"$ac_try\"") >&5
9645   (eval $ac_try) 2>&5
9646   ac_status=$?
9647   echo "$as_me:9647: \$? = $ac_status" >&5
9648   (exit $ac_status); }; }; then
9649   cf_cv_wint_t=no
9650 else
9651   echo "$as_me: failed program was:" >&5
9652 cat conftest.$ac_ext >&5
9653 cat >conftest.$ac_ext <<_ACEOF
9654 #line 9654 "configure"
9655 #include "confdefs.h"
9656
9657 #include <stdlib.h>
9658 #include <stdarg.h>
9659 #include <stdio.h>
9660 #include <wchar.h>
9661 #ifdef HAVE_LIBUTF8_H
9662 #include <libutf8.h>
9663 #endif
9664 int
9665 main ()
9666 {
9667 wint_t value
9668   ;
9669   return 0;
9670 }
9671 _ACEOF
9672 rm -f conftest.$ac_objext
9673 if { (eval echo "$as_me:9673: \"$ac_compile\"") >&5
9674   (eval $ac_compile) 2>&5
9675   ac_status=$?
9676   echo "$as_me:9676: \$? = $ac_status" >&5
9677   (exit $ac_status); } &&
9678          { ac_try='test -s conftest.$ac_objext'
9679   { (eval echo "$as_me:9679: \"$ac_try\"") >&5
9680   (eval $ac_try) 2>&5
9681   ac_status=$?
9682   echo "$as_me:9682: \$? = $ac_status" >&5
9683   (exit $ac_status); }; }; then
9684   cf_cv_wint_t=yes
9685 else
9686   echo "$as_me: failed program was:" >&5
9687 cat conftest.$ac_ext >&5
9688 cf_cv_wint_t=unknown
9689 fi
9690 rm -f conftest.$ac_objext conftest.$ac_ext
9691 fi
9692 rm -f conftest.$ac_objext conftest.$ac_ext
9693 fi
9694 echo "$as_me:9694: result: $cf_cv_wint_t" >&5
9695 echo "${ECHO_T}$cf_cv_wint_t" >&6
9696
9697 if test "$cf_cv_wint_t" = yes ; then
9698
9699 cat >>confdefs.h <<\EOF
9700 #define NEED_WCHAR_H 1
9701 EOF
9702
9703         NEED_WCHAR_H=1
9704 fi
9705
9706 # if we do not find wint_t in either place, use substitution to provide a fallback.
9707 if test "$cf_cv_wint_t" = unknown ; then
9708         NCURSES_WINT_T=1
9709 fi
9710
9711 # if we find wint_t in either place, use substitution to provide a fallback.
9712 if test "$cf_cv_wint_t" != unknown ; then
9713         NCURSES_OK_WINT_T=1
9714 fi
9715
9716         if test "$NCURSES_MBSTATE_T" != 0; then
9717
9718 cat >>confdefs.h <<\EOF
9719 #define NEED_MBSTATE_T_DEF 1
9720 EOF
9721
9722         fi
9723 fi
9724
9725 ###   use option --disable-lp64 to allow long chtype
9726 case $cf_cv_abi_version in
9727 [345]*)
9728         default_with_lp64=no
9729         ;;
9730 *)
9731         default_with_lp64=yes
9732         ;;
9733 esac
9734
9735 echo "$as_me:9735: checking whether to enable _LP64 definition in curses.h" >&5
9736 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9737
9738 # Check whether --enable-lp64 or --disable-lp64 was given.
9739 if test "${enable_lp64+set}" = set; then
9740   enableval="$enable_lp64"
9741   with_lp64=$enableval
9742 else
9743   with_lp64=$default_with_lp64
9744 fi;
9745 echo "$as_me:9745: result: $with_lp64" >&5
9746 echo "${ECHO_T}$with_lp64" >&6
9747
9748 if test "x$with_lp64" = xyes ; then
9749         cf_cv_enable_lp64=1
9750 else
9751         cf_cv_enable_lp64=0
9752 fi
9753
9754 # Check whether --enable-largefile or --disable-largefile was given.
9755 if test "${enable_largefile+set}" = set; then
9756   enableval="$enable_largefile"
9757
9758 fi;
9759 if test "$enable_largefile" != no; then
9760
9761   echo "$as_me:9761: checking for special C compiler options needed for large files" >&5
9762 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9763 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9764   echo $ECHO_N "(cached) $ECHO_C" >&6
9765 else
9766   ac_cv_sys_largefile_CC=no
9767      if test "$GCC" != yes; then
9768        ac_save_CC=$CC
9769        while :; do
9770          # IRIX 6.2 and later do not support large files by default,
9771          # so use the C compiler's -n32 option if that helps.
9772          cat >conftest.$ac_ext <<_ACEOF
9773 #line 9773 "configure"
9774 #include "confdefs.h"
9775 #include <sys/types.h>
9776  /* Check that off_t can represent 2**63 - 1 correctly.
9777     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9778     since some C++ compilers masquerading as C compilers
9779     incorrectly reject 9223372036854775807.  */
9780 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9781   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9782                        && LARGE_OFF_T % 2147483647 == 1)
9783                       ? 1 : -1];
9784 int
9785 main ()
9786 {
9787
9788   ;
9789   return 0;
9790 }
9791 _ACEOF
9792          rm -f conftest.$ac_objext
9793 if { (eval echo "$as_me:9793: \"$ac_compile\"") >&5
9794   (eval $ac_compile) 2>&5
9795   ac_status=$?
9796   echo "$as_me:9796: \$? = $ac_status" >&5
9797   (exit $ac_status); } &&
9798          { ac_try='test -s conftest.$ac_objext'
9799   { (eval echo "$as_me:9799: \"$ac_try\"") >&5
9800   (eval $ac_try) 2>&5
9801   ac_status=$?
9802   echo "$as_me:9802: \$? = $ac_status" >&5
9803   (exit $ac_status); }; }; then
9804   break
9805 else
9806   echo "$as_me: failed program was:" >&5
9807 cat conftest.$ac_ext >&5
9808 fi
9809 rm -f conftest.$ac_objext
9810          CC="$CC -n32"
9811          rm -f conftest.$ac_objext
9812 if { (eval echo "$as_me:9812: \"$ac_compile\"") >&5
9813   (eval $ac_compile) 2>&5
9814   ac_status=$?
9815   echo "$as_me:9815: \$? = $ac_status" >&5
9816   (exit $ac_status); } &&
9817          { ac_try='test -s conftest.$ac_objext'
9818   { (eval echo "$as_me:9818: \"$ac_try\"") >&5
9819   (eval $ac_try) 2>&5
9820   ac_status=$?
9821   echo "$as_me:9821: \$? = $ac_status" >&5
9822   (exit $ac_status); }; }; then
9823   ac_cv_sys_largefile_CC=' -n32'; break
9824 else
9825   echo "$as_me: failed program was:" >&5
9826 cat conftest.$ac_ext >&5
9827 fi
9828 rm -f conftest.$ac_objext
9829          break
9830        done
9831        CC=$ac_save_CC
9832        rm -f conftest.$ac_ext
9833     fi
9834 fi
9835 echo "$as_me:9835: result: $ac_cv_sys_largefile_CC" >&5
9836 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9837   if test "$ac_cv_sys_largefile_CC" != no; then
9838     CC=$CC$ac_cv_sys_largefile_CC
9839   fi
9840
9841   echo "$as_me:9841: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9842 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9843 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9844   echo $ECHO_N "(cached) $ECHO_C" >&6
9845 else
9846   while :; do
9847   ac_cv_sys_file_offset_bits=no
9848   cat >conftest.$ac_ext <<_ACEOF
9849 #line 9849 "configure"
9850 #include "confdefs.h"
9851 #include <sys/types.h>
9852  /* Check that off_t can represent 2**63 - 1 correctly.
9853     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9854     since some C++ compilers masquerading as C compilers
9855     incorrectly reject 9223372036854775807.  */
9856 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9857   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9858                        && LARGE_OFF_T % 2147483647 == 1)
9859                       ? 1 : -1];
9860 int
9861 main ()
9862 {
9863
9864   ;
9865   return 0;
9866 }
9867 _ACEOF
9868 rm -f conftest.$ac_objext
9869 if { (eval echo "$as_me:9869: \"$ac_compile\"") >&5
9870   (eval $ac_compile) 2>&5
9871   ac_status=$?
9872   echo "$as_me:9872: \$? = $ac_status" >&5
9873   (exit $ac_status); } &&
9874          { ac_try='test -s conftest.$ac_objext'
9875   { (eval echo "$as_me:9875: \"$ac_try\"") >&5
9876   (eval $ac_try) 2>&5
9877   ac_status=$?
9878   echo "$as_me:9878: \$? = $ac_status" >&5
9879   (exit $ac_status); }; }; then
9880   break
9881 else
9882   echo "$as_me: failed program was:" >&5
9883 cat conftest.$ac_ext >&5
9884 fi
9885 rm -f conftest.$ac_objext conftest.$ac_ext
9886   cat >conftest.$ac_ext <<_ACEOF
9887 #line 9887 "configure"
9888 #include "confdefs.h"
9889 #define _FILE_OFFSET_BITS 64
9890 #include <sys/types.h>
9891  /* Check that off_t can represent 2**63 - 1 correctly.
9892     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9893     since some C++ compilers masquerading as C compilers
9894     incorrectly reject 9223372036854775807.  */
9895 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9896   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9897                        && LARGE_OFF_T % 2147483647 == 1)
9898                       ? 1 : -1];
9899 int
9900 main ()
9901 {
9902
9903   ;
9904   return 0;
9905 }
9906 _ACEOF
9907 rm -f conftest.$ac_objext
9908 if { (eval echo "$as_me:9908: \"$ac_compile\"") >&5
9909   (eval $ac_compile) 2>&5
9910   ac_status=$?
9911   echo "$as_me:9911: \$? = $ac_status" >&5
9912   (exit $ac_status); } &&
9913          { ac_try='test -s conftest.$ac_objext'
9914   { (eval echo "$as_me:9914: \"$ac_try\"") >&5
9915   (eval $ac_try) 2>&5
9916   ac_status=$?
9917   echo "$as_me:9917: \$? = $ac_status" >&5
9918   (exit $ac_status); }; }; then
9919   ac_cv_sys_file_offset_bits=64; break
9920 else
9921   echo "$as_me: failed program was:" >&5
9922 cat conftest.$ac_ext >&5
9923 fi
9924 rm -f conftest.$ac_objext conftest.$ac_ext
9925   break
9926 done
9927 fi
9928 echo "$as_me:9928: result: $ac_cv_sys_file_offset_bits" >&5
9929 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9930 if test "$ac_cv_sys_file_offset_bits" != no; then
9931
9932 cat >>confdefs.h <<EOF
9933 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9934 EOF
9935
9936 fi
9937 rm -rf conftest*
9938   echo "$as_me:9938: checking for _LARGE_FILES value needed for large files" >&5
9939 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9940 if test "${ac_cv_sys_large_files+set}" = set; then
9941   echo $ECHO_N "(cached) $ECHO_C" >&6
9942 else
9943   while :; do
9944   ac_cv_sys_large_files=no
9945   cat >conftest.$ac_ext <<_ACEOF
9946 #line 9946 "configure"
9947 #include "confdefs.h"
9948 #include <sys/types.h>
9949  /* Check that off_t can represent 2**63 - 1 correctly.
9950     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9951     since some C++ compilers masquerading as C compilers
9952     incorrectly reject 9223372036854775807.  */
9953 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9954   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9955                        && LARGE_OFF_T % 2147483647 == 1)
9956                       ? 1 : -1];
9957 int
9958 main ()
9959 {
9960
9961   ;
9962   return 0;
9963 }
9964 _ACEOF
9965 rm -f conftest.$ac_objext
9966 if { (eval echo "$as_me:9966: \"$ac_compile\"") >&5
9967   (eval $ac_compile) 2>&5
9968   ac_status=$?
9969   echo "$as_me:9969: \$? = $ac_status" >&5
9970   (exit $ac_status); } &&
9971          { ac_try='test -s conftest.$ac_objext'
9972   { (eval echo "$as_me:9972: \"$ac_try\"") >&5
9973   (eval $ac_try) 2>&5
9974   ac_status=$?
9975   echo "$as_me:9975: \$? = $ac_status" >&5
9976   (exit $ac_status); }; }; then
9977   break
9978 else
9979   echo "$as_me: failed program was:" >&5
9980 cat conftest.$ac_ext >&5
9981 fi
9982 rm -f conftest.$ac_objext conftest.$ac_ext
9983   cat >conftest.$ac_ext <<_ACEOF
9984 #line 9984 "configure"
9985 #include "confdefs.h"
9986 #define _LARGE_FILES 1
9987 #include <sys/types.h>
9988  /* Check that off_t can represent 2**63 - 1 correctly.
9989     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9990     since some C++ compilers masquerading as C compilers
9991     incorrectly reject 9223372036854775807.  */
9992 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9993   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9994                        && LARGE_OFF_T % 2147483647 == 1)
9995                       ? 1 : -1];
9996 int
9997 main ()
9998 {
9999
10000   ;
10001   return 0;
10002 }
10003 _ACEOF
10004 rm -f conftest.$ac_objext
10005 if { (eval echo "$as_me:10005: \"$ac_compile\"") >&5
10006   (eval $ac_compile) 2>&5
10007   ac_status=$?
10008   echo "$as_me:10008: \$? = $ac_status" >&5
10009   (exit $ac_status); } &&
10010          { ac_try='test -s conftest.$ac_objext'
10011   { (eval echo "$as_me:10011: \"$ac_try\"") >&5
10012   (eval $ac_try) 2>&5
10013   ac_status=$?
10014   echo "$as_me:10014: \$? = $ac_status" >&5
10015   (exit $ac_status); }; }; then
10016   ac_cv_sys_large_files=1; break
10017 else
10018   echo "$as_me: failed program was:" >&5
10019 cat conftest.$ac_ext >&5
10020 fi
10021 rm -f conftest.$ac_objext conftest.$ac_ext
10022   break
10023 done
10024 fi
10025 echo "$as_me:10025: result: $ac_cv_sys_large_files" >&5
10026 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10027 if test "$ac_cv_sys_large_files" != no; then
10028
10029 cat >>confdefs.h <<EOF
10030 #define _LARGE_FILES $ac_cv_sys_large_files
10031 EOF
10032
10033 fi
10034 rm -rf conftest*
10035 fi
10036
10037     if test "$enable_largefile" != no ; then
10038         echo "$as_me:10038: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10039 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10040 if test "${ac_cv_sys_largefile_source+set}" = set; then
10041   echo $ECHO_N "(cached) $ECHO_C" >&6
10042 else
10043   while :; do
10044   ac_cv_sys_largefile_source=no
10045   cat >conftest.$ac_ext <<_ACEOF
10046 #line 10046 "configure"
10047 #include "confdefs.h"
10048 #include <stdio.h>
10049 int
10050 main ()
10051 {
10052 return !fseeko;
10053   ;
10054   return 0;
10055 }
10056 _ACEOF
10057 rm -f conftest.$ac_objext
10058 if { (eval echo "$as_me:10058: \"$ac_compile\"") >&5
10059   (eval $ac_compile) 2>&5
10060   ac_status=$?
10061   echo "$as_me:10061: \$? = $ac_status" >&5
10062   (exit $ac_status); } &&
10063          { ac_try='test -s conftest.$ac_objext'
10064   { (eval echo "$as_me:10064: \"$ac_try\"") >&5
10065   (eval $ac_try) 2>&5
10066   ac_status=$?
10067   echo "$as_me:10067: \$? = $ac_status" >&5
10068   (exit $ac_status); }; }; then
10069   break
10070 else
10071   echo "$as_me: failed program was:" >&5
10072 cat conftest.$ac_ext >&5
10073 fi
10074 rm -f conftest.$ac_objext conftest.$ac_ext
10075   cat >conftest.$ac_ext <<_ACEOF
10076 #line 10076 "configure"
10077 #include "confdefs.h"
10078 #define _LARGEFILE_SOURCE 1
10079 #include <stdio.h>
10080 int
10081 main ()
10082 {
10083 return !fseeko;
10084   ;
10085   return 0;
10086 }
10087 _ACEOF
10088 rm -f conftest.$ac_objext
10089 if { (eval echo "$as_me:10089: \"$ac_compile\"") >&5
10090   (eval $ac_compile) 2>&5
10091   ac_status=$?
10092   echo "$as_me:10092: \$? = $ac_status" >&5
10093   (exit $ac_status); } &&
10094          { ac_try='test -s conftest.$ac_objext'
10095   { (eval echo "$as_me:10095: \"$ac_try\"") >&5
10096   (eval $ac_try) 2>&5
10097   ac_status=$?
10098   echo "$as_me:10098: \$? = $ac_status" >&5
10099   (exit $ac_status); }; }; then
10100   ac_cv_sys_largefile_source=1; break
10101 else
10102   echo "$as_me: failed program was:" >&5
10103 cat conftest.$ac_ext >&5
10104 fi
10105 rm -f conftest.$ac_objext conftest.$ac_ext
10106   break
10107 done
10108 fi
10109 echo "$as_me:10109: result: $ac_cv_sys_largefile_source" >&5
10110 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10111 if test "$ac_cv_sys_largefile_source" != no; then
10112
10113 cat >>confdefs.h <<EOF
10114 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10115 EOF
10116
10117 fi
10118 rm -rf conftest*
10119
10120 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10121 # in glibc 2.1.3, but that breaks too many other things.
10122 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10123 echo "$as_me:10123: checking for fseeko" >&5
10124 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10125 if test "${ac_cv_func_fseeko+set}" = set; then
10126   echo $ECHO_N "(cached) $ECHO_C" >&6
10127 else
10128   cat >conftest.$ac_ext <<_ACEOF
10129 #line 10129 "configure"
10130 #include "confdefs.h"
10131 #include <stdio.h>
10132 int
10133 main ()
10134 {
10135 return fseeko && fseeko (stdin, 0, 0);
10136   ;
10137   return 0;
10138 }
10139 _ACEOF
10140 rm -f conftest.$ac_objext conftest$ac_exeext
10141 if { (eval echo "$as_me:10141: \"$ac_link\"") >&5
10142   (eval $ac_link) 2>&5
10143   ac_status=$?
10144   echo "$as_me:10144: \$? = $ac_status" >&5
10145   (exit $ac_status); } &&
10146          { ac_try='test -s conftest$ac_exeext'
10147   { (eval echo "$as_me:10147: \"$ac_try\"") >&5
10148   (eval $ac_try) 2>&5
10149   ac_status=$?
10150   echo "$as_me:10150: \$? = $ac_status" >&5
10151   (exit $ac_status); }; }; then
10152   ac_cv_func_fseeko=yes
10153 else
10154   echo "$as_me: failed program was:" >&5
10155 cat conftest.$ac_ext >&5
10156 ac_cv_func_fseeko=no
10157 fi
10158 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10159 fi
10160 echo "$as_me:10160: result: $ac_cv_func_fseeko" >&5
10161 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10162 if test $ac_cv_func_fseeko = yes; then
10163
10164 cat >>confdefs.h <<\EOF
10165 #define HAVE_FSEEKO 1
10166 EOF
10167
10168 fi
10169
10170         # Normally we would collect these definitions in the config.h,
10171         # but (like _XOPEN_SOURCE), some environments rely on having these
10172         # defined before any of the system headers are included.  Another
10173         # case comes up with C++, e.g., on AIX the compiler compiles the
10174         # header files by themselves before looking at the body files it is
10175         # told to compile.  For ncurses, those header files do not include
10176         # the config.h
10177         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10178         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10179         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10180
10181         echo "$as_me:10181: checking whether to use struct dirent64" >&5
10182 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10183 if test "${cf_cv_struct_dirent64+set}" = set; then
10184   echo $ECHO_N "(cached) $ECHO_C" >&6
10185 else
10186
10187                 cat >conftest.$ac_ext <<_ACEOF
10188 #line 10188 "configure"
10189 #include "confdefs.h"
10190
10191 #include <sys/types.h>
10192 #include <dirent.h>
10193
10194 int
10195 main ()
10196 {
10197
10198                 /* if transitional largefile support is setup, this is true */
10199                 extern struct dirent64 * readdir(DIR *);
10200                 struct dirent64 *x = readdir((DIR *)0);
10201                 struct dirent *y = readdir((DIR *)0);
10202                 int z = x - y;
10203
10204   ;
10205   return 0;
10206 }
10207 _ACEOF
10208 rm -f conftest.$ac_objext
10209 if { (eval echo "$as_me:10209: \"$ac_compile\"") >&5
10210   (eval $ac_compile) 2>&5
10211   ac_status=$?
10212   echo "$as_me:10212: \$? = $ac_status" >&5
10213   (exit $ac_status); } &&
10214          { ac_try='test -s conftest.$ac_objext'
10215   { (eval echo "$as_me:10215: \"$ac_try\"") >&5
10216   (eval $ac_try) 2>&5
10217   ac_status=$?
10218   echo "$as_me:10218: \$? = $ac_status" >&5
10219   (exit $ac_status); }; }; then
10220   cf_cv_struct_dirent64=yes
10221 else
10222   echo "$as_me: failed program was:" >&5
10223 cat conftest.$ac_ext >&5
10224 cf_cv_struct_dirent64=no
10225 fi
10226 rm -f conftest.$ac_objext conftest.$ac_ext
10227
10228 fi
10229 echo "$as_me:10229: result: $cf_cv_struct_dirent64" >&5
10230 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10231         test "$cf_cv_struct_dirent64" = yes &&
10232 cat >>confdefs.h <<\EOF
10233 #define HAVE_STRUCT_DIRENT64 1
10234 EOF
10235
10236     fi
10237
10238 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10239 echo "$as_me:10239: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10240 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10241
10242 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10243 if test "${enable_tparm_varargs+set}" = set; then
10244   enableval="$enable_tparm_varargs"
10245   with_tparm_varargs=$enableval
10246 else
10247   with_tparm_varargs=yes
10248 fi;
10249 echo "$as_me:10249: result: $with_tparm_varargs" >&5
10250 echo "${ECHO_T}$with_tparm_varargs" >&6
10251 NCURSES_TPARM_VARARGS=0
10252 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10253
10254 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10255 if test "$with_ticlib" != no ; then
10256 echo "$as_me:10256: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10257 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10258
10259 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10260 if test "${enable_tic_depends+set}" = set; then
10261   enableval="$enable_tic_depends"
10262   with_tic_depends=$enableval
10263 else
10264   with_tic_depends=yes
10265 fi;
10266 echo "$as_me:10266: result: $with_tic_depends" >&5
10267 echo "${ECHO_T}$with_tic_depends" >&6
10268 else
10269         with_tic_depends=no
10270 fi
10271
10272 ###   use option --with-bool to override bool's type
10273 echo "$as_me:10273: checking for type of bool" >&5
10274 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10275
10276 # Check whether --with-bool or --without-bool was given.
10277 if test "${with_bool+set}" = set; then
10278   withval="$with_bool"
10279   NCURSES_BOOL="$withval"
10280 else
10281   NCURSES_BOOL=auto
10282 fi;
10283 echo "$as_me:10283: result: $NCURSES_BOOL" >&5
10284 echo "${ECHO_T}$NCURSES_BOOL" >&6
10285
10286 echo "$as_me:10286: checking for alternate terminal capabilities file" >&5
10287 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10288
10289 # Check whether --with-caps or --without-caps was given.
10290 if test "${with_caps+set}" = set; then
10291   withval="$with_caps"
10292   TERMINFO_CAPS=Caps.$withval
10293 else
10294   TERMINFO_CAPS=Caps
10295 fi;
10296 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10297 echo "$as_me:10297: result: $TERMINFO_CAPS" >&5
10298 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10299
10300 ###   use option --with-chtype to override chtype's type
10301 echo "$as_me:10301: checking for type of chtype" >&5
10302 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10303
10304 # Check whether --with-chtype or --without-chtype was given.
10305 if test "${with_chtype+set}" = set; then
10306   withval="$with_chtype"
10307   NCURSES_CHTYPE="$withval"
10308 else
10309   NCURSES_CHTYPE=auto
10310 fi;
10311 echo "$as_me:10311: result: $NCURSES_CHTYPE" >&5
10312 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10313
10314 ###   use option --with-ospeed to override ospeed's type
10315 echo "$as_me:10315: checking for type of ospeed" >&5
10316 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10317
10318 # Check whether --with-ospeed or --without-ospeed was given.
10319 if test "${with_ospeed+set}" = set; then
10320   withval="$with_ospeed"
10321   NCURSES_OSPEED="$withval"
10322 else
10323   NCURSES_OSPEED=short
10324 fi;
10325 echo "$as_me:10325: result: $NCURSES_OSPEED" >&5
10326 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10327
10328 ###   use option --with-mmask-t to override mmask_t's type
10329 echo "$as_me:10329: checking for type of mmask_t" >&5
10330 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10331
10332 # Check whether --with-mmask-t or --without-mmask-t was given.
10333 if test "${with_mmask_t+set}" = set; then
10334   withval="$with_mmask_t"
10335   NCURSES_MMASK_T="$withval"
10336 else
10337   NCURSES_MMASK_T=auto
10338 fi;
10339 echo "$as_me:10339: result: $NCURSES_MMASK_T" >&5
10340 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10341
10342 ###   use option --with-ccharw-max to override CCHARW_MAX size
10343 echo "$as_me:10343: checking for size CCHARW_MAX" >&5
10344 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10345
10346 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10347 if test "${with_ccharw_max+set}" = set; then
10348   withval="$with_ccharw_max"
10349   NCURSES_CCHARW_MAX="$withval"
10350 else
10351   NCURSES_CCHARW_MAX=5
10352 fi;
10353 echo "$as_me:10353: result: $NCURSES_CCHARW_MAX" >&5
10354 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10355
10356 ###   use option --with-tparm-arg to override tparm's argument type
10357 echo "$as_me:10357: checking for type of tparm args" >&5
10358 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10359
10360 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10361 if test "${with_tparm_arg+set}" = set; then
10362   withval="$with_tparm_arg"
10363   NCURSES_TPARM_ARG="$withval"
10364 else
10365   NCURSES_TPARM_ARG=long
10366 fi;
10367 echo "$as_me:10367: result: $NCURSES_TPARM_ARG" >&5
10368 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10369
10370 ### Enable compiling-in rcs id's
10371 echo "$as_me:10371: checking if RCS identifiers should be compiled-in" >&5
10372 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10373
10374 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10375 if test "${with_rcs_ids+set}" = set; then
10376   withval="$with_rcs_ids"
10377   with_rcs_ids=$withval
10378 else
10379   with_rcs_ids=no
10380 fi;
10381 echo "$as_me:10381: result: $with_rcs_ids" >&5
10382 echo "${ECHO_T}$with_rcs_ids" >&6
10383 test "x$with_rcs_ids" = xyes &&
10384 cat >>confdefs.h <<\EOF
10385 #define USE_RCS_IDS 1
10386 EOF
10387
10388 ###############################################################################
10389
10390 echo "$as_me:10390: checking format of man-pages" >&5
10391 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10392
10393 # Check whether --with-manpage-format or --without-manpage-format was given.
10394 if test "${with_manpage_format+set}" = set; then
10395   withval="$with_manpage_format"
10396   MANPAGE_FORMAT=$withval
10397 else
10398   MANPAGE_FORMAT=unknown
10399 fi;
10400
10401 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10402 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10403
10404 cf_unknown=
10405
10406 case $MANPAGE_FORMAT in
10407 unknown)
10408   if test -z "$MANPATH" ; then
10409     MANPATH="/usr/man:/usr/share/man"
10410   fi
10411
10412   # look for the 'date' man-page (it's most likely to be installed!)
10413   MANPAGE_FORMAT=
10414   cf_preform=no
10415   cf_catonly=yes
10416   cf_example=date
10417
10418   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10419   for cf_dir in $MANPATH; do
10420     test -z "$cf_dir" && cf_dir=/usr/man
10421     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
10422     do
10423       cf_test=`echo $cf_name | sed -e 's/*//'`
10424       if test "x$cf_test" = "x$cf_name" ; then
10425
10426         case "$cf_name" in
10427         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10428         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10429         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10430         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10431         esac
10432
10433         case "$cf_name" in
10434         $cf_dir/man*)
10435           cf_catonly=no
10436           ;;
10437         $cf_dir/cat*)
10438           cf_preform=yes
10439           ;;
10440         esac
10441         break
10442       fi
10443
10444       # if we found a match in either man* or cat*, stop looking
10445       if test -n "$MANPAGE_FORMAT" ; then
10446         cf_found=no
10447         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10448         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10449         case "$cf_name" in
10450         $cf_dir/cat*)
10451           cf_found=yes
10452           ;;
10453         esac
10454         test $cf_found=yes && break
10455       fi
10456     done
10457     # only check the first directory in $MANPATH where we find manpages
10458     if test -n "$MANPAGE_FORMAT" ; then
10459        break
10460     fi
10461   done
10462   # if we did not find the example, just assume it is normal
10463   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10464   IFS="$ac_save_ifs"
10465   ;;
10466 *)
10467   for cf_option in $MANPAGE_FORMAT; do
10468      case $cf_option in #(vi
10469      gzip|compress|BSDI|normal|formatted|catonly)
10470        ;;
10471      *)
10472        cf_unknown="$cf_unknown $cf_option"
10473        ;;
10474      esac
10475   done
10476   ;;
10477 esac
10478
10479 echo "$as_me:10479: result: $MANPAGE_FORMAT" >&5
10480 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10481 if test -n "$cf_unknown" ; then
10482   { echo "$as_me:10482: WARNING: Unexpected manpage-format $cf_unknown" >&5
10483 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10484 fi
10485
10486 echo "$as_me:10486: checking for manpage renaming" >&5
10487 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10488
10489 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10490 if test "${with_manpage_renames+set}" = set; then
10491   withval="$with_manpage_renames"
10492   MANPAGE_RENAMES=$withval
10493 else
10494   MANPAGE_RENAMES=yes
10495 fi;
10496
10497 case ".$MANPAGE_RENAMES" in #(vi
10498 .no) #(vi
10499   ;;
10500 .|.yes)
10501   # Debian 'man' program?
10502   if test -f /etc/debian_version ; then
10503     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10504   else
10505     MANPAGE_RENAMES=no
10506   fi
10507   ;;
10508 esac
10509
10510 if test "$MANPAGE_RENAMES" != no ; then
10511   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10512     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10513   elif test ! -f $MANPAGE_RENAMES ; then
10514     { { echo "$as_me:10514: error: not a filename: $MANPAGE_RENAMES" >&5
10515 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10516    { (exit 1); exit 1; }; }
10517   fi
10518
10519   test ! -d man && mkdir man
10520
10521   # Construct a sed-script to perform renaming within man-pages
10522   if test -n "$MANPAGE_RENAMES" ; then
10523     test ! -d man && mkdir man
10524     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10525   fi
10526 fi
10527
10528 echo "$as_me:10528: result: $MANPAGE_RENAMES" >&5
10529 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10530
10531 echo "$as_me:10531: checking if manpage aliases will be installed" >&5
10532 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10533
10534 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10535 if test "${with_manpage_aliases+set}" = set; then
10536   withval="$with_manpage_aliases"
10537   MANPAGE_ALIASES=$withval
10538 else
10539   MANPAGE_ALIASES=yes
10540 fi;
10541
10542 echo "$as_me:10542: result: $MANPAGE_ALIASES" >&5
10543 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10544
10545 case "x$LN_S" in #(vi
10546 xln*) #(vi
10547         cf_use_symlinks=yes
10548         ;;
10549 *)
10550         cf_use_symlinks=no
10551         ;;
10552 esac
10553
10554 MANPAGE_SYMLINKS=no
10555 if test "$MANPAGE_ALIASES" = yes ; then
10556 echo "$as_me:10556: checking if manpage symlinks should be used" >&5
10557 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10558
10559 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10560 if test "${with_manpage_symlinks+set}" = set; then
10561   withval="$with_manpage_symlinks"
10562   MANPAGE_SYMLINKS=$withval
10563 else
10564   MANPAGE_SYMLINKS=$cf_use_symlinks
10565 fi;
10566
10567 if test "$$cf_use_symlinks" = no; then
10568 if test "$MANPAGE_SYMLINKS" = yes ; then
10569         { echo "$as_me:10569: WARNING: cannot make symlinks" >&5
10570 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10571         MANPAGE_SYMLINKS=no
10572 fi
10573 fi
10574
10575 echo "$as_me:10575: result: $MANPAGE_SYMLINKS" >&5
10576 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10577 fi
10578
10579 echo "$as_me:10579: checking for manpage tbl" >&5
10580 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10581
10582 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10583 if test "${with_manpage_tbl+set}" = set; then
10584   withval="$with_manpage_tbl"
10585   MANPAGE_TBL=$withval
10586 else
10587   MANPAGE_TBL=no
10588 fi;
10589
10590 echo "$as_me:10590: result: $MANPAGE_TBL" >&5
10591 echo "${ECHO_T}$MANPAGE_TBL" >&6
10592
10593   if test "$prefix" = "NONE" ; then
10594      cf_prefix="$ac_default_prefix"
10595   else
10596      cf_prefix="$prefix"
10597   fi
10598
10599   case "$MANPAGE_FORMAT" in # (vi
10600   *catonly*) # (vi
10601     cf_format=yes
10602     cf_inboth=no
10603     ;;
10604   *formatted*) # (vi
10605     cf_format=yes
10606     cf_inboth=yes
10607     ;;
10608   *)
10609     cf_format=no
10610     cf_inboth=no
10611     ;;
10612   esac
10613
10614 test ! -d man && mkdir man
10615
10616 cf_so_strip=
10617 cf_compress=
10618 case "$MANPAGE_FORMAT" in #(vi
10619 *compress*) #(vi
10620         cf_so_strip="Z"
10621         cf_compress=compress
10622   ;;
10623 *gzip*)
10624         cf_so_strip="gz"
10625         cf_compress=gzip
10626   ;;
10627 esac
10628
10629 cf_edit_man=./edit_man.sh
10630 cf_man_alias=`pwd`/man_alias.sed
10631
10632 cat >$cf_edit_man <<CF_EOF
10633 #! /bin/sh
10634 # this script is generated by the configure-script CF_MAN_PAGES macro.
10635
10636 prefix="$cf_prefix"
10637 datarootdir="$datarootdir"
10638 datadir="$datadir"
10639
10640 NCURSES_MAJOR="$NCURSES_MAJOR"
10641 NCURSES_MINOR="$NCURSES_MINOR"
10642 NCURSES_PATCH="$NCURSES_PATCH"
10643
10644 NCURSES_OSPEED="$NCURSES_OSPEED"
10645 TERMINFO="$TERMINFO"
10646
10647 INSTALL="$INSTALL"
10648 INSTALL_DATA="$INSTALL_DATA"
10649
10650 transform="$program_transform_name"
10651
10652 TMP=\${TMPDIR:=/tmp}/man\$\$
10653 trap "rm -f \$TMP" 0 1 2 5 15
10654
10655 form=\$1
10656 shift || exit 1
10657
10658 verb=\$1
10659 shift || exit 1
10660
10661 mandir=\$1
10662 shift || exit 1
10663
10664 srcdir=\$1
10665 top_srcdir=\$srcdir/..
10666 shift || exit 1
10667
10668 if test "\$form" = normal ; then
10669         if test "$cf_format" = yes ; then
10670         if test "$cf_inboth" = no ; then
10671                 sh \$0 format \$verb \$mandir \$srcdir \$*
10672                 exit $?
10673         fi
10674         fi
10675         cf_subdir=\$mandir/man
10676         cf_tables=$MANPAGE_TBL
10677 else
10678         cf_subdir=\$mandir/cat
10679         cf_tables=yes
10680 fi
10681
10682 # process the list of source-files
10683 for i in \$* ; do
10684 case \$i in #(vi
10685 *.orig|*.rej) ;; #(vi
10686 *.[0-9]*)
10687         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10688         if test \$verb = installing ; then
10689         if test ! -d \$cf_subdir\${section} ; then
10690                 mkdir -p \$cf_subdir\$section
10691         fi
10692         fi
10693
10694         # replace variables in man page
10695         if test ! -f $cf_man_alias ; then
10696 cat >>$cf_man_alias <<-CF_EOF2
10697                 s,@DATADIR@,\$datadir,g
10698                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
10699                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
10700                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
10701                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
10702                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
10703                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
10704 CF_EOF
10705
10706         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10707         do
10708                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10709                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10710 cat >>$cf_edit_man <<-CF_EOF
10711                 s,@$cf_NAME@,$cf_name,g
10712 CF_EOF
10713         done
10714
10715 cat >>$cf_edit_man <<CF_EOF
10716 CF_EOF2
10717                 echo "...made $cf_man_alias"
10718         fi
10719
10720         aliases=
10721         cf_source=\`basename \$i\`
10722         inalias=\$cf_source
10723         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10724         if test ! -f \$inalias ; then
10725                 echo .. skipped \$cf_source
10726                 continue
10727         fi
10728 CF_EOF
10729
10730 if test "$MANPAGE_ALIASES" != no ; then
10731 cat >>$cf_edit_man <<CF_EOF
10732         nCurses=ignore.3x
10733         test $with_curses_h = yes && nCurses=ncurses.3x
10734         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10735 CF_EOF
10736 fi
10737
10738 if test "$MANPAGE_RENAMES" = no ; then
10739 cat >>$cf_edit_man <<CF_EOF
10740         # perform program transformations for section 1 man pages
10741         if test \$section = 1 ; then
10742                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10743         else
10744                 cf_target=\$cf_subdir\${section}/\$cf_source
10745         fi
10746 CF_EOF
10747 else
10748 cat >>$cf_edit_man <<CF_EOF
10749         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10750         if test -z "\$cf_target" ; then
10751                 echo '? missing rename for '\$cf_source
10752                 cf_target="\$cf_source"
10753         fi
10754         cf_target="\$cf_subdir\${section}/\${cf_target}"
10755
10756 CF_EOF
10757 fi
10758
10759 cat >>$cf_edit_man <<CF_EOF
10760         sed     -f $cf_man_alias \\
10761 CF_EOF
10762
10763 if test -f $MANPAGE_RENAMES ; then
10764 cat >>$cf_edit_man <<CF_EOF
10765                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10766 CF_EOF
10767 else
10768 cat >>$cf_edit_man <<CF_EOF
10769                 < \$i >\$TMP
10770 CF_EOF
10771 fi
10772
10773 cat >>$cf_edit_man <<CF_EOF
10774 if test \$cf_tables = yes ; then
10775         tbl \$TMP >\$TMP.out
10776         mv \$TMP.out \$TMP
10777 fi
10778 CF_EOF
10779
10780 if test $with_overwrite != yes ; then
10781 cat >>$cf_edit_man <<CF_EOF
10782         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10783         mv \$TMP.out \$TMP
10784 CF_EOF
10785 fi
10786
10787 if test $with_curses_h != yes ; then
10788 cat >>$cf_edit_man <<CF_EOF
10789         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10790         mv \$TMP.out \$TMP
10791 CF_EOF
10792 fi
10793
10794 cat >>$cf_edit_man <<CF_EOF
10795         if test \$form = format ; then
10796                 nroff -man \$TMP >\$TMP.out
10797                 mv \$TMP.out \$TMP
10798         fi
10799 CF_EOF
10800
10801 if test -n "$cf_compress" ; then
10802 cat >>$cf_edit_man <<CF_EOF
10803         if test \$verb = installing ; then
10804         if ( $cf_compress -f \$TMP )
10805         then
10806                 mv \$TMP.$cf_so_strip \$TMP
10807         fi
10808         fi
10809         cf_target="\$cf_target.$cf_so_strip"
10810 CF_EOF
10811 fi
10812
10813 case "$MANPAGE_FORMAT" in #(vi
10814 *BSDI*)
10815 cat >>$cf_edit_man <<CF_EOF
10816         if test \$form = format ; then
10817                 # BSDI installs only .0 suffixes in the cat directories
10818                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10819         fi
10820 CF_EOF
10821   ;;
10822 esac
10823
10824 cat >>$cf_edit_man <<CF_EOF
10825         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10826         if test \$verb = installing ; then
10827                 echo \$verb \$cf_target
10828                 \$INSTALL_DATA \$TMP \$cf_target
10829                 test -d \$cf_subdir\${section} &&
10830                 test -n "\$aliases" && (
10831                         cd \$cf_subdir\${section} && (
10832                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10833                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10834                                 cf_target=\`basename \$cf_target\`
10835                                 for cf_alias in \$aliases
10836                                 do
10837                                         if test \$section = 1 ; then
10838                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10839                                         fi
10840
10841                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10842                                                 if test -f \$cf_alias\${suffix} ; then
10843                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10844                                                         then
10845                                                                 continue
10846                                                         fi
10847                                                 fi
10848                                                 echo .. \$verb alias \$cf_alias\${suffix}
10849 CF_EOF
10850 case "x$LN_S" in #(vi
10851 *-f) #(vi
10852 cat >>$cf_edit_man <<CF_EOF
10853                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10854 CF_EOF
10855         ;;
10856 *)
10857 cat >>$cf_edit_man <<CF_EOF
10858                                                 rm -f \$cf_alias\${suffix}
10859                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10860 CF_EOF
10861         ;;
10862 esac
10863 cat >>$cf_edit_man <<CF_EOF
10864                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10865                                                 echo ".so \$cf_source" >\$TMP
10866 CF_EOF
10867 if test -n "$cf_compress" ; then
10868 cat >>$cf_edit_man <<CF_EOF
10869                                                 if test -n "$cf_so_strip" ; then
10870                                                         $cf_compress -f \$TMP
10871                                                         mv \$TMP.$cf_so_strip \$TMP
10872                                                 fi
10873 CF_EOF
10874 fi
10875 cat >>$cf_edit_man <<CF_EOF
10876                                                 echo .. \$verb alias \$cf_alias\${suffix}
10877                                                 rm -f \$cf_alias\${suffix}
10878                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10879                                         fi
10880                                 done
10881                         )
10882                 )
10883         elif test \$verb = removing ; then
10884                 test -f \$cf_target && (
10885                         echo \$verb \$cf_target
10886                         rm -f \$cf_target
10887                 )
10888                 test -d \$cf_subdir\${section} &&
10889                 test -n "\$aliases" && (
10890                         cd \$cf_subdir\${section} && (
10891                                 for cf_alias in \$aliases
10892                                 do
10893                                         if test \$section = 1 ; then
10894                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10895                                         fi
10896
10897                                         echo .. \$verb alias \$cf_alias\${suffix}
10898                                         rm -f \$cf_alias\${suffix}
10899                                 done
10900                         )
10901                 )
10902         else
10903 #               echo ".hy 0"
10904                 cat \$TMP
10905         fi
10906         ;;
10907 esac
10908 done
10909
10910 if test $cf_inboth = yes ; then
10911 if test \$form != format ; then
10912         sh \$0 format \$verb \$mandir \$srcdir \$*
10913 fi
10914 fi
10915
10916 exit 0
10917 CF_EOF
10918 chmod 755 $cf_edit_man
10919
10920 ###############################################################################
10921
10922 ### Note that some functions (such as const) are normally disabled anyway.
10923 echo "$as_me:10923: checking if you want to build with function extensions" >&5
10924 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10925
10926 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10927 if test "${enable_ext_funcs+set}" = set; then
10928   enableval="$enable_ext_funcs"
10929   with_ext_funcs=$enableval
10930 else
10931   with_ext_funcs=yes
10932 fi;
10933 echo "$as_me:10933: result: $with_ext_funcs" >&5
10934 echo "${ECHO_T}$with_ext_funcs" >&6
10935 if test "x$with_ext_funcs" = xyes ; then
10936         NCURSES_EXT_FUNCS=1
10937
10938 cat >>confdefs.h <<\EOF
10939 #define HAVE_ASSUME_DEFAULT_COLORS 1
10940 EOF
10941
10942 cat >>confdefs.h <<\EOF
10943 #define HAVE_CURSES_VERSION 1
10944 EOF
10945
10946 cat >>confdefs.h <<\EOF
10947 #define HAVE_HAS_KEY 1
10948 EOF
10949
10950 cat >>confdefs.h <<\EOF
10951 #define HAVE_RESIZETERM 1
10952 EOF
10953
10954 cat >>confdefs.h <<\EOF
10955 #define HAVE_RESIZE_TERM 1
10956 EOF
10957
10958 cat >>confdefs.h <<\EOF
10959 #define HAVE_TERM_ENTRY_H 1
10960 EOF
10961
10962 cat >>confdefs.h <<\EOF
10963 #define HAVE_USE_DEFAULT_COLORS 1
10964 EOF
10965
10966 cat >>confdefs.h <<\EOF
10967 #define HAVE_USE_SCREEN 1
10968 EOF
10969
10970 cat >>confdefs.h <<\EOF
10971 #define HAVE_USE_WINDOW 1
10972 EOF
10973
10974 cat >>confdefs.h <<\EOF
10975 #define HAVE_WRESIZE 1
10976 EOF
10977
10978 cat >>confdefs.h <<\EOF
10979 #define NCURSES_EXT_FUNCS 1
10980 EOF
10981
10982         GENERATED_EXT_FUNCS=generated
10983 else
10984         NCURSES_EXT_FUNCS=0
10985         GENERATED_EXT_FUNCS=
10986 fi
10987
10988 echo "$as_me:10988: checking if you want to build with experimental SCREEN extensions" >&5
10989 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10990
10991 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10992 if test "${enable_sp_funcs+set}" = set; then
10993   enableval="$enable_sp_funcs"
10994   with_sp_funcs=$enableval
10995 else
10996   with_sp_funcs=no
10997 fi;
10998 echo "$as_me:10998: result: $with_sp_funcs" >&5
10999 echo "${ECHO_T}$with_sp_funcs" >&6
11000 if test "x$with_sp_funcs" = xyes ; then
11001         NCURSES_SP_FUNCS=1
11002
11003 cat >>confdefs.h <<\EOF
11004 #define NCURSES_SP_FUNCS 1
11005 EOF
11006
11007         GENERATED_SP_FUNCS=generated
11008 else
11009         NCURSES_SP_FUNCS=0
11010         GENERATED_SP_FUNCS=
11011 fi
11012
11013 echo "$as_me:11013: checking if you want to build with experimental terminal-driver" >&5
11014 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
11015
11016 # Check whether --enable-term-driver or --disable-term-driver was given.
11017 if test "${enable_term_driver+set}" = set; then
11018   enableval="$enable_term_driver"
11019   with_term_driver=$enableval
11020 else
11021   with_term_driver=no
11022 fi;
11023 echo "$as_me:11023: result: $with_term_driver" >&5
11024 echo "${ECHO_T}$with_term_driver" >&6
11025 if test "x$with_term_driver" = xyes ; then
11026
11027 cat >>confdefs.h <<\EOF
11028 #define USE_TERM_DRIVER 1
11029 EOF
11030
11031         if test "x$with_sp_funcs" != xyes ; then
11032                 { { echo "$as_me:11032: error: The term-driver option relies upon sp-funcs" >&5
11033 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11034    { (exit 1); exit 1; }; }
11035         fi
11036 fi
11037
11038 ###   use option --enable-const to turn on use of const beyond that in XSI.
11039 echo "$as_me:11039: checking for extended use of const keyword" >&5
11040 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11041
11042 # Check whether --enable-const or --disable-const was given.
11043 if test "${enable_const+set}" = set; then
11044   enableval="$enable_const"
11045   with_ext_const=$enableval
11046 else
11047   with_ext_const=no
11048 fi;
11049 echo "$as_me:11049: result: $with_ext_const" >&5
11050 echo "${ECHO_T}$with_ext_const" >&6
11051 NCURSES_CONST='/*nothing*/'
11052 if test "x$with_ext_const" = xyes ; then
11053         NCURSES_CONST=const
11054 fi
11055
11056 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11057 echo "$as_me:11057: checking if you want to use extended colors" >&5
11058 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11059
11060 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11061 if test "${enable_ext_colors+set}" = set; then
11062   enableval="$enable_ext_colors"
11063   with_ext_colors=$enableval
11064 else
11065   with_ext_colors=no
11066 fi;
11067 echo "$as_me:11067: result: $with_ext_colors" >&5
11068 echo "${ECHO_T}$with_ext_colors" >&6
11069 NCURSES_EXT_COLORS=0
11070 if test "x$with_ext_colors" = xyes ; then
11071         if test "x$with_widec" != xyes ; then
11072                 { { echo "$as_me:11072: error: This option applies only to wide-character library" >&5
11073 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11074    { (exit 1); exit 1; }; }
11075         else
11076                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11077
11078 if test "${with_abi_version+set}" != set; then
11079         case $cf_cv_rel_version in
11080         5.*)
11081                 cf_cv_rel_version=6.0
11082                 cf_cv_abi_version=6
11083                 { echo "$as_me:11083: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11084 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11085                 ;;
11086         esac
11087 fi
11088
11089         fi
11090         NCURSES_EXT_COLORS=1
11091
11092 cat >>confdefs.h <<\EOF
11093 #define NCURSES_EXT_COLORS 1
11094 EOF
11095
11096 fi
11097
11098 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11099 echo "$as_me:11099: checking if you want to use extended mouse encoding" >&5
11100 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11101
11102 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11103 if test "${enable_ext_mouse+set}" = set; then
11104   enableval="$enable_ext_mouse"
11105   with_ext_mouse=$enableval
11106 else
11107   with_ext_mouse=no
11108 fi;
11109 echo "$as_me:11109: result: $with_ext_mouse" >&5
11110 echo "${ECHO_T}$with_ext_mouse" >&6
11111 NCURSES_MOUSE_VERSION=1
11112 if test "x$with_ext_mouse" = xyes ; then
11113         NCURSES_MOUSE_VERSION=2
11114
11115 if test "${with_abi_version+set}" != set; then
11116         case $cf_cv_rel_version in
11117         5.*)
11118                 cf_cv_rel_version=6.0
11119                 cf_cv_abi_version=6
11120                 { echo "$as_me:11120: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11121 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11122                 ;;
11123         esac
11124 fi
11125
11126 fi
11127
11128 echo "$as_me:11128: checking if you want \$NCURSES_NO_PADDING code" >&5
11129 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11130
11131 # Check whether --enable-no-padding or --disable-no-padding was given.
11132 if test "${enable_no_padding+set}" = set; then
11133   enableval="$enable_no_padding"
11134   with_no_padding=$enableval
11135 else
11136   with_no_padding=$with_ext_funcs
11137 fi;
11138 echo "$as_me:11138: result: $with_no_padding" >&5
11139 echo "${ECHO_T}$with_no_padding" >&6
11140 test "x$with_no_padding" = xyes &&
11141 cat >>confdefs.h <<\EOF
11142 #define NCURSES_NO_PADDING 1
11143 EOF
11144
11145 echo "$as_me:11145: checking for ANSI C header files" >&5
11146 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11147 if test "${ac_cv_header_stdc+set}" = set; then
11148   echo $ECHO_N "(cached) $ECHO_C" >&6
11149 else
11150   cat >conftest.$ac_ext <<_ACEOF
11151 #line 11151 "configure"
11152 #include "confdefs.h"
11153 #include <stdlib.h>
11154 #include <stdarg.h>
11155 #include <string.h>
11156 #include <float.h>
11157
11158 _ACEOF
11159 if { (eval echo "$as_me:11159: \"$ac_cpp conftest.$ac_ext\"") >&5
11160   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11161   ac_status=$?
11162   egrep -v '^ *\+' conftest.er1 >conftest.err
11163   rm -f conftest.er1
11164   cat conftest.err >&5
11165   echo "$as_me:11165: \$? = $ac_status" >&5
11166   (exit $ac_status); } >/dev/null; then
11167   if test -s conftest.err; then
11168     ac_cpp_err=$ac_c_preproc_warn_flag
11169   else
11170     ac_cpp_err=
11171   fi
11172 else
11173   ac_cpp_err=yes
11174 fi
11175 if test -z "$ac_cpp_err"; then
11176   ac_cv_header_stdc=yes
11177 else
11178   echo "$as_me: failed program was:" >&5
11179   cat conftest.$ac_ext >&5
11180   ac_cv_header_stdc=no
11181 fi
11182 rm -f conftest.err conftest.$ac_ext
11183
11184 if test $ac_cv_header_stdc = yes; then
11185   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11186   cat >conftest.$ac_ext <<_ACEOF
11187 #line 11187 "configure"
11188 #include "confdefs.h"
11189 #include <string.h>
11190
11191 _ACEOF
11192 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11193   egrep "memchr" >/dev/null 2>&1; then
11194   :
11195 else
11196   ac_cv_header_stdc=no
11197 fi
11198 rm -rf conftest*
11199
11200 fi
11201
11202 if test $ac_cv_header_stdc = yes; then
11203   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11204   cat >conftest.$ac_ext <<_ACEOF
11205 #line 11205 "configure"
11206 #include "confdefs.h"
11207 #include <stdlib.h>
11208
11209 _ACEOF
11210 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11211   egrep "free" >/dev/null 2>&1; then
11212   :
11213 else
11214   ac_cv_header_stdc=no
11215 fi
11216 rm -rf conftest*
11217
11218 fi
11219
11220 if test $ac_cv_header_stdc = yes; then
11221   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11222   if test "$cross_compiling" = yes; then
11223   :
11224 else
11225   cat >conftest.$ac_ext <<_ACEOF
11226 #line 11226 "configure"
11227 #include "confdefs.h"
11228 #include <ctype.h>
11229 #if ((' ' & 0x0FF) == 0x020)
11230 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11231 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11232 #else
11233 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11234                      || ('j' <= (c) && (c) <= 'r') \
11235                      || ('s' <= (c) && (c) <= 'z'))
11236 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11237 #endif
11238
11239 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11240 int
11241 main ()
11242 {
11243   int i;
11244   for (i = 0; i < 256; i++)
11245     if (XOR (islower (i), ISLOWER (i))
11246         || toupper (i) != TOUPPER (i))
11247       $ac_main_return(2);
11248   $ac_main_return (0);
11249 }
11250 _ACEOF
11251 rm -f conftest$ac_exeext
11252 if { (eval echo "$as_me:11252: \"$ac_link\"") >&5
11253   (eval $ac_link) 2>&5
11254   ac_status=$?
11255   echo "$as_me:11255: \$? = $ac_status" >&5
11256   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11257   { (eval echo "$as_me:11257: \"$ac_try\"") >&5
11258   (eval $ac_try) 2>&5
11259   ac_status=$?
11260   echo "$as_me:11260: \$? = $ac_status" >&5
11261   (exit $ac_status); }; }; then
11262   :
11263 else
11264   echo "$as_me: program exited with status $ac_status" >&5
11265 echo "$as_me: failed program was:" >&5
11266 cat conftest.$ac_ext >&5
11267 ac_cv_header_stdc=no
11268 fi
11269 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11270 fi
11271 fi
11272 fi
11273 echo "$as_me:11273: result: $ac_cv_header_stdc" >&5
11274 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11275 if test $ac_cv_header_stdc = yes; then
11276
11277 cat >>confdefs.h <<\EOF
11278 #define STDC_HEADERS 1
11279 EOF
11280
11281 fi
11282
11283 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11284
11285 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11286                   inttypes.h stdint.h unistd.h
11287 do
11288 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11289 echo "$as_me:11289: checking for $ac_header" >&5
11290 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11291 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11292   echo $ECHO_N "(cached) $ECHO_C" >&6
11293 else
11294   cat >conftest.$ac_ext <<_ACEOF
11295 #line 11295 "configure"
11296 #include "confdefs.h"
11297 $ac_includes_default
11298 #include <$ac_header>
11299 _ACEOF
11300 rm -f conftest.$ac_objext
11301 if { (eval echo "$as_me:11301: \"$ac_compile\"") >&5
11302   (eval $ac_compile) 2>&5
11303   ac_status=$?
11304   echo "$as_me:11304: \$? = $ac_status" >&5
11305   (exit $ac_status); } &&
11306          { ac_try='test -s conftest.$ac_objext'
11307   { (eval echo "$as_me:11307: \"$ac_try\"") >&5
11308   (eval $ac_try) 2>&5
11309   ac_status=$?
11310   echo "$as_me:11310: \$? = $ac_status" >&5
11311   (exit $ac_status); }; }; then
11312   eval "$as_ac_Header=yes"
11313 else
11314   echo "$as_me: failed program was:" >&5
11315 cat conftest.$ac_ext >&5
11316 eval "$as_ac_Header=no"
11317 fi
11318 rm -f conftest.$ac_objext conftest.$ac_ext
11319 fi
11320 echo "$as_me:11320: result: `eval echo '${'$as_ac_Header'}'`" >&5
11321 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11322 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11323   cat >>confdefs.h <<EOF
11324 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11325 EOF
11326
11327 fi
11328 done
11329
11330 echo "$as_me:11330: checking for signed char" >&5
11331 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11332 if test "${ac_cv_type_signed_char+set}" = set; then
11333   echo $ECHO_N "(cached) $ECHO_C" >&6
11334 else
11335   cat >conftest.$ac_ext <<_ACEOF
11336 #line 11336 "configure"
11337 #include "confdefs.h"
11338 $ac_includes_default
11339 int
11340 main ()
11341 {
11342 if ((signed char *) 0)
11343   return 0;
11344 if (sizeof (signed char))
11345   return 0;
11346   ;
11347   return 0;
11348 }
11349 _ACEOF
11350 rm -f conftest.$ac_objext
11351 if { (eval echo "$as_me:11351: \"$ac_compile\"") >&5
11352   (eval $ac_compile) 2>&5
11353   ac_status=$?
11354   echo "$as_me:11354: \$? = $ac_status" >&5
11355   (exit $ac_status); } &&
11356          { ac_try='test -s conftest.$ac_objext'
11357   { (eval echo "$as_me:11357: \"$ac_try\"") >&5
11358   (eval $ac_try) 2>&5
11359   ac_status=$?
11360   echo "$as_me:11360: \$? = $ac_status" >&5
11361   (exit $ac_status); }; }; then
11362   ac_cv_type_signed_char=yes
11363 else
11364   echo "$as_me: failed program was:" >&5
11365 cat conftest.$ac_ext >&5
11366 ac_cv_type_signed_char=no
11367 fi
11368 rm -f conftest.$ac_objext conftest.$ac_ext
11369 fi
11370 echo "$as_me:11370: result: $ac_cv_type_signed_char" >&5
11371 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11372
11373 echo "$as_me:11373: checking size of signed char" >&5
11374 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11375 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11376   echo $ECHO_N "(cached) $ECHO_C" >&6
11377 else
11378   if test "$ac_cv_type_signed_char" = yes; then
11379   if test "$cross_compiling" = yes; then
11380   # Depending upon the size, compute the lo and hi bounds.
11381 cat >conftest.$ac_ext <<_ACEOF
11382 #line 11382 "configure"
11383 #include "confdefs.h"
11384 $ac_includes_default
11385 int
11386 main ()
11387 {
11388 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11389   ;
11390   return 0;
11391 }
11392 _ACEOF
11393 rm -f conftest.$ac_objext
11394 if { (eval echo "$as_me:11394: \"$ac_compile\"") >&5
11395   (eval $ac_compile) 2>&5
11396   ac_status=$?
11397   echo "$as_me:11397: \$? = $ac_status" >&5
11398   (exit $ac_status); } &&
11399          { ac_try='test -s conftest.$ac_objext'
11400   { (eval echo "$as_me:11400: \"$ac_try\"") >&5
11401   (eval $ac_try) 2>&5
11402   ac_status=$?
11403   echo "$as_me:11403: \$? = $ac_status" >&5
11404   (exit $ac_status); }; }; then
11405   ac_lo=0 ac_mid=0
11406   while :; do
11407     cat >conftest.$ac_ext <<_ACEOF
11408 #line 11408 "configure"
11409 #include "confdefs.h"
11410 $ac_includes_default
11411 int
11412 main ()
11413 {
11414 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11415   ;
11416   return 0;
11417 }
11418 _ACEOF
11419 rm -f conftest.$ac_objext
11420 if { (eval echo "$as_me:11420: \"$ac_compile\"") >&5
11421   (eval $ac_compile) 2>&5
11422   ac_status=$?
11423   echo "$as_me:11423: \$? = $ac_status" >&5
11424   (exit $ac_status); } &&
11425          { ac_try='test -s conftest.$ac_objext'
11426   { (eval echo "$as_me:11426: \"$ac_try\"") >&5
11427   (eval $ac_try) 2>&5
11428   ac_status=$?
11429   echo "$as_me:11429: \$? = $ac_status" >&5
11430   (exit $ac_status); }; }; then
11431   ac_hi=$ac_mid; break
11432 else
11433   echo "$as_me: failed program was:" >&5
11434 cat conftest.$ac_ext >&5
11435 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11436 fi
11437 rm -f conftest.$ac_objext conftest.$ac_ext
11438   done
11439 else
11440   echo "$as_me: failed program was:" >&5
11441 cat conftest.$ac_ext >&5
11442 ac_hi=-1 ac_mid=-1
11443   while :; do
11444     cat >conftest.$ac_ext <<_ACEOF
11445 #line 11445 "configure"
11446 #include "confdefs.h"
11447 $ac_includes_default
11448 int
11449 main ()
11450 {
11451 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11452   ;
11453   return 0;
11454 }
11455 _ACEOF
11456 rm -f conftest.$ac_objext
11457 if { (eval echo "$as_me:11457: \"$ac_compile\"") >&5
11458   (eval $ac_compile) 2>&5
11459   ac_status=$?
11460   echo "$as_me:11460: \$? = $ac_status" >&5
11461   (exit $ac_status); } &&
11462          { ac_try='test -s conftest.$ac_objext'
11463   { (eval echo "$as_me:11463: \"$ac_try\"") >&5
11464   (eval $ac_try) 2>&5
11465   ac_status=$?
11466   echo "$as_me:11466: \$? = $ac_status" >&5
11467   (exit $ac_status); }; }; then
11468   ac_lo=$ac_mid; break
11469 else
11470   echo "$as_me: failed program was:" >&5
11471 cat conftest.$ac_ext >&5
11472 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11473 fi
11474 rm -f conftest.$ac_objext conftest.$ac_ext
11475   done
11476 fi
11477 rm -f conftest.$ac_objext conftest.$ac_ext
11478 # Binary search between lo and hi bounds.
11479 while test "x$ac_lo" != "x$ac_hi"; do
11480   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11481   cat >conftest.$ac_ext <<_ACEOF
11482 #line 11482 "configure"
11483 #include "confdefs.h"
11484 $ac_includes_default
11485 int
11486 main ()
11487 {
11488 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11489   ;
11490   return 0;
11491 }
11492 _ACEOF
11493 rm -f conftest.$ac_objext
11494 if { (eval echo "$as_me:11494: \"$ac_compile\"") >&5
11495   (eval $ac_compile) 2>&5
11496   ac_status=$?
11497   echo "$as_me:11497: \$? = $ac_status" >&5
11498   (exit $ac_status); } &&
11499          { ac_try='test -s conftest.$ac_objext'
11500   { (eval echo "$as_me:11500: \"$ac_try\"") >&5
11501   (eval $ac_try) 2>&5
11502   ac_status=$?
11503   echo "$as_me:11503: \$? = $ac_status" >&5
11504   (exit $ac_status); }; }; then
11505   ac_hi=$ac_mid
11506 else
11507   echo "$as_me: failed program was:" >&5
11508 cat conftest.$ac_ext >&5
11509 ac_lo=`expr $ac_mid + 1`
11510 fi
11511 rm -f conftest.$ac_objext conftest.$ac_ext
11512 done
11513 ac_cv_sizeof_signed_char=$ac_lo
11514 else
11515   if test "$cross_compiling" = yes; then
11516   { { echo "$as_me:11516: error: cannot run test program while cross compiling" >&5
11517 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11518    { (exit 1); exit 1; }; }
11519 else
11520   cat >conftest.$ac_ext <<_ACEOF
11521 #line 11521 "configure"
11522 #include "confdefs.h"
11523 $ac_includes_default
11524 int
11525 main ()
11526 {
11527 FILE *f = fopen ("conftest.val", "w");
11528 if (!f)
11529   $ac_main_return (1);
11530 fprintf (f, "%d", (sizeof (signed char)));
11531 fclose (f);
11532   ;
11533   return 0;
11534 }
11535 _ACEOF
11536 rm -f conftest$ac_exeext
11537 if { (eval echo "$as_me:11537: \"$ac_link\"") >&5
11538   (eval $ac_link) 2>&5
11539   ac_status=$?
11540   echo "$as_me:11540: \$? = $ac_status" >&5
11541   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11542   { (eval echo "$as_me:11542: \"$ac_try\"") >&5
11543   (eval $ac_try) 2>&5
11544   ac_status=$?
11545   echo "$as_me:11545: \$? = $ac_status" >&5
11546   (exit $ac_status); }; }; then
11547   ac_cv_sizeof_signed_char=`cat conftest.val`
11548 else
11549   echo "$as_me: program exited with status $ac_status" >&5
11550 echo "$as_me: failed program was:" >&5
11551 cat conftest.$ac_ext >&5
11552 fi
11553 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11554 fi
11555 fi
11556 rm -f conftest.val
11557 else
11558   ac_cv_sizeof_signed_char=0
11559 fi
11560 fi
11561 echo "$as_me:11561: result: $ac_cv_sizeof_signed_char" >&5
11562 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11563 cat >>confdefs.h <<EOF
11564 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11565 EOF
11566
11567 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11568         NCURSES_SBOOL="signed char"
11569 else
11570         NCURSES_SBOOL="char"
11571 fi
11572 echo "$as_me:11572: checking if you want to use signed Boolean array in term.h" >&5
11573 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11574
11575 # Check whether --enable-signed-char or --disable-signed-char was given.
11576 if test "${enable_signed_char+set}" = set; then
11577   enableval="$enable_signed_char"
11578   with_signed_char=$enableval
11579 else
11580   with_signed_char=no
11581 fi;
11582 echo "$as_me:11582: result: $with_signed_char" >&5
11583 echo "${ECHO_T}$with_signed_char" >&6
11584 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11585
11586 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11587 echo "$as_me:11587: checking if you want SIGWINCH handler" >&5
11588 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11589
11590 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11591 if test "${enable_sigwinch+set}" = set; then
11592   enableval="$enable_sigwinch"
11593   with_sigwinch=$enableval
11594 else
11595   with_sigwinch=$with_ext_funcs
11596 fi;
11597 echo "$as_me:11597: result: $with_sigwinch" >&5
11598 echo "${ECHO_T}$with_sigwinch" >&6
11599 test "x$with_sigwinch" = xyes &&
11600 cat >>confdefs.h <<\EOF
11601 #define USE_SIGWINCH 1
11602 EOF
11603
11604 ###   use option --enable-tcap-names to allow user to define new capabilities
11605 echo "$as_me:11605: checking if you want user-definable terminal capabilities like termcap" >&5
11606 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11607
11608 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11609 if test "${enable_tcap_names+set}" = set; then
11610   enableval="$enable_tcap_names"
11611   with_tcap_names=$enableval
11612 else
11613   with_tcap_names=$with_ext_funcs
11614 fi;
11615 echo "$as_me:11615: result: $with_tcap_names" >&5
11616 echo "${ECHO_T}$with_tcap_names" >&6
11617 NCURSES_XNAMES=0
11618 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
11619
11620 ###############################################################################
11621 # These options are relatively safe to experiment with.
11622
11623 echo "$as_me:11623: checking if you want all development code" >&5
11624 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11625
11626 # Check whether --with-develop or --without-develop was given.
11627 if test "${with_develop+set}" = set; then
11628   withval="$with_develop"
11629   with_develop=$withval
11630 else
11631   with_develop=no
11632 fi;
11633 echo "$as_me:11633: result: $with_develop" >&5
11634 echo "${ECHO_T}$with_develop" >&6
11635
11636 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11637 echo "$as_me:11637: checking if you want hard-tabs code" >&5
11638 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11639
11640 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11641 if test "${enable_hard_tabs+set}" = set; then
11642   enableval="$enable_hard_tabs"
11643
11644 else
11645   enable_hard_tabs=$with_develop
11646 fi;
11647 echo "$as_me:11647: result: $enable_hard_tabs" >&5
11648 echo "${ECHO_T}$enable_hard_tabs" >&6
11649 test "x$enable_hard_tabs" = xyes &&
11650 cat >>confdefs.h <<\EOF
11651 #define USE_HARD_TABS 1
11652 EOF
11653
11654 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11655 echo "$as_me:11655: checking if you want limited support for xmc" >&5
11656 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11657
11658 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11659 if test "${enable_xmc_glitch+set}" = set; then
11660   enableval="$enable_xmc_glitch"
11661
11662 else
11663   enable_xmc_glitch=$with_develop
11664 fi;
11665 echo "$as_me:11665: result: $enable_xmc_glitch" >&5
11666 echo "${ECHO_T}$enable_xmc_glitch" >&6
11667 test "x$enable_xmc_glitch" = xyes &&
11668 cat >>confdefs.h <<\EOF
11669 #define USE_XMC_SUPPORT 1
11670 EOF
11671
11672 ###############################################################################
11673 # These are just experimental, probably should not be in a package:
11674
11675 echo "$as_me:11675: checking if you do not want to assume colors are white-on-black" >&5
11676 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11677
11678 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11679 if test "${enable_assumed_color+set}" = set; then
11680   enableval="$enable_assumed_color"
11681   with_assumed_color=$enableval
11682 else
11683   with_assumed_color=yes
11684 fi;
11685 echo "$as_me:11685: result: $with_assumed_color" >&5
11686 echo "${ECHO_T}$with_assumed_color" >&6
11687 test "x$with_assumed_color" = xyes &&
11688 cat >>confdefs.h <<\EOF
11689 #define USE_ASSUMED_COLOR 1
11690 EOF
11691
11692 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11693 echo "$as_me:11693: checking if you want hashmap scrolling-optimization code" >&5
11694 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11695
11696 # Check whether --enable-hashmap or --disable-hashmap was given.
11697 if test "${enable_hashmap+set}" = set; then
11698   enableval="$enable_hashmap"
11699   with_hashmap=$enableval
11700 else
11701   with_hashmap=yes
11702 fi;
11703 echo "$as_me:11703: result: $with_hashmap" >&5
11704 echo "${ECHO_T}$with_hashmap" >&6
11705 test "x$with_hashmap" = xyes &&
11706 cat >>confdefs.h <<\EOF
11707 #define USE_HASHMAP 1
11708 EOF
11709
11710 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11711 echo "$as_me:11711: checking if you want colorfgbg code" >&5
11712 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11713
11714 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11715 if test "${enable_colorfgbg+set}" = set; then
11716   enableval="$enable_colorfgbg"
11717   with_colorfgbg=$enableval
11718 else
11719   with_colorfgbg=no
11720 fi;
11721 echo "$as_me:11721: result: $with_colorfgbg" >&5
11722 echo "${ECHO_T}$with_colorfgbg" >&6
11723 test "x$with_colorfgbg" = xyes &&
11724 cat >>confdefs.h <<\EOF
11725 #define USE_COLORFGBG 1
11726 EOF
11727
11728 ###   use option --enable-interop to turn on use of bindings used for interop
11729 echo "$as_me:11729: checking if you want interop bindings" >&5
11730 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11731
11732 # Check whether --enable-interop or --disable-interop was given.
11733 if test "${enable_interop+set}" = set; then
11734   enableval="$enable_interop"
11735   with_exp_interop=$enableval
11736 else
11737   with_exp_interop=no
11738 fi;
11739 echo "$as_me:11739: result: $with_exp_interop" >&5
11740 echo "${ECHO_T}$with_exp_interop" >&6
11741
11742 NCURSES_INTEROP_FUNCS=0
11743 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
11744
11745 # This is still experimental (20080329), but should ultimately be moved to
11746 # the script-block --with-normal, etc.
11747
11748 echo "$as_me:11748: checking if you want to link with the pthread library" >&5
11749 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11750
11751 # Check whether --with-pthread or --without-pthread was given.
11752 if test "${with_pthread+set}" = set; then
11753   withval="$with_pthread"
11754   with_pthread=$withval
11755 else
11756   with_pthread=no
11757 fi;
11758 echo "$as_me:11758: result: $with_pthread" >&5
11759 echo "${ECHO_T}$with_pthread" >&6
11760
11761 if test "$with_pthread" != no ; then
11762     echo "$as_me:11762: checking for pthread.h" >&5
11763 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11764 if test "${ac_cv_header_pthread_h+set}" = set; then
11765   echo $ECHO_N "(cached) $ECHO_C" >&6
11766 else
11767   cat >conftest.$ac_ext <<_ACEOF
11768 #line 11768 "configure"
11769 #include "confdefs.h"
11770 #include <pthread.h>
11771 _ACEOF
11772 if { (eval echo "$as_me:11772: \"$ac_cpp conftest.$ac_ext\"") >&5
11773   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11774   ac_status=$?
11775   egrep -v '^ *\+' conftest.er1 >conftest.err
11776   rm -f conftest.er1
11777   cat conftest.err >&5
11778   echo "$as_me:11778: \$? = $ac_status" >&5
11779   (exit $ac_status); } >/dev/null; then
11780   if test -s conftest.err; then
11781     ac_cpp_err=$ac_c_preproc_warn_flag
11782   else
11783     ac_cpp_err=
11784   fi
11785 else
11786   ac_cpp_err=yes
11787 fi
11788 if test -z "$ac_cpp_err"; then
11789   ac_cv_header_pthread_h=yes
11790 else
11791   echo "$as_me: failed program was:" >&5
11792   cat conftest.$ac_ext >&5
11793   ac_cv_header_pthread_h=no
11794 fi
11795 rm -f conftest.err conftest.$ac_ext
11796 fi
11797 echo "$as_me:11797: result: $ac_cv_header_pthread_h" >&5
11798 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11799 if test $ac_cv_header_pthread_h = yes; then
11800
11801 cat >>confdefs.h <<\EOF
11802 #define HAVE_PTHREADS_H 1
11803 EOF
11804
11805         for cf_lib_pthread in pthread c_r
11806         do
11807             echo "$as_me:11807: checking if we can link with the $cf_lib_pthread library" >&5
11808 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11809             cf_save_LIBS="$LIBS"
11810             LIBS="-l$cf_lib_pthread $LIBS"
11811             cat >conftest.$ac_ext <<_ACEOF
11812 #line 11812 "configure"
11813 #include "confdefs.h"
11814
11815 #include <pthread.h>
11816
11817 int
11818 main ()
11819 {
11820
11821                 int rc = pthread_create(0,0,0,0);
11822                 int r2 = pthread_mutexattr_settype(0, 0);
11823
11824   ;
11825   return 0;
11826 }
11827 _ACEOF
11828 rm -f conftest.$ac_objext conftest$ac_exeext
11829 if { (eval echo "$as_me:11829: \"$ac_link\"") >&5
11830   (eval $ac_link) 2>&5
11831   ac_status=$?
11832   echo "$as_me:11832: \$? = $ac_status" >&5
11833   (exit $ac_status); } &&
11834          { ac_try='test -s conftest$ac_exeext'
11835   { (eval echo "$as_me:11835: \"$ac_try\"") >&5
11836   (eval $ac_try) 2>&5
11837   ac_status=$?
11838   echo "$as_me:11838: \$? = $ac_status" >&5
11839   (exit $ac_status); }; }; then
11840   with_pthread=yes
11841 else
11842   echo "$as_me: failed program was:" >&5
11843 cat conftest.$ac_ext >&5
11844 with_pthread=no
11845 fi
11846 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11847             LIBS="$cf_save_LIBS"
11848             echo "$as_me:11848: result: $with_pthread" >&5
11849 echo "${ECHO_T}$with_pthread" >&6
11850             test "$with_pthread" = yes && break
11851         done
11852
11853         if test "$with_pthread" = yes ; then
11854             LIBS="-l$cf_lib_pthread $LIBS"
11855
11856 cat >>confdefs.h <<\EOF
11857 #define HAVE_LIBPTHREADS 1
11858 EOF
11859
11860         else
11861             { { echo "$as_me:11861: error: Cannot link with pthread library" >&5
11862 echo "$as_me: error: Cannot link with pthread library" >&2;}
11863    { (exit 1); exit 1; }; }
11864         fi
11865
11866 fi
11867
11868 fi
11869
11870 if test "x$with_pthread" != xno; then
11871         echo "$as_me:11871: checking for pthread_kill" >&5
11872 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11873 if test "${ac_cv_func_pthread_kill+set}" = set; then
11874   echo $ECHO_N "(cached) $ECHO_C" >&6
11875 else
11876   cat >conftest.$ac_ext <<_ACEOF
11877 #line 11877 "configure"
11878 #include "confdefs.h"
11879 /* System header to define __stub macros and hopefully few prototypes,
11880     which can conflict with char pthread_kill (); below.  */
11881 #include <assert.h>
11882 /* Override any gcc2 internal prototype to avoid an error.  */
11883 #ifdef __cplusplus
11884 extern "C"
11885 #endif
11886 /* We use char because int might match the return type of a gcc2
11887    builtin and then its argument prototype would still apply.  */
11888 char pthread_kill ();
11889 char (*f) ();
11890
11891 int
11892 main ()
11893 {
11894 /* The GNU C library defines this for functions which it implements
11895     to always fail with ENOSYS.  Some functions are actually named
11896     something starting with __ and the normal name is an alias.  */
11897 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11898 choke me
11899 #else
11900 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11901 #endif
11902
11903   ;
11904   return 0;
11905 }
11906 _ACEOF
11907 rm -f conftest.$ac_objext conftest$ac_exeext
11908 if { (eval echo "$as_me:11908: \"$ac_link\"") >&5
11909   (eval $ac_link) 2>&5
11910   ac_status=$?
11911   echo "$as_me:11911: \$? = $ac_status" >&5
11912   (exit $ac_status); } &&
11913          { ac_try='test -s conftest$ac_exeext'
11914   { (eval echo "$as_me:11914: \"$ac_try\"") >&5
11915   (eval $ac_try) 2>&5
11916   ac_status=$?
11917   echo "$as_me:11917: \$? = $ac_status" >&5
11918   (exit $ac_status); }; }; then
11919   ac_cv_func_pthread_kill=yes
11920 else
11921   echo "$as_me: failed program was:" >&5
11922 cat conftest.$ac_ext >&5
11923 ac_cv_func_pthread_kill=no
11924 fi
11925 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11926 fi
11927 echo "$as_me:11927: result: $ac_cv_func_pthread_kill" >&5
11928 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11929 if test $ac_cv_func_pthread_kill = yes; then
11930
11931                 echo "$as_me:11931: checking if you want to allow EINTR in wgetch with pthreads" >&5
11932 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11933
11934 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11935 if test "${enable_pthreads_eintr+set}" = set; then
11936   enableval="$enable_pthreads_eintr"
11937   use_pthreads_eintr=$enableval
11938 else
11939   use_pthreads_eintr=no
11940 fi;
11941                 echo "$as_me:11941: result: $use_pthreads_eintr" >&5
11942 echo "${ECHO_T}$use_pthreads_eintr" >&6
11943                 if test "x$use_pthreads_eintr" = xyes ; then
11944
11945 cat >>confdefs.h <<\EOF
11946 #define USE_PTHREADS_EINTR 1
11947 EOF
11948
11949                 fi
11950 fi
11951
11952         echo "$as_me:11952: checking if you want to use weak-symbols for pthreads" >&5
11953 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11954
11955 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11956 if test "${enable_weak_symbols+set}" = set; then
11957   enableval="$enable_weak_symbols"
11958   use_weak_symbols=$enableval
11959 else
11960   use_weak_symbols=no
11961 fi;
11962         echo "$as_me:11962: result: $use_weak_symbols" >&5
11963 echo "${ECHO_T}$use_weak_symbols" >&6
11964         if test "x$use_weak_symbols" = xyes ; then
11965
11966 echo "$as_me:11966: checking if $CC supports weak symbols" >&5
11967 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11968 if test "${cf_cv_weak_symbols+set}" = set; then
11969   echo $ECHO_N "(cached) $ECHO_C" >&6
11970 else
11971
11972 cat >conftest.$ac_ext <<_ACEOF
11973 #line 11973 "configure"
11974 #include "confdefs.h"
11975
11976 #include <stdio.h>
11977 int
11978 main ()
11979 {
11980
11981 #if defined(__GNUC__)
11982 #  if defined __USE_ISOC99
11983 #    define _cat_pragma(exp)    _Pragma(#exp)
11984 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11985 #  else
11986 #    define _weak_pragma(exp)
11987 #  endif
11988 #  define _declare(name)        __extension__ extern __typeof__(name) name
11989 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11990 #endif
11991
11992 weak_symbol(fopen);
11993
11994   ;
11995   return 0;
11996 }
11997 _ACEOF
11998 rm -f conftest.$ac_objext
11999 if { (eval echo "$as_me:11999: \"$ac_compile\"") >&5
12000   (eval $ac_compile) 2>&5
12001   ac_status=$?
12002   echo "$as_me:12002: \$? = $ac_status" >&5
12003   (exit $ac_status); } &&
12004          { ac_try='test -s conftest.$ac_objext'
12005   { (eval echo "$as_me:12005: \"$ac_try\"") >&5
12006   (eval $ac_try) 2>&5
12007   ac_status=$?
12008   echo "$as_me:12008: \$? = $ac_status" >&5
12009   (exit $ac_status); }; }; then
12010   cf_cv_weak_symbols=yes
12011 else
12012   echo "$as_me: failed program was:" >&5
12013 cat conftest.$ac_ext >&5
12014 cf_cv_weak_symbols=no
12015 fi
12016 rm -f conftest.$ac_objext conftest.$ac_ext
12017
12018 fi
12019 echo "$as_me:12019: result: $cf_cv_weak_symbols" >&5
12020 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12021
12022         else
12023                 cf_cv_weak_symbols=no
12024         fi
12025
12026         if test "x$cf_cv_weak_symbols" = xyes ; then
12027
12028 cat >>confdefs.h <<\EOF
12029 #define USE_WEAK_SYMBOLS 1
12030 EOF
12031
12032         fi
12033 fi
12034
12035 PTHREAD=
12036 if test "x$with_pthread" = "xyes" ; then
12037
12038 cat >>confdefs.h <<\EOF
12039 #define USE_PTHREADS 1
12040 EOF
12041
12042     enable_reentrant=yes
12043     if test "x$cf_cv_weak_symbols" = xyes ; then
12044         PTHREAD=-lpthread
12045     fi
12046 fi
12047
12048 # Reentrant code has to be opaque; there's little advantage to making ncurses
12049 # opaque outside of that, so there is no --enable-opaque option.  We can use
12050 # this option without --with-pthreads, but this will be always set for
12051 # pthreads.
12052 echo "$as_me:12052: checking if you want experimental reentrant code" >&5
12053 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12054
12055 # Check whether --enable-reentrant or --disable-reentrant was given.
12056 if test "${enable_reentrant+set}" = set; then
12057   enableval="$enable_reentrant"
12058   with_reentrant=$enableval
12059 else
12060   with_reentrant=no
12061 fi;
12062 echo "$as_me:12062: result: $with_reentrant" >&5
12063 echo "${ECHO_T}$with_reentrant" >&6
12064 if test "x$with_reentrant" = xyes ; then
12065         cf_cv_enable_reentrant=1
12066         cf_cv_enable_opaque="NCURSES_INTERNALS"
12067         NCURSES_OPAQUE=1
12068         NCURSES_SIZE_T=int
12069         if test "x$cf_cv_weak_symbols" = xyes ; then
12070
12071 # remove pthread library from $LIBS
12072 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12073
12074                 TEST_LIBS="-lpthread $TEST_LIBS"
12075                 TEST_LIBS2="-lpthread $TEST_LIBS2"
12076         else
12077                 # when not using weak symbols but with_reentrant,
12078                 # add 't' to the library suffix on all platforms
12079                 # except cygwin, where we only do that if ALSO
12080                 # compiling with full thread support.
12081                 case "$host" in
12082                 *cygwin* | *msys*)
12083                         if test "$with_pthread" = "yes" ; then
12084                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12085                         fi ;;
12086                 * ) LIB_SUFFIX="t${LIB_SUFFIX}" ;;
12087                 esac
12088         fi
12089
12090 cat >>confdefs.h <<\EOF
12091 #define USE_REENTRANT 1
12092 EOF
12093
12094 if test "${with_abi_version+set}" != set; then
12095         case $cf_cv_rel_version in
12096         5.*)
12097                 cf_cv_rel_version=6.0
12098                 cf_cv_abi_version=6
12099                 { echo "$as_me:12099: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12100 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12101                 ;;
12102         esac
12103 fi
12104
12105 else
12106         cf_cv_enable_reentrant=0
12107         cf_cv_enable_opaque="NCURSES_OPAQUE"
12108         NCURSES_OPAQUE=0
12109         NCURSES_SIZE_T=short
12110 fi
12111
12112 ### Allow using a different wrap-prefix
12113 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12114         echo "$as_me:12114: checking for prefix used to wrap public variables" >&5
12115 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12116
12117 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12118 if test "${with_wrap_prefix+set}" = set; then
12119   withval="$with_wrap_prefix"
12120   NCURSES_WRAP_PREFIX=$withval
12121 else
12122   NCURSES_WRAP_PREFIX=_nc_
12123 fi;
12124         echo "$as_me:12124: result: $NCURSES_WRAP_PREFIX" >&5
12125 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12126 else
12127         NCURSES_WRAP_PREFIX=_nc_
12128 fi
12129
12130 cat >>confdefs.h <<EOF
12131 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12132 EOF
12133
12134 echo "$as_me:12134: checking if you want experimental safe-sprintf code" >&5
12135 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12136
12137 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12138 if test "${enable_safe_sprintf+set}" = set; then
12139   enableval="$enable_safe_sprintf"
12140   with_safe_sprintf=$enableval
12141 else
12142   with_safe_sprintf=no
12143 fi;
12144 echo "$as_me:12144: result: $with_safe_sprintf" >&5
12145 echo "${ECHO_T}$with_safe_sprintf" >&6
12146 test "x$with_safe_sprintf" = xyes &&
12147 cat >>confdefs.h <<\EOF
12148 #define USE_SAFE_SPRINTF 1
12149 EOF
12150
12151 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12152 # when hashmap is used scroll hints are useless
12153 if test "$with_hashmap" = no ; then
12154 echo "$as_me:12154: checking if you want to experiment without scrolling-hints code" >&5
12155 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12156
12157 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12158 if test "${enable_scroll_hints+set}" = set; then
12159   enableval="$enable_scroll_hints"
12160   with_scroll_hints=$enableval
12161 else
12162   with_scroll_hints=yes
12163 fi;
12164 echo "$as_me:12164: result: $with_scroll_hints" >&5
12165 echo "${ECHO_T}$with_scroll_hints" >&6
12166 test "x$with_scroll_hints" = xyes &&
12167 cat >>confdefs.h <<\EOF
12168 #define USE_SCROLL_HINTS 1
12169 EOF
12170
12171 fi
12172
12173 echo "$as_me:12173: checking if you want experimental wgetch-events code" >&5
12174 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12175
12176 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12177 if test "${enable_wgetch_events+set}" = set; then
12178   enableval="$enable_wgetch_events"
12179   with_wgetch_events=$enableval
12180 else
12181   with_wgetch_events=no
12182 fi;
12183 echo "$as_me:12183: result: $with_wgetch_events" >&5
12184 echo "${ECHO_T}$with_wgetch_events" >&6
12185 test "x$with_wgetch_events" = xyes &&
12186 cat >>confdefs.h <<\EOF
12187 #define NCURSES_WGETCH_EVENTS 1
12188 EOF
12189
12190 ###############################################################################
12191
12192 ###     use option --disable-echo to suppress full display compiling commands
12193
12194 echo "$as_me:12194: checking if you want to see long compiling messages" >&5
12195 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12196
12197 # Check whether --enable-echo or --disable-echo was given.
12198 if test "${enable_echo+set}" = set; then
12199   enableval="$enable_echo"
12200   test "$enableval" != no && enableval=yes
12201   if test "$enableval" != "yes" ; then
12202
12203     ECHO_LT='--silent'
12204     ECHO_LD='@echo linking $@;'
12205     RULE_CC='@echo compiling $<'
12206     SHOW_CC='@echo compiling $@'
12207     ECHO_CC='@'
12208
12209   else
12210
12211     ECHO_LT=''
12212     ECHO_LD=''
12213     RULE_CC=''
12214     SHOW_CC=''
12215     ECHO_CC=''
12216
12217   fi
12218 else
12219   enableval=yes
12220
12221     ECHO_LT=''
12222     ECHO_LD=''
12223     RULE_CC=''
12224     SHOW_CC=''
12225     ECHO_CC=''
12226
12227 fi;
12228 echo "$as_me:12228: result: $enableval" >&5
12229 echo "${ECHO_T}$enableval" >&6
12230
12231 if test "x$enable_echo" = xyes; then
12232         ECHO_LINK=
12233 else
12234         ECHO_LINK='@ echo linking $@ ... ;'
12235         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12236         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12237 fi
12238
12239 ###     use option --enable-warnings to turn on all gcc warnings
12240 echo "$as_me:12240: checking if you want to see compiler warnings" >&5
12241 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12242
12243 # Check whether --enable-warnings or --disable-warnings was given.
12244 if test "${enable_warnings+set}" = set; then
12245   enableval="$enable_warnings"
12246   with_warnings=$enableval
12247 fi;
12248 echo "$as_me:12248: result: $with_warnings" >&5
12249 echo "${ECHO_T}$with_warnings" >&6
12250
12251 if test "x$with_warnings" = "xyes"; then
12252
12253         ADAFLAGS="$ADAFLAGS -gnatg"
12254
12255 INTEL_COMPILER=no
12256
12257 if test "$GCC" = yes ; then
12258         case $host_os in
12259         linux*|gnu*)
12260                 echo "$as_me:12260: checking if this is really Intel C compiler" >&5
12261 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12262                 cf_save_CFLAGS="$CFLAGS"
12263                 CFLAGS="$CFLAGS -no-gcc"
12264                 cat >conftest.$ac_ext <<_ACEOF
12265 #line 12265 "configure"
12266 #include "confdefs.h"
12267
12268 int
12269 main ()
12270 {
12271
12272 #ifdef __INTEL_COMPILER
12273 #else
12274 make an error
12275 #endif
12276
12277   ;
12278   return 0;
12279 }
12280 _ACEOF
12281 rm -f conftest.$ac_objext
12282 if { (eval echo "$as_me:12282: \"$ac_compile\"") >&5
12283   (eval $ac_compile) 2>&5
12284   ac_status=$?
12285   echo "$as_me:12285: \$? = $ac_status" >&5
12286   (exit $ac_status); } &&
12287          { ac_try='test -s conftest.$ac_objext'
12288   { (eval echo "$as_me:12288: \"$ac_try\"") >&5
12289   (eval $ac_try) 2>&5
12290   ac_status=$?
12291   echo "$as_me:12291: \$? = $ac_status" >&5
12292   (exit $ac_status); }; }; then
12293   INTEL_COMPILER=yes
12294 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12295
12296 else
12297   echo "$as_me: failed program was:" >&5
12298 cat conftest.$ac_ext >&5
12299 fi
12300 rm -f conftest.$ac_objext conftest.$ac_ext
12301                 CFLAGS="$cf_save_CFLAGS"
12302                 echo "$as_me:12302: result: $INTEL_COMPILER" >&5
12303 echo "${ECHO_T}$INTEL_COMPILER" >&6
12304                 ;;
12305         esac
12306 fi
12307
12308 CLANG_COMPILER=no
12309
12310 if test "$GCC" = yes ; then
12311         echo "$as_me:12311: checking if this is really Clang C compiler" >&5
12312 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12313         cf_save_CFLAGS="$CFLAGS"
12314         CFLAGS="$CFLAGS -Qunused-arguments"
12315         cat >conftest.$ac_ext <<_ACEOF
12316 #line 12316 "configure"
12317 #include "confdefs.h"
12318
12319 int
12320 main ()
12321 {
12322
12323 #ifdef __clang__
12324 #else
12325 make an error
12326 #endif
12327
12328   ;
12329   return 0;
12330 }
12331 _ACEOF
12332 rm -f conftest.$ac_objext
12333 if { (eval echo "$as_me:12333: \"$ac_compile\"") >&5
12334   (eval $ac_compile) 2>&5
12335   ac_status=$?
12336   echo "$as_me:12336: \$? = $ac_status" >&5
12337   (exit $ac_status); } &&
12338          { ac_try='test -s conftest.$ac_objext'
12339   { (eval echo "$as_me:12339: \"$ac_try\"") >&5
12340   (eval $ac_try) 2>&5
12341   ac_status=$?
12342   echo "$as_me:12342: \$? = $ac_status" >&5
12343   (exit $ac_status); }; }; then
12344   CLANG_COMPILER=yes
12345 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12346
12347 else
12348   echo "$as_me: failed program was:" >&5
12349 cat conftest.$ac_ext >&5
12350 fi
12351 rm -f conftest.$ac_objext conftest.$ac_ext
12352         CFLAGS="$cf_save_CFLAGS"
12353         echo "$as_me:12353: result: $CLANG_COMPILER" >&5
12354 echo "${ECHO_T}$CLANG_COMPILER" >&6
12355 fi
12356
12357 cat > conftest.$ac_ext <<EOF
12358 #line 12358 "${as_me:-configure}"
12359 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12360 EOF
12361
12362 if test "$INTEL_COMPILER" = yes
12363 then
12364 # The "-wdXXX" options suppress warnings:
12365 # remark #1419: external declaration in primary source file
12366 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12367 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12368 # remark #193: zero used for undefined preprocessing identifier
12369 # remark #593: variable "curs_sb_left_arrow" was set but never used
12370 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12371 # remark #869: parameter "tw" was never referenced
12372 # remark #981: operands are evaluated in unspecified order
12373 # warning #279: controlling expression is constant
12374
12375         { echo "$as_me:12375: checking for $CC warning options..." >&5
12376 echo "$as_me: checking for $CC warning options..." >&6;}
12377         cf_save_CFLAGS="$CFLAGS"
12378         EXTRA_CFLAGS="-Wall"
12379         for cf_opt in \
12380                 wd1419 \
12381                 wd1683 \
12382                 wd1684 \
12383                 wd193 \
12384                 wd593 \
12385                 wd279 \
12386                 wd810 \
12387                 wd869 \
12388                 wd981
12389         do
12390                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12391                 if { (eval echo "$as_me:12391: \"$ac_compile\"") >&5
12392   (eval $ac_compile) 2>&5
12393   ac_status=$?
12394   echo "$as_me:12394: \$? = $ac_status" >&5
12395   (exit $ac_status); }; then
12396                         test -n "$verbose" && echo "$as_me:12396: result: ... -$cf_opt" >&5
12397 echo "${ECHO_T}... -$cf_opt" >&6
12398                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12399                 fi
12400         done
12401         CFLAGS="$cf_save_CFLAGS"
12402
12403 elif test "$GCC" = yes
12404 then
12405         { echo "$as_me:12405: checking for $CC warning options..." >&5
12406 echo "$as_me: checking for $CC warning options..." >&6;}
12407         cf_save_CFLAGS="$CFLAGS"
12408         EXTRA_CFLAGS=
12409         cf_warn_CONST=""
12410         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12411         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12412         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12413         for cf_opt in W Wall \
12414                 Wbad-function-cast \
12415                 Wcast-align \
12416                 Wcast-qual \
12417                 Wdeclaration-after-statement \
12418                 Wextra \
12419                 Winline \
12420                 Wmissing-declarations \
12421                 Wmissing-prototypes \
12422                 Wnested-externs \
12423                 Wpointer-arith \
12424                 Wshadow \
12425                 Wstrict-prototypes \
12426                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
12427         do
12428                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12429                 if { (eval echo "$as_me:12429: \"$ac_compile\"") >&5
12430   (eval $ac_compile) 2>&5
12431   ac_status=$?
12432   echo "$as_me:12432: \$? = $ac_status" >&5
12433   (exit $ac_status); }; then
12434                         test -n "$verbose" && echo "$as_me:12434: result: ... -$cf_opt" >&5
12435 echo "${ECHO_T}... -$cf_opt" >&6
12436                         case $cf_opt in #(vi
12437                         Wcast-qual) #(vi
12438                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12439                                 ;;
12440                         Winline) #(vi
12441                                 case $GCC_VERSION in
12442                                 [34].*)
12443                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12444
12445 echo "${as_me:-configure}:12445: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12446
12447                                         continue;;
12448                                 esac
12449                                 ;;
12450                         Wpointer-arith) #(vi
12451                                 case $GCC_VERSION in
12452                                 [12].*)
12453                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12454
12455 echo "${as_me:-configure}:12455: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12456
12457                                         continue;;
12458                                 esac
12459                                 ;;
12460                         esac
12461                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12462                 fi
12463         done
12464         CFLAGS="$cf_save_CFLAGS"
12465 fi
12466 rm -rf conftest*
12467
12468         if test "x$cf_with_cxx" = xyes ; then
12469
12470 INTEL_CPLUSPLUS=no
12471
12472 if test "$GCC" = yes ; then
12473         case $host_os in
12474         linux*|gnu*)
12475                 echo "$as_me:12475: checking if this is really Intel C++ compiler" >&5
12476 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12477                 cf_save_CFLAGS="$CXXFLAGS"
12478                 CXXFLAGS="$CXXFLAGS -no-gcc"
12479                 cat >conftest.$ac_ext <<_ACEOF
12480 #line 12480 "configure"
12481 #include "confdefs.h"
12482
12483 int
12484 main ()
12485 {
12486
12487 #ifdef __INTEL_COMPILER
12488 #else
12489 make an error
12490 #endif
12491
12492   ;
12493   return 0;
12494 }
12495 _ACEOF
12496 rm -f conftest.$ac_objext
12497 if { (eval echo "$as_me:12497: \"$ac_compile\"") >&5
12498   (eval $ac_compile) 2>&5
12499   ac_status=$?
12500   echo "$as_me:12500: \$? = $ac_status" >&5
12501   (exit $ac_status); } &&
12502          { ac_try='test -s conftest.$ac_objext'
12503   { (eval echo "$as_me:12503: \"$ac_try\"") >&5
12504   (eval $ac_try) 2>&5
12505   ac_status=$?
12506   echo "$as_me:12506: \$? = $ac_status" >&5
12507   (exit $ac_status); }; }; then
12508   INTEL_CPLUSPLUS=yes
12509 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12510
12511 else
12512   echo "$as_me: failed program was:" >&5
12513 cat conftest.$ac_ext >&5
12514 fi
12515 rm -f conftest.$ac_objext conftest.$ac_ext
12516                 CXXFLAGS="$cf_save_CFLAGS"
12517                 echo "$as_me:12517: result: $INTEL_CPLUSPLUS" >&5
12518 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12519                 ;;
12520         esac
12521 fi
12522
12523 CLANG_CPLUSPLUS=no
12524
12525 if test "$GCC" = yes ; then
12526         echo "$as_me:12526: checking if this is really Clang C++ compiler" >&5
12527 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12528         cf_save_CFLAGS="$CXXFLAGS"
12529         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12530         cat >conftest.$ac_ext <<_ACEOF
12531 #line 12531 "configure"
12532 #include "confdefs.h"
12533
12534 int
12535 main ()
12536 {
12537
12538 #ifdef __clang__
12539 #else
12540 make an error
12541 #endif
12542
12543   ;
12544   return 0;
12545 }
12546 _ACEOF
12547 rm -f conftest.$ac_objext
12548 if { (eval echo "$as_me:12548: \"$ac_compile\"") >&5
12549   (eval $ac_compile) 2>&5
12550   ac_status=$?
12551   echo "$as_me:12551: \$? = $ac_status" >&5
12552   (exit $ac_status); } &&
12553          { ac_try='test -s conftest.$ac_objext'
12554   { (eval echo "$as_me:12554: \"$ac_try\"") >&5
12555   (eval $ac_try) 2>&5
12556   ac_status=$?
12557   echo "$as_me:12557: \$? = $ac_status" >&5
12558   (exit $ac_status); }; }; then
12559   CLANG_CPLUSPLUS=yes
12560 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12561
12562 else
12563   echo "$as_me: failed program was:" >&5
12564 cat conftest.$ac_ext >&5
12565 fi
12566 rm -f conftest.$ac_objext conftest.$ac_ext
12567         CXXFLAGS="$cf_save_CFLAGS"
12568         echo "$as_me:12568: result: $CLANG_CPLUSPLUS" >&5
12569 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12570 fi
12571
12572 ac_ext=cc
12573 ac_cpp='$CXXCPP $CPPFLAGS'
12574 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12575 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12576 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12577 ac_main_return=return
12578
12579 cat > conftest.$ac_ext <<EOF
12580 #line 12580 "configure"
12581 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12582 EOF
12583
12584 if test "$INTEL_CPLUSPLUS" = yes
12585 then
12586 # The "-wdXXX" options suppress warnings:
12587 # remark #1419: external declaration in primary source file
12588 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12589 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12590 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12591 # remark #193: zero used for undefined preprocessing identifier
12592 # remark #593: variable "curs_sb_left_arrow" was set but never used
12593 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12594 # remark #869: parameter "tw" was never referenced
12595 # remark #981: operands are evaluated in unspecified order
12596 # warning #269: invalid format string conversion
12597
12598         { echo "$as_me:12598: checking for $CC warning options..." >&5
12599 echo "$as_me: checking for $CC warning options..." >&6;}
12600         cf_save_CXXFLAGS="$CXXFLAGS"
12601         EXTRA_CXXFLAGS="-Wall"
12602         for cf_opt in \
12603                 wd1419 \
12604                 wd1682 \
12605                 wd1683 \
12606                 wd1684 \
12607                 wd193 \
12608                 wd279 \
12609                 wd593 \
12610                 wd810 \
12611                 wd869 \
12612                 wd981
12613         do
12614                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12615                 if { (eval echo "$as_me:12615: \"$ac_compile\"") >&5
12616   (eval $ac_compile) 2>&5
12617   ac_status=$?
12618   echo "$as_me:12618: \$? = $ac_status" >&5
12619   (exit $ac_status); }; then
12620                         test -n "$verbose" && echo "$as_me:12620: result: ... -$cf_opt" >&5
12621 echo "${ECHO_T}... -$cf_opt" >&6
12622                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12623                 fi
12624         done
12625         CXXFLAGS="$cf_save_CXXFLAGS"
12626
12627 elif test "$GXX" = yes
12628 then
12629         { echo "$as_me:12629: checking for $CXX warning options..." >&5
12630 echo "$as_me: checking for $CXX warning options..." >&6;}
12631         cf_save_CXXFLAGS="$CXXFLAGS"
12632         EXTRA_CXXFLAGS="-W -Wall"
12633         cf_gxx_extra_warnings=""
12634         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12635         case "$GCC_VERSION" in
12636         [1-2].*)
12637                 ;;
12638         *)
12639                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12640                 ;;
12641         esac
12642         for cf_opt in \
12643                 Wabi \
12644                 fabi-version=0 \
12645                 Wextra \
12646                 Wignored-qualifiers \
12647                 Wlogical-op \
12648                 Woverloaded-virtual \
12649                 Wsign-promo \
12650                 Wsynth \
12651                 Wold-style-cast \
12652                 Wcast-align \
12653                 Wcast-qual \
12654                 Wpointer-arith \
12655                 Wshadow \
12656                 Wundef $cf_gxx_extra_warnings Wno-unused
12657         do
12658                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12659                 if { (eval echo "$as_me:12659: \"$ac_compile\"") >&5
12660   (eval $ac_compile) 2>&5
12661   ac_status=$?
12662   echo "$as_me:12662: \$? = $ac_status" >&5
12663   (exit $ac_status); }; then
12664                         test -n "$verbose" && echo "$as_me:12664: result: ... -$cf_opt" >&5
12665 echo "${ECHO_T}... -$cf_opt" >&6
12666                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12667                 else
12668                         test -n "$verbose" && echo "$as_me:12668: result: ... no -$cf_opt" >&5
12669 echo "${ECHO_T}... no -$cf_opt" >&6
12670                 fi
12671         done
12672         CXXFLAGS="$cf_save_CXXFLAGS"
12673 fi
12674
12675 rm -rf conftest*
12676 ac_ext=c
12677 ac_cpp='$CPP $CPPFLAGS'
12678 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12679 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12680 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12681 ac_main_return=return
12682
12683         fi
12684 fi
12685
12686 if test "$GCC" = yes
12687 then
12688 cat > conftest.i <<EOF
12689 #ifndef GCC_PRINTF
12690 #define GCC_PRINTF 0
12691 #endif
12692 #ifndef GCC_SCANF
12693 #define GCC_SCANF 0
12694 #endif
12695 #ifndef GCC_NORETURN
12696 #define GCC_NORETURN /* nothing */
12697 #endif
12698 #ifndef GCC_UNUSED
12699 #define GCC_UNUSED /* nothing */
12700 #endif
12701 EOF
12702 if test "$GCC" = yes
12703 then
12704         { echo "$as_me:12704: checking for $CC __attribute__ directives..." >&5
12705 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12706 cat > conftest.$ac_ext <<EOF
12707 #line 12707 "${as_me:-configure}"
12708 #include "confdefs.h"
12709 #include "conftest.h"
12710 #include "conftest.i"
12711 #if     GCC_PRINTF
12712 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12713 #else
12714 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12715 #endif
12716 #if     GCC_SCANF
12717 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12718 #else
12719 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12720 #endif
12721 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12722 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12723 extern void foo(void) GCC_NORETURN;
12724 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12725 EOF
12726         cf_printf_attribute=no
12727         cf_scanf_attribute=no
12728         for cf_attribute in scanf printf unused noreturn
12729         do
12730
12731 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12732
12733                 cf_directive="__attribute__(($cf_attribute))"
12734                 echo "checking for $CC $cf_directive" 1>&5
12735
12736                 case $cf_attribute in #(vi
12737                 printf) #(vi
12738                         cf_printf_attribute=yes
12739                         cat >conftest.h <<EOF
12740 #define GCC_$cf_ATTRIBUTE 1
12741 EOF
12742                         ;;
12743                 scanf) #(vi
12744                         cf_scanf_attribute=yes
12745                         cat >conftest.h <<EOF
12746 #define GCC_$cf_ATTRIBUTE 1
12747 EOF
12748                         ;;
12749                 *) #(vi
12750                         cat >conftest.h <<EOF
12751 #define GCC_$cf_ATTRIBUTE $cf_directive
12752 EOF
12753                         ;;
12754                 esac
12755
12756                 if { (eval echo "$as_me:12756: \"$ac_compile\"") >&5
12757   (eval $ac_compile) 2>&5
12758   ac_status=$?
12759   echo "$as_me:12759: \$? = $ac_status" >&5
12760   (exit $ac_status); }; then
12761                         test -n "$verbose" && echo "$as_me:12761: result: ... $cf_attribute" >&5
12762 echo "${ECHO_T}... $cf_attribute" >&6
12763                         cat conftest.h >>confdefs.h
12764                         case $cf_attribute in #(vi
12765                         noreturn) #(vi
12766
12767 cat >>confdefs.h <<EOF
12768 #define GCC_NORETURN $cf_directive
12769 EOF
12770
12771                                 ;;
12772                         printf) #(vi
12773                                 cf_value='/* nothing */'
12774                                 if test "$cf_printf_attribute" != no ; then
12775                                         cf_value='__attribute__((format(printf,fmt,var)))'
12776
12777 cat >>confdefs.h <<\EOF
12778 #define GCC_PRINTF 1
12779 EOF
12780
12781                                 fi
12782
12783 cat >>confdefs.h <<EOF
12784 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12785 EOF
12786
12787                                 ;;
12788                         scanf) #(vi
12789                                 cf_value='/* nothing */'
12790                                 if test "$cf_scanf_attribute" != no ; then
12791                                         cf_value='__attribute__((format(scanf,fmt,var)))'
12792
12793 cat >>confdefs.h <<\EOF
12794 #define GCC_SCANF 1
12795 EOF
12796
12797                                 fi
12798
12799 cat >>confdefs.h <<EOF
12800 #define GCC_SCANFLIKE(fmt,var) $cf_value
12801 EOF
12802
12803                                 ;;
12804                         unused) #(vi
12805
12806 cat >>confdefs.h <<EOF
12807 #define GCC_UNUSED $cf_directive
12808 EOF
12809
12810                                 ;;
12811                         esac
12812                 fi
12813         done
12814 else
12815         fgrep define conftest.i >>confdefs.h
12816 fi
12817 rm -rf conftest*
12818 fi
12819
12820 echo "$as_me:12820: checking if you want to work around bogus compiler/loader warnings" >&5
12821 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12822
12823 # Check whether --enable-string-hacks or --disable-string-hacks was given.
12824 if test "${enable_string_hacks+set}" = set; then
12825   enableval="$enable_string_hacks"
12826   with_string_hacks=$enableval
12827 else
12828   with_string_hacks=no
12829 fi;
12830 echo "$as_me:12830: result: $with_string_hacks" >&5
12831 echo "${ECHO_T}$with_string_hacks" >&6
12832
12833 if test "x$with_string_hacks" = "xyes"; then
12834
12835 cat >>confdefs.h <<\EOF
12836 #define USE_STRING_HACKS 1
12837 EOF
12838
12839         { echo "$as_me:12839: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
12840 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
12841
12842 for ac_func in strlcat strlcpy snprintf
12843 do
12844 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12845 echo "$as_me:12845: checking for $ac_func" >&5
12846 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12847 if eval "test \"\${$as_ac_var+set}\" = set"; then
12848   echo $ECHO_N "(cached) $ECHO_C" >&6
12849 else
12850   cat >conftest.$ac_ext <<_ACEOF
12851 #line 12851 "configure"
12852 #include "confdefs.h"
12853 /* System header to define __stub macros and hopefully few prototypes,
12854     which can conflict with char $ac_func (); below.  */
12855 #include <assert.h>
12856 /* Override any gcc2 internal prototype to avoid an error.  */
12857 #ifdef __cplusplus
12858 extern "C"
12859 #endif
12860 /* We use char because int might match the return type of a gcc2
12861    builtin and then its argument prototype would still apply.  */
12862 char $ac_func ();
12863 char (*f) ();
12864
12865 int
12866 main ()
12867 {
12868 /* The GNU C library defines this for functions which it implements
12869     to always fail with ENOSYS.  Some functions are actually named
12870     something starting with __ and the normal name is an alias.  */
12871 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12872 choke me
12873 #else
12874 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12875 #endif
12876
12877   ;
12878   return 0;
12879 }
12880 _ACEOF
12881 rm -f conftest.$ac_objext conftest$ac_exeext
12882 if { (eval echo "$as_me:12882: \"$ac_link\"") >&5
12883   (eval $ac_link) 2>&5
12884   ac_status=$?
12885   echo "$as_me:12885: \$? = $ac_status" >&5
12886   (exit $ac_status); } &&
12887          { ac_try='test -s conftest$ac_exeext'
12888   { (eval echo "$as_me:12888: \"$ac_try\"") >&5
12889   (eval $ac_try) 2>&5
12890   ac_status=$?
12891   echo "$as_me:12891: \$? = $ac_status" >&5
12892   (exit $ac_status); }; }; then
12893   eval "$as_ac_var=yes"
12894 else
12895   echo "$as_me: failed program was:" >&5
12896 cat conftest.$ac_ext >&5
12897 eval "$as_ac_var=no"
12898 fi
12899 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12900 fi
12901 echo "$as_me:12901: result: `eval echo '${'$as_ac_var'}'`" >&5
12902 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12903 if test `eval echo '${'$as_ac_var'}'` = yes; then
12904   cat >>confdefs.h <<EOF
12905 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12906 EOF
12907
12908 fi
12909 done
12910
12911 fi
12912
12913 ###     use option --enable-assertions to turn on generation of assertion code
12914 echo "$as_me:12914: checking if you want to enable runtime assertions" >&5
12915 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12916
12917 # Check whether --enable-assertions or --disable-assertions was given.
12918 if test "${enable_assertions+set}" = set; then
12919   enableval="$enable_assertions"
12920   with_assertions=$enableval
12921 else
12922   with_assertions=no
12923 fi;
12924 echo "$as_me:12924: result: $with_assertions" >&5
12925 echo "${ECHO_T}$with_assertions" >&6
12926 if test -n "$GCC"
12927 then
12928         if test "$with_assertions" = no
12929         then
12930                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12931         else
12932
12933         ADAFLAGS="$ADAFLAGS -gnata"
12934
12935         fi
12936 fi
12937
12938 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12939
12940 echo "$as_me:12940: checking if you want to use dmalloc for testing" >&5
12941 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12942
12943 # Check whether --with-dmalloc or --without-dmalloc was given.
12944 if test "${with_dmalloc+set}" = set; then
12945   withval="$with_dmalloc"
12946
12947 cat >>confdefs.h <<EOF
12948 #define USE_DMALLOC 1
12949 EOF
12950
12951         : ${with_cflags:=-g}
12952         : ${with_no_leaks:=yes}
12953          with_dmalloc=yes
12954 else
12955   with_dmalloc=
12956 fi;
12957 echo "$as_me:12957: result: ${with_dmalloc:-no}" >&5
12958 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12959
12960 case .$with_cflags in #(vi
12961 .*-g*)
12962         case .$CFLAGS in #(vi
12963         .*-g*) #(vi
12964                 ;;
12965         *)
12966
12967 cf_fix_cppflags=no
12968 cf_new_cflags=
12969 cf_new_cppflags=
12970 cf_new_extra_cppflags=
12971
12972 for cf_add_cflags in -g
12973 do
12974 case $cf_fix_cppflags in
12975 no)
12976         case $cf_add_cflags in #(vi
12977         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12978                 case $cf_add_cflags in
12979                 -D*)
12980                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12981
12982                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12983                                 && test -z "${cf_tst_cflags}" \
12984                                 && cf_fix_cppflags=yes
12985
12986                         if test $cf_fix_cppflags = yes ; then
12987                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12988                                 continue
12989                         elif test "${cf_tst_cflags}" = "\"'" ; then
12990                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12991                                 continue
12992                         fi
12993                         ;;
12994                 esac
12995                 case "$CPPFLAGS" in
12996                 *$cf_add_cflags) #(vi
12997                         ;;
12998                 *) #(vi
12999                         case $cf_add_cflags in #(vi
13000                         -D*)
13001                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13002
13003 CPPFLAGS=`echo "$CPPFLAGS" | \
13004         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13005                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13006
13007                                 ;;
13008                         esac
13009                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13010                         ;;
13011                 esac
13012                 ;;
13013         *)
13014                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13015                 ;;
13016         esac
13017         ;;
13018 yes)
13019         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13020
13021         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13022
13023         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13024                 && test -z "${cf_tst_cflags}" \
13025                 && cf_fix_cppflags=no
13026         ;;
13027 esac
13028 done
13029
13030 if test -n "$cf_new_cflags" ; then
13031
13032         CFLAGS="$CFLAGS $cf_new_cflags"
13033 fi
13034
13035 if test -n "$cf_new_cppflags" ; then
13036
13037         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13038 fi
13039
13040 if test -n "$cf_new_extra_cppflags" ; then
13041
13042         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13043 fi
13044
13045                 ;;
13046         esac
13047         ;;
13048 esac
13049
13050 if test "$with_dmalloc" = yes ; then
13051         echo "$as_me:13051: checking for dmalloc.h" >&5
13052 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13053 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13054   echo $ECHO_N "(cached) $ECHO_C" >&6
13055 else
13056   cat >conftest.$ac_ext <<_ACEOF
13057 #line 13057 "configure"
13058 #include "confdefs.h"
13059 #include <dmalloc.h>
13060 _ACEOF
13061 if { (eval echo "$as_me:13061: \"$ac_cpp conftest.$ac_ext\"") >&5
13062   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13063   ac_status=$?
13064   egrep -v '^ *\+' conftest.er1 >conftest.err
13065   rm -f conftest.er1
13066   cat conftest.err >&5
13067   echo "$as_me:13067: \$? = $ac_status" >&5
13068   (exit $ac_status); } >/dev/null; then
13069   if test -s conftest.err; then
13070     ac_cpp_err=$ac_c_preproc_warn_flag
13071   else
13072     ac_cpp_err=
13073   fi
13074 else
13075   ac_cpp_err=yes
13076 fi
13077 if test -z "$ac_cpp_err"; then
13078   ac_cv_header_dmalloc_h=yes
13079 else
13080   echo "$as_me: failed program was:" >&5
13081   cat conftest.$ac_ext >&5
13082   ac_cv_header_dmalloc_h=no
13083 fi
13084 rm -f conftest.err conftest.$ac_ext
13085 fi
13086 echo "$as_me:13086: result: $ac_cv_header_dmalloc_h" >&5
13087 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13088 if test $ac_cv_header_dmalloc_h = yes; then
13089
13090 echo "$as_me:13090: checking for dmalloc_debug in -ldmalloc" >&5
13091 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13092 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13093   echo $ECHO_N "(cached) $ECHO_C" >&6
13094 else
13095   ac_check_lib_save_LIBS=$LIBS
13096 LIBS="-ldmalloc  $LIBS"
13097 cat >conftest.$ac_ext <<_ACEOF
13098 #line 13098 "configure"
13099 #include "confdefs.h"
13100
13101 /* Override any gcc2 internal prototype to avoid an error.  */
13102 #ifdef __cplusplus
13103 extern "C"
13104 #endif
13105 /* We use char because int might match the return type of a gcc2
13106    builtin and then its argument prototype would still apply.  */
13107 char dmalloc_debug ();
13108 int
13109 main ()
13110 {
13111 dmalloc_debug ();
13112   ;
13113   return 0;
13114 }
13115 _ACEOF
13116 rm -f conftest.$ac_objext conftest$ac_exeext
13117 if { (eval echo "$as_me:13117: \"$ac_link\"") >&5
13118   (eval $ac_link) 2>&5
13119   ac_status=$?
13120   echo "$as_me:13120: \$? = $ac_status" >&5
13121   (exit $ac_status); } &&
13122          { ac_try='test -s conftest$ac_exeext'
13123   { (eval echo "$as_me:13123: \"$ac_try\"") >&5
13124   (eval $ac_try) 2>&5
13125   ac_status=$?
13126   echo "$as_me:13126: \$? = $ac_status" >&5
13127   (exit $ac_status); }; }; then
13128   ac_cv_lib_dmalloc_dmalloc_debug=yes
13129 else
13130   echo "$as_me: failed program was:" >&5
13131 cat conftest.$ac_ext >&5
13132 ac_cv_lib_dmalloc_dmalloc_debug=no
13133 fi
13134 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13135 LIBS=$ac_check_lib_save_LIBS
13136 fi
13137 echo "$as_me:13137: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13138 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13139 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13140   cat >>confdefs.h <<EOF
13141 #define HAVE_LIBDMALLOC 1
13142 EOF
13143
13144   LIBS="-ldmalloc $LIBS"
13145
13146 fi
13147
13148 fi
13149
13150 fi
13151
13152 echo "$as_me:13152: checking if you want to use dbmalloc for testing" >&5
13153 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13154
13155 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13156 if test "${with_dbmalloc+set}" = set; then
13157   withval="$with_dbmalloc"
13158
13159 cat >>confdefs.h <<EOF
13160 #define USE_DBMALLOC 1
13161 EOF
13162
13163         : ${with_cflags:=-g}
13164         : ${with_no_leaks:=yes}
13165          with_dbmalloc=yes
13166 else
13167   with_dbmalloc=
13168 fi;
13169 echo "$as_me:13169: result: ${with_dbmalloc:-no}" >&5
13170 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13171
13172 case .$with_cflags in #(vi
13173 .*-g*)
13174         case .$CFLAGS in #(vi
13175         .*-g*) #(vi
13176                 ;;
13177         *)
13178
13179 cf_fix_cppflags=no
13180 cf_new_cflags=
13181 cf_new_cppflags=
13182 cf_new_extra_cppflags=
13183
13184 for cf_add_cflags in -g
13185 do
13186 case $cf_fix_cppflags in
13187 no)
13188         case $cf_add_cflags in #(vi
13189         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13190                 case $cf_add_cflags in
13191                 -D*)
13192                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13193
13194                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13195                                 && test -z "${cf_tst_cflags}" \
13196                                 && cf_fix_cppflags=yes
13197
13198                         if test $cf_fix_cppflags = yes ; then
13199                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13200                                 continue
13201                         elif test "${cf_tst_cflags}" = "\"'" ; then
13202                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13203                                 continue
13204                         fi
13205                         ;;
13206                 esac
13207                 case "$CPPFLAGS" in
13208                 *$cf_add_cflags) #(vi
13209                         ;;
13210                 *) #(vi
13211                         case $cf_add_cflags in #(vi
13212                         -D*)
13213                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13214
13215 CPPFLAGS=`echo "$CPPFLAGS" | \
13216         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13217                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13218
13219                                 ;;
13220                         esac
13221                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13222                         ;;
13223                 esac
13224                 ;;
13225         *)
13226                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13227                 ;;
13228         esac
13229         ;;
13230 yes)
13231         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13232
13233         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13234
13235         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13236                 && test -z "${cf_tst_cflags}" \
13237                 && cf_fix_cppflags=no
13238         ;;
13239 esac
13240 done
13241
13242 if test -n "$cf_new_cflags" ; then
13243
13244         CFLAGS="$CFLAGS $cf_new_cflags"
13245 fi
13246
13247 if test -n "$cf_new_cppflags" ; then
13248
13249         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13250 fi
13251
13252 if test -n "$cf_new_extra_cppflags" ; then
13253
13254         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13255 fi
13256
13257                 ;;
13258         esac
13259         ;;
13260 esac
13261
13262 if test "$with_dbmalloc" = yes ; then
13263         echo "$as_me:13263: checking for dbmalloc.h" >&5
13264 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13265 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13266   echo $ECHO_N "(cached) $ECHO_C" >&6
13267 else
13268   cat >conftest.$ac_ext <<_ACEOF
13269 #line 13269 "configure"
13270 #include "confdefs.h"
13271 #include <dbmalloc.h>
13272 _ACEOF
13273 if { (eval echo "$as_me:13273: \"$ac_cpp conftest.$ac_ext\"") >&5
13274   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13275   ac_status=$?
13276   egrep -v '^ *\+' conftest.er1 >conftest.err
13277   rm -f conftest.er1
13278   cat conftest.err >&5
13279   echo "$as_me:13279: \$? = $ac_status" >&5
13280   (exit $ac_status); } >/dev/null; then
13281   if test -s conftest.err; then
13282     ac_cpp_err=$ac_c_preproc_warn_flag
13283   else
13284     ac_cpp_err=
13285   fi
13286 else
13287   ac_cpp_err=yes
13288 fi
13289 if test -z "$ac_cpp_err"; then
13290   ac_cv_header_dbmalloc_h=yes
13291 else
13292   echo "$as_me: failed program was:" >&5
13293   cat conftest.$ac_ext >&5
13294   ac_cv_header_dbmalloc_h=no
13295 fi
13296 rm -f conftest.err conftest.$ac_ext
13297 fi
13298 echo "$as_me:13298: result: $ac_cv_header_dbmalloc_h" >&5
13299 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13300 if test $ac_cv_header_dbmalloc_h = yes; then
13301
13302 echo "$as_me:13302: checking for debug_malloc in -ldbmalloc" >&5
13303 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13304 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13305   echo $ECHO_N "(cached) $ECHO_C" >&6
13306 else
13307   ac_check_lib_save_LIBS=$LIBS
13308 LIBS="-ldbmalloc  $LIBS"
13309 cat >conftest.$ac_ext <<_ACEOF
13310 #line 13310 "configure"
13311 #include "confdefs.h"
13312
13313 /* Override any gcc2 internal prototype to avoid an error.  */
13314 #ifdef __cplusplus
13315 extern "C"
13316 #endif
13317 /* We use char because int might match the return type of a gcc2
13318    builtin and then its argument prototype would still apply.  */
13319 char debug_malloc ();
13320 int
13321 main ()
13322 {
13323 debug_malloc ();
13324   ;
13325   return 0;
13326 }
13327 _ACEOF
13328 rm -f conftest.$ac_objext conftest$ac_exeext
13329 if { (eval echo "$as_me:13329: \"$ac_link\"") >&5
13330   (eval $ac_link) 2>&5
13331   ac_status=$?
13332   echo "$as_me:13332: \$? = $ac_status" >&5
13333   (exit $ac_status); } &&
13334          { ac_try='test -s conftest$ac_exeext'
13335   { (eval echo "$as_me:13335: \"$ac_try\"") >&5
13336   (eval $ac_try) 2>&5
13337   ac_status=$?
13338   echo "$as_me:13338: \$? = $ac_status" >&5
13339   (exit $ac_status); }; }; then
13340   ac_cv_lib_dbmalloc_debug_malloc=yes
13341 else
13342   echo "$as_me: failed program was:" >&5
13343 cat conftest.$ac_ext >&5
13344 ac_cv_lib_dbmalloc_debug_malloc=no
13345 fi
13346 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13347 LIBS=$ac_check_lib_save_LIBS
13348 fi
13349 echo "$as_me:13349: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13350 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13351 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13352   cat >>confdefs.h <<EOF
13353 #define HAVE_LIBDBMALLOC 1
13354 EOF
13355
13356   LIBS="-ldbmalloc $LIBS"
13357
13358 fi
13359
13360 fi
13361
13362 fi
13363
13364 echo "$as_me:13364: checking if you want to use valgrind for testing" >&5
13365 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13366
13367 # Check whether --with-valgrind or --without-valgrind was given.
13368 if test "${with_valgrind+set}" = set; then
13369   withval="$with_valgrind"
13370
13371 cat >>confdefs.h <<EOF
13372 #define USE_VALGRIND 1
13373 EOF
13374
13375         : ${with_cflags:=-g}
13376         : ${with_no_leaks:=yes}
13377          with_valgrind=yes
13378 else
13379   with_valgrind=
13380 fi;
13381 echo "$as_me:13381: result: ${with_valgrind:-no}" >&5
13382 echo "${ECHO_T}${with_valgrind:-no}" >&6
13383
13384 case .$with_cflags in #(vi
13385 .*-g*)
13386         case .$CFLAGS in #(vi
13387         .*-g*) #(vi
13388                 ;;
13389         *)
13390
13391 cf_fix_cppflags=no
13392 cf_new_cflags=
13393 cf_new_cppflags=
13394 cf_new_extra_cppflags=
13395
13396 for cf_add_cflags in -g
13397 do
13398 case $cf_fix_cppflags in
13399 no)
13400         case $cf_add_cflags in #(vi
13401         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13402                 case $cf_add_cflags in
13403                 -D*)
13404                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13405
13406                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13407                                 && test -z "${cf_tst_cflags}" \
13408                                 && cf_fix_cppflags=yes
13409
13410                         if test $cf_fix_cppflags = yes ; then
13411                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13412                                 continue
13413                         elif test "${cf_tst_cflags}" = "\"'" ; then
13414                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13415                                 continue
13416                         fi
13417                         ;;
13418                 esac
13419                 case "$CPPFLAGS" in
13420                 *$cf_add_cflags) #(vi
13421                         ;;
13422                 *) #(vi
13423                         case $cf_add_cflags in #(vi
13424                         -D*)
13425                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13426
13427 CPPFLAGS=`echo "$CPPFLAGS" | \
13428         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13429                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13430
13431                                 ;;
13432                         esac
13433                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13434                         ;;
13435                 esac
13436                 ;;
13437         *)
13438                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13439                 ;;
13440         esac
13441         ;;
13442 yes)
13443         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13444
13445         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13446
13447         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13448                 && test -z "${cf_tst_cflags}" \
13449                 && cf_fix_cppflags=no
13450         ;;
13451 esac
13452 done
13453
13454 if test -n "$cf_new_cflags" ; then
13455
13456         CFLAGS="$CFLAGS $cf_new_cflags"
13457 fi
13458
13459 if test -n "$cf_new_cppflags" ; then
13460
13461         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13462 fi
13463
13464 if test -n "$cf_new_extra_cppflags" ; then
13465
13466         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13467 fi
13468
13469                 ;;
13470         esac
13471         ;;
13472 esac
13473
13474 echo "$as_me:13474: checking if you want to perform memory-leak testing" >&5
13475 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13476
13477 # Check whether --enable-leaks or --disable-leaks was given.
13478 if test "${enable_leaks+set}" = set; then
13479   enableval="$enable_leaks"
13480   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13481 else
13482   : ${with_no_leaks:=no}
13483 fi;
13484 echo "$as_me:13484: result: $with_no_leaks" >&5
13485 echo "${ECHO_T}$with_no_leaks" >&6
13486
13487 if test "$with_no_leaks" = yes ; then
13488
13489 cat >>confdefs.h <<\EOF
13490 #define NO_LEAKS 1
13491 EOF
13492
13493 cat >>confdefs.h <<\EOF
13494 #define YY_NO_LEAKS 1
13495 EOF
13496
13497 fi
13498
13499 cat >>confdefs.h <<\EOF
13500 #define HAVE_NC_ALLOC_H 1
13501 EOF
13502
13503 ###     use option --enable-expanded to generate certain macros as functions
13504
13505 # Check whether --enable-expanded or --disable-expanded was given.
13506 if test "${enable_expanded+set}" = set; then
13507   enableval="$enable_expanded"
13508   test "x$enableval" = xyes &&
13509 cat >>confdefs.h <<\EOF
13510 #define NCURSES_EXPANDED 1
13511 EOF
13512
13513 fi;
13514
13515 ###     use option --disable-macros to suppress macros in favor of functions
13516
13517 # Check whether --enable-macros or --disable-macros was given.
13518 if test "${enable_macros+set}" = set; then
13519   enableval="$enable_macros"
13520   test "$enableval" = no &&
13521 cat >>confdefs.h <<\EOF
13522 #define NCURSES_NOMACROS 1
13523 EOF
13524
13525 fi;
13526
13527 # Normally we only add trace() to the debug-library.  Allow this to be
13528 # extended to all models of the ncurses library:
13529 cf_all_traces=no
13530 case "$CFLAGS $CPPFLAGS" in
13531 *-DTRACE*)
13532         cf_all_traces=yes
13533         ;;
13534 esac
13535
13536 echo "$as_me:13536: checking whether to add trace feature to all models" >&5
13537 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13538
13539 # Check whether --with-trace or --without-trace was given.
13540 if test "${with_trace+set}" = set; then
13541   withval="$with_trace"
13542   cf_with_trace=$withval
13543 else
13544   cf_with_trace=$cf_all_traces
13545 fi;
13546 echo "$as_me:13546: result: $cf_with_trace" >&5
13547 echo "${ECHO_T}$cf_with_trace" >&6
13548
13549 if test "x$cf_with_trace" = xyes ; then
13550         LIB_TRACING=all
13551         ADA_TRACE=TRUE
13552
13553 cf_fix_cppflags=no
13554 cf_new_cflags=
13555 cf_new_cppflags=
13556 cf_new_extra_cppflags=
13557
13558 for cf_add_cflags in -DTRACE
13559 do
13560 case $cf_fix_cppflags in
13561 no)
13562         case $cf_add_cflags in #(vi
13563         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13564                 case $cf_add_cflags in
13565                 -D*)
13566                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13567
13568                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13569                                 && test -z "${cf_tst_cflags}" \
13570                                 && cf_fix_cppflags=yes
13571
13572                         if test $cf_fix_cppflags = yes ; then
13573                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13574                                 continue
13575                         elif test "${cf_tst_cflags}" = "\"'" ; then
13576                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13577                                 continue
13578                         fi
13579                         ;;
13580                 esac
13581                 case "$CPPFLAGS" in
13582                 *$cf_add_cflags) #(vi
13583                         ;;
13584                 *) #(vi
13585                         case $cf_add_cflags in #(vi
13586                         -D*)
13587                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13588
13589 CPPFLAGS=`echo "$CPPFLAGS" | \
13590         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13591                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13592
13593                                 ;;
13594                         esac
13595                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13596                         ;;
13597                 esac
13598                 ;;
13599         *)
13600                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13601                 ;;
13602         esac
13603         ;;
13604 yes)
13605         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13606
13607         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13608
13609         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13610                 && test -z "${cf_tst_cflags}" \
13611                 && cf_fix_cppflags=no
13612         ;;
13613 esac
13614 done
13615
13616 if test -n "$cf_new_cflags" ; then
13617
13618         CFLAGS="$CFLAGS $cf_new_cflags"
13619 fi
13620
13621 if test -n "$cf_new_cppflags" ; then
13622
13623         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13624 fi
13625
13626 if test -n "$cf_new_extra_cppflags" ; then
13627
13628         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13629 fi
13630
13631 else
13632         LIB_TRACING=DEBUG
13633         ADA_TRACE=FALSE
13634 fi
13635
13636 ###     Checks for libraries.
13637 case $cf_cv_system_name in #(vi
13638 *mingw32*) #(vi
13639         ;;
13640 *)
13641 echo "$as_me:13641: checking for gettimeofday" >&5
13642 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13643 if test "${ac_cv_func_gettimeofday+set}" = set; then
13644   echo $ECHO_N "(cached) $ECHO_C" >&6
13645 else
13646   cat >conftest.$ac_ext <<_ACEOF
13647 #line 13647 "configure"
13648 #include "confdefs.h"
13649 /* System header to define __stub macros and hopefully few prototypes,
13650     which can conflict with char gettimeofday (); below.  */
13651 #include <assert.h>
13652 /* Override any gcc2 internal prototype to avoid an error.  */
13653 #ifdef __cplusplus
13654 extern "C"
13655 #endif
13656 /* We use char because int might match the return type of a gcc2
13657    builtin and then its argument prototype would still apply.  */
13658 char gettimeofday ();
13659 char (*f) ();
13660
13661 int
13662 main ()
13663 {
13664 /* The GNU C library defines this for functions which it implements
13665     to always fail with ENOSYS.  Some functions are actually named
13666     something starting with __ and the normal name is an alias.  */
13667 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13668 choke me
13669 #else
13670 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13671 #endif
13672
13673   ;
13674   return 0;
13675 }
13676 _ACEOF
13677 rm -f conftest.$ac_objext conftest$ac_exeext
13678 if { (eval echo "$as_me:13678: \"$ac_link\"") >&5
13679   (eval $ac_link) 2>&5
13680   ac_status=$?
13681   echo "$as_me:13681: \$? = $ac_status" >&5
13682   (exit $ac_status); } &&
13683          { ac_try='test -s conftest$ac_exeext'
13684   { (eval echo "$as_me:13684: \"$ac_try\"") >&5
13685   (eval $ac_try) 2>&5
13686   ac_status=$?
13687   echo "$as_me:13687: \$? = $ac_status" >&5
13688   (exit $ac_status); }; }; then
13689   ac_cv_func_gettimeofday=yes
13690 else
13691   echo "$as_me: failed program was:" >&5
13692 cat conftest.$ac_ext >&5
13693 ac_cv_func_gettimeofday=no
13694 fi
13695 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13696 fi
13697 echo "$as_me:13697: result: $ac_cv_func_gettimeofday" >&5
13698 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13699 if test $ac_cv_func_gettimeofday = yes; then
13700
13701 cat >>confdefs.h <<\EOF
13702 #define HAVE_GETTIMEOFDAY 1
13703 EOF
13704
13705 else
13706
13707 echo "$as_me:13707: checking for gettimeofday in -lbsd" >&5
13708 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13709 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13710   echo $ECHO_N "(cached) $ECHO_C" >&6
13711 else
13712   ac_check_lib_save_LIBS=$LIBS
13713 LIBS="-lbsd  $LIBS"
13714 cat >conftest.$ac_ext <<_ACEOF
13715 #line 13715 "configure"
13716 #include "confdefs.h"
13717
13718 /* Override any gcc2 internal prototype to avoid an error.  */
13719 #ifdef __cplusplus
13720 extern "C"
13721 #endif
13722 /* We use char because int might match the return type of a gcc2
13723    builtin and then its argument prototype would still apply.  */
13724 char gettimeofday ();
13725 int
13726 main ()
13727 {
13728 gettimeofday ();
13729   ;
13730   return 0;
13731 }
13732 _ACEOF
13733 rm -f conftest.$ac_objext conftest$ac_exeext
13734 if { (eval echo "$as_me:13734: \"$ac_link\"") >&5
13735   (eval $ac_link) 2>&5
13736   ac_status=$?
13737   echo "$as_me:13737: \$? = $ac_status" >&5
13738   (exit $ac_status); } &&
13739          { ac_try='test -s conftest$ac_exeext'
13740   { (eval echo "$as_me:13740: \"$ac_try\"") >&5
13741   (eval $ac_try) 2>&5
13742   ac_status=$?
13743   echo "$as_me:13743: \$? = $ac_status" >&5
13744   (exit $ac_status); }; }; then
13745   ac_cv_lib_bsd_gettimeofday=yes
13746 else
13747   echo "$as_me: failed program was:" >&5
13748 cat conftest.$ac_ext >&5
13749 ac_cv_lib_bsd_gettimeofday=no
13750 fi
13751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13752 LIBS=$ac_check_lib_save_LIBS
13753 fi
13754 echo "$as_me:13754: result: $ac_cv_lib_bsd_gettimeofday" >&5
13755 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13756 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13757
13758 cat >>confdefs.h <<\EOF
13759 #define HAVE_GETTIMEOFDAY 1
13760 EOF
13761
13762         LIBS="-lbsd $LIBS"
13763 fi
13764
13765 fi
13766         ;;
13767 esac
13768
13769 echo "$as_me:13769: checking if -lm needed for math functions" >&5
13770 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13771 if test "${cf_cv_need_libm+set}" = set; then
13772   echo $ECHO_N "(cached) $ECHO_C" >&6
13773 else
13774
13775         cat >conftest.$ac_ext <<_ACEOF
13776 #line 13776 "configure"
13777 #include "confdefs.h"
13778
13779         #include <stdio.h>
13780         #include <math.h>
13781
13782 int
13783 main ()
13784 {
13785 double x = rand(); printf("result = %g\n", pow(sin(x),x))
13786   ;
13787   return 0;
13788 }
13789 _ACEOF
13790 rm -f conftest.$ac_objext conftest$ac_exeext
13791 if { (eval echo "$as_me:13791: \"$ac_link\"") >&5
13792   (eval $ac_link) 2>&5
13793   ac_status=$?
13794   echo "$as_me:13794: \$? = $ac_status" >&5
13795   (exit $ac_status); } &&
13796          { ac_try='test -s conftest$ac_exeext'
13797   { (eval echo "$as_me:13797: \"$ac_try\"") >&5
13798   (eval $ac_try) 2>&5
13799   ac_status=$?
13800   echo "$as_me:13800: \$? = $ac_status" >&5
13801   (exit $ac_status); }; }; then
13802   cf_cv_need_libm=no
13803 else
13804   echo "$as_me: failed program was:" >&5
13805 cat conftest.$ac_ext >&5
13806 cf_cv_need_libm=yes
13807 fi
13808 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13809 fi
13810 echo "$as_me:13810: result: $cf_cv_need_libm" >&5
13811 echo "${ECHO_T}$cf_cv_need_libm" >&6
13812 if test "$cf_cv_need_libm" = yes
13813 then
13814 MATH_LIB=-lm
13815 fi
13816
13817 ###     Checks for header files.
13818 echo "$as_me:13818: checking for ANSI C header files" >&5
13819 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13820 if test "${ac_cv_header_stdc+set}" = set; then
13821   echo $ECHO_N "(cached) $ECHO_C" >&6
13822 else
13823   cat >conftest.$ac_ext <<_ACEOF
13824 #line 13824 "configure"
13825 #include "confdefs.h"
13826 #include <stdlib.h>
13827 #include <stdarg.h>
13828 #include <string.h>
13829 #include <float.h>
13830
13831 _ACEOF
13832 if { (eval echo "$as_me:13832: \"$ac_cpp conftest.$ac_ext\"") >&5
13833   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13834   ac_status=$?
13835   egrep -v '^ *\+' conftest.er1 >conftest.err
13836   rm -f conftest.er1
13837   cat conftest.err >&5
13838   echo "$as_me:13838: \$? = $ac_status" >&5
13839   (exit $ac_status); } >/dev/null; then
13840   if test -s conftest.err; then
13841     ac_cpp_err=$ac_c_preproc_warn_flag
13842   else
13843     ac_cpp_err=
13844   fi
13845 else
13846   ac_cpp_err=yes
13847 fi
13848 if test -z "$ac_cpp_err"; then
13849   ac_cv_header_stdc=yes
13850 else
13851   echo "$as_me: failed program was:" >&5
13852   cat conftest.$ac_ext >&5
13853   ac_cv_header_stdc=no
13854 fi
13855 rm -f conftest.err conftest.$ac_ext
13856
13857 if test $ac_cv_header_stdc = yes; then
13858   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13859   cat >conftest.$ac_ext <<_ACEOF
13860 #line 13860 "configure"
13861 #include "confdefs.h"
13862 #include <string.h>
13863
13864 _ACEOF
13865 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13866   egrep "memchr" >/dev/null 2>&1; then
13867   :
13868 else
13869   ac_cv_header_stdc=no
13870 fi
13871 rm -rf conftest*
13872
13873 fi
13874
13875 if test $ac_cv_header_stdc = yes; then
13876   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13877   cat >conftest.$ac_ext <<_ACEOF
13878 #line 13878 "configure"
13879 #include "confdefs.h"
13880 #include <stdlib.h>
13881
13882 _ACEOF
13883 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13884   egrep "free" >/dev/null 2>&1; then
13885   :
13886 else
13887   ac_cv_header_stdc=no
13888 fi
13889 rm -rf conftest*
13890
13891 fi
13892
13893 if test $ac_cv_header_stdc = yes; then
13894   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13895   if test "$cross_compiling" = yes; then
13896   :
13897 else
13898   cat >conftest.$ac_ext <<_ACEOF
13899 #line 13899 "configure"
13900 #include "confdefs.h"
13901 #include <ctype.h>
13902 #if ((' ' & 0x0FF) == 0x020)
13903 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13904 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13905 #else
13906 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13907                      || ('j' <= (c) && (c) <= 'r') \
13908                      || ('s' <= (c) && (c) <= 'z'))
13909 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13910 #endif
13911
13912 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13913 int
13914 main ()
13915 {
13916   int i;
13917   for (i = 0; i < 256; i++)
13918     if (XOR (islower (i), ISLOWER (i))
13919         || toupper (i) != TOUPPER (i))
13920       $ac_main_return(2);
13921   $ac_main_return (0);
13922 }
13923 _ACEOF
13924 rm -f conftest$ac_exeext
13925 if { (eval echo "$as_me:13925: \"$ac_link\"") >&5
13926   (eval $ac_link) 2>&5
13927   ac_status=$?
13928   echo "$as_me:13928: \$? = $ac_status" >&5
13929   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13930   { (eval echo "$as_me:13930: \"$ac_try\"") >&5
13931   (eval $ac_try) 2>&5
13932   ac_status=$?
13933   echo "$as_me:13933: \$? = $ac_status" >&5
13934   (exit $ac_status); }; }; then
13935   :
13936 else
13937   echo "$as_me: program exited with status $ac_status" >&5
13938 echo "$as_me: failed program was:" >&5
13939 cat conftest.$ac_ext >&5
13940 ac_cv_header_stdc=no
13941 fi
13942 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13943 fi
13944 fi
13945 fi
13946 echo "$as_me:13946: result: $ac_cv_header_stdc" >&5
13947 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13948 if test $ac_cv_header_stdc = yes; then
13949
13950 cat >>confdefs.h <<\EOF
13951 #define STDC_HEADERS 1
13952 EOF
13953
13954 fi
13955
13956 ac_header_dirent=no
13957 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13958   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13959 echo "$as_me:13959: checking for $ac_hdr that defines DIR" >&5
13960 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13961 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13962   echo $ECHO_N "(cached) $ECHO_C" >&6
13963 else
13964   cat >conftest.$ac_ext <<_ACEOF
13965 #line 13965 "configure"
13966 #include "confdefs.h"
13967 #include <sys/types.h>
13968 #include <$ac_hdr>
13969
13970 int
13971 main ()
13972 {
13973 if ((DIR *) 0)
13974 return 0;
13975   ;
13976   return 0;
13977 }
13978 _ACEOF
13979 rm -f conftest.$ac_objext
13980 if { (eval echo "$as_me:13980: \"$ac_compile\"") >&5
13981   (eval $ac_compile) 2>&5
13982   ac_status=$?
13983   echo "$as_me:13983: \$? = $ac_status" >&5
13984   (exit $ac_status); } &&
13985          { ac_try='test -s conftest.$ac_objext'
13986   { (eval echo "$as_me:13986: \"$ac_try\"") >&5
13987   (eval $ac_try) 2>&5
13988   ac_status=$?
13989   echo "$as_me:13989: \$? = $ac_status" >&5
13990   (exit $ac_status); }; }; then
13991   eval "$as_ac_Header=yes"
13992 else
13993   echo "$as_me: failed program was:" >&5
13994 cat conftest.$ac_ext >&5
13995 eval "$as_ac_Header=no"
13996 fi
13997 rm -f conftest.$ac_objext conftest.$ac_ext
13998 fi
13999 echo "$as_me:13999: result: `eval echo '${'$as_ac_Header'}'`" >&5
14000 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14001 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14002   cat >>confdefs.h <<EOF
14003 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14004 EOF
14005
14006 ac_header_dirent=$ac_hdr; break
14007 fi
14008
14009 done
14010 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14011 if test $ac_header_dirent = dirent.h; then
14012   echo "$as_me:14012: checking for opendir in -ldir" >&5
14013 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14014 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14015   echo $ECHO_N "(cached) $ECHO_C" >&6
14016 else
14017   ac_check_lib_save_LIBS=$LIBS
14018 LIBS="-ldir  $LIBS"
14019 cat >conftest.$ac_ext <<_ACEOF
14020 #line 14020 "configure"
14021 #include "confdefs.h"
14022
14023 /* Override any gcc2 internal prototype to avoid an error.  */
14024 #ifdef __cplusplus
14025 extern "C"
14026 #endif
14027 /* We use char because int might match the return type of a gcc2
14028    builtin and then its argument prototype would still apply.  */
14029 char opendir ();
14030 int
14031 main ()
14032 {
14033 opendir ();
14034   ;
14035   return 0;
14036 }
14037 _ACEOF
14038 rm -f conftest.$ac_objext conftest$ac_exeext
14039 if { (eval echo "$as_me:14039: \"$ac_link\"") >&5
14040   (eval $ac_link) 2>&5
14041   ac_status=$?
14042   echo "$as_me:14042: \$? = $ac_status" >&5
14043   (exit $ac_status); } &&
14044          { ac_try='test -s conftest$ac_exeext'
14045   { (eval echo "$as_me:14045: \"$ac_try\"") >&5
14046   (eval $ac_try) 2>&5
14047   ac_status=$?
14048   echo "$as_me:14048: \$? = $ac_status" >&5
14049   (exit $ac_status); }; }; then
14050   ac_cv_lib_dir_opendir=yes
14051 else
14052   echo "$as_me: failed program was:" >&5
14053 cat conftest.$ac_ext >&5
14054 ac_cv_lib_dir_opendir=no
14055 fi
14056 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14057 LIBS=$ac_check_lib_save_LIBS
14058 fi
14059 echo "$as_me:14059: result: $ac_cv_lib_dir_opendir" >&5
14060 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14061 if test $ac_cv_lib_dir_opendir = yes; then
14062   LIBS="$LIBS -ldir"
14063 fi
14064
14065 else
14066   echo "$as_me:14066: checking for opendir in -lx" >&5
14067 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14068 if test "${ac_cv_lib_x_opendir+set}" = set; then
14069   echo $ECHO_N "(cached) $ECHO_C" >&6
14070 else
14071   ac_check_lib_save_LIBS=$LIBS
14072 LIBS="-lx  $LIBS"
14073 cat >conftest.$ac_ext <<_ACEOF
14074 #line 14074 "configure"
14075 #include "confdefs.h"
14076
14077 /* Override any gcc2 internal prototype to avoid an error.  */
14078 #ifdef __cplusplus
14079 extern "C"
14080 #endif
14081 /* We use char because int might match the return type of a gcc2
14082    builtin and then its argument prototype would still apply.  */
14083 char opendir ();
14084 int
14085 main ()
14086 {
14087 opendir ();
14088   ;
14089   return 0;
14090 }
14091 _ACEOF
14092 rm -f conftest.$ac_objext conftest$ac_exeext
14093 if { (eval echo "$as_me:14093: \"$ac_link\"") >&5
14094   (eval $ac_link) 2>&5
14095   ac_status=$?
14096   echo "$as_me:14096: \$? = $ac_status" >&5
14097   (exit $ac_status); } &&
14098          { ac_try='test -s conftest$ac_exeext'
14099   { (eval echo "$as_me:14099: \"$ac_try\"") >&5
14100   (eval $ac_try) 2>&5
14101   ac_status=$?
14102   echo "$as_me:14102: \$? = $ac_status" >&5
14103   (exit $ac_status); }; }; then
14104   ac_cv_lib_x_opendir=yes
14105 else
14106   echo "$as_me: failed program was:" >&5
14107 cat conftest.$ac_ext >&5
14108 ac_cv_lib_x_opendir=no
14109 fi
14110 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14111 LIBS=$ac_check_lib_save_LIBS
14112 fi
14113 echo "$as_me:14113: result: $ac_cv_lib_x_opendir" >&5
14114 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14115 if test $ac_cv_lib_x_opendir = yes; then
14116   LIBS="$LIBS -lx"
14117 fi
14118
14119 fi
14120
14121 echo "$as_me:14121: checking whether time.h and sys/time.h may both be included" >&5
14122 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14123 if test "${ac_cv_header_time+set}" = set; then
14124   echo $ECHO_N "(cached) $ECHO_C" >&6
14125 else
14126   cat >conftest.$ac_ext <<_ACEOF
14127 #line 14127 "configure"
14128 #include "confdefs.h"
14129 #include <sys/types.h>
14130 #include <sys/time.h>
14131 #include <time.h>
14132
14133 int
14134 main ()
14135 {
14136 if ((struct tm *) 0)
14137 return 0;
14138   ;
14139   return 0;
14140 }
14141 _ACEOF
14142 rm -f conftest.$ac_objext
14143 if { (eval echo "$as_me:14143: \"$ac_compile\"") >&5
14144   (eval $ac_compile) 2>&5
14145   ac_status=$?
14146   echo "$as_me:14146: \$? = $ac_status" >&5
14147   (exit $ac_status); } &&
14148          { ac_try='test -s conftest.$ac_objext'
14149   { (eval echo "$as_me:14149: \"$ac_try\"") >&5
14150   (eval $ac_try) 2>&5
14151   ac_status=$?
14152   echo "$as_me:14152: \$? = $ac_status" >&5
14153   (exit $ac_status); }; }; then
14154   ac_cv_header_time=yes
14155 else
14156   echo "$as_me: failed program was:" >&5
14157 cat conftest.$ac_ext >&5
14158 ac_cv_header_time=no
14159 fi
14160 rm -f conftest.$ac_objext conftest.$ac_ext
14161 fi
14162 echo "$as_me:14162: result: $ac_cv_header_time" >&5
14163 echo "${ECHO_T}$ac_cv_header_time" >&6
14164 if test $ac_cv_header_time = yes; then
14165
14166 cat >>confdefs.h <<\EOF
14167 #define TIME_WITH_SYS_TIME 1
14168 EOF
14169
14170 fi
14171
14172 cf_regex_func=no
14173
14174 cf_regex_libs="regex re"
14175 case $host_os in #(vi
14176 mingw*)
14177         cf_regex_libs="gnurx $cf_regex_libs"
14178         ;;
14179 esac
14180
14181 echo "$as_me:14181: checking for regcomp" >&5
14182 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14183 if test "${ac_cv_func_regcomp+set}" = set; then
14184   echo $ECHO_N "(cached) $ECHO_C" >&6
14185 else
14186   cat >conftest.$ac_ext <<_ACEOF
14187 #line 14187 "configure"
14188 #include "confdefs.h"
14189 /* System header to define __stub macros and hopefully few prototypes,
14190     which can conflict with char regcomp (); below.  */
14191 #include <assert.h>
14192 /* Override any gcc2 internal prototype to avoid an error.  */
14193 #ifdef __cplusplus
14194 extern "C"
14195 #endif
14196 /* We use char because int might match the return type of a gcc2
14197    builtin and then its argument prototype would still apply.  */
14198 char regcomp ();
14199 char (*f) ();
14200
14201 int
14202 main ()
14203 {
14204 /* The GNU C library defines this for functions which it implements
14205     to always fail with ENOSYS.  Some functions are actually named
14206     something starting with __ and the normal name is an alias.  */
14207 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14208 choke me
14209 #else
14210 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14211 #endif
14212
14213   ;
14214   return 0;
14215 }
14216 _ACEOF
14217 rm -f conftest.$ac_objext conftest$ac_exeext
14218 if { (eval echo "$as_me:14218: \"$ac_link\"") >&5
14219   (eval $ac_link) 2>&5
14220   ac_status=$?
14221   echo "$as_me:14221: \$? = $ac_status" >&5
14222   (exit $ac_status); } &&
14223          { ac_try='test -s conftest$ac_exeext'
14224   { (eval echo "$as_me:14224: \"$ac_try\"") >&5
14225   (eval $ac_try) 2>&5
14226   ac_status=$?
14227   echo "$as_me:14227: \$? = $ac_status" >&5
14228   (exit $ac_status); }; }; then
14229   ac_cv_func_regcomp=yes
14230 else
14231   echo "$as_me: failed program was:" >&5
14232 cat conftest.$ac_ext >&5
14233 ac_cv_func_regcomp=no
14234 fi
14235 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14236 fi
14237 echo "$as_me:14237: result: $ac_cv_func_regcomp" >&5
14238 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14239 if test $ac_cv_func_regcomp = yes; then
14240   cf_regex_func=regcomp
14241 else
14242
14243         for cf_regex_lib in $cf_regex_libs
14244         do
14245                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14246 echo "$as_me:14246: checking for regcomp in -l$cf_regex_lib" >&5
14247 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14248 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14249   echo $ECHO_N "(cached) $ECHO_C" >&6
14250 else
14251   ac_check_lib_save_LIBS=$LIBS
14252 LIBS="-l$cf_regex_lib  $LIBS"
14253 cat >conftest.$ac_ext <<_ACEOF
14254 #line 14254 "configure"
14255 #include "confdefs.h"
14256
14257 /* Override any gcc2 internal prototype to avoid an error.  */
14258 #ifdef __cplusplus
14259 extern "C"
14260 #endif
14261 /* We use char because int might match the return type of a gcc2
14262    builtin and then its argument prototype would still apply.  */
14263 char regcomp ();
14264 int
14265 main ()
14266 {
14267 regcomp ();
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   eval "$as_ac_Lib=yes"
14285 else
14286   echo "$as_me: failed program was:" >&5
14287 cat conftest.$ac_ext >&5
14288 eval "$as_ac_Lib=no"
14289 fi
14290 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14291 LIBS=$ac_check_lib_save_LIBS
14292 fi
14293 echo "$as_me:14293: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14294 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14295 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14296
14297                                 LIBS="-l$cf_regex_lib $LIBS"
14298                                 cf_regex_func=regcomp
14299                                 break
14300 fi
14301
14302         done
14303
14304 fi
14305
14306 if test "$cf_regex_func" = no ; then
14307         echo "$as_me:14307: checking for compile" >&5
14308 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14309 if test "${ac_cv_func_compile+set}" = set; then
14310   echo $ECHO_N "(cached) $ECHO_C" >&6
14311 else
14312   cat >conftest.$ac_ext <<_ACEOF
14313 #line 14313 "configure"
14314 #include "confdefs.h"
14315 /* System header to define __stub macros and hopefully few prototypes,
14316     which can conflict with char compile (); below.  */
14317 #include <assert.h>
14318 /* Override any gcc2 internal prototype to avoid an error.  */
14319 #ifdef __cplusplus
14320 extern "C"
14321 #endif
14322 /* We use char because int might match the return type of a gcc2
14323    builtin and then its argument prototype would still apply.  */
14324 char compile ();
14325 char (*f) ();
14326
14327 int
14328 main ()
14329 {
14330 /* The GNU C library defines this for functions which it implements
14331     to always fail with ENOSYS.  Some functions are actually named
14332     something starting with __ and the normal name is an alias.  */
14333 #if defined (__stub_compile) || defined (__stub___compile)
14334 choke me
14335 #else
14336 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14337 #endif
14338
14339   ;
14340   return 0;
14341 }
14342 _ACEOF
14343 rm -f conftest.$ac_objext conftest$ac_exeext
14344 if { (eval echo "$as_me:14344: \"$ac_link\"") >&5
14345   (eval $ac_link) 2>&5
14346   ac_status=$?
14347   echo "$as_me:14347: \$? = $ac_status" >&5
14348   (exit $ac_status); } &&
14349          { ac_try='test -s conftest$ac_exeext'
14350   { (eval echo "$as_me:14350: \"$ac_try\"") >&5
14351   (eval $ac_try) 2>&5
14352   ac_status=$?
14353   echo "$as_me:14353: \$? = $ac_status" >&5
14354   (exit $ac_status); }; }; then
14355   ac_cv_func_compile=yes
14356 else
14357   echo "$as_me: failed program was:" >&5
14358 cat conftest.$ac_ext >&5
14359 ac_cv_func_compile=no
14360 fi
14361 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14362 fi
14363 echo "$as_me:14363: result: $ac_cv_func_compile" >&5
14364 echo "${ECHO_T}$ac_cv_func_compile" >&6
14365 if test $ac_cv_func_compile = yes; then
14366   cf_regex_func=compile
14367 else
14368
14369                 echo "$as_me:14369: checking for compile in -lgen" >&5
14370 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14371 if test "${ac_cv_lib_gen_compile+set}" = set; then
14372   echo $ECHO_N "(cached) $ECHO_C" >&6
14373 else
14374   ac_check_lib_save_LIBS=$LIBS
14375 LIBS="-lgen  $LIBS"
14376 cat >conftest.$ac_ext <<_ACEOF
14377 #line 14377 "configure"
14378 #include "confdefs.h"
14379
14380 /* Override any gcc2 internal prototype to avoid an error.  */
14381 #ifdef __cplusplus
14382 extern "C"
14383 #endif
14384 /* We use char because int might match the return type of a gcc2
14385    builtin and then its argument prototype would still apply.  */
14386 char compile ();
14387 int
14388 main ()
14389 {
14390 compile ();
14391   ;
14392   return 0;
14393 }
14394 _ACEOF
14395 rm -f conftest.$ac_objext conftest$ac_exeext
14396 if { (eval echo "$as_me:14396: \"$ac_link\"") >&5
14397   (eval $ac_link) 2>&5
14398   ac_status=$?
14399   echo "$as_me:14399: \$? = $ac_status" >&5
14400   (exit $ac_status); } &&
14401          { ac_try='test -s conftest$ac_exeext'
14402   { (eval echo "$as_me:14402: \"$ac_try\"") >&5
14403   (eval $ac_try) 2>&5
14404   ac_status=$?
14405   echo "$as_me:14405: \$? = $ac_status" >&5
14406   (exit $ac_status); }; }; then
14407   ac_cv_lib_gen_compile=yes
14408 else
14409   echo "$as_me: failed program was:" >&5
14410 cat conftest.$ac_ext >&5
14411 ac_cv_lib_gen_compile=no
14412 fi
14413 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14414 LIBS=$ac_check_lib_save_LIBS
14415 fi
14416 echo "$as_me:14416: result: $ac_cv_lib_gen_compile" >&5
14417 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14418 if test $ac_cv_lib_gen_compile = yes; then
14419
14420                                 LIBS="-lgen $LIBS"
14421                                 cf_regex_func=compile
14422 fi
14423
14424 fi
14425
14426 fi
14427
14428 if test "$cf_regex_func" = no ; then
14429         { echo "$as_me:14429: WARNING: cannot find regular expression library" >&5
14430 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14431 fi
14432
14433 echo "$as_me:14433: checking for regular-expression headers" >&5
14434 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14435 if test "${cf_cv_regex_hdrs+set}" = set; then
14436   echo $ECHO_N "(cached) $ECHO_C" >&6
14437 else
14438
14439 cf_cv_regex_hdrs=no
14440 case $cf_regex_func in #(vi
14441 compile) #(vi
14442         for cf_regex_hdr in regexp.h regexpr.h
14443         do
14444                 cat >conftest.$ac_ext <<_ACEOF
14445 #line 14445 "configure"
14446 #include "confdefs.h"
14447 #include <$cf_regex_hdr>
14448 int
14449 main ()
14450 {
14451
14452                         char *p = compile("", "", "", 0);
14453                         int x = step("", "");
14454
14455   ;
14456   return 0;
14457 }
14458 _ACEOF
14459 rm -f conftest.$ac_objext conftest$ac_exeext
14460 if { (eval echo "$as_me:14460: \"$ac_link\"") >&5
14461   (eval $ac_link) 2>&5
14462   ac_status=$?
14463   echo "$as_me:14463: \$? = $ac_status" >&5
14464   (exit $ac_status); } &&
14465          { ac_try='test -s conftest$ac_exeext'
14466   { (eval echo "$as_me:14466: \"$ac_try\"") >&5
14467   (eval $ac_try) 2>&5
14468   ac_status=$?
14469   echo "$as_me:14469: \$? = $ac_status" >&5
14470   (exit $ac_status); }; }; then
14471
14472                         cf_cv_regex_hdrs=$cf_regex_hdr
14473                         break
14474
14475 else
14476   echo "$as_me: failed program was:" >&5
14477 cat conftest.$ac_ext >&5
14478 fi
14479 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14480         done
14481         ;;
14482 *)
14483         for cf_regex_hdr in regex.h
14484         do
14485                 cat >conftest.$ac_ext <<_ACEOF
14486 #line 14486 "configure"
14487 #include "confdefs.h"
14488 #include <sys/types.h>
14489 #include <$cf_regex_hdr>
14490 int
14491 main ()
14492 {
14493
14494                         regex_t *p;
14495                         int x = regcomp(p, "", 0);
14496                         int y = regexec(p, "", 0, 0, 0);
14497                         regfree(p);
14498
14499   ;
14500   return 0;
14501 }
14502 _ACEOF
14503 rm -f conftest.$ac_objext conftest$ac_exeext
14504 if { (eval echo "$as_me:14504: \"$ac_link\"") >&5
14505   (eval $ac_link) 2>&5
14506   ac_status=$?
14507   echo "$as_me:14507: \$? = $ac_status" >&5
14508   (exit $ac_status); } &&
14509          { ac_try='test -s conftest$ac_exeext'
14510   { (eval echo "$as_me:14510: \"$ac_try\"") >&5
14511   (eval $ac_try) 2>&5
14512   ac_status=$?
14513   echo "$as_me:14513: \$? = $ac_status" >&5
14514   (exit $ac_status); }; }; then
14515
14516                         cf_cv_regex_hdrs=$cf_regex_hdr
14517                         break
14518
14519 else
14520   echo "$as_me: failed program was:" >&5
14521 cat conftest.$ac_ext >&5
14522 fi
14523 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14524         done
14525         ;;
14526 esac
14527
14528 fi
14529 echo "$as_me:14529: result: $cf_cv_regex_hdrs" >&5
14530 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14531
14532 case $cf_cv_regex_hdrs in #(vi
14533     no)        { echo "$as_me:14533: WARNING: no regular expression header found" >&5
14534 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14535     regex.h)
14536 cat >>confdefs.h <<\EOF
14537 #define HAVE_REGEX_H_FUNCS 1
14538 EOF
14539  ;; #(vi
14540     regexp.h)
14541 cat >>confdefs.h <<\EOF
14542 #define HAVE_REGEXP_H_FUNCS 1
14543 EOF
14544  ;; #(vi
14545     regexpr.h)
14546 cat >>confdefs.h <<\EOF
14547 #define HAVE_REGEXPR_H_FUNCS 1
14548 EOF
14549  ;;
14550 esac
14551
14552 for ac_header in \
14553 fcntl.h \
14554 getopt.h \
14555 limits.h \
14556 locale.h \
14557 math.h \
14558 poll.h \
14559 sys/bsdtypes.h \
14560 sys/ioctl.h \
14561 sys/param.h \
14562 sys/poll.h \
14563 sys/select.h \
14564 sys/time.h \
14565 sys/times.h \
14566 ttyent.h \
14567 unistd.h \
14568 wctype.h \
14569
14570 do
14571 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14572 echo "$as_me:14572: checking for $ac_header" >&5
14573 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14574 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14575   echo $ECHO_N "(cached) $ECHO_C" >&6
14576 else
14577   cat >conftest.$ac_ext <<_ACEOF
14578 #line 14578 "configure"
14579 #include "confdefs.h"
14580 #include <$ac_header>
14581 _ACEOF
14582 if { (eval echo "$as_me:14582: \"$ac_cpp conftest.$ac_ext\"") >&5
14583   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14584   ac_status=$?
14585   egrep -v '^ *\+' conftest.er1 >conftest.err
14586   rm -f conftest.er1
14587   cat conftest.err >&5
14588   echo "$as_me:14588: \$? = $ac_status" >&5
14589   (exit $ac_status); } >/dev/null; then
14590   if test -s conftest.err; then
14591     ac_cpp_err=$ac_c_preproc_warn_flag
14592   else
14593     ac_cpp_err=
14594   fi
14595 else
14596   ac_cpp_err=yes
14597 fi
14598 if test -z "$ac_cpp_err"; then
14599   eval "$as_ac_Header=yes"
14600 else
14601   echo "$as_me: failed program was:" >&5
14602   cat conftest.$ac_ext >&5
14603   eval "$as_ac_Header=no"
14604 fi
14605 rm -f conftest.err conftest.$ac_ext
14606 fi
14607 echo "$as_me:14607: result: `eval echo '${'$as_ac_Header'}'`" >&5
14608 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14609 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14610   cat >>confdefs.h <<EOF
14611 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14612 EOF
14613
14614 fi
14615 done
14616
14617 for ac_header in unistd.h getopt.h
14618 do
14619 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14620 echo "$as_me:14620: checking for $ac_header" >&5
14621 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14622 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14623   echo $ECHO_N "(cached) $ECHO_C" >&6
14624 else
14625   cat >conftest.$ac_ext <<_ACEOF
14626 #line 14626 "configure"
14627 #include "confdefs.h"
14628 #include <$ac_header>
14629 _ACEOF
14630 if { (eval echo "$as_me:14630: \"$ac_cpp conftest.$ac_ext\"") >&5
14631   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14632   ac_status=$?
14633   egrep -v '^ *\+' conftest.er1 >conftest.err
14634   rm -f conftest.er1
14635   cat conftest.err >&5
14636   echo "$as_me:14636: \$? = $ac_status" >&5
14637   (exit $ac_status); } >/dev/null; then
14638   if test -s conftest.err; then
14639     ac_cpp_err=$ac_c_preproc_warn_flag
14640   else
14641     ac_cpp_err=
14642   fi
14643 else
14644   ac_cpp_err=yes
14645 fi
14646 if test -z "$ac_cpp_err"; then
14647   eval "$as_ac_Header=yes"
14648 else
14649   echo "$as_me: failed program was:" >&5
14650   cat conftest.$ac_ext >&5
14651   eval "$as_ac_Header=no"
14652 fi
14653 rm -f conftest.err conftest.$ac_ext
14654 fi
14655 echo "$as_me:14655: result: `eval echo '${'$as_ac_Header'}'`" >&5
14656 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14657 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14658   cat >>confdefs.h <<EOF
14659 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14660 EOF
14661
14662 fi
14663 done
14664
14665 echo "$as_me:14665: checking for header declaring getopt variables" >&5
14666 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14667 if test "${cf_cv_getopt_header+set}" = set; then
14668   echo $ECHO_N "(cached) $ECHO_C" >&6
14669 else
14670
14671 cf_cv_getopt_header=none
14672 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14673 do
14674 cat >conftest.$ac_ext <<_ACEOF
14675 #line 14675 "configure"
14676 #include "confdefs.h"
14677
14678 #include <$cf_header>
14679 int
14680 main ()
14681 {
14682 int x = optind; char *y = optarg
14683   ;
14684   return 0;
14685 }
14686 _ACEOF
14687 rm -f conftest.$ac_objext
14688 if { (eval echo "$as_me:14688: \"$ac_compile\"") >&5
14689   (eval $ac_compile) 2>&5
14690   ac_status=$?
14691   echo "$as_me:14691: \$? = $ac_status" >&5
14692   (exit $ac_status); } &&
14693          { ac_try='test -s conftest.$ac_objext'
14694   { (eval echo "$as_me:14694: \"$ac_try\"") >&5
14695   (eval $ac_try) 2>&5
14696   ac_status=$?
14697   echo "$as_me:14697: \$? = $ac_status" >&5
14698   (exit $ac_status); }; }; then
14699   cf_cv_getopt_header=$cf_header
14700  break
14701 else
14702   echo "$as_me: failed program was:" >&5
14703 cat conftest.$ac_ext >&5
14704 fi
14705 rm -f conftest.$ac_objext conftest.$ac_ext
14706 done
14707
14708 fi
14709 echo "$as_me:14709: result: $cf_cv_getopt_header" >&5
14710 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14711 if test $cf_cv_getopt_header != none ; then
14712
14713 cat >>confdefs.h <<\EOF
14714 #define HAVE_GETOPT_HEADER 1
14715 EOF
14716
14717 fi
14718
14719 # check for ISC (this may also define _POSIX_SOURCE)
14720 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14721 if test "x$ISC" = xyes ; then
14722
14723 echo "$as_me:14723: checking for main in -lcposix" >&5
14724 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14725 if test "${ac_cv_lib_cposix_main+set}" = set; then
14726   echo $ECHO_N "(cached) $ECHO_C" >&6
14727 else
14728   ac_check_lib_save_LIBS=$LIBS
14729 LIBS="-lcposix  $LIBS"
14730 cat >conftest.$ac_ext <<_ACEOF
14731 #line 14731 "configure"
14732 #include "confdefs.h"
14733
14734 int
14735 main ()
14736 {
14737 main ();
14738   ;
14739   return 0;
14740 }
14741 _ACEOF
14742 rm -f conftest.$ac_objext conftest$ac_exeext
14743 if { (eval echo "$as_me:14743: \"$ac_link\"") >&5
14744   (eval $ac_link) 2>&5
14745   ac_status=$?
14746   echo "$as_me:14746: \$? = $ac_status" >&5
14747   (exit $ac_status); } &&
14748          { ac_try='test -s conftest$ac_exeext'
14749   { (eval echo "$as_me:14749: \"$ac_try\"") >&5
14750   (eval $ac_try) 2>&5
14751   ac_status=$?
14752   echo "$as_me:14752: \$? = $ac_status" >&5
14753   (exit $ac_status); }; }; then
14754   ac_cv_lib_cposix_main=yes
14755 else
14756   echo "$as_me: failed program was:" >&5
14757 cat conftest.$ac_ext >&5
14758 ac_cv_lib_cposix_main=no
14759 fi
14760 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14761 LIBS=$ac_check_lib_save_LIBS
14762 fi
14763 echo "$as_me:14763: result: $ac_cv_lib_cposix_main" >&5
14764 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14765 if test $ac_cv_lib_cposix_main = yes; then
14766   cat >>confdefs.h <<EOF
14767 #define HAVE_LIBCPOSIX 1
14768 EOF
14769
14770   LIBS="-lcposix $LIBS"
14771
14772 fi
14773
14774         echo "$as_me:14774: checking for bzero in -linet" >&5
14775 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14776 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14777   echo $ECHO_N "(cached) $ECHO_C" >&6
14778 else
14779   ac_check_lib_save_LIBS=$LIBS
14780 LIBS="-linet  $LIBS"
14781 cat >conftest.$ac_ext <<_ACEOF
14782 #line 14782 "configure"
14783 #include "confdefs.h"
14784
14785 /* Override any gcc2 internal prototype to avoid an error.  */
14786 #ifdef __cplusplus
14787 extern "C"
14788 #endif
14789 /* We use char because int might match the return type of a gcc2
14790    builtin and then its argument prototype would still apply.  */
14791 char bzero ();
14792 int
14793 main ()
14794 {
14795 bzero ();
14796   ;
14797   return 0;
14798 }
14799 _ACEOF
14800 rm -f conftest.$ac_objext conftest$ac_exeext
14801 if { (eval echo "$as_me:14801: \"$ac_link\"") >&5
14802   (eval $ac_link) 2>&5
14803   ac_status=$?
14804   echo "$as_me:14804: \$? = $ac_status" >&5
14805   (exit $ac_status); } &&
14806          { ac_try='test -s conftest$ac_exeext'
14807   { (eval echo "$as_me:14807: \"$ac_try\"") >&5
14808   (eval $ac_try) 2>&5
14809   ac_status=$?
14810   echo "$as_me:14810: \$? = $ac_status" >&5
14811   (exit $ac_status); }; }; then
14812   ac_cv_lib_inet_bzero=yes
14813 else
14814   echo "$as_me: failed program was:" >&5
14815 cat conftest.$ac_ext >&5
14816 ac_cv_lib_inet_bzero=no
14817 fi
14818 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14819 LIBS=$ac_check_lib_save_LIBS
14820 fi
14821 echo "$as_me:14821: result: $ac_cv_lib_inet_bzero" >&5
14822 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14823 if test $ac_cv_lib_inet_bzero = yes; then
14824   LIBS="-linet $LIBS"
14825 fi
14826 fi
14827
14828 echo "$as_me:14828: checking if sys/time.h works with sys/select.h" >&5
14829 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14830 if test "${cf_cv_sys_time_select+set}" = set; then
14831   echo $ECHO_N "(cached) $ECHO_C" >&6
14832 else
14833
14834 cat >conftest.$ac_ext <<_ACEOF
14835 #line 14835 "configure"
14836 #include "confdefs.h"
14837
14838 #include <sys/types.h>
14839 #ifdef HAVE_SYS_TIME_H
14840 #include <sys/time.h>
14841 #endif
14842 #ifdef HAVE_SYS_SELECT_H
14843 #include <sys/select.h>
14844 #endif
14845
14846 int
14847 main ()
14848 {
14849
14850   ;
14851   return 0;
14852 }
14853 _ACEOF
14854 rm -f conftest.$ac_objext
14855 if { (eval echo "$as_me:14855: \"$ac_compile\"") >&5
14856   (eval $ac_compile) 2>&5
14857   ac_status=$?
14858   echo "$as_me:14858: \$? = $ac_status" >&5
14859   (exit $ac_status); } &&
14860          { ac_try='test -s conftest.$ac_objext'
14861   { (eval echo "$as_me:14861: \"$ac_try\"") >&5
14862   (eval $ac_try) 2>&5
14863   ac_status=$?
14864   echo "$as_me:14864: \$? = $ac_status" >&5
14865   (exit $ac_status); }; }; then
14866   cf_cv_sys_time_select=yes
14867 else
14868   echo "$as_me: failed program was:" >&5
14869 cat conftest.$ac_ext >&5
14870 cf_cv_sys_time_select=no
14871 fi
14872 rm -f conftest.$ac_objext conftest.$ac_ext
14873
14874 fi
14875
14876 echo "$as_me:14876: result: $cf_cv_sys_time_select" >&5
14877 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14878 test "$cf_cv_sys_time_select" = yes &&
14879 cat >>confdefs.h <<\EOF
14880 #define HAVE_SYS_TIME_SELECT 1
14881 EOF
14882
14883 ###     checks for compiler characteristics
14884 ac_ext=c
14885 ac_cpp='$CPP $CPPFLAGS'
14886 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14887 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14888 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14889 ac_main_return=return
14890
14891 echo "$as_me:14891: checking for an ANSI C-conforming const" >&5
14892 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14893 if test "${ac_cv_c_const+set}" = set; then
14894   echo $ECHO_N "(cached) $ECHO_C" >&6
14895 else
14896   cat >conftest.$ac_ext <<_ACEOF
14897 #line 14897 "configure"
14898 #include "confdefs.h"
14899
14900 int
14901 main ()
14902 {
14903 /* FIXME: Include the comments suggested by Paul. */
14904 #ifndef __cplusplus
14905   /* Ultrix mips cc rejects this.  */
14906   typedef int charset[2];
14907   const charset x;
14908   /* SunOS 4.1.1 cc rejects this.  */
14909   char const *const *ccp;
14910   char **p;
14911   /* NEC SVR4.0.2 mips cc rejects this.  */
14912   struct point {int x, y;};
14913   static struct point const zero = {0,0};
14914   /* AIX XL C 1.02.0.0 rejects this.
14915      It does not let you subtract one const X* pointer from another in
14916      an arm of an if-expression whose if-part is not a constant
14917      expression */
14918   const char *g = "string";
14919   ccp = &g + (g ? g-g : 0);
14920   /* HPUX 7.0 cc rejects these. */
14921   ++ccp;
14922   p = (char**) ccp;
14923   ccp = (char const *const *) p;
14924   { /* SCO 3.2v4 cc rejects this.  */
14925     char *t;
14926     char const *s = 0 ? (char *) 0 : (char const *) 0;
14927
14928     *t++ = 0;
14929   }
14930   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14931     int x[] = {25, 17};
14932     const int *foo = &x[0];
14933     ++foo;
14934   }
14935   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14936     typedef const int *iptr;
14937     iptr p = 0;
14938     ++p;
14939   }
14940   { /* AIX XL C 1.02.0.0 rejects this saying
14941        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14942     struct s { int j; const int *ap[3]; };
14943     struct s *b; b->j = 5;
14944   }
14945   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14946     const int foo = 10;
14947   }
14948 #endif
14949
14950   ;
14951   return 0;
14952 }
14953 _ACEOF
14954 rm -f conftest.$ac_objext
14955 if { (eval echo "$as_me:14955: \"$ac_compile\"") >&5
14956   (eval $ac_compile) 2>&5
14957   ac_status=$?
14958   echo "$as_me:14958: \$? = $ac_status" >&5
14959   (exit $ac_status); } &&
14960          { ac_try='test -s conftest.$ac_objext'
14961   { (eval echo "$as_me:14961: \"$ac_try\"") >&5
14962   (eval $ac_try) 2>&5
14963   ac_status=$?
14964   echo "$as_me:14964: \$? = $ac_status" >&5
14965   (exit $ac_status); }; }; then
14966   ac_cv_c_const=yes
14967 else
14968   echo "$as_me: failed program was:" >&5
14969 cat conftest.$ac_ext >&5
14970 ac_cv_c_const=no
14971 fi
14972 rm -f conftest.$ac_objext conftest.$ac_ext
14973 fi
14974 echo "$as_me:14974: result: $ac_cv_c_const" >&5
14975 echo "${ECHO_T}$ac_cv_c_const" >&6
14976 if test $ac_cv_c_const = no; then
14977
14978 cat >>confdefs.h <<\EOF
14979 #define const
14980 EOF
14981
14982 fi
14983
14984 echo "$as_me:14984: checking for inline" >&5
14985 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14986 if test "${ac_cv_c_inline+set}" = set; then
14987   echo $ECHO_N "(cached) $ECHO_C" >&6
14988 else
14989   ac_cv_c_inline=no
14990 for ac_kw in inline __inline__ __inline; do
14991   cat >conftest.$ac_ext <<_ACEOF
14992 #line 14992 "configure"
14993 #include "confdefs.h"
14994 #ifndef __cplusplus
14995 static $ac_kw int static_foo () {return 0; }
14996 $ac_kw int foo () {return 0; }
14997 #endif
14998
14999 _ACEOF
15000 rm -f conftest.$ac_objext
15001 if { (eval echo "$as_me:15001: \"$ac_compile\"") >&5
15002   (eval $ac_compile) 2>&5
15003   ac_status=$?
15004   echo "$as_me:15004: \$? = $ac_status" >&5
15005   (exit $ac_status); } &&
15006          { ac_try='test -s conftest.$ac_objext'
15007   { (eval echo "$as_me:15007: \"$ac_try\"") >&5
15008   (eval $ac_try) 2>&5
15009   ac_status=$?
15010   echo "$as_me:15010: \$? = $ac_status" >&5
15011   (exit $ac_status); }; }; then
15012   ac_cv_c_inline=$ac_kw; break
15013 else
15014   echo "$as_me: failed program was:" >&5
15015 cat conftest.$ac_ext >&5
15016 fi
15017 rm -f conftest.$ac_objext conftest.$ac_ext
15018 done
15019
15020 fi
15021 echo "$as_me:15021: result: $ac_cv_c_inline" >&5
15022 echo "${ECHO_T}$ac_cv_c_inline" >&6
15023 case $ac_cv_c_inline in
15024   inline | yes) ;;
15025   no)
15026 cat >>confdefs.h <<\EOF
15027 #define inline
15028 EOF
15029  ;;
15030   *)  cat >>confdefs.h <<EOF
15031 #define inline $ac_cv_c_inline
15032 EOF
15033  ;;
15034 esac
15035
15036 NCURSES_INLINE=
15037 if test "$ac_cv_c_inline" != no ; then
15038   NCURSES_INLINE=inline
15039   if test "$INTEL_COMPILER" = yes
15040   then
15041     :
15042   elif test "$CLANG_COMPILER" = yes
15043   then
15044     :
15045   elif test "$GCC" = yes
15046   then
15047     echo "$as_me:15047: checking if $CC supports options to tune inlining" >&5
15048 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15049 if test "${cf_cv_gcc_inline+set}" = set; then
15050   echo $ECHO_N "(cached) $ECHO_C" >&6
15051 else
15052
15053       cf_save_CFLAGS=$CFLAGS
15054       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15055       cat >conftest.$ac_ext <<_ACEOF
15056 #line 15056 "configure"
15057 #include "confdefs.h"
15058 inline int foo(void) { return 1; }
15059 int
15060 main ()
15061 {
15062 ${cf_cv_main_return:-return} foo()
15063   ;
15064   return 0;
15065 }
15066 _ACEOF
15067 rm -f conftest.$ac_objext
15068 if { (eval echo "$as_me:15068: \"$ac_compile\"") >&5
15069   (eval $ac_compile) 2>&5
15070   ac_status=$?
15071   echo "$as_me:15071: \$? = $ac_status" >&5
15072   (exit $ac_status); } &&
15073          { ac_try='test -s conftest.$ac_objext'
15074   { (eval echo "$as_me:15074: \"$ac_try\"") >&5
15075   (eval $ac_try) 2>&5
15076   ac_status=$?
15077   echo "$as_me:15077: \$? = $ac_status" >&5
15078   (exit $ac_status); }; }; then
15079   cf_cv_gcc_inline=yes
15080 else
15081   echo "$as_me: failed program was:" >&5
15082 cat conftest.$ac_ext >&5
15083 cf_cv_gcc_inline=no
15084 fi
15085 rm -f conftest.$ac_objext conftest.$ac_ext
15086       CFLAGS=$cf_save_CFLAGS
15087
15088 fi
15089 echo "$as_me:15089: result: $cf_cv_gcc_inline" >&5
15090 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15091     if test "$cf_cv_gcc_inline" = yes ; then
15092
15093 cf_fix_cppflags=no
15094 cf_new_cflags=
15095 cf_new_cppflags=
15096 cf_new_extra_cppflags=
15097
15098 for cf_add_cflags in --param max-inline-insns-single=1200
15099 do
15100 case $cf_fix_cppflags in
15101 no)
15102         case $cf_add_cflags in #(vi
15103         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15104                 case $cf_add_cflags in
15105                 -D*)
15106                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15107
15108                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15109                                 && test -z "${cf_tst_cflags}" \
15110                                 && cf_fix_cppflags=yes
15111
15112                         if test $cf_fix_cppflags = yes ; then
15113                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15114                                 continue
15115                         elif test "${cf_tst_cflags}" = "\"'" ; then
15116                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15117                                 continue
15118                         fi
15119                         ;;
15120                 esac
15121                 case "$CPPFLAGS" in
15122                 *$cf_add_cflags) #(vi
15123                         ;;
15124                 *) #(vi
15125                         case $cf_add_cflags in #(vi
15126                         -D*)
15127                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15128
15129 CPPFLAGS=`echo "$CPPFLAGS" | \
15130         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15131                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15132
15133                                 ;;
15134                         esac
15135                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15136                         ;;
15137                 esac
15138                 ;;
15139         *)
15140                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15141                 ;;
15142         esac
15143         ;;
15144 yes)
15145         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15146
15147         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15148
15149         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15150                 && test -z "${cf_tst_cflags}" \
15151                 && cf_fix_cppflags=no
15152         ;;
15153 esac
15154 done
15155
15156 if test -n "$cf_new_cflags" ; then
15157
15158         CFLAGS="$CFLAGS $cf_new_cflags"
15159 fi
15160
15161 if test -n "$cf_new_cppflags" ; then
15162
15163         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15164 fi
15165
15166 if test -n "$cf_new_extra_cppflags" ; then
15167
15168         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15169 fi
15170
15171     fi
15172   fi
15173 fi
15174
15175 echo "$as_me:15175: checking for signal global datatype" >&5
15176 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15177 if test "${cf_cv_sig_atomic_t+set}" = set; then
15178   echo $ECHO_N "(cached) $ECHO_C" >&6
15179 else
15180
15181         for cf_type in \
15182                 "volatile sig_atomic_t" \
15183                 "sig_atomic_t" \
15184                 "int"
15185         do
15186         cat >conftest.$ac_ext <<_ACEOF
15187 #line 15187 "configure"
15188 #include "confdefs.h"
15189
15190 #include <sys/types.h>
15191 #include <signal.h>
15192 #include <stdio.h>
15193
15194 extern $cf_type x;
15195 $cf_type x;
15196 static void handler(int sig)
15197 {
15198         x = 5;
15199 }
15200 int
15201 main ()
15202 {
15203 signal(SIGINT, handler);
15204                  x = 1
15205   ;
15206   return 0;
15207 }
15208 _ACEOF
15209 rm -f conftest.$ac_objext
15210 if { (eval echo "$as_me:15210: \"$ac_compile\"") >&5
15211   (eval $ac_compile) 2>&5
15212   ac_status=$?
15213   echo "$as_me:15213: \$? = $ac_status" >&5
15214   (exit $ac_status); } &&
15215          { ac_try='test -s conftest.$ac_objext'
15216   { (eval echo "$as_me:15216: \"$ac_try\"") >&5
15217   (eval $ac_try) 2>&5
15218   ac_status=$?
15219   echo "$as_me:15219: \$? = $ac_status" >&5
15220   (exit $ac_status); }; }; then
15221   cf_cv_sig_atomic_t=$cf_type
15222 else
15223   echo "$as_me: failed program was:" >&5
15224 cat conftest.$ac_ext >&5
15225 cf_cv_sig_atomic_t=no
15226 fi
15227 rm -f conftest.$ac_objext conftest.$ac_ext
15228                 test "$cf_cv_sig_atomic_t" != no && break
15229         done
15230
15231 fi
15232
15233 echo "$as_me:15233: result: $cf_cv_sig_atomic_t" >&5
15234 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15235 test "$cf_cv_sig_atomic_t" != no &&
15236 cat >>confdefs.h <<EOF
15237 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15238 EOF
15239
15240 if test $NCURSES_CHTYPE = auto ; then
15241
15242 echo "$as_me:15242: checking for type of chtype" >&5
15243 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15244 if test "${cf_cv_typeof_chtype+set}" = set; then
15245   echo $ECHO_N "(cached) $ECHO_C" >&6
15246 else
15247
15248                 if test "$cross_compiling" = yes; then
15249   cf_cv_typeof_chtype=long
15250 else
15251   cat >conftest.$ac_ext <<_ACEOF
15252 #line 15252 "configure"
15253 #include "confdefs.h"
15254
15255 #define WANT_BITS 31
15256 #include <stdio.h>
15257 int main()
15258 {
15259         FILE *fp = fopen("cf_test.out", "w");
15260         if (fp != 0) {
15261                 char *result = "long";
15262                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15263                         int n;
15264                         unsigned int x, y;
15265                         for (n = 0; n < WANT_BITS; n++) {
15266                                 x = (1 << n);
15267                                 y = (x >> n);
15268                                 if (y != 1 || x == 0) {
15269                                         x = 0;
15270                                         break;
15271                                 }
15272                         }
15273                         /*
15274                          * If x is nonzero, an int is big enough for the bits
15275                          * that we want.
15276                          */
15277                         result = (x != 0) ? "int" : "long";
15278                 }
15279                 fputs(result, fp);
15280                 fclose(fp);
15281         }
15282         ${cf_cv_main_return:-return}(0);
15283 }
15284
15285 _ACEOF
15286 rm -f conftest$ac_exeext
15287 if { (eval echo "$as_me:15287: \"$ac_link\"") >&5
15288   (eval $ac_link) 2>&5
15289   ac_status=$?
15290   echo "$as_me:15290: \$? = $ac_status" >&5
15291   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15292   { (eval echo "$as_me:15292: \"$ac_try\"") >&5
15293   (eval $ac_try) 2>&5
15294   ac_status=$?
15295   echo "$as_me:15295: \$? = $ac_status" >&5
15296   (exit $ac_status); }; }; then
15297   cf_cv_typeof_chtype=`cat cf_test.out`
15298 else
15299   echo "$as_me: program exited with status $ac_status" >&5
15300 echo "$as_me: failed program was:" >&5
15301 cat conftest.$ac_ext >&5
15302 cf_cv_typeof_chtype=long
15303 fi
15304 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15305 fi
15306                 rm -f cf_test.out
15307
15308 fi
15309
15310 echo "$as_me:15310: result: $cf_cv_typeof_chtype" >&5
15311 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15312
15313 cat >>confdefs.h <<EOF
15314 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15315 EOF
15316
15317 else
15318         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15319 fi
15320 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15321
15322 echo "$as_me:15322: checking if unsigned literals are legal" >&5
15323 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15324 if test "${cf_cv_unsigned_literals+set}" = set; then
15325   echo $ECHO_N "(cached) $ECHO_C" >&6
15326 else
15327
15328         cat >conftest.$ac_ext <<_ACEOF
15329 #line 15329 "configure"
15330 #include "confdefs.h"
15331
15332 int
15333 main ()
15334 {
15335 long x = 1L + 1UL + 1U + 1
15336   ;
15337   return 0;
15338 }
15339 _ACEOF
15340 rm -f conftest.$ac_objext
15341 if { (eval echo "$as_me:15341: \"$ac_compile\"") >&5
15342   (eval $ac_compile) 2>&5
15343   ac_status=$?
15344   echo "$as_me:15344: \$? = $ac_status" >&5
15345   (exit $ac_status); } &&
15346          { ac_try='test -s conftest.$ac_objext'
15347   { (eval echo "$as_me:15347: \"$ac_try\"") >&5
15348   (eval $ac_try) 2>&5
15349   ac_status=$?
15350   echo "$as_me:15350: \$? = $ac_status" >&5
15351   (exit $ac_status); }; }; then
15352   cf_cv_unsigned_literals=yes
15353 else
15354   echo "$as_me: failed program was:" >&5
15355 cat conftest.$ac_ext >&5
15356 cf_cv_unsigned_literals=no
15357 fi
15358 rm -f conftest.$ac_objext conftest.$ac_ext
15359
15360 fi
15361
15362 echo "$as_me:15362: result: $cf_cv_unsigned_literals" >&5
15363 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15364
15365 cf_cv_1UL="1"
15366 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15367 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15368
15369 if test $NCURSES_MMASK_T = auto ; then
15370         cf_cv_typeof_mmask_t=long
15371 else
15372         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15373 fi
15374 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15375
15376 ###     Checks for external-data
15377
15378 echo "$as_me:15378: checking if external errno is declared" >&5
15379 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15380 if test "${cf_cv_dcl_errno+set}" = set; then
15381   echo $ECHO_N "(cached) $ECHO_C" >&6
15382 else
15383
15384     cat >conftest.$ac_ext <<_ACEOF
15385 #line 15385 "configure"
15386 #include "confdefs.h"
15387
15388 #ifdef HAVE_STDLIB_H
15389 #include <stdlib.h>
15390 #endif
15391 #include <stdio.h>
15392 #include <sys/types.h>
15393 #include <errno.h>
15394 int
15395 main ()
15396 {
15397 int x = (int) errno
15398   ;
15399   return 0;
15400 }
15401 _ACEOF
15402 rm -f conftest.$ac_objext
15403 if { (eval echo "$as_me:15403: \"$ac_compile\"") >&5
15404   (eval $ac_compile) 2>&5
15405   ac_status=$?
15406   echo "$as_me:15406: \$? = $ac_status" >&5
15407   (exit $ac_status); } &&
15408          { ac_try='test -s conftest.$ac_objext'
15409   { (eval echo "$as_me:15409: \"$ac_try\"") >&5
15410   (eval $ac_try) 2>&5
15411   ac_status=$?
15412   echo "$as_me:15412: \$? = $ac_status" >&5
15413   (exit $ac_status); }; }; then
15414   cf_cv_dcl_errno=yes
15415 else
15416   echo "$as_me: failed program was:" >&5
15417 cat conftest.$ac_ext >&5
15418 cf_cv_dcl_errno=no
15419 fi
15420 rm -f conftest.$ac_objext conftest.$ac_ext
15421
15422 fi
15423 echo "$as_me:15423: result: $cf_cv_dcl_errno" >&5
15424 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15425
15426 if test "$cf_cv_dcl_errno" = no ; then
15427
15428 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15429
15430     cat >>confdefs.h <<EOF
15431 #define $cf_result 1
15432 EOF
15433
15434 fi
15435
15436 # It's possible (for near-UNIX clones) that the data doesn't exist
15437
15438 echo "$as_me:15438: checking if external errno exists" >&5
15439 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15440 if test "${cf_cv_have_errno+set}" = set; then
15441   echo $ECHO_N "(cached) $ECHO_C" >&6
15442 else
15443
15444     cat >conftest.$ac_ext <<_ACEOF
15445 #line 15445 "configure"
15446 #include "confdefs.h"
15447
15448 #undef errno
15449 extern int errno;
15450
15451 int
15452 main ()
15453 {
15454 errno = 2
15455   ;
15456   return 0;
15457 }
15458 _ACEOF
15459 rm -f conftest.$ac_objext conftest$ac_exeext
15460 if { (eval echo "$as_me:15460: \"$ac_link\"") >&5
15461   (eval $ac_link) 2>&5
15462   ac_status=$?
15463   echo "$as_me:15463: \$? = $ac_status" >&5
15464   (exit $ac_status); } &&
15465          { ac_try='test -s conftest$ac_exeext'
15466   { (eval echo "$as_me:15466: \"$ac_try\"") >&5
15467   (eval $ac_try) 2>&5
15468   ac_status=$?
15469   echo "$as_me:15469: \$? = $ac_status" >&5
15470   (exit $ac_status); }; }; then
15471   cf_cv_have_errno=yes
15472 else
15473   echo "$as_me: failed program was:" >&5
15474 cat conftest.$ac_ext >&5
15475 cf_cv_have_errno=no
15476 fi
15477 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15478
15479 fi
15480 echo "$as_me:15480: result: $cf_cv_have_errno" >&5
15481 echo "${ECHO_T}$cf_cv_have_errno" >&6
15482
15483 if test "$cf_cv_have_errno" = yes ; then
15484
15485 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15486
15487     cat >>confdefs.h <<EOF
15488 #define $cf_result 1
15489 EOF
15490
15491 fi
15492
15493 echo "$as_me:15493: checking if data-only library module links" >&5
15494 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15495 if test "${cf_cv_link_dataonly+set}" = set; then
15496   echo $ECHO_N "(cached) $ECHO_C" >&6
15497 else
15498
15499         rm -f conftest.a
15500         cat >conftest.$ac_ext <<EOF
15501 #line 15501 "configure"
15502 int     testdata[3] = { 123, 456, 789 };
15503 EOF
15504         if { (eval echo "$as_me:15504: \"$ac_compile\"") >&5
15505   (eval $ac_compile) 2>&5
15506   ac_status=$?
15507   echo "$as_me:15507: \$? = $ac_status" >&5
15508   (exit $ac_status); } ; then
15509                 mv conftest.o data.o && \
15510                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15511         fi
15512         rm -f conftest.$ac_ext data.o
15513         cat >conftest.$ac_ext <<EOF
15514 #line 15514 "configure"
15515 int     testfunc()
15516 {
15517 #if defined(NeXT)
15518         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15519 #else
15520         extern int testdata[3];
15521         return testdata[0] == 123
15522            &&  testdata[1] == 456
15523            &&  testdata[2] == 789;
15524 #endif
15525 }
15526 EOF
15527         if { (eval echo "$as_me:15527: \"$ac_compile\"") >&5
15528   (eval $ac_compile) 2>&5
15529   ac_status=$?
15530   echo "$as_me:15530: \$? = $ac_status" >&5
15531   (exit $ac_status); }; then
15532                 mv conftest.o func.o && \
15533                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15534         fi
15535         rm -f conftest.$ac_ext func.o
15536         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15537         cf_saveLIBS="$LIBS"
15538         LIBS="conftest.a $LIBS"
15539         if test "$cross_compiling" = yes; then
15540   cf_cv_link_dataonly=unknown
15541 else
15542   cat >conftest.$ac_ext <<_ACEOF
15543 #line 15543 "configure"
15544 #include "confdefs.h"
15545
15546         int main()
15547         {
15548                 extern int testfunc();
15549                 ${cf_cv_main_return:-return} (!testfunc());
15550         }
15551
15552 _ACEOF
15553 rm -f conftest$ac_exeext
15554 if { (eval echo "$as_me:15554: \"$ac_link\"") >&5
15555   (eval $ac_link) 2>&5
15556   ac_status=$?
15557   echo "$as_me:15557: \$? = $ac_status" >&5
15558   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15559   { (eval echo "$as_me:15559: \"$ac_try\"") >&5
15560   (eval $ac_try) 2>&5
15561   ac_status=$?
15562   echo "$as_me:15562: \$? = $ac_status" >&5
15563   (exit $ac_status); }; }; then
15564   cf_cv_link_dataonly=yes
15565 else
15566   echo "$as_me: program exited with status $ac_status" >&5
15567 echo "$as_me: failed program was:" >&5
15568 cat conftest.$ac_ext >&5
15569 cf_cv_link_dataonly=no
15570 fi
15571 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15572 fi
15573         LIBS="$cf_saveLIBS"
15574
15575 fi
15576
15577 echo "$as_me:15577: result: $cf_cv_link_dataonly" >&5
15578 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15579
15580 if test "$cf_cv_link_dataonly" = no ; then
15581
15582 cat >>confdefs.h <<\EOF
15583 #define BROKEN_LINKER 1
15584 EOF
15585
15586         BROKEN_LINKER=1
15587 fi
15588
15589 ###     Checks for library functions.
15590
15591 for ac_func in \
15592 getcwd \
15593 getegid \
15594 geteuid \
15595 getttynam \
15596 issetugid \
15597 poll \
15598 putenv \
15599 remove \
15600 select \
15601 setbuf \
15602 setbuffer \
15603 setenv \
15604 setvbuf \
15605 sigaction \
15606 sigvec \
15607 strdup \
15608 strstr \
15609 tcgetpgrp \
15610 times \
15611 vsnprintf \
15612
15613 do
15614 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15615 echo "$as_me:15615: checking for $ac_func" >&5
15616 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15617 if eval "test \"\${$as_ac_var+set}\" = set"; then
15618   echo $ECHO_N "(cached) $ECHO_C" >&6
15619 else
15620   cat >conftest.$ac_ext <<_ACEOF
15621 #line 15621 "configure"
15622 #include "confdefs.h"
15623 /* System header to define __stub macros and hopefully few prototypes,
15624     which can conflict with char $ac_func (); below.  */
15625 #include <assert.h>
15626 /* Override any gcc2 internal prototype to avoid an error.  */
15627 #ifdef __cplusplus
15628 extern "C"
15629 #endif
15630 /* We use char because int might match the return type of a gcc2
15631    builtin and then its argument prototype would still apply.  */
15632 char $ac_func ();
15633 char (*f) ();
15634
15635 int
15636 main ()
15637 {
15638 /* The GNU C library defines this for functions which it implements
15639     to always fail with ENOSYS.  Some functions are actually named
15640     something starting with __ and the normal name is an alias.  */
15641 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15642 choke me
15643 #else
15644 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15645 #endif
15646
15647   ;
15648   return 0;
15649 }
15650 _ACEOF
15651 rm -f conftest.$ac_objext conftest$ac_exeext
15652 if { (eval echo "$as_me:15652: \"$ac_link\"") >&5
15653   (eval $ac_link) 2>&5
15654   ac_status=$?
15655   echo "$as_me:15655: \$? = $ac_status" >&5
15656   (exit $ac_status); } &&
15657          { ac_try='test -s conftest$ac_exeext'
15658   { (eval echo "$as_me:15658: \"$ac_try\"") >&5
15659   (eval $ac_try) 2>&5
15660   ac_status=$?
15661   echo "$as_me:15661: \$? = $ac_status" >&5
15662   (exit $ac_status); }; }; then
15663   eval "$as_ac_var=yes"
15664 else
15665   echo "$as_me: failed program was:" >&5
15666 cat conftest.$ac_ext >&5
15667 eval "$as_ac_var=no"
15668 fi
15669 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15670 fi
15671 echo "$as_me:15671: result: `eval echo '${'$as_ac_var'}'`" >&5
15672 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15673 if test `eval echo '${'$as_ac_var'}'` = yes; then
15674   cat >>confdefs.h <<EOF
15675 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15676 EOF
15677
15678 fi
15679 done
15680
15681 if test "x$with_getcap" = "xyes" ; then
15682
15683 echo "$as_me:15683: checking for terminal-capability database functions" >&5
15684 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15685 if test "${cf_cv_cgetent+set}" = set; then
15686   echo $ECHO_N "(cached) $ECHO_C" >&6
15687 else
15688
15689 cat >conftest.$ac_ext <<_ACEOF
15690 #line 15690 "configure"
15691 #include "confdefs.h"
15692
15693 #include <stdlib.h>
15694 int
15695 main ()
15696 {
15697
15698         char temp[128];
15699         char *buf = temp;
15700         char *db_array = temp;
15701         cgetent(&buf, &db_array, "vt100");
15702         cgetcap(buf, "tc", '=');
15703         cgetmatch(buf, "tc");
15704
15705   ;
15706   return 0;
15707 }
15708 _ACEOF
15709 rm -f conftest.$ac_objext conftest$ac_exeext
15710 if { (eval echo "$as_me:15710: \"$ac_link\"") >&5
15711   (eval $ac_link) 2>&5
15712   ac_status=$?
15713   echo "$as_me:15713: \$? = $ac_status" >&5
15714   (exit $ac_status); } &&
15715          { ac_try='test -s conftest$ac_exeext'
15716   { (eval echo "$as_me:15716: \"$ac_try\"") >&5
15717   (eval $ac_try) 2>&5
15718   ac_status=$?
15719   echo "$as_me:15719: \$? = $ac_status" >&5
15720   (exit $ac_status); }; }; then
15721   cf_cv_cgetent=yes
15722 else
15723   echo "$as_me: failed program was:" >&5
15724 cat conftest.$ac_ext >&5
15725 cf_cv_cgetent=no
15726 fi
15727 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15728
15729 fi
15730 echo "$as_me:15730: result: $cf_cv_cgetent" >&5
15731 echo "${ECHO_T}$cf_cv_cgetent" >&6
15732
15733 if test "$cf_cv_cgetent" = yes
15734 then
15735
15736 cat >>confdefs.h <<\EOF
15737 #define HAVE_BSD_CGETENT 1
15738 EOF
15739
15740 echo "$as_me:15740: checking if cgetent uses const parameter" >&5
15741 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15742 if test "${cf_cv_cgetent_const+set}" = set; then
15743   echo $ECHO_N "(cached) $ECHO_C" >&6
15744 else
15745
15746 cat >conftest.$ac_ext <<_ACEOF
15747 #line 15747 "configure"
15748 #include "confdefs.h"
15749
15750 #include <stdlib.h>
15751 int
15752 main ()
15753 {
15754
15755         char temp[128];
15756         char *buf = temp;
15757 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15758         const char *db_array = temp;
15759         cgetent(&buf, &db_array, "vt100");
15760 #endif
15761         cgetcap(buf, "tc", '=');
15762         cgetmatch(buf, "tc");
15763
15764   ;
15765   return 0;
15766 }
15767 _ACEOF
15768 rm -f conftest.$ac_objext conftest$ac_exeext
15769 if { (eval echo "$as_me:15769: \"$ac_link\"") >&5
15770   (eval $ac_link) 2>&5
15771   ac_status=$?
15772   echo "$as_me:15772: \$? = $ac_status" >&5
15773   (exit $ac_status); } &&
15774          { ac_try='test -s conftest$ac_exeext'
15775   { (eval echo "$as_me:15775: \"$ac_try\"") >&5
15776   (eval $ac_try) 2>&5
15777   ac_status=$?
15778   echo "$as_me:15778: \$? = $ac_status" >&5
15779   (exit $ac_status); }; }; then
15780   cf_cv_cgetent_const=yes
15781 else
15782   echo "$as_me: failed program was:" >&5
15783 cat conftest.$ac_ext >&5
15784 cf_cv_cgetent_const=no
15785 fi
15786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15787
15788 fi
15789 echo "$as_me:15789: result: $cf_cv_cgetent_const" >&5
15790 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15791         if test "$cf_cv_cgetent_const" = yes
15792         then
15793
15794 cat >>confdefs.h <<EOF
15795 #define CGETENT_CONST const
15796 EOF
15797
15798         fi
15799 fi
15800
15801 fi
15802
15803 echo "$as_me:15803: checking for isascii" >&5
15804 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15805 if test "${cf_cv_have_isascii+set}" = set; then
15806   echo $ECHO_N "(cached) $ECHO_C" >&6
15807 else
15808
15809         cat >conftest.$ac_ext <<_ACEOF
15810 #line 15810 "configure"
15811 #include "confdefs.h"
15812 #include <ctype.h>
15813 int
15814 main ()
15815 {
15816 int x = isascii(' ')
15817   ;
15818   return 0;
15819 }
15820 _ACEOF
15821 rm -f conftest.$ac_objext conftest$ac_exeext
15822 if { (eval echo "$as_me:15822: \"$ac_link\"") >&5
15823   (eval $ac_link) 2>&5
15824   ac_status=$?
15825   echo "$as_me:15825: \$? = $ac_status" >&5
15826   (exit $ac_status); } &&
15827          { ac_try='test -s conftest$ac_exeext'
15828   { (eval echo "$as_me:15828: \"$ac_try\"") >&5
15829   (eval $ac_try) 2>&5
15830   ac_status=$?
15831   echo "$as_me:15831: \$? = $ac_status" >&5
15832   (exit $ac_status); }; }; then
15833   cf_cv_have_isascii=yes
15834 else
15835   echo "$as_me: failed program was:" >&5
15836 cat conftest.$ac_ext >&5
15837 cf_cv_have_isascii=no
15838 fi
15839 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15840
15841 fi
15842 echo "$as_me:15842: result: $cf_cv_have_isascii" >&5
15843 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15844 test "$cf_cv_have_isascii" = yes &&
15845 cat >>confdefs.h <<\EOF
15846 #define HAVE_ISASCII 1
15847 EOF
15848
15849 if test "$ac_cv_func_sigaction" = yes; then
15850 echo "$as_me:15850: checking whether sigaction needs _POSIX_SOURCE" >&5
15851 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15852 cat >conftest.$ac_ext <<_ACEOF
15853 #line 15853 "configure"
15854 #include "confdefs.h"
15855
15856 #include <sys/types.h>
15857 #include <signal.h>
15858 int
15859 main ()
15860 {
15861 struct sigaction act
15862   ;
15863   return 0;
15864 }
15865 _ACEOF
15866 rm -f conftest.$ac_objext
15867 if { (eval echo "$as_me:15867: \"$ac_compile\"") >&5
15868   (eval $ac_compile) 2>&5
15869   ac_status=$?
15870   echo "$as_me:15870: \$? = $ac_status" >&5
15871   (exit $ac_status); } &&
15872          { ac_try='test -s conftest.$ac_objext'
15873   { (eval echo "$as_me:15873: \"$ac_try\"") >&5
15874   (eval $ac_try) 2>&5
15875   ac_status=$?
15876   echo "$as_me:15876: \$? = $ac_status" >&5
15877   (exit $ac_status); }; }; then
15878   sigact_bad=no
15879 else
15880   echo "$as_me: failed program was:" >&5
15881 cat conftest.$ac_ext >&5
15882
15883 cat >conftest.$ac_ext <<_ACEOF
15884 #line 15884 "configure"
15885 #include "confdefs.h"
15886
15887 #define _POSIX_SOURCE
15888 #include <sys/types.h>
15889 #include <signal.h>
15890 int
15891 main ()
15892 {
15893 struct sigaction act
15894   ;
15895   return 0;
15896 }
15897 _ACEOF
15898 rm -f conftest.$ac_objext
15899 if { (eval echo "$as_me:15899: \"$ac_compile\"") >&5
15900   (eval $ac_compile) 2>&5
15901   ac_status=$?
15902   echo "$as_me:15902: \$? = $ac_status" >&5
15903   (exit $ac_status); } &&
15904          { ac_try='test -s conftest.$ac_objext'
15905   { (eval echo "$as_me:15905: \"$ac_try\"") >&5
15906   (eval $ac_try) 2>&5
15907   ac_status=$?
15908   echo "$as_me:15908: \$? = $ac_status" >&5
15909   (exit $ac_status); }; }; then
15910   sigact_bad=yes
15911
15912 cat >>confdefs.h <<\EOF
15913 #define _POSIX_SOURCE 1
15914 EOF
15915
15916 else
15917   echo "$as_me: failed program was:" >&5
15918 cat conftest.$ac_ext >&5
15919 sigact_bad=unknown
15920 fi
15921 rm -f conftest.$ac_objext conftest.$ac_ext
15922 fi
15923 rm -f conftest.$ac_objext conftest.$ac_ext
15924 echo "$as_me:15924: result: $sigact_bad" >&5
15925 echo "${ECHO_T}$sigact_bad" >&6
15926 fi
15927
15928 echo "$as_me:15928: checking if nanosleep really works" >&5
15929 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15930 if test "${cf_cv_func_nanosleep+set}" = set; then
15931   echo $ECHO_N "(cached) $ECHO_C" >&6
15932 else
15933
15934 if test "$cross_compiling" = yes; then
15935   cf_cv_func_nanosleep=unknown
15936 else
15937   cat >conftest.$ac_ext <<_ACEOF
15938 #line 15938 "configure"
15939 #include "confdefs.h"
15940
15941 #include <stdio.h>
15942 #include <errno.h>
15943 #include <time.h>
15944
15945 #ifdef HAVE_SYS_TIME_H
15946 #include <sys/time.h>
15947 #endif
15948
15949 int main() {
15950         struct timespec ts1, ts2;
15951         int code;
15952         ts1.tv_sec  = 0;
15953         ts1.tv_nsec = 750000000;
15954         ts2.tv_sec  = 0;
15955         ts2.tv_nsec = 0;
15956         errno = 0;
15957         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15958         ${cf_cv_main_return:-return}(code != 0);
15959 }
15960
15961 _ACEOF
15962 rm -f conftest$ac_exeext
15963 if { (eval echo "$as_me:15963: \"$ac_link\"") >&5
15964   (eval $ac_link) 2>&5
15965   ac_status=$?
15966   echo "$as_me:15966: \$? = $ac_status" >&5
15967   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15968   { (eval echo "$as_me:15968: \"$ac_try\"") >&5
15969   (eval $ac_try) 2>&5
15970   ac_status=$?
15971   echo "$as_me:15971: \$? = $ac_status" >&5
15972   (exit $ac_status); }; }; then
15973   cf_cv_func_nanosleep=yes
15974 else
15975   echo "$as_me: program exited with status $ac_status" >&5
15976 echo "$as_me: failed program was:" >&5
15977 cat conftest.$ac_ext >&5
15978 cf_cv_func_nanosleep=no
15979 fi
15980 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15981 fi
15982 fi
15983 echo "$as_me:15983: result: $cf_cv_func_nanosleep" >&5
15984 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15985
15986 test "$cf_cv_func_nanosleep" = "yes" &&
15987 cat >>confdefs.h <<\EOF
15988 #define HAVE_NANOSLEEP 1
15989 EOF
15990
15991 for ac_header in \
15992 termio.h \
15993 termios.h \
15994 unistd.h \
15995
15996 do
15997 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15998 echo "$as_me:15998: checking for $ac_header" >&5
15999 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16000 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16001   echo $ECHO_N "(cached) $ECHO_C" >&6
16002 else
16003   cat >conftest.$ac_ext <<_ACEOF
16004 #line 16004 "configure"
16005 #include "confdefs.h"
16006 #include <$ac_header>
16007 _ACEOF
16008 if { (eval echo "$as_me:16008: \"$ac_cpp conftest.$ac_ext\"") >&5
16009   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16010   ac_status=$?
16011   egrep -v '^ *\+' conftest.er1 >conftest.err
16012   rm -f conftest.er1
16013   cat conftest.err >&5
16014   echo "$as_me:16014: \$? = $ac_status" >&5
16015   (exit $ac_status); } >/dev/null; then
16016   if test -s conftest.err; then
16017     ac_cpp_err=$ac_c_preproc_warn_flag
16018   else
16019     ac_cpp_err=
16020   fi
16021 else
16022   ac_cpp_err=yes
16023 fi
16024 if test -z "$ac_cpp_err"; then
16025   eval "$as_ac_Header=yes"
16026 else
16027   echo "$as_me: failed program was:" >&5
16028   cat conftest.$ac_ext >&5
16029   eval "$as_ac_Header=no"
16030 fi
16031 rm -f conftest.err conftest.$ac_ext
16032 fi
16033 echo "$as_me:16033: result: `eval echo '${'$as_ac_Header'}'`" >&5
16034 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16035 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16036   cat >>confdefs.h <<EOF
16037 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16038 EOF
16039
16040 fi
16041 done
16042
16043 if test "$ISC" = yes ; then
16044
16045 for ac_header in sys/termio.h
16046 do
16047 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16048 echo "$as_me:16048: checking for $ac_header" >&5
16049 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16050 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16051   echo $ECHO_N "(cached) $ECHO_C" >&6
16052 else
16053   cat >conftest.$ac_ext <<_ACEOF
16054 #line 16054 "configure"
16055 #include "confdefs.h"
16056 #include <$ac_header>
16057 _ACEOF
16058 if { (eval echo "$as_me:16058: \"$ac_cpp conftest.$ac_ext\"") >&5
16059   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16060   ac_status=$?
16061   egrep -v '^ *\+' conftest.er1 >conftest.err
16062   rm -f conftest.er1
16063   cat conftest.err >&5
16064   echo "$as_me:16064: \$? = $ac_status" >&5
16065   (exit $ac_status); } >/dev/null; then
16066   if test -s conftest.err; then
16067     ac_cpp_err=$ac_c_preproc_warn_flag
16068   else
16069     ac_cpp_err=
16070   fi
16071 else
16072   ac_cpp_err=yes
16073 fi
16074 if test -z "$ac_cpp_err"; then
16075   eval "$as_ac_Header=yes"
16076 else
16077   echo "$as_me: failed program was:" >&5
16078   cat conftest.$ac_ext >&5
16079   eval "$as_ac_Header=no"
16080 fi
16081 rm -f conftest.err conftest.$ac_ext
16082 fi
16083 echo "$as_me:16083: result: `eval echo '${'$as_ac_Header'}'`" >&5
16084 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16085 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16086   cat >>confdefs.h <<EOF
16087 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16088 EOF
16089
16090 fi
16091 done
16092
16093 fi
16094 if test "$ac_cv_header_termios_h" = yes ; then
16095         case "$CFLAGS $CPPFLAGS" in
16096         *-D_POSIX_SOURCE*)
16097                 termios_bad=dunno ;;
16098         *)      termios_bad=maybe ;;
16099         esac
16100         if test "$termios_bad" = maybe ; then
16101         echo "$as_me:16101: checking whether termios.h needs _POSIX_SOURCE" >&5
16102 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16103         cat >conftest.$ac_ext <<_ACEOF
16104 #line 16104 "configure"
16105 #include "confdefs.h"
16106 #include <termios.h>
16107 int
16108 main ()
16109 {
16110 struct termios foo; int x = foo.c_iflag
16111   ;
16112   return 0;
16113 }
16114 _ACEOF
16115 rm -f conftest.$ac_objext
16116 if { (eval echo "$as_me:16116: \"$ac_compile\"") >&5
16117   (eval $ac_compile) 2>&5
16118   ac_status=$?
16119   echo "$as_me:16119: \$? = $ac_status" >&5
16120   (exit $ac_status); } &&
16121          { ac_try='test -s conftest.$ac_objext'
16122   { (eval echo "$as_me:16122: \"$ac_try\"") >&5
16123   (eval $ac_try) 2>&5
16124   ac_status=$?
16125   echo "$as_me:16125: \$? = $ac_status" >&5
16126   (exit $ac_status); }; }; then
16127   termios_bad=no
16128 else
16129   echo "$as_me: failed program was:" >&5
16130 cat conftest.$ac_ext >&5
16131
16132                 cat >conftest.$ac_ext <<_ACEOF
16133 #line 16133 "configure"
16134 #include "confdefs.h"
16135
16136 #define _POSIX_SOURCE
16137 #include <termios.h>
16138 int
16139 main ()
16140 {
16141 struct termios foo; int x = foo.c_iflag
16142   ;
16143   return 0;
16144 }
16145 _ACEOF
16146 rm -f conftest.$ac_objext
16147 if { (eval echo "$as_me:16147: \"$ac_compile\"") >&5
16148   (eval $ac_compile) 2>&5
16149   ac_status=$?
16150   echo "$as_me:16150: \$? = $ac_status" >&5
16151   (exit $ac_status); } &&
16152          { ac_try='test -s conftest.$ac_objext'
16153   { (eval echo "$as_me:16153: \"$ac_try\"") >&5
16154   (eval $ac_try) 2>&5
16155   ac_status=$?
16156   echo "$as_me:16156: \$? = $ac_status" >&5
16157   (exit $ac_status); }; }; then
16158   termios_bad=unknown
16159 else
16160   echo "$as_me: failed program was:" >&5
16161 cat conftest.$ac_ext >&5
16162 termios_bad=yes
16163 cat >>confdefs.h <<\EOF
16164 #define _POSIX_SOURCE 1
16165 EOF
16166
16167 fi
16168 rm -f conftest.$ac_objext conftest.$ac_ext
16169
16170 fi
16171 rm -f conftest.$ac_objext conftest.$ac_ext
16172         echo "$as_me:16172: result: $termios_bad" >&5
16173 echo "${ECHO_T}$termios_bad" >&6
16174         fi
16175 fi
16176
16177 echo "$as_me:16177: checking for tcgetattr" >&5
16178 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16179 if test "${cf_cv_have_tcgetattr+set}" = set; then
16180   echo $ECHO_N "(cached) $ECHO_C" >&6
16181 else
16182
16183 cat >conftest.$ac_ext <<_ACEOF
16184 #line 16184 "configure"
16185 #include "confdefs.h"
16186
16187 #include <sys/types.h>
16188 #ifdef HAVE_UNISTD_H
16189 #include <unistd.h>
16190 #endif
16191 #ifdef HAVE_TERMIOS_H
16192 #include <termios.h>
16193 #define TTY struct termios
16194 #else
16195 #ifdef HAVE_TERMIO_H
16196 #include <termio.h>
16197 #define TTY struct termio
16198 #endif
16199 #endif
16200
16201 int
16202 main ()
16203 {
16204
16205 TTY foo;
16206 tcgetattr(1, &foo);
16207   ;
16208   return 0;
16209 }
16210 _ACEOF
16211 rm -f conftest.$ac_objext conftest$ac_exeext
16212 if { (eval echo "$as_me:16212: \"$ac_link\"") >&5
16213   (eval $ac_link) 2>&5
16214   ac_status=$?
16215   echo "$as_me:16215: \$? = $ac_status" >&5
16216   (exit $ac_status); } &&
16217          { ac_try='test -s conftest$ac_exeext'
16218   { (eval echo "$as_me:16218: \"$ac_try\"") >&5
16219   (eval $ac_try) 2>&5
16220   ac_status=$?
16221   echo "$as_me:16221: \$? = $ac_status" >&5
16222   (exit $ac_status); }; }; then
16223   cf_cv_have_tcgetattr=yes
16224 else
16225   echo "$as_me: failed program was:" >&5
16226 cat conftest.$ac_ext >&5
16227 cf_cv_have_tcgetattr=no
16228 fi
16229 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16230 fi
16231 echo "$as_me:16231: result: $cf_cv_have_tcgetattr" >&5
16232 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16233 test "$cf_cv_have_tcgetattr" = yes &&
16234 cat >>confdefs.h <<\EOF
16235 #define HAVE_TCGETATTR 1
16236 EOF
16237
16238 echo "$as_me:16238: checking for vsscanf function or workaround" >&5
16239 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16240 if test "${cf_cv_func_vsscanf+set}" = set; then
16241   echo $ECHO_N "(cached) $ECHO_C" >&6
16242 else
16243
16244 cat >conftest.$ac_ext <<_ACEOF
16245 #line 16245 "configure"
16246 #include "confdefs.h"
16247
16248 #include <stdarg.h>
16249 #include <stdio.h>
16250 int
16251 main ()
16252 {
16253
16254         va_list ap;
16255         vsscanf("from", "%d", ap)
16256   ;
16257   return 0;
16258 }
16259 _ACEOF
16260 rm -f conftest.$ac_objext conftest$ac_exeext
16261 if { (eval echo "$as_me:16261: \"$ac_link\"") >&5
16262   (eval $ac_link) 2>&5
16263   ac_status=$?
16264   echo "$as_me:16264: \$? = $ac_status" >&5
16265   (exit $ac_status); } &&
16266          { ac_try='test -s conftest$ac_exeext'
16267   { (eval echo "$as_me:16267: \"$ac_try\"") >&5
16268   (eval $ac_try) 2>&5
16269   ac_status=$?
16270   echo "$as_me:16270: \$? = $ac_status" >&5
16271   (exit $ac_status); }; }; then
16272   cf_cv_func_vsscanf=vsscanf
16273 else
16274   echo "$as_me: failed program was:" >&5
16275 cat conftest.$ac_ext >&5
16276
16277 cat >conftest.$ac_ext <<_ACEOF
16278 #line 16278 "configure"
16279 #include "confdefs.h"
16280
16281 #include <stdarg.h>
16282 #include <stdio.h>
16283 int
16284 main ()
16285 {
16286
16287     FILE strbuf;
16288     char *str = "from";
16289
16290     strbuf._flag = _IOREAD;
16291     strbuf._ptr = strbuf._base = (unsigned char *) str;
16292     strbuf._cnt = strlen(str);
16293     strbuf._file = _NFILE;
16294     return (vfscanf(&strbuf, "%d", ap))
16295   ;
16296   return 0;
16297 }
16298 _ACEOF
16299 rm -f conftest.$ac_objext conftest$ac_exeext
16300 if { (eval echo "$as_me:16300: \"$ac_link\"") >&5
16301   (eval $ac_link) 2>&5
16302   ac_status=$?
16303   echo "$as_me:16303: \$? = $ac_status" >&5
16304   (exit $ac_status); } &&
16305          { ac_try='test -s conftest$ac_exeext'
16306   { (eval echo "$as_me:16306: \"$ac_try\"") >&5
16307   (eval $ac_try) 2>&5
16308   ac_status=$?
16309   echo "$as_me:16309: \$? = $ac_status" >&5
16310   (exit $ac_status); }; }; then
16311   cf_cv_func_vsscanf=vfscanf
16312 else
16313   echo "$as_me: failed program was:" >&5
16314 cat conftest.$ac_ext >&5
16315
16316 cat >conftest.$ac_ext <<_ACEOF
16317 #line 16317 "configure"
16318 #include "confdefs.h"
16319
16320 #include <stdarg.h>
16321 #include <stdio.h>
16322 int
16323 main ()
16324 {
16325
16326     FILE strbuf;
16327     char *str = "from";
16328
16329     strbuf._flag = _IOREAD;
16330     strbuf._ptr = strbuf._base = (unsigned char *) str;
16331     strbuf._cnt = strlen(str);
16332     strbuf._file = _NFILE;
16333     return (_doscan(&strbuf, "%d", ap))
16334   ;
16335   return 0;
16336 }
16337 _ACEOF
16338 rm -f conftest.$ac_objext conftest$ac_exeext
16339 if { (eval echo "$as_me:16339: \"$ac_link\"") >&5
16340   (eval $ac_link) 2>&5
16341   ac_status=$?
16342   echo "$as_me:16342: \$? = $ac_status" >&5
16343   (exit $ac_status); } &&
16344          { ac_try='test -s conftest$ac_exeext'
16345   { (eval echo "$as_me:16345: \"$ac_try\"") >&5
16346   (eval $ac_try) 2>&5
16347   ac_status=$?
16348   echo "$as_me:16348: \$? = $ac_status" >&5
16349   (exit $ac_status); }; }; then
16350   cf_cv_func_vsscanf=_doscan
16351 else
16352   echo "$as_me: failed program was:" >&5
16353 cat conftest.$ac_ext >&5
16354
16355 cf_cv_func_vsscanf=no
16356 fi
16357 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16358 fi
16359 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16360 fi
16361 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16362 fi
16363 echo "$as_me:16363: result: $cf_cv_func_vsscanf" >&5
16364 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16365
16366 case $cf_cv_func_vsscanf in #(vi
16367 vsscanf)
16368 cat >>confdefs.h <<\EOF
16369 #define HAVE_VSSCANF 1
16370 EOF
16371 ;; #(vi
16372 vfscanf)
16373 cat >>confdefs.h <<\EOF
16374 #define HAVE_VFSCANF 1
16375 EOF
16376 ;; #(vi
16377 _doscan)
16378 cat >>confdefs.h <<\EOF
16379 #define HAVE__DOSCAN 1
16380 EOF
16381 ;;
16382 esac
16383
16384 echo "$as_me:16384: checking for working mkstemp" >&5
16385 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16386 if test "${cf_cv_func_mkstemp+set}" = set; then
16387   echo $ECHO_N "(cached) $ECHO_C" >&6
16388 else
16389
16390 rm -rf conftest*
16391 if test "$cross_compiling" = yes; then
16392   cf_cv_func_mkstemp=maybe
16393 else
16394   cat >conftest.$ac_ext <<_ACEOF
16395 #line 16395 "configure"
16396 #include "confdefs.h"
16397
16398 #include <sys/types.h>
16399 #include <stdlib.h>
16400 #include <stdio.h>
16401 #include <string.h>
16402 #include <sys/stat.h>
16403 int main()
16404 {
16405         char *tmpl = "conftestXXXXXX";
16406         char name[2][80];
16407         int n;
16408         int result = 0;
16409         int fd;
16410         struct stat sb;
16411
16412         umask(077);
16413         for (n = 0; n < 2; ++n) {
16414                 strcpy(name[n], tmpl);
16415                 if ((fd = mkstemp(name[n])) >= 0) {
16416                         if (!strcmp(name[n], tmpl)
16417                          || stat(name[n], &sb) != 0
16418                          || (sb.st_mode & S_IFMT) != S_IFREG
16419                          || (sb.st_mode & 077) != 0) {
16420                                 result = 1;
16421                         }
16422                         close(fd);
16423                 }
16424         }
16425         if (result == 0
16426          && !strcmp(name[0], name[1]))
16427                 result = 1;
16428         ${cf_cv_main_return:-return}(result);
16429 }
16430
16431 _ACEOF
16432 rm -f conftest$ac_exeext
16433 if { (eval echo "$as_me:16433: \"$ac_link\"") >&5
16434   (eval $ac_link) 2>&5
16435   ac_status=$?
16436   echo "$as_me:16436: \$? = $ac_status" >&5
16437   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16438   { (eval echo "$as_me:16438: \"$ac_try\"") >&5
16439   (eval $ac_try) 2>&5
16440   ac_status=$?
16441   echo "$as_me:16441: \$? = $ac_status" >&5
16442   (exit $ac_status); }; }; then
16443   cf_cv_func_mkstemp=yes
16444
16445 else
16446   echo "$as_me: program exited with status $ac_status" >&5
16447 echo "$as_me: failed program was:" >&5
16448 cat conftest.$ac_ext >&5
16449 cf_cv_func_mkstemp=no
16450
16451 fi
16452 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16453 fi
16454
16455 fi
16456 echo "$as_me:16456: result: $cf_cv_func_mkstemp" >&5
16457 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16458 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16459         echo "$as_me:16459: checking for mkstemp" >&5
16460 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16461 if test "${ac_cv_func_mkstemp+set}" = set; then
16462   echo $ECHO_N "(cached) $ECHO_C" >&6
16463 else
16464   cat >conftest.$ac_ext <<_ACEOF
16465 #line 16465 "configure"
16466 #include "confdefs.h"
16467 /* System header to define __stub macros and hopefully few prototypes,
16468     which can conflict with char mkstemp (); below.  */
16469 #include <assert.h>
16470 /* Override any gcc2 internal prototype to avoid an error.  */
16471 #ifdef __cplusplus
16472 extern "C"
16473 #endif
16474 /* We use char because int might match the return type of a gcc2
16475    builtin and then its argument prototype would still apply.  */
16476 char mkstemp ();
16477 char (*f) ();
16478
16479 int
16480 main ()
16481 {
16482 /* The GNU C library defines this for functions which it implements
16483     to always fail with ENOSYS.  Some functions are actually named
16484     something starting with __ and the normal name is an alias.  */
16485 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16486 choke me
16487 #else
16488 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16489 #endif
16490
16491   ;
16492   return 0;
16493 }
16494 _ACEOF
16495 rm -f conftest.$ac_objext conftest$ac_exeext
16496 if { (eval echo "$as_me:16496: \"$ac_link\"") >&5
16497   (eval $ac_link) 2>&5
16498   ac_status=$?
16499   echo "$as_me:16499: \$? = $ac_status" >&5
16500   (exit $ac_status); } &&
16501          { ac_try='test -s conftest$ac_exeext'
16502   { (eval echo "$as_me:16502: \"$ac_try\"") >&5
16503   (eval $ac_try) 2>&5
16504   ac_status=$?
16505   echo "$as_me:16505: \$? = $ac_status" >&5
16506   (exit $ac_status); }; }; then
16507   ac_cv_func_mkstemp=yes
16508 else
16509   echo "$as_me: failed program was:" >&5
16510 cat conftest.$ac_ext >&5
16511 ac_cv_func_mkstemp=no
16512 fi
16513 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16514 fi
16515 echo "$as_me:16515: result: $ac_cv_func_mkstemp" >&5
16516 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16517
16518 fi
16519 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16520
16521 cat >>confdefs.h <<\EOF
16522 #define HAVE_MKSTEMP 1
16523 EOF
16524
16525 fi
16526
16527 # setup for prototype of fallback for vsscanf()
16528
16529 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16530         HAVE_VSSCANF=1
16531 else
16532         HAVE_VSSCANF=0
16533 fi
16534
16535 if test "x$cross_compiling" = xyes ; then
16536         { echo "$as_me:16536: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16537 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16538 else
16539         echo "$as_me:16539: checking whether setvbuf arguments are reversed" >&5
16540 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16541 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16542   echo $ECHO_N "(cached) $ECHO_C" >&6
16543 else
16544   if test "$cross_compiling" = yes; then
16545   { { echo "$as_me:16545: error: cannot run test program while cross compiling" >&5
16546 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16547    { (exit 1); exit 1; }; }
16548 else
16549   cat >conftest.$ac_ext <<_ACEOF
16550 #line 16550 "configure"
16551 #include "confdefs.h"
16552 #include <stdio.h>
16553 /* If setvbuf has the reversed format, exit 0. */
16554 int
16555 main ()
16556 {
16557   /* This call has the arguments reversed.
16558      A reversed system may check and see that the address of main
16559      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16560   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16561     $ac_main_return(1);
16562   putc('\r', stdout);
16563   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16564 }
16565 _ACEOF
16566 rm -f conftest$ac_exeext
16567 if { (eval echo "$as_me:16567: \"$ac_link\"") >&5
16568   (eval $ac_link) 2>&5
16569   ac_status=$?
16570   echo "$as_me:16570: \$? = $ac_status" >&5
16571   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16572   { (eval echo "$as_me:16572: \"$ac_try\"") >&5
16573   (eval $ac_try) 2>&5
16574   ac_status=$?
16575   echo "$as_me:16575: \$? = $ac_status" >&5
16576   (exit $ac_status); }; }; then
16577   ac_cv_func_setvbuf_reversed=yes
16578 else
16579   echo "$as_me: program exited with status $ac_status" >&5
16580 echo "$as_me: failed program was:" >&5
16581 cat conftest.$ac_ext >&5
16582 ac_cv_func_setvbuf_reversed=no
16583 fi
16584 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16585 fi
16586 rm -f core core.* *.core
16587 fi
16588 echo "$as_me:16588: result: $ac_cv_func_setvbuf_reversed" >&5
16589 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16590 if test $ac_cv_func_setvbuf_reversed = yes; then
16591
16592 cat >>confdefs.h <<\EOF
16593 #define SETVBUF_REVERSED 1
16594 EOF
16595
16596 fi
16597
16598 fi
16599 echo "$as_me:16599: checking for intptr_t" >&5
16600 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16601 if test "${ac_cv_type_intptr_t+set}" = set; then
16602   echo $ECHO_N "(cached) $ECHO_C" >&6
16603 else
16604   cat >conftest.$ac_ext <<_ACEOF
16605 #line 16605 "configure"
16606 #include "confdefs.h"
16607 $ac_includes_default
16608 int
16609 main ()
16610 {
16611 if ((intptr_t *) 0)
16612   return 0;
16613 if (sizeof (intptr_t))
16614   return 0;
16615   ;
16616   return 0;
16617 }
16618 _ACEOF
16619 rm -f conftest.$ac_objext
16620 if { (eval echo "$as_me:16620: \"$ac_compile\"") >&5
16621   (eval $ac_compile) 2>&5
16622   ac_status=$?
16623   echo "$as_me:16623: \$? = $ac_status" >&5
16624   (exit $ac_status); } &&
16625          { ac_try='test -s conftest.$ac_objext'
16626   { (eval echo "$as_me:16626: \"$ac_try\"") >&5
16627   (eval $ac_try) 2>&5
16628   ac_status=$?
16629   echo "$as_me:16629: \$? = $ac_status" >&5
16630   (exit $ac_status); }; }; then
16631   ac_cv_type_intptr_t=yes
16632 else
16633   echo "$as_me: failed program was:" >&5
16634 cat conftest.$ac_ext >&5
16635 ac_cv_type_intptr_t=no
16636 fi
16637 rm -f conftest.$ac_objext conftest.$ac_ext
16638 fi
16639 echo "$as_me:16639: result: $ac_cv_type_intptr_t" >&5
16640 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16641 if test $ac_cv_type_intptr_t = yes; then
16642   :
16643 else
16644
16645 cat >>confdefs.h <<EOF
16646 #define intptr_t long
16647 EOF
16648
16649 fi
16650
16651 echo "$as_me:16651: checking for type sigaction_t" >&5
16652 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16653 if test "${cf_cv_type_sigaction+set}" = set; then
16654   echo $ECHO_N "(cached) $ECHO_C" >&6
16655 else
16656
16657         cat >conftest.$ac_ext <<_ACEOF
16658 #line 16658 "configure"
16659 #include "confdefs.h"
16660
16661 #include <signal.h>
16662 int
16663 main ()
16664 {
16665 sigaction_t x
16666   ;
16667   return 0;
16668 }
16669 _ACEOF
16670 rm -f conftest.$ac_objext
16671 if { (eval echo "$as_me:16671: \"$ac_compile\"") >&5
16672   (eval $ac_compile) 2>&5
16673   ac_status=$?
16674   echo "$as_me:16674: \$? = $ac_status" >&5
16675   (exit $ac_status); } &&
16676          { ac_try='test -s conftest.$ac_objext'
16677   { (eval echo "$as_me:16677: \"$ac_try\"") >&5
16678   (eval $ac_try) 2>&5
16679   ac_status=$?
16680   echo "$as_me:16680: \$? = $ac_status" >&5
16681   (exit $ac_status); }; }; then
16682   cf_cv_type_sigaction=yes
16683 else
16684   echo "$as_me: failed program was:" >&5
16685 cat conftest.$ac_ext >&5
16686 cf_cv_type_sigaction=no
16687 fi
16688 rm -f conftest.$ac_objext conftest.$ac_ext
16689 fi
16690
16691 echo "$as_me:16691: result: $cf_cv_type_sigaction" >&5
16692 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16693 test "$cf_cv_type_sigaction" = yes &&
16694 cat >>confdefs.h <<\EOF
16695 #define HAVE_TYPE_SIGACTION 1
16696 EOF
16697
16698 echo "$as_me:16698: checking declaration of size-change" >&5
16699 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16700 if test "${cf_cv_sizechange+set}" = set; then
16701   echo $ECHO_N "(cached) $ECHO_C" >&6
16702 else
16703
16704     cf_cv_sizechange=unknown
16705     cf_save_CPPFLAGS="$CPPFLAGS"
16706
16707 for cf_opts in "" "NEED_PTEM_H"
16708 do
16709
16710     CPPFLAGS="$cf_save_CPPFLAGS"
16711     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16712     cat >conftest.$ac_ext <<_ACEOF
16713 #line 16713 "configure"
16714 #include "confdefs.h"
16715 #include <sys/types.h>
16716 #ifdef HAVE_TERMIOS_H
16717 #include <termios.h>
16718 #else
16719 #ifdef HAVE_TERMIO_H
16720 #include <termio.h>
16721 #endif
16722 #endif
16723 #ifdef NEED_PTEM_H
16724 /* This is a workaround for SCO:  they neglected to define struct winsize in
16725  * termios.h -- it's only in termio.h and ptem.h
16726  */
16727 #include        <sys/stream.h>
16728 #include        <sys/ptem.h>
16729 #endif
16730 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16731 #include <sys/ioctl.h>
16732 #endif
16733
16734 int
16735 main ()
16736 {
16737
16738 #ifdef TIOCGSIZE
16739         struct ttysize win;     /* FIXME: what system is this? */
16740         int y = win.ts_lines;
16741         int x = win.ts_cols;
16742 #else
16743 #ifdef TIOCGWINSZ
16744         struct winsize win;
16745         int y = win.ws_row;
16746         int x = win.ws_col;
16747 #else
16748         no TIOCGSIZE or TIOCGWINSZ
16749 #endif /* TIOCGWINSZ */
16750 #endif /* TIOCGSIZE */
16751
16752   ;
16753   return 0;
16754 }
16755 _ACEOF
16756 rm -f conftest.$ac_objext
16757 if { (eval echo "$as_me:16757: \"$ac_compile\"") >&5
16758   (eval $ac_compile) 2>&5
16759   ac_status=$?
16760   echo "$as_me:16760: \$? = $ac_status" >&5
16761   (exit $ac_status); } &&
16762          { ac_try='test -s conftest.$ac_objext'
16763   { (eval echo "$as_me:16763: \"$ac_try\"") >&5
16764   (eval $ac_try) 2>&5
16765   ac_status=$?
16766   echo "$as_me:16766: \$? = $ac_status" >&5
16767   (exit $ac_status); }; }; then
16768   cf_cv_sizechange=yes
16769 else
16770   echo "$as_me: failed program was:" >&5
16771 cat conftest.$ac_ext >&5
16772 cf_cv_sizechange=no
16773 fi
16774 rm -f conftest.$ac_objext conftest.$ac_ext
16775
16776         CPPFLAGS="$cf_save_CPPFLAGS"
16777         if test "$cf_cv_sizechange" = yes ; then
16778                 echo "size-change succeeded ($cf_opts)" >&5
16779                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16780                 break
16781         fi
16782 done
16783
16784 fi
16785 echo "$as_me:16785: result: $cf_cv_sizechange" >&5
16786 echo "${ECHO_T}$cf_cv_sizechange" >&6
16787 if test "$cf_cv_sizechange" != no ; then
16788
16789 cat >>confdefs.h <<\EOF
16790 #define HAVE_SIZECHANGE 1
16791 EOF
16792
16793         case $cf_cv_sizechange in #(vi
16794         NEED*)
16795                 cat >>confdefs.h <<EOF
16796 #define $cf_cv_sizechange  1
16797 EOF
16798
16799                 ;;
16800         esac
16801 fi
16802
16803 echo "$as_me:16803: checking for memmove" >&5
16804 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16805 if test "${ac_cv_func_memmove+set}" = set; then
16806   echo $ECHO_N "(cached) $ECHO_C" >&6
16807 else
16808   cat >conftest.$ac_ext <<_ACEOF
16809 #line 16809 "configure"
16810 #include "confdefs.h"
16811 /* System header to define __stub macros and hopefully few prototypes,
16812     which can conflict with char memmove (); below.  */
16813 #include <assert.h>
16814 /* Override any gcc2 internal prototype to avoid an error.  */
16815 #ifdef __cplusplus
16816 extern "C"
16817 #endif
16818 /* We use char because int might match the return type of a gcc2
16819    builtin and then its argument prototype would still apply.  */
16820 char memmove ();
16821 char (*f) ();
16822
16823 int
16824 main ()
16825 {
16826 /* The GNU C library defines this for functions which it implements
16827     to always fail with ENOSYS.  Some functions are actually named
16828     something starting with __ and the normal name is an alias.  */
16829 #if defined (__stub_memmove) || defined (__stub___memmove)
16830 choke me
16831 #else
16832 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16833 #endif
16834
16835   ;
16836   return 0;
16837 }
16838 _ACEOF
16839 rm -f conftest.$ac_objext conftest$ac_exeext
16840 if { (eval echo "$as_me:16840: \"$ac_link\"") >&5
16841   (eval $ac_link) 2>&5
16842   ac_status=$?
16843   echo "$as_me:16843: \$? = $ac_status" >&5
16844   (exit $ac_status); } &&
16845          { ac_try='test -s conftest$ac_exeext'
16846   { (eval echo "$as_me:16846: \"$ac_try\"") >&5
16847   (eval $ac_try) 2>&5
16848   ac_status=$?
16849   echo "$as_me:16849: \$? = $ac_status" >&5
16850   (exit $ac_status); }; }; then
16851   ac_cv_func_memmove=yes
16852 else
16853   echo "$as_me: failed program was:" >&5
16854 cat conftest.$ac_ext >&5
16855 ac_cv_func_memmove=no
16856 fi
16857 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16858 fi
16859 echo "$as_me:16859: result: $ac_cv_func_memmove" >&5
16860 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16861 if test $ac_cv_func_memmove = yes; then
16862   :
16863 else
16864
16865 echo "$as_me:16865: checking for bcopy" >&5
16866 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16867 if test "${ac_cv_func_bcopy+set}" = set; then
16868   echo $ECHO_N "(cached) $ECHO_C" >&6
16869 else
16870   cat >conftest.$ac_ext <<_ACEOF
16871 #line 16871 "configure"
16872 #include "confdefs.h"
16873 /* System header to define __stub macros and hopefully few prototypes,
16874     which can conflict with char bcopy (); below.  */
16875 #include <assert.h>
16876 /* Override any gcc2 internal prototype to avoid an error.  */
16877 #ifdef __cplusplus
16878 extern "C"
16879 #endif
16880 /* We use char because int might match the return type of a gcc2
16881    builtin and then its argument prototype would still apply.  */
16882 char bcopy ();
16883 char (*f) ();
16884
16885 int
16886 main ()
16887 {
16888 /* The GNU C library defines this for functions which it implements
16889     to always fail with ENOSYS.  Some functions are actually named
16890     something starting with __ and the normal name is an alias.  */
16891 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16892 choke me
16893 #else
16894 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16895 #endif
16896
16897   ;
16898   return 0;
16899 }
16900 _ACEOF
16901 rm -f conftest.$ac_objext conftest$ac_exeext
16902 if { (eval echo "$as_me:16902: \"$ac_link\"") >&5
16903   (eval $ac_link) 2>&5
16904   ac_status=$?
16905   echo "$as_me:16905: \$? = $ac_status" >&5
16906   (exit $ac_status); } &&
16907          { ac_try='test -s conftest$ac_exeext'
16908   { (eval echo "$as_me:16908: \"$ac_try\"") >&5
16909   (eval $ac_try) 2>&5
16910   ac_status=$?
16911   echo "$as_me:16911: \$? = $ac_status" >&5
16912   (exit $ac_status); }; }; then
16913   ac_cv_func_bcopy=yes
16914 else
16915   echo "$as_me: failed program was:" >&5
16916 cat conftest.$ac_ext >&5
16917 ac_cv_func_bcopy=no
16918 fi
16919 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16920 fi
16921 echo "$as_me:16921: result: $ac_cv_func_bcopy" >&5
16922 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16923 if test $ac_cv_func_bcopy = yes; then
16924
16925         echo "$as_me:16925: checking if bcopy does overlapping moves" >&5
16926 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16927 if test "${cf_cv_good_bcopy+set}" = set; then
16928   echo $ECHO_N "(cached) $ECHO_C" >&6
16929 else
16930
16931                 if test "$cross_compiling" = yes; then
16932   cf_cv_good_bcopy=unknown
16933 else
16934   cat >conftest.$ac_ext <<_ACEOF
16935 #line 16935 "configure"
16936 #include "confdefs.h"
16937
16938 int main() {
16939         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16940         char temp[40];
16941         bcopy(data, temp, sizeof(data));
16942         bcopy(temp+10, temp, 15);
16943         bcopy(temp+5, temp+15, 10);
16944         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16945 }
16946
16947 _ACEOF
16948 rm -f conftest$ac_exeext
16949 if { (eval echo "$as_me:16949: \"$ac_link\"") >&5
16950   (eval $ac_link) 2>&5
16951   ac_status=$?
16952   echo "$as_me:16952: \$? = $ac_status" >&5
16953   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16954   { (eval echo "$as_me:16954: \"$ac_try\"") >&5
16955   (eval $ac_try) 2>&5
16956   ac_status=$?
16957   echo "$as_me:16957: \$? = $ac_status" >&5
16958   (exit $ac_status); }; }; then
16959   cf_cv_good_bcopy=yes
16960 else
16961   echo "$as_me: program exited with status $ac_status" >&5
16962 echo "$as_me: failed program was:" >&5
16963 cat conftest.$ac_ext >&5
16964 cf_cv_good_bcopy=no
16965 fi
16966 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16967 fi
16968
16969 fi
16970 echo "$as_me:16970: result: $cf_cv_good_bcopy" >&5
16971 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16972
16973 else
16974   cf_cv_good_bcopy=no
16975 fi
16976
16977         if test "$cf_cv_good_bcopy" = yes ; then
16978
16979 cat >>confdefs.h <<\EOF
16980 #define USE_OK_BCOPY 1
16981 EOF
16982
16983         else
16984
16985 cat >>confdefs.h <<\EOF
16986 #define USE_MY_MEMMOVE 1
16987 EOF
16988
16989         fi
16990
16991 fi
16992
16993 echo "$as_me:16993: checking if poll really works" >&5
16994 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16995 if test "${cf_cv_working_poll+set}" = set; then
16996   echo $ECHO_N "(cached) $ECHO_C" >&6
16997 else
16998
16999 if test "$cross_compiling" = yes; then
17000   cf_cv_working_poll=unknown
17001 else
17002   cat >conftest.$ac_ext <<_ACEOF
17003 #line 17003 "configure"
17004 #include "confdefs.h"
17005
17006 #include <stdlib.h>
17007 #include <stdio.h>
17008 #include <unistd.h>
17009 #include <fcntl.h>
17010 #ifdef HAVE_POLL_H
17011 #include <poll.h>
17012 #else
17013 #include <sys/poll.h>
17014 #endif
17015 int main() {
17016         struct pollfd myfds;
17017         int ret;
17018
17019         /* check for Darwin bug with respect to "devices" */
17020         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17021         if (myfds.fd < 0)
17022                 myfds.fd = 0;
17023         myfds.events = POLLIN;
17024         myfds.revents = 0;
17025
17026         ret = poll(&myfds, 1, 100);
17027
17028         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17029                 ret = -1;
17030         } else {
17031                 int fd = 0;
17032                 if (!isatty(fd)) {
17033                         fd = open("/dev/tty", 2);       /* O_RDWR */
17034                 }
17035
17036                 if (fd >= 0) {
17037                         /* also check with standard input */
17038                         myfds.fd = fd;
17039                         myfds.events = POLLIN;
17040                         myfds.revents = 0;
17041                         ret = poll(&myfds, 1, 100);
17042                 } else {
17043                         ret = -1;
17044                 }
17045         }
17046         ${cf_cv_main_return:-return}(ret < 0);
17047 }
17048 _ACEOF
17049 rm -f conftest$ac_exeext
17050 if { (eval echo "$as_me:17050: \"$ac_link\"") >&5
17051   (eval $ac_link) 2>&5
17052   ac_status=$?
17053   echo "$as_me:17053: \$? = $ac_status" >&5
17054   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17055   { (eval echo "$as_me:17055: \"$ac_try\"") >&5
17056   (eval $ac_try) 2>&5
17057   ac_status=$?
17058   echo "$as_me:17058: \$? = $ac_status" >&5
17059   (exit $ac_status); }; }; then
17060   cf_cv_working_poll=yes
17061 else
17062   echo "$as_me: program exited with status $ac_status" >&5
17063 echo "$as_me: failed program was:" >&5
17064 cat conftest.$ac_ext >&5
17065 cf_cv_working_poll=no
17066 fi
17067 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17068 fi
17069 fi
17070 echo "$as_me:17070: result: $cf_cv_working_poll" >&5
17071 echo "${ECHO_T}$cf_cv_working_poll" >&6
17072 test "$cf_cv_working_poll" = "yes" &&
17073 cat >>confdefs.h <<\EOF
17074 #define HAVE_WORKING_POLL 1
17075 EOF
17076
17077 echo "$as_me:17077: checking for va_copy" >&5
17078 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17079 if test "${cf_cv_have_va_copy+set}" = set; then
17080   echo $ECHO_N "(cached) $ECHO_C" >&6
17081 else
17082
17083 cat >conftest.$ac_ext <<_ACEOF
17084 #line 17084 "configure"
17085 #include "confdefs.h"
17086
17087 #include <stdarg.h>
17088
17089 int
17090 main ()
17091 {
17092
17093         static va_list dst;
17094         static va_list src;
17095         va_copy(dst, src)
17096   ;
17097   return 0;
17098 }
17099 _ACEOF
17100 rm -f conftest.$ac_objext conftest$ac_exeext
17101 if { (eval echo "$as_me:17101: \"$ac_link\"") >&5
17102   (eval $ac_link) 2>&5
17103   ac_status=$?
17104   echo "$as_me:17104: \$? = $ac_status" >&5
17105   (exit $ac_status); } &&
17106          { ac_try='test -s conftest$ac_exeext'
17107   { (eval echo "$as_me:17107: \"$ac_try\"") >&5
17108   (eval $ac_try) 2>&5
17109   ac_status=$?
17110   echo "$as_me:17110: \$? = $ac_status" >&5
17111   (exit $ac_status); }; }; then
17112   cf_cv_have_va_copy=yes
17113 else
17114   echo "$as_me: failed program was:" >&5
17115 cat conftest.$ac_ext >&5
17116 cf_cv_have_va_copy=no
17117 fi
17118 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17119 fi
17120 echo "$as_me:17120: result: $cf_cv_have_va_copy" >&5
17121 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17122
17123 test "$cf_cv_have_va_copy" = yes &&
17124 cat >>confdefs.h <<\EOF
17125 #define HAVE_VA_COPY 1
17126 EOF
17127
17128 echo "$as_me:17128: checking for __va_copy" >&5
17129 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17130 if test "${cf_cv_have___va_copy+set}" = set; then
17131   echo $ECHO_N "(cached) $ECHO_C" >&6
17132 else
17133
17134 cat >conftest.$ac_ext <<_ACEOF
17135 #line 17135 "configure"
17136 #include "confdefs.h"
17137
17138 #include <stdarg.h>
17139
17140 int
17141 main ()
17142 {
17143
17144         static va_list dst;
17145         static va_list src;
17146         __va_copy(dst, src)
17147   ;
17148   return 0;
17149 }
17150 _ACEOF
17151 rm -f conftest.$ac_objext conftest$ac_exeext
17152 if { (eval echo "$as_me:17152: \"$ac_link\"") >&5
17153   (eval $ac_link) 2>&5
17154   ac_status=$?
17155   echo "$as_me:17155: \$? = $ac_status" >&5
17156   (exit $ac_status); } &&
17157          { ac_try='test -s conftest$ac_exeext'
17158   { (eval echo "$as_me:17158: \"$ac_try\"") >&5
17159   (eval $ac_try) 2>&5
17160   ac_status=$?
17161   echo "$as_me:17161: \$? = $ac_status" >&5
17162   (exit $ac_status); }; }; then
17163   cf_cv_have___va_copy=yes
17164 else
17165   echo "$as_me: failed program was:" >&5
17166 cat conftest.$ac_ext >&5
17167 cf_cv_have___va_copy=no
17168 fi
17169 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17170 fi
17171 echo "$as_me:17171: result: $cf_cv_have___va_copy" >&5
17172 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17173
17174 test "$cf_cv_have___va_copy" = yes &&
17175 cat >>confdefs.h <<\EOF
17176 #define HAVE___VA_COPY 1
17177 EOF
17178
17179 echo "$as_me:17179: checking for pid_t" >&5
17180 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17181 if test "${ac_cv_type_pid_t+set}" = set; then
17182   echo $ECHO_N "(cached) $ECHO_C" >&6
17183 else
17184   cat >conftest.$ac_ext <<_ACEOF
17185 #line 17185 "configure"
17186 #include "confdefs.h"
17187 $ac_includes_default
17188 int
17189 main ()
17190 {
17191 if ((pid_t *) 0)
17192   return 0;
17193 if (sizeof (pid_t))
17194   return 0;
17195   ;
17196   return 0;
17197 }
17198 _ACEOF
17199 rm -f conftest.$ac_objext
17200 if { (eval echo "$as_me:17200: \"$ac_compile\"") >&5
17201   (eval $ac_compile) 2>&5
17202   ac_status=$?
17203   echo "$as_me:17203: \$? = $ac_status" >&5
17204   (exit $ac_status); } &&
17205          { ac_try='test -s conftest.$ac_objext'
17206   { (eval echo "$as_me:17206: \"$ac_try\"") >&5
17207   (eval $ac_try) 2>&5
17208   ac_status=$?
17209   echo "$as_me:17209: \$? = $ac_status" >&5
17210   (exit $ac_status); }; }; then
17211   ac_cv_type_pid_t=yes
17212 else
17213   echo "$as_me: failed program was:" >&5
17214 cat conftest.$ac_ext >&5
17215 ac_cv_type_pid_t=no
17216 fi
17217 rm -f conftest.$ac_objext conftest.$ac_ext
17218 fi
17219 echo "$as_me:17219: result: $ac_cv_type_pid_t" >&5
17220 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17221 if test $ac_cv_type_pid_t = yes; then
17222   :
17223 else
17224
17225 cat >>confdefs.h <<EOF
17226 #define pid_t int
17227 EOF
17228
17229 fi
17230
17231 for ac_header in unistd.h vfork.h
17232 do
17233 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17234 echo "$as_me:17234: checking for $ac_header" >&5
17235 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17236 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17237   echo $ECHO_N "(cached) $ECHO_C" >&6
17238 else
17239   cat >conftest.$ac_ext <<_ACEOF
17240 #line 17240 "configure"
17241 #include "confdefs.h"
17242 #include <$ac_header>
17243 _ACEOF
17244 if { (eval echo "$as_me:17244: \"$ac_cpp conftest.$ac_ext\"") >&5
17245   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17246   ac_status=$?
17247   egrep -v '^ *\+' conftest.er1 >conftest.err
17248   rm -f conftest.er1
17249   cat conftest.err >&5
17250   echo "$as_me:17250: \$? = $ac_status" >&5
17251   (exit $ac_status); } >/dev/null; then
17252   if test -s conftest.err; then
17253     ac_cpp_err=$ac_c_preproc_warn_flag
17254   else
17255     ac_cpp_err=
17256   fi
17257 else
17258   ac_cpp_err=yes
17259 fi
17260 if test -z "$ac_cpp_err"; then
17261   eval "$as_ac_Header=yes"
17262 else
17263   echo "$as_me: failed program was:" >&5
17264   cat conftest.$ac_ext >&5
17265   eval "$as_ac_Header=no"
17266 fi
17267 rm -f conftest.err conftest.$ac_ext
17268 fi
17269 echo "$as_me:17269: result: `eval echo '${'$as_ac_Header'}'`" >&5
17270 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17271 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17272   cat >>confdefs.h <<EOF
17273 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17274 EOF
17275
17276 fi
17277 done
17278
17279 for ac_func in fork vfork
17280 do
17281 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17282 echo "$as_me:17282: checking for $ac_func" >&5
17283 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17284 if eval "test \"\${$as_ac_var+set}\" = set"; then
17285   echo $ECHO_N "(cached) $ECHO_C" >&6
17286 else
17287   cat >conftest.$ac_ext <<_ACEOF
17288 #line 17288 "configure"
17289 #include "confdefs.h"
17290 /* System header to define __stub macros and hopefully few prototypes,
17291     which can conflict with char $ac_func (); below.  */
17292 #include <assert.h>
17293 /* Override any gcc2 internal prototype to avoid an error.  */
17294 #ifdef __cplusplus
17295 extern "C"
17296 #endif
17297 /* We use char because int might match the return type of a gcc2
17298    builtin and then its argument prototype would still apply.  */
17299 char $ac_func ();
17300 char (*f) ();
17301
17302 int
17303 main ()
17304 {
17305 /* The GNU C library defines this for functions which it implements
17306     to always fail with ENOSYS.  Some functions are actually named
17307     something starting with __ and the normal name is an alias.  */
17308 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17309 choke me
17310 #else
17311 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17312 #endif
17313
17314   ;
17315   return 0;
17316 }
17317 _ACEOF
17318 rm -f conftest.$ac_objext conftest$ac_exeext
17319 if { (eval echo "$as_me:17319: \"$ac_link\"") >&5
17320   (eval $ac_link) 2>&5
17321   ac_status=$?
17322   echo "$as_me:17322: \$? = $ac_status" >&5
17323   (exit $ac_status); } &&
17324          { ac_try='test -s conftest$ac_exeext'
17325   { (eval echo "$as_me:17325: \"$ac_try\"") >&5
17326   (eval $ac_try) 2>&5
17327   ac_status=$?
17328   echo "$as_me:17328: \$? = $ac_status" >&5
17329   (exit $ac_status); }; }; then
17330   eval "$as_ac_var=yes"
17331 else
17332   echo "$as_me: failed program was:" >&5
17333 cat conftest.$ac_ext >&5
17334 eval "$as_ac_var=no"
17335 fi
17336 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17337 fi
17338 echo "$as_me:17338: result: `eval echo '${'$as_ac_var'}'`" >&5
17339 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17340 if test `eval echo '${'$as_ac_var'}'` = yes; then
17341   cat >>confdefs.h <<EOF
17342 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17343 EOF
17344
17345 fi
17346 done
17347
17348 ac_cv_func_fork_works=$ac_cv_func_fork
17349 if test "x$ac_cv_func_fork" = xyes; then
17350   echo "$as_me:17350: checking for working fork" >&5
17351 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17352 if test "${ac_cv_func_fork_works+set}" = set; then
17353   echo $ECHO_N "(cached) $ECHO_C" >&6
17354 else
17355   if test "$cross_compiling" = yes; then
17356   ac_cv_func_fork_works=cross
17357 else
17358   cat >conftest.$ac_ext <<_ACEOF
17359 /* By Rüdiger Kuhlmann. */
17360       #include <sys/types.h>
17361       #if HAVE_UNISTD_H
17362       # include <unistd.h>
17363       #endif
17364       /* Some systems only have a dummy stub for fork() */
17365       int main ()
17366       {
17367         if (fork() < 0)
17368           $ac_main_return (1);
17369         $ac_main_return (0);
17370       }
17371 _ACEOF
17372 rm -f conftest$ac_exeext
17373 if { (eval echo "$as_me:17373: \"$ac_link\"") >&5
17374   (eval $ac_link) 2>&5
17375   ac_status=$?
17376   echo "$as_me:17376: \$? = $ac_status" >&5
17377   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17378   { (eval echo "$as_me:17378: \"$ac_try\"") >&5
17379   (eval $ac_try) 2>&5
17380   ac_status=$?
17381   echo "$as_me:17381: \$? = $ac_status" >&5
17382   (exit $ac_status); }; }; then
17383   ac_cv_func_fork_works=yes
17384 else
17385   echo "$as_me: program exited with status $ac_status" >&5
17386 echo "$as_me: failed program was:" >&5
17387 cat conftest.$ac_ext >&5
17388 ac_cv_func_fork_works=no
17389 fi
17390 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17391 fi
17392 fi
17393 echo "$as_me:17393: result: $ac_cv_func_fork_works" >&5
17394 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17395
17396 fi
17397 if test "x$ac_cv_func_fork_works" = xcross; then
17398   case $host in
17399     *-*-amigaos* | *-*-msdosdjgpp*)
17400       # Override, as these systems have only a dummy fork() stub
17401       ac_cv_func_fork_works=no
17402       ;;
17403     *)
17404       ac_cv_func_fork_works=yes
17405       ;;
17406   esac
17407   { echo "$as_me:17407: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17408 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17409 fi
17410 ac_cv_func_vfork_works=$ac_cv_func_vfork
17411 if test "x$ac_cv_func_vfork" = xyes; then
17412   echo "$as_me:17412: checking for working vfork" >&5
17413 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17414 if test "${ac_cv_func_vfork_works+set}" = set; then
17415   echo $ECHO_N "(cached) $ECHO_C" >&6
17416 else
17417   if test "$cross_compiling" = yes; then
17418   ac_cv_func_vfork_works=cross
17419 else
17420   cat >conftest.$ac_ext <<_ACEOF
17421 #line 17421 "configure"
17422 #include "confdefs.h"
17423 /* Thanks to Paul Eggert for this test.  */
17424 #include <stdio.h>
17425 #include <sys/types.h>
17426 #include <sys/stat.h>
17427 #if HAVE_UNISTD_H
17428 # include <unistd.h>
17429 #endif
17430 #if HAVE_VFORK_H
17431 # include <vfork.h>
17432 #endif
17433 /* On some sparc systems, changes by the child to local and incoming
17434    argument registers are propagated back to the parent.  The compiler
17435    is told about this with #include <vfork.h>, but some compilers
17436    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17437    static variable whose address is put into a register that is
17438    clobbered by the vfork.  */
17439 static
17440 #ifdef __cplusplus
17441 sparc_address_test (int arg)
17442 # else
17443 sparc_address_test (arg) int arg;
17444 #endif
17445 {
17446   static pid_t child;
17447   if (!child) {
17448     child = vfork ();
17449     if (child < 0) {
17450       perror ("vfork");
17451       _exit(2);
17452     }
17453     if (!child) {
17454       arg = getpid();
17455       write(-1, "", 0);
17456       _exit (arg);
17457     }
17458   }
17459 }
17460
17461 int
17462 main ()
17463 {
17464   pid_t parent = getpid ();
17465   pid_t child;
17466
17467   sparc_address_test ();
17468
17469   child = vfork ();
17470
17471   if (child == 0) {
17472     /* Here is another test for sparc vfork register problems.  This
17473        test uses lots of local variables, at least as many local
17474        variables as main has allocated so far including compiler
17475        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17476        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17477        reuse the register of parent for one of the local variables,
17478        since it will think that parent can't possibly be used any more
17479        in this routine.  Assigning to the local variable will thus
17480        munge parent in the parent process.  */
17481     pid_t
17482       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17483       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17484     /* Convince the compiler that p..p7 are live; otherwise, it might
17485        use the same hardware register for all 8 local variables.  */
17486     if (p != p1 || p != p2 || p != p3 || p != p4
17487         || p != p5 || p != p6 || p != p7)
17488       _exit(1);
17489
17490     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17491        from child file descriptors.  If the child closes a descriptor
17492        before it execs or exits, this munges the parent's descriptor
17493        as well.  Test for this by closing stdout in the child.  */
17494     _exit(close(fileno(stdout)) != 0);
17495   } else {
17496     int status;
17497     struct stat st;
17498
17499     while (wait(&status) != child)
17500       ;
17501     $ac_main_return(
17502          /* Was there some problem with vforking?  */
17503          child < 0
17504
17505          /* Did the child fail?  (This shouldn't happen.)  */
17506          || status
17507
17508          /* Did the vfork/compiler bug occur?  */
17509          || parent != getpid()
17510
17511          /* Did the file descriptor bug occur?  */
17512          || fstat(fileno(stdout), &st) != 0
17513          );
17514   }
17515 }
17516 _ACEOF
17517 rm -f conftest$ac_exeext
17518 if { (eval echo "$as_me:17518: \"$ac_link\"") >&5
17519   (eval $ac_link) 2>&5
17520   ac_status=$?
17521   echo "$as_me:17521: \$? = $ac_status" >&5
17522   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17523   { (eval echo "$as_me:17523: \"$ac_try\"") >&5
17524   (eval $ac_try) 2>&5
17525   ac_status=$?
17526   echo "$as_me:17526: \$? = $ac_status" >&5
17527   (exit $ac_status); }; }; then
17528   ac_cv_func_vfork_works=yes
17529 else
17530   echo "$as_me: program exited with status $ac_status" >&5
17531 echo "$as_me: failed program was:" >&5
17532 cat conftest.$ac_ext >&5
17533 ac_cv_func_vfork_works=no
17534 fi
17535 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17536 fi
17537 fi
17538 echo "$as_me:17538: result: $ac_cv_func_vfork_works" >&5
17539 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17540
17541 fi;
17542 if test "x$ac_cv_func_fork_works" = xcross; then
17543   ac_cv_func_vfork_works=ac_cv_func_vfork
17544   { echo "$as_me:17544: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17545 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17546 fi
17547
17548 if test "x$ac_cv_func_vfork_works" = xyes; then
17549
17550 cat >>confdefs.h <<\EOF
17551 #define HAVE_WORKING_VFORK 1
17552 EOF
17553
17554 else
17555
17556 cat >>confdefs.h <<\EOF
17557 #define vfork fork
17558 EOF
17559
17560 fi
17561 if test "x$ac_cv_func_fork_works" = xyes; then
17562
17563 cat >>confdefs.h <<\EOF
17564 #define HAVE_WORKING_FORK 1
17565 EOF
17566
17567 fi
17568
17569 # special check for test/ditto.c
17570
17571 echo "$as_me:17571: checking for openpty in -lutil" >&5
17572 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17573 if test "${ac_cv_lib_util_openpty+set}" = set; then
17574   echo $ECHO_N "(cached) $ECHO_C" >&6
17575 else
17576   ac_check_lib_save_LIBS=$LIBS
17577 LIBS="-lutil  $LIBS"
17578 cat >conftest.$ac_ext <<_ACEOF
17579 #line 17579 "configure"
17580 #include "confdefs.h"
17581
17582 /* Override any gcc2 internal prototype to avoid an error.  */
17583 #ifdef __cplusplus
17584 extern "C"
17585 #endif
17586 /* We use char because int might match the return type of a gcc2
17587    builtin and then its argument prototype would still apply.  */
17588 char openpty ();
17589 int
17590 main ()
17591 {
17592 openpty ();
17593   ;
17594   return 0;
17595 }
17596 _ACEOF
17597 rm -f conftest.$ac_objext conftest$ac_exeext
17598 if { (eval echo "$as_me:17598: \"$ac_link\"") >&5
17599   (eval $ac_link) 2>&5
17600   ac_status=$?
17601   echo "$as_me:17601: \$? = $ac_status" >&5
17602   (exit $ac_status); } &&
17603          { ac_try='test -s conftest$ac_exeext'
17604   { (eval echo "$as_me:17604: \"$ac_try\"") >&5
17605   (eval $ac_try) 2>&5
17606   ac_status=$?
17607   echo "$as_me:17607: \$? = $ac_status" >&5
17608   (exit $ac_status); }; }; then
17609   ac_cv_lib_util_openpty=yes
17610 else
17611   echo "$as_me: failed program was:" >&5
17612 cat conftest.$ac_ext >&5
17613 ac_cv_lib_util_openpty=no
17614 fi
17615 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17616 LIBS=$ac_check_lib_save_LIBS
17617 fi
17618 echo "$as_me:17618: result: $ac_cv_lib_util_openpty" >&5
17619 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17620 if test $ac_cv_lib_util_openpty = yes; then
17621   cf_cv_lib_util=yes
17622 else
17623   cf_cv_lib_util=no
17624 fi
17625
17626 echo "$as_me:17626: checking for openpty header" >&5
17627 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17628 if test "${cf_cv_func_openpty+set}" = set; then
17629   echo $ECHO_N "(cached) $ECHO_C" >&6
17630 else
17631
17632     cf_save_LIBS="$LIBS"
17633     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17634     for cf_header in pty.h libutil.h util.h
17635     do
17636     cat >conftest.$ac_ext <<_ACEOF
17637 #line 17637 "configure"
17638 #include "confdefs.h"
17639
17640 #include <$cf_header>
17641
17642 int
17643 main ()
17644 {
17645
17646     int x = openpty((int *)0, (int *)0, (char *)0,
17647                    (struct termios *)0, (struct winsize *)0);
17648
17649   ;
17650   return 0;
17651 }
17652 _ACEOF
17653 rm -f conftest.$ac_objext conftest$ac_exeext
17654 if { (eval echo "$as_me:17654: \"$ac_link\"") >&5
17655   (eval $ac_link) 2>&5
17656   ac_status=$?
17657   echo "$as_me:17657: \$? = $ac_status" >&5
17658   (exit $ac_status); } &&
17659          { ac_try='test -s conftest$ac_exeext'
17660   { (eval echo "$as_me:17660: \"$ac_try\"") >&5
17661   (eval $ac_try) 2>&5
17662   ac_status=$?
17663   echo "$as_me:17663: \$? = $ac_status" >&5
17664   (exit $ac_status); }; }; then
17665
17666         cf_cv_func_openpty=$cf_header
17667         break
17668
17669 else
17670   echo "$as_me: failed program was:" >&5
17671 cat conftest.$ac_ext >&5
17672
17673         cf_cv_func_openpty=no
17674
17675 fi
17676 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17677     done
17678     LIBS="$cf_save_LIBS"
17679
17680 fi
17681 echo "$as_me:17681: result: $cf_cv_func_openpty" >&5
17682 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17683
17684 if test "$cf_cv_func_openpty" != no ; then
17685
17686 cat >>confdefs.h <<EOF
17687 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17688 EOF
17689
17690 cat >>confdefs.h <<\EOF
17691 #define USE_XTERM_PTY 1
17692 EOF
17693
17694     if test "x$cf_cv_lib_util" = xyes ; then
17695         TEST_LIBS="-lutil $TEST_LIBS"
17696     fi
17697 fi
17698
17699 if test "$with_hashed_db" != no ; then
17700
17701 cat >>confdefs.h <<\EOF
17702 #define USE_HASHED_DB 1
17703 EOF
17704
17705 case $with_hashed_db in #(vi
17706 yes|*able*) #(vi
17707     ;;
17708 *)
17709     if test -d "$with_hashed_db" ; then
17710
17711 if test -n "$with_hashed_db/include" ; then
17712   for cf_add_incdir in $with_hashed_db/include
17713   do
17714         while test $cf_add_incdir != /usr/include
17715         do
17716           if test -d $cf_add_incdir
17717           then
17718                 cf_have_incdir=no
17719                 if test -n "$CFLAGS$CPPFLAGS" ; then
17720                   # a loop is needed to ensure we can add subdirs of existing dirs
17721                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17722                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17723                           cf_have_incdir=yes; break
17724                         fi
17725                   done
17726                 fi
17727
17728                 if test "$cf_have_incdir" = no ; then
17729                   if test "$cf_add_incdir" = /usr/local/include ; then
17730                         if test "$GCC" = yes
17731                         then
17732                           cf_save_CPPFLAGS=$CPPFLAGS
17733                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17734                           cat >conftest.$ac_ext <<_ACEOF
17735 #line 17735 "configure"
17736 #include "confdefs.h"
17737 #include <stdio.h>
17738 int
17739 main ()
17740 {
17741 printf("Hello")
17742   ;
17743   return 0;
17744 }
17745 _ACEOF
17746 rm -f conftest.$ac_objext
17747 if { (eval echo "$as_me:17747: \"$ac_compile\"") >&5
17748   (eval $ac_compile) 2>&5
17749   ac_status=$?
17750   echo "$as_me:17750: \$? = $ac_status" >&5
17751   (exit $ac_status); } &&
17752          { ac_try='test -s conftest.$ac_objext'
17753   { (eval echo "$as_me:17753: \"$ac_try\"") >&5
17754   (eval $ac_try) 2>&5
17755   ac_status=$?
17756   echo "$as_me:17756: \$? = $ac_status" >&5
17757   (exit $ac_status); }; }; then
17758   :
17759 else
17760   echo "$as_me: failed program was:" >&5
17761 cat conftest.$ac_ext >&5
17762 cf_have_incdir=yes
17763 fi
17764 rm -f conftest.$ac_objext conftest.$ac_ext
17765                           CPPFLAGS=$cf_save_CPPFLAGS
17766                         fi
17767                   fi
17768                 fi
17769
17770                 if test "$cf_have_incdir" = no ; then
17771                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17772
17773 echo "${as_me:-configure}:17773: testing adding $cf_add_incdir to include-path ..." 1>&5
17774
17775                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17776
17777                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17778                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17779                   cf_add_incdir="$cf_top_incdir"
17780                 else
17781                   break
17782                 fi
17783           fi
17784         done
17785   done
17786 fi
17787
17788 if test -n "$with_hashed_db/lib" ; then
17789   for cf_add_libdir in $with_hashed_db/lib
17790   do
17791     if test $cf_add_libdir = /usr/lib ; then
17792       :
17793     elif test -d $cf_add_libdir
17794     then
17795       cf_have_libdir=no
17796       if test -n "$LDFLAGS$LIBS" ; then
17797         # a loop is needed to ensure we can add subdirs of existing dirs
17798         for cf_test_libdir in $LDFLAGS $LIBS ; do
17799           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17800             cf_have_libdir=yes; break
17801           fi
17802         done
17803       fi
17804       if test "$cf_have_libdir" = no ; then
17805         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17806
17807 echo "${as_me:-configure}:17807: testing adding $cf_add_libdir to library-path ..." 1>&5
17808
17809         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17810       fi
17811     fi
17812   done
17813 fi
17814
17815     fi
17816 esac
17817
17818 echo "$as_me:17818: checking for db.h" >&5
17819 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17820 if test "${ac_cv_header_db_h+set}" = set; then
17821   echo $ECHO_N "(cached) $ECHO_C" >&6
17822 else
17823   cat >conftest.$ac_ext <<_ACEOF
17824 #line 17824 "configure"
17825 #include "confdefs.h"
17826 #include <db.h>
17827 _ACEOF
17828 if { (eval echo "$as_me:17828: \"$ac_cpp conftest.$ac_ext\"") >&5
17829   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17830   ac_status=$?
17831   egrep -v '^ *\+' conftest.er1 >conftest.err
17832   rm -f conftest.er1
17833   cat conftest.err >&5
17834   echo "$as_me:17834: \$? = $ac_status" >&5
17835   (exit $ac_status); } >/dev/null; then
17836   if test -s conftest.err; then
17837     ac_cpp_err=$ac_c_preproc_warn_flag
17838   else
17839     ac_cpp_err=
17840   fi
17841 else
17842   ac_cpp_err=yes
17843 fi
17844 if test -z "$ac_cpp_err"; then
17845   ac_cv_header_db_h=yes
17846 else
17847   echo "$as_me: failed program was:" >&5
17848   cat conftest.$ac_ext >&5
17849   ac_cv_header_db_h=no
17850 fi
17851 rm -f conftest.err conftest.$ac_ext
17852 fi
17853 echo "$as_me:17853: result: $ac_cv_header_db_h" >&5
17854 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17855 if test $ac_cv_header_db_h = yes; then
17856
17857 echo "$as_me:17857: checking for version of db" >&5
17858 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17859 if test "${cf_cv_hashed_db_version+set}" = set; then
17860   echo $ECHO_N "(cached) $ECHO_C" >&6
17861 else
17862
17863 cf_cv_hashed_db_version=unknown
17864
17865 for cf_db_version in 1 2 3 4 5
17866 do
17867
17868 echo "${as_me:-configure}:17868: testing checking for db version $cf_db_version ..." 1>&5
17869
17870         cat >conftest.$ac_ext <<_ACEOF
17871 #line 17871 "configure"
17872 #include "confdefs.h"
17873
17874 $ac_includes_default
17875 #include <db.h>
17876
17877 #ifdef DB_VERSION_MAJOR
17878         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17879 #if $cf_db_version == DB_VERSION_MAJOR
17880         /* ok */
17881 #else
17882         make an error
17883 #endif
17884 #else
17885 #if $cf_db_version == 1
17886         /* ok: assuming this is DB 1.8.5 */
17887 #else
17888         make an error
17889 #endif
17890 #endif
17891
17892 int
17893 main ()
17894 {
17895 DBT *foo = 0
17896   ;
17897   return 0;
17898 }
17899 _ACEOF
17900 rm -f conftest.$ac_objext
17901 if { (eval echo "$as_me:17901: \"$ac_compile\"") >&5
17902   (eval $ac_compile) 2>&5
17903   ac_status=$?
17904   echo "$as_me:17904: \$? = $ac_status" >&5
17905   (exit $ac_status); } &&
17906          { ac_try='test -s conftest.$ac_objext'
17907   { (eval echo "$as_me:17907: \"$ac_try\"") >&5
17908   (eval $ac_try) 2>&5
17909   ac_status=$?
17910   echo "$as_me:17910: \$? = $ac_status" >&5
17911   (exit $ac_status); }; }; then
17912
17913         cf_cv_hashed_db_version=$cf_db_version
17914         break
17915
17916 else
17917   echo "$as_me: failed program was:" >&5
17918 cat conftest.$ac_ext >&5
17919 fi
17920 rm -f conftest.$ac_objext conftest.$ac_ext
17921 done
17922
17923 fi
17924 echo "$as_me:17924: result: $cf_cv_hashed_db_version" >&5
17925 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17926
17927 if test "$cf_cv_hashed_db_version" = unknown ; then
17928         { { echo "$as_me:17928: error: Cannot determine version of db" >&5
17929 echo "$as_me: error: Cannot determine version of db" >&2;}
17930    { (exit 1); exit 1; }; }
17931 else
17932
17933 echo "$as_me:17933: checking for db libraries" >&5
17934 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17935 if test "${cf_cv_hashed_db_libs+set}" = set; then
17936   echo $ECHO_N "(cached) $ECHO_C" >&6
17937 else
17938
17939 cf_cv_hashed_db_libs=unknown
17940 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17941 do
17942         cf_save_libs="$LIBS"
17943         if test -n "$cf_db_libs"; then
17944                 LIBS="-l$cf_db_libs $LIBS"
17945         fi
17946
17947 echo "${as_me:-configure}:17947: testing checking for library "$cf_db_libs" ..." 1>&5
17948
17949         cat >conftest.$ac_ext <<_ACEOF
17950 #line 17950 "configure"
17951 #include "confdefs.h"
17952
17953 $ac_includes_default
17954 #include <db.h>
17955
17956 int
17957 main ()
17958 {
17959
17960         char *path = "/tmp/foo";
17961 #ifdef DB_VERSION_MAJOR
17962 #if DB_VERSION_MAJOR >= 4
17963         DB *result = 0;
17964         db_create(&result, NULL, 0);
17965         result->open(result,
17966                 NULL,
17967                 path,
17968                 path,
17969                 DB_HASH,
17970                 DB_CREATE,
17971                 0644);
17972 #elif DB_VERSION_MAJOR >= 3
17973         DB *result = 0;
17974         db_create(&result, NULL, 0);
17975         result->open(result,
17976                 path,
17977                 path,
17978                 DB_HASH,
17979                 DB_CREATE,
17980                 0644);
17981 #elif DB_VERSION_MAJOR >= 2
17982         DB *result = 0;
17983         db_open(path,
17984                 DB_HASH,
17985                 DB_CREATE,
17986                 0644,
17987                 (DB_ENV *) 0,
17988                 (DB_INFO *) 0,
17989                 &result);
17990 #endif /* DB_VERSION_MAJOR */
17991 #else
17992         DB *result = dbopen(path,
17993                      2,
17994                      0644,
17995                      DB_HASH,
17996                      0);
17997 #endif
17998         ${cf_cv_main_return:-return}(result != 0)
17999
18000   ;
18001   return 0;
18002 }
18003 _ACEOF
18004 rm -f conftest.$ac_objext conftest$ac_exeext
18005 if { (eval echo "$as_me:18005: \"$ac_link\"") >&5
18006   (eval $ac_link) 2>&5
18007   ac_status=$?
18008   echo "$as_me:18008: \$? = $ac_status" >&5
18009   (exit $ac_status); } &&
18010          { ac_try='test -s conftest$ac_exeext'
18011   { (eval echo "$as_me:18011: \"$ac_try\"") >&5
18012   (eval $ac_try) 2>&5
18013   ac_status=$?
18014   echo "$as_me:18014: \$? = $ac_status" >&5
18015   (exit $ac_status); }; }; then
18016
18017         if test -n "$cf_db_libs" ; then
18018                 cf_cv_hashed_db_libs=$cf_db_libs
18019         else
18020                 cf_cv_hashed_db_libs=default
18021         fi
18022         LIBS="$cf_save_libs"
18023         break
18024
18025 else
18026   echo "$as_me: failed program was:" >&5
18027 cat conftest.$ac_ext >&5
18028 fi
18029 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18030         LIBS="$cf_save_libs"
18031 done
18032
18033 fi
18034 echo "$as_me:18034: result: $cf_cv_hashed_db_libs" >&5
18035 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
18036
18037         if test "$cf_cv_hashed_db_libs" = unknown ; then
18038                 { { echo "$as_me:18038: error: Cannot determine library for db" >&5
18039 echo "$as_me: error: Cannot determine library for db" >&2;}
18040    { (exit 1); exit 1; }; }
18041         elif test "$cf_cv_hashed_db_libs" != default ; then
18042                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
18043         fi
18044 fi
18045
18046 else
18047
18048         { { echo "$as_me:18048: error: Cannot find db.h" >&5
18049 echo "$as_me: error: Cannot find db.h" >&2;}
18050    { (exit 1); exit 1; }; }
18051
18052 fi
18053
18054 fi
18055
18056 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
18057         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18058         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18059 fi
18060
18061 # Just in case, check if the C compiler has a bool type.
18062
18063 echo "$as_me:18063: checking if we should include stdbool.h" >&5
18064 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18065
18066 if test "${cf_cv_header_stdbool_h+set}" = set; then
18067   echo $ECHO_N "(cached) $ECHO_C" >&6
18068 else
18069
18070         cat >conftest.$ac_ext <<_ACEOF
18071 #line 18071 "configure"
18072 #include "confdefs.h"
18073
18074 int
18075 main ()
18076 {
18077 bool foo = false
18078   ;
18079   return 0;
18080 }
18081 _ACEOF
18082 rm -f conftest.$ac_objext
18083 if { (eval echo "$as_me:18083: \"$ac_compile\"") >&5
18084   (eval $ac_compile) 2>&5
18085   ac_status=$?
18086   echo "$as_me:18086: \$? = $ac_status" >&5
18087   (exit $ac_status); } &&
18088          { ac_try='test -s conftest.$ac_objext'
18089   { (eval echo "$as_me:18089: \"$ac_try\"") >&5
18090   (eval $ac_try) 2>&5
18091   ac_status=$?
18092   echo "$as_me:18092: \$? = $ac_status" >&5
18093   (exit $ac_status); }; }; then
18094   cf_cv_header_stdbool_h=0
18095 else
18096   echo "$as_me: failed program was:" >&5
18097 cat conftest.$ac_ext >&5
18098 cat >conftest.$ac_ext <<_ACEOF
18099 #line 18099 "configure"
18100 #include "confdefs.h"
18101
18102 #ifndef __BEOS__
18103 #include <stdbool.h>
18104 #endif
18105
18106 int
18107 main ()
18108 {
18109 bool foo = false
18110   ;
18111   return 0;
18112 }
18113 _ACEOF
18114 rm -f conftest.$ac_objext
18115 if { (eval echo "$as_me:18115: \"$ac_compile\"") >&5
18116   (eval $ac_compile) 2>&5
18117   ac_status=$?
18118   echo "$as_me:18118: \$? = $ac_status" >&5
18119   (exit $ac_status); } &&
18120          { ac_try='test -s conftest.$ac_objext'
18121   { (eval echo "$as_me:18121: \"$ac_try\"") >&5
18122   (eval $ac_try) 2>&5
18123   ac_status=$?
18124   echo "$as_me:18124: \$? = $ac_status" >&5
18125   (exit $ac_status); }; }; then
18126   cf_cv_header_stdbool_h=1
18127 else
18128   echo "$as_me: failed program was:" >&5
18129 cat conftest.$ac_ext >&5
18130 cf_cv_header_stdbool_h=0
18131 fi
18132 rm -f conftest.$ac_objext conftest.$ac_ext
18133 fi
18134 rm -f conftest.$ac_objext conftest.$ac_ext
18135 fi
18136
18137 if test "$cf_cv_header_stdbool_h" = 1
18138 then    echo "$as_me:18138: result: yes" >&5
18139 echo "${ECHO_T}yes" >&6
18140 else    echo "$as_me:18140: result: no" >&5
18141 echo "${ECHO_T}no" >&6
18142 fi
18143
18144 echo "$as_me:18144: checking for builtin bool type" >&5
18145 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18146
18147 if test "${cf_cv_cc_bool_type+set}" = set; then
18148   echo $ECHO_N "(cached) $ECHO_C" >&6
18149 else
18150
18151         cat >conftest.$ac_ext <<_ACEOF
18152 #line 18152 "configure"
18153 #include "confdefs.h"
18154
18155 #include <stdio.h>
18156 #include <sys/types.h>
18157
18158 int
18159 main ()
18160 {
18161 bool x = false
18162   ;
18163   return 0;
18164 }
18165 _ACEOF
18166 rm -f conftest.$ac_objext
18167 if { (eval echo "$as_me:18167: \"$ac_compile\"") >&5
18168   (eval $ac_compile) 2>&5
18169   ac_status=$?
18170   echo "$as_me:18170: \$? = $ac_status" >&5
18171   (exit $ac_status); } &&
18172          { ac_try='test -s conftest.$ac_objext'
18173   { (eval echo "$as_me:18173: \"$ac_try\"") >&5
18174   (eval $ac_try) 2>&5
18175   ac_status=$?
18176   echo "$as_me:18176: \$? = $ac_status" >&5
18177   (exit $ac_status); }; }; then
18178   cf_cv_cc_bool_type=1
18179 else
18180   echo "$as_me: failed program was:" >&5
18181 cat conftest.$ac_ext >&5
18182 cf_cv_cc_bool_type=0
18183 fi
18184 rm -f conftest.$ac_objext conftest.$ac_ext
18185
18186 fi
18187
18188 if test "$cf_cv_cc_bool_type" = 1
18189 then    echo "$as_me:18189: result: yes" >&5
18190 echo "${ECHO_T}yes" >&6
18191 else    echo "$as_me:18191: result: no" >&5
18192 echo "${ECHO_T}no" >&6
18193 fi
18194
18195 # Check for C++ compiler characteristics (and ensure that it's there!)
18196 if test -n "$CXX" ; then
18197         ac_ext=cc
18198 ac_cpp='$CXXCPP $CPPFLAGS'
18199 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18200 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18201 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18202 ac_main_return=return
18203
18204 if test -n "$GXX" ; then
18205 case $cf_cv_system_name in #(vi
18206 os2*) #(vi
18207         cf_stdcpp_libname=stdcpp
18208         ;;
18209 *)
18210         cf_stdcpp_libname=stdc++
18211         ;;
18212 esac
18213 echo "$as_me:18213: checking for library $cf_stdcpp_libname" >&5
18214 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
18215 if test "${cf_cv_libstdcpp+set}" = set; then
18216   echo $ECHO_N "(cached) $ECHO_C" >&6
18217 else
18218
18219         cf_save="$LIBS"
18220         LIBS="-l$cf_stdcpp_libname $LIBS"
18221 cat >conftest.$ac_ext <<_ACEOF
18222 #line 18222 "configure"
18223 #include "confdefs.h"
18224
18225 #include <strstream.h>
18226 int
18227 main ()
18228 {
18229
18230 char buf[80];
18231 strstreambuf foo(buf, sizeof(buf))
18232
18233   ;
18234   return 0;
18235 }
18236 _ACEOF
18237 rm -f conftest.$ac_objext conftest$ac_exeext
18238 if { (eval echo "$as_me:18238: \"$ac_link\"") >&5
18239   (eval $ac_link) 2>&5
18240   ac_status=$?
18241   echo "$as_me:18241: \$? = $ac_status" >&5
18242   (exit $ac_status); } &&
18243          { ac_try='test -s conftest$ac_exeext'
18244   { (eval echo "$as_me:18244: \"$ac_try\"") >&5
18245   (eval $ac_try) 2>&5
18246   ac_status=$?
18247   echo "$as_me:18247: \$? = $ac_status" >&5
18248   (exit $ac_status); }; }; then
18249   cf_cv_libstdcpp=yes
18250 else
18251   echo "$as_me: failed program was:" >&5
18252 cat conftest.$ac_ext >&5
18253 cf_cv_libstdcpp=no
18254 fi
18255 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18256         LIBS="$cf_save"
18257
18258 fi
18259 echo "$as_me:18259: result: $cf_cv_libstdcpp" >&5
18260 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18261 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
18262 fi
18263
18264         echo "$as_me:18264: checking whether $CXX understands -c and -o together" >&5
18265 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18266 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18267   echo $ECHO_N "(cached) $ECHO_C" >&6
18268 else
18269
18270 cat > conftest.$ac_ext <<CF_EOF
18271 #include <stdio.h>
18272 int main()
18273 {
18274         ${cf_cv_main_return:-return}(0);
18275 }
18276 CF_EOF
18277 # We do the test twice because some compilers refuse to overwrite an
18278 # existing .o file with -o, though they will create one.
18279 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18280 if { (eval echo "$as_me:18280: \"$ac_try\"") >&5
18281   (eval $ac_try) 2>&5
18282   ac_status=$?
18283   echo "$as_me:18283: \$? = $ac_status" >&5
18284   (exit $ac_status); } &&
18285   test -f conftest2.$ac_objext && { (eval echo "$as_me:18285: \"$ac_try\"") >&5
18286   (eval $ac_try) 2>&5
18287   ac_status=$?
18288   echo "$as_me:18288: \$? = $ac_status" >&5
18289   (exit $ac_status); };
18290 then
18291   eval cf_cv_prog_CXX_c_o=yes
18292 else
18293   eval cf_cv_prog_CXX_c_o=no
18294 fi
18295 rm -rf conftest*
18296
18297 fi
18298 if test $cf_cv_prog_CXX_c_o = yes; then
18299   echo "$as_me:18299: result: yes" >&5
18300 echo "${ECHO_T}yes" >&6
18301 else
18302   echo "$as_me:18302: result: no" >&5
18303 echo "${ECHO_T}no" >&6
18304 fi
18305
18306         case $GXX_VERSION in
18307         1*|2.0-6*)
18308                 cf_cxx_library=yes
18309                 ;;
18310         *-2.7*|2.7*)
18311
18312 cf_cxx_library=unknown
18313 case $cf_cv_system_name in #(vi
18314 os2*) #(vi
18315         cf_gpp_libname=gpp
18316         ;;
18317 *)
18318         cf_gpp_libname=g++
18319         ;;
18320 esac
18321 if test "$GXX" = yes; then
18322         echo "$as_me:18322: checking for lib$cf_gpp_libname" >&5
18323 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18324         cf_save="$LIBS"
18325         LIBS="-l$cf_gpp_libname $LIBS"
18326         cat >conftest.$ac_ext <<_ACEOF
18327 #line 18327 "configure"
18328 #include "confdefs.h"
18329
18330 #include <$cf_gpp_libname/builtin.h>
18331
18332 int
18333 main ()
18334 {
18335 two_arg_error_handler_t foo2 = lib_error_handler
18336   ;
18337   return 0;
18338 }
18339 _ACEOF
18340 rm -f conftest.$ac_objext conftest$ac_exeext
18341 if { (eval echo "$as_me:18341: \"$ac_link\"") >&5
18342   (eval $ac_link) 2>&5
18343   ac_status=$?
18344   echo "$as_me:18344: \$? = $ac_status" >&5
18345   (exit $ac_status); } &&
18346          { ac_try='test -s conftest$ac_exeext'
18347   { (eval echo "$as_me:18347: \"$ac_try\"") >&5
18348   (eval $ac_try) 2>&5
18349   ac_status=$?
18350   echo "$as_me:18350: \$? = $ac_status" >&5
18351   (exit $ac_status); }; }; then
18352   cf_cxx_library=yes
18353          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18354          if test "$cf_gpp_libname" = cpp ; then
18355
18356 cat >>confdefs.h <<\EOF
18357 #define HAVE_GPP_BUILTIN_H 1
18358 EOF
18359
18360          else
18361
18362 cat >>confdefs.h <<\EOF
18363 #define HAVE_GXX_BUILTIN_H 1
18364 EOF
18365
18366          fi
18367 else
18368   echo "$as_me: failed program was:" >&5
18369 cat conftest.$ac_ext >&5
18370 cat >conftest.$ac_ext <<_ACEOF
18371 #line 18371 "configure"
18372 #include "confdefs.h"
18373
18374 #include <builtin.h>
18375
18376 int
18377 main ()
18378 {
18379 two_arg_error_handler_t foo2 = lib_error_handler
18380   ;
18381   return 0;
18382 }
18383 _ACEOF
18384 rm -f conftest.$ac_objext conftest$ac_exeext
18385 if { (eval echo "$as_me:18385: \"$ac_link\"") >&5
18386   (eval $ac_link) 2>&5
18387   ac_status=$?
18388   echo "$as_me:18388: \$? = $ac_status" >&5
18389   (exit $ac_status); } &&
18390          { ac_try='test -s conftest$ac_exeext'
18391   { (eval echo "$as_me:18391: \"$ac_try\"") >&5
18392   (eval $ac_try) 2>&5
18393   ac_status=$?
18394   echo "$as_me:18394: \$? = $ac_status" >&5
18395   (exit $ac_status); }; }; then
18396   cf_cxx_library=yes
18397          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18398
18399 cat >>confdefs.h <<\EOF
18400 #define HAVE_BUILTIN_H 1
18401 EOF
18402
18403 else
18404   echo "$as_me: failed program was:" >&5
18405 cat conftest.$ac_ext >&5
18406 cf_cxx_library=no
18407 fi
18408 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18409 fi
18410 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18411         LIBS="$cf_save"
18412         echo "$as_me:18412: result: $cf_cxx_library" >&5
18413 echo "${ECHO_T}$cf_cxx_library" >&6
18414 fi
18415
18416                 ;;
18417         *)
18418                 cf_cxx_library=no
18419                 ;;
18420         esac
18421
18422         ac_ext=cc
18423 ac_cpp='$CXXCPP $CPPFLAGS'
18424 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18425 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18426 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18427 ac_main_return=return
18428 echo "$as_me:18428: checking how to run the C++ preprocessor" >&5
18429 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18430 if test -z "$CXXCPP"; then
18431   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18432   echo $ECHO_N "(cached) $ECHO_C" >&6
18433 else
18434       # Double quotes because CXXCPP needs to be expanded
18435     for CXXCPP in "$CXX -E" "/lib/cpp"
18436     do
18437       ac_preproc_ok=false
18438 for ac_cxx_preproc_warn_flag in '' yes
18439 do
18440   # Use a header file that comes with gcc, so configuring glibc
18441   # with a fresh cross-compiler works.
18442   # On the NeXT, cc -E runs the code through the compiler's parser,
18443   # not just through cpp. "Syntax error" is here to catch this case.
18444   cat >conftest.$ac_ext <<_ACEOF
18445 #line 18445 "configure"
18446 #include "confdefs.h"
18447 #include <assert.h>
18448                      Syntax error
18449 _ACEOF
18450 if { (eval echo "$as_me:18450: \"$ac_cpp conftest.$ac_ext\"") >&5
18451   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18452   ac_status=$?
18453   egrep -v '^ *\+' conftest.er1 >conftest.err
18454   rm -f conftest.er1
18455   cat conftest.err >&5
18456   echo "$as_me:18456: \$? = $ac_status" >&5
18457   (exit $ac_status); } >/dev/null; then
18458   if test -s conftest.err; then
18459     ac_cpp_err=$ac_cxx_preproc_warn_flag
18460   else
18461     ac_cpp_err=
18462   fi
18463 else
18464   ac_cpp_err=yes
18465 fi
18466 if test -z "$ac_cpp_err"; then
18467   :
18468 else
18469   echo "$as_me: failed program was:" >&5
18470   cat conftest.$ac_ext >&5
18471   # Broken: fails on valid input.
18472 continue
18473 fi
18474 rm -f conftest.err conftest.$ac_ext
18475
18476   # OK, works on sane cases.  Now check whether non-existent headers
18477   # can be detected and how.
18478   cat >conftest.$ac_ext <<_ACEOF
18479 #line 18479 "configure"
18480 #include "confdefs.h"
18481 #include <ac_nonexistent.h>
18482 _ACEOF
18483 if { (eval echo "$as_me:18483: \"$ac_cpp conftest.$ac_ext\"") >&5
18484   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18485   ac_status=$?
18486   egrep -v '^ *\+' conftest.er1 >conftest.err
18487   rm -f conftest.er1
18488   cat conftest.err >&5
18489   echo "$as_me:18489: \$? = $ac_status" >&5
18490   (exit $ac_status); } >/dev/null; then
18491   if test -s conftest.err; then
18492     ac_cpp_err=$ac_cxx_preproc_warn_flag
18493   else
18494     ac_cpp_err=
18495   fi
18496 else
18497   ac_cpp_err=yes
18498 fi
18499 if test -z "$ac_cpp_err"; then
18500   # Broken: success on invalid input.
18501 continue
18502 else
18503   echo "$as_me: failed program was:" >&5
18504   cat conftest.$ac_ext >&5
18505   # Passes both tests.
18506 ac_preproc_ok=:
18507 break
18508 fi
18509 rm -f conftest.err conftest.$ac_ext
18510
18511 done
18512 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18513 rm -f conftest.err conftest.$ac_ext
18514 if $ac_preproc_ok; then
18515   break
18516 fi
18517
18518     done
18519     ac_cv_prog_CXXCPP=$CXXCPP
18520
18521 fi
18522   CXXCPP=$ac_cv_prog_CXXCPP
18523 else
18524   ac_cv_prog_CXXCPP=$CXXCPP
18525 fi
18526 echo "$as_me:18526: result: $CXXCPP" >&5
18527 echo "${ECHO_T}$CXXCPP" >&6
18528 ac_preproc_ok=false
18529 for ac_cxx_preproc_warn_flag in '' yes
18530 do
18531   # Use a header file that comes with gcc, so configuring glibc
18532   # with a fresh cross-compiler works.
18533   # On the NeXT, cc -E runs the code through the compiler's parser,
18534   # not just through cpp. "Syntax error" is here to catch this case.
18535   cat >conftest.$ac_ext <<_ACEOF
18536 #line 18536 "configure"
18537 #include "confdefs.h"
18538 #include <assert.h>
18539                      Syntax error
18540 _ACEOF
18541 if { (eval echo "$as_me:18541: \"$ac_cpp conftest.$ac_ext\"") >&5
18542   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18543   ac_status=$?
18544   egrep -v '^ *\+' conftest.er1 >conftest.err
18545   rm -f conftest.er1
18546   cat conftest.err >&5
18547   echo "$as_me:18547: \$? = $ac_status" >&5
18548   (exit $ac_status); } >/dev/null; then
18549   if test -s conftest.err; then
18550     ac_cpp_err=$ac_cxx_preproc_warn_flag
18551   else
18552     ac_cpp_err=
18553   fi
18554 else
18555   ac_cpp_err=yes
18556 fi
18557 if test -z "$ac_cpp_err"; then
18558   :
18559 else
18560   echo "$as_me: failed program was:" >&5
18561   cat conftest.$ac_ext >&5
18562   # Broken: fails on valid input.
18563 continue
18564 fi
18565 rm -f conftest.err conftest.$ac_ext
18566
18567   # OK, works on sane cases.  Now check whether non-existent headers
18568   # can be detected and how.
18569   cat >conftest.$ac_ext <<_ACEOF
18570 #line 18570 "configure"
18571 #include "confdefs.h"
18572 #include <ac_nonexistent.h>
18573 _ACEOF
18574 if { (eval echo "$as_me:18574: \"$ac_cpp conftest.$ac_ext\"") >&5
18575   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18576   ac_status=$?
18577   egrep -v '^ *\+' conftest.er1 >conftest.err
18578   rm -f conftest.er1
18579   cat conftest.err >&5
18580   echo "$as_me:18580: \$? = $ac_status" >&5
18581   (exit $ac_status); } >/dev/null; then
18582   if test -s conftest.err; then
18583     ac_cpp_err=$ac_cxx_preproc_warn_flag
18584   else
18585     ac_cpp_err=
18586   fi
18587 else
18588   ac_cpp_err=yes
18589 fi
18590 if test -z "$ac_cpp_err"; then
18591   # Broken: success on invalid input.
18592 continue
18593 else
18594   echo "$as_me: failed program was:" >&5
18595   cat conftest.$ac_ext >&5
18596   # Passes both tests.
18597 ac_preproc_ok=:
18598 break
18599 fi
18600 rm -f conftest.err conftest.$ac_ext
18601
18602 done
18603 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18604 rm -f conftest.err conftest.$ac_ext
18605 if $ac_preproc_ok; then
18606   :
18607 else
18608   { { echo "$as_me:18608: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18609 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18610    { (exit 1); exit 1; }; }
18611 fi
18612
18613 ac_ext=cc
18614 ac_cpp='$CXXCPP $CPPFLAGS'
18615 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18616 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18617 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18618 ac_main_return=return
18619
18620 for ac_header in typeinfo
18621 do
18622 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18623 echo "$as_me:18623: checking for $ac_header" >&5
18624 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18625 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18626   echo $ECHO_N "(cached) $ECHO_C" >&6
18627 else
18628   cat >conftest.$ac_ext <<_ACEOF
18629 #line 18629 "configure"
18630 #include "confdefs.h"
18631 #include <$ac_header>
18632 _ACEOF
18633 if { (eval echo "$as_me:18633: \"$ac_cpp conftest.$ac_ext\"") >&5
18634   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18635   ac_status=$?
18636   egrep -v '^ *\+' conftest.er1 >conftest.err
18637   rm -f conftest.er1
18638   cat conftest.err >&5
18639   echo "$as_me:18639: \$? = $ac_status" >&5
18640   (exit $ac_status); } >/dev/null; then
18641   if test -s conftest.err; then
18642     ac_cpp_err=$ac_cxx_preproc_warn_flag
18643   else
18644     ac_cpp_err=
18645   fi
18646 else
18647   ac_cpp_err=yes
18648 fi
18649 if test -z "$ac_cpp_err"; then
18650   eval "$as_ac_Header=yes"
18651 else
18652   echo "$as_me: failed program was:" >&5
18653   cat conftest.$ac_ext >&5
18654   eval "$as_ac_Header=no"
18655 fi
18656 rm -f conftest.err conftest.$ac_ext
18657 fi
18658 echo "$as_me:18658: result: `eval echo '${'$as_ac_Header'}'`" >&5
18659 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18660 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18661   cat >>confdefs.h <<EOF
18662 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18663 EOF
18664
18665 fi
18666 done
18667
18668 for ac_header in iostream
18669 do
18670 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18671 echo "$as_me:18671: checking for $ac_header" >&5
18672 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18673 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18674   echo $ECHO_N "(cached) $ECHO_C" >&6
18675 else
18676   cat >conftest.$ac_ext <<_ACEOF
18677 #line 18677 "configure"
18678 #include "confdefs.h"
18679 #include <$ac_header>
18680 _ACEOF
18681 if { (eval echo "$as_me:18681: \"$ac_cpp conftest.$ac_ext\"") >&5
18682   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18683   ac_status=$?
18684   egrep -v '^ *\+' conftest.er1 >conftest.err
18685   rm -f conftest.er1
18686   cat conftest.err >&5
18687   echo "$as_me:18687: \$? = $ac_status" >&5
18688   (exit $ac_status); } >/dev/null; then
18689   if test -s conftest.err; then
18690     ac_cpp_err=$ac_cxx_preproc_warn_flag
18691   else
18692     ac_cpp_err=
18693   fi
18694 else
18695   ac_cpp_err=yes
18696 fi
18697 if test -z "$ac_cpp_err"; then
18698   eval "$as_ac_Header=yes"
18699 else
18700   echo "$as_me: failed program was:" >&5
18701   cat conftest.$ac_ext >&5
18702   eval "$as_ac_Header=no"
18703 fi
18704 rm -f conftest.err conftest.$ac_ext
18705 fi
18706 echo "$as_me:18706: result: `eval echo '${'$as_ac_Header'}'`" >&5
18707 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18708 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18709   cat >>confdefs.h <<EOF
18710 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18711 EOF
18712
18713 fi
18714 done
18715
18716 if test x"$ac_cv_header_iostream" = xyes ; then
18717         echo "$as_me:18717: checking if iostream uses std-namespace" >&5
18718 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18719         cat >conftest.$ac_ext <<_ACEOF
18720 #line 18720 "configure"
18721 #include "confdefs.h"
18722
18723 #include <iostream>
18724 using std::endl;
18725 using std::cerr;
18726 int
18727 main ()
18728 {
18729
18730 cerr << "testing" << endl;
18731
18732   ;
18733   return 0;
18734 }
18735 _ACEOF
18736 rm -f conftest.$ac_objext
18737 if { (eval echo "$as_me:18737: \"$ac_compile\"") >&5
18738   (eval $ac_compile) 2>&5
18739   ac_status=$?
18740   echo "$as_me:18740: \$? = $ac_status" >&5
18741   (exit $ac_status); } &&
18742          { ac_try='test -s conftest.$ac_objext'
18743   { (eval echo "$as_me:18743: \"$ac_try\"") >&5
18744   (eval $ac_try) 2>&5
18745   ac_status=$?
18746   echo "$as_me:18746: \$? = $ac_status" >&5
18747   (exit $ac_status); }; }; then
18748   cf_iostream_namespace=yes
18749 else
18750   echo "$as_me: failed program was:" >&5
18751 cat conftest.$ac_ext >&5
18752 cf_iostream_namespace=no
18753 fi
18754 rm -f conftest.$ac_objext conftest.$ac_ext
18755         echo "$as_me:18755: result: $cf_iostream_namespace" >&5
18756 echo "${ECHO_T}$cf_iostream_namespace" >&6
18757         if test "$cf_iostream_namespace" = yes ; then
18758
18759 cat >>confdefs.h <<\EOF
18760 #define IOSTREAM_NAMESPACE 1
18761 EOF
18762
18763         fi
18764 fi
18765
18766 echo "$as_me:18766: checking if we should include stdbool.h" >&5
18767 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18768
18769 if test "${cf_cv_header_stdbool_h+set}" = set; then
18770   echo $ECHO_N "(cached) $ECHO_C" >&6
18771 else
18772
18773         cat >conftest.$ac_ext <<_ACEOF
18774 #line 18774 "configure"
18775 #include "confdefs.h"
18776
18777 int
18778 main ()
18779 {
18780 bool foo = false
18781   ;
18782   return 0;
18783 }
18784 _ACEOF
18785 rm -f conftest.$ac_objext
18786 if { (eval echo "$as_me:18786: \"$ac_compile\"") >&5
18787   (eval $ac_compile) 2>&5
18788   ac_status=$?
18789   echo "$as_me:18789: \$? = $ac_status" >&5
18790   (exit $ac_status); } &&
18791          { ac_try='test -s conftest.$ac_objext'
18792   { (eval echo "$as_me:18792: \"$ac_try\"") >&5
18793   (eval $ac_try) 2>&5
18794   ac_status=$?
18795   echo "$as_me:18795: \$? = $ac_status" >&5
18796   (exit $ac_status); }; }; then
18797   cf_cv_header_stdbool_h=0
18798 else
18799   echo "$as_me: failed program was:" >&5
18800 cat conftest.$ac_ext >&5
18801 cat >conftest.$ac_ext <<_ACEOF
18802 #line 18802 "configure"
18803 #include "confdefs.h"
18804
18805 #ifndef __BEOS__
18806 #include <stdbool.h>
18807 #endif
18808
18809 int
18810 main ()
18811 {
18812 bool foo = false
18813   ;
18814   return 0;
18815 }
18816 _ACEOF
18817 rm -f conftest.$ac_objext
18818 if { (eval echo "$as_me:18818: \"$ac_compile\"") >&5
18819   (eval $ac_compile) 2>&5
18820   ac_status=$?
18821   echo "$as_me:18821: \$? = $ac_status" >&5
18822   (exit $ac_status); } &&
18823          { ac_try='test -s conftest.$ac_objext'
18824   { (eval echo "$as_me:18824: \"$ac_try\"") >&5
18825   (eval $ac_try) 2>&5
18826   ac_status=$?
18827   echo "$as_me:18827: \$? = $ac_status" >&5
18828   (exit $ac_status); }; }; then
18829   cf_cv_header_stdbool_h=1
18830 else
18831   echo "$as_me: failed program was:" >&5
18832 cat conftest.$ac_ext >&5
18833 cf_cv_header_stdbool_h=0
18834 fi
18835 rm -f conftest.$ac_objext conftest.$ac_ext
18836 fi
18837 rm -f conftest.$ac_objext conftest.$ac_ext
18838 fi
18839
18840 if test "$cf_cv_header_stdbool_h" = 1
18841 then    echo "$as_me:18841: result: yes" >&5
18842 echo "${ECHO_T}yes" >&6
18843 else    echo "$as_me:18843: result: no" >&5
18844 echo "${ECHO_T}no" >&6
18845 fi
18846
18847 echo "$as_me:18847: checking for builtin bool type" >&5
18848 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18849
18850 if test "${cf_cv_builtin_bool+set}" = set; then
18851   echo $ECHO_N "(cached) $ECHO_C" >&6
18852 else
18853
18854         cat >conftest.$ac_ext <<_ACEOF
18855 #line 18855 "configure"
18856 #include "confdefs.h"
18857
18858 #include <stdio.h>
18859 #include <sys/types.h>
18860
18861 int
18862 main ()
18863 {
18864 bool x = false
18865   ;
18866   return 0;
18867 }
18868 _ACEOF
18869 rm -f conftest.$ac_objext
18870 if { (eval echo "$as_me:18870: \"$ac_compile\"") >&5
18871   (eval $ac_compile) 2>&5
18872   ac_status=$?
18873   echo "$as_me:18873: \$? = $ac_status" >&5
18874   (exit $ac_status); } &&
18875          { ac_try='test -s conftest.$ac_objext'
18876   { (eval echo "$as_me:18876: \"$ac_try\"") >&5
18877   (eval $ac_try) 2>&5
18878   ac_status=$?
18879   echo "$as_me:18879: \$? = $ac_status" >&5
18880   (exit $ac_status); }; }; then
18881   cf_cv_builtin_bool=1
18882 else
18883   echo "$as_me: failed program was:" >&5
18884 cat conftest.$ac_ext >&5
18885 cf_cv_builtin_bool=0
18886 fi
18887 rm -f conftest.$ac_objext conftest.$ac_ext
18888
18889 fi
18890
18891 if test "$cf_cv_builtin_bool" = 1
18892 then    echo "$as_me:18892: result: yes" >&5
18893 echo "${ECHO_T}yes" >&6
18894 else    echo "$as_me:18894: result: no" >&5
18895 echo "${ECHO_T}no" >&6
18896 fi
18897
18898 echo "$as_me:18898: checking for size of bool" >&5
18899 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18900 if test "${cf_cv_type_of_bool+set}" = set; then
18901   echo $ECHO_N "(cached) $ECHO_C" >&6
18902 else
18903
18904         rm -f cf_test.out
18905         if test "$cross_compiling" = yes; then
18906   cf_cv_type_of_bool=unknown
18907 else
18908   cat >conftest.$ac_ext <<_ACEOF
18909 #line 18909 "configure"
18910 #include "confdefs.h"
18911
18912 #include <stdlib.h>
18913 #include <stdio.h>
18914
18915 #if defined(__cplusplus)
18916
18917 #ifdef HAVE_GXX_BUILTIN_H
18918 #include <g++/builtin.h>
18919 #elif HAVE_GPP_BUILTIN_H
18920 #include <gpp/builtin.h>
18921 #elif HAVE_BUILTIN_H
18922 #include <builtin.h>
18923 #endif
18924
18925 #else
18926
18927 #if $cf_cv_header_stdbool_h
18928 #include <stdbool.h>
18929 #endif
18930
18931 #endif
18932
18933 int main()
18934 {
18935         FILE *fp = fopen("cf_test.out", "w");
18936         if (fp != 0) {
18937                 bool x = true;
18938                 if ((bool)(-x) >= 0)
18939                         fputs("unsigned ", fp);
18940                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18941                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18942                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18943                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18944                 fclose(fp);
18945         }
18946         ${cf_cv_main_return:-return}(0);
18947 }
18948
18949 _ACEOF
18950 rm -f conftest$ac_exeext
18951 if { (eval echo "$as_me:18951: \"$ac_link\"") >&5
18952   (eval $ac_link) 2>&5
18953   ac_status=$?
18954   echo "$as_me:18954: \$? = $ac_status" >&5
18955   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18956   { (eval echo "$as_me:18956: \"$ac_try\"") >&5
18957   (eval $ac_try) 2>&5
18958   ac_status=$?
18959   echo "$as_me:18959: \$? = $ac_status" >&5
18960   (exit $ac_status); }; }; then
18961   cf_cv_type_of_bool=`cat cf_test.out`
18962                  if test -z "$cf_cv_type_of_bool"; then
18963                    cf_cv_type_of_bool=unknown
18964                  fi
18965 else
18966   echo "$as_me: program exited with status $ac_status" >&5
18967 echo "$as_me: failed program was:" >&5
18968 cat conftest.$ac_ext >&5
18969 cf_cv_type_of_bool=unknown
18970 fi
18971 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18972 fi
18973
18974 fi
18975
18976         rm -f cf_test.out
18977 echo "$as_me:18977: result: $cf_cv_type_of_bool" >&5
18978 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18979 if test "$cf_cv_type_of_bool" = unknown ; then
18980         case .$NCURSES_BOOL in #(vi
18981         .auto|.) NCURSES_BOOL=unsigned;;
18982         esac
18983         { echo "$as_me:18983: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18984 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18985         cf_cv_type_of_bool=$NCURSES_BOOL
18986 fi
18987
18988 echo "$as_me:18988: checking for special defines needed for etip.h" >&5
18989 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18990 cf_save_CXXFLAGS="$CXXFLAGS"
18991 cf_result="none"
18992
18993 # etip.h includes ncurses.h which includes ncurses_dll.h
18994 # But ncurses_dll.h is generated - fix here.
18995 test -d include || mkdir include
18996 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
18997
18998 for cf_math in "" MATH_H
18999 do
19000 for cf_excp in "" MATH_EXCEPTION
19001 do
19002         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
19003         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
19004         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
19005 cat >conftest.$ac_ext <<_ACEOF
19006 #line 19006 "configure"
19007 #include "confdefs.h"
19008
19009 #include <etip.h.in>
19010
19011 int
19012 main ()
19013 {
19014
19015   ;
19016   return 0;
19017 }
19018 _ACEOF
19019 rm -f conftest.$ac_objext
19020 if { (eval echo "$as_me:19020: \"$ac_compile\"") >&5
19021   (eval $ac_compile) 2>&5
19022   ac_status=$?
19023   echo "$as_me:19023: \$? = $ac_status" >&5
19024   (exit $ac_status); } &&
19025          { ac_try='test -s conftest.$ac_objext'
19026   { (eval echo "$as_me:19026: \"$ac_try\"") >&5
19027   (eval $ac_try) 2>&5
19028   ac_status=$?
19029   echo "$as_me:19029: \$? = $ac_status" >&5
19030   (exit $ac_status); }; }; then
19031
19032         test -n "$cf_math" && cat >>confdefs.h <<EOF
19033 #define ETIP_NEEDS_${cf_math} 1
19034 EOF
19035
19036         test -n "$cf_excp" && cat >>confdefs.h <<EOF
19037 #define ETIP_NEEDS_${cf_excp} 1
19038 EOF
19039
19040         cf_result="$cf_math $cf_excp"
19041         break 2
19042
19043 else
19044   echo "$as_me: failed program was:" >&5
19045 cat conftest.$ac_ext >&5
19046 fi
19047 rm -f conftest.$ac_objext conftest.$ac_ext
19048 done
19049 done
19050 echo "$as_me:19050: result: $cf_result" >&5
19051 echo "${ECHO_T}$cf_result" >&6
19052 CXXFLAGS="$cf_save_CXXFLAGS"
19053
19054 if test -n "$CXX"; then
19055 echo "$as_me:19055: checking if $CXX accepts parameter initialization" >&5
19056 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
19057 if test "${cf_cv_cpp_param_init+set}" = set; then
19058   echo $ECHO_N "(cached) $ECHO_C" >&6
19059 else
19060
19061         ac_ext=cc
19062 ac_cpp='$CXXCPP $CPPFLAGS'
19063 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19064 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19065 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19066 ac_main_return=return
19067
19068         if test "$cross_compiling" = yes; then
19069   cf_cv_cpp_param_init=unknown
19070 else
19071   cat >conftest.$ac_ext <<_ACEOF
19072 #line 19072 "configure"
19073 #include "confdefs.h"
19074
19075 class TEST {
19076 private:
19077         int value;
19078 public:
19079         TEST(int x = 1);
19080         ~TEST();
19081 };
19082
19083 TEST::TEST(int x = 1)   // some compilers do not like second initializer
19084 {
19085         value = x;
19086 }
19087 int main() { }
19088
19089 _ACEOF
19090 rm -f conftest$ac_exeext
19091 if { (eval echo "$as_me:19091: \"$ac_link\"") >&5
19092   (eval $ac_link) 2>&5
19093   ac_status=$?
19094   echo "$as_me:19094: \$? = $ac_status" >&5
19095   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19096   { (eval echo "$as_me:19096: \"$ac_try\"") >&5
19097   (eval $ac_try) 2>&5
19098   ac_status=$?
19099   echo "$as_me:19099: \$? = $ac_status" >&5
19100   (exit $ac_status); }; }; then
19101   cf_cv_cpp_param_init=yes
19102 else
19103   echo "$as_me: program exited with status $ac_status" >&5
19104 echo "$as_me: failed program was:" >&5
19105 cat conftest.$ac_ext >&5
19106 cf_cv_cpp_param_init=no
19107 fi
19108 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19109 fi
19110         ac_ext=cc
19111 ac_cpp='$CXXCPP $CPPFLAGS'
19112 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19113 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19114 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19115 ac_main_return=return
19116
19117 fi
19118 echo "$as_me:19118: result: $cf_cv_cpp_param_init" >&5
19119 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
19120 fi
19121 test "$cf_cv_cpp_param_init" = yes &&
19122 cat >>confdefs.h <<\EOF
19123 #define CPP_HAS_PARAM_INIT 1
19124 EOF
19125
19126 if test -n "$CXX"; then
19127
19128 echo "$as_me:19128: checking if $CXX accepts static_cast" >&5
19129 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
19130 if test "${cf_cv_cpp_static_cast+set}" = set; then
19131   echo $ECHO_N "(cached) $ECHO_C" >&6
19132 else
19133
19134         ac_ext=cc
19135 ac_cpp='$CXXCPP $CPPFLAGS'
19136 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19137 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19138 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19139 ac_main_return=return
19140
19141         cat >conftest.$ac_ext <<_ACEOF
19142 #line 19142 "configure"
19143 #include "confdefs.h"
19144
19145 class NCursesPanel
19146 {
19147 public:
19148   NCursesPanel(int nlines,
19149                int ncols,
19150                int begin_y = 0,
19151                int begin_x = 0)
19152   {
19153   }
19154   NCursesPanel();
19155   ~NCursesPanel();
19156 };
19157
19158 template<class T> class NCursesUserPanel : public NCursesPanel
19159 {
19160 public:
19161   NCursesUserPanel (int nlines,
19162                     int ncols,
19163                     int begin_y = 0,
19164                     int begin_x = 0,
19165                     const T* p_UserData = static_cast<T*>(0))
19166     : NCursesPanel (nlines, ncols, begin_y, begin_x)
19167   {
19168   };
19169   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
19170   {
19171   };
19172
19173   virtual ~NCursesUserPanel() {};
19174 };
19175
19176 int
19177 main ()
19178 {
19179
19180         const char* p_UserData = static_cast<char*>(0)
19181   ;
19182   return 0;
19183 }
19184 _ACEOF
19185 rm -f conftest.$ac_objext
19186 if { (eval echo "$as_me:19186: \"$ac_compile\"") >&5
19187   (eval $ac_compile) 2>&5
19188   ac_status=$?
19189   echo "$as_me:19189: \$? = $ac_status" >&5
19190   (exit $ac_status); } &&
19191          { ac_try='test -s conftest.$ac_objext'
19192   { (eval echo "$as_me:19192: \"$ac_try\"") >&5
19193   (eval $ac_try) 2>&5
19194   ac_status=$?
19195   echo "$as_me:19195: \$? = $ac_status" >&5
19196   (exit $ac_status); }; }; then
19197   cf_cv_cpp_static_cast=yes
19198 else
19199   echo "$as_me: failed program was:" >&5
19200 cat conftest.$ac_ext >&5
19201 cf_cv_cpp_static_cast=no
19202 fi
19203 rm -f conftest.$ac_objext conftest.$ac_ext
19204
19205         ac_ext=cc
19206 ac_cpp='$CXXCPP $CPPFLAGS'
19207 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19208 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19209 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19210 ac_main_return=return
19211
19212 fi
19213 echo "$as_me:19213: result: $cf_cv_cpp_static_cast" >&5
19214 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
19215
19216 fi
19217
19218 test "$cf_cv_cpp_static_cast" = yes &&
19219 cat >>confdefs.h <<\EOF
19220 #define CPP_HAS_STATIC_CAST 1
19221 EOF
19222
19223         CXX_AR='$(AR)'
19224         CXX_ARFLAGS='$(ARFLAGS)'
19225         case $cf_cv_system_name in #(vi
19226         irix*) #(vi
19227             if test "$GXX" != yes ; then
19228                 CXX_AR='$(CXX)'
19229                 CXX_ARFLAGS='-ar -o'
19230             fi
19231             ;;
19232         sco3.2v5*) #(vi
19233             CXXLDFLAGS="-u main"
19234             ;;
19235         solaris2*)
19236             if test "$GXX" != yes ; then
19237                 CXX_AR='$(CXX)'
19238                 CXX_ARFLAGS='-xar -o'
19239             fi
19240             ;;
19241         esac
19242
19243 else
19244         cf_cxx_library=no
19245         cf_cv_builtin_bool=1
19246
19247         # Just because we are not configuring against C++ right now does not
19248         # mean that a user will not want to use C++.  Some distributors disable
19249         # the C++ portion of this configuration as a shortcut (or just to avoid
19250         # compiling the demo in the c++ directory).  So we need a reasonable
19251         # default for the 'bool' type.
19252         #
19253         # Caveat: since the storage of the bool type is not standardized, it
19254         # may change.
19255
19256         if test "$NCURSES_BOOL" != auto ; then
19257                 cf_cv_type_of_bool=$NCURSES_BOOL
19258                 cf_cv_header_stdbool_h=0
19259         else
19260                 if test "$cf_cv_header_stdbool_h" = 1 ; then
19261
19262 echo "$as_me:19262: checking for size of bool" >&5
19263 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19264 if test "${cf_cv_type_of_bool+set}" = set; then
19265   echo $ECHO_N "(cached) $ECHO_C" >&6
19266 else
19267
19268         rm -f cf_test.out
19269         if test "$cross_compiling" = yes; then
19270   cf_cv_type_of_bool=unknown
19271 else
19272   cat >conftest.$ac_ext <<_ACEOF
19273 #line 19273 "configure"
19274 #include "confdefs.h"
19275
19276 #include <stdlib.h>
19277 #include <stdio.h>
19278
19279 #if defined(__cplusplus)
19280
19281 #ifdef HAVE_GXX_BUILTIN_H
19282 #include <g++/builtin.h>
19283 #elif HAVE_GPP_BUILTIN_H
19284 #include <gpp/builtin.h>
19285 #elif HAVE_BUILTIN_H
19286 #include <builtin.h>
19287 #endif
19288
19289 #else
19290
19291 #if $cf_cv_header_stdbool_h
19292 #include <stdbool.h>
19293 #endif
19294
19295 #endif
19296
19297 int main()
19298 {
19299         FILE *fp = fopen("cf_test.out", "w");
19300         if (fp != 0) {
19301                 bool x = true;
19302                 if ((bool)(-x) >= 0)
19303                         fputs("unsigned ", fp);
19304                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19305                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19306                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19307                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19308                 fclose(fp);
19309         }
19310         ${cf_cv_main_return:-return}(0);
19311 }
19312
19313 _ACEOF
19314 rm -f conftest$ac_exeext
19315 if { (eval echo "$as_me:19315: \"$ac_link\"") >&5
19316   (eval $ac_link) 2>&5
19317   ac_status=$?
19318   echo "$as_me:19318: \$? = $ac_status" >&5
19319   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19320   { (eval echo "$as_me:19320: \"$ac_try\"") >&5
19321   (eval $ac_try) 2>&5
19322   ac_status=$?
19323   echo "$as_me:19323: \$? = $ac_status" >&5
19324   (exit $ac_status); }; }; then
19325   cf_cv_type_of_bool=`cat cf_test.out`
19326                  if test -z "$cf_cv_type_of_bool"; then
19327                    cf_cv_type_of_bool=unknown
19328                  fi
19329 else
19330   echo "$as_me: program exited with status $ac_status" >&5
19331 echo "$as_me: failed program was:" >&5
19332 cat conftest.$ac_ext >&5
19333 cf_cv_type_of_bool=unknown
19334 fi
19335 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19336 fi
19337
19338 fi
19339
19340         rm -f cf_test.out
19341 echo "$as_me:19341: result: $cf_cv_type_of_bool" >&5
19342 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19343 if test "$cf_cv_type_of_bool" = unknown ; then
19344         case .$NCURSES_BOOL in #(vi
19345         .auto|.) NCURSES_BOOL=unsigned;;
19346         esac
19347         { echo "$as_me:19347: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19348 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19349         cf_cv_type_of_bool=$NCURSES_BOOL
19350 fi
19351
19352                 else
19353                         echo "$as_me:19353: checking for fallback type of bool" >&5
19354 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19355                         case "$host_cpu" in #(vi
19356                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19357                         *)      cf_cv_type_of_bool=int  ;;
19358                         esac
19359                         echo "$as_me:19359: result: $cf_cv_type_of_bool" >&5
19360 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19361                 fi
19362         fi
19363 fi
19364
19365 # If the C compiler did not declare bool, and we did not determine that the C++
19366 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19367 # ncurses library use the same type as C++ bool.  Note that this allows one to
19368 # specify the type of bool in a configure-script option and postpone
19369 # integration with the C++ compiler provided that the types are compatible.
19370 USE_CXX_BOOL=1
19371 if test $cf_cv_cc_bool_type = 1
19372 then
19373         # oops: C has a bool.  Unlikely, but C++ could differ.
19374         USE_CXX_BOOL=0
19375 elif test $cf_cv_builtin_bool = 0
19376 then
19377         # C++ has no bool
19378         USE_CXX_BOOL=0
19379 else
19380         # this is the normal case
19381         USE_CXX_BOOL='defined(__cplusplus)'
19382 fi
19383
19384 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19385
19386         if test "$cf_with_ada" != "no" ; then
19387                 if test "$with_libtool" != "no"; then
19388                         { echo "$as_me:19388: WARNING: libtool does not support Ada - disabling feature" >&5
19389 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19390                         cf_with_ada=no
19391                 fi
19392         fi
19393
19394         if test "$cf_with_ada" != "no" ; then
19395
19396 cf_ada_make=gnatmake
19397 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19398 set dummy $cf_ada_make; ac_word=$2
19399 echo "$as_me:19399: checking for $ac_word" >&5
19400 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19401 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19402   echo $ECHO_N "(cached) $ECHO_C" >&6
19403 else
19404   if test -n "$gnat_exists"; then
19405   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19406 else
19407   ac_save_IFS=$IFS; IFS=$ac_path_separator
19408 ac_dummy="$PATH"
19409 for ac_dir in $ac_dummy; do
19410   IFS=$ac_save_IFS
19411   test -z "$ac_dir" && ac_dir=.
19412   $as_executable_p "$ac_dir/$ac_word" || continue
19413 ac_cv_prog_gnat_exists="yes"
19414 echo "$as_me:19414: found $ac_dir/$ac_word" >&5
19415 break
19416 done
19417
19418   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19419 fi
19420 fi
19421 gnat_exists=$ac_cv_prog_gnat_exists
19422 if test -n "$gnat_exists"; then
19423   echo "$as_me:19423: result: $gnat_exists" >&5
19424 echo "${ECHO_T}$gnat_exists" >&6
19425 else
19426   echo "$as_me:19426: result: no" >&5
19427 echo "${ECHO_T}no" >&6
19428 fi
19429
19430 if test "$ac_cv_prog_gnat_exists" = no; then
19431    cf_ada_make=
19432    cf_cv_prog_gnat_correct=no
19433 else
19434
19435 echo "$as_me:19435: checking for gnat version" >&5
19436 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19437 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19438         grep '[0-9].[0-9][0-9]*' |\
19439     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19440 echo "$as_me:19440: result: $cf_gnat_version" >&5
19441 echo "${ECHO_T}$cf_gnat_version" >&6
19442
19443 case $cf_gnat_version in #(vi
19444 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19445         cf_cv_prog_gnat_correct=yes
19446         ;;
19447 *)
19448         { echo "$as_me:19448: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19449 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19450         cf_cv_prog_gnat_correct=no
19451         ;;
19452 esac
19453
19454    # Extract the first word of "m4", so it can be a program name with args.
19455 set dummy m4; ac_word=$2
19456 echo "$as_me:19456: checking for $ac_word" >&5
19457 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19458 if test "${ac_cv_prog_M4_exists+set}" = set; then
19459   echo $ECHO_N "(cached) $ECHO_C" >&6
19460 else
19461   if test -n "$M4_exists"; then
19462   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19463 else
19464   ac_save_IFS=$IFS; IFS=$ac_path_separator
19465 ac_dummy="$PATH"
19466 for ac_dir in $ac_dummy; do
19467   IFS=$ac_save_IFS
19468   test -z "$ac_dir" && ac_dir=.
19469   $as_executable_p "$ac_dir/$ac_word" || continue
19470 ac_cv_prog_M4_exists="yes"
19471 echo "$as_me:19471: found $ac_dir/$ac_word" >&5
19472 break
19473 done
19474
19475   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19476 fi
19477 fi
19478 M4_exists=$ac_cv_prog_M4_exists
19479 if test -n "$M4_exists"; then
19480   echo "$as_me:19480: result: $M4_exists" >&5
19481 echo "${ECHO_T}$M4_exists" >&6
19482 else
19483   echo "$as_me:19483: result: no" >&5
19484 echo "${ECHO_T}no" >&6
19485 fi
19486
19487    if test "$ac_cv_prog_M4_exists" = no; then
19488       cf_cv_prog_gnat_correct=no
19489       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19490    fi
19491    if test "$cf_cv_prog_gnat_correct" = yes; then
19492       echo "$as_me:19492: checking if GNAT works" >&5
19493 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19494
19495 rm -rf conftest* *~conftest*
19496 cat >>conftest.ads <<CF_EOF
19497 procedure conftest;
19498 CF_EOF
19499 cat >>conftest.adb <<CF_EOF
19500 with Text_IO;
19501 with GNAT.OS_Lib;
19502 procedure conftest is
19503 begin
19504    Text_IO.Put ("Hello World");
19505    Text_IO.New_Line;
19506    GNAT.OS_Lib.OS_Exit (0);
19507 end conftest;
19508 CF_EOF
19509 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19510    if ( ./conftest 1>&5 2>&1 ) ; then
19511       cf_cv_prog_gnat_correct=yes
19512    else
19513       cf_cv_prog_gnat_correct=no
19514    fi
19515 else
19516    cf_cv_prog_gnat_correct=no
19517 fi
19518 rm -rf conftest* *~conftest*
19519
19520       echo "$as_me:19520: result: $cf_cv_prog_gnat_correct" >&5
19521 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19522    fi
19523 fi
19524
19525                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
19526
19527         ADAFLAGS="$ADAFLAGS -gnatpn"
19528
19529         echo "$as_me:19529: checking optimization options for ADAFLAGS" >&5
19530 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
19531         case "$CFLAGS" in
19532         *-g*)
19533
19534         ADAFLAGS="$ADAFLAGS -g"
19535
19536                 ;;
19537         esac
19538         case "$CFLAGS" in
19539         *-O*)
19540                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
19541
19542         ADAFLAGS="$ADAFLAGS $cf_O_flag"
19543
19544                 ;;
19545         esac
19546         echo "$as_me:19546: result: $ADAFLAGS" >&5
19547 echo "${ECHO_T}$ADAFLAGS" >&6
19548
19549 echo "$as_me:19549: checking if GNAT supports generics" >&5
19550 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19551 case $cf_gnat_version in #(vi
19552 3.[1-9]*|[4-9].*) #(vi
19553         cf_gnat_generics=yes
19554         ;;
19555 *)
19556         cf_gnat_generics=no
19557         ;;
19558 esac
19559 echo "$as_me:19559: result: $cf_gnat_generics" >&5
19560 echo "${ECHO_T}$cf_gnat_generics" >&6
19561
19562 if test "$cf_gnat_generics" = yes
19563 then
19564         cf_compile_generics=generics
19565         cf_generic_objects="\${GENOBJS}"
19566 else
19567         cf_compile_generics=
19568         cf_generic_objects=
19569 fi
19570
19571 echo "$as_me:19571: checking if GNAT supports SIGINT" >&5
19572 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19573 if test "${cf_cv_gnat_sigint+set}" = set; then
19574   echo $ECHO_N "(cached) $ECHO_C" >&6
19575 else
19576
19577 rm -rf conftest* *~conftest*
19578 cat >>conftest.ads <<CF_EOF
19579 with Ada.Interrupts.Names;
19580
19581 package ConfTest is
19582
19583    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19584    pragma Unreserve_All_Interrupts;
19585    pragma Warnings (On);
19586
19587    protected Process is
19588       procedure Stop;
19589       function Continue return Boolean;
19590       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19591    private
19592       Done : Boolean := False;
19593    end Process;
19594
19595 end ConfTest;
19596 CF_EOF
19597 cat >>conftest.adb <<CF_EOF
19598 package body ConfTest is
19599    protected body Process is
19600       procedure Stop is
19601       begin
19602          Done := True;
19603       end Stop;
19604       function Continue return Boolean is
19605       begin
19606          return not Done;
19607       end Continue;
19608    end Process;
19609 end ConfTest;
19610 CF_EOF
19611 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19612       cf_cv_gnat_sigint=yes
19613 else
19614    cf_cv_gnat_sigint=no
19615 fi
19616 rm -rf conftest* *~conftest*
19617
19618 fi
19619 echo "$as_me:19619: result: $cf_cv_gnat_sigint" >&5
19620 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19621
19622 if test $cf_cv_gnat_sigint = yes ; then
19623         USE_GNAT_SIGINT=""
19624 else
19625         USE_GNAT_SIGINT="#"
19626 fi
19627
19628 echo "$as_me:19628: checking if GNAT pragma Unreferenced works" >&5
19629 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19630 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19631   echo $ECHO_N "(cached) $ECHO_C" >&6
19632 else
19633
19634 rm -rf conftest* *~conftest*
19635 cat >>conftest.ads <<CF_EOF
19636 procedure conftest;
19637 CF_EOF
19638 cat >>conftest.adb <<CF_EOF
19639 with Text_IO;
19640 with GNAT.OS_Lib;
19641 procedure conftest is
19642    test : Integer;
19643    pragma Unreferenced (test);
19644 begin
19645    test := 1;
19646    Text_IO.Put ("Hello World");
19647    Text_IO.New_Line;
19648    GNAT.OS_Lib.OS_Exit (0);
19649 end conftest;
19650 CF_EOF
19651 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19652       cf_cv_pragma_unreferenced=yes
19653 else
19654    cf_cv_pragma_unreferenced=no
19655 fi
19656 rm -rf conftest* *~conftest*
19657
19658 fi
19659 echo "$as_me:19659: result: $cf_cv_pragma_unreferenced" >&5
19660 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19661
19662 # if the pragma is supported, use it (needed in the Trace code).
19663 if test $cf_cv_pragma_unreferenced = yes ; then
19664         PRAGMA_UNREF=TRUE
19665 else
19666         PRAGMA_UNREF=FALSE
19667 fi
19668
19669 cf_gnat_libraries=no
19670 cf_gnat_projects=no
19671
19672 echo "$as_me:19672: checking if GNAT supports project files" >&5
19673 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19674 case $cf_gnat_version in #(vi
19675 3.[0-9]*) #(vi
19676         ;;
19677 *)
19678         case $cf_cv_system_name in #(vi
19679         cygwin*|msys*) #(vi
19680                 ;;
19681         *)
19682                 mkdir conftest.src conftest.bin conftest.lib
19683                 cd conftest.src
19684                 rm -rf conftest* *~conftest*
19685                 cat >>library.gpr <<CF_EOF
19686 project Library is
19687   Kind := External ("LIB_KIND");
19688   for Library_Name use "ConfTest";
19689   for Object_Dir use ".";
19690   for Library_ALI_Dir use External("LIBRARY_DIR");
19691   for Library_Version use External ("SONAME");
19692   for Library_Kind use Kind;
19693   for Library_Dir use External("BUILD_DIR");
19694   Source_Dir := External ("SOURCE_DIR");
19695   for Source_Dirs use (Source_Dir);
19696   package Compiler is
19697      for Default_Switches ("Ada") use
19698        ("-g",
19699         "-O2",
19700         "-gnatafno",
19701         "-gnatVa",   -- All validity checks
19702         "-gnatwa");  -- Activate all optional errors
19703   end Compiler;
19704 end Library;
19705 CF_EOF
19706                 cat >>confpackage.ads <<CF_EOF
19707 package ConfPackage is
19708    procedure conftest;
19709 end ConfPackage;
19710 CF_EOF
19711                 cat >>confpackage.adb <<CF_EOF
19712 with Text_IO;
19713 package body ConfPackage is
19714    procedure conftest is
19715    begin
19716       Text_IO.Put ("Hello World");
19717       Text_IO.New_Line;
19718    end conftest;
19719 end ConfPackage;
19720 CF_EOF
19721                 if ( $cf_ada_make $ADAFLAGS \
19722                                 -Plibrary.gpr \
19723                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19724                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19725                                 -XSOURCE_DIR=`pwd` \
19726                                 -XSONAME=libConfTest.so.1 \
19727                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19728                         cf_gnat_projects=yes
19729                 fi
19730                 cd ..
19731                 if test -f conftest.lib/confpackage.ali
19732                 then
19733                         cf_gnat_libraries=yes
19734                 fi
19735                 rm -rf conftest* *~conftest*
19736                 ;;
19737         esac
19738         ;;
19739 esac
19740 echo "$as_me:19740: result: $cf_gnat_projects" >&5
19741 echo "${ECHO_T}$cf_gnat_projects" >&6
19742
19743 if test $cf_gnat_projects = yes
19744 then
19745         echo "$as_me:19745: checking if GNAT supports libraries" >&5
19746 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19747         echo "$as_me:19747: result: $cf_gnat_libraries" >&5
19748 echo "${ECHO_T}$cf_gnat_libraries" >&6
19749 fi
19750
19751 if test "$cf_gnat_projects" = yes
19752 then
19753         USE_OLD_MAKERULES="#"
19754         USE_GNAT_PROJECTS=""
19755 else
19756         USE_OLD_MAKERULES=""
19757         USE_GNAT_PROJECTS="#"
19758 fi
19759
19760 if test "$cf_gnat_libraries" = yes
19761 then
19762         USE_GNAT_LIBRARIES=""
19763 else
19764         USE_GNAT_LIBRARIES="#"
19765 fi
19766
19767 echo "$as_me:19767: checking for ada-compiler" >&5
19768 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19769
19770 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19771 if test "${with_ada_compiler+set}" = set; then
19772   withval="$with_ada_compiler"
19773   cf_ada_compiler=$withval
19774 else
19775   cf_ada_compiler=gnatmake
19776 fi;
19777
19778 echo "$as_me:19778: result: $cf_ada_compiler" >&5
19779 echo "${ECHO_T}$cf_ada_compiler" >&6
19780
19781                         cf_ada_package=terminal_interface
19782
19783 echo "$as_me:19783: checking for ada-include" >&5
19784 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19785
19786 # Check whether --with-ada-include or --without-ada-include was given.
19787 if test "${with_ada_include+set}" = set; then
19788   withval="$with_ada_include"
19789
19790 else
19791   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19792 fi; if test -n "$prefix/share/ada/adainclude" ; then
19793
19794 if test "x$prefix" != xNONE; then
19795   cf_path_syntax="$prefix"
19796 else
19797   cf_path_syntax="$ac_default_prefix"
19798 fi
19799
19800 case ".$withval" in #(vi
19801 .\$\(*\)*|.\'*\'*) #(vi
19802   ;;
19803 ..|./*|.\\*) #(vi
19804   ;;
19805 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19806   ;;
19807 .\${*prefix}*|.\${*dir}*) #(vi
19808   eval withval="$withval"
19809   case ".$withval" in #(vi
19810   .NONE/*)
19811     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19812     ;;
19813   esac
19814   ;; #(vi
19815 .no|.NONE/*)
19816   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19817   ;;
19818 *)
19819   { { echo "$as_me:19819: error: expected a pathname, not \"$withval\"" >&5
19820 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19821    { (exit 1); exit 1; }; }
19822   ;;
19823 esac
19824
19825 fi
19826 eval ADA_INCLUDE="$withval"
19827
19828 echo "$as_me:19828: result: $ADA_INCLUDE" >&5
19829 echo "${ECHO_T}$ADA_INCLUDE" >&6
19830
19831 echo "$as_me:19831: checking for ada-objects" >&5
19832 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19833
19834 # Check whether --with-ada-objects or --without-ada-objects was given.
19835 if test "${with_ada_objects+set}" = set; then
19836   withval="$with_ada_objects"
19837
19838 else
19839   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19840 fi; if test -n "$prefix/lib/ada/adalib" ; then
19841
19842 if test "x$prefix" != xNONE; then
19843   cf_path_syntax="$prefix"
19844 else
19845   cf_path_syntax="$ac_default_prefix"
19846 fi
19847
19848 case ".$withval" in #(vi
19849 .\$\(*\)*|.\'*\'*) #(vi
19850   ;;
19851 ..|./*|.\\*) #(vi
19852   ;;
19853 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19854   ;;
19855 .\${*prefix}*|.\${*dir}*) #(vi
19856   eval withval="$withval"
19857   case ".$withval" in #(vi
19858   .NONE/*)
19859     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19860     ;;
19861   esac
19862   ;; #(vi
19863 .no|.NONE/*)
19864   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19865   ;;
19866 *)
19867   { { echo "$as_me:19867: error: expected a pathname, not \"$withval\"" >&5
19868 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19869    { (exit 1); exit 1; }; }
19870   ;;
19871 esac
19872
19873 fi
19874 eval ADA_OBJECTS="$withval"
19875
19876 echo "$as_me:19876: result: $ADA_OBJECTS" >&5
19877 echo "${ECHO_T}$ADA_OBJECTS" >&6
19878
19879 echo "$as_me:19879: checking if an Ada95 shared-library should be built" >&5
19880 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19881
19882 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19883 if test "${with_ada_sharedlib+set}" = set; then
19884   withval="$with_ada_sharedlib"
19885   with_ada_sharedlib=$withval
19886 else
19887   with_ada_sharedlib=no
19888 fi;
19889 echo "$as_me:19889: result: $with_ada_sharedlib" >&5
19890 echo "${ECHO_T}$with_ada_sharedlib" >&6
19891
19892 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19893 MAKE_ADA_SHAREDLIB="#"
19894
19895 if test "x$with_ada_sharedlib" != xno
19896 then
19897         MAKE_ADA_SHAREDLIB=
19898         if test "x$with_ada_sharedlib" != xyes
19899         then
19900                 ADA_SHAREDLIB="$with_ada_sharedlib"
19901         fi
19902 fi
19903
19904                 fi
19905         fi
19906 else
19907         cf_with_ada=no
19908 fi
19909
19910 # do this "late" to avoid conflict with header-checks
19911 if test "x$with_widec" = xyes ; then
19912         echo "$as_me:19912: checking for wchar_t" >&5
19913 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
19914 if test "${ac_cv_type_wchar_t+set}" = set; then
19915   echo $ECHO_N "(cached) $ECHO_C" >&6
19916 else
19917   cat >conftest.$ac_ext <<_ACEOF
19918 #line 19918 "configure"
19919 #include "confdefs.h"
19920 $ac_includes_default
19921 int
19922 main ()
19923 {
19924 if ((wchar_t *) 0)
19925   return 0;
19926 if (sizeof (wchar_t))
19927   return 0;
19928   ;
19929   return 0;
19930 }
19931 _ACEOF
19932 rm -f conftest.$ac_objext
19933 if { (eval echo "$as_me:19933: \"$ac_compile\"") >&5
19934   (eval $ac_compile) 2>&5
19935   ac_status=$?
19936   echo "$as_me:19936: \$? = $ac_status" >&5
19937   (exit $ac_status); } &&
19938          { ac_try='test -s conftest.$ac_objext'
19939   { (eval echo "$as_me:19939: \"$ac_try\"") >&5
19940   (eval $ac_try) 2>&5
19941   ac_status=$?
19942   echo "$as_me:19942: \$? = $ac_status" >&5
19943   (exit $ac_status); }; }; then
19944   ac_cv_type_wchar_t=yes
19945 else
19946   echo "$as_me: failed program was:" >&5
19947 cat conftest.$ac_ext >&5
19948 ac_cv_type_wchar_t=no
19949 fi
19950 rm -f conftest.$ac_objext conftest.$ac_ext
19951 fi
19952 echo "$as_me:19952: result: $ac_cv_type_wchar_t" >&5
19953 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
19954
19955 echo "$as_me:19955: checking size of wchar_t" >&5
19956 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
19957 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
19958   echo $ECHO_N "(cached) $ECHO_C" >&6
19959 else
19960   if test "$ac_cv_type_wchar_t" = yes; then
19961   if test "$cross_compiling" = yes; then
19962   # Depending upon the size, compute the lo and hi bounds.
19963 cat >conftest.$ac_ext <<_ACEOF
19964 #line 19964 "configure"
19965 #include "confdefs.h"
19966 $ac_includes_default
19967 int
19968 main ()
19969 {
19970 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
19971   ;
19972   return 0;
19973 }
19974 _ACEOF
19975 rm -f conftest.$ac_objext
19976 if { (eval echo "$as_me:19976: \"$ac_compile\"") >&5
19977   (eval $ac_compile) 2>&5
19978   ac_status=$?
19979   echo "$as_me:19979: \$? = $ac_status" >&5
19980   (exit $ac_status); } &&
19981          { ac_try='test -s conftest.$ac_objext'
19982   { (eval echo "$as_me:19982: \"$ac_try\"") >&5
19983   (eval $ac_try) 2>&5
19984   ac_status=$?
19985   echo "$as_me:19985: \$? = $ac_status" >&5
19986   (exit $ac_status); }; }; then
19987   ac_lo=0 ac_mid=0
19988   while :; do
19989     cat >conftest.$ac_ext <<_ACEOF
19990 #line 19990 "configure"
19991 #include "confdefs.h"
19992 $ac_includes_default
19993 int
19994 main ()
19995 {
19996 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
19997   ;
19998   return 0;
19999 }
20000 _ACEOF
20001 rm -f conftest.$ac_objext
20002 if { (eval echo "$as_me:20002: \"$ac_compile\"") >&5
20003   (eval $ac_compile) 2>&5
20004   ac_status=$?
20005   echo "$as_me:20005: \$? = $ac_status" >&5
20006   (exit $ac_status); } &&
20007          { ac_try='test -s conftest.$ac_objext'
20008   { (eval echo "$as_me:20008: \"$ac_try\"") >&5
20009   (eval $ac_try) 2>&5
20010   ac_status=$?
20011   echo "$as_me:20011: \$? = $ac_status" >&5
20012   (exit $ac_status); }; }; then
20013   ac_hi=$ac_mid; break
20014 else
20015   echo "$as_me: failed program was:" >&5
20016 cat conftest.$ac_ext >&5
20017 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
20018 fi
20019 rm -f conftest.$ac_objext conftest.$ac_ext
20020   done
20021 else
20022   echo "$as_me: failed program was:" >&5
20023 cat conftest.$ac_ext >&5
20024 ac_hi=-1 ac_mid=-1
20025   while :; do
20026     cat >conftest.$ac_ext <<_ACEOF
20027 #line 20027 "configure"
20028 #include "confdefs.h"
20029 $ac_includes_default
20030 int
20031 main ()
20032 {
20033 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
20034   ;
20035   return 0;
20036 }
20037 _ACEOF
20038 rm -f conftest.$ac_objext
20039 if { (eval echo "$as_me:20039: \"$ac_compile\"") >&5
20040   (eval $ac_compile) 2>&5
20041   ac_status=$?
20042   echo "$as_me:20042: \$? = $ac_status" >&5
20043   (exit $ac_status); } &&
20044          { ac_try='test -s conftest.$ac_objext'
20045   { (eval echo "$as_me:20045: \"$ac_try\"") >&5
20046   (eval $ac_try) 2>&5
20047   ac_status=$?
20048   echo "$as_me:20048: \$? = $ac_status" >&5
20049   (exit $ac_status); }; }; then
20050   ac_lo=$ac_mid; break
20051 else
20052   echo "$as_me: failed program was:" >&5
20053 cat conftest.$ac_ext >&5
20054 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
20055 fi
20056 rm -f conftest.$ac_objext conftest.$ac_ext
20057   done
20058 fi
20059 rm -f conftest.$ac_objext conftest.$ac_ext
20060 # Binary search between lo and hi bounds.
20061 while test "x$ac_lo" != "x$ac_hi"; do
20062   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20063   cat >conftest.$ac_ext <<_ACEOF
20064 #line 20064 "configure"
20065 #include "confdefs.h"
20066 $ac_includes_default
20067 int
20068 main ()
20069 {
20070 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20071   ;
20072   return 0;
20073 }
20074 _ACEOF
20075 rm -f conftest.$ac_objext
20076 if { (eval echo "$as_me:20076: \"$ac_compile\"") >&5
20077   (eval $ac_compile) 2>&5
20078   ac_status=$?
20079   echo "$as_me:20079: \$? = $ac_status" >&5
20080   (exit $ac_status); } &&
20081          { ac_try='test -s conftest.$ac_objext'
20082   { (eval echo "$as_me:20082: \"$ac_try\"") >&5
20083   (eval $ac_try) 2>&5
20084   ac_status=$?
20085   echo "$as_me:20085: \$? = $ac_status" >&5
20086   (exit $ac_status); }; }; then
20087   ac_hi=$ac_mid
20088 else
20089   echo "$as_me: failed program was:" >&5
20090 cat conftest.$ac_ext >&5
20091 ac_lo=`expr $ac_mid + 1`
20092 fi
20093 rm -f conftest.$ac_objext conftest.$ac_ext
20094 done
20095 ac_cv_sizeof_wchar_t=$ac_lo
20096 else
20097   if test "$cross_compiling" = yes; then
20098   { { echo "$as_me:20098: error: cannot run test program while cross compiling" >&5
20099 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20100    { (exit 1); exit 1; }; }
20101 else
20102   cat >conftest.$ac_ext <<_ACEOF
20103 #line 20103 "configure"
20104 #include "confdefs.h"
20105 $ac_includes_default
20106 int
20107 main ()
20108 {
20109 FILE *f = fopen ("conftest.val", "w");
20110 if (!f)
20111   $ac_main_return (1);
20112 fprintf (f, "%d", (sizeof (wchar_t)));
20113 fclose (f);
20114   ;
20115   return 0;
20116 }
20117 _ACEOF
20118 rm -f conftest$ac_exeext
20119 if { (eval echo "$as_me:20119: \"$ac_link\"") >&5
20120   (eval $ac_link) 2>&5
20121   ac_status=$?
20122   echo "$as_me:20122: \$? = $ac_status" >&5
20123   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20124   { (eval echo "$as_me:20124: \"$ac_try\"") >&5
20125   (eval $ac_try) 2>&5
20126   ac_status=$?
20127   echo "$as_me:20127: \$? = $ac_status" >&5
20128   (exit $ac_status); }; }; then
20129   ac_cv_sizeof_wchar_t=`cat conftest.val`
20130 else
20131   echo "$as_me: program exited with status $ac_status" >&5
20132 echo "$as_me: failed program was:" >&5
20133 cat conftest.$ac_ext >&5
20134 fi
20135 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20136 fi
20137 fi
20138 rm -f conftest.val
20139 else
20140   ac_cv_sizeof_wchar_t=0
20141 fi
20142 fi
20143 echo "$as_me:20143: result: $ac_cv_sizeof_wchar_t" >&5
20144 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
20145 cat >>confdefs.h <<EOF
20146 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
20147 EOF
20148
20149 fi
20150
20151 ### Construct the ncurses library-subsets, if any, from this set of keywords:
20152 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
20153 ###
20154 ### ticlib modules may be a separate library, otherwise contained in termlib.
20155 ### termlib modules may be a separate library, otherwise contained in ncurses.
20156 ###
20157 ### The of "+" or " " between the tokens controls the way the script
20158 ### chooses to split module lists into libraries.
20159 ###
20160 ### (see CF_LIB_RULES).
20161 echo "$as_me:20161: checking for library subsets" >&5
20162 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
20163 LIB_SUBSETS=
20164
20165 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
20166         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
20167         if test "$with_ticlib" != no ; then
20168                 LIB_SUBSETS="${LIB_SUBSETS} "
20169         else
20170                 LIB_SUBSETS="${LIB_SUBSETS}+"
20171         fi
20172 fi
20173
20174 LIB_SUBSETS="${LIB_SUBSETS}termlib"
20175 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
20176
20177 if test "$with_termlib" != no ; then
20178         LIB_SUBSETS="${LIB_SUBSETS} "
20179 else
20180         LIB_SUBSETS="${LIB_SUBSETS}+"
20181 fi
20182
20183 LIB_SUBSETS="${LIB_SUBSETS}base"
20184
20185 # Most term-driver calls are to tinfo, but some like init_pair are to the
20186 # base library (so it resides in base).
20187 if test "$with_term_driver" != no ; then
20188         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
20189         case $cf_cv_system_name in #(vi
20190         *mingw32*) #(vi
20191                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
20192                 ;;
20193         *) #(vi
20194                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
20195                 ;;
20196         esac
20197 fi
20198
20199 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
20200 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
20201
20202 echo "$as_me:20202: result: $LIB_SUBSETS" >&5
20203 echo "${ECHO_T}$LIB_SUBSETS" >&6
20204
20205 ### Construct the list of include-directories to be generated
20206
20207 if test "$GCC" != yes; then
20208         CPPFLAGS="-I\${includedir} $CPPFLAGS"
20209 elif test "$includedir" != "/usr/include"; then
20210         if test "$includedir" = '${prefix}/include' ; then
20211                 if test x$prefix != x/usr ; then
20212                         CPPFLAGS="-I\${includedir} $CPPFLAGS"
20213                 fi
20214         else
20215                 CPPFLAGS="-I\${includedir} $CPPFLAGS"
20216         fi
20217 fi
20218 if test "$srcdir" != "."; then
20219         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
20220 fi
20221 CPPFLAGS="-I. -I../include $CPPFLAGS"
20222
20223 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
20224 if test "$srcdir" != "."; then
20225         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
20226 fi
20227 if test "$GCC" != yes; then
20228         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20229 elif test "$includedir" != "/usr/include"; then
20230         if test "$includedir" = '${prefix}/include' ; then
20231                 if test x$prefix != x/usr ; then
20232                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20233                 fi
20234         else
20235                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20236         fi
20237 fi
20238
20239 ### Build up pieces for makefile rules
20240 echo "$as_me:20240: checking default library suffix" >&5
20241 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
20242
20243         case $DFT_LWR_MODEL in
20244         libtool) DFT_ARG_SUFFIX=''   ;;
20245         normal)  DFT_ARG_SUFFIX=''   ;;
20246         debug)   DFT_ARG_SUFFIX='_g' ;;
20247         profile) DFT_ARG_SUFFIX='_p' ;;
20248         shared)  DFT_ARG_SUFFIX=''   ;;
20249         esac
20250         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
20251 echo "$as_me:20251: result: $DFT_ARG_SUFFIX" >&5
20252 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
20253
20254 echo "$as_me:20254: checking default library-dependency suffix" >&5
20255 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
20256
20257         case X$DFT_LWR_MODEL in #(vi
20258         Xlibtool) #(vi
20259                 DFT_LIB_SUFFIX='.la'
20260                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20261                 ;;
20262         Xdebug) #(vi
20263                 DFT_LIB_SUFFIX='_g.a'
20264                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20265                 ;;
20266         Xprofile) #(vi
20267                 DFT_LIB_SUFFIX='_p.a'
20268                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20269                 ;;
20270         Xshared) #(vi
20271                 case $cf_cv_system_name in
20272                 aix[5-7]*) #(vi
20273                         DFT_LIB_SUFFIX='.a'
20274                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20275                         ;;
20276                 cygwin*|msys*|mingw*) #(vi
20277                         DFT_LIB_SUFFIX='.dll'
20278                         DFT_DEP_SUFFIX='.dll.a'
20279                         ;;
20280                 darwin*) #(vi
20281                         DFT_LIB_SUFFIX='.dylib'
20282                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20283                         ;;
20284                 hpux*) #(vi
20285                         case $target in
20286                         ia64*) #(vi
20287                                 DFT_LIB_SUFFIX='.so'
20288                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20289                                 ;;
20290                         *) #(vi
20291                                 DFT_LIB_SUFFIX='.sl'
20292                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20293                                 ;;
20294                         esac
20295                         ;;
20296                 *) #(vi
20297                         DFT_LIB_SUFFIX='.so'
20298                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20299                         ;;
20300                 esac
20301                 ;;
20302         *)
20303                 DFT_LIB_SUFFIX='.a'
20304                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20305                 ;;
20306         esac
20307         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
20308         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
20309 echo "$as_me:20309: result: $DFT_DEP_SUFFIX" >&5
20310 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
20311
20312 echo "$as_me:20312: checking default object directory" >&5
20313 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
20314
20315         case $DFT_LWR_MODEL in
20316         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
20317         normal)  DFT_OBJ_SUBDIR='objects' ;;
20318         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
20319         profile) DFT_OBJ_SUBDIR='obj_p' ;;
20320         shared)
20321                 case $cf_cv_system_name in #(vi
20322                 cygwin|msys) #(vi
20323                         DFT_OBJ_SUBDIR='objects' ;;
20324                 *)
20325                         DFT_OBJ_SUBDIR='obj_s' ;;
20326                 esac
20327         esac
20328 echo "$as_me:20328: result: $DFT_OBJ_SUBDIR" >&5
20329 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
20330
20331 if test "x$cf_with_cxx" = xyes ; then
20332 echo "$as_me:20332: checking c++ library-dependency suffix" >&5
20333 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
20334 if test "$with_libtool" != "no"; then
20335         # libtool thinks it can make c++ shared libraries (perhaps only g++)
20336         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20337 elif test "$with_shared_cxx" != "no"; then
20338         # also for g++ users...
20339         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20340 else
20341         # we normally make a static library because C/C++ library rules differ
20342
20343         case Xnormal in #(vi
20344         Xlibtool) #(vi
20345                 CXX_LIB_SUFFIX='.la'
20346                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20347                 ;;
20348         Xdebug) #(vi
20349                 CXX_LIB_SUFFIX='_g.a'
20350                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20351                 ;;
20352         Xprofile) #(vi
20353                 CXX_LIB_SUFFIX='_p.a'
20354                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20355                 ;;
20356         Xshared) #(vi
20357                 case $cf_cv_system_name in
20358                 aix[5-7]*) #(vi
20359                         CXX_LIB_SUFFIX='.a'
20360                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20361                         ;;
20362                 cygwin*|msys*|mingw*) #(vi
20363                         CXX_LIB_SUFFIX='.dll'
20364                         CXX_DEP_SUFFIX='.dll.a'
20365                         ;;
20366                 darwin*) #(vi
20367                         CXX_LIB_SUFFIX='.dylib'
20368                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20369                         ;;
20370                 hpux*) #(vi
20371                         case $target in
20372                         ia64*) #(vi
20373                                 CXX_LIB_SUFFIX='.so'
20374                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20375                                 ;;
20376                         *) #(vi
20377                                 CXX_LIB_SUFFIX='.sl'
20378                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20379                                 ;;
20380                         esac
20381                         ;;
20382                 *) #(vi
20383                         CXX_LIB_SUFFIX='.so'
20384                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20385                         ;;
20386                 esac
20387                 ;;
20388         *)
20389                 CXX_LIB_SUFFIX='.a'
20390                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20391                 ;;
20392         esac
20393         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
20394         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
20395
20396 fi
20397 echo "$as_me:20397: result: $CXX_LIB_SUFFIX" >&5
20398 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
20399
20400 fi
20401
20402 # do not want -ldl in build except as needed for -lncurses dependency
20403 if test "x$with_dlsym" = xyes ; then
20404 if test $DFT_LWR_MODEL = shared || \
20405    test $DFT_LWR_MODEL = libtool ; then
20406
20407 # remove dl library from $LIBS
20408 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
20409
20410 fi
20411 fi
20412 ### Set up low-level terminfo dependencies for makefiles.
20413
20414 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
20415 # do not need libdl
20416 TICS_LIST=
20417 if test "x$with_dlsym" = xyes ; then
20418
20419 # remove dl library from $SHLIB_LIST
20420 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
20421
20422 fi
20423
20424 if test "$with_ticlib" != no ; then
20425
20426         if test "x$with_ticlib" != xyes ; then
20427                 TICS_NAME=$with_ticlib
20428                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20429                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20430                 TICS_LIB_SUFFIX="${with_ticlib}"
20431         else
20432                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
20433                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
20434                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
20435         fi
20436         TICS_LDFLAGS="-L${LIB_DIR}"
20437         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
20438 else
20439         TICS_LDFLAGS="-L${LIB_DIR}"
20440         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20441 fi
20442
20443 if test "$with_termlib" != no ; then
20444
20445         if test "x$with_termlib" != xyes ; then
20446                 TINFO_NAME=$with_termlib
20447                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20448                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20449                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20450                 TINFO_LIB_SUFFIX="${with_termlib}"
20451         else
20452                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20453                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
20454                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
20455                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
20456         fi
20457
20458         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20459         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20460         if test "$DFT_LWR_MODEL" = "libtool"; then
20461                 TEST_ARGS="${TEST_DEPS}"
20462                 TEST_ARG2="${TEST_DEP2}"
20463                 TINFO_LDFLAGS="-L${LIB_DIR}"
20464                 TINFO_LIBS="$TEST_ARGS"
20465                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
20466                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
20467         else
20468                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
20469                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
20470                 if test "x$with_term_driver" != xno ; then
20471                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20472                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20473                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20474                 else
20475                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20476                         TINFO_LIBS="$TEST_ARGS"
20477                 fi
20478                 TINFO_LDFLAGS="-L${LIB_DIR}"
20479                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20480         fi
20481 else
20482         # the next lines are needed for linking libtic over libncurses
20483         TINFO_NAME=${LIB_NAME}
20484         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20485         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
20486         if test "x$with_tic_depends" = xyes ; then
20487                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20488         else
20489                 TICS_LIST="$SHLIB_LIST"
20490         fi
20491
20492         TINFO_LDFLAGS="-L${LIB_DIR}"
20493         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20494 fi
20495
20496 if test "$DFT_LWR_MODEL" = shared ; then
20497         case $cf_cv_system_name in #(vi
20498         cygwin*|msys*)
20499                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
20500                 TINFO_SUFFIX=.dll
20501                 ;;
20502         esac
20503 fi
20504
20505 if test "x$with_dlsym" = xyes ; then
20506
20507 # remove dl library from $TICS_LIST
20508 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
20509
20510 fi
20511
20512 if test "$DFT_LWR_MODEL" = "libtool"; then
20513     OBJEXT=lo
20514 fi
20515
20516 # needed for Ada95
20517 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
20518
20519 case $DFT_LWR_MODEL in
20520 normal|debug|profile)
20521
20522 if test "$GCC" = yes ; then
20523         case $cf_cv_system_name in #(
20524         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
20525                 LDFLAGS_STATIC=
20526                 LDFLAGS_SHARED=
20527                 ;;
20528     *)  #( normally, except when broken
20529         LDFLAGS_STATIC=-static
20530         LDFLAGS_SHARED=-dynamic
20531         ;;
20532     esac
20533 else
20534         case $cf_cv_system_name in #(
20535         aix[4-7]*)      #( from ld manpage
20536                 LDFLAGS_STATIC=-bstatic
20537                 LDFLAGS_SHARED=-bdynamic
20538                 ;;
20539         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
20540                 # We could also use just "archive" and "shared".
20541                 LDFLAGS_STATIC=-Wl,-a,archive_shared
20542                 LDFLAGS_SHARED=-Wl,-a,shared_archive
20543                 ;;
20544         irix*)          #( from ld manpage IRIX64
20545                 LDFLAGS_STATIC=-Bstatic
20546                 LDFLAGS_SHARED=-Bdynamic
20547                 ;;
20548         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
20549                 # alternative "-oldstyle_liblookup" (not in cc manpage)
20550                 LDFLAGS_STATIC=-noso
20551                 LDFLAGS_SHARED=-so_archive
20552                 ;;
20553         solaris2*)
20554                 LDFLAGS_STATIC=-Bstatic
20555                 LDFLAGS_SHARED=-Bdynamic
20556                 ;;
20557         esac
20558 fi
20559
20560 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
20561 then
20562         echo "$as_me:20562: checking if linker supports switching between static/dynamic" >&5
20563 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
20564
20565         rm -f libconftest.a
20566         cat >conftest.$ac_ext <<EOF
20567 #line 20567 "configure"
20568 #include <stdio.h>
20569 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
20570 EOF
20571         if { (eval echo "$as_me:20571: \"$ac_compile\"") >&5
20572   (eval $ac_compile) 2>&5
20573   ac_status=$?
20574   echo "$as_me:20574: \$? = $ac_status" >&5
20575   (exit $ac_status); } ; then
20576                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
20577                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
20578         fi
20579         rm -f conftest.*
20580
20581         cf_save_LIBS="$LIBS"
20582
20583         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20584         cat >conftest.$ac_ext <<_ACEOF
20585 #line 20585 "configure"
20586 #include "confdefs.h"
20587
20588 #line 20588 "configure"
20589 #include <stdio.h>
20590 int cf_ldflags_static(FILE *fp);
20591
20592 int
20593 main ()
20594 {
20595
20596         return cf_ldflags_static(stdin);
20597
20598   ;
20599   return 0;
20600 }
20601 _ACEOF
20602 rm -f conftest.$ac_objext conftest$ac_exeext
20603 if { (eval echo "$as_me:20603: \"$ac_link\"") >&5
20604   (eval $ac_link) 2>&5
20605   ac_status=$?
20606   echo "$as_me:20606: \$? = $ac_status" >&5
20607   (exit $ac_status); } &&
20608          { ac_try='test -s conftest$ac_exeext'
20609   { (eval echo "$as_me:20609: \"$ac_try\"") >&5
20610   (eval $ac_try) 2>&5
20611   ac_status=$?
20612   echo "$as_me:20612: \$? = $ac_status" >&5
20613   (exit $ac_status); }; }; then
20614
20615         # some linkers simply ignore the -dynamic
20616         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20617         *static*) # (vi
20618                 cf_ldflags_static=no
20619                 ;;
20620         *)
20621                 cf_ldflags_static=yes
20622                 ;;
20623         esac
20624
20625 else
20626   echo "$as_me: failed program was:" >&5
20627 cat conftest.$ac_ext >&5
20628 cf_ldflags_static=no
20629 fi
20630 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20631
20632         rm -f libconftest.*
20633         LIBS="$cf_save_LIBS"
20634
20635         echo "$as_me:20635: result: $cf_ldflags_static" >&5
20636 echo "${ECHO_T}$cf_ldflags_static" >&6
20637
20638         if test $cf_ldflags_static != yes
20639         then
20640                 LDFLAGS_STATIC=
20641                 LDFLAGS_SHARED=
20642         fi
20643 else
20644         LDFLAGS_STATIC=
20645         LDFLAGS_SHARED=
20646 fi
20647
20648         ;;
20649 esac
20650
20651 echo "$as_me:20651: checking where we will install curses.h" >&5
20652 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20653
20654 includesubdir=
20655 if test "$with_overwrite" = no && \
20656  ( test "x$includedir" = 'x${prefix}/include' || \
20657    test "x$includedir" = "x${prefix}/include" )
20658 then
20659         includesubdir="/ncurses${LIB_SUFFIX}"
20660 fi
20661 echo "$as_me:20661: result: ${includedir}${includesubdir}" >&5
20662 echo "${ECHO_T}${includedir}${includesubdir}" >&6
20663
20664 ### Resolve a conflict between normal and wide-curses by forcing applications
20665 ### that will need libutf8 to add it to their configure script.
20666 if test "$with_overwrite" != no ; then
20667 if test "$NCURSES_LIBUTF8" = 1 ; then
20668         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20669         { echo "$as_me:20669: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20670 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20671 fi
20672 fi
20673 WITH_OVERWRITE=$with_overwrite
20674
20675 # used to separate tack out of the tree
20676 NCURSES_TREE=
20677
20678 ### predefined stuff for the test programs
20679
20680 cat >>confdefs.h <<\EOF
20681 #define HAVE_SLK_COLOR 1
20682 EOF
20683
20684 ### Construct the list of subdirectories for which we'll customize makefiles
20685 ### with the appropriate compile-rules.
20686
20687 echo "$as_me:20687: checking for src modules" >&5
20688 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20689
20690 # dependencies and linker-arguments for test-programs
20691 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20692 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20693 if test "$DFT_LWR_MODEL" = "libtool"; then
20694         TEST_ARGS="${TEST_DEPS}"
20695         TEST_ARG2="${TEST_DEP2}"
20696 else
20697         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20698         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20699 fi
20700
20701 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20702 cf_cv_src_modules=
20703 for cf_dir in $modules_to_build
20704 do
20705         if test -f $srcdir/$cf_dir/modules; then
20706
20707                 # We may/may not have tack in the distribution, though the
20708                 # makefile is.
20709                 if test $cf_dir = tack ; then
20710                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20711                                 continue
20712                         fi
20713                 fi
20714
20715                 if test -z "$cf_cv_src_modules"; then
20716                         cf_cv_src_modules=$cf_dir
20717                 else
20718                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20719                 fi
20720
20721                 # Make the ncurses_cfg.h file record the library interface files as
20722                 # well.  These are header files that are the same name as their
20723                 # directory.  Ncurses is the only library that does not follow
20724                 # that pattern.
20725                 if test $cf_dir = tack ; then
20726                         continue
20727                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20728
20729 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20730
20731                         cat >>confdefs.h <<EOF
20732 #define HAVE_${cf_have_include}_H 1
20733 EOF
20734
20735                         cat >>confdefs.h <<EOF
20736 #define HAVE_LIB${cf_have_include} 1
20737 EOF
20738
20739                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20740                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20741                         if test "$DFT_LWR_MODEL" = "libtool"; then
20742                                 TEST_ARGS="${TEST_DEPS}"
20743                                 TEST_ARG2="${TEST_DEP2}"
20744                         else
20745                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20746                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20747                         fi
20748                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20749                 fi
20750         fi
20751 done
20752 echo "$as_me:20752: result: $cf_cv_src_modules" >&5
20753 echo "${ECHO_T}$cf_cv_src_modules" >&6
20754
20755 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20756 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20757
20758 SRC_SUBDIRS=
20759 if test "x$cf_with_manpages" != xno ; then
20760         SRC_SUBDIRS="$SRC_SUBDIRS man"
20761 fi
20762 SRC_SUBDIRS="$SRC_SUBDIRS include"
20763 for cf_dir in $cf_cv_src_modules
20764 do
20765         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20766 done
20767 if test "x$cf_with_tests" != "xno" ; then
20768         SRC_SUBDIRS="$SRC_SUBDIRS test"
20769 fi
20770 if test "x$cf_with_db_install" = xyes; then
20771         test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20772 fi
20773 if test "$cf_with_cxx_binding" != no; then
20774         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20775         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20776 fi
20777
20778 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20779 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20780
20781 ADA_SUBDIRS=
20782 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20783         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20784         ADA_SUBDIRS="gen src"
20785         if test "x$cf_with_tests" != "xno" ; then
20786                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20787         fi
20788 fi
20789
20790 SUB_MAKEFILES=
20791 for cf_dir in $SRC_SUBDIRS
20792 do
20793         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20794 done
20795
20796 if test -n "$ADA_SUBDIRS"; then
20797         for cf_dir in $ADA_SUBDIRS
20798         do
20799                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20800         done
20801
20802 fi
20803
20804 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20805    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20806    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20807 fi
20808
20809 DIRS_TO_MAKE="lib"
20810 for cf_item in $cf_list_models
20811 do
20812
20813         case $cf_item in
20814         libtool) cf_subdir='obj_lo'  ;;
20815         normal)  cf_subdir='objects' ;;
20816         debug)   cf_subdir='obj_g' ;;
20817         profile) cf_subdir='obj_p' ;;
20818         shared)
20819                 case $cf_cv_system_name in #(vi
20820                 cygwin|msys) #(vi
20821                         cf_subdir='objects' ;;
20822                 *)
20823                         cf_subdir='obj_s' ;;
20824                 esac
20825         esac
20826
20827         for cf_item2 in $DIRS_TO_MAKE
20828         do
20829                 test $cf_item2 = $cf_subdir && break
20830         done
20831         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20832 done
20833 for cf_dir in $DIRS_TO_MAKE
20834 do
20835         test ! -d $cf_dir && mkdir $cf_dir
20836 done
20837
20838 # symbols that differ when compiling Ada95 by itself.
20839 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20840
20841 # values to use as strings
20842
20843 cat >>confdefs.h <<EOF
20844 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20845 EOF
20846
20847 cat >>confdefs.h <<EOF
20848 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20849 EOF
20850
20851 ### Now that we're done running tests, add the compiler-warnings, if any
20852
20853 cf_fix_cppflags=no
20854 cf_new_cflags=
20855 cf_new_cppflags=
20856 cf_new_extra_cppflags=
20857
20858 for cf_add_cflags in $EXTRA_CFLAGS
20859 do
20860 case $cf_fix_cppflags in
20861 no)
20862         case $cf_add_cflags in #(vi
20863         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20864                 case $cf_add_cflags in
20865                 -D*)
20866                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20867
20868                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20869                                 && test -z "${cf_tst_cflags}" \
20870                                 && cf_fix_cppflags=yes
20871
20872                         if test $cf_fix_cppflags = yes ; then
20873                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20874                                 continue
20875                         elif test "${cf_tst_cflags}" = "\"'" ; then
20876                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20877                                 continue
20878                         fi
20879                         ;;
20880                 esac
20881                 case "$CPPFLAGS" in
20882                 *$cf_add_cflags) #(vi
20883                         ;;
20884                 *) #(vi
20885                         case $cf_add_cflags in #(vi
20886                         -D*)
20887                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20888
20889 CPPFLAGS=`echo "$CPPFLAGS" | \
20890         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20891                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20892
20893                                 ;;
20894                         esac
20895                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20896                         ;;
20897                 esac
20898                 ;;
20899         *)
20900                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20901                 ;;
20902         esac
20903         ;;
20904 yes)
20905         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20906
20907         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20908
20909         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20910                 && test -z "${cf_tst_cflags}" \
20911                 && cf_fix_cppflags=no
20912         ;;
20913 esac
20914 done
20915
20916 if test -n "$cf_new_cflags" ; then
20917
20918         CFLAGS="$CFLAGS $cf_new_cflags"
20919 fi
20920
20921 if test -n "$cf_new_cppflags" ; then
20922
20923         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20924 fi
20925
20926 if test -n "$cf_new_extra_cppflags" ; then
20927
20928         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20929 fi
20930
20931 ### Define substitutions for header files to avoid name-pollution
20932
20933 if test "x$cf_cv_have_tcgetattr" = xyes ; then
20934         HAVE_TCGETATTR=1
20935 else
20936         HAVE_TCGETATTR=0
20937 fi
20938
20939 if test "x$ac_cv_header_termio_h" = xyes ; then
20940         HAVE_TERMIO_H=1
20941 else
20942         HAVE_TERMIO_H=0
20943 fi
20944
20945 if test "x$ac_cv_header_termios_h" = xyes ; then
20946         HAVE_TERMIOS_H=1
20947 else
20948         HAVE_TERMIOS_H=0
20949 fi
20950
20951 ################################################################################
20952 test "x$use_database" = xyes && \
20953 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20954
20955 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20956 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20957
20958 if test "x$enable_pc_files" = xyes ; then \
20959 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20960 MAKE_PC_FILES=
20961 else
20962 MAKE_PC_FILES="#"
20963 fi
20964
20965 # Extract the first word of "tic", so it can be a program name with args.
20966 set dummy tic; ac_word=$2
20967 echo "$as_me:20967: checking for $ac_word" >&5
20968 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20969 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20970   echo $ECHO_N "(cached) $ECHO_C" >&6
20971 else
20972   case $TIC_PATH in
20973   [\\/]* | ?:[\\/]*)
20974   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20975   ;;
20976   *)
20977   ac_save_IFS=$IFS; IFS=$ac_path_separator
20978 ac_dummy="$PATH:/usr/local/ncurses/bin"
20979 for ac_dir in $ac_dummy; do
20980   IFS=$ac_save_IFS
20981   test -z "$ac_dir" && ac_dir=.
20982   if $as_executable_p "$ac_dir/$ac_word"; then
20983    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20984    echo "$as_me:20984: found $ac_dir/$ac_word" >&5
20985    break
20986 fi
20987 done
20988
20989   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20990   ;;
20991 esac
20992 fi
20993 TIC_PATH=$ac_cv_path_TIC_PATH
20994
20995 if test -n "$TIC_PATH"; then
20996   echo "$as_me:20996: result: $TIC_PATH" >&5
20997 echo "${ECHO_T}$TIC_PATH" >&6
20998 else
20999   echo "$as_me:20999: result: no" >&5
21000 echo "${ECHO_T}no" >&6
21001 fi
21002
21003 if test -n "$FALLBACK_LIST"
21004 then
21005         if test "$TIC_PATH" = unknown
21006         then
21007                 { echo "$as_me:21007: WARNING: no tic program found for fallbacks" >&5
21008 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
21009         fi
21010 fi
21011
21012 if test "x$cf_with_tests" != xno ; then
21013         MAKE_TESTS=
21014 else
21015         MAKE_TESTS="#"
21016 fi
21017
21018 ADAHTML_DIR=../../doc/html/ada
21019
21020 # these could be configurable, but are not currently
21021 PANEL_NAME=panel
21022 MENU_NAME=menu
21023 FORM_NAME=form
21024 CXX_NAME=ncurses++
21025
21026 # workaround for g++ versus Solaris (20131116)
21027 case $cf_cv_system_name in #(vi
21028 solaris2*) #(vi
21029         case "x$CPPFLAGS" in #(vi
21030         *-D_XOPEN_SOURCE_EXTENDED*)
21031                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
21032
21033 echo "${as_me:-configure}:21033: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
21034
21035                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
21036                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
21037                 ;;
21038         esac
21039         ;;
21040 esac
21041
21042 SUB_SCRIPTS=
21043
21044 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"
21045 ac_config_commands="$ac_config_commands default"
21046 cat >confcache <<\_ACEOF
21047 # This file is a shell script that caches the results of configure
21048 # tests run on this system so they can be shared between configure
21049 # scripts and configure runs, see configure's option --config-cache.
21050 # It is not useful on other systems.  If it contains results you don't
21051 # want to keep, you may remove or edit it.
21052 #
21053 # config.status only pays attention to the cache file if you give it
21054 # the --recheck option to rerun configure.
21055 #
21056 # `ac_cv_env_foo' variables (set or unset) will be overriden when
21057 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21058 # following values.
21059
21060 _ACEOF
21061
21062 # The following way of writing the cache mishandles newlines in values,
21063 # but we know of no workaround that is simple, portable, and efficient.
21064 # So, don't put newlines in cache variables' values.
21065 # Ultrix sh set writes to stderr and can't be redirected directly,
21066 # and sets the high bit in the cache file unless we assign to the vars.
21067 {
21068   (set) 2>&1 |
21069     case `(ac_space=' '; set | grep ac_space) 2>&1` in
21070     *ac_space=\ *)
21071       # `set' does not quote correctly, so add quotes (double-quote
21072       # substitution turns \\\\ into \\, and sed turns \\ into \).
21073       sed -n \
21074         "s/'/'\\\\''/g;
21075           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21076       ;;
21077     *)
21078       # `set' quotes correctly as required by POSIX, so do not add quotes.
21079       sed -n \
21080         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
21081       ;;
21082     esac;
21083 } |
21084   sed '
21085      t clear
21086      : clear
21087      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21088      t end
21089      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21090      : end' >>confcache
21091 if cmp -s $cache_file confcache; then :; else
21092   if test -w $cache_file; then
21093     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21094     cat confcache >$cache_file
21095   else
21096     echo "not updating unwritable cache $cache_file"
21097   fi
21098 fi
21099 rm -f confcache
21100
21101 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21102 # Let make expand exec_prefix.
21103 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21104
21105 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21106 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21107 # trailing colons and then remove the whole line if VPATH becomes empty
21108 # (actually we leave an empty line to preserve line numbers).
21109 if test "x$srcdir" = x.; then
21110   ac_vpsub='/^[         ]*VPATH[        ]*=/{
21111 s/:*\$(srcdir):*/:/;
21112 s/:*\${srcdir}:*/:/;
21113 s/:*@srcdir@:*/:/;
21114 s/^\([^=]*=[    ]*\):*/\1/;
21115 s/:*$//;
21116 s/^[^=]*=[      ]*$//;
21117 }'
21118 fi
21119
21120 DEFS=-DHAVE_CONFIG_H
21121
21122 : ${CONFIG_STATUS=./config.status}
21123 ac_clean_files_save=$ac_clean_files
21124 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21125 { echo "$as_me:21125: creating $CONFIG_STATUS" >&5
21126 echo "$as_me: creating $CONFIG_STATUS" >&6;}
21127 cat >$CONFIG_STATUS <<_ACEOF
21128 #! $SHELL
21129 # Generated automatically by configure.
21130 # Run this file to recreate the current configuration.
21131 # Compiler output produced by configure, useful for debugging
21132 # configure, is in config.log if it exists.
21133
21134 debug=false
21135 SHELL=\${CONFIG_SHELL-$SHELL}
21136 ac_cs_invocation="\$0 \$@"
21137
21138 _ACEOF
21139
21140 cat >>$CONFIG_STATUS <<\_ACEOF
21141 # Be Bourne compatible
21142 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21143   emulate sh
21144   NULLCMD=:
21145 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21146   set -o posix
21147 fi
21148
21149 # Name of the executable.
21150 as_me=`echo "$0" |sed 's,.*[\\/],,'`
21151
21152 if expr a : '\(a\)' >/dev/null 2>&1; then
21153   as_expr=expr
21154 else
21155   as_expr=false
21156 fi
21157
21158 rm -f conf$$ conf$$.exe conf$$.file
21159 echo >conf$$.file
21160 if ln -s conf$$.file conf$$ 2>/dev/null; then
21161   # We could just check for DJGPP; but this test a) works b) is more generic
21162   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21163   if test -f conf$$.exe; then
21164     # Don't use ln at all; we don't have any links
21165     as_ln_s='cp -p'
21166   else
21167     as_ln_s='ln -s'
21168   fi
21169 elif ln conf$$.file conf$$ 2>/dev/null; then
21170   as_ln_s=ln
21171 else
21172   as_ln_s='cp -p'
21173 fi
21174 rm -f conf$$ conf$$.exe conf$$.file
21175
21176 as_executable_p="test -f"
21177
21178 # Support unset when possible.
21179 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
21180   as_unset=unset
21181 else
21182   as_unset=false
21183 fi
21184
21185 # NLS nuisances.
21186 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
21187 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
21188 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
21189 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
21190 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
21191 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
21192 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
21193 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
21194
21195 # IFS
21196 # We need space, tab and new line, in precisely that order.
21197 as_nl='
21198 '
21199 IFS="   $as_nl"
21200
21201 # CDPATH.
21202 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
21203
21204 exec 6>&1
21205
21206 _ACEOF
21207
21208 # Files that config.status was made for.
21209 if test -n "$ac_config_files"; then
21210   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21211 fi
21212
21213 if test -n "$ac_config_headers"; then
21214   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21215 fi
21216
21217 if test -n "$ac_config_links"; then
21218   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21219 fi
21220
21221 if test -n "$ac_config_commands"; then
21222   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21223 fi
21224
21225 cat >>$CONFIG_STATUS <<\EOF
21226
21227 ac_cs_usage="\
21228 \`$as_me' instantiates files from templates according to the
21229 current configuration.
21230
21231 Usage: $0 [OPTIONS] [FILE]...
21232
21233   -h, --help       print this help, then exit
21234   -V, --version    print version number, then exit
21235   -d, --debug      don't remove temporary files
21236       --recheck    update $as_me by reconfiguring in the same conditions
21237   --file=FILE[:TEMPLATE]
21238                    instantiate the configuration file FILE
21239   --header=FILE[:TEMPLATE]
21240                    instantiate the configuration header FILE
21241
21242 Configuration files:
21243 $config_files
21244
21245 Configuration headers:
21246 $config_headers
21247
21248 Configuration commands:
21249 $config_commands
21250
21251 Report bugs to <dickey@invisible-island.net>."
21252 EOF
21253
21254 cat >>$CONFIG_STATUS <<EOF
21255 ac_cs_version="\\
21256 config.status
21257 configured by $0, generated by GNU Autoconf 2.52.20121002,
21258   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21259
21260 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
21261 Free Software Foundation, Inc.
21262 This config.status script is free software; the Free Software Foundation
21263 gives unlimited permission to copy, distribute and modify it."
21264 srcdir=$srcdir
21265 INSTALL="$INSTALL"
21266 EOF
21267
21268 cat >>$CONFIG_STATUS <<\EOF
21269 # If no file are specified by the user, then we need to provide default
21270 # value.  By we need to know if files were specified by the user.
21271 ac_need_defaults=:
21272 while test $# != 0
21273 do
21274   case $1 in
21275   --*=*)
21276     ac_option=`expr "x$1" : 'x\([^=]*\)='`
21277     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
21278     shift
21279     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
21280     shift
21281     ;;
21282   -*);;
21283   *) # This is not an option, so the user has probably given explicit
21284      # arguments.
21285      ac_need_defaults=false;;
21286   esac
21287
21288   case $1 in
21289   # Handling of the options.
21290 EOF
21291 cat >>$CONFIG_STATUS <<EOF
21292   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21293     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
21294     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
21295 EOF
21296 cat >>$CONFIG_STATUS <<\EOF
21297   --version | --vers* | -V )
21298     echo "$ac_cs_version"; exit 0 ;;
21299   --he | --h)
21300     # Conflict between --help and --header
21301     { { echo "$as_me:21301: error: ambiguous option: $1
21302 Try \`$0 --help' for more information." >&5
21303 echo "$as_me: error: ambiguous option: $1
21304 Try \`$0 --help' for more information." >&2;}
21305    { (exit 1); exit 1; }; };;
21306   --help | --hel | -h )
21307     echo "$ac_cs_usage"; exit 0 ;;
21308   --debug | --d* | -d )
21309     debug=: ;;
21310   --file | --fil | --fi | --f )
21311     shift
21312     CONFIG_FILES="$CONFIG_FILES $1"
21313     ac_need_defaults=false;;
21314   --header | --heade | --head | --hea )
21315     shift
21316     CONFIG_HEADERS="$CONFIG_HEADERS $1"
21317     ac_need_defaults=false;;
21318
21319   # This is an error.
21320   -*) { { echo "$as_me:21320: error: unrecognized option: $1
21321 Try \`$0 --help' for more information." >&5
21322 echo "$as_me: error: unrecognized option: $1
21323 Try \`$0 --help' for more information." >&2;}
21324    { (exit 1); exit 1; }; } ;;
21325
21326   *) ac_config_targets="$ac_config_targets $1" ;;
21327
21328   esac
21329   shift
21330 done
21331
21332 exec 5>>config.log
21333 cat >&5 << _ACEOF
21334
21335 ## ----------------------- ##
21336 ## Running config.status.  ##
21337 ## ----------------------- ##
21338
21339 This file was extended by $as_me 2.52.20121002, executed with
21340   CONFIG_FILES    = $CONFIG_FILES
21341   CONFIG_HEADERS  = $CONFIG_HEADERS
21342   CONFIG_LINKS    = $CONFIG_LINKS
21343   CONFIG_COMMANDS = $CONFIG_COMMANDS
21344   > $ac_cs_invocation
21345 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21346
21347 _ACEOF
21348 EOF
21349
21350 cat >>$CONFIG_STATUS <<EOF
21351 #
21352 # INIT-COMMANDS section.
21353 #
21354
21355 ### Special initialization commands, used to pass information from the
21356 ### configuration-run into config.status
21357
21358 AWK="$AWK"
21359 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
21360 DFT_LWR_MODEL="$DFT_LWR_MODEL"
21361 ECHO_LD="$ECHO_LD"
21362 LDCONFIG="$LDCONFIG"
21363 LIBTOOL_VERSION="$LIBTOOL_VERSION"
21364 LIB_NAME="$LIB_NAME"
21365 LIB_PREFIX="$LIB_PREFIX"
21366 LIB_SUBSETS="$LIB_SUBSETS"
21367 LIB_SUFFIX="$LIB_SUFFIX"
21368 LIB_TRACING="$LIB_TRACING"
21369 LN_S="$LN_S"
21370 MAKE_TERMINFO="$MAKE_TERMINFO"
21371 NCURSES_MAJOR="$NCURSES_MAJOR"
21372 NCURSES_MINOR="$NCURSES_MINOR"
21373 NCURSES_OSPEED="$NCURSES_OSPEED"
21374 NCURSES_PATCH="$NCURSES_PATCH"
21375 SRC_SUBDIRS="$SRC_SUBDIRS"
21376 TERMINFO="$TERMINFO"
21377 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
21378 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
21379 TICS_NAME="$TICS_NAME"
21380 TIC_PATH="$TIC_PATH"
21381 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
21382 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
21383 TINFO_NAME="$TINFO_NAME"
21384 TINFO_SUFFIX="$TINFO_SUFFIX"
21385 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
21386 WITH_CURSES_H="$with_curses_h"
21387 WITH_ECHO="${enable_echo:=yes}"
21388 WITH_OVERWRITE="$with_overwrite"
21389 cf_LIST_MODELS="$cf_list_models"
21390 cf_cv_abi_version="$cf_cv_abi_version"
21391 cf_cv_do_relink="$cf_cv_do_relink"
21392 cf_cv_do_symlinks="$cf_cv_do_symlinks"
21393 cf_cv_enable_lp64="$cf_cv_enable_lp64"
21394 cf_cv_enable_opaque="$cf_cv_enable_opaque"
21395 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
21396 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
21397 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
21398 cf_cv_rel_version="$cf_cv_rel_version"
21399 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
21400 cf_cv_shared_soname='$cf_cv_shared_soname'
21401 cf_cv_shlib_version="$cf_cv_shlib_version"
21402 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
21403 cf_cv_system_name="$cf_cv_system_name"
21404 cf_cv_term_driver="$with_term_driver"
21405 cf_with_ada="$cf_with_ada"
21406 cf_with_cxx_binding="$cf_with_cxx_binding"
21407 cf_with_db_install="$cf_with_db_install"
21408 cf_with_manpages="$cf_with_manpages"
21409 cf_with_tests="$cf_with_tests"
21410 with_shared_cxx="$with_shared_cxx"
21411 host="$host"
21412 target="$target"
21413
21414 EOF
21415
21416 cat >>$CONFIG_STATUS <<\EOF
21417 for ac_config_target in $ac_config_targets
21418 do
21419   case "$ac_config_target" in
21420   # Handling of arguments.
21421   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
21422   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
21423   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
21424   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
21425   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
21426   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
21427   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
21428   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21429   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21430   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
21431   *) { { echo "$as_me:21431: error: invalid argument: $ac_config_target" >&5
21432 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21433    { (exit 1); exit 1; }; };;
21434   esac
21435 done
21436
21437 # If the user did not use the arguments to specify the items to instantiate,
21438 # then the envvar interface is used.  Set only those that are not.
21439 # We use the long form for the default assignment because of an extremely
21440 # bizarre bug on SunOS 4.1.3.
21441 if $ac_need_defaults; then
21442   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21443   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21444   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21445 fi
21446
21447 # Create a temporary directory, and hook for its removal unless debugging.
21448 $debug ||
21449 {
21450   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21451   trap '{ (exit 1); exit 1; }' 1 2 13 15
21452 }
21453
21454 # Create a (secure) tmp directory for tmp files.
21455 : ${TMPDIR=/tmp}
21456 {
21457   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
21458   test -n "$tmp" && test -d "$tmp"
21459 }  ||
21460 {
21461   tmp=$TMPDIR/cs$$-$RANDOM
21462   (umask 077 && mkdir $tmp)
21463 } ||
21464 {
21465    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
21466    { (exit 1); exit 1; }
21467 }
21468
21469 EOF
21470
21471 cat >>$CONFIG_STATUS <<EOF
21472
21473 #
21474 # CONFIG_FILES section.
21475 #
21476
21477 # No need to generate the scripts if there are no CONFIG_FILES.
21478 # This happens for instance when ./config.status config.h
21479 if test -n "\$CONFIG_FILES"; then
21480   # Protect against being on the right side of a sed subst in config.status.
21481   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21482    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21483 s,@SHELL@,$SHELL,;t t
21484 s,@exec_prefix@,$exec_prefix,;t t
21485 s,@prefix@,$prefix,;t t
21486 s,@program_transform_name@,$program_transform_name,;t t
21487 s,@bindir@,$bindir,;t t
21488 s,@sbindir@,$sbindir,;t t
21489 s,@libexecdir@,$libexecdir,;t t
21490 s,@datarootdir@,$datarootdir,;t t
21491 s,@datadir@,$datadir,;t t
21492 s,@sysconfdir@,$sysconfdir,;t t
21493 s,@sharedstatedir@,$sharedstatedir,;t t
21494 s,@localstatedir@,$localstatedir,;t t
21495 s,@libdir@,$libdir,;t t
21496 s,@includedir@,$includedir,;t t
21497 s,@oldincludedir@,$oldincludedir,;t t
21498 s,@infodir@,$infodir,;t t
21499 s,@mandir@,$mandir,;t t
21500 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21501 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21502 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21503 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21504 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21505 s,@build_alias@,$build_alias,;t t
21506 s,@host_alias@,$host_alias,;t t
21507 s,@target_alias@,$target_alias,;t t
21508 s,@ECHO_C@,$ECHO_C,;t t
21509 s,@ECHO_N@,$ECHO_N,;t t
21510 s,@ECHO_T@,$ECHO_T,;t t
21511 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21512 s,@DEFS@,$DEFS,;t t
21513 s,@LIBS@,$LIBS,;t t
21514 s,@top_builddir@,$top_builddir,;t t
21515 s,@EGREP@,$EGREP,;t t
21516 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
21517 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
21518 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
21519 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21520 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21521 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
21522 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
21523 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
21524 s,@build@,$build,;t t
21525 s,@build_cpu@,$build_cpu,;t t
21526 s,@build_vendor@,$build_vendor,;t t
21527 s,@build_os@,$build_os,;t t
21528 s,@host@,$host,;t t
21529 s,@host_cpu@,$host_cpu,;t t
21530 s,@host_vendor@,$host_vendor,;t t
21531 s,@host_os@,$host_os,;t t
21532 s,@target@,$target,;t t
21533 s,@target_cpu@,$target_cpu,;t t
21534 s,@target_vendor@,$target_vendor,;t t
21535 s,@target_os@,$target_os,;t t
21536 s,@CC@,$CC,;t t
21537 s,@CFLAGS@,$CFLAGS,;t t
21538 s,@LDFLAGS@,$LDFLAGS,;t t
21539 s,@CPPFLAGS@,$CPPFLAGS,;t t
21540 s,@ac_ct_CC@,$ac_ct_CC,;t t
21541 s,@EXEEXT@,$EXEEXT,;t t
21542 s,@OBJEXT@,$OBJEXT,;t t
21543 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21544 s,@CPP@,$CPP,;t t
21545 s,@LDCONFIG@,$LDCONFIG,;t t
21546 s,@CXX@,$CXX,;t t
21547 s,@CXXFLAGS@,$CXXFLAGS,;t t
21548 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
21549 s,@AWK@,$AWK,;t t
21550 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21551 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21552 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21553 s,@LINT@,$LINT,;t t
21554 s,@LINT_OPTS@,$LINT_OPTS,;t t
21555 s,@LN_S@,$LN_S,;t t
21556 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21557 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21558 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
21559 s,@SET_MAKE@,$SET_MAKE,;t t
21560 s,@CTAGS@,$CTAGS,;t t
21561 s,@ETAGS@,$ETAGS,;t t
21562 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21563 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21564 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
21565 s,@RANLIB@,$RANLIB,;t t
21566 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21567 s,@LD@,$LD,;t t
21568 s,@ac_ct_LD@,$ac_ct_LD,;t t
21569 s,@AR@,$AR,;t t
21570 s,@ac_ct_AR@,$ac_ct_AR,;t t
21571 s,@NM@,$NM,;t t
21572 s,@ac_ct_NM@,$ac_ct_NM,;t t
21573 s,@ARFLAGS@,$ARFLAGS,;t t
21574 s,@DESTDIR@,$DESTDIR,;t t
21575 s,@BUILD_CC@,$BUILD_CC,;t t
21576 s,@BUILD_CPP@,$BUILD_CPP,;t t
21577 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
21578 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
21579 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
21580 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
21581 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
21582 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
21583 s,@cf_list_models@,$cf_list_models,;t t
21584 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
21585 s,@LIBTOOL@,$LIBTOOL,;t t
21586 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
21587 s,@LT_UNDEF@,$LT_UNDEF,;t t
21588 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
21589 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21590 s,@LIB_CREATE@,$LIB_CREATE,;t t
21591 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
21592 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
21593 s,@LIB_PREP@,$LIB_PREP,;t t
21594 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21595 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21596 s,@LIB_LINK@,$LIB_LINK,;t t
21597 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
21598 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
21599 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
21600 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21601 s,@TICS_NAME@,$TICS_NAME,;t t
21602 s,@TINFO_NAME@,$TINFO_NAME,;t t
21603 s,@LIB_NAME@,$LIB_NAME,;t t
21604 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
21605 s,@CC_G_OPT@,$CC_G_OPT,;t t
21606 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
21607 s,@LD_MODEL@,$LD_MODEL,;t t
21608 s,@shlibdir@,$shlibdir,;t t
21609 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
21610 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21611 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
21612 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21613 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
21614 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
21615 s,@LINK_PROGS@,$LINK_PROGS,;t t
21616 s,@LINK_TESTS@,$LINK_TESTS,;t t
21617 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21618 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21619 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21620 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21621 s,@RPATH_LIST@,$RPATH_LIST,;t t
21622 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21623 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21624 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
21625 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21626 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21627 s,@XTERM_KBS@,$XTERM_KBS,;t t
21628 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21629 s,@TERMINFO@,$TERMINFO,;t t
21630 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21631 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21632 s,@TERMPATH@,$TERMPATH,;t t
21633 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
21634 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21635 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21636 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21637 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21638 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21639 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21640 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21641 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21642 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21643 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21644 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21645 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21646 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21647 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21648 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21649 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
21650 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21651 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21652 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21653 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21654 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21655 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21656 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21657 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21658 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21659 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21660 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21661 s,@PTHREAD@,$PTHREAD,;t t
21662 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21663 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21664 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21665 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21666 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21667 s,@ECHO_LT@,$ECHO_LT,;t t
21668 s,@ECHO_LD@,$ECHO_LD,;t t
21669 s,@RULE_CC@,$RULE_CC,;t t
21670 s,@SHOW_CC@,$SHOW_CC,;t t
21671 s,@ECHO_CC@,$ECHO_CC,;t t
21672 s,@ECHO_LINK@,$ECHO_LINK,;t t
21673 s,@ADAFLAGS@,$ADAFLAGS,;t t
21674 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21675 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21676 s,@ADA_TRACE@,$ADA_TRACE,;t t
21677 s,@MATH_LIB@,$MATH_LIB,;t t
21678 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21679 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21680 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21681 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21682 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21683 s,@TEST_LIBS@,$TEST_LIBS,;t t
21684 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21685 s,@CXXCPP@,$CXXCPP,;t t
21686 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21687 s,@CXX_AR@,$CXX_AR,;t t
21688 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21689 s,@CXXLIBS@,$CXXLIBS,;t t
21690 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21691 s,@gnat_exists@,$gnat_exists,;t t
21692 s,@M4_exists@,$M4_exists,;t t
21693 s,@cf_ada_make@,$cf_ada_make,;t t
21694 s,@cf_compile_generics@,$cf_compile_generics,;t t
21695 s,@cf_generic_objects@,$cf_generic_objects,;t t
21696 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21697 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21698 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21699 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21700 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21701 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21702 s,@cf_ada_package@,$cf_ada_package,;t t
21703 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21704 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21705 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21706 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21707 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21708 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21709 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21710 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21711 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21712 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21713 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21714 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21715 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21716 s,@TICS_LIBS@,$TICS_LIBS,;t t
21717 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21718 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21719 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21720 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21721 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21722 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21723 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21724 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21725 s,@includesubdir@,$includesubdir,;t t
21726 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21727 s,@TICS_LIST@,$TICS_LIST,;t t
21728 s,@TINFO_LIST@,$TINFO_LIST,;t t
21729 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21730 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21731 s,@TEST_ARGS@,$TEST_ARGS,;t t
21732 s,@TEST_DEPS@,$TEST_DEPS,;t t
21733 s,@TEST_ARG2@,$TEST_ARG2,;t t
21734 s,@TEST_DEP2@,$TEST_DEP2,;t t
21735 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21736 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21737 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21738 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21739 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21740 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21741 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21742 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21743 s,@cross_compiling@,$cross_compiling,;t t
21744 s,@TIC_PATH@,$TIC_PATH,;t t
21745 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21746 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21747 s,@PANEL_NAME@,$PANEL_NAME,;t t
21748 s,@MENU_NAME@,$MENU_NAME,;t t
21749 s,@FORM_NAME@,$FORM_NAME,;t t
21750 s,@CXX_NAME@,$CXX_NAME,;t t
21751 CEOF
21752
21753 EOF
21754
21755   cat >>$CONFIG_STATUS <<\EOF
21756   # Split the substitutions into bite-sized pieces for seds with
21757   # small command number limits, like on Digital OSF/1 and HP-UX.
21758   ac_max_sed_lines=48
21759   ac_sed_frag=1 # Number of current file.
21760   ac_beg=1 # First line for current file.
21761   ac_end=$ac_max_sed_lines # Line after last line for current file.
21762   ac_more_lines=:
21763   ac_sed_cmds=
21764   while $ac_more_lines; do
21765     if test $ac_beg -gt 1; then
21766       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21767     else
21768       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21769     fi
21770     if test ! -s $tmp/subs.frag; then
21771       ac_more_lines=false
21772     else
21773       # The purpose of the label and of the branching condition is to
21774       # speed up the sed processing (if there are no `@' at all, there
21775       # is no need to browse any of the substitutions).
21776       # These are the two extra sed commands mentioned above.
21777       (echo ':t
21778   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21779       if test -z "$ac_sed_cmds"; then
21780         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21781       else
21782         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21783       fi
21784       ac_sed_frag=`expr $ac_sed_frag + 1`
21785       ac_beg=$ac_end
21786       ac_end=`expr $ac_end + $ac_max_sed_lines`
21787     fi
21788   done
21789   if test -z "$ac_sed_cmds"; then
21790     ac_sed_cmds=cat
21791   fi
21792 fi # test -n "$CONFIG_FILES"
21793
21794 EOF
21795 cat >>$CONFIG_STATUS <<\EOF
21796 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21797   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21798   case $ac_file in
21799   - | *:- | *:-:* ) # input from stdin
21800         cat >$tmp/stdin
21801         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21802         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21803   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21804         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21805   * )   ac_file_in=$ac_file.in ;;
21806   esac
21807
21808   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21809   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21810          X"$ac_file" : 'X\(//\)[^/]' \| \
21811          X"$ac_file" : 'X\(//\)$' \| \
21812          X"$ac_file" : 'X\(/\)' \| \
21813          .     : '\(.\)' 2>/dev/null ||
21814 echo X"$ac_file" |
21815     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21816           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21817           /^X\(\/\/\)$/{ s//\1/; q; }
21818           /^X\(\/\).*/{ s//\1/; q; }
21819           s/.*/./; q'`
21820   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21821     { case "$ac_dir" in
21822   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21823   *)                      as_incr_dir=.;;
21824 esac
21825 as_dummy="$ac_dir"
21826 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21827   case $as_mkdir_dir in
21828     # Skip DOS drivespec
21829     ?:) as_incr_dir=$as_mkdir_dir ;;
21830     *)
21831       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21832       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21833     ;;
21834   esac
21835 done; }
21836
21837     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21838     # A "../" for each directory in $ac_dir_suffix.
21839     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21840   else
21841     ac_dir_suffix= ac_dots=
21842   fi
21843
21844   case $srcdir in
21845   .)  ac_srcdir=.
21846       if test -z "$ac_dots"; then
21847          ac_top_srcdir=.
21848       else
21849          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21850       fi ;;
21851   [\\/]* | ?:[\\/]* )
21852       ac_srcdir=$srcdir$ac_dir_suffix;
21853       ac_top_srcdir=$srcdir ;;
21854   *) # Relative path.
21855     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21856     ac_top_srcdir=$ac_dots$srcdir ;;
21857   esac
21858
21859   case $INSTALL in
21860   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21861   *) ac_INSTALL=$ac_dots$INSTALL ;;
21862   esac
21863
21864   if test x"$ac_file" != x-; then
21865     { echo "$as_me:21865: creating $ac_file" >&5
21866 echo "$as_me: creating $ac_file" >&6;}
21867     rm -f "$ac_file"
21868   fi
21869   # Let's still pretend it is `configure' which instantiates (i.e., don't
21870   # use $as_me), people would be surprised to read:
21871   #    /* config.h.  Generated automatically by config.status.  */
21872   configure_input="Generated automatically from `echo $ac_file_in |
21873                                                  sed 's,.*/,,'` by configure."
21874
21875   # First look for the input files in the build tree, otherwise in the
21876   # src tree.
21877   ac_file_inputs=`IFS=:
21878     for f in $ac_file_in; do
21879       case $f in
21880       -) echo $tmp/stdin ;;
21881       [\\/$]*)
21882          # Absolute (can't be DOS-style, as IFS=:)
21883          test -f "$f" || { { echo "$as_me:21883: error: cannot find input file: $f" >&5
21884 echo "$as_me: error: cannot find input file: $f" >&2;}
21885    { (exit 1); exit 1; }; }
21886          echo $f;;
21887       *) # Relative
21888          if test -f "$f"; then
21889            # Build tree
21890            echo $f
21891          elif test -f "$srcdir/$f"; then
21892            # Source tree
21893            echo $srcdir/$f
21894          else
21895            # /dev/null tree
21896            { { echo "$as_me:21896: error: cannot find input file: $f" >&5
21897 echo "$as_me: error: cannot find input file: $f" >&2;}
21898    { (exit 1); exit 1; }; }
21899          fi;;
21900       esac
21901     done` || { (exit 1); exit 1; }
21902 EOF
21903 cat >>$CONFIG_STATUS <<\EOF
21904   ac_warn_datarootdir=no
21905   if test x"$ac_file" != x-; then
21906     for ac_item in $ac_file_inputs
21907     do
21908       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21909       if test -n "$ac_seen"; then
21910         ac_used=`grep '@datarootdir@' $ac_item`
21911         if test -z "$ac_used"; then
21912           { echo "$as_me:21912: WARNING: datarootdir was used implicitly but not set:
21913 $ac_seen" >&5
21914 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21915 $ac_seen" >&2;}
21916           ac_warn_datarootdir=yes
21917         fi
21918       fi
21919       ac_seen=`grep '${datarootdir}' $ac_item`
21920       if test -n "$ac_seen"; then
21921         { echo "$as_me:21921: WARNING: datarootdir was used explicitly but not set:
21922 $ac_seen" >&5
21923 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21924 $ac_seen" >&2;}
21925         ac_warn_datarootdir=yes
21926       fi
21927     done
21928   fi
21929
21930 if test "x$ac_warn_datarootdir" = xyes; then
21931   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21932 fi
21933
21934 EOF
21935 cat >>$CONFIG_STATUS <<EOF
21936   sed "$ac_vpsub
21937 $extrasub
21938 EOF
21939 cat >>$CONFIG_STATUS <<\EOF
21940 :t
21941 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21942 s,@configure_input@,$configure_input,;t t
21943 s,@srcdir@,$ac_srcdir,;t t
21944 s,@top_srcdir@,$ac_top_srcdir,;t t
21945 s,@INSTALL@,$ac_INSTALL,;t t
21946 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21947   rm -f $tmp/stdin
21948   if test x"$ac_file" != x-; then
21949     cp $tmp/out $ac_file
21950
21951     for ac_name in prefix exec_prefix datarootdir
21952     do
21953         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21954         if test -n "$ac_seen"; then
21955             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
21956             if test -z "$ac_init"; then
21957               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21958               { echo "$as_me:21958: WARNING: Variable $ac_name is used but was not set:
21959 $ac_seen" >&5
21960 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21961 $ac_seen" >&2;}
21962             fi
21963         fi
21964     done
21965     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21966     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21967     if test -s $tmp/out; then
21968       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21969       { echo "$as_me:21969: WARNING: Some variables may not be substituted:
21970 $ac_seen" >&5
21971 echo "$as_me: WARNING: Some variables may not be substituted:
21972 $ac_seen" >&2;}
21973     fi
21974   else
21975     cat $tmp/out
21976   fi
21977   rm -f $tmp/out
21978
21979 done
21980 EOF
21981 cat >>$CONFIG_STATUS <<\EOF
21982
21983 #
21984 # CONFIG_HEADER section.
21985 #
21986
21987 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21988 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21989 #
21990 # ac_d sets the value in "#define NAME VALUE" lines.
21991 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21992 ac_dB='[        ].*$,\1#\2'
21993 ac_dC=' '
21994 ac_dD=',;t'
21995 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21996 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21997 ac_iB='\([      ]\),\1#\2define\3'
21998 ac_iC=' '
21999 ac_iD='\4,;t'
22000 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22001 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22002 ac_uB='$,\1#\2define\3'
22003 ac_uC=' '
22004 ac_uD=',;t'
22005
22006 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22007   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22008   case $ac_file in
22009   - | *:- | *:-:* ) # input from stdin
22010         cat >$tmp/stdin
22011         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22012         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22013   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22014         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22015   * )   ac_file_in=$ac_file.in ;;
22016   esac
22017
22018   test x"$ac_file" != x- && { echo "$as_me:22018: creating $ac_file" >&5
22019 echo "$as_me: creating $ac_file" >&6;}
22020
22021   # First look for the input files in the build tree, otherwise in the
22022   # src tree.
22023   ac_file_inputs=`IFS=:
22024     for f in $ac_file_in; do
22025       case $f in
22026       -) echo $tmp/stdin ;;
22027       [\\/$]*)
22028          # Absolute (can't be DOS-style, as IFS=:)
22029          test -f "$f" || { { echo "$as_me:22029: error: cannot find input file: $f" >&5
22030 echo "$as_me: error: cannot find input file: $f" >&2;}
22031    { (exit 1); exit 1; }; }
22032          echo $f;;
22033       *) # Relative
22034          if test -f "$f"; then
22035            # Build tree
22036            echo $f
22037          elif test -f "$srcdir/$f"; then
22038            # Source tree
22039            echo $srcdir/$f
22040          else
22041            # /dev/null tree
22042            { { echo "$as_me:22042: error: cannot find input file: $f" >&5
22043 echo "$as_me: error: cannot find input file: $f" >&2;}
22044    { (exit 1); exit 1; }; }
22045          fi;;
22046       esac
22047     done` || { (exit 1); exit 1; }
22048   # Remove the trailing spaces.
22049   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
22050
22051 EOF
22052
22053 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
22054 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
22055 # be either 'cat' or 'sort'.
22056 cat confdefs.h | uniq >conftest.vals
22057
22058 # Break up conftest.vals because some shells have a limit on
22059 # the size of here documents, and old seds have small limits too.
22060
22061 rm -f conftest.tail
22062 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
22063 while grep . conftest.vals >/dev/null
22064 do
22065   # Write chunks of a limited-size here document to conftest.frag.
22066   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
22067   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
22068   echo 'CEOF' >> $CONFIG_STATUS
22069   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22070   rm -f conftest.vals
22071   mv conftest.tail conftest.vals
22072 done
22073 rm -f conftest.vals
22074
22075 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
22076 # marker @DEFS@.
22077 echo '  cat >> conftest.edit <<CEOF
22078 /@DEFS@/r conftest.frag
22079 /@DEFS@/d
22080 CEOF
22081 sed -f conftest.edit $tmp/in > $tmp/out
22082 rm -f $tmp/in
22083 mv $tmp/out $tmp/in
22084 rm -f conftest.edit conftest.frag
22085 ' >> $CONFIG_STATUS
22086
22087 cat >>$CONFIG_STATUS <<\EOF
22088   # Let's still pretend it is `configure' which instantiates (i.e., don't
22089   # use $as_me), people would be surprised to read:
22090   #    /* config.h.  Generated automatically by config.status.  */
22091   if test x"$ac_file" = x-; then
22092     echo "/* Generated automatically by configure.  */" >$tmp/config.h
22093   else
22094     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
22095   fi
22096   cat $tmp/in >>$tmp/config.h
22097   rm -f $tmp/in
22098   if test x"$ac_file" != x-; then
22099     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
22100       { echo "$as_me:22100: $ac_file is unchanged" >&5
22101 echo "$as_me: $ac_file is unchanged" >&6;}
22102     else
22103       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22104          X"$ac_file" : 'X\(//\)[^/]' \| \
22105          X"$ac_file" : 'X\(//\)$' \| \
22106          X"$ac_file" : 'X\(/\)' \| \
22107          .     : '\(.\)' 2>/dev/null ||
22108 echo X"$ac_file" |
22109     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22110           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22111           /^X\(\/\/\)$/{ s//\1/; q; }
22112           /^X\(\/\).*/{ s//\1/; q; }
22113           s/.*/./; q'`
22114       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22115         { case "$ac_dir" in
22116   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22117   *)                      as_incr_dir=.;;
22118 esac
22119 as_dummy="$ac_dir"
22120 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22121   case $as_mkdir_dir in
22122     # Skip DOS drivespec
22123     ?:) as_incr_dir=$as_mkdir_dir ;;
22124     *)
22125       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22126       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22127     ;;
22128   esac
22129 done; }
22130
22131       fi
22132       rm -f $ac_file
22133       mv $tmp/config.h $ac_file
22134     fi
22135   else
22136     cat $tmp/config.h
22137     rm -f $tmp/config.h
22138   fi
22139 done
22140 EOF
22141 cat >>$CONFIG_STATUS <<\EOF
22142 #
22143 # CONFIG_COMMANDS section.
22144 #
22145 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22146   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22147   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22148
22149   case $ac_dest in
22150     default )
22151 if test "x$cf_with_tests" != xno ; then
22152
22153 for cf_dir in test
22154 do
22155         if test ! -d $srcdir/$cf_dir; then
22156                 continue
22157         elif test -f $srcdir/$cf_dir/programs; then
22158                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
22159         fi
22160 done
22161
22162 fi
22163
22164 cf_prefix=$LIB_PREFIX
22165
22166 case $cf_cv_shlib_version in #(vi
22167 cygdll|msysdll|mingw)
22168         TINFO_NAME=$TINFO_ARG_SUFFIX
22169         TINFO_SUFFIX=.dll
22170         ;;
22171 esac
22172
22173 if test -n "$TINFO_SUFFIX" ; then
22174         case $TINFO_SUFFIX in
22175         tw*)
22176                 TINFO_NAME="${TINFO_NAME}tw"
22177                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
22178                 ;;
22179         t*)
22180                 TINFO_NAME="${TINFO_NAME}t"
22181                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
22182                 ;;
22183         w*)
22184                 TINFO_NAME="${TINFO_NAME}w"
22185                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
22186                 ;;
22187         esac
22188 fi
22189
22190 for cf_dir in $SRC_SUBDIRS
22191 do
22192         if test ! -d $srcdir/$cf_dir ; then
22193                 continue
22194         elif test -f $srcdir/$cf_dir/modules; then
22195
22196                 SHARED_LIB=
22197                 Libs_To_Make=
22198                 for cf_item in $cf_LIST_MODELS
22199                 do
22200
22201         case X$cf_item in #(vi
22202         Xlibtool) #(vi
22203                 cf_suffix='.la'
22204                 cf_depsuf=$cf_suffix
22205                 ;;
22206         Xdebug) #(vi
22207                 cf_suffix='_g.a'
22208                 cf_depsuf=$cf_suffix
22209                 ;;
22210         Xprofile) #(vi
22211                 cf_suffix='_p.a'
22212                 cf_depsuf=$cf_suffix
22213                 ;;
22214         Xshared) #(vi
22215                 case $cf_cv_system_name in
22216                 aix[5-7]*) #(vi
22217                         cf_suffix='.a'
22218                         cf_depsuf=$cf_suffix
22219                         ;;
22220                 cygwin*|msys*|mingw*) #(vi
22221                         cf_suffix='.dll'
22222                         cf_depsuf='.dll.a'
22223                         ;;
22224                 darwin*) #(vi
22225                         cf_suffix='.dylib'
22226                         cf_depsuf=$cf_suffix
22227                         ;;
22228                 hpux*) #(vi
22229                         case $target in
22230                         ia64*) #(vi
22231                                 cf_suffix='.so'
22232                                 cf_depsuf=$cf_suffix
22233                                 ;;
22234                         *) #(vi
22235                                 cf_suffix='.sl'
22236                                 cf_depsuf=$cf_suffix
22237                                 ;;
22238                         esac
22239                         ;;
22240                 *) #(vi
22241                         cf_suffix='.so'
22242                         cf_depsuf=$cf_suffix
22243                         ;;
22244                 esac
22245                 ;;
22246         *)
22247                 cf_suffix='.a'
22248                 cf_depsuf=$cf_suffix
22249                 ;;
22250         esac
22251         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22252         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22253
22254                         cf_libname=$cf_dir
22255                         test "$cf_dir" = c++ && cf_libname=ncurses++
22256                         if test $cf_item = shared ; then
22257                                 if test -n "${LIB_SUFFIX}"
22258                                 then
22259                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
22260                                 else
22261                                         cf_shared_suffix="$cf_suffix"
22262                                 fi
22263                                 if test "$cf_cv_do_symlinks" = yes ; then
22264                                         cf_version_name=
22265
22266                                         case "$cf_cv_shlib_version" in #(vi
22267                                         rel) #(vi
22268                                                 cf_version_name=REL_VERSION
22269                                                 ;;
22270                                         abi)
22271                                                 cf_version_name=ABI_VERSION
22272                                                 ;;
22273                                         esac
22274
22275                                         if test -n "$cf_version_name"
22276                                         then
22277                                                 case "$cf_cv_system_name" in #(vi
22278                                                 darwin*)
22279                                                         # "w", etc?
22280                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
22281                                                         ;; #(vi
22282                                                 *)
22283                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
22284                                                         ;;
22285                                                 esac
22286                                         fi
22287                                         if test -n "${LIB_SUFFIX}"
22288                                         then
22289                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
22290                                         else
22291                                                 cf_shared_suffix="$cf_suffix"
22292                                         fi
22293                                 fi
22294                                 # cygwin needs import library, and has unique naming convention
22295                                 # use autodetected ${cf_prefix} for import lib and static lib, but
22296                                 # use 'cyg' prefix for shared lib.
22297                                 case $cf_cv_shlib_version in #(vi
22298                                 cygdll) #(vi
22299                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22300                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
22301                                         continue
22302                                         ;;
22303                                 msysdll) #(vi
22304                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22305                                         Libs_To_Make="$Libs_To_Make ../lib/msys-${cf_libname}${cf_cygsuf}"
22306                                         continue
22307                                         ;;
22308                                 mingw)
22309                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22310                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
22311                                         continue
22312                                         ;;
22313                                 esac
22314                         fi
22315                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
22316                 done
22317
22318                 if test $cf_dir = ncurses ; then
22319                         cf_subsets="$LIB_SUBSETS"
22320                         cf_r_parts="$cf_subsets"
22321                         cf_liblist="$Libs_To_Make"
22322
22323                         while test -n "$cf_r_parts"
22324                         do
22325                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
22326                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
22327                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
22328                                         cf_item=
22329                                         case $cf_l_parts in #(vi
22330                                         *termlib*) #(vi
22331                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
22332                                                 ;;
22333                                         *ticlib*)
22334                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
22335                                                 ;;
22336                                         *)
22337                                                 break
22338                                                 ;;
22339                                         esac
22340                                         if test -n "$cf_item"; then
22341                                                 Libs_To_Make="$cf_item $Libs_To_Make"
22342                                         fi
22343                                 else
22344                                         break
22345                                 fi
22346                         done
22347                 else
22348                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
22349                 fi
22350
22351                 if test $cf_dir = c++; then
22352                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
22353                                 cf_list=
22354                                 for cf_item in $Libs_To_Make
22355                                 do
22356                                         case $cf_item in
22357                                         *.a)
22358                                                 ;;
22359                                         *)
22360                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
22361                                                 ;;
22362                                         esac
22363                                         for cf_test in $cf_list
22364                                         do
22365                                                 if test "$cf_test" = "$cf_item"
22366                                                 then
22367                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
22368                                                         cf_item=
22369                                                         break
22370                                                 fi
22371                                         done
22372                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
22373                                 done
22374                                 Libs_To_Make="$cf_list"
22375                         fi
22376                 fi
22377
22378                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
22379                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
22380                         $cf_dir/Makefile >$cf_dir/Makefile.out
22381                 mv $cf_dir/Makefile.out $cf_dir/Makefile
22382
22383                 $AWK -f $srcdir/mk-0th.awk \
22384                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
22385                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22386
22387                 for cf_subset in $cf_subsets
22388                 do
22389                         cf_subdirs=
22390                         for cf_item in $cf_LIST_MODELS
22391                         do
22392
22393                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
22394
22395 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22396
22397                         CXX_MODEL=$cf_ITEM
22398                         if test "$CXX_MODEL" = SHARED; then
22399                                 case $cf_cv_shlib_version in #(vi
22400                                 cygdll|msysdll|mingw) #(vi
22401                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
22402
22403 echo "${as_me:-configure}:22403: testing overriding CXX_MODEL to SHARED ..." 1>&5
22404
22405                                         with_shared_cxx=yes
22406                                         ;;
22407                                 *)
22408                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
22409                                         ;;
22410                                 esac
22411                         fi
22412
22413         case X$cf_item in #(vi
22414         Xlibtool) #(vi
22415                 cf_suffix='.la'
22416                 cf_depsuf=$cf_suffix
22417                 ;;
22418         Xdebug) #(vi
22419                 cf_suffix='_g.a'
22420                 cf_depsuf=$cf_suffix
22421                 ;;
22422         Xprofile) #(vi
22423                 cf_suffix='_p.a'
22424                 cf_depsuf=$cf_suffix
22425                 ;;
22426         Xshared) #(vi
22427                 case $cf_cv_system_name in
22428                 aix[5-7]*) #(vi
22429                         cf_suffix='.a'
22430                         cf_depsuf=$cf_suffix
22431                         ;;
22432                 cygwin*|msys*|mingw*) #(vi
22433                         cf_suffix='.dll'
22434                         cf_depsuf='.dll.a'
22435                         ;;
22436                 darwin*) #(vi
22437                         cf_suffix='.dylib'
22438                         cf_depsuf=$cf_suffix
22439                         ;;
22440                 hpux*) #(vi
22441                         case $target in
22442                         ia64*) #(vi
22443                                 cf_suffix='.so'
22444                                 cf_depsuf=$cf_suffix
22445                                 ;;
22446                         *) #(vi
22447                                 cf_suffix='.sl'
22448                                 cf_depsuf=$cf_suffix
22449                                 ;;
22450                         esac
22451                         ;;
22452                 *) #(vi
22453                         cf_suffix='.so'
22454                         cf_depsuf=$cf_suffix
22455                         ;;
22456                 esac
22457                 ;;
22458         *)
22459                 cf_suffix='.a'
22460                 cf_depsuf=$cf_suffix
22461                 ;;
22462         esac
22463         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22464         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22465
22466         case $cf_item in
22467         libtool) cf_subdir='obj_lo'  ;;
22468         normal)  cf_subdir='objects' ;;
22469         debug)   cf_subdir='obj_g' ;;
22470         profile) cf_subdir='obj_p' ;;
22471         shared)
22472                 case $cf_cv_system_name in #(vi
22473                 cygwin|msys) #(vi
22474                         cf_subdir='objects' ;;
22475                 *)
22476                         cf_subdir='obj_s' ;;
22477                 esac
22478         esac
22479
22480                         # Test for case where we build libtinfo with a different name.
22481                         cf_libname=$cf_dir
22482                         if test $cf_dir = ncurses ; then
22483                                 case $cf_subset in
22484                                 *base*)
22485                                         cf_libname=${cf_libname}$LIB_SUFFIX
22486                                         ;;
22487                                 *termlib*)
22488                                         cf_libname=$TINFO_LIB_SUFFIX
22489                                         ;;
22490                                 ticlib*)
22491                                         cf_libname=$TICS_LIB_SUFFIX
22492                                         ;;
22493                                 esac
22494                         elif test $cf_dir = c++ ; then
22495                                 cf_libname=ncurses++$LIB_SUFFIX
22496                         else
22497                                 cf_libname=${cf_libname}$LIB_SUFFIX
22498                         fi
22499                         if test -n "${DFT_ARG_SUFFIX}" ; then
22500                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
22501                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
22502                         fi
22503
22504                         # These dependencies really are for development, not
22505                         # builds, but they are useful in porting, too.
22506                         cf_depend="../include/ncurses_cfg.h"
22507                         if test "$srcdir" = "."; then
22508                                 cf_reldir="."
22509                         else
22510                                 cf_reldir="\${srcdir}"
22511                         fi
22512
22513                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
22514                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
22515                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
22516                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
22517                         fi
22518
22519                         cf_dir_suffix=
22520                         old_cf_suffix="$cf_suffix"
22521                         if test "$cf_cv_shlib_version_infix" = yes ; then
22522                         if test -n "$LIB_SUFFIX" ; then
22523                                 case $LIB_SUFFIX in
22524                                 tw*)
22525                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
22526                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
22527                                         cf_dir_suffix=tw
22528                                         ;;
22529                                 t*)
22530                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
22531                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
22532                                         cf_dir_suffix=t
22533                                         ;;
22534                                 w*)
22535                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
22536                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
22537                                         cf_dir_suffix=w
22538                                         ;;
22539                                 esac
22540                         fi
22541                         fi
22542
22543                         $AWK -f $srcdir/mk-1st.awk \
22544                                 name=${cf_libname}${cf_dir_suffix} \
22545                                 traces=$LIB_TRACING \
22546                                 MODEL=$cf_ITEM \
22547                                 CXX_MODEL=$CXX_MODEL \
22548                                 model=$cf_subdir \
22549                                 prefix=$cf_prefix \
22550                                 suffix=$cf_suffix \
22551                                 subset=$cf_subset \
22552                                 driver=$cf_cv_term_driver \
22553                                 SymLink="$LN_S" \
22554                                 TermlibRoot=$TINFO_NAME \
22555                                 TermlibSuffix=$TINFO_SUFFIX \
22556                                 ShlibVer=$cf_cv_shlib_version \
22557                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
22558                                 ReLink=${cf_cv_do_relink:-no} \
22559                                 DoLinks=$cf_cv_do_symlinks \
22560                                 rmSoLocs=$cf_cv_rm_so_locs \
22561                                 ldconfig="$LDCONFIG" \
22562                                 overwrite=$WITH_OVERWRITE \
22563                                 depend="$cf_depend" \
22564                                 host="$host" \
22565                                 libtool_version="$LIBTOOL_VERSION" \
22566                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22567
22568                         cf_suffix="$old_cf_suffix"
22569
22570                         for cf_subdir2 in $cf_subdirs lib
22571                         do
22572                                 test $cf_subdir = $cf_subdir2 && break
22573                         done
22574                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
22575                         $AWK -f $srcdir/mk-2nd.awk \
22576                                 name=$cf_dir \
22577                                 traces=$LIB_TRACING \
22578                                 MODEL=$cf_ITEM \
22579                                 model=$cf_subdir \
22580                                 subset=$cf_subset \
22581                                 srcdir=$srcdir \
22582                                 echo=$WITH_ECHO \
22583                                 crenames=$cf_cv_prog_CC_c_o \
22584                                 cxxrenames=$cf_cv_prog_CXX_c_o \
22585                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22586                         cf_subdirs="$cf_subdirs $cf_subdir"
22587                         done
22588                 done
22589         fi
22590
22591         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
22592 done
22593
22594 for cf_dir in $SRC_SUBDIRS
22595 do
22596         if test ! -d $srcdir/$cf_dir ; then
22597                 continue
22598         fi
22599
22600         if test -f $cf_dir/Makefile ; then
22601                 case "$cf_dir" in
22602                 Ada95) #(vi
22603                         echo 'libs \' >> Makefile
22604                         echo 'install.libs \' >> Makefile
22605                         echo 'uninstall.libs ::' >> Makefile
22606                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
22607                         ;;
22608                 esac
22609         fi
22610
22611         if test -f $srcdir/$cf_dir/modules; then
22612                 echo >> Makefile
22613                 if test -f $srcdir/$cf_dir/headers; then
22614 cat >> Makefile <<CF_EOF
22615 install.includes \\
22616 uninstall.includes \\
22617 CF_EOF
22618                 fi
22619 if test "$cf_dir" != "c++" ; then
22620 echo 'lint \' >> Makefile
22621 fi
22622 cat >> Makefile <<CF_EOF
22623 libs \\
22624 lintlib \\
22625 install.libs \\
22626 uninstall.libs \\
22627 install.$cf_dir \\
22628 uninstall.$cf_dir ::
22629         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22630 CF_EOF
22631         elif test -f $srcdir/$cf_dir/headers; then
22632 cat >> Makefile <<CF_EOF
22633
22634 libs \\
22635 install.libs \\
22636 uninstall.libs \\
22637 install.includes \\
22638 uninstall.includes ::
22639         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22640 CF_EOF
22641 fi
22642 done
22643
22644 if test "x$cf_with_db_install" = xyes; then
22645 cat >> Makefile <<CF_EOF
22646
22647 install.libs uninstall.libs \\
22648 install.data uninstall.data ::
22649 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
22650 CF_EOF
22651 fi
22652
22653 if test "x$cf_with_manpages" = xyes; then
22654 cat >> Makefile <<CF_EOF
22655
22656 install.man \\
22657 uninstall.man ::
22658         cd man && \${MAKE} \${TOP_MFLAGS} \$@
22659 CF_EOF
22660 fi
22661
22662 cat >> Makefile <<CF_EOF
22663
22664 distclean ::
22665         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
22666         rm -f headers.sh headers.sed mk_shared_lib.sh
22667         rm -f edit_man.* man_alias.*
22668         rm -rf \${DIRS_TO_MAKE}
22669 CF_EOF
22670
22671 # Special case: tack's manpage lives in its own directory.
22672 if test "x$cf_with_manpages" = xyes; then
22673 if test -d tack ; then
22674 if test -f $srcdir/$tack.h; then
22675 cat >> Makefile <<CF_EOF
22676
22677 install.man \\
22678 uninstall.man ::
22679         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
22680 CF_EOF
22681 fi
22682 fi
22683 fi
22684
22685 rm -f headers.sed headers.sh
22686
22687 echo creating headers.sh
22688 cat >headers.sh <<CF_EOF
22689 #! /bin/sh
22690 # This shell script is generated by the 'configure' script.  It is invoked in a
22691 # subdirectory of the build tree.  It generates a sed-script in the parent
22692 # directory that is used to adjust includes for header files that reside in a
22693 # subdirectory of /usr/include, etc.
22694 PRG=""
22695 while test \$# != 3
22696 do
22697 PRG="\$PRG \$1"; shift
22698 done
22699 DST=\$1
22700 REF=\$2
22701 SRC=\$3
22702 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
22703 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
22704 echo installing \$SRC in \$DST
22705 CF_EOF
22706
22707 if test $WITH_CURSES_H = yes; then
22708         cat >>headers.sh <<CF_EOF
22709 case \$DST in
22710 /*/include/*)
22711         END=\`basename \$DST\`
22712         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22713         do
22714                 NAME=\`basename \$i\`
22715                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22716         done
22717         ;;
22718 *)
22719         echo "" >> \$TMPSED
22720         ;;
22721 esac
22722 CF_EOF
22723
22724 else
22725         cat >>headers.sh <<CF_EOF
22726 case \$DST in
22727 /*/include/*)
22728         END=\`basename \$DST\`
22729         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22730         do
22731                 NAME=\`basename \$i\`
22732                 if test "\$NAME" = "curses.h"
22733                 then
22734                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22735                         NAME=ncurses.h
22736                 fi
22737                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22738         done
22739         ;;
22740 *)
22741         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22742         ;;
22743 esac
22744 CF_EOF
22745 fi
22746 cat >>headers.sh <<CF_EOF
22747 rm -f \$TMPSRC
22748 sed -f \$TMPSED \$SRC > \$TMPSRC
22749 NAME=\`basename \$SRC\`
22750 CF_EOF
22751 if test $WITH_CURSES_H != yes; then
22752         cat >>headers.sh <<CF_EOF
22753 test "\$NAME" = "curses.h" && NAME=ncurses.h
22754 CF_EOF
22755 fi
22756 cat >>headers.sh <<CF_EOF
22757 # Just in case someone gzip'd manpages, remove the conflicting copy.
22758 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22759
22760 eval \$PRG \$TMPSRC \$DST/\$NAME
22761 rm -f \$TMPSRC \$TMPSED
22762 CF_EOF
22763
22764 chmod 0755 headers.sh
22765
22766 for cf_dir in $SRC_SUBDIRS
22767 do
22768         if test ! -d $srcdir/$cf_dir ; then
22769                 continue
22770         fi
22771
22772         if test -f $srcdir/$cf_dir/headers; then
22773                 $AWK -f $srcdir/mk-hdr.awk \
22774                         subset="$LIB_SUBSETS" \
22775                         compat="$WITH_CURSES_H" \
22776                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22777         fi
22778
22779         if test -f $srcdir/$cf_dir/modules; then
22780                 if test "$cf_dir" != "c++" ; then
22781                         cat >>$cf_dir/Makefile <<"CF_EOF"
22782 depend : ${AUTO_SRC}
22783         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22784
22785 # DO NOT DELETE THIS LINE -- make depend depends on it.
22786 CF_EOF
22787                 fi
22788         fi
22789 done
22790
22791 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22792 if test -z "$USE_OLD_MAKERULES" ; then
22793         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22794 fi
22795 fi
22796  ;;
22797   esac
22798 done
22799 EOF
22800
22801 cat >>$CONFIG_STATUS <<\EOF
22802
22803 { (exit 0); exit 0; }
22804 EOF
22805 chmod +x $CONFIG_STATUS
22806 ac_clean_files=$ac_clean_files_save
22807
22808 # configure is writing to config.log, and then calls config.status.
22809 # config.status does its own redirection, appending to config.log.
22810 # Unfortunately, on DOS this fails, as config.log is still kept open
22811 # by configure, so config.status won't be able to write to it; its
22812 # output is simply discarded.  So we exec the FD to /dev/null,
22813 # effectively closing config.log, so it can be properly (re)opened and
22814 # appended to by config.status.  When coming back to configure, we
22815 # need to make the FD available again.
22816 if test "$no_create" != yes; then
22817   ac_cs_success=:
22818   exec 5>/dev/null
22819   $SHELL $CONFIG_STATUS || ac_cs_success=false
22820   exec 5>>config.log
22821   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22822   # would make configure fail if this is the last instruction.
22823   $ac_cs_success || { (exit 1); exit 1; }
22824 fi
22825 ${MAKE:-make} preinstall