]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20150502
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.613 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20141204.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tests         suppress build/install with test-programs
713   --without-curses-h      install curses.h as ncurses.h only
714   --with-pkg-config{=path} enable/disable use of pkg-config
715   --with-pkg-config-libdir=XXX use given directory for installing pc-files
716   --enable-pc-files       generate and install .pc files for pkg-config
717   --with-pc-suffix        suffixes pc-files
718   --enable-mixed-case     tic should assume mixed-case filenames
719   --with-install-prefix   prefixes actual install-location ($DESTDIR)
720 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
721   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
722   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
723   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
724   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
725   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
726   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
727 Options to Specify the Libraries Built/Used:
728   --disable-libtool-version  enable to use libtool's incompatible naming scheme
729   --with-libtool          generate libraries with libtool
730   --with-shared           generate shared-libraries
731   --with-normal           generate normal-libraries (default)
732   --with-debug            generate debug-libraries (default)
733   --with-profile          generate profile-libraries
734   --with-cxx-shared       generate C++ shared-libraries
735   --with-lib-prefix       override library-prefix
736   --with-termlib          generate separate terminfo library
737   --with-ticlib           generate separate tic library
738   --with-gpm              use Alessandro Rubini's GPM library
739   --without-dlsym         do not use dlsym() to load GPM dynamically
740   --with-sysmouse         use sysmouse (FreeBSD console)
741   --enable-rpath          use rpath option when generating shared libraries
742   --disable-relink        relink shared libraries during install
743   --with-shlib-version=X  Specify rel or abi version for shared libs
744   --with-libtool-opts=XXX specify additional libtool options
745   --with-export-syms=XXX  limit exported symbols using libtool
746   --with-versioned-syms=X markup versioned symbols using ld
747   --disable-lib-suffixes  disable library suffixes
748   --disable-rpath-hack    don't add rpath options for additional libraries
749 Fine-Tuning Your Configuration:
750   --with-extra-suffix=X   append extra suffix to header/library paths
751   --disable-overwrite     put headers in subdir, omit link to -lcurses
752   --disable-database      do not use terminfo, only fallbacks/termcap
753   --with-database=XXX     specify terminfo source to install
754   --with-hashed-db        specify hashed-database library
755   --with-fallbacks=XXX    specify list of fallback terminal descriptions
756   --without-xterm-new     specify if xterm terminfo should be old version
757   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
758   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
759   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
760   --disable-big-core      assume machine has little memory
761   --disable-big-strings   assume compiler has only standard-size strings
762   --enable-termcap        compile in termcap fallback support
763   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
764   --enable-getcap         fast termcap load, no xrefs to terminfo
765   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
766   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
767   --disable-root-environ  restrict environment when running as root
768   --enable-symlinks       make tic use symbolic links not hard links
769   --enable-broken_linker  compile with broken-linker support code
770   --enable-bsdpad         recognize BSD-style prefix padding
771   --enable-widec          compile with wide-char/UTF-8 code
772   --disable-lp64          allow chtype to be long (ignore _LP64)
773   --disable-largefile     omit support for large files
774   --disable-tparm-varargs compile tparm() without varargs interface
775   --disable-tic-depends   link tic library without explicit dependency on ncurses library
776   --with-bool=TYPE        override fallback type of bool variable
777   --with-caps=alt         compile with alternate Caps file
778   --with-chtype=TYPE      override type of chtype
779   --with-ospeed=TYPE      override type of ospeed variable
780   --with-mmask-t=TYPE     override type of mmask_t
781   --with-ccharw-max=XXX   override size CCHARW_MAX
782   --with-tparm-arg=TYPE   override parameter type of tparm
783   --with-rcs-ids          compile-in RCS identifiers
784 Options to Specify How Manpages are Installed:
785   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
786                           optionally formatted/catonly, e.g., gzip,formatted
787   --with-manpage-renames  specify manpage-renaming
788   --with-manpage-aliases  specify manpage-aliases using .so
789   --with-manpage-symlinks specify manpage-aliases using symlinks
790   --with-manpage-tbl      specify manpage processing with tbl
791 Extensions:
792   --disable-ext-funcs     disable function-extensions
793   --enable-sp-funcs       enable SCREEN-extensions
794   --enable-term-driver    enable terminal-driver
795   --enable-const          compile with extra/non-standard const
796   --enable-ext-colors     compile for 256-color support
797   --enable-ext-mouse      compile for extended mouse-encoding
798   --enable-ext-putwin     compile with extended putwin/screendump
799   --enable-no-padding     compile with $NCURSES_NO_PADDING code
800   --enable-signed-char    compile using signed Boolean's in term.h
801   --enable-sigwinch       compile with SIGWINCH handler
802   --enable-tcap-names     compile with user-definable terminal capabilities
803 Development Code:
804   --without-develop       disable development options
805   --enable-hard-tabs      compile with hard-tabs code
806   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
807 Experimental Code:
808   --disable-assumed-color do not assume anything about default-colors
809   --disable-hashmap       compile without hashmap scrolling-optimization
810   --enable-colorfgbg      compile-in experimental $COLORFGBG code
811   --enable-interop        compile-in interop bindings
812   --with-pthread          use POSIX thread library
813   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
814   --enable-weak-symbols   enable weak-symbols for pthreads
815   --enable-reentrant      compile with reentrant code
816   --with-wrap-prefix=XXX  override prefix used for public variables
817   --enable-safe-sprintf   compile with experimental safe-sprintf code
818   --disable-scroll-hints  compile without scroll-hints code
819   --enable-wgetch-events  compile with wgetch-events code
820 Testing/development Options:
821   --disable-echo          do not display "compiling" commands
822   --enable-warnings       build: turn on GCC compiler warnings
823   --enable-string-hacks   work around bogus compiler/loader warnings
824   --enable-assertions     test: turn on generation of assertion code
825   --with-dmalloc          test: use Gray Watson's dmalloc library
826   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
827   --with-valgrind         test: use valgrind
828   --disable-leaks         test: free permanent memory, analyze leaks
829   --enable-expanded       test: generate functions for certain macros
830   --disable-macros        test: use functions rather than macros
831   --with-trace            test: add trace() function to all models of ncurses
832   --disable-gnat-projects test: disable GNAT projects even if usable
833 Ada95 Binding Options:
834   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
835   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
836   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
837   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
838
839 Some influential environment variables:
840   CC          C compiler command
841   CFLAGS      C compiler flags
842   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
843               nonstandard directory <lib dir>
844   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
845               headers in a nonstandard directory <include dir>
846   CPP         C preprocessor
847   CXX         C++ compiler command
848   CXXFLAGS    C++ compiler flags
849   CXXCPP      C++ preprocessor
850
851 Use these variables to override the choices made by `configure' or to help
852 it to find libraries and programs with nonstandard names/locations.
853
854 EOF
855 fi
856
857 if test "$ac_init_help" = "recursive"; then
858   # If there are subdirs, report their specific --help.
859   ac_popdir=`pwd`
860   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
861     cd $ac_subdir
862     # A "../" for each directory in /$ac_subdir.
863     ac_dots=`echo $ac_subdir |
864              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
865
866     case $srcdir in
867     .) # No --srcdir option.  We are building in place.
868       ac_sub_srcdir=$srcdir ;;
869     [\\/]* | ?:[\\/]* ) # Absolute path.
870       ac_sub_srcdir=$srcdir/$ac_subdir ;;
871     *) # Relative path.
872       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
873     esac
874
875     # Check for guested configure; otherwise get Cygnus style configure.
876     if test -f $ac_sub_srcdir/configure.gnu; then
877       echo
878       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
879     elif test -f $ac_sub_srcdir/configure; then
880       echo
881       $SHELL $ac_sub_srcdir/configure  --help=recursive
882     elif test -f $ac_sub_srcdir/configure.ac ||
883            test -f $ac_sub_srcdir/configure.in; then
884       echo
885       $ac_configure --help
886     else
887       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
888     fi
889     cd $ac_popdir
890   done
891 fi
892
893 test -n "$ac_init_help" && exit 0
894 if $ac_init_version; then
895   cat <<\EOF
896
897 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
898 Free Software Foundation, Inc.
899 This configure script is free software; the Free Software Foundation
900 gives unlimited permission to copy, distribute and modify it.
901 EOF
902   exit 0
903 fi
904 exec 5>config.log
905 cat >&5 <<EOF
906 This file contains any messages produced by compilers while
907 running configure, to aid debugging if configure makes a mistake.
908
909 It was created by $as_me, which was
910 generated by GNU Autoconf 2.52.20141204.  Invocation command line was
911
912   $ $0 $@
913
914 EOF
915 {
916 cat <<_ASUNAME
917 ## ---------- ##
918 ## Platform.  ##
919 ## ---------- ##
920
921 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
922 uname -m = `(uname -m) 2>/dev/null || echo unknown`
923 uname -r = `(uname -r) 2>/dev/null || echo unknown`
924 uname -s = `(uname -s) 2>/dev/null || echo unknown`
925 uname -v = `(uname -v) 2>/dev/null || echo unknown`
926
927 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
928 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
929
930 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
931 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
932 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
933 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
934 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
935 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
936 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
937
938 PATH = $PATH
939
940 _ASUNAME
941 } >&5
942
943 cat >&5 <<EOF
944 ## ------------ ##
945 ## Core tests.  ##
946 ## ------------ ##
947
948 EOF
949
950 # Keep a trace of the command line.
951 # Strip out --no-create and --no-recursion so they do not pile up.
952 # Also quote any args containing shell meta-characters.
953 ac_configure_args=
954 ac_sep=
955 for ac_arg
956 do
957   case $ac_arg in
958   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
959   | --no-cr | --no-c) ;;
960   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
962   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
963     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
964     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
965     ac_sep=" " ;;
966   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
967      ac_sep=" " ;;
968   esac
969   # Get rid of the leading space.
970 done
971
972 # When interrupted or exit'd, cleanup temporary files, and complete
973 # config.log.  We remove comments because anyway the quotes in there
974 # would cause problems or look ugly.
975 trap 'exit_status=$?
976   # Save into config.log some information that might help in debugging.
977   echo >&5
978   echo "## ----------------- ##" >&5
979   echo "## Cache variables.  ##" >&5
980   echo "## ----------------- ##" >&5
981   echo >&5
982   # The following way of writing the cache mishandles newlines in values,
983 {
984   (set) 2>&1 |
985     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
986     *ac_space=\ *)
987       sed -n \
988         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
989           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
990       ;;
991     *)
992       sed -n \
993         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
994       ;;
995     esac;
996 } >&5
997   sed "/^$/d" confdefs.h >conftest.log
998   if test -s conftest.log; then
999     echo >&5
1000     echo "## ------------ ##" >&5
1001     echo "## confdefs.h.  ##" >&5
1002     echo "## ------------ ##" >&5
1003     echo >&5
1004     cat conftest.log >&5
1005   fi
1006   (echo; echo) >&5
1007   test "$ac_signal" != 0 &&
1008     echo "$as_me: caught signal $ac_signal" >&5
1009   echo "$as_me: exit $exit_status" >&5
1010   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1011     exit $exit_status
1012      ' 0
1013 for ac_signal in 1 2 13 15; do
1014   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1015 done
1016 ac_signal=0
1017
1018 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1019 rm -rf conftest* confdefs.h
1020 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1021 echo >confdefs.h
1022
1023 # Let the site file select an alternate cache file if it wants to.
1024 # Prefer explicitly selected file to automatically selected ones.
1025 if test -z "$CONFIG_SITE"; then
1026   if test "x$prefix" != xNONE; then
1027     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1028   else
1029     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1030   fi
1031 fi
1032 for ac_site_file in $CONFIG_SITE; do
1033   if test -r "$ac_site_file"; then
1034     { echo "$as_me:1034: loading site script $ac_site_file" >&5
1035 echo "$as_me: loading site script $ac_site_file" >&6;}
1036     cat "$ac_site_file" >&5
1037     . "$ac_site_file"
1038   fi
1039 done
1040
1041 if test -r "$cache_file"; then
1042   # Some versions of bash will fail to source /dev/null (special
1043   # files actually), so we avoid doing that.
1044   if test -f "$cache_file"; then
1045     { echo "$as_me:1045: loading cache $cache_file" >&5
1046 echo "$as_me: loading cache $cache_file" >&6;}
1047     case $cache_file in
1048       [\\/]* | ?:[\\/]* ) . $cache_file;;
1049       *)                      . ./$cache_file;;
1050     esac
1051   fi
1052 else
1053   { echo "$as_me:1053: creating cache $cache_file" >&5
1054 echo "$as_me: creating cache $cache_file" >&6;}
1055   >$cache_file
1056 fi
1057
1058 # Check that the precious variables saved in the cache have kept the same
1059 # value.
1060 ac_cache_corrupted=false
1061 for ac_var in `(set) 2>&1 |
1062                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1063   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1064   eval ac_new_set=\$ac_env_${ac_var}_set
1065   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1066   eval ac_new_val="\$ac_env_${ac_var}_value"
1067   case $ac_old_set,$ac_new_set in
1068     set,)
1069       { echo "$as_me:1069: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1070 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1071       ac_cache_corrupted=: ;;
1072     ,set)
1073       { echo "$as_me:1073: error: \`$ac_var' was not set in the previous run" >&5
1074 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1075       ac_cache_corrupted=: ;;
1076     ,);;
1077     *)
1078       if test "x$ac_old_val" != "x$ac_new_val"; then
1079         { echo "$as_me:1079: error: \`$ac_var' has changed since the previous run:" >&5
1080 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1081         { echo "$as_me:1081:   former value:  $ac_old_val" >&5
1082 echo "$as_me:   former value:  $ac_old_val" >&2;}
1083         { echo "$as_me:1083:   current value: $ac_new_val" >&5
1084 echo "$as_me:   current value: $ac_new_val" >&2;}
1085         ac_cache_corrupted=:
1086       fi;;
1087   esac
1088   # Pass precious variables to config.status.  It doesn't matter if
1089   # we pass some twice (in addition to the command line arguments).
1090   if test "$ac_new_set" = set; then
1091     case $ac_new_val in
1092     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1093       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1094       ac_configure_args="$ac_configure_args '$ac_arg'"
1095       ;;
1096     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1097        ;;
1098     esac
1099   fi
1100 done
1101 if $ac_cache_corrupted; then
1102   { echo "$as_me:1102: error: changes in the environment can compromise the build" >&5
1103 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1104   { { echo "$as_me:1104: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1105 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1106    { (exit 1); exit 1; }; }
1107 fi
1108
1109 ac_ext=c
1110 ac_cpp='$CPP $CPPFLAGS'
1111 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1112 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1113 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1114 ac_main_return=return
1115
1116 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1117   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1118                    ECHO_T='     ' ;;
1119   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1120   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1121 esac
1122 echo "#! $SHELL" >conftest.sh
1123 echo  "exit 0"   >>conftest.sh
1124 chmod +x conftest.sh
1125 if { (echo "$as_me:1125: PATH=\".;.\"; conftest.sh") >&5
1126   (PATH=".;."; conftest.sh) 2>&5
1127   ac_status=$?
1128   echo "$as_me:1128: \$? = $ac_status" >&5
1129   (exit $ac_status); }; then
1130   ac_path_separator=';'
1131 else
1132   ac_path_separator=:
1133 fi
1134 PATH_SEPARATOR="$ac_path_separator"
1135 rm -f conftest.sh
1136
1137 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1138
1139 top_builddir=`pwd`
1140
1141 echo "$as_me:1141: checking for egrep" >&5
1142 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1143 if test "${ac_cv_prog_egrep+set}" = set; then
1144   echo $ECHO_N "(cached) $ECHO_C" >&6
1145 else
1146   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1147                 then ac_cv_prog_egrep='grep -E'
1148                 else ac_cv_prog_egrep='egrep'
1149         fi
1150 fi
1151 echo "$as_me:1151: result: $ac_cv_prog_egrep" >&5
1152 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1153         EGREP=$ac_cv_prog_egrep
1154
1155         test -z "$EGREP" && { { echo "$as_me:1155: error: No egrep program found" >&5
1156 echo "$as_me: error: No egrep program found" >&2;}
1157    { (exit 1); exit 1; }; }
1158
1159 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1160 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1161 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1162 cf_cv_abi_version=${NCURSES_MAJOR}
1163 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1164 cf_cv_timestamp=`date`
1165 echo "$as_me:1165: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1166 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1167
1168 if test -f $srcdir/VERSION ; then
1169         echo "$as_me:1169: checking for package version" >&5
1170 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1171
1172         # if there are not enough fields, cut returns the last one...
1173         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1174         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1175         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1176
1177         # this is how CF_BUNDLED_INTL uses $VERSION:
1178         VERSION="$cf_field1"
1179
1180         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1181         test -z "$VERSION_MAJOR" && { { echo "$as_me:1181: error: missing major-version" >&5
1182 echo "$as_me: error: missing major-version" >&2;}
1183    { (exit 1); exit 1; }; }
1184
1185         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1186         test -z "$VERSION_MINOR" && { { echo "$as_me:1186: error: missing minor-version" >&5
1187 echo "$as_me: error: missing minor-version" >&2;}
1188    { (exit 1); exit 1; }; }
1189
1190         echo "$as_me:1190: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1191 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1192
1193         echo "$as_me:1193: checking for package patch date" >&5
1194 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1195         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1196         case .$VERSION_PATCH in
1197         (.)
1198                 { { echo "$as_me:1198: error: missing patch-date $VERSION_PATCH" >&5
1199 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1200    { (exit 1); exit 1; }; }
1201                 ;;
1202         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1203                 ;;
1204         (*)
1205                 { { echo "$as_me:1205: error: illegal patch-date $VERSION_PATCH" >&5
1206 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1207    { (exit 1); exit 1; }; }
1208                 ;;
1209         esac
1210         echo "$as_me:1210: result: $VERSION_PATCH" >&5
1211 echo "${ECHO_T}$VERSION_PATCH" >&6
1212 else
1213         { { echo "$as_me:1213: error: did not find $srcdir/VERSION" >&5
1214 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1215    { (exit 1); exit 1; }; }
1216 fi
1217
1218 # show the actual data that we have for versions:
1219 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1220
1221 echo "${as_me:-configure}:1221: testing ABI VERSION $VERSION ..." 1>&5
1222
1223 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1224
1225 echo "${as_me:-configure}:1225: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1226
1227 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1228
1229 echo "${as_me:-configure}:1229: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1230
1231 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1232
1233 echo "${as_me:-configure}:1233: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1234
1235         cf_PACKAGE=NCURSES
1236         PACKAGE=ncurses
1237
1238 cat >>confdefs.h <<EOF
1239 #define PACKAGE "$PACKAGE"
1240 EOF
1241
1242 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1243
1244         cat >>confdefs.h <<EOF
1245 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1246 EOF
1247
1248         cat >>confdefs.h <<EOF
1249 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1250 EOF
1251
1252 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1253
1254 # Check whether --with-rel-version or --without-rel-version was given.
1255 if test "${with_rel_version+set}" = set; then
1256   withval="$with_rel_version"
1257   { echo "$as_me:1257: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1258 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1259  cf_cv_rel_version=$withval
1260 fi;
1261
1262  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1263  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1264
1265 if test -n "$NCURSES_MAJOR" ; then
1266   case $NCURSES_MAJOR in
1267   ([0-9]*)
1268         ;;
1269   (*)
1270         { { echo "$as_me:1270: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1271 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1272    { (exit 1); exit 1; }; }
1273         ;;
1274   esac
1275 else
1276   { { echo "$as_me:1276: error: Release major-version value is empty" >&5
1277 echo "$as_me: error: Release major-version value is empty" >&2;}
1278    { (exit 1); exit 1; }; }
1279 fi
1280
1281 if test -n "$NCURSES_MINOR" ; then
1282   case $NCURSES_MINOR in
1283   ([0-9]*)
1284         ;;
1285   (*)
1286         { { echo "$as_me:1286: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1287 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1288    { (exit 1); exit 1; }; }
1289         ;;
1290   esac
1291 else
1292   { { echo "$as_me:1292: error: Release minor-version value is empty" >&5
1293 echo "$as_me: error: Release minor-version value is empty" >&2;}
1294    { (exit 1); exit 1; }; }
1295 fi
1296
1297 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1298
1299 # Check whether --with-abi-version or --without-abi-version was given.
1300 if test "${with_abi_version+set}" = set; then
1301   withval="$with_abi_version"
1302   { echo "$as_me:1302: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1303 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1304  cf_cv_abi_version=$withval
1305 fi;
1306
1307 if test -n "$cf_cv_abi_version" ; then
1308   case $cf_cv_abi_version in
1309   ([0-9]*)
1310         ;;
1311   (*)
1312         { { echo "$as_me:1312: error: ABI version is not a number: $cf_cv_abi_version" >&5
1313 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1314    { (exit 1); exit 1; }; }
1315         ;;
1316   esac
1317 else
1318   { { echo "$as_me:1318: error: ABI version value is empty" >&5
1319 echo "$as_me: error: ABI version value is empty" >&2;}
1320    { (exit 1); exit 1; }; }
1321 fi
1322
1323 ac_aux_dir=
1324 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1325   if test -f $ac_dir/install-sh; then
1326     ac_aux_dir=$ac_dir
1327     ac_install_sh="$ac_aux_dir/install-sh -c"
1328     break
1329   elif test -f $ac_dir/install.sh; then
1330     ac_aux_dir=$ac_dir
1331     ac_install_sh="$ac_aux_dir/install.sh -c"
1332     break
1333   elif test -f $ac_dir/shtool; then
1334     ac_aux_dir=$ac_dir
1335     ac_install_sh="$ac_aux_dir/shtool install -c"
1336     break
1337   fi
1338 done
1339 if test -z "$ac_aux_dir"; then
1340   { { echo "$as_me:1340: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1341 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1342    { (exit 1); exit 1; }; }
1343 fi
1344 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1345 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1346 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1347
1348 # Make sure we can run config.sub.
1349 $ac_config_sub sun4 >/dev/null 2>&1 ||
1350   { { echo "$as_me:1350: error: cannot run $ac_config_sub" >&5
1351 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1352    { (exit 1); exit 1; }; }
1353
1354 echo "$as_me:1354: checking build system type" >&5
1355 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1356 if test "${ac_cv_build+set}" = set; then
1357   echo $ECHO_N "(cached) $ECHO_C" >&6
1358 else
1359   ac_cv_build_alias=$build_alias
1360 test -z "$ac_cv_build_alias" &&
1361   ac_cv_build_alias=`$ac_config_guess`
1362 test -z "$ac_cv_build_alias" &&
1363   { { echo "$as_me:1363: error: cannot guess build type; you must specify one" >&5
1364 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1365    { (exit 1); exit 1; }; }
1366 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1367   { { echo "$as_me:1367: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1368 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1369    { (exit 1); exit 1; }; }
1370
1371 fi
1372 echo "$as_me:1372: result: $ac_cv_build" >&5
1373 echo "${ECHO_T}$ac_cv_build" >&6
1374 build=$ac_cv_build
1375 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1376 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1377 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1378
1379 echo "$as_me:1379: checking host system type" >&5
1380 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1381 if test "${ac_cv_host+set}" = set; then
1382   echo $ECHO_N "(cached) $ECHO_C" >&6
1383 else
1384   ac_cv_host_alias=$host_alias
1385 test -z "$ac_cv_host_alias" &&
1386   ac_cv_host_alias=$ac_cv_build_alias
1387 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1388   { { echo "$as_me:1388: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1389 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1390    { (exit 1); exit 1; }; }
1391
1392 fi
1393 echo "$as_me:1393: result: $ac_cv_host" >&5
1394 echo "${ECHO_T}$ac_cv_host" >&6
1395 host=$ac_cv_host
1396 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1397 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1398 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1399
1400 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1401         echo "$as_me:1401: checking target system type" >&5
1402 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1403 if test "${ac_cv_target+set}" = set; then
1404   echo $ECHO_N "(cached) $ECHO_C" >&6
1405 else
1406   ac_cv_target_alias=$target_alias
1407 test "x$ac_cv_target_alias" = "x" &&
1408   ac_cv_target_alias=$ac_cv_host_alias
1409 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1410   { { echo "$as_me:1410: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1411 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1412    { (exit 1); exit 1; }; }
1413
1414 fi
1415 echo "$as_me:1415: result: $ac_cv_target" >&5
1416 echo "${ECHO_T}$ac_cv_target" >&6
1417 target=$ac_cv_target
1418 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1419 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1420 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1421
1422 # The aliases save the names the user supplied, while $host etc.
1423 # will get canonicalized.
1424 test -n "$target_alias" &&
1425   test "$program_prefix$program_suffix$program_transform_name" = \
1426     NONENONEs,x,x, &&
1427   program_prefix=${target_alias}-
1428         system_name="$host_os"
1429 else
1430         system_name="`(uname -s -r) 2>/dev/null`"
1431         if test -z "$system_name" ; then
1432                 system_name="`(hostname) 2>/dev/null`"
1433         fi
1434 fi
1435 test -n "$system_name" &&
1436 cat >>confdefs.h <<EOF
1437 #define SYSTEM_NAME "$system_name"
1438 EOF
1439
1440 if test "${cf_cv_system_name+set}" = set; then
1441   echo $ECHO_N "(cached) $ECHO_C" >&6
1442 else
1443   cf_cv_system_name="$system_name"
1444 fi
1445
1446 test -z "$system_name" && system_name="$cf_cv_system_name"
1447 test -n "$cf_cv_system_name" && echo "$as_me:1447: result: Configuring for $cf_cv_system_name" >&5
1448 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1449
1450 if test ".$system_name" != ".$cf_cv_system_name" ; then
1451         echo "$as_me:1451: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1452 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1453         { { echo "$as_me:1453: error: \"Please remove config.cache and try again.\"" >&5
1454 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1455    { (exit 1); exit 1; }; }
1456 fi
1457
1458 # Check whether --with-system-type or --without-system-type was given.
1459 if test "${with_system_type+set}" = set; then
1460   withval="$with_system_type"
1461   { echo "$as_me:1461: WARNING: overriding system type to $withval" >&5
1462 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1463         cf_cv_system_name=$withval
1464         host_os=$withval
1465
1466 fi;
1467
1468 ###     Save the given $CFLAGS to allow user-override.
1469 cf_user_CFLAGS="$CFLAGS"
1470
1471 ###     Default install-location
1472
1473 echo "$as_me:1473: checking for prefix" >&5
1474 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1475 if test "x$prefix" = "xNONE" ; then
1476         case "$cf_cv_system_name" in
1477                 # non-vendor systems don't have a conflict
1478         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1479                 prefix=/usr
1480                 ;;
1481         (*)     prefix=$ac_default_prefix
1482                 ;;
1483         esac
1484 fi
1485 echo "$as_me:1485: result: $prefix" >&5
1486 echo "${ECHO_T}$prefix" >&6
1487
1488 if test "x$prefix" = "xNONE" ; then
1489 echo "$as_me:1489: checking for default include-directory" >&5
1490 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1491 test -n "$verbose" && echo 1>&6
1492 for cf_symbol in \
1493         $includedir \
1494         $includedir/ncurses \
1495         $prefix/include \
1496         $prefix/include/ncurses \
1497         /usr/local/include \
1498         /usr/local/include/ncurses \
1499         /usr/include \
1500         /usr/include/ncurses
1501 do
1502         cf_dir=`eval echo $cf_symbol`
1503         if test -f $cf_dir/curses.h ; then
1504         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1505                 includedir="$cf_symbol"
1506                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1507                 break
1508         fi
1509         fi
1510         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1511 done
1512 echo "$as_me:1512: result: $includedir" >&5
1513 echo "${ECHO_T}$includedir" >&6
1514 fi
1515
1516 ### Defaults for ncurses ABI
1517
1518 case x$cf_cv_abi_version in
1519 (x6)
1520         cf_dft_ext_colors=yes
1521         cf_dft_ext_const=yes
1522         cf_dft_ext_mouse=yes
1523         cf_dft_ext_putwin=yes
1524         cf_dft_ext_spfuncs=yes
1525         cf_dft_chtype=uint32_t
1526         cf_dft_mmask_t=uint32_t
1527         cf_dft_interop=yes
1528         cf_dft_tparm_arg=intptr_t
1529         ;;
1530 (*)
1531         cf_dft_ext_colors=no
1532         cf_dft_ext_const=no
1533         cf_dft_ext_mouse=no
1534         cf_dft_ext_putwin=no
1535         cf_dft_ext_spfuncs=no
1536         cf_dft_chtype=auto
1537         cf_dft_mmask_t=auto
1538         cf_dft_interop=no
1539         cf_dft_tparm_arg=long
1540         ;;
1541 esac
1542
1543 ###     Checks for programs.
1544
1545 # Check whether --with-ada or --without-ada was given.
1546 if test "${with_ada+set}" = set; then
1547   withval="$with_ada"
1548   cf_with_ada=$withval
1549 else
1550   cf_with_ada=yes
1551 fi;
1552 if test "x$cf_with_ada" = xyes
1553 then
1554         cf_PROG_CC="gnatgcc gcc cc"
1555 else
1556         cf_PROG_CC="gcc cc"
1557 fi
1558
1559 ac_ext=c
1560 ac_cpp='$CPP $CPPFLAGS'
1561 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1562 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1563 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1564 ac_main_return=return
1565 if test -n "$ac_tool_prefix"; then
1566   for ac_prog in $cf_PROG_CC
1567   do
1568     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1569 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1570 echo "$as_me:1570: checking for $ac_word" >&5
1571 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1572 if test "${ac_cv_prog_CC+set}" = set; then
1573   echo $ECHO_N "(cached) $ECHO_C" >&6
1574 else
1575   if test -n "$CC"; then
1576   ac_cv_prog_CC="$CC" # Let the user override the test.
1577 else
1578   ac_save_IFS=$IFS; IFS=$ac_path_separator
1579 ac_dummy="$PATH"
1580 for ac_dir in $ac_dummy; do
1581   IFS=$ac_save_IFS
1582   test -z "$ac_dir" && ac_dir=.
1583   $as_executable_p "$ac_dir/$ac_word" || continue
1584 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1585 echo "$as_me:1585: found $ac_dir/$ac_word" >&5
1586 break
1587 done
1588
1589 fi
1590 fi
1591 CC=$ac_cv_prog_CC
1592 if test -n "$CC"; then
1593   echo "$as_me:1593: result: $CC" >&5
1594 echo "${ECHO_T}$CC" >&6
1595 else
1596   echo "$as_me:1596: result: no" >&5
1597 echo "${ECHO_T}no" >&6
1598 fi
1599
1600     test -n "$CC" && break
1601   done
1602 fi
1603 if test -z "$CC"; then
1604   ac_ct_CC=$CC
1605   for ac_prog in $cf_PROG_CC
1606 do
1607   # Extract the first word of "$ac_prog", so it can be a program name with args.
1608 set dummy $ac_prog; ac_word=$2
1609 echo "$as_me:1609: checking for $ac_word" >&5
1610 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1611 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1612   echo $ECHO_N "(cached) $ECHO_C" >&6
1613 else
1614   if test -n "$ac_ct_CC"; then
1615   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1616 else
1617   ac_save_IFS=$IFS; IFS=$ac_path_separator
1618 ac_dummy="$PATH"
1619 for ac_dir in $ac_dummy; do
1620   IFS=$ac_save_IFS
1621   test -z "$ac_dir" && ac_dir=.
1622   $as_executable_p "$ac_dir/$ac_word" || continue
1623 ac_cv_prog_ac_ct_CC="$ac_prog"
1624 echo "$as_me:1624: found $ac_dir/$ac_word" >&5
1625 break
1626 done
1627
1628 fi
1629 fi
1630 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1631 if test -n "$ac_ct_CC"; then
1632   echo "$as_me:1632: result: $ac_ct_CC" >&5
1633 echo "${ECHO_T}$ac_ct_CC" >&6
1634 else
1635   echo "$as_me:1635: result: no" >&5
1636 echo "${ECHO_T}no" >&6
1637 fi
1638
1639   test -n "$ac_ct_CC" && break
1640 done
1641
1642   CC=$ac_ct_CC
1643 fi
1644
1645 test -z "$CC" && { { echo "$as_me:1645: error: no acceptable cc found in \$PATH" >&5
1646 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1647    { (exit 1); exit 1; }; }
1648
1649 # Provide some information about the compiler.
1650 echo "$as_me:1650:" \
1651      "checking for C compiler version" >&5
1652 ac_compiler=`set X $ac_compile; echo $2`
1653 { (eval echo "$as_me:1653: \"$ac_compiler --version </dev/null >&5\"") >&5
1654   (eval $ac_compiler --version </dev/null >&5) 2>&5
1655   ac_status=$?
1656   echo "$as_me:1656: \$? = $ac_status" >&5
1657   (exit $ac_status); }
1658 { (eval echo "$as_me:1658: \"$ac_compiler -v </dev/null >&5\"") >&5
1659   (eval $ac_compiler -v </dev/null >&5) 2>&5
1660   ac_status=$?
1661   echo "$as_me:1661: \$? = $ac_status" >&5
1662   (exit $ac_status); }
1663 { (eval echo "$as_me:1663: \"$ac_compiler -V </dev/null >&5\"") >&5
1664   (eval $ac_compiler -V </dev/null >&5) 2>&5
1665   ac_status=$?
1666   echo "$as_me:1666: \$? = $ac_status" >&5
1667   (exit $ac_status); }
1668
1669 cat >conftest.$ac_ext <<_ACEOF
1670 #line 1670 "configure"
1671 #include "confdefs.h"
1672
1673 int
1674 main ()
1675 {
1676
1677   ;
1678   return 0;
1679 }
1680 _ACEOF
1681 ac_clean_files_save=$ac_clean_files
1682 ac_clean_files="$ac_clean_files a.out a.exe"
1683 # Try to create an executable without -o first, disregard a.out.
1684 # It will help us diagnose broken compilers, and finding out an intuition
1685 # of exeext.
1686 echo "$as_me:1686: checking for C compiler default output" >&5
1687 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1688 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1689 if { (eval echo "$as_me:1689: \"$ac_link_default\"") >&5
1690   (eval $ac_link_default) 2>&5
1691   ac_status=$?
1692   echo "$as_me:1692: \$? = $ac_status" >&5
1693   (exit $ac_status); }; then
1694   # Find the output, starting from the most likely.  This scheme is
1695 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1696 # resort.
1697 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1698                 ls a.out conftest 2>/dev/null;
1699                 ls a.* conftest.* 2>/dev/null`; do
1700   case $ac_file in
1701     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1702     a.out ) # We found the default executable, but exeext='' is most
1703             # certainly right.
1704             break;;
1705     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1706           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1707           export ac_cv_exeext
1708           break;;
1709     * ) break;;
1710   esac
1711 done
1712 else
1713   echo "$as_me: failed program was:" >&5
1714 cat conftest.$ac_ext >&5
1715 { { echo "$as_me:1715: error: C compiler cannot create executables" >&5
1716 echo "$as_me: error: C compiler cannot create executables" >&2;}
1717    { (exit 77); exit 77; }; }
1718 fi
1719
1720 ac_exeext=$ac_cv_exeext
1721 echo "$as_me:1721: result: $ac_file" >&5
1722 echo "${ECHO_T}$ac_file" >&6
1723
1724 # Check the compiler produces executables we can run.  If not, either
1725 # the compiler is broken, or we cross compile.
1726 echo "$as_me:1726: checking whether the C compiler works" >&5
1727 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1728 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1729 # If not cross compiling, check that we can run a simple program.
1730 if test "$cross_compiling" != yes; then
1731   if { ac_try='./$ac_file'
1732   { (eval echo "$as_me:1732: \"$ac_try\"") >&5
1733   (eval $ac_try) 2>&5
1734   ac_status=$?
1735   echo "$as_me:1735: \$? = $ac_status" >&5
1736   (exit $ac_status); }; }; then
1737     cross_compiling=no
1738   else
1739     if test "$cross_compiling" = maybe; then
1740         cross_compiling=yes
1741     else
1742         { { echo "$as_me:1742: error: cannot run C compiled programs.
1743 If you meant to cross compile, use \`--host'." >&5
1744 echo "$as_me: error: cannot run C compiled programs.
1745 If you meant to cross compile, use \`--host'." >&2;}
1746    { (exit 1); exit 1; }; }
1747     fi
1748   fi
1749 fi
1750 echo "$as_me:1750: result: yes" >&5
1751 echo "${ECHO_T}yes" >&6
1752
1753 rm -f a.out a.exe conftest$ac_cv_exeext
1754 ac_clean_files=$ac_clean_files_save
1755 # Check the compiler produces executables we can run.  If not, either
1756 # the compiler is broken, or we cross compile.
1757 echo "$as_me:1757: checking whether we are cross compiling" >&5
1758 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1759 echo "$as_me:1759: result: $cross_compiling" >&5
1760 echo "${ECHO_T}$cross_compiling" >&6
1761
1762 echo "$as_me:1762: checking for executable suffix" >&5
1763 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1764 if { (eval echo "$as_me:1764: \"$ac_link\"") >&5
1765   (eval $ac_link) 2>&5
1766   ac_status=$?
1767   echo "$as_me:1767: \$? = $ac_status" >&5
1768   (exit $ac_status); }; then
1769   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1770 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1771 # work properly (i.e., refer to `conftest.exe'), while it won't with
1772 # `rm'.
1773 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1774   case $ac_file in
1775     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1776     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1777           export ac_cv_exeext
1778           break;;
1779     * ) break;;
1780   esac
1781 done
1782 else
1783   { { echo "$as_me:1783: error: cannot compute EXEEXT: cannot compile and link" >&5
1784 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1785    { (exit 1); exit 1; }; }
1786 fi
1787
1788 rm -f conftest$ac_cv_exeext
1789 echo "$as_me:1789: result: $ac_cv_exeext" >&5
1790 echo "${ECHO_T}$ac_cv_exeext" >&6
1791
1792 rm -f conftest.$ac_ext
1793 EXEEXT=$ac_cv_exeext
1794 ac_exeext=$EXEEXT
1795 echo "$as_me:1795: checking for object suffix" >&5
1796 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1797 if test "${ac_cv_objext+set}" = set; then
1798   echo $ECHO_N "(cached) $ECHO_C" >&6
1799 else
1800   cat >conftest.$ac_ext <<_ACEOF
1801 #line 1801 "configure"
1802 #include "confdefs.h"
1803
1804 int
1805 main ()
1806 {
1807
1808   ;
1809   return 0;
1810 }
1811 _ACEOF
1812 rm -f conftest.o conftest.obj
1813 if { (eval echo "$as_me:1813: \"$ac_compile\"") >&5
1814   (eval $ac_compile) 2>&5
1815   ac_status=$?
1816   echo "$as_me:1816: \$? = $ac_status" >&5
1817   (exit $ac_status); }; then
1818   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1819   case $ac_file in
1820     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1821     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1822        break;;
1823   esac
1824 done
1825 else
1826   echo "$as_me: failed program was:" >&5
1827 cat conftest.$ac_ext >&5
1828 { { echo "$as_me:1828: error: cannot compute OBJEXT: cannot compile" >&5
1829 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1830    { (exit 1); exit 1; }; }
1831 fi
1832
1833 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1834 fi
1835 echo "$as_me:1835: result: $ac_cv_objext" >&5
1836 echo "${ECHO_T}$ac_cv_objext" >&6
1837 OBJEXT=$ac_cv_objext
1838 ac_objext=$OBJEXT
1839 echo "$as_me:1839: checking whether we are using the GNU C compiler" >&5
1840 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1841 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1842   echo $ECHO_N "(cached) $ECHO_C" >&6
1843 else
1844   cat >conftest.$ac_ext <<_ACEOF
1845 #line 1845 "configure"
1846 #include "confdefs.h"
1847
1848 int
1849 main ()
1850 {
1851 #ifndef __GNUC__
1852        choke me
1853 #endif
1854
1855   ;
1856   return 0;
1857 }
1858 _ACEOF
1859 rm -f conftest.$ac_objext
1860 if { (eval echo "$as_me:1860: \"$ac_compile\"") >&5
1861   (eval $ac_compile) 2>&5
1862   ac_status=$?
1863   echo "$as_me:1863: \$? = $ac_status" >&5
1864   (exit $ac_status); } &&
1865          { ac_try='test -s conftest.$ac_objext'
1866   { (eval echo "$as_me:1866: \"$ac_try\"") >&5
1867   (eval $ac_try) 2>&5
1868   ac_status=$?
1869   echo "$as_me:1869: \$? = $ac_status" >&5
1870   (exit $ac_status); }; }; then
1871   ac_compiler_gnu=yes
1872 else
1873   echo "$as_me: failed program was:" >&5
1874 cat conftest.$ac_ext >&5
1875 ac_compiler_gnu=no
1876 fi
1877 rm -f conftest.$ac_objext conftest.$ac_ext
1878 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1879
1880 fi
1881 echo "$as_me:1881: result: $ac_cv_c_compiler_gnu" >&5
1882 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1883 GCC=`test $ac_compiler_gnu = yes && echo yes`
1884 ac_test_CFLAGS=${CFLAGS+set}
1885 ac_save_CFLAGS=$CFLAGS
1886 CFLAGS="-g"
1887 echo "$as_me:1887: checking whether $CC accepts -g" >&5
1888 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1889 if test "${ac_cv_prog_cc_g+set}" = set; then
1890   echo $ECHO_N "(cached) $ECHO_C" >&6
1891 else
1892   cat >conftest.$ac_ext <<_ACEOF
1893 #line 1893 "configure"
1894 #include "confdefs.h"
1895
1896 int
1897 main ()
1898 {
1899
1900   ;
1901   return 0;
1902 }
1903 _ACEOF
1904 rm -f conftest.$ac_objext
1905 if { (eval echo "$as_me:1905: \"$ac_compile\"") >&5
1906   (eval $ac_compile) 2>&5
1907   ac_status=$?
1908   echo "$as_me:1908: \$? = $ac_status" >&5
1909   (exit $ac_status); } &&
1910          { ac_try='test -s conftest.$ac_objext'
1911   { (eval echo "$as_me:1911: \"$ac_try\"") >&5
1912   (eval $ac_try) 2>&5
1913   ac_status=$?
1914   echo "$as_me:1914: \$? = $ac_status" >&5
1915   (exit $ac_status); }; }; then
1916   ac_cv_prog_cc_g=yes
1917 else
1918   echo "$as_me: failed program was:" >&5
1919 cat conftest.$ac_ext >&5
1920 ac_cv_prog_cc_g=no
1921 fi
1922 rm -f conftest.$ac_objext conftest.$ac_ext
1923 fi
1924 echo "$as_me:1924: result: $ac_cv_prog_cc_g" >&5
1925 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1926 if test "$ac_test_CFLAGS" = set; then
1927   CFLAGS=$ac_save_CFLAGS
1928 elif test $ac_cv_prog_cc_g = yes; then
1929   if test "$GCC" = yes; then
1930     CFLAGS="-g -O2"
1931   else
1932     CFLAGS="-g"
1933   fi
1934 else
1935   if test "$GCC" = yes; then
1936     CFLAGS="-O2"
1937   else
1938     CFLAGS=
1939   fi
1940 fi
1941 # Some people use a C++ compiler to compile C.  Since we use `exit',
1942 # in C++ we need to declare it.  In case someone uses the same compiler
1943 # for both compiling C and C++ we need to have the C++ compiler decide
1944 # the declaration of exit, since it's the most demanding environment.
1945 cat >conftest.$ac_ext <<_ACEOF
1946 #ifndef __cplusplus
1947   choke me
1948 #endif
1949 _ACEOF
1950 rm -f conftest.$ac_objext
1951 if { (eval echo "$as_me:1951: \"$ac_compile\"") >&5
1952   (eval $ac_compile) 2>&5
1953   ac_status=$?
1954   echo "$as_me:1954: \$? = $ac_status" >&5
1955   (exit $ac_status); } &&
1956          { ac_try='test -s conftest.$ac_objext'
1957   { (eval echo "$as_me:1957: \"$ac_try\"") >&5
1958   (eval $ac_try) 2>&5
1959   ac_status=$?
1960   echo "$as_me:1960: \$? = $ac_status" >&5
1961   (exit $ac_status); }; }; then
1962   for ac_declaration in \
1963    ''\
1964    '#include <stdlib.h>' \
1965    'extern "C" void std::exit (int) throw (); using std::exit;' \
1966    'extern "C" void std::exit (int); using std::exit;' \
1967    'extern "C" void exit (int) throw ();' \
1968    'extern "C" void exit (int);' \
1969    'void exit (int);'
1970 do
1971   cat >conftest.$ac_ext <<_ACEOF
1972 #line 1972 "configure"
1973 #include "confdefs.h"
1974 #include <stdlib.h>
1975 $ac_declaration
1976 int
1977 main ()
1978 {
1979 exit (42);
1980   ;
1981   return 0;
1982 }
1983 _ACEOF
1984 rm -f conftest.$ac_objext
1985 if { (eval echo "$as_me:1985: \"$ac_compile\"") >&5
1986   (eval $ac_compile) 2>&5
1987   ac_status=$?
1988   echo "$as_me:1988: \$? = $ac_status" >&5
1989   (exit $ac_status); } &&
1990          { ac_try='test -s conftest.$ac_objext'
1991   { (eval echo "$as_me:1991: \"$ac_try\"") >&5
1992   (eval $ac_try) 2>&5
1993   ac_status=$?
1994   echo "$as_me:1994: \$? = $ac_status" >&5
1995   (exit $ac_status); }; }; then
1996   :
1997 else
1998   echo "$as_me: failed program was:" >&5
1999 cat conftest.$ac_ext >&5
2000 continue
2001 fi
2002 rm -f conftest.$ac_objext conftest.$ac_ext
2003   cat >conftest.$ac_ext <<_ACEOF
2004 #line 2004 "configure"
2005 #include "confdefs.h"
2006 $ac_declaration
2007 int
2008 main ()
2009 {
2010 exit (42);
2011   ;
2012   return 0;
2013 }
2014 _ACEOF
2015 rm -f conftest.$ac_objext
2016 if { (eval echo "$as_me:2016: \"$ac_compile\"") >&5
2017   (eval $ac_compile) 2>&5
2018   ac_status=$?
2019   echo "$as_me:2019: \$? = $ac_status" >&5
2020   (exit $ac_status); } &&
2021          { ac_try='test -s conftest.$ac_objext'
2022   { (eval echo "$as_me:2022: \"$ac_try\"") >&5
2023   (eval $ac_try) 2>&5
2024   ac_status=$?
2025   echo "$as_me:2025: \$? = $ac_status" >&5
2026   (exit $ac_status); }; }; then
2027   break
2028 else
2029   echo "$as_me: failed program was:" >&5
2030 cat conftest.$ac_ext >&5
2031 fi
2032 rm -f conftest.$ac_objext conftest.$ac_ext
2033 done
2034 rm -rf conftest*
2035 if test -n "$ac_declaration"; then
2036   echo '#ifdef __cplusplus' >>confdefs.h
2037   echo $ac_declaration      >>confdefs.h
2038   echo '#endif'             >>confdefs.h
2039 fi
2040
2041 else
2042   echo "$as_me: failed program was:" >&5
2043 cat conftest.$ac_ext >&5
2044 fi
2045 rm -f conftest.$ac_objext conftest.$ac_ext
2046 ac_ext=c
2047 ac_cpp='$CPP $CPPFLAGS'
2048 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2049 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2050 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2051 ac_main_return=return
2052
2053 GCC_VERSION=none
2054 if test "$GCC" = yes ; then
2055         echo "$as_me:2055: checking version of $CC" >&5
2056 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2057         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.].*//'`"
2058         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2059         echo "$as_me:2059: result: $GCC_VERSION" >&5
2060 echo "${ECHO_T}$GCC_VERSION" >&6
2061 fi
2062
2063 echo "$as_me:2063: checking for $CC option to accept ANSI C" >&5
2064 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2065 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2066   echo $ECHO_N "(cached) $ECHO_C" >&6
2067 else
2068   ac_cv_prog_cc_stdc=no
2069 ac_save_CC=$CC
2070 cat >conftest.$ac_ext <<_ACEOF
2071 #line 2071 "configure"
2072 #include "confdefs.h"
2073 #include <stdarg.h>
2074 #include <stdio.h>
2075 #include <sys/types.h>
2076 #include <sys/stat.h>
2077 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2078 struct buf { int x; };
2079 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2080 static char *e (p, i)
2081      char **p;
2082      int i;
2083 {
2084   return p[i];
2085 }
2086 static char *f (char * (*g) (char **, int), char **p, ...)
2087 {
2088   char *s;
2089   va_list v;
2090   va_start (v,p);
2091   s = g (p, va_arg (v,int));
2092   va_end (v);
2093   return s;
2094 }
2095 int test (int i, double x);
2096 struct s1 {int (*f) (int a);};
2097 struct s2 {int (*f) (double a);};
2098 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2099 int argc;
2100 char **argv;
2101 int
2102 main ()
2103 {
2104 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2105   ;
2106   return 0;
2107 }
2108 _ACEOF
2109 # Don't try gcc -ansi; that turns off useful extensions and
2110 # breaks some systems' header files.
2111 # AIX                   -qlanglvl=ansi
2112 # Ultrix and OSF/1      -std1
2113 # HP-UX 10.20 and later -Ae
2114 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2115 # SVR4                  -Xc -D__EXTENSIONS__
2116 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2117 do
2118   CC="$ac_save_CC $ac_arg"
2119   rm -f conftest.$ac_objext
2120 if { (eval echo "$as_me:2120: \"$ac_compile\"") >&5
2121   (eval $ac_compile) 2>&5
2122   ac_status=$?
2123   echo "$as_me:2123: \$? = $ac_status" >&5
2124   (exit $ac_status); } &&
2125          { ac_try='test -s conftest.$ac_objext'
2126   { (eval echo "$as_me:2126: \"$ac_try\"") >&5
2127   (eval $ac_try) 2>&5
2128   ac_status=$?
2129   echo "$as_me:2129: \$? = $ac_status" >&5
2130   (exit $ac_status); }; }; then
2131   ac_cv_prog_cc_stdc=$ac_arg
2132 break
2133 else
2134   echo "$as_me: failed program was:" >&5
2135 cat conftest.$ac_ext >&5
2136 fi
2137 rm -f conftest.$ac_objext
2138 done
2139 rm -f conftest.$ac_ext conftest.$ac_objext
2140 CC=$ac_save_CC
2141
2142 fi
2143
2144 case "x$ac_cv_prog_cc_stdc" in
2145   x|xno)
2146     echo "$as_me:2146: result: none needed" >&5
2147 echo "${ECHO_T}none needed" >&6 ;;
2148   *)
2149     echo "$as_me:2149: result: $ac_cv_prog_cc_stdc" >&5
2150 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2151     CC="$CC $ac_cv_prog_cc_stdc" ;;
2152 esac
2153
2154 # This should have been defined by AC_PROG_CC
2155 : ${CC:=cc}
2156
2157 echo "$as_me:2157: checking \$CC variable" >&5
2158 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2159 case "$CC" in
2160 (*[\ \  ]-[IUD]*)
2161         echo "$as_me:2161: result: broken" >&5
2162 echo "${ECHO_T}broken" >&6
2163         { echo "$as_me:2163: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2164 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2165         # humor him...
2166         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2167         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2168
2169 cf_fix_cppflags=no
2170 cf_new_cflags=
2171 cf_new_cppflags=
2172 cf_new_extra_cppflags=
2173
2174 for cf_add_cflags in $cf_flags
2175 do
2176 case $cf_fix_cppflags in
2177 (no)
2178         case $cf_add_cflags in
2179         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2180                 case $cf_add_cflags in
2181                 (-D*)
2182                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2183
2184                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2185                                 && test -z "${cf_tst_cflags}" \
2186                                 && cf_fix_cppflags=yes
2187
2188                         if test $cf_fix_cppflags = yes ; then
2189                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2190                                 continue
2191                         elif test "${cf_tst_cflags}" = "\"'" ; then
2192                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2193                                 continue
2194                         fi
2195                         ;;
2196                 esac
2197                 case "$CPPFLAGS" in
2198                 (*$cf_add_cflags)
2199                         ;;
2200                 (*)
2201                         case $cf_add_cflags in
2202                         (-D*)
2203                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2204
2205 CPPFLAGS=`echo "$CPPFLAGS" | \
2206         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2207                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2208
2209                                 ;;
2210                         esac
2211                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2212                         ;;
2213                 esac
2214                 ;;
2215         (*)
2216                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2217                 ;;
2218         esac
2219         ;;
2220 (yes)
2221         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2222
2223         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2224
2225         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2226                 && test -z "${cf_tst_cflags}" \
2227                 && cf_fix_cppflags=no
2228         ;;
2229 esac
2230 done
2231
2232 if test -n "$cf_new_cflags" ; then
2233
2234         CFLAGS="$CFLAGS $cf_new_cflags"
2235 fi
2236
2237 if test -n "$cf_new_cppflags" ; then
2238
2239         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2240 fi
2241
2242 if test -n "$cf_new_extra_cppflags" ; then
2243
2244         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2245 fi
2246
2247         ;;
2248 (*)
2249         echo "$as_me:2249: result: ok" >&5
2250 echo "${ECHO_T}ok" >&6
2251         ;;
2252 esac
2253
2254 ac_ext=c
2255 ac_cpp='$CPP $CPPFLAGS'
2256 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2257 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2258 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2259 ac_main_return=return
2260 echo "$as_me:2260: checking how to run the C preprocessor" >&5
2261 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2262 # On Suns, sometimes $CPP names a directory.
2263 if test -n "$CPP" && test -d "$CPP"; then
2264   CPP=
2265 fi
2266 if test -z "$CPP"; then
2267   if test "${ac_cv_prog_CPP+set}" = set; then
2268   echo $ECHO_N "(cached) $ECHO_C" >&6
2269 else
2270       # Double quotes because CPP needs to be expanded
2271     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2272     do
2273       ac_preproc_ok=false
2274 for ac_c_preproc_warn_flag in '' yes
2275 do
2276   # Use a header file that comes with gcc, so configuring glibc
2277   # with a fresh cross-compiler works.
2278   # On the NeXT, cc -E runs the code through the compiler's parser,
2279   # not just through cpp. "Syntax error" is here to catch this case.
2280   cat >conftest.$ac_ext <<_ACEOF
2281 #line 2281 "configure"
2282 #include "confdefs.h"
2283 #include <assert.h>
2284                      Syntax error
2285 _ACEOF
2286 if { (eval echo "$as_me:2286: \"$ac_cpp conftest.$ac_ext\"") >&5
2287   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2288   ac_status=$?
2289   egrep -v '^ *\+' conftest.er1 >conftest.err
2290   rm -f conftest.er1
2291   cat conftest.err >&5
2292   echo "$as_me:2292: \$? = $ac_status" >&5
2293   (exit $ac_status); } >/dev/null; then
2294   if test -s conftest.err; then
2295     ac_cpp_err=$ac_c_preproc_warn_flag
2296   else
2297     ac_cpp_err=
2298   fi
2299 else
2300   ac_cpp_err=yes
2301 fi
2302 if test -z "$ac_cpp_err"; then
2303   :
2304 else
2305   echo "$as_me: failed program was:" >&5
2306   cat conftest.$ac_ext >&5
2307   # Broken: fails on valid input.
2308 continue
2309 fi
2310 rm -f conftest.err conftest.$ac_ext
2311
2312   # OK, works on sane cases.  Now check whether non-existent headers
2313   # can be detected and how.
2314   cat >conftest.$ac_ext <<_ACEOF
2315 #line 2315 "configure"
2316 #include "confdefs.h"
2317 #include <ac_nonexistent.h>
2318 _ACEOF
2319 if { (eval echo "$as_me:2319: \"$ac_cpp conftest.$ac_ext\"") >&5
2320   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2321   ac_status=$?
2322   egrep -v '^ *\+' conftest.er1 >conftest.err
2323   rm -f conftest.er1
2324   cat conftest.err >&5
2325   echo "$as_me:2325: \$? = $ac_status" >&5
2326   (exit $ac_status); } >/dev/null; then
2327   if test -s conftest.err; then
2328     ac_cpp_err=$ac_c_preproc_warn_flag
2329   else
2330     ac_cpp_err=
2331   fi
2332 else
2333   ac_cpp_err=yes
2334 fi
2335 if test -z "$ac_cpp_err"; then
2336   # Broken: success on invalid input.
2337 continue
2338 else
2339   echo "$as_me: failed program was:" >&5
2340   cat conftest.$ac_ext >&5
2341   # Passes both tests.
2342 ac_preproc_ok=:
2343 break
2344 fi
2345 rm -f conftest.err conftest.$ac_ext
2346
2347 done
2348 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2349 rm -f conftest.err conftest.$ac_ext
2350 if $ac_preproc_ok; then
2351   break
2352 fi
2353
2354     done
2355     ac_cv_prog_CPP=$CPP
2356
2357 fi
2358   CPP=$ac_cv_prog_CPP
2359 else
2360   ac_cv_prog_CPP=$CPP
2361 fi
2362 echo "$as_me:2362: result: $CPP" >&5
2363 echo "${ECHO_T}$CPP" >&6
2364 ac_preproc_ok=false
2365 for ac_c_preproc_warn_flag in '' yes
2366 do
2367   # Use a header file that comes with gcc, so configuring glibc
2368   # with a fresh cross-compiler works.
2369   # On the NeXT, cc -E runs the code through the compiler's parser,
2370   # not just through cpp. "Syntax error" is here to catch this case.
2371   cat >conftest.$ac_ext <<_ACEOF
2372 #line 2372 "configure"
2373 #include "confdefs.h"
2374 #include <assert.h>
2375                      Syntax error
2376 _ACEOF
2377 if { (eval echo "$as_me:2377: \"$ac_cpp conftest.$ac_ext\"") >&5
2378   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2379   ac_status=$?
2380   egrep -v '^ *\+' conftest.er1 >conftest.err
2381   rm -f conftest.er1
2382   cat conftest.err >&5
2383   echo "$as_me:2383: \$? = $ac_status" >&5
2384   (exit $ac_status); } >/dev/null; then
2385   if test -s conftest.err; then
2386     ac_cpp_err=$ac_c_preproc_warn_flag
2387   else
2388     ac_cpp_err=
2389   fi
2390 else
2391   ac_cpp_err=yes
2392 fi
2393 if test -z "$ac_cpp_err"; then
2394   :
2395 else
2396   echo "$as_me: failed program was:" >&5
2397   cat conftest.$ac_ext >&5
2398   # Broken: fails on valid input.
2399 continue
2400 fi
2401 rm -f conftest.err conftest.$ac_ext
2402
2403   # OK, works on sane cases.  Now check whether non-existent headers
2404   # can be detected and how.
2405   cat >conftest.$ac_ext <<_ACEOF
2406 #line 2406 "configure"
2407 #include "confdefs.h"
2408 #include <ac_nonexistent.h>
2409 _ACEOF
2410 if { (eval echo "$as_me:2410: \"$ac_cpp conftest.$ac_ext\"") >&5
2411   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2412   ac_status=$?
2413   egrep -v '^ *\+' conftest.er1 >conftest.err
2414   rm -f conftest.er1
2415   cat conftest.err >&5
2416   echo "$as_me:2416: \$? = $ac_status" >&5
2417   (exit $ac_status); } >/dev/null; then
2418   if test -s conftest.err; then
2419     ac_cpp_err=$ac_c_preproc_warn_flag
2420   else
2421     ac_cpp_err=
2422   fi
2423 else
2424   ac_cpp_err=yes
2425 fi
2426 if test -z "$ac_cpp_err"; then
2427   # Broken: success on invalid input.
2428 continue
2429 else
2430   echo "$as_me: failed program was:" >&5
2431   cat conftest.$ac_ext >&5
2432   # Passes both tests.
2433 ac_preproc_ok=:
2434 break
2435 fi
2436 rm -f conftest.err conftest.$ac_ext
2437
2438 done
2439 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2440 rm -f conftest.err conftest.$ac_ext
2441 if $ac_preproc_ok; then
2442   :
2443 else
2444   { { echo "$as_me:2444: error: C preprocessor \"$CPP\" fails sanity check" >&5
2445 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2446    { (exit 1); exit 1; }; }
2447 fi
2448
2449 ac_ext=c
2450 ac_cpp='$CPP $CPPFLAGS'
2451 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2452 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2453 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2454 ac_main_return=return
2455
2456 if test $ac_cv_c_compiler_gnu = yes; then
2457     echo "$as_me:2457: checking whether $CC needs -traditional" >&5
2458 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2459 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2460   echo $ECHO_N "(cached) $ECHO_C" >&6
2461 else
2462     ac_pattern="Autoconf.*'x'"
2463   cat >conftest.$ac_ext <<_ACEOF
2464 #line 2464 "configure"
2465 #include "confdefs.h"
2466 #include <sgtty.h>
2467 int Autoconf = TIOCGETP;
2468 _ACEOF
2469 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2470   egrep "$ac_pattern" >/dev/null 2>&1; then
2471   ac_cv_prog_gcc_traditional=yes
2472 else
2473   ac_cv_prog_gcc_traditional=no
2474 fi
2475 rm -rf conftest*
2476
2477   if test $ac_cv_prog_gcc_traditional = no; then
2478     cat >conftest.$ac_ext <<_ACEOF
2479 #line 2479 "configure"
2480 #include "confdefs.h"
2481 #include <termio.h>
2482 int Autoconf = TCGETA;
2483 _ACEOF
2484 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2485   egrep "$ac_pattern" >/dev/null 2>&1; then
2486   ac_cv_prog_gcc_traditional=yes
2487 fi
2488 rm -rf conftest*
2489
2490   fi
2491 fi
2492 echo "$as_me:2492: result: $ac_cv_prog_gcc_traditional" >&5
2493 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2494   if test $ac_cv_prog_gcc_traditional = yes; then
2495     CC="$CC -traditional"
2496   fi
2497 fi
2498
2499 echo "$as_me:2499: checking whether $CC understands -c and -o together" >&5
2500 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2501 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2502   echo $ECHO_N "(cached) $ECHO_C" >&6
2503 else
2504
2505 cat > conftest.$ac_ext <<CF_EOF
2506 #include <stdio.h>
2507 int main()
2508 {
2509         ${cf_cv_main_return:-return}(0);
2510 }
2511 CF_EOF
2512 # We do the test twice because some compilers refuse to overwrite an
2513 # existing .o file with -o, though they will create one.
2514 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2515 if { (eval echo "$as_me:2515: \"$ac_try\"") >&5
2516   (eval $ac_try) 2>&5
2517   ac_status=$?
2518   echo "$as_me:2518: \$? = $ac_status" >&5
2519   (exit $ac_status); } &&
2520   test -f conftest2.$ac_objext && { (eval echo "$as_me:2520: \"$ac_try\"") >&5
2521   (eval $ac_try) 2>&5
2522   ac_status=$?
2523   echo "$as_me:2523: \$? = $ac_status" >&5
2524   (exit $ac_status); };
2525 then
2526   eval cf_cv_prog_CC_c_o=yes
2527 else
2528   eval cf_cv_prog_CC_c_o=no
2529 fi
2530 rm -rf conftest*
2531
2532 fi
2533 if test $cf_cv_prog_CC_c_o = yes; then
2534   echo "$as_me:2534: result: yes" >&5
2535 echo "${ECHO_T}yes" >&6
2536 else
2537   echo "$as_me:2537: result: no" >&5
2538 echo "${ECHO_T}no" >&6
2539 fi
2540
2541 if test "$cross_compiling" = yes ; then
2542         LDCONFIG=:
2543 else
2544         case "$cf_cv_system_name" in
2545         (dragonfly*|mirbsd*|freebsd*)
2546                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2547                 ;;
2548         (*) LDPATH=$PATH:/sbin:/usr/sbin
2549                 # Extract the first word of "ldconfig", so it can be a program name with args.
2550 set dummy ldconfig; ac_word=$2
2551 echo "$as_me:2551: checking for $ac_word" >&5
2552 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2553 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2554   echo $ECHO_N "(cached) $ECHO_C" >&6
2555 else
2556   case $LDCONFIG in
2557   [\\/]* | ?:[\\/]*)
2558   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2559   ;;
2560   *)
2561   ac_save_IFS=$IFS; IFS=$ac_path_separator
2562 ac_dummy="$LDPATH"
2563 for ac_dir in $ac_dummy; do
2564   IFS=$ac_save_IFS
2565   test -z "$ac_dir" && ac_dir=.
2566   if $as_executable_p "$ac_dir/$ac_word"; then
2567    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2568    echo "$as_me:2568: found $ac_dir/$ac_word" >&5
2569    break
2570 fi
2571 done
2572
2573   ;;
2574 esac
2575 fi
2576 LDCONFIG=$ac_cv_path_LDCONFIG
2577
2578 if test -n "$LDCONFIG"; then
2579   echo "$as_me:2579: result: $LDCONFIG" >&5
2580 echo "${ECHO_T}$LDCONFIG" >&6
2581 else
2582   echo "$as_me:2582: result: no" >&5
2583 echo "${ECHO_T}no" >&6
2584 fi
2585
2586                 ;;
2587         esac
2588 fi
2589
2590 echo "$as_me:2590: checking if you want to ensure bool is consistent with C++" >&5
2591 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2592
2593 # Check whether --with-cxx or --without-cxx was given.
2594 if test "${with_cxx+set}" = set; then
2595   withval="$with_cxx"
2596   cf_with_cxx=$withval
2597 else
2598   cf_with_cxx=yes
2599 fi;
2600 echo "$as_me:2600: result: $cf_with_cxx" >&5
2601 echo "${ECHO_T}$cf_with_cxx" >&6
2602 if test "X$cf_with_cxx" = Xno ; then
2603         CXX=""
2604         GXX=""
2605 else
2606         # with autoconf 2.13, we can change the error to a warning:
2607                 ac_ext=cc
2608 ac_cpp='$CXXCPP $CPPFLAGS'
2609 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2610 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2611 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2612 ac_main_return=return
2613 if test -n "$ac_tool_prefix"; then
2614   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2615   do
2616     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2617 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2618 echo "$as_me:2618: checking for $ac_word" >&5
2619 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2620 if test "${ac_cv_prog_CXX+set}" = set; then
2621   echo $ECHO_N "(cached) $ECHO_C" >&6
2622 else
2623   if test -n "$CXX"; then
2624   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2625 else
2626   ac_save_IFS=$IFS; IFS=$ac_path_separator
2627 ac_dummy="$PATH"
2628 for ac_dir in $ac_dummy; do
2629   IFS=$ac_save_IFS
2630   test -z "$ac_dir" && ac_dir=.
2631   $as_executable_p "$ac_dir/$ac_word" || continue
2632 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2633 echo "$as_me:2633: found $ac_dir/$ac_word" >&5
2634 break
2635 done
2636
2637 fi
2638 fi
2639 CXX=$ac_cv_prog_CXX
2640 if test -n "$CXX"; then
2641   echo "$as_me:2641: result: $CXX" >&5
2642 echo "${ECHO_T}$CXX" >&6
2643 else
2644   echo "$as_me:2644: result: no" >&5
2645 echo "${ECHO_T}no" >&6
2646 fi
2647
2648     test -n "$CXX" && break
2649   done
2650 fi
2651 if test -z "$CXX"; then
2652   ac_ct_CXX=$CXX
2653   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2654 do
2655   # Extract the first word of "$ac_prog", so it can be a program name with args.
2656 set dummy $ac_prog; ac_word=$2
2657 echo "$as_me:2657: checking for $ac_word" >&5
2658 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2659 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2660   echo $ECHO_N "(cached) $ECHO_C" >&6
2661 else
2662   if test -n "$ac_ct_CXX"; then
2663   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2664 else
2665   ac_save_IFS=$IFS; IFS=$ac_path_separator
2666 ac_dummy="$PATH"
2667 for ac_dir in $ac_dummy; do
2668   IFS=$ac_save_IFS
2669   test -z "$ac_dir" && ac_dir=.
2670   $as_executable_p "$ac_dir/$ac_word" || continue
2671 ac_cv_prog_ac_ct_CXX="$ac_prog"
2672 echo "$as_me:2672: found $ac_dir/$ac_word" >&5
2673 break
2674 done
2675
2676 fi
2677 fi
2678 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2679 if test -n "$ac_ct_CXX"; then
2680   echo "$as_me:2680: result: $ac_ct_CXX" >&5
2681 echo "${ECHO_T}$ac_ct_CXX" >&6
2682 else
2683   echo "$as_me:2683: result: no" >&5
2684 echo "${ECHO_T}no" >&6
2685 fi
2686
2687   test -n "$ac_ct_CXX" && break
2688 done
2689 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2690
2691   CXX=$ac_ct_CXX
2692 fi
2693
2694 # Provide some information about the compiler.
2695 echo "$as_me:2695:" \
2696      "checking for C++ compiler version" >&5
2697 ac_compiler=`set X $ac_compile; echo $2`
2698 { (eval echo "$as_me:2698: \"$ac_compiler --version </dev/null >&5\"") >&5
2699   (eval $ac_compiler --version </dev/null >&5) 2>&5
2700   ac_status=$?
2701   echo "$as_me:2701: \$? = $ac_status" >&5
2702   (exit $ac_status); }
2703 { (eval echo "$as_me:2703: \"$ac_compiler -v </dev/null >&5\"") >&5
2704   (eval $ac_compiler -v </dev/null >&5) 2>&5
2705   ac_status=$?
2706   echo "$as_me:2706: \$? = $ac_status" >&5
2707   (exit $ac_status); }
2708 { (eval echo "$as_me:2708: \"$ac_compiler -V </dev/null >&5\"") >&5
2709   (eval $ac_compiler -V </dev/null >&5) 2>&5
2710   ac_status=$?
2711   echo "$as_me:2711: \$? = $ac_status" >&5
2712   (exit $ac_status); }
2713
2714 echo "$as_me:2714: checking whether we are using the GNU C++ compiler" >&5
2715 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2716 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2717   echo $ECHO_N "(cached) $ECHO_C" >&6
2718 else
2719   cat >conftest.$ac_ext <<_ACEOF
2720 #line 2720 "configure"
2721 #include "confdefs.h"
2722
2723 int
2724 main ()
2725 {
2726 #ifndef __GNUC__
2727        choke me
2728 #endif
2729
2730   ;
2731   return 0;
2732 }
2733 _ACEOF
2734 rm -f conftest.$ac_objext
2735 if { (eval echo "$as_me:2735: \"$ac_compile\"") >&5
2736   (eval $ac_compile) 2>&5
2737   ac_status=$?
2738   echo "$as_me:2738: \$? = $ac_status" >&5
2739   (exit $ac_status); } &&
2740          { ac_try='test -s conftest.$ac_objext'
2741   { (eval echo "$as_me:2741: \"$ac_try\"") >&5
2742   (eval $ac_try) 2>&5
2743   ac_status=$?
2744   echo "$as_me:2744: \$? = $ac_status" >&5
2745   (exit $ac_status); }; }; then
2746   ac_compiler_gnu=yes
2747 else
2748   echo "$as_me: failed program was:" >&5
2749 cat conftest.$ac_ext >&5
2750 ac_compiler_gnu=no
2751 fi
2752 rm -f conftest.$ac_objext conftest.$ac_ext
2753 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2754
2755 fi
2756 echo "$as_me:2756: result: $ac_cv_cxx_compiler_gnu" >&5
2757 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2758 GXX=`test $ac_compiler_gnu = yes && echo yes`
2759 ac_test_CXXFLAGS=${CXXFLAGS+set}
2760 ac_save_CXXFLAGS=$CXXFLAGS
2761 CXXFLAGS="-g"
2762 echo "$as_me:2762: checking whether $CXX accepts -g" >&5
2763 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2764 if test "${ac_cv_prog_cxx_g+set}" = set; then
2765   echo $ECHO_N "(cached) $ECHO_C" >&6
2766 else
2767   cat >conftest.$ac_ext <<_ACEOF
2768 #line 2768 "configure"
2769 #include "confdefs.h"
2770
2771 int
2772 main ()
2773 {
2774
2775   ;
2776   return 0;
2777 }
2778 _ACEOF
2779 rm -f conftest.$ac_objext
2780 if { (eval echo "$as_me:2780: \"$ac_compile\"") >&5
2781   (eval $ac_compile) 2>&5
2782   ac_status=$?
2783   echo "$as_me:2783: \$? = $ac_status" >&5
2784   (exit $ac_status); } &&
2785          { ac_try='test -s conftest.$ac_objext'
2786   { (eval echo "$as_me:2786: \"$ac_try\"") >&5
2787   (eval $ac_try) 2>&5
2788   ac_status=$?
2789   echo "$as_me:2789: \$? = $ac_status" >&5
2790   (exit $ac_status); }; }; then
2791   ac_cv_prog_cxx_g=yes
2792 else
2793   echo "$as_me: failed program was:" >&5
2794 cat conftest.$ac_ext >&5
2795 ac_cv_prog_cxx_g=no
2796 fi
2797 rm -f conftest.$ac_objext conftest.$ac_ext
2798 fi
2799 echo "$as_me:2799: result: $ac_cv_prog_cxx_g" >&5
2800 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2801 if test "$ac_test_CXXFLAGS" = set; then
2802   CXXFLAGS=$ac_save_CXXFLAGS
2803 elif test $ac_cv_prog_cxx_g = yes; then
2804   if test "$GXX" = yes; then
2805     CXXFLAGS="-g -O2"
2806   else
2807     CXXFLAGS="-g"
2808   fi
2809 else
2810   if test "$GXX" = yes; then
2811     CXXFLAGS="-O2"
2812   else
2813     CXXFLAGS=
2814   fi
2815 fi
2816 for ac_declaration in \
2817    ''\
2818    '#include <stdlib.h>' \
2819    'extern "C" void std::exit (int) throw (); using std::exit;' \
2820    'extern "C" void std::exit (int); using std::exit;' \
2821    'extern "C" void exit (int) throw ();' \
2822    'extern "C" void exit (int);' \
2823    'void exit (int);'
2824 do
2825   cat >conftest.$ac_ext <<_ACEOF
2826 #line 2826 "configure"
2827 #include "confdefs.h"
2828 #include <stdlib.h>
2829 $ac_declaration
2830 int
2831 main ()
2832 {
2833 exit (42);
2834   ;
2835   return 0;
2836 }
2837 _ACEOF
2838 rm -f conftest.$ac_objext
2839 if { (eval echo "$as_me:2839: \"$ac_compile\"") >&5
2840   (eval $ac_compile) 2>&5
2841   ac_status=$?
2842   echo "$as_me:2842: \$? = $ac_status" >&5
2843   (exit $ac_status); } &&
2844          { ac_try='test -s conftest.$ac_objext'
2845   { (eval echo "$as_me:2845: \"$ac_try\"") >&5
2846   (eval $ac_try) 2>&5
2847   ac_status=$?
2848   echo "$as_me:2848: \$? = $ac_status" >&5
2849   (exit $ac_status); }; }; then
2850   :
2851 else
2852   echo "$as_me: failed program was:" >&5
2853 cat conftest.$ac_ext >&5
2854 continue
2855 fi
2856 rm -f conftest.$ac_objext conftest.$ac_ext
2857   cat >conftest.$ac_ext <<_ACEOF
2858 #line 2858 "configure"
2859 #include "confdefs.h"
2860 $ac_declaration
2861 int
2862 main ()
2863 {
2864 exit (42);
2865   ;
2866   return 0;
2867 }
2868 _ACEOF
2869 rm -f conftest.$ac_objext
2870 if { (eval echo "$as_me:2870: \"$ac_compile\"") >&5
2871   (eval $ac_compile) 2>&5
2872   ac_status=$?
2873   echo "$as_me:2873: \$? = $ac_status" >&5
2874   (exit $ac_status); } &&
2875          { ac_try='test -s conftest.$ac_objext'
2876   { (eval echo "$as_me:2876: \"$ac_try\"") >&5
2877   (eval $ac_try) 2>&5
2878   ac_status=$?
2879   echo "$as_me:2879: \$? = $ac_status" >&5
2880   (exit $ac_status); }; }; then
2881   break
2882 else
2883   echo "$as_me: failed program was:" >&5
2884 cat conftest.$ac_ext >&5
2885 fi
2886 rm -f conftest.$ac_objext conftest.$ac_ext
2887 done
2888 rm -rf conftest*
2889 if test -n "$ac_declaration"; then
2890   echo '#ifdef __cplusplus' >>confdefs.h
2891   echo $ac_declaration      >>confdefs.h
2892   echo '#endif'             >>confdefs.h
2893 fi
2894
2895 ac_ext=c
2896 ac_cpp='$CPP $CPPFLAGS'
2897 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2898 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2899 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2900 ac_main_return=return
2901
2902         ac_ext=cc
2903 ac_cpp='$CXXCPP $CPPFLAGS'
2904 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2905 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2906 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2907 ac_main_return=return
2908
2909         if test "x$cf_with_cxx" != xno
2910         then
2911                 # Several of the C++ configurations do not work, particularly when
2912                 # cross-compiling (20140913 -TD)
2913                 echo "$as_me:2913: checking if $CXX works" >&5
2914 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2915
2916                 save_CPPFLAGS="$CPPFLAGS"
2917                 eval cf_includedir=${includedir}
2918                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2919
2920 cat >conftest.$ac_ext <<_ACEOF
2921 #line 2921 "configure"
2922 #include "confdefs.h"
2923
2924 #include <stdlib.h>
2925 #include <stdio.h>
2926
2927 int
2928 main ()
2929 {
2930
2931                 printf("Hello world!\n")
2932
2933   ;
2934   return 0;
2935 }
2936 _ACEOF
2937 rm -f conftest.$ac_objext
2938 if { (eval echo "$as_me:2938: \"$ac_compile\"") >&5
2939   (eval $ac_compile) 2>&5
2940   ac_status=$?
2941   echo "$as_me:2941: \$? = $ac_status" >&5
2942   (exit $ac_status); } &&
2943          { ac_try='test -s conftest.$ac_objext'
2944   { (eval echo "$as_me:2944: \"$ac_try\"") >&5
2945   (eval $ac_try) 2>&5
2946   ac_status=$?
2947   echo "$as_me:2947: \$? = $ac_status" >&5
2948   (exit $ac_status); }; }; then
2949   cf_cxx_works=yes
2950 else
2951   echo "$as_me: failed program was:" >&5
2952 cat conftest.$ac_ext >&5
2953 cf_cxx_works=no
2954 fi
2955 rm -f conftest.$ac_objext conftest.$ac_ext
2956                 CPPFLAGS="$save_CPPFLAGS"
2957
2958                 echo "$as_me:2958: result: $cf_cxx_works" >&5
2959 echo "${ECHO_T}$cf_cxx_works" >&6
2960                 if test "x$cf_cxx_works" = xno
2961                 then
2962                         { echo "$as_me:2962: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
2963 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
2964                         cf_with_cxx=no; CXX=""; GXX="";
2965                 fi
2966         fi
2967         ac_ext=c
2968 ac_cpp='$CPP $CPPFLAGS'
2969 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2970 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2971 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2972 ac_main_return=return
2973
2974         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2975         if test "$CXX" = "g++" ; then
2976                 # Extract the first word of "g++", so it can be a program name with args.
2977 set dummy g++; ac_word=$2
2978 echo "$as_me:2978: checking for $ac_word" >&5
2979 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2980 if test "${ac_cv_path_CXX+set}" = set; then
2981   echo $ECHO_N "(cached) $ECHO_C" >&6
2982 else
2983   case $CXX in
2984   [\\/]* | ?:[\\/]*)
2985   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2986   ;;
2987   *)
2988   ac_save_IFS=$IFS; IFS=$ac_path_separator
2989 ac_dummy="$PATH"
2990 for ac_dir in $ac_dummy; do
2991   IFS=$ac_save_IFS
2992   test -z "$ac_dir" && ac_dir=.
2993   if $as_executable_p "$ac_dir/$ac_word"; then
2994    ac_cv_path_CXX="$ac_dir/$ac_word"
2995    echo "$as_me:2995: found $ac_dir/$ac_word" >&5
2996    break
2997 fi
2998 done
2999
3000   ;;
3001 esac
3002 fi
3003 CXX=$ac_cv_path_CXX
3004
3005 if test -n "$CXX"; then
3006   echo "$as_me:3006: result: $CXX" >&5
3007 echo "${ECHO_T}$CXX" >&6
3008 else
3009   echo "$as_me:3009: result: no" >&5
3010 echo "${ECHO_T}no" >&6
3011 fi
3012
3013         fi
3014         case "x$CXX" in
3015         (x|xg++)
3016                 { echo "$as_me:3016: WARNING: You don't have any C++ compiler, too bad" >&5
3017 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3018                 cf_with_cxx=no; CXX=""; GXX="";
3019                 ;;
3020         esac
3021 fi
3022
3023 GXX_VERSION=none
3024 if test "$GXX" = yes; then
3025         echo "$as_me:3025: checking version of ${CXX:-g++}" >&5
3026 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3027         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3028         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3029         echo "$as_me:3029: result: $GXX_VERSION" >&5
3030 echo "${ECHO_T}$GXX_VERSION" >&6
3031 fi
3032
3033 case $GXX_VERSION in
3034 (1*|2.[0-6]*)
3035         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3036         # cf_cxx_library=no
3037         { echo "$as_me:3037: WARNING: templates do not work" >&5
3038 echo "$as_me: WARNING: templates do not work" >&2;}
3039         ;;
3040 esac
3041
3042 echo "$as_me:3042: checking if you want to build C++ binding and demo" >&5
3043 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3044
3045 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3046 if test "${with_cxx_binding+set}" = set; then
3047   withval="$with_cxx_binding"
3048   cf_with_cxx_binding=$withval
3049 else
3050   cf_with_cxx_binding=$cf_with_cxx
3051 fi;
3052 echo "$as_me:3052: result: $cf_with_cxx_binding" >&5
3053 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3054
3055 echo "$as_me:3055: checking if you want to build with Ada95" >&5
3056 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3057 echo "$as_me:3057: result: $cf_with_ada" >&5
3058 echo "${ECHO_T}$cf_with_ada" >&6
3059
3060 echo "$as_me:3060: checking if you want to install terminal database" >&5
3061 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3062
3063 # Check whether --enable-db-install or --disable-db-install was given.
3064 if test "${enable_db_install+set}" = set; then
3065   enableval="$enable_db_install"
3066   cf_with_db_install=$enableval
3067 else
3068   cf_with_db_install=yes
3069 fi;
3070 echo "$as_me:3070: result: $cf_with_db_install" >&5
3071 echo "${ECHO_T}$cf_with_db_install" >&6
3072
3073 echo "$as_me:3073: checking if you want to install manpages" >&5
3074 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3075
3076 # Check whether --with-manpages or --without-manpages was given.
3077 if test "${with_manpages+set}" = set; then
3078   withval="$with_manpages"
3079   cf_with_manpages=$withval
3080 else
3081   cf_with_manpages=yes
3082 fi;
3083 echo "$as_me:3083: result: $cf_with_manpages" >&5
3084 echo "${ECHO_T}$cf_with_manpages" >&6
3085
3086 echo "$as_me:3086: checking if you want to build programs such as tic" >&5
3087 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3088
3089 # Check whether --with-progs or --without-progs was given.
3090 if test "${with_progs+set}" = set; then
3091   withval="$with_progs"
3092   cf_with_progs=$withval
3093 else
3094   cf_with_progs=yes
3095 fi;
3096 echo "$as_me:3096: result: $cf_with_progs" >&5
3097 echo "${ECHO_T}$cf_with_progs" >&6
3098
3099 echo "$as_me:3099: checking if you want to build test-programs" >&5
3100 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3101
3102 # Check whether --with-tests or --without-tests was given.
3103 if test "${with_tests+set}" = set; then
3104   withval="$with_tests"
3105   cf_with_tests=$withval
3106 else
3107   cf_with_tests=yes
3108 fi;
3109 echo "$as_me:3109: result: $cf_with_tests" >&5
3110 echo "${ECHO_T}$cf_with_tests" >&6
3111
3112 echo "$as_me:3112: checking if you wish to install curses.h" >&5
3113 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3114
3115 # Check whether --with-curses-h or --without-curses-h was given.
3116 if test "${with_curses_h+set}" = set; then
3117   withval="$with_curses_h"
3118   with_curses_h=$withval
3119 else
3120   with_curses_h=yes
3121 fi;
3122 echo "$as_me:3122: result: $with_curses_h" >&5
3123 echo "${ECHO_T}$with_curses_h" >&6
3124
3125 modules_to_build="ncurses"
3126 if test "X$cf_with_progs" != Xno ; then
3127 modules_to_build="$modules_to_build progs tack"
3128 fi
3129 modules_to_build="$modules_to_build panel menu form"
3130
3131 test "$program_prefix" != NONE &&
3132   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3133 # Use a double $ so make ignores it.
3134 test "$program_suffix" != NONE &&
3135   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3136 # Double any \ or $.  echo might interpret backslashes.
3137 # By default was `s,x,x', remove it if useless.
3138 cat <<\_ACEOF >conftest.sed
3139 s/[\\$]/&&/g;s/;s,x,x,$//
3140 _ACEOF
3141 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3142 rm conftest.sed
3143
3144 for ac_prog in mawk gawk nawk awk
3145 do
3146   # Extract the first word of "$ac_prog", so it can be a program name with args.
3147 set dummy $ac_prog; ac_word=$2
3148 echo "$as_me:3148: checking for $ac_word" >&5
3149 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3150 if test "${ac_cv_prog_AWK+set}" = set; then
3151   echo $ECHO_N "(cached) $ECHO_C" >&6
3152 else
3153   if test -n "$AWK"; then
3154   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3155 else
3156   ac_save_IFS=$IFS; IFS=$ac_path_separator
3157 ac_dummy="$PATH"
3158 for ac_dir in $ac_dummy; do
3159   IFS=$ac_save_IFS
3160   test -z "$ac_dir" && ac_dir=.
3161   $as_executable_p "$ac_dir/$ac_word" || continue
3162 ac_cv_prog_AWK="$ac_prog"
3163 echo "$as_me:3163: found $ac_dir/$ac_word" >&5
3164 break
3165 done
3166
3167 fi
3168 fi
3169 AWK=$ac_cv_prog_AWK
3170 if test -n "$AWK"; then
3171   echo "$as_me:3171: result: $AWK" >&5
3172 echo "${ECHO_T}$AWK" >&6
3173 else
3174   echo "$as_me:3174: result: no" >&5
3175 echo "${ECHO_T}no" >&6
3176 fi
3177
3178   test -n "$AWK" && break
3179 done
3180
3181 test -z "$AWK" && { { echo "$as_me:3181: error: No awk program found" >&5
3182 echo "$as_me: error: No awk program found" >&2;}
3183    { (exit 1); exit 1; }; }
3184
3185 echo "$as_me:3185: checking for egrep" >&5
3186 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3187 if test "${ac_cv_prog_egrep+set}" = set; then
3188   echo $ECHO_N "(cached) $ECHO_C" >&6
3189 else
3190   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3191                 then ac_cv_prog_egrep='grep -E'
3192                 else ac_cv_prog_egrep='egrep'
3193         fi
3194 fi
3195 echo "$as_me:3195: result: $ac_cv_prog_egrep" >&5
3196 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3197         EGREP=$ac_cv_prog_egrep
3198
3199         test -z "$EGREP" && { { echo "$as_me:3199: error: No egrep program found" >&5
3200 echo "$as_me: error: No egrep program found" >&2;}
3201    { (exit 1); exit 1; }; }
3202
3203 # Find a good install program.  We prefer a C program (faster),
3204 # so one script is as good as another.  But avoid the broken or
3205 # incompatible versions:
3206 # SysV /etc/install, /usr/sbin/install
3207 # SunOS /usr/etc/install
3208 # IRIX /sbin/install
3209 # AIX /bin/install
3210 # AmigaOS /C/install, which installs bootblocks on floppy discs
3211 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3212 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3213 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3214 # ./install, which can be erroneously created by make from ./install.sh.
3215 echo "$as_me:3215: checking for a BSD compatible install" >&5
3216 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3217 if test -z "$INSTALL"; then
3218 if test "${ac_cv_path_install+set}" = set; then
3219   echo $ECHO_N "(cached) $ECHO_C" >&6
3220 else
3221     ac_save_IFS=$IFS; IFS=$ac_path_separator
3222   for ac_dir in $PATH; do
3223     IFS=$ac_save_IFS
3224     # Account for people who put trailing slashes in PATH elements.
3225     case $ac_dir/ in
3226     / | ./ | .// | /cC/* \
3227     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3228     | /usr/ucb/* ) ;;
3229     *)
3230       # OSF1 and SCO ODT 3.0 have their own names for install.
3231       # Don't use installbsd from OSF since it installs stuff as root
3232       # by default.
3233       for ac_prog in ginstall scoinst install; do
3234         if $as_executable_p "$ac_dir/$ac_prog"; then
3235           if test $ac_prog = install &&
3236             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3237             # AIX install.  It has an incompatible calling convention.
3238             :
3239           elif test $ac_prog = install &&
3240             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3241             # program-specific install script used by HP pwplus--don't use.
3242             :
3243           else
3244             ac_cv_path_install="$ac_dir/$ac_prog -c"
3245             break 2
3246           fi
3247         fi
3248       done
3249       ;;
3250     esac
3251   done
3252
3253 fi
3254   if test "${ac_cv_path_install+set}" = set; then
3255     INSTALL=$ac_cv_path_install
3256   else
3257     # As a last resort, use the slow shell script.  We don't cache a
3258     # path for INSTALL within a source directory, because that will
3259     # break other packages using the cache if that directory is
3260     # removed, or if the path is relative.
3261     INSTALL=$ac_install_sh
3262   fi
3263 fi
3264 echo "$as_me:3264: result: $INSTALL" >&5
3265 echo "${ECHO_T}$INSTALL" >&6
3266
3267 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3268 # It thinks the first close brace ends the variable substitution.
3269 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3270
3271 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3272
3273 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3274
3275 case $INSTALL in
3276 (/*)
3277         ;;
3278 (*)
3279         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3280         test -z "$cf_dir" && cf_dir=.
3281         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3282         ;;
3283 esac
3284
3285 for ac_prog in tdlint lint alint splint lclint
3286 do
3287   # Extract the first word of "$ac_prog", so it can be a program name with args.
3288 set dummy $ac_prog; ac_word=$2
3289 echo "$as_me:3289: checking for $ac_word" >&5
3290 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3291 if test "${ac_cv_prog_LINT+set}" = set; then
3292   echo $ECHO_N "(cached) $ECHO_C" >&6
3293 else
3294   if test -n "$LINT"; then
3295   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3296 else
3297   ac_save_IFS=$IFS; IFS=$ac_path_separator
3298 ac_dummy="$PATH"
3299 for ac_dir in $ac_dummy; do
3300   IFS=$ac_save_IFS
3301   test -z "$ac_dir" && ac_dir=.
3302   $as_executable_p "$ac_dir/$ac_word" || continue
3303 ac_cv_prog_LINT="$ac_prog"
3304 echo "$as_me:3304: found $ac_dir/$ac_word" >&5
3305 break
3306 done
3307
3308 fi
3309 fi
3310 LINT=$ac_cv_prog_LINT
3311 if test -n "$LINT"; then
3312   echo "$as_me:3312: result: $LINT" >&5
3313 echo "${ECHO_T}$LINT" >&6
3314 else
3315   echo "$as_me:3315: result: no" >&5
3316 echo "${ECHO_T}no" >&6
3317 fi
3318
3319   test -n "$LINT" && break
3320 done
3321
3322 echo "$as_me:3322: checking whether ln -s works" >&5
3323 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3324 LN_S=$as_ln_s
3325 if test "$LN_S" = "ln -s"; then
3326   echo "$as_me:3326: result: yes" >&5
3327 echo "${ECHO_T}yes" >&6
3328 else
3329   echo "$as_me:3329: result: no, using $LN_S" >&5
3330 echo "${ECHO_T}no, using $LN_S" >&6
3331 fi
3332
3333 echo "$as_me:3333: checking if $LN_S -f options work" >&5
3334 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3335
3336 rm -f conf$$.src conf$$dst
3337 echo >conf$$.dst
3338 echo first >conf$$.src
3339 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3340         cf_prog_ln_sf=yes
3341 else
3342         cf_prog_ln_sf=no
3343 fi
3344 rm -f conf$$.dst conf$$src
3345 echo "$as_me:3345: result: $cf_prog_ln_sf" >&5
3346 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3347
3348 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3349
3350 echo "$as_me:3350: checking for long file names" >&5
3351 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3352 if test "${ac_cv_sys_long_file_names+set}" = set; then
3353   echo $ECHO_N "(cached) $ECHO_C" >&6
3354 else
3355   ac_cv_sys_long_file_names=yes
3356 # Test for long file names in all the places we know might matter:
3357 #      .                the current directory, where building will happen
3358 #      $prefix/lib      where we will be installing things
3359 #      $exec_prefix/lib likewise
3360 # eval it to expand exec_prefix.
3361 #      $TMPDIR          if set, where it might want to write temporary files
3362 # if $TMPDIR is not set:
3363 #      /tmp             where it might want to write temporary files
3364 #      /var/tmp         likewise
3365 #      /usr/tmp         likewise
3366 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3367   ac_tmpdirs=$TMPDIR
3368 else
3369   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3370 fi
3371 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3372   test -d $ac_dir || continue
3373   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3374   ac_xdir=$ac_dir/cf$$
3375   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3376   ac_tf1=$ac_xdir/conftest9012345
3377   ac_tf2=$ac_xdir/conftest9012346
3378   (echo 1 >$ac_tf1) 2>/dev/null
3379   (echo 2 >$ac_tf2) 2>/dev/null
3380   ac_val=`cat $ac_tf1 2>/dev/null`
3381   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3382     ac_cv_sys_long_file_names=no
3383     rm -rf $ac_xdir 2>/dev/null
3384     break
3385   fi
3386   rm -rf $ac_xdir 2>/dev/null
3387 done
3388 fi
3389 echo "$as_me:3389: result: $ac_cv_sys_long_file_names" >&5
3390 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3391 if test $ac_cv_sys_long_file_names = yes; then
3392
3393 cat >>confdefs.h <<\EOF
3394 #define HAVE_LONG_FILE_NAMES 1
3395 EOF
3396
3397 fi
3398
3399 # if we find pkg-config, check if we should install the ".pc" files.
3400
3401 echo "$as_me:3401: checking if you want to use pkg-config" >&5
3402 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3403
3404 # Check whether --with-pkg-config or --without-pkg-config was given.
3405 if test "${with_pkg_config+set}" = set; then
3406   withval="$with_pkg_config"
3407   cf_pkg_config=$withval
3408 else
3409   cf_pkg_config=yes
3410 fi;
3411 echo "$as_me:3411: result: $cf_pkg_config" >&5
3412 echo "${ECHO_T}$cf_pkg_config" >&6
3413
3414 case $cf_pkg_config in
3415 (no)
3416         PKG_CONFIG=none
3417         ;;
3418 (yes)
3419
3420 if test -n "$ac_tool_prefix"; then
3421   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3422 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3423 echo "$as_me:3423: checking for $ac_word" >&5
3424 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3425 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3426   echo $ECHO_N "(cached) $ECHO_C" >&6
3427 else
3428   case $PKG_CONFIG in
3429   [\\/]* | ?:[\\/]*)
3430   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3431   ;;
3432   *)
3433   ac_save_IFS=$IFS; IFS=$ac_path_separator
3434 ac_dummy="$PATH"
3435 for ac_dir in $ac_dummy; do
3436   IFS=$ac_save_IFS
3437   test -z "$ac_dir" && ac_dir=.
3438   if $as_executable_p "$ac_dir/$ac_word"; then
3439    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3440    echo "$as_me:3440: found $ac_dir/$ac_word" >&5
3441    break
3442 fi
3443 done
3444
3445   ;;
3446 esac
3447 fi
3448 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3449
3450 if test -n "$PKG_CONFIG"; then
3451   echo "$as_me:3451: result: $PKG_CONFIG" >&5
3452 echo "${ECHO_T}$PKG_CONFIG" >&6
3453 else
3454   echo "$as_me:3454: result: no" >&5
3455 echo "${ECHO_T}no" >&6
3456 fi
3457
3458 fi
3459 if test -z "$ac_cv_path_PKG_CONFIG"; then
3460   ac_pt_PKG_CONFIG=$PKG_CONFIG
3461   # Extract the first word of "pkg-config", so it can be a program name with args.
3462 set dummy pkg-config; ac_word=$2
3463 echo "$as_me:3463: checking for $ac_word" >&5
3464 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3465 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3466   echo $ECHO_N "(cached) $ECHO_C" >&6
3467 else
3468   case $ac_pt_PKG_CONFIG in
3469   [\\/]* | ?:[\\/]*)
3470   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3471   ;;
3472   *)
3473   ac_save_IFS=$IFS; IFS=$ac_path_separator
3474 ac_dummy="$PATH"
3475 for ac_dir in $ac_dummy; do
3476   IFS=$ac_save_IFS
3477   test -z "$ac_dir" && ac_dir=.
3478   if $as_executable_p "$ac_dir/$ac_word"; then
3479    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3480    echo "$as_me:3480: found $ac_dir/$ac_word" >&5
3481    break
3482 fi
3483 done
3484
3485   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3486   ;;
3487 esac
3488 fi
3489 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3490
3491 if test -n "$ac_pt_PKG_CONFIG"; then
3492   echo "$as_me:3492: result: $ac_pt_PKG_CONFIG" >&5
3493 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3494 else
3495   echo "$as_me:3495: result: no" >&5
3496 echo "${ECHO_T}no" >&6
3497 fi
3498
3499   PKG_CONFIG=$ac_pt_PKG_CONFIG
3500 else
3501   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3502 fi
3503
3504         ;;
3505 (*)
3506         PKG_CONFIG=$withval
3507         ;;
3508 esac
3509
3510 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3511 if test "$PKG_CONFIG" != none ; then
3512
3513 if test "x$prefix" != xNONE; then
3514         cf_path_syntax="$prefix"
3515 else
3516         cf_path_syntax="$ac_default_prefix"
3517 fi
3518
3519 case ".$PKG_CONFIG" in
3520 (.\$\(*\)*|.\'*\'*)
3521         ;;
3522 (..|./*|.\\*)
3523         ;;
3524 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3525         ;;
3526 (.\${*prefix}*|.\${*dir}*)
3527         eval PKG_CONFIG="$PKG_CONFIG"
3528         case ".$PKG_CONFIG" in
3529         (.NONE/*)
3530                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3531                 ;;
3532         esac
3533         ;;
3534 (.no|.NONE/*)
3535         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3536         ;;
3537 (*)
3538         { { echo "$as_me:3538: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3539 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3540    { (exit 1); exit 1; }; }
3541         ;;
3542 esac
3543
3544 elif test "x$cf_pkg_config" != xno ; then
3545         { echo "$as_me:3545: WARNING: pkg-config is not installed" >&5
3546 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3547 fi
3548
3549 echo "$as_me:3549: checking for $PKG_CONFIG library directory" >&5
3550 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3551 if test "x$PKG_CONFIG" = xnone ; then
3552         PKG_CONFIG_LIBDIR=none
3553 else
3554
3555 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3556 if test "${with_pkg_config_libdir+set}" = set; then
3557   withval="$with_pkg_config_libdir"
3558   PKG_CONFIG_LIBDIR=$withval
3559 else
3560   PKG_CONFIG_LIBDIR=yes
3561 fi;
3562 fi
3563
3564 case x$PKG_CONFIG_LIBDIR in
3565 (x/*)
3566         ;;
3567 (xyes)
3568         # Look for the library directory using the same prefix as the executable
3569         if test "x$PKG_CONFIG" = xnone
3570         then
3571                 cf_path=$prefix
3572         else
3573                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3574         fi
3575
3576         # If you don't like using the default architecture, you have to specify the
3577         # intended library directory and corresponding compiler/linker options.
3578         #
3579         # This case allows for Debian's 2014-flavor of multiarch, along with the
3580         # most common variations before that point.  Some other variants spell the
3581         # directory differently, e.g., "pkg-config", and put it in unusual places.
3582         # pkg-config has always been poorly standardized, which is ironic...
3583         case x`(arch) 2>/dev/null` in
3584         (*64)
3585                 cf_search_path="\
3586                         $cf_path/lib/*64-linux-gnu \
3587                         $cf_path/share \
3588                         $cf_path/lib64 \
3589                         $cf_path/lib32 \
3590                         $cf_path/lib"
3591                 ;;
3592         (*)
3593                 cf_search_path="\
3594                         $cf_path/lib/*-linux-gnu \
3595                         $cf_path/share \
3596                         $cf_path/lib32 \
3597                         $cf_path/lib \
3598                         $cf_path/libdata"
3599                 ;;
3600         esac
3601
3602         test -n "$verbose" && echo "    list..." 1>&6
3603
3604 echo "${as_me:-configure}:3604: testing list... ..." 1>&5
3605
3606         for cf_config in $cf_search_path
3607         do
3608                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3609
3610 echo "${as_me:-configure}:3610: testing checking $cf_config/pkgconfig ..." 1>&5
3611
3612                 if test -d $cf_config/pkgconfig
3613                 then
3614                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3615                         echo "$as_me:3615: checking done" >&5
3616 echo $ECHO_N "checking done... $ECHO_C" >&6
3617                         break
3618                 fi
3619         done
3620         ;;
3621 (*)
3622         ;;
3623 esac
3624
3625 if test "x$PKG_CONFIG" != xnone ; then
3626         echo "$as_me:3626: result: $PKG_CONFIG_LIBDIR" >&5
3627 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3628 fi
3629
3630 if test "x$PKG_CONFIG" != xnone
3631 then
3632         echo "$as_me:3632: checking if we should install .pc files for $PKG_CONFIG" >&5
3633 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3634 else
3635         echo "$as_me:3635: checking if we should install .pc files" >&5
3636 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3637 fi
3638
3639 # Check whether --enable-pc-files or --disable-pc-files was given.
3640 if test "${enable_pc_files+set}" = set; then
3641   enableval="$enable_pc_files"
3642   enable_pc_files=$enableval
3643 else
3644   enable_pc_files=no
3645 fi;
3646 echo "$as_me:3646: result: $enable_pc_files" >&5
3647 echo "${ECHO_T}$enable_pc_files" >&6
3648
3649 if test "x$enable_pc_files" != xno
3650 then
3651         case "x$PKG_CONFIG_LIBDIR" in
3652         (xno|xyes)
3653                 { echo "$as_me:3653: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3654 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3655                 MAKE_PC_FILES="#"
3656                 ;;
3657         (*)
3658
3659 if test "x$prefix" != xNONE; then
3660         cf_path_syntax="$prefix"
3661 else
3662         cf_path_syntax="$ac_default_prefix"
3663 fi
3664
3665 case ".$PKG_CONFIG_LIBDIR" in
3666 (.\$\(*\)*|.\'*\'*)
3667         ;;
3668 (..|./*|.\\*)
3669         ;;
3670 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3671         ;;
3672 (.\${*prefix}*|.\${*dir}*)
3673         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3674         case ".$PKG_CONFIG_LIBDIR" in
3675         (.NONE/*)
3676                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3677                 ;;
3678         esac
3679         ;;
3680 (.no|.NONE/*)
3681         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3682         ;;
3683 (*)
3684         { { echo "$as_me:3684: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3685 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3686    { (exit 1); exit 1; }; }
3687         ;;
3688 esac
3689
3690                 MAKE_PC_FILES=
3691                 ;;
3692         esac
3693 else
3694         MAKE_PC_FILES="#"
3695 fi
3696
3697 if test -z "$MAKE_PC_FILES"
3698 then
3699         echo "$as_me:3699: checking for suffix to add to pc-files" >&5
3700 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3701
3702 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3703 if test "${with_pc_suffix+set}" = set; then
3704   withval="$with_pc_suffix"
3705   case "x$withval" in
3706         (xyes|xno)
3707                 PC_MODULE_SUFFIX=
3708                 ;;
3709         (*)     PC_MODULE_SUFFIX="$withval"
3710                 ;;
3711         esac
3712 fi;
3713         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3714         echo "$as_me:3714: result: $PC_MODULE_SUFFIX" >&5
3715 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3716         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3717
3718 fi
3719
3720 echo "$as_me:3720: checking if we should assume mixed-case filenames" >&5
3721 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3722
3723 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3724 if test "${enable_mixed_case+set}" = set; then
3725   enableval="$enable_mixed_case"
3726   enable_mixedcase=$enableval
3727 else
3728   enable_mixedcase=auto
3729 fi;
3730 echo "$as_me:3730: result: $enable_mixedcase" >&5
3731 echo "${ECHO_T}$enable_mixedcase" >&6
3732 if test "$enable_mixedcase" = "auto" ; then
3733
3734 echo "$as_me:3734: checking if filesystem supports mixed-case filenames" >&5
3735 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3736 if test "${cf_cv_mixedcase+set}" = set; then
3737   echo $ECHO_N "(cached) $ECHO_C" >&6
3738 else
3739
3740 if test "$cross_compiling" = yes ; then
3741         case $target_alias in
3742         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3743                 cf_cv_mixedcase=no
3744                 ;;
3745         (*)
3746                 cf_cv_mixedcase=yes
3747                 ;;
3748         esac
3749 else
3750         rm -f conftest CONFTEST
3751         echo test >conftest
3752         if test -f CONFTEST ; then
3753                 cf_cv_mixedcase=no
3754         else
3755                 cf_cv_mixedcase=yes
3756         fi
3757         rm -f conftest CONFTEST
3758 fi
3759
3760 fi
3761 echo "$as_me:3761: result: $cf_cv_mixedcase" >&5
3762 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3763 test "$cf_cv_mixedcase" = yes &&
3764 cat >>confdefs.h <<\EOF
3765 #define MIXEDCASE_FILENAMES 1
3766 EOF
3767
3768 else
3769         cf_cv_mixedcase=$enable_mixedcase
3770         if test "x$enable_mixedcase" = "xyes" ; then
3771
3772 cat >>confdefs.h <<\EOF
3773 #define MIXEDCASE_FILENAMES 1
3774 EOF
3775
3776         fi
3777 fi
3778
3779 # do this after mixed-case option (tags/TAGS is not as important as tic).
3780 echo "$as_me:3780: checking whether ${MAKE-make} sets \${MAKE}" >&5
3781 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3782 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3783 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3784   echo $ECHO_N "(cached) $ECHO_C" >&6
3785 else
3786   cat >conftest.make <<\EOF
3787 all:
3788         @echo 'ac_maketemp="${MAKE}"'
3789 EOF
3790 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3791 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3792 if test -n "$ac_maketemp"; then
3793   eval ac_cv_prog_make_${ac_make}_set=yes
3794 else
3795   eval ac_cv_prog_make_${ac_make}_set=no
3796 fi
3797 rm -f conftest.make
3798 fi
3799 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3800   echo "$as_me:3800: result: yes" >&5
3801 echo "${ECHO_T}yes" >&6
3802   SET_MAKE=
3803 else
3804   echo "$as_me:3804: result: no" >&5
3805 echo "${ECHO_T}no" >&6
3806   SET_MAKE="MAKE=${MAKE-make}"
3807 fi
3808
3809 for ac_prog in exctags ctags
3810 do
3811   # Extract the first word of "$ac_prog", so it can be a program name with args.
3812 set dummy $ac_prog; ac_word=$2
3813 echo "$as_me:3813: checking for $ac_word" >&5
3814 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3815 if test "${ac_cv_prog_CTAGS+set}" = set; then
3816   echo $ECHO_N "(cached) $ECHO_C" >&6
3817 else
3818   if test -n "$CTAGS"; then
3819   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3820 else
3821   ac_save_IFS=$IFS; IFS=$ac_path_separator
3822 ac_dummy="$PATH"
3823 for ac_dir in $ac_dummy; do
3824   IFS=$ac_save_IFS
3825   test -z "$ac_dir" && ac_dir=.
3826   $as_executable_p "$ac_dir/$ac_word" || continue
3827 ac_cv_prog_CTAGS="$ac_prog"
3828 echo "$as_me:3828: found $ac_dir/$ac_word" >&5
3829 break
3830 done
3831
3832 fi
3833 fi
3834 CTAGS=$ac_cv_prog_CTAGS
3835 if test -n "$CTAGS"; then
3836   echo "$as_me:3836: result: $CTAGS" >&5
3837 echo "${ECHO_T}$CTAGS" >&6
3838 else
3839   echo "$as_me:3839: result: no" >&5
3840 echo "${ECHO_T}no" >&6
3841 fi
3842
3843   test -n "$CTAGS" && break
3844 done
3845
3846 for ac_prog in exetags etags
3847 do
3848   # Extract the first word of "$ac_prog", so it can be a program name with args.
3849 set dummy $ac_prog; ac_word=$2
3850 echo "$as_me:3850: checking for $ac_word" >&5
3851 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3852 if test "${ac_cv_prog_ETAGS+set}" = set; then
3853   echo $ECHO_N "(cached) $ECHO_C" >&6
3854 else
3855   if test -n "$ETAGS"; then
3856   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3857 else
3858   ac_save_IFS=$IFS; IFS=$ac_path_separator
3859 ac_dummy="$PATH"
3860 for ac_dir in $ac_dummy; do
3861   IFS=$ac_save_IFS
3862   test -z "$ac_dir" && ac_dir=.
3863   $as_executable_p "$ac_dir/$ac_word" || continue
3864 ac_cv_prog_ETAGS="$ac_prog"
3865 echo "$as_me:3865: found $ac_dir/$ac_word" >&5
3866 break
3867 done
3868
3869 fi
3870 fi
3871 ETAGS=$ac_cv_prog_ETAGS
3872 if test -n "$ETAGS"; then
3873   echo "$as_me:3873: result: $ETAGS" >&5
3874 echo "${ECHO_T}$ETAGS" >&6
3875 else
3876   echo "$as_me:3876: result: no" >&5
3877 echo "${ECHO_T}no" >&6
3878 fi
3879
3880   test -n "$ETAGS" && break
3881 done
3882
3883 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3884 set dummy ${CTAGS:-ctags}; ac_word=$2
3885 echo "$as_me:3885: checking for $ac_word" >&5
3886 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3887 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3888   echo $ECHO_N "(cached) $ECHO_C" >&6
3889 else
3890   if test -n "$MAKE_LOWER_TAGS"; then
3891   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3892 else
3893   ac_save_IFS=$IFS; IFS=$ac_path_separator
3894 ac_dummy="$PATH"
3895 for ac_dir in $ac_dummy; do
3896   IFS=$ac_save_IFS
3897   test -z "$ac_dir" && ac_dir=.
3898   $as_executable_p "$ac_dir/$ac_word" || continue
3899 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3900 echo "$as_me:3900: found $ac_dir/$ac_word" >&5
3901 break
3902 done
3903
3904   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3905 fi
3906 fi
3907 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3908 if test -n "$MAKE_LOWER_TAGS"; then
3909   echo "$as_me:3909: result: $MAKE_LOWER_TAGS" >&5
3910 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3911 else
3912   echo "$as_me:3912: result: no" >&5
3913 echo "${ECHO_T}no" >&6
3914 fi
3915
3916 if test "$cf_cv_mixedcase" = yes ; then
3917         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3918 set dummy ${ETAGS:-etags}; ac_word=$2
3919 echo "$as_me:3919: checking for $ac_word" >&5
3920 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3921 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3922   echo $ECHO_N "(cached) $ECHO_C" >&6
3923 else
3924   if test -n "$MAKE_UPPER_TAGS"; then
3925   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3926 else
3927   ac_save_IFS=$IFS; IFS=$ac_path_separator
3928 ac_dummy="$PATH"
3929 for ac_dir in $ac_dummy; do
3930   IFS=$ac_save_IFS
3931   test -z "$ac_dir" && ac_dir=.
3932   $as_executable_p "$ac_dir/$ac_word" || continue
3933 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3934 echo "$as_me:3934: found $ac_dir/$ac_word" >&5
3935 break
3936 done
3937
3938   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3939 fi
3940 fi
3941 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3942 if test -n "$MAKE_UPPER_TAGS"; then
3943   echo "$as_me:3943: result: $MAKE_UPPER_TAGS" >&5
3944 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3945 else
3946   echo "$as_me:3946: result: no" >&5
3947 echo "${ECHO_T}no" >&6
3948 fi
3949
3950 else
3951         MAKE_UPPER_TAGS=no
3952 fi
3953
3954 if test "$MAKE_UPPER_TAGS" = yes ; then
3955         MAKE_UPPER_TAGS=
3956 else
3957         MAKE_UPPER_TAGS="#"
3958 fi
3959
3960 if test "$MAKE_LOWER_TAGS" = yes ; then
3961         MAKE_LOWER_TAGS=
3962 else
3963         MAKE_LOWER_TAGS="#"
3964 fi
3965
3966 echo "$as_me:3966: checking for makeflags variable" >&5
3967 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3968 if test "${cf_cv_makeflags+set}" = set; then
3969   echo $ECHO_N "(cached) $ECHO_C" >&6
3970 else
3971
3972         cf_cv_makeflags=''
3973         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3974         do
3975                 cat >cf_makeflags.tmp <<CF_EOF
3976 SHELL = /bin/sh
3977 all :
3978         @ echo '.$cf_option'
3979 CF_EOF
3980                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3981                 case "$cf_result" in
3982                 (.*k|.*kw)
3983                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3984                         case "$cf_result" in
3985                         (.*CC=*)        cf_cv_makeflags=
3986                                 ;;
3987                         (*)     cf_cv_makeflags=$cf_option
3988                                 ;;
3989                         esac
3990                         break
3991                         ;;
3992                 (.-)    ;;
3993                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
3994                         ;;
3995                 esac
3996         done
3997         rm -f cf_makeflags.tmp
3998
3999 fi
4000 echo "$as_me:4000: result: $cf_cv_makeflags" >&5
4001 echo "${ECHO_T}$cf_cv_makeflags" >&6
4002
4003 if test -n "$ac_tool_prefix"; then
4004   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4005 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4006 echo "$as_me:4006: checking for $ac_word" >&5
4007 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4008 if test "${ac_cv_prog_RANLIB+set}" = set; then
4009   echo $ECHO_N "(cached) $ECHO_C" >&6
4010 else
4011   if test -n "$RANLIB"; then
4012   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4013 else
4014   ac_save_IFS=$IFS; IFS=$ac_path_separator
4015 ac_dummy="$PATH"
4016 for ac_dir in $ac_dummy; do
4017   IFS=$ac_save_IFS
4018   test -z "$ac_dir" && ac_dir=.
4019   $as_executable_p "$ac_dir/$ac_word" || continue
4020 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4021 echo "$as_me:4021: found $ac_dir/$ac_word" >&5
4022 break
4023 done
4024
4025 fi
4026 fi
4027 RANLIB=$ac_cv_prog_RANLIB
4028 if test -n "$RANLIB"; then
4029   echo "$as_me:4029: result: $RANLIB" >&5
4030 echo "${ECHO_T}$RANLIB" >&6
4031 else
4032   echo "$as_me:4032: result: no" >&5
4033 echo "${ECHO_T}no" >&6
4034 fi
4035
4036 fi
4037 if test -z "$ac_cv_prog_RANLIB"; then
4038   ac_ct_RANLIB=$RANLIB
4039   # Extract the first word of "ranlib", so it can be a program name with args.
4040 set dummy ranlib; ac_word=$2
4041 echo "$as_me:4041: checking for $ac_word" >&5
4042 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4043 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4044   echo $ECHO_N "(cached) $ECHO_C" >&6
4045 else
4046   if test -n "$ac_ct_RANLIB"; then
4047   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4048 else
4049   ac_save_IFS=$IFS; IFS=$ac_path_separator
4050 ac_dummy="$PATH"
4051 for ac_dir in $ac_dummy; do
4052   IFS=$ac_save_IFS
4053   test -z "$ac_dir" && ac_dir=.
4054   $as_executable_p "$ac_dir/$ac_word" || continue
4055 ac_cv_prog_ac_ct_RANLIB="ranlib"
4056 echo "$as_me:4056: found $ac_dir/$ac_word" >&5
4057 break
4058 done
4059
4060   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4061 fi
4062 fi
4063 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4064 if test -n "$ac_ct_RANLIB"; then
4065   echo "$as_me:4065: result: $ac_ct_RANLIB" >&5
4066 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4067 else
4068   echo "$as_me:4068: result: no" >&5
4069 echo "${ECHO_T}no" >&6
4070 fi
4071
4072   RANLIB=$ac_ct_RANLIB
4073 else
4074   RANLIB="$ac_cv_prog_RANLIB"
4075 fi
4076
4077 if test -n "$ac_tool_prefix"; then
4078   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4079 set dummy ${ac_tool_prefix}ld; ac_word=$2
4080 echo "$as_me:4080: checking for $ac_word" >&5
4081 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4082 if test "${ac_cv_prog_LD+set}" = set; then
4083   echo $ECHO_N "(cached) $ECHO_C" >&6
4084 else
4085   if test -n "$LD"; then
4086   ac_cv_prog_LD="$LD" # Let the user override the test.
4087 else
4088   ac_save_IFS=$IFS; IFS=$ac_path_separator
4089 ac_dummy="$PATH"
4090 for ac_dir in $ac_dummy; do
4091   IFS=$ac_save_IFS
4092   test -z "$ac_dir" && ac_dir=.
4093   $as_executable_p "$ac_dir/$ac_word" || continue
4094 ac_cv_prog_LD="${ac_tool_prefix}ld"
4095 echo "$as_me:4095: found $ac_dir/$ac_word" >&5
4096 break
4097 done
4098
4099 fi
4100 fi
4101 LD=$ac_cv_prog_LD
4102 if test -n "$LD"; then
4103   echo "$as_me:4103: result: $LD" >&5
4104 echo "${ECHO_T}$LD" >&6
4105 else
4106   echo "$as_me:4106: result: no" >&5
4107 echo "${ECHO_T}no" >&6
4108 fi
4109
4110 fi
4111 if test -z "$ac_cv_prog_LD"; then
4112   ac_ct_LD=$LD
4113   # Extract the first word of "ld", so it can be a program name with args.
4114 set dummy ld; ac_word=$2
4115 echo "$as_me:4115: checking for $ac_word" >&5
4116 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4117 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4118   echo $ECHO_N "(cached) $ECHO_C" >&6
4119 else
4120   if test -n "$ac_ct_LD"; then
4121   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4122 else
4123   ac_save_IFS=$IFS; IFS=$ac_path_separator
4124 ac_dummy="$PATH"
4125 for ac_dir in $ac_dummy; do
4126   IFS=$ac_save_IFS
4127   test -z "$ac_dir" && ac_dir=.
4128   $as_executable_p "$ac_dir/$ac_word" || continue
4129 ac_cv_prog_ac_ct_LD="ld"
4130 echo "$as_me:4130: found $ac_dir/$ac_word" >&5
4131 break
4132 done
4133
4134   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4135 fi
4136 fi
4137 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4138 if test -n "$ac_ct_LD"; then
4139   echo "$as_me:4139: result: $ac_ct_LD" >&5
4140 echo "${ECHO_T}$ac_ct_LD" >&6
4141 else
4142   echo "$as_me:4142: result: no" >&5
4143 echo "${ECHO_T}no" >&6
4144 fi
4145
4146   LD=$ac_ct_LD
4147 else
4148   LD="$ac_cv_prog_LD"
4149 fi
4150
4151 if test -n "$ac_tool_prefix"; then
4152   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4153 set dummy ${ac_tool_prefix}ar; ac_word=$2
4154 echo "$as_me:4154: checking for $ac_word" >&5
4155 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4156 if test "${ac_cv_prog_AR+set}" = set; then
4157   echo $ECHO_N "(cached) $ECHO_C" >&6
4158 else
4159   if test -n "$AR"; then
4160   ac_cv_prog_AR="$AR" # Let the user override the test.
4161 else
4162   ac_save_IFS=$IFS; IFS=$ac_path_separator
4163 ac_dummy="$PATH"
4164 for ac_dir in $ac_dummy; do
4165   IFS=$ac_save_IFS
4166   test -z "$ac_dir" && ac_dir=.
4167   $as_executable_p "$ac_dir/$ac_word" || continue
4168 ac_cv_prog_AR="${ac_tool_prefix}ar"
4169 echo "$as_me:4169: found $ac_dir/$ac_word" >&5
4170 break
4171 done
4172
4173 fi
4174 fi
4175 AR=$ac_cv_prog_AR
4176 if test -n "$AR"; then
4177   echo "$as_me:4177: result: $AR" >&5
4178 echo "${ECHO_T}$AR" >&6
4179 else
4180   echo "$as_me:4180: result: no" >&5
4181 echo "${ECHO_T}no" >&6
4182 fi
4183
4184 fi
4185 if test -z "$ac_cv_prog_AR"; then
4186   ac_ct_AR=$AR
4187   # Extract the first word of "ar", so it can be a program name with args.
4188 set dummy ar; ac_word=$2
4189 echo "$as_me:4189: checking for $ac_word" >&5
4190 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4191 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4192   echo $ECHO_N "(cached) $ECHO_C" >&6
4193 else
4194   if test -n "$ac_ct_AR"; then
4195   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4196 else
4197   ac_save_IFS=$IFS; IFS=$ac_path_separator
4198 ac_dummy="$PATH"
4199 for ac_dir in $ac_dummy; do
4200   IFS=$ac_save_IFS
4201   test -z "$ac_dir" && ac_dir=.
4202   $as_executable_p "$ac_dir/$ac_word" || continue
4203 ac_cv_prog_ac_ct_AR="ar"
4204 echo "$as_me:4204: found $ac_dir/$ac_word" >&5
4205 break
4206 done
4207
4208   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4209 fi
4210 fi
4211 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4212 if test -n "$ac_ct_AR"; then
4213   echo "$as_me:4213: result: $ac_ct_AR" >&5
4214 echo "${ECHO_T}$ac_ct_AR" >&6
4215 else
4216   echo "$as_me:4216: result: no" >&5
4217 echo "${ECHO_T}no" >&6
4218 fi
4219
4220   AR=$ac_ct_AR
4221 else
4222   AR="$ac_cv_prog_AR"
4223 fi
4224
4225 if test -n "$ac_tool_prefix"; then
4226   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4227 set dummy ${ac_tool_prefix}nm; ac_word=$2
4228 echo "$as_me:4228: checking for $ac_word" >&5
4229 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4230 if test "${ac_cv_prog_NM+set}" = set; then
4231   echo $ECHO_N "(cached) $ECHO_C" >&6
4232 else
4233   if test -n "$NM"; then
4234   ac_cv_prog_NM="$NM" # Let the user override the test.
4235 else
4236   ac_save_IFS=$IFS; IFS=$ac_path_separator
4237 ac_dummy="$PATH"
4238 for ac_dir in $ac_dummy; do
4239   IFS=$ac_save_IFS
4240   test -z "$ac_dir" && ac_dir=.
4241   $as_executable_p "$ac_dir/$ac_word" || continue
4242 ac_cv_prog_NM="${ac_tool_prefix}nm"
4243 echo "$as_me:4243: found $ac_dir/$ac_word" >&5
4244 break
4245 done
4246
4247 fi
4248 fi
4249 NM=$ac_cv_prog_NM
4250 if test -n "$NM"; then
4251   echo "$as_me:4251: result: $NM" >&5
4252 echo "${ECHO_T}$NM" >&6
4253 else
4254   echo "$as_me:4254: result: no" >&5
4255 echo "${ECHO_T}no" >&6
4256 fi
4257
4258 fi
4259 if test -z "$ac_cv_prog_NM"; then
4260   ac_ct_NM=$NM
4261   # Extract the first word of "nm", so it can be a program name with args.
4262 set dummy nm; ac_word=$2
4263 echo "$as_me:4263: checking for $ac_word" >&5
4264 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4265 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4266   echo $ECHO_N "(cached) $ECHO_C" >&6
4267 else
4268   if test -n "$ac_ct_NM"; then
4269   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4270 else
4271   ac_save_IFS=$IFS; IFS=$ac_path_separator
4272 ac_dummy="$PATH"
4273 for ac_dir in $ac_dummy; do
4274   IFS=$ac_save_IFS
4275   test -z "$ac_dir" && ac_dir=.
4276   $as_executable_p "$ac_dir/$ac_word" || continue
4277 ac_cv_prog_ac_ct_NM="nm"
4278 echo "$as_me:4278: found $ac_dir/$ac_word" >&5
4279 break
4280 done
4281
4282   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4283 fi
4284 fi
4285 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4286 if test -n "$ac_ct_NM"; then
4287   echo "$as_me:4287: result: $ac_ct_NM" >&5
4288 echo "${ECHO_T}$ac_ct_NM" >&6
4289 else
4290   echo "$as_me:4290: result: no" >&5
4291 echo "${ECHO_T}no" >&6
4292 fi
4293
4294   NM=$ac_ct_NM
4295 else
4296   NM="$ac_cv_prog_NM"
4297 fi
4298
4299 if test -n "$ac_tool_prefix"; then
4300   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4301 set dummy ${ac_tool_prefix}ar; ac_word=$2
4302 echo "$as_me:4302: checking for $ac_word" >&5
4303 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4304 if test "${ac_cv_prog_AR+set}" = set; then
4305   echo $ECHO_N "(cached) $ECHO_C" >&6
4306 else
4307   if test -n "$AR"; then
4308   ac_cv_prog_AR="$AR" # Let the user override the test.
4309 else
4310   ac_save_IFS=$IFS; IFS=$ac_path_separator
4311 ac_dummy="$PATH"
4312 for ac_dir in $ac_dummy; do
4313   IFS=$ac_save_IFS
4314   test -z "$ac_dir" && ac_dir=.
4315   $as_executable_p "$ac_dir/$ac_word" || continue
4316 ac_cv_prog_AR="${ac_tool_prefix}ar"
4317 echo "$as_me:4317: found $ac_dir/$ac_word" >&5
4318 break
4319 done
4320
4321 fi
4322 fi
4323 AR=$ac_cv_prog_AR
4324 if test -n "$AR"; then
4325   echo "$as_me:4325: result: $AR" >&5
4326 echo "${ECHO_T}$AR" >&6
4327 else
4328   echo "$as_me:4328: result: no" >&5
4329 echo "${ECHO_T}no" >&6
4330 fi
4331
4332 fi
4333 if test -z "$ac_cv_prog_AR"; then
4334   ac_ct_AR=$AR
4335   # Extract the first word of "ar", so it can be a program name with args.
4336 set dummy ar; ac_word=$2
4337 echo "$as_me:4337: checking for $ac_word" >&5
4338 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4339 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4340   echo $ECHO_N "(cached) $ECHO_C" >&6
4341 else
4342   if test -n "$ac_ct_AR"; then
4343   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4344 else
4345   ac_save_IFS=$IFS; IFS=$ac_path_separator
4346 ac_dummy="$PATH"
4347 for ac_dir in $ac_dummy; do
4348   IFS=$ac_save_IFS
4349   test -z "$ac_dir" && ac_dir=.
4350   $as_executable_p "$ac_dir/$ac_word" || continue
4351 ac_cv_prog_ac_ct_AR="ar"
4352 echo "$as_me:4352: found $ac_dir/$ac_word" >&5
4353 break
4354 done
4355
4356   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4357 fi
4358 fi
4359 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4360 if test -n "$ac_ct_AR"; then
4361   echo "$as_me:4361: result: $ac_ct_AR" >&5
4362 echo "${ECHO_T}$ac_ct_AR" >&6
4363 else
4364   echo "$as_me:4364: result: no" >&5
4365 echo "${ECHO_T}no" >&6
4366 fi
4367
4368   AR=$ac_ct_AR
4369 else
4370   AR="$ac_cv_prog_AR"
4371 fi
4372
4373 echo "$as_me:4373: checking for options to update archives" >&5
4374 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4375 if test "${cf_cv_ar_flags+set}" = set; then
4376   echo $ECHO_N "(cached) $ECHO_C" >&6
4377 else
4378
4379         cf_cv_ar_flags=unknown
4380         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4381         do
4382
4383                 # check if $ARFLAGS already contains this choice
4384                 if test "x$ARFLAGS" != "x" ; then
4385                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4386                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4387                                 cf_cv_ar_flags=
4388                                 break
4389                         fi
4390                 fi
4391
4392                 rm -f conftest.$ac_cv_objext
4393                 rm -f conftest.a
4394
4395                 cat >conftest.$ac_ext <<EOF
4396 #line 4396 "configure"
4397 int     testdata[3] = { 123, 456, 789 };
4398 EOF
4399                 if { (eval echo "$as_me:4399: \"$ac_compile\"") >&5
4400   (eval $ac_compile) 2>&5
4401   ac_status=$?
4402   echo "$as_me:4402: \$? = $ac_status" >&5
4403   (exit $ac_status); } ; then
4404                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4405                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4406                         if test -f conftest.a ; then
4407                                 cf_cv_ar_flags=$cf_ar_flags
4408                                 break
4409                         fi
4410                 else
4411                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4412
4413 echo "${as_me:-configure}:4413: testing cannot compile test-program ..." 1>&5
4414
4415                         break
4416                 fi
4417         done
4418         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4419
4420 fi
4421 echo "$as_me:4421: result: $cf_cv_ar_flags" >&5
4422 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4423
4424 if test -n "$ARFLAGS" ; then
4425         if test -n "$cf_cv_ar_flags" ; then
4426                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4427         fi
4428 else
4429         ARFLAGS=$cf_cv_ar_flags
4430 fi
4431
4432 echo "$as_me:4432: checking if you have specified an install-prefix" >&5
4433 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4434
4435 # Check whether --with-install-prefix or --without-install-prefix was given.
4436 if test "${with_install_prefix+set}" = set; then
4437   withval="$with_install_prefix"
4438   case "x$withval" in
4439         (xyes|xno)
4440                 ;;
4441         (*)     DESTDIR="$withval"
4442                 ;;
4443         esac
4444 fi;
4445 echo "$as_me:4445: result: $DESTDIR" >&5
4446 echo "${ECHO_T}$DESTDIR" >&6
4447
4448 ###############################################################################
4449
4450 # If we're cross-compiling, allow the user to override the tools and their
4451 # options.  The configure script is oriented toward identifying the host
4452 # compiler, etc., but we need a build compiler to generate parts of the source.
4453
4454 if test "$cross_compiling" = yes ; then
4455
4456         # defaults that we might want to override
4457         : ${BUILD_CFLAGS:=''}
4458         : ${BUILD_CPPFLAGS:=''}
4459         : ${BUILD_LDFLAGS:=''}
4460         : ${BUILD_LIBS:=''}
4461         : ${BUILD_EXEEXT:='$x'}
4462         : ${BUILD_OBJEXT:='o'}
4463
4464 # Check whether --with-build-cc or --without-build-cc was given.
4465 if test "${with_build_cc+set}" = set; then
4466   withval="$with_build_cc"
4467   BUILD_CC="$withval"
4468 else
4469   for ac_prog in gcc cc cl
4470 do
4471   # Extract the first word of "$ac_prog", so it can be a program name with args.
4472 set dummy $ac_prog; ac_word=$2
4473 echo "$as_me:4473: checking for $ac_word" >&5
4474 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4475 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4476   echo $ECHO_N "(cached) $ECHO_C" >&6
4477 else
4478   if test -n "$BUILD_CC"; then
4479   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4480 else
4481   ac_save_IFS=$IFS; IFS=$ac_path_separator
4482 ac_dummy="$PATH"
4483 for ac_dir in $ac_dummy; do
4484   IFS=$ac_save_IFS
4485   test -z "$ac_dir" && ac_dir=.
4486   $as_executable_p "$ac_dir/$ac_word" || continue
4487 ac_cv_prog_BUILD_CC="$ac_prog"
4488 echo "$as_me:4488: found $ac_dir/$ac_word" >&5
4489 break
4490 done
4491
4492 fi
4493 fi
4494 BUILD_CC=$ac_cv_prog_BUILD_CC
4495 if test -n "$BUILD_CC"; then
4496   echo "$as_me:4496: result: $BUILD_CC" >&5
4497 echo "${ECHO_T}$BUILD_CC" >&6
4498 else
4499   echo "$as_me:4499: result: no" >&5
4500 echo "${ECHO_T}no" >&6
4501 fi
4502
4503   test -n "$BUILD_CC" && break
4504 done
4505
4506 fi;
4507         echo "$as_me:4507: checking for native build C compiler" >&5
4508 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4509         echo "$as_me:4509: result: $BUILD_CC" >&5
4510 echo "${ECHO_T}$BUILD_CC" >&6
4511
4512         echo "$as_me:4512: checking for native build C preprocessor" >&5
4513 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4514
4515 # Check whether --with-build-cpp or --without-build-cpp was given.
4516 if test "${with_build_cpp+set}" = set; then
4517   withval="$with_build_cpp"
4518   BUILD_CPP="$withval"
4519 else
4520   BUILD_CPP='${BUILD_CC} -E'
4521 fi;
4522         echo "$as_me:4522: result: $BUILD_CPP" >&5
4523 echo "${ECHO_T}$BUILD_CPP" >&6
4524
4525         echo "$as_me:4525: checking for native build C flags" >&5
4526 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4527
4528 # Check whether --with-build-cflags or --without-build-cflags was given.
4529 if test "${with_build_cflags+set}" = set; then
4530   withval="$with_build_cflags"
4531   BUILD_CFLAGS="$withval"
4532 fi;
4533         echo "$as_me:4533: result: $BUILD_CFLAGS" >&5
4534 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4535
4536         echo "$as_me:4536: checking for native build C preprocessor-flags" >&5
4537 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4538
4539 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4540 if test "${with_build_cppflags+set}" = set; then
4541   withval="$with_build_cppflags"
4542   BUILD_CPPFLAGS="$withval"
4543 fi;
4544         echo "$as_me:4544: result: $BUILD_CPPFLAGS" >&5
4545 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4546
4547         echo "$as_me:4547: checking for native build linker-flags" >&5
4548 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4549
4550 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4551 if test "${with_build_ldflags+set}" = set; then
4552   withval="$with_build_ldflags"
4553   BUILD_LDFLAGS="$withval"
4554 fi;
4555         echo "$as_me:4555: result: $BUILD_LDFLAGS" >&5
4556 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4557
4558         echo "$as_me:4558: checking for native build linker-libraries" >&5
4559 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4560
4561 # Check whether --with-build-libs or --without-build-libs was given.
4562 if test "${with_build_libs+set}" = set; then
4563   withval="$with_build_libs"
4564   BUILD_LIBS="$withval"
4565 fi;
4566         echo "$as_me:4566: result: $BUILD_LIBS" >&5
4567 echo "${ECHO_T}$BUILD_LIBS" >&6
4568
4569         # this assumes we're on Unix.
4570         BUILD_EXEEXT=
4571         BUILD_OBJEXT=o
4572
4573         : ${BUILD_CC:='${CC}'}
4574
4575         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4576                 { { echo "$as_me:4576: error: Cross-build requires two compilers.
4577 Use --with-build-cc to specify the native compiler." >&5
4578 echo "$as_me: error: Cross-build requires two compilers.
4579 Use --with-build-cc to specify the native compiler." >&2;}
4580    { (exit 1); exit 1; }; }
4581         fi
4582
4583 else
4584         : ${BUILD_CC:='${CC}'}
4585         : ${BUILD_CPP:='${CPP}'}
4586         : ${BUILD_CFLAGS:='${CFLAGS}'}
4587         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4588         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4589         : ${BUILD_LIBS:='${LIBS}'}
4590         : ${BUILD_EXEEXT:='$x'}
4591         : ${BUILD_OBJEXT:='o'}
4592 fi
4593
4594 ###############################################################################
4595
4596 ### Options to allow the user to specify the set of libraries which are used.
4597 ### Use "--without-normal --with-shared" to allow the default model to be
4598 ### shared, for example.
4599 cf_list_models=""
4600
4601 echo "$as_me:4601: checking if libtool -version-number should be used" >&5
4602 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4603
4604 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4605 if test "${enable_libtool_version+set}" = set; then
4606   enableval="$enable_libtool_version"
4607   test "$enableval" != no && enableval=yes
4608   if test "$enableval" != "yes" ; then
4609     cf_libtool_version=no
4610   else
4611     cf_libtool_version=yes
4612   fi
4613 else
4614   enableval=yes
4615   cf_libtool_version=yes
4616
4617 fi;
4618 echo "$as_me:4618: result: $cf_libtool_version" >&5
4619 echo "${ECHO_T}$cf_libtool_version" >&6
4620
4621 if test "$cf_libtool_version" = yes ; then
4622         LIBTOOL_VERSION="-version-number"
4623 else
4624         LIBTOOL_VERSION="-version-info"
4625         case "x$VERSION" in
4626         (x)
4627                 { echo "$as_me:4627: WARNING: VERSION was not set" >&5
4628 echo "$as_me: WARNING: VERSION was not set" >&2;}
4629                 ;;
4630         (x*.*.*)
4631                 ABI_VERSION="$VERSION"
4632                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4633
4634 echo "${as_me:-configure}:4634: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4635
4636                 ;;
4637         (x*:*:*)
4638                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4639                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4640
4641 echo "${as_me:-configure}:4641: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4642
4643                 ;;
4644         (*)
4645                 { echo "$as_me:4645: WARNING: unexpected VERSION value: $VERSION" >&5
4646 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4647                 ;;
4648         esac
4649 fi
4650
4651 LIBTOOL=
4652
4653 # common library maintenance symbols that are convenient for libtool scripts:
4654 LIB_CREATE='${AR} -cr'
4655 LIB_OBJECT='${OBJECTS}'
4656 LIB_SUFFIX=.a
4657 LIB_PREP="$RANLIB"
4658
4659 # symbols used to prop libtool up to enable it to determine what it should be
4660 # doing:
4661 LIB_CLEAN=
4662 LIB_COMPILE=
4663 LIB_LINK='${CC}'
4664 LIB_INSTALL=
4665 LIB_UNINSTALL=
4666
4667 echo "$as_me:4667: checking if you want to build libraries with libtool" >&5
4668 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4669
4670 # Check whether --with-libtool or --without-libtool was given.
4671 if test "${with_libtool+set}" = set; then
4672   withval="$with_libtool"
4673   with_libtool=$withval
4674 else
4675   with_libtool=no
4676 fi;
4677 echo "$as_me:4677: result: $with_libtool" >&5
4678 echo "${ECHO_T}$with_libtool" >&6
4679 if test "$with_libtool" != "no"; then
4680
4681         if test "$with_libtool" != "yes" ; then
4682
4683 if test "x$prefix" != xNONE; then
4684         cf_path_syntax="$prefix"
4685 else
4686         cf_path_syntax="$ac_default_prefix"
4687 fi
4688
4689 case ".$with_libtool" in
4690 (.\$\(*\)*|.\'*\'*)
4691         ;;
4692 (..|./*|.\\*)
4693         ;;
4694 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4695         ;;
4696 (.\${*prefix}*|.\${*dir}*)
4697         eval with_libtool="$with_libtool"
4698         case ".$with_libtool" in
4699         (.NONE/*)
4700                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4701                 ;;
4702         esac
4703         ;;
4704 (.no|.NONE/*)
4705         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4706         ;;
4707 (*)
4708         { { echo "$as_me:4708: error: expected a pathname, not \"$with_libtool\"" >&5
4709 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4710    { (exit 1); exit 1; }; }
4711         ;;
4712 esac
4713
4714                 LIBTOOL=$with_libtool
4715         else
4716                 if test -n "$ac_tool_prefix"; then
4717   for ac_prog in libtool glibtool
4718   do
4719     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4720 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4721 echo "$as_me:4721: checking for $ac_word" >&5
4722 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4723 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4724   echo $ECHO_N "(cached) $ECHO_C" >&6
4725 else
4726   if test -n "$LIBTOOL"; then
4727   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4728 else
4729   ac_save_IFS=$IFS; IFS=$ac_path_separator
4730 ac_dummy="$PATH"
4731 for ac_dir in $ac_dummy; do
4732   IFS=$ac_save_IFS
4733   test -z "$ac_dir" && ac_dir=.
4734   $as_executable_p "$ac_dir/$ac_word" || continue
4735 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4736 echo "$as_me:4736: found $ac_dir/$ac_word" >&5
4737 break
4738 done
4739
4740 fi
4741 fi
4742 LIBTOOL=$ac_cv_prog_LIBTOOL
4743 if test -n "$LIBTOOL"; then
4744   echo "$as_me:4744: result: $LIBTOOL" >&5
4745 echo "${ECHO_T}$LIBTOOL" >&6
4746 else
4747   echo "$as_me:4747: result: no" >&5
4748 echo "${ECHO_T}no" >&6
4749 fi
4750
4751     test -n "$LIBTOOL" && break
4752   done
4753 fi
4754 if test -z "$LIBTOOL"; then
4755   ac_ct_LIBTOOL=$LIBTOOL
4756   for ac_prog in libtool glibtool
4757 do
4758   # Extract the first word of "$ac_prog", so it can be a program name with args.
4759 set dummy $ac_prog; ac_word=$2
4760 echo "$as_me:4760: checking for $ac_word" >&5
4761 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4762 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4763   echo $ECHO_N "(cached) $ECHO_C" >&6
4764 else
4765   if test -n "$ac_ct_LIBTOOL"; then
4766   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4767 else
4768   ac_save_IFS=$IFS; IFS=$ac_path_separator
4769 ac_dummy="$PATH"
4770 for ac_dir in $ac_dummy; do
4771   IFS=$ac_save_IFS
4772   test -z "$ac_dir" && ac_dir=.
4773   $as_executable_p "$ac_dir/$ac_word" || continue
4774 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4775 echo "$as_me:4775: found $ac_dir/$ac_word" >&5
4776 break
4777 done
4778
4779 fi
4780 fi
4781 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4782 if test -n "$ac_ct_LIBTOOL"; then
4783   echo "$as_me:4783: result: $ac_ct_LIBTOOL" >&5
4784 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4785 else
4786   echo "$as_me:4786: result: no" >&5
4787 echo "${ECHO_T}no" >&6
4788 fi
4789
4790   test -n "$ac_ct_LIBTOOL" && break
4791 done
4792 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4793
4794   LIBTOOL=$ac_ct_LIBTOOL
4795 fi
4796
4797 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4798 then
4799         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.].*//'`
4800 else
4801         cf_cv_libtool_version=
4802 fi
4803 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4804
4805                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4806                 then
4807
4808 unset ac_cv_prog_ac_ct_LIBTOOL
4809 unset ac_ct_LIBTOOL
4810 unset LIBTOOL
4811
4812                         if test -n "$ac_tool_prefix"; then
4813   for ac_prog in glibtool
4814   do
4815     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4816 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4817 echo "$as_me:4817: checking for $ac_word" >&5
4818 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4819 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4820   echo $ECHO_N "(cached) $ECHO_C" >&6
4821 else
4822   if test -n "$LIBTOOL"; then
4823   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4824 else
4825   ac_save_IFS=$IFS; IFS=$ac_path_separator
4826 ac_dummy="$PATH"
4827 for ac_dir in $ac_dummy; do
4828   IFS=$ac_save_IFS
4829   test -z "$ac_dir" && ac_dir=.
4830   $as_executable_p "$ac_dir/$ac_word" || continue
4831 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4832 echo "$as_me:4832: found $ac_dir/$ac_word" >&5
4833 break
4834 done
4835
4836 fi
4837 fi
4838 LIBTOOL=$ac_cv_prog_LIBTOOL
4839 if test -n "$LIBTOOL"; then
4840   echo "$as_me:4840: result: $LIBTOOL" >&5
4841 echo "${ECHO_T}$LIBTOOL" >&6
4842 else
4843   echo "$as_me:4843: result: no" >&5
4844 echo "${ECHO_T}no" >&6
4845 fi
4846
4847     test -n "$LIBTOOL" && break
4848   done
4849 fi
4850 if test -z "$LIBTOOL"; then
4851   ac_ct_LIBTOOL=$LIBTOOL
4852   for ac_prog in glibtool
4853 do
4854   # Extract the first word of "$ac_prog", so it can be a program name with args.
4855 set dummy $ac_prog; ac_word=$2
4856 echo "$as_me:4856: checking for $ac_word" >&5
4857 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4858 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4859   echo $ECHO_N "(cached) $ECHO_C" >&6
4860 else
4861   if test -n "$ac_ct_LIBTOOL"; then
4862   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4863 else
4864   ac_save_IFS=$IFS; IFS=$ac_path_separator
4865 ac_dummy="$PATH"
4866 for ac_dir in $ac_dummy; do
4867   IFS=$ac_save_IFS
4868   test -z "$ac_dir" && ac_dir=.
4869   $as_executable_p "$ac_dir/$ac_word" || continue
4870 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4871 echo "$as_me:4871: found $ac_dir/$ac_word" >&5
4872 break
4873 done
4874
4875 fi
4876 fi
4877 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4878 if test -n "$ac_ct_LIBTOOL"; then
4879   echo "$as_me:4879: result: $ac_ct_LIBTOOL" >&5
4880 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4881 else
4882   echo "$as_me:4882: result: no" >&5
4883 echo "${ECHO_T}no" >&6
4884 fi
4885
4886   test -n "$ac_ct_LIBTOOL" && break
4887 done
4888 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4889
4890   LIBTOOL=$ac_ct_LIBTOOL
4891 fi
4892
4893 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4894 then
4895         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.].*//'`
4896 else
4897         cf_cv_libtool_version=
4898 fi
4899 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4900
4901                 fi
4902         fi
4903         if test -z "$LIBTOOL" ; then
4904                 { { echo "$as_me:4904: error: Cannot find libtool" >&5
4905 echo "$as_me: error: Cannot find libtool" >&2;}
4906    { (exit 1); exit 1; }; }
4907         fi
4908         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4909         LIB_OBJECT='${OBJECTS:.o=.lo}'
4910         LIB_SUFFIX=.la
4911         LIB_CLEAN='${LIBTOOL} --mode=clean'
4912         LIB_COMPILE='${LIBTOOL} --mode=compile'
4913         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4914         LIB_INSTALL='${LIBTOOL} --mode=install'
4915         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4916         LIB_PREP=:
4917
4918 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4919 then
4920         echo "$as_me:4920: checking version of $LIBTOOL" >&5
4921 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4922
4923 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4924 then
4925         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.].*//'`
4926 else
4927         cf_cv_libtool_version=
4928 fi
4929 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4930
4931         echo "$as_me:4931: result: $cf_cv_libtool_version" >&5
4932 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4933         if test -z "$cf_cv_libtool_version" ; then
4934                 { { echo "$as_me:4934: error: This is not GNU libtool" >&5
4935 echo "$as_me: error: This is not GNU libtool" >&2;}
4936    { (exit 1); exit 1; }; }
4937         fi
4938 else
4939         { { echo "$as_me:4939: error: GNU libtool has not been found" >&5
4940 echo "$as_me: error: GNU libtool has not been found" >&2;}
4941    { (exit 1); exit 1; }; }
4942 fi
4943
4944         # special hack to add -no-undefined (which libtool should do for itself)
4945         LT_UNDEF=
4946         case "$cf_cv_system_name" in
4947         (cygwin*|msys*|mingw32*|uwin*|aix[4-7])
4948                 LT_UNDEF=-no-undefined
4949                 ;;
4950         esac
4951
4952         # special hack to add --tag option for C++ compiler
4953         case $cf_cv_libtool_version in
4954         (1.[5-9]*|[2-9].[0-9.a-z]*)
4955                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4956                 LIBTOOL="$LIBTOOL --tag=CC"
4957                 ;;
4958         (*)
4959                 LIBTOOL_CXX="$LIBTOOL"
4960                 ;;
4961         esac
4962 else
4963         LIBTOOL=""
4964         LIBTOOL_CXX=""
4965 fi
4966
4967 test -z "$LIBTOOL" && ECHO_LT=
4968
4969 if test "$with_libtool" != "no" ; then
4970
4971 cf_list_models="$cf_list_models libtool"
4972
4973 else
4974
4975 echo "$as_me:4975: checking if you want to build shared libraries" >&5
4976 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4977
4978 # Check whether --with-shared or --without-shared was given.
4979 if test "${with_shared+set}" = set; then
4980   withval="$with_shared"
4981   with_shared=$withval
4982 else
4983   with_shared=no
4984 fi;
4985 echo "$as_me:4985: result: $with_shared" >&5
4986 echo "${ECHO_T}$with_shared" >&6
4987 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4988
4989 echo "$as_me:4989: checking if you want to build static libraries" >&5
4990 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4991
4992 # Check whether --with-normal or --without-normal was given.
4993 if test "${with_normal+set}" = set; then
4994   withval="$with_normal"
4995   with_normal=$withval
4996 else
4997   with_normal=yes
4998 fi;
4999 echo "$as_me:4999: result: $with_normal" >&5
5000 echo "${ECHO_T}$with_normal" >&6
5001 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5002
5003 echo "$as_me:5003: checking if you want to build debug libraries" >&5
5004 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5005
5006 # Check whether --with-debug or --without-debug was given.
5007 if test "${with_debug+set}" = set; then
5008   withval="$with_debug"
5009   with_debug=$withval
5010 else
5011   with_debug=yes
5012 fi;
5013 echo "$as_me:5013: result: $with_debug" >&5
5014 echo "${ECHO_T}$with_debug" >&6
5015 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5016
5017 echo "$as_me:5017: checking if you want to build profiling libraries" >&5
5018 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5019
5020 # Check whether --with-profile or --without-profile was given.
5021 if test "${with_profile+set}" = set; then
5022   withval="$with_profile"
5023   with_profile=$withval
5024 else
5025   with_profile=no
5026 fi;
5027 echo "$as_me:5027: result: $with_profile" >&5
5028 echo "${ECHO_T}$with_profile" >&6
5029 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5030
5031 fi
5032
5033 if test "X$cf_with_cxx_binding" != Xno; then
5034 if test "x$with_shared" = "xyes"; then
5035 echo "$as_me:5035: checking if you want to build C++ shared libraries" >&5
5036 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5037
5038 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5039 if test "${with_cxx_shared+set}" = set; then
5040   withval="$with_cxx_shared"
5041   with_shared_cxx=$withval
5042 else
5043   with_shared_cxx=no
5044 fi;
5045 echo "$as_me:5045: result: $with_shared_cxx" >&5
5046 echo "${ECHO_T}$with_shared_cxx" >&6
5047 fi
5048 fi
5049
5050 ###############################################################################
5051
5052 echo "$as_me:5052: checking for specified models" >&5
5053 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5054 test -z "$cf_list_models" && cf_list_models=normal
5055 test "$with_libtool" != "no" && cf_list_models=libtool
5056 echo "$as_me:5056: result: $cf_list_models" >&5
5057 echo "${ECHO_T}$cf_list_models" >&6
5058
5059 ### Use the first model as the default, and save its suffix for use in building
5060 ### up test-applications.
5061 echo "$as_me:5061: checking for default model" >&5
5062 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5063 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5064 echo "$as_me:5064: result: $DFT_LWR_MODEL" >&5
5065 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5066
5067 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5068
5069 TICS_NAME=tic
5070
5071 TINFO_NAME=tinfo
5072
5073 LIB_NAME=ncurses
5074
5075 LIB_DIR=../lib
5076 LIB_2ND=../../lib
5077
5078 echo "$as_me:5078: checking if you want to have a library-prefix" >&5
5079 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5080
5081 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5082 if test "${with_lib_prefix+set}" = set; then
5083   withval="$with_lib_prefix"
5084   with_lib_prefix=$withval
5085 else
5086   with_lib_prefix=auto
5087 fi;
5088 echo "$as_me:5088: result: $with_lib_prefix" >&5
5089 echo "${ECHO_T}$with_lib_prefix" >&6
5090
5091 if test $with_lib_prefix = auto
5092 then
5093
5094         case $cf_cv_system_name in
5095         (OS/2*|os2*)
5096                 LIB_PREFIX=''
5097                 ;;
5098         (*)     LIB_PREFIX='lib'
5099                 ;;
5100         esac
5101 cf_prefix=$LIB_PREFIX
5102
5103 elif test $with_lib_prefix = no
5104 then
5105         LIB_PREFIX=
5106 else
5107         LIB_PREFIX=$with_lib_prefix
5108 fi
5109
5110 LIB_SUFFIX=
5111
5112         echo "$as_me:5112: checking for PATH separator" >&5
5113 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5114         case $cf_cv_system_name in
5115         (os2*)  PATH_SEPARATOR=';'  ;;
5116         (*)     ${PATH_SEPARATOR:=':'}  ;;
5117         esac
5118
5119         echo "$as_me:5119: result: $PATH_SEPARATOR" >&5
5120 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5121
5122 ###############################################################################
5123
5124 echo "$as_me:5124: checking if you want to build a separate terminfo library" >&5
5125 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5126
5127 # Check whether --with-termlib or --without-termlib was given.
5128 if test "${with_termlib+set}" = set; then
5129   withval="$with_termlib"
5130   with_termlib=$withval
5131 else
5132   with_termlib=no
5133 fi;
5134 echo "$as_me:5134: result: $with_termlib" >&5
5135 echo "${ECHO_T}$with_termlib" >&6
5136
5137 echo "$as_me:5137: checking if you want to build a separate tic library" >&5
5138 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5139
5140 # Check whether --with-ticlib or --without-ticlib was given.
5141 if test "${with_ticlib+set}" = set; then
5142   withval="$with_ticlib"
5143   with_ticlib=$withval
5144 else
5145   with_ticlib=no
5146 fi;
5147 echo "$as_me:5147: result: $with_ticlib" >&5
5148 echo "${ECHO_T}$with_ticlib" >&6
5149
5150 ### Checks for special libraries, must be done up-front.
5151 SHLIB_LIST=""
5152
5153 echo "$as_me:5153: checking if you want to link with the GPM mouse library" >&5
5154 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5155
5156 # Check whether --with-gpm or --without-gpm was given.
5157 if test "${with_gpm+set}" = set; then
5158   withval="$with_gpm"
5159   with_gpm=$withval
5160 else
5161   with_gpm=maybe
5162 fi;
5163 echo "$as_me:5163: result: $with_gpm" >&5
5164 echo "${ECHO_T}$with_gpm" >&6
5165
5166 if test "$with_gpm" != no ; then
5167         echo "$as_me:5167: checking for gpm.h" >&5
5168 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5169 if test "${ac_cv_header_gpm_h+set}" = set; then
5170   echo $ECHO_N "(cached) $ECHO_C" >&6
5171 else
5172   cat >conftest.$ac_ext <<_ACEOF
5173 #line 5173 "configure"
5174 #include "confdefs.h"
5175 #include <gpm.h>
5176 _ACEOF
5177 if { (eval echo "$as_me:5177: \"$ac_cpp conftest.$ac_ext\"") >&5
5178   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5179   ac_status=$?
5180   egrep -v '^ *\+' conftest.er1 >conftest.err
5181   rm -f conftest.er1
5182   cat conftest.err >&5
5183   echo "$as_me:5183: \$? = $ac_status" >&5
5184   (exit $ac_status); } >/dev/null; then
5185   if test -s conftest.err; then
5186     ac_cpp_err=$ac_c_preproc_warn_flag
5187   else
5188     ac_cpp_err=
5189   fi
5190 else
5191   ac_cpp_err=yes
5192 fi
5193 if test -z "$ac_cpp_err"; then
5194   ac_cv_header_gpm_h=yes
5195 else
5196   echo "$as_me: failed program was:" >&5
5197   cat conftest.$ac_ext >&5
5198   ac_cv_header_gpm_h=no
5199 fi
5200 rm -f conftest.err conftest.$ac_ext
5201 fi
5202 echo "$as_me:5202: result: $ac_cv_header_gpm_h" >&5
5203 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5204 if test $ac_cv_header_gpm_h = yes; then
5205
5206 cat >>confdefs.h <<\EOF
5207 #define HAVE_GPM_H 1
5208 EOF
5209
5210                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5211                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5212
5213 echo "${as_me:-configure}:5213: testing assuming we really have GPM library ..." 1>&5
5214
5215 cat >>confdefs.h <<\EOF
5216 #define HAVE_LIBGPM 1
5217 EOF
5218
5219                 else
5220                         echo "$as_me:5220: checking for Gpm_Open in -lgpm" >&5
5221 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5222 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5223   echo $ECHO_N "(cached) $ECHO_C" >&6
5224 else
5225   ac_check_lib_save_LIBS=$LIBS
5226 LIBS="-lgpm  $LIBS"
5227 cat >conftest.$ac_ext <<_ACEOF
5228 #line 5228 "configure"
5229 #include "confdefs.h"
5230
5231 /* Override any gcc2 internal prototype to avoid an error.  */
5232 #ifdef __cplusplus
5233 extern "C"
5234 #endif
5235 /* We use char because int might match the return type of a gcc2
5236    builtin and then its argument prototype would still apply.  */
5237 char Gpm_Open ();
5238 int
5239 main ()
5240 {
5241 Gpm_Open ();
5242   ;
5243   return 0;
5244 }
5245 _ACEOF
5246 rm -f conftest.$ac_objext conftest$ac_exeext
5247 if { (eval echo "$as_me:5247: \"$ac_link\"") >&5
5248   (eval $ac_link) 2>&5
5249   ac_status=$?
5250   echo "$as_me:5250: \$? = $ac_status" >&5
5251   (exit $ac_status); } &&
5252          { ac_try='test -s conftest$ac_exeext'
5253   { (eval echo "$as_me:5253: \"$ac_try\"") >&5
5254   (eval $ac_try) 2>&5
5255   ac_status=$?
5256   echo "$as_me:5256: \$? = $ac_status" >&5
5257   (exit $ac_status); }; }; then
5258   ac_cv_lib_gpm_Gpm_Open=yes
5259 else
5260   echo "$as_me: failed program was:" >&5
5261 cat conftest.$ac_ext >&5
5262 ac_cv_lib_gpm_Gpm_Open=no
5263 fi
5264 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5265 LIBS=$ac_check_lib_save_LIBS
5266 fi
5267 echo "$as_me:5267: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5268 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5269 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5270   :
5271 else
5272
5273                                 { { echo "$as_me:5273: error: Cannot link with GPM library" >&5
5274 echo "$as_me: error: Cannot link with GPM library" >&2;}
5275    { (exit 1); exit 1; }; }
5276                 fi
5277                 with_gpm=yes
5278
5279 fi
5280
5281 else
5282
5283                 test "$with_gpm" != maybe && { echo "$as_me:5283: WARNING: Cannot find GPM header" >&5
5284 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5285                 with_gpm=no
5286
5287 fi
5288
5289 fi
5290
5291 if test "$with_gpm" != no ; then
5292         echo "$as_me:5292: checking if you want to load GPM dynamically" >&5
5293 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5294
5295 # Check whether --with-dlsym or --without-dlsym was given.
5296 if test "${with_dlsym+set}" = set; then
5297   withval="$with_dlsym"
5298   with_dlsym=$withval
5299 else
5300   with_dlsym=yes
5301 fi;
5302         echo "$as_me:5302: result: $with_dlsym" >&5
5303 echo "${ECHO_T}$with_dlsym" >&6
5304         if test "x$with_dlsym" = xyes ; then
5305
5306 cf_have_dlsym=no
5307 echo "$as_me:5307: checking for dlsym" >&5
5308 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5309 if test "${ac_cv_func_dlsym+set}" = set; then
5310   echo $ECHO_N "(cached) $ECHO_C" >&6
5311 else
5312   cat >conftest.$ac_ext <<_ACEOF
5313 #line 5313 "configure"
5314 #include "confdefs.h"
5315 /* System header to define __stub macros and hopefully few prototypes,
5316     which can conflict with char dlsym (); below.  */
5317 #include <assert.h>
5318 /* Override any gcc2 internal prototype to avoid an error.  */
5319 #ifdef __cplusplus
5320 extern "C"
5321 #endif
5322 /* We use char because int might match the return type of a gcc2
5323    builtin and then its argument prototype would still apply.  */
5324 char dlsym ();
5325 char (*f) ();
5326
5327 int
5328 main ()
5329 {
5330 /* The GNU C library defines this for functions which it implements
5331     to always fail with ENOSYS.  Some functions are actually named
5332     something starting with __ and the normal name is an alias.  */
5333 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5334 choke me
5335 #else
5336 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5337 #endif
5338
5339   ;
5340   return 0;
5341 }
5342 _ACEOF
5343 rm -f conftest.$ac_objext conftest$ac_exeext
5344 if { (eval echo "$as_me:5344: \"$ac_link\"") >&5
5345   (eval $ac_link) 2>&5
5346   ac_status=$?
5347   echo "$as_me:5347: \$? = $ac_status" >&5
5348   (exit $ac_status); } &&
5349          { ac_try='test -s conftest$ac_exeext'
5350   { (eval echo "$as_me:5350: \"$ac_try\"") >&5
5351   (eval $ac_try) 2>&5
5352   ac_status=$?
5353   echo "$as_me:5353: \$? = $ac_status" >&5
5354   (exit $ac_status); }; }; then
5355   ac_cv_func_dlsym=yes
5356 else
5357   echo "$as_me: failed program was:" >&5
5358 cat conftest.$ac_ext >&5
5359 ac_cv_func_dlsym=no
5360 fi
5361 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5362 fi
5363 echo "$as_me:5363: result: $ac_cv_func_dlsym" >&5
5364 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5365 if test $ac_cv_func_dlsym = yes; then
5366   cf_have_dlsym=yes
5367 else
5368
5369 cf_have_libdl=no
5370 echo "$as_me:5370: checking for dlsym in -ldl" >&5
5371 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5372 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5373   echo $ECHO_N "(cached) $ECHO_C" >&6
5374 else
5375   ac_check_lib_save_LIBS=$LIBS
5376 LIBS="-ldl  $LIBS"
5377 cat >conftest.$ac_ext <<_ACEOF
5378 #line 5378 "configure"
5379 #include "confdefs.h"
5380
5381 /* Override any gcc2 internal prototype to avoid an error.  */
5382 #ifdef __cplusplus
5383 extern "C"
5384 #endif
5385 /* We use char because int might match the return type of a gcc2
5386    builtin and then its argument prototype would still apply.  */
5387 char dlsym ();
5388 int
5389 main ()
5390 {
5391 dlsym ();
5392   ;
5393   return 0;
5394 }
5395 _ACEOF
5396 rm -f conftest.$ac_objext conftest$ac_exeext
5397 if { (eval echo "$as_me:5397: \"$ac_link\"") >&5
5398   (eval $ac_link) 2>&5
5399   ac_status=$?
5400   echo "$as_me:5400: \$? = $ac_status" >&5
5401   (exit $ac_status); } &&
5402          { ac_try='test -s conftest$ac_exeext'
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   ac_cv_lib_dl_dlsym=yes
5409 else
5410   echo "$as_me: failed program was:" >&5
5411 cat conftest.$ac_ext >&5
5412 ac_cv_lib_dl_dlsym=no
5413 fi
5414 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5415 LIBS=$ac_check_lib_save_LIBS
5416 fi
5417 echo "$as_me:5417: result: $ac_cv_lib_dl_dlsym" >&5
5418 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5419 if test $ac_cv_lib_dl_dlsym = yes; then
5420
5421         cf_have_dlsym=yes
5422         cf_have_libdl=yes
5423 fi
5424
5425 fi
5426
5427 if test "$cf_have_dlsym" = yes ; then
5428         test "$cf_have_libdl" = yes &&
5429 cf_add_libs="-ldl"
5430 # Filter out duplicates - this happens with badly-designed ".pc" files...
5431 for cf_add_1lib in $LIBS
5432 do
5433         for cf_add_2lib in $cf_add_libs
5434         do
5435                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5436                 then
5437                         cf_add_1lib=
5438                         break
5439                 fi
5440         done
5441         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5442 done
5443 LIBS="$cf_add_libs"
5444
5445         echo "$as_me:5445: checking whether able to link to dl*() functions" >&5
5446 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5447         cat >conftest.$ac_ext <<_ACEOF
5448 #line 5448 "configure"
5449 #include "confdefs.h"
5450 #include <dlfcn.h>
5451 int
5452 main ()
5453 {
5454
5455                 void *obj;
5456                 if ((obj = dlopen("filename", 0)) != 0) {
5457                         if (dlsym(obj, "symbolname") == 0) {
5458                         dlclose(obj);
5459                         }
5460                 }
5461   ;
5462   return 0;
5463 }
5464 _ACEOF
5465 rm -f conftest.$ac_objext conftest$ac_exeext
5466 if { (eval echo "$as_me:5466: \"$ac_link\"") >&5
5467   (eval $ac_link) 2>&5
5468   ac_status=$?
5469   echo "$as_me:5469: \$? = $ac_status" >&5
5470   (exit $ac_status); } &&
5471          { ac_try='test -s conftest$ac_exeext'
5472   { (eval echo "$as_me:5472: \"$ac_try\"") >&5
5473   (eval $ac_try) 2>&5
5474   ac_status=$?
5475   echo "$as_me:5475: \$? = $ac_status" >&5
5476   (exit $ac_status); }; }; then
5477
5478 cat >>confdefs.h <<\EOF
5479 #define HAVE_LIBDL 1
5480 EOF
5481
5482 else
5483   echo "$as_me: failed program was:" >&5
5484 cat conftest.$ac_ext >&5
5485
5486                 { { echo "$as_me:5486: error: Cannot link test program for libdl" >&5
5487 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5488    { (exit 1); exit 1; }; }
5489 fi
5490 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5491         echo "$as_me:5491: result: ok" >&5
5492 echo "${ECHO_T}ok" >&6
5493 else
5494         { { echo "$as_me:5494: error: Cannot find dlsym function" >&5
5495 echo "$as_me: error: Cannot find dlsym function" >&2;}
5496    { (exit 1); exit 1; }; }
5497 fi
5498
5499                 if test "x$with_gpm" != xyes ; then
5500                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5501
5502 echo "${as_me:-configure}:5502: testing assuming soname for gpm is $with_gpm ..." 1>&5
5503
5504                         cf_cv_gpm_soname="$with_gpm"
5505                 else
5506
5507 echo "$as_me:5507: checking for soname of gpm library" >&5
5508 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5509 if test "${cf_cv_gpm_soname+set}" = set; then
5510   echo $ECHO_N "(cached) $ECHO_C" >&6
5511 else
5512
5513 cf_cv_gpm_soname=unknown
5514 if test "$cross_compiling" != yes ; then
5515 cat >conftest.$ac_ext <<CF_EOF
5516 #include <gpm.h>
5517 int main()
5518 {
5519 if (Gpm_Open(0,0)) Gpm_Close();
5520         ${cf_cv_main_return:-return}(0);
5521 }
5522 CF_EOF
5523 cf_save_LIBS="$LIBS"
5524
5525 cf_add_libs="-lgpm"
5526 # Filter out duplicates - this happens with badly-designed ".pc" files...
5527 for cf_add_1lib in $LIBS
5528 do
5529         for cf_add_2lib in $cf_add_libs
5530         do
5531                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5532                 then
5533                         cf_add_1lib=
5534                         break
5535                 fi
5536         done
5537         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5538 done
5539 LIBS="$cf_add_libs"
5540
5541         if { (eval echo "$as_me:5541: \"$ac_compile\"") >&5
5542   (eval $ac_compile) 2>&5
5543   ac_status=$?
5544   echo "$as_me:5544: \$? = $ac_status" >&5
5545   (exit $ac_status); } ; then
5546                 if { (eval echo "$as_me:5546: \"$ac_link\"") >&5
5547   (eval $ac_link) 2>&5
5548   ac_status=$?
5549   echo "$as_me:5549: \$? = $ac_status" >&5
5550   (exit $ac_status); } ; then
5551                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5552                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5553                 fi
5554         fi
5555 rm -rf conftest*
5556 LIBS="$cf_save_LIBS"
5557 fi
5558
5559 fi
5560 echo "$as_me:5560: result: $cf_cv_gpm_soname" >&5
5561 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5562
5563                 fi
5564                 test "$cf_cv_gpm_soname" != "unknown" &&
5565 cat >>confdefs.h <<EOF
5566 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5567 EOF
5568
5569                 SHLIB_LIST="-ldl $SHLIB_LIST"
5570         else
5571                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5572
5573 cf_add_libs="-lgpm"
5574 # Filter out duplicates - this happens with badly-designed ".pc" files...
5575 for cf_add_1lib in $TEST_LIBS
5576 do
5577         for cf_add_2lib in $cf_add_libs
5578         do
5579                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5580                 then
5581                         cf_add_1lib=
5582                         break
5583                 fi
5584         done
5585         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5586 done
5587 TEST_LIBS="$cf_add_libs"
5588
5589         fi
5590
5591 cat >>confdefs.h <<\EOF
5592 #define HAVE_LIBGPM 1
5593 EOF
5594
5595 echo "$as_me:5595: checking for Gpm_Wgetch in -lgpm" >&5
5596 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5597 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5598   echo $ECHO_N "(cached) $ECHO_C" >&6
5599 else
5600   ac_check_lib_save_LIBS=$LIBS
5601 LIBS="-lgpm  $LIBS"
5602 cat >conftest.$ac_ext <<_ACEOF
5603 #line 5603 "configure"
5604 #include "confdefs.h"
5605
5606 /* Override any gcc2 internal prototype to avoid an error.  */
5607 #ifdef __cplusplus
5608 extern "C"
5609 #endif
5610 /* We use char because int might match the return type of a gcc2
5611    builtin and then its argument prototype would still apply.  */
5612 char Gpm_Wgetch ();
5613 int
5614 main ()
5615 {
5616 Gpm_Wgetch ();
5617   ;
5618   return 0;
5619 }
5620 _ACEOF
5621 rm -f conftest.$ac_objext conftest$ac_exeext
5622 if { (eval echo "$as_me:5622: \"$ac_link\"") >&5
5623   (eval $ac_link) 2>&5
5624   ac_status=$?
5625   echo "$as_me:5625: \$? = $ac_status" >&5
5626   (exit $ac_status); } &&
5627          { ac_try='test -s conftest$ac_exeext'
5628   { (eval echo "$as_me:5628: \"$ac_try\"") >&5
5629   (eval $ac_try) 2>&5
5630   ac_status=$?
5631   echo "$as_me:5631: \$? = $ac_status" >&5
5632   (exit $ac_status); }; }; then
5633   ac_cv_lib_gpm_Gpm_Wgetch=yes
5634 else
5635   echo "$as_me: failed program was:" >&5
5636 cat conftest.$ac_ext >&5
5637 ac_cv_lib_gpm_Gpm_Wgetch=no
5638 fi
5639 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5640 LIBS=$ac_check_lib_save_LIBS
5641 fi
5642 echo "$as_me:5642: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5643 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5644 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5645
5646 echo "$as_me:5646: checking if GPM is weakly bound to curses library" >&5
5647 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5648 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5649   echo $ECHO_N "(cached) $ECHO_C" >&6
5650 else
5651
5652 cf_cv_check_gpm_wgetch=unknown
5653 if test "$cross_compiling" != yes ; then
5654
5655 cat >conftest.$ac_ext <<CF_EOF
5656 #include <gpm.h>
5657 int main()
5658 {
5659         Gpm_Wgetch();
5660         ${cf_cv_main_return:-return}(0);
5661 }
5662 CF_EOF
5663
5664         cf_save_LIBS="$LIBS"
5665         # This only works if we can look at the symbol table.  If a shared
5666         # library is stripped for install, we cannot use that.  So we're forced
5667         # to rely on the static library, noting that some packagers may not
5668         # include it.
5669         LIBS="-static -lgpm -dynamic $LIBS"
5670         if { (eval echo "$as_me:5670: \"$ac_compile\"") >&5
5671   (eval $ac_compile) 2>&5
5672   ac_status=$?
5673   echo "$as_me:5673: \$? = $ac_status" >&5
5674   (exit $ac_status); } ; then
5675                 if { (eval echo "$as_me:5675: \"$ac_link\"") >&5
5676   (eval $ac_link) 2>&5
5677   ac_status=$?
5678   echo "$as_me:5678: \$? = $ac_status" >&5
5679   (exit $ac_status); } ; then
5680                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5681                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5682                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5683                 fi
5684         fi
5685         rm -rf conftest*
5686         LIBS="$cf_save_LIBS"
5687 fi
5688
5689 fi
5690 echo "$as_me:5690: result: $cf_cv_check_gpm_wgetch" >&5
5691 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5692
5693 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5694         { echo "$as_me:5694: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5695 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5696 fi
5697
5698 fi
5699
5700 fi
5701
5702 # not everyone has "test -c"
5703 if test -c /dev/sysmouse 2>/dev/null ; then
5704 echo "$as_me:5704: checking if you want to use sysmouse" >&5
5705 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5706
5707 # Check whether --with-sysmouse or --without-sysmouse was given.
5708 if test "${with_sysmouse+set}" = set; then
5709   withval="$with_sysmouse"
5710   cf_with_sysmouse=$withval
5711 else
5712   cf_with_sysmouse=maybe
5713 fi;
5714         if test "$cf_with_sysmouse" != no ; then
5715         cat >conftest.$ac_ext <<_ACEOF
5716 #line 5716 "configure"
5717 #include "confdefs.h"
5718
5719 #include <osreldate.h>
5720 #if (__FreeBSD_version >= 400017)
5721 #include <sys/consio.h>
5722 #include <sys/fbio.h>
5723 #else
5724 #include <machine/console.h>
5725 #endif
5726
5727 int
5728 main ()
5729 {
5730
5731         struct mouse_info the_mouse;
5732         ioctl(0, CONS_MOUSECTL, &the_mouse);
5733
5734   ;
5735   return 0;
5736 }
5737 _ACEOF
5738 rm -f conftest.$ac_objext
5739 if { (eval echo "$as_me:5739: \"$ac_compile\"") >&5
5740   (eval $ac_compile) 2>&5
5741   ac_status=$?
5742   echo "$as_me:5742: \$? = $ac_status" >&5
5743   (exit $ac_status); } &&
5744          { ac_try='test -s conftest.$ac_objext'
5745   { (eval echo "$as_me:5745: \"$ac_try\"") >&5
5746   (eval $ac_try) 2>&5
5747   ac_status=$?
5748   echo "$as_me:5748: \$? = $ac_status" >&5
5749   (exit $ac_status); }; }; then
5750   cf_with_sysmouse=yes
5751 else
5752   echo "$as_me: failed program was:" >&5
5753 cat conftest.$ac_ext >&5
5754 cf_with_sysmouse=no
5755 fi
5756 rm -f conftest.$ac_objext conftest.$ac_ext
5757         fi
5758 echo "$as_me:5758: result: $cf_with_sysmouse" >&5
5759 echo "${ECHO_T}$cf_with_sysmouse" >&6
5760 test "$cf_with_sysmouse" = yes &&
5761 cat >>confdefs.h <<\EOF
5762 #define USE_SYSMOUSE 1
5763 EOF
5764
5765 fi
5766
5767 if test X"$CC_G_OPT" = X"" ; then
5768         CC_G_OPT='-g'
5769         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5770 fi
5771
5772 if test X"$CXX_G_OPT" = X"" ; then
5773         CXX_G_OPT='-g'
5774         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5775 fi
5776
5777 echo "$as_me:5777: checking for default loader flags" >&5
5778 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5779 case $DFT_LWR_MODEL in
5780 (libtool) LD_MODEL=''   ;;
5781 (normal)  LD_MODEL=''   ;;
5782 (debug)   LD_MODEL=$CC_G_OPT ;;
5783 (profile) LD_MODEL='-pg';;
5784 (shared)  LD_MODEL=''   ;;
5785 esac
5786 echo "$as_me:5786: result: $LD_MODEL" >&5
5787 echo "${ECHO_T}$LD_MODEL" >&6
5788
5789 case $DFT_LWR_MODEL in
5790 (shared)
5791
5792 echo "$as_me:5792: checking if rpath option should be used" >&5
5793 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5794
5795 # Check whether --enable-rpath or --disable-rpath was given.
5796 if test "${enable_rpath+set}" = set; then
5797   enableval="$enable_rpath"
5798   cf_cv_enable_rpath=$enableval
5799 else
5800   cf_cv_enable_rpath=no
5801 fi;
5802 echo "$as_me:5802: result: $cf_cv_enable_rpath" >&5
5803 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5804
5805 echo "$as_me:5805: checking if shared libraries should be relinked during install" >&5
5806 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5807
5808 # Check whether --enable-relink or --disable-relink was given.
5809 if test "${enable_relink+set}" = set; then
5810   enableval="$enable_relink"
5811   cf_cv_do_relink=$enableval
5812 else
5813   cf_cv_do_relink=yes
5814 fi;
5815 echo "$as_me:5815: result: $cf_cv_do_relink" >&5
5816 echo "${ECHO_T}$cf_cv_do_relink" >&6
5817         ;;
5818 esac
5819
5820 # we will build libraries one-level down.
5821 rel_builddir=..
5822
5823 LD_RPATH_OPT=
5824 echo "$as_me:5824: checking for an rpath option" >&5
5825 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5826 case $cf_cv_system_name in
5827 (irix*)
5828         if test "$GCC" = yes; then
5829                 LD_RPATH_OPT="-Wl,-rpath,"
5830         else
5831                 LD_RPATH_OPT="-rpath "
5832         fi
5833         ;;
5834 (linux*|gnu*|k*bsd*-gnu)
5835         LD_RPATH_OPT="-Wl,-rpath,"
5836         ;;
5837 (openbsd[2-9].*|mirbsd*)
5838         LD_RPATH_OPT="-Wl,-rpath,"
5839         ;;
5840 (dragonfly*|freebsd*)
5841         LD_RPATH_OPT="-rpath "
5842         ;;
5843 (netbsd*)
5844         LD_RPATH_OPT="-Wl,-rpath,"
5845         ;;
5846 (osf*|mls+*)
5847         LD_RPATH_OPT="-rpath "
5848         ;;
5849 (solaris2*)
5850         LD_RPATH_OPT="-R"
5851         ;;
5852 (*)
5853         ;;
5854 esac
5855 echo "$as_me:5855: result: $LD_RPATH_OPT" >&5
5856 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5857
5858 case "x$LD_RPATH_OPT" in
5859 (x-R*)
5860         echo "$as_me:5860: checking if we need a space after rpath option" >&5
5861 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5862         cf_save_LIBS="$LIBS"
5863
5864 cf_add_libs="${LD_RPATH_OPT}$libdir"
5865 # Filter out duplicates - this happens with badly-designed ".pc" files...
5866 for cf_add_1lib in $LIBS
5867 do
5868         for cf_add_2lib in $cf_add_libs
5869         do
5870                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5871                 then
5872                         cf_add_1lib=
5873                         break
5874                 fi
5875         done
5876         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5877 done
5878 LIBS="$cf_add_libs"
5879
5880         cat >conftest.$ac_ext <<_ACEOF
5881 #line 5881 "configure"
5882 #include "confdefs.h"
5883
5884 int
5885 main ()
5886 {
5887
5888   ;
5889   return 0;
5890 }
5891 _ACEOF
5892 rm -f conftest.$ac_objext conftest$ac_exeext
5893 if { (eval echo "$as_me:5893: \"$ac_link\"") >&5
5894   (eval $ac_link) 2>&5
5895   ac_status=$?
5896   echo "$as_me:5896: \$? = $ac_status" >&5
5897   (exit $ac_status); } &&
5898          { ac_try='test -s conftest$ac_exeext'
5899   { (eval echo "$as_me:5899: \"$ac_try\"") >&5
5900   (eval $ac_try) 2>&5
5901   ac_status=$?
5902   echo "$as_me:5902: \$? = $ac_status" >&5
5903   (exit $ac_status); }; }; then
5904   cf_rpath_space=no
5905 else
5906   echo "$as_me: failed program was:" >&5
5907 cat conftest.$ac_ext >&5
5908 cf_rpath_space=yes
5909 fi
5910 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5911         LIBS="$cf_save_LIBS"
5912         echo "$as_me:5912: result: $cf_rpath_space" >&5
5913 echo "${ECHO_T}$cf_rpath_space" >&6
5914         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5915         ;;
5916 esac
5917
5918         RM_SHARED_OPTS=
5919         LOCAL_LDFLAGS=
5920         LOCAL_LDFLAGS2=
5921         LD_SHARED_OPTS=
5922         INSTALL_LIB="-m 644"
5923         : ${rel_builddir:=.}
5924
5925         shlibdir=$libdir
5926
5927         MAKE_DLLS="#"
5928
5929         cf_cv_do_symlinks=no
5930         cf_ld_rpath_opt=
5931         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5932
5933         echo "$as_me:5933: checking if release/abi version should be used for shared libs" >&5
5934 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5935
5936 # Check whether --with-shlib-version or --without-shlib-version was given.
5937 if test "${with_shlib_version+set}" = set; then
5938   withval="$with_shlib_version"
5939   test -z "$withval" && withval=auto
5940         case $withval in
5941         (yes)
5942                 cf_cv_shlib_version=auto
5943                 ;;
5944         (rel|abi|auto|no)
5945                 cf_cv_shlib_version=$withval
5946                 ;;
5947         (*)
5948                 { { echo "$as_me:5948: error: option value must be one of: rel, abi, auto or no" >&5
5949 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5950    { (exit 1); exit 1; }; }
5951                 ;;
5952         esac
5953
5954 else
5955   cf_cv_shlib_version=auto
5956 fi;
5957         echo "$as_me:5957: result: $cf_cv_shlib_version" >&5
5958 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5959
5960         cf_cv_rm_so_locs=no
5961         cf_try_cflags=
5962
5963         # Some less-capable ports of gcc support only -fpic
5964         CC_SHARED_OPTS=
5965         if test "$GCC" = yes
5966         then
5967                 echo "$as_me:5967: checking which $CC option to use" >&5
5968 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5969                 cf_save_CFLAGS="$CFLAGS"
5970                 for CC_SHARED_OPTS in -fPIC -fpic ''
5971                 do
5972                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5973                         cat >conftest.$ac_ext <<_ACEOF
5974 #line 5974 "configure"
5975 #include "confdefs.h"
5976 #include <stdio.h>
5977 int
5978 main ()
5979 {
5980 int x = 1
5981   ;
5982   return 0;
5983 }
5984 _ACEOF
5985 rm -f conftest.$ac_objext
5986 if { (eval echo "$as_me:5986: \"$ac_compile\"") >&5
5987   (eval $ac_compile) 2>&5
5988   ac_status=$?
5989   echo "$as_me:5989: \$? = $ac_status" >&5
5990   (exit $ac_status); } &&
5991          { ac_try='test -s conftest.$ac_objext'
5992   { (eval echo "$as_me:5992: \"$ac_try\"") >&5
5993   (eval $ac_try) 2>&5
5994   ac_status=$?
5995   echo "$as_me:5995: \$? = $ac_status" >&5
5996   (exit $ac_status); }; }; then
5997   break
5998 else
5999   echo "$as_me: failed program was:" >&5
6000 cat conftest.$ac_ext >&5
6001 fi
6002 rm -f conftest.$ac_objext conftest.$ac_ext
6003                 done
6004                 echo "$as_me:6004: result: $CC_SHARED_OPTS" >&5
6005 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6006                 CFLAGS="$cf_save_CFLAGS"
6007         fi
6008
6009         cf_cv_shlib_version_infix=no
6010
6011         case $cf_cv_system_name in
6012         (aix4.3-9*|aix[5-7]*)
6013                 if test "$GCC" = yes; then
6014                         CC_SHARED_OPTS='-Wl,-brtl'
6015                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6016                 else
6017                         CC_SHARED_OPTS='-brtl'
6018                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6019                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6020                 fi
6021                 ;;
6022         (beos*)
6023                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6024                 ;;
6025         (cygwin*)
6026                 CC_SHARED_OPTS=
6027                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6028                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6029                 cf_cv_shlib_version=cygdll
6030                 cf_cv_shlib_version_infix=cygdll
6031                 shlibdir=$bindir
6032                 MAKE_DLLS=
6033                 cat >mk_shared_lib.sh <<-CF_EOF
6034                 #!/bin/sh
6035                 SHARED_LIB=\$1
6036                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6037                 shift
6038                 cat <<-EOF
6039                 Linking shared library
6040                 ** SHARED_LIB \$SHARED_LIB
6041                 ** IMPORT_LIB \$IMPORT_LIB
6042 EOF
6043                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6044 CF_EOF
6045                 chmod +x mk_shared_lib.sh
6046                 ;;
6047         (msys*)
6048                 CC_SHARED_OPTS=
6049                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6050                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6051                 cf_cv_shlib_version=msysdll
6052                 cf_cv_shlib_version_infix=msysdll
6053                 shlibdir=$bindir
6054                 MAKE_DLLS=
6055                 cat >mk_shared_lib.sh <<-CF_EOF
6056                 #!/bin/sh
6057                 SHARED_LIB=\$1
6058                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6059                 shift
6060                 cat <<-EOF
6061                 Linking shared library
6062                 ** SHARED_LIB \$SHARED_LIB
6063                 ** IMPORT_LIB \$IMPORT_LIB
6064 EOF
6065                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6066 CF_EOF
6067                 chmod +x mk_shared_lib.sh
6068                 ;;
6069         (darwin*)
6070                 cf_try_cflags="no-cpp-precomp"
6071                 CC_SHARED_OPTS="-dynamic"
6072                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6073                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6074                 cf_cv_shlib_version_infix=yes
6075                 echo "$as_me:6075: checking if ld -search_paths_first works" >&5
6076 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6077 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6078   echo $ECHO_N "(cached) $ECHO_C" >&6
6079 else
6080
6081                         cf_save_LDFLAGS=$LDFLAGS
6082                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6083                         cat >conftest.$ac_ext <<_ACEOF
6084 #line 6084 "configure"
6085 #include "confdefs.h"
6086
6087 int
6088 main ()
6089 {
6090 int i;
6091   ;
6092   return 0;
6093 }
6094 _ACEOF
6095 rm -f conftest.$ac_objext conftest$ac_exeext
6096 if { (eval echo "$as_me:6096: \"$ac_link\"") >&5
6097   (eval $ac_link) 2>&5
6098   ac_status=$?
6099   echo "$as_me:6099: \$? = $ac_status" >&5
6100   (exit $ac_status); } &&
6101          { ac_try='test -s conftest$ac_exeext'
6102   { (eval echo "$as_me:6102: \"$ac_try\"") >&5
6103   (eval $ac_try) 2>&5
6104   ac_status=$?
6105   echo "$as_me:6105: \$? = $ac_status" >&5
6106   (exit $ac_status); }; }; then
6107   cf_cv_ldflags_search_paths_first=yes
6108 else
6109   echo "$as_me: failed program was:" >&5
6110 cat conftest.$ac_ext >&5
6111 cf_cv_ldflags_search_paths_first=no
6112 fi
6113 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6114                                 LDFLAGS=$cf_save_LDFLAGS
6115 fi
6116 echo "$as_me:6116: result: $cf_cv_ldflags_search_paths_first" >&5
6117 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6118                 if test $cf_cv_ldflags_search_paths_first = yes; then
6119                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6120                 fi
6121                 ;;
6122         (hpux[7-8]*)
6123                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6124                 if test "$GCC" != yes; then
6125                         CC_SHARED_OPTS='+Z'
6126                 fi
6127                 MK_SHARED_LIB='${LD} -b -o $@'
6128                 INSTALL_LIB="-m 555"
6129                 ;;
6130         (hpux*)
6131                 # (tested with gcc 2.7.2 -- I don't have c89)
6132                 if test "$GCC" = yes; then
6133                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6134                 else
6135                         CC_SHARED_OPTS='+Z'
6136                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6137                 fi
6138                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6139                 # HP-UX shared libraries must be executable, and should be
6140                 # readonly to exploit a quirk in the memory manager.
6141                 INSTALL_LIB="-m 555"
6142                 ;;
6143         (interix*)
6144                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6145                 if test "$cf_cv_shlib_version" = rel; then
6146                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6147                 else
6148                         cf_shared_soname='`basename `'
6149                 fi
6150                 CC_SHARED_OPTS=
6151                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6152                 ;;
6153         (irix*)
6154                 if test "$cf_cv_enable_rpath" = yes ; then
6155                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6156                 fi
6157                 # tested with IRIX 5.2 and 'cc'.
6158                 if test "$GCC" != yes; then
6159                         CC_SHARED_OPTS='-KPIC'
6160                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6161                 else
6162                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6163                 fi
6164                 cf_cv_rm_so_locs=yes
6165                 ;;
6166         (linux*|gnu*|k*bsd*-gnu)
6167                 if test "$DFT_LWR_MODEL" = "shared" ; then
6168                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6169                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6170                 fi
6171                 if test "$cf_cv_enable_rpath" = yes ; then
6172                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6173                 fi
6174
6175         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6176         if test "$cf_cv_shlib_version" = rel; then
6177                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6178         else
6179                 cf_cv_shared_soname='`basename $@`'
6180         fi
6181
6182                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6183                 ;;
6184         (mingw*)
6185                 cf_cv_shlib_version=mingw
6186                 cf_cv_shlib_version_infix=mingw
6187                 shlibdir=$bindir
6188                 MAKE_DLLS=
6189                 if test "$DFT_LWR_MODEL" = "shared" ; then
6190                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6191                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6192                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6193                 fi
6194                 CC_SHARED_OPTS=
6195                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6196                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6197                 cat >mk_shared_lib.sh <<-CF_EOF
6198                 #!/bin/sh
6199                 SHARED_LIB=\$1
6200                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6201                 shift
6202                 cat <<-EOF
6203                 Linking shared library
6204                 ** SHARED_LIB \$SHARED_LIB
6205                 ** IMPORT_LIB \$IMPORT_LIB
6206 EOF
6207                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6208 CF_EOF
6209                 chmod +x mk_shared_lib.sh
6210                 ;;
6211         (openbsd[2-9].*|mirbsd*)
6212                 if test "$DFT_LWR_MODEL" = "shared" ; then
6213                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6214                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6215                 fi
6216                 if test "$cf_cv_enable_rpath" = yes ; then
6217                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6218                 fi
6219                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6220
6221         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6222         if test "$cf_cv_shlib_version" = rel; then
6223                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6224         else
6225                 cf_cv_shared_soname='`basename $@`'
6226         fi
6227
6228                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6229                 ;;
6230         (nto-qnx*|openbsd*|freebsd[12].*)
6231                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6232                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6233                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6234                 ;;
6235         (dragonfly*|freebsd*)
6236                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6237                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6238                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6239                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6240                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6241                 fi
6242
6243         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6244         if test "$cf_cv_shlib_version" = rel; then
6245                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6246         else
6247                 cf_cv_shared_soname='`basename $@`'
6248         fi
6249
6250                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6251                 ;;
6252         (netbsd*)
6253                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6254                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6255                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6256                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6257                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6258                         if test "$cf_cv_shlib_version" = auto; then
6259                         if test -f /usr/libexec/ld.elf_so; then
6260                                 cf_cv_shlib_version=abi
6261                         else
6262                                 cf_cv_shlib_version=rel
6263                         fi
6264                         fi
6265
6266         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6267         if test "$cf_cv_shlib_version" = rel; then
6268                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6269         else
6270                 cf_cv_shared_soname='`basename $@`'
6271         fi
6272
6273                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6274                 else
6275                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6276                 fi
6277                 ;;
6278         (osf*|mls+*)
6279                 # tested with OSF/1 V3.2 and 'cc'
6280                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6281                 # link with shared libs).
6282                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6283                 case $host_os in
6284                 (osf4*)
6285                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6286                         ;;
6287                 esac
6288                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6289                 if test "$DFT_LWR_MODEL" = "shared" ; then
6290                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6291                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6292                 fi
6293                 cf_cv_rm_so_locs=yes
6294                 ;;
6295         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6296                 # tested with osr5.0.5
6297                 if test "$GCC" != yes; then
6298                         CC_SHARED_OPTS='-belf -KPIC'
6299                 fi
6300                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6301                 if test "$cf_cv_enable_rpath" = yes ; then
6302                         # only way is to set LD_RUN_PATH but no switch for it
6303                         RUN_PATH=$libdir
6304                 fi
6305                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6306                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6307                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6308                 ;;
6309         (sunos4*)
6310                 # tested with SunOS 4.1.1 and gcc 2.7.0
6311                 if test "$GCC" != yes; then
6312                         CC_SHARED_OPTS='-KPIC'
6313                 fi
6314                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6315                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6316                 ;;
6317         (solaris2*)
6318                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6319                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6320                 if test "$DFT_LWR_MODEL" = "shared" ; then
6321                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6322                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6323                 fi
6324                 if test "$cf_cv_enable_rpath" = yes ; then
6325                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6326                 fi
6327
6328         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6329         if test "$cf_cv_shlib_version" = rel; then
6330                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6331         else
6332                 cf_cv_shared_soname='`basename $@`'
6333         fi
6334
6335                 if test "$GCC" != yes; then
6336                         cf_save_CFLAGS="$CFLAGS"
6337                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6338                         do
6339                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6340                                 cat >conftest.$ac_ext <<_ACEOF
6341 #line 6341 "configure"
6342 #include "confdefs.h"
6343 #include <stdio.h>
6344 int
6345 main ()
6346 {
6347 printf("Hello\n");
6348   ;
6349   return 0;
6350 }
6351 _ACEOF
6352 rm -f conftest.$ac_objext
6353 if { (eval echo "$as_me:6353: \"$ac_compile\"") >&5
6354   (eval $ac_compile) 2>&5
6355   ac_status=$?
6356   echo "$as_me:6356: \$? = $ac_status" >&5
6357   (exit $ac_status); } &&
6358          { ac_try='test -s conftest.$ac_objext'
6359   { (eval echo "$as_me:6359: \"$ac_try\"") >&5
6360   (eval $ac_try) 2>&5
6361   ac_status=$?
6362   echo "$as_me:6362: \$? = $ac_status" >&5
6363   (exit $ac_status); }; }; then
6364   break
6365 else
6366   echo "$as_me: failed program was:" >&5
6367 cat conftest.$ac_ext >&5
6368 fi
6369 rm -f conftest.$ac_objext conftest.$ac_ext
6370                         done
6371                         CFLAGS="$cf_save_CFLAGS"
6372                         CC_SHARED_OPTS=$cf_shared_opts
6373                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6374                 else
6375                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6376                 fi
6377                 ;;
6378         (sysv5uw7*|unix_sv*)
6379                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6380                 if test "$GCC" != yes; then
6381                         CC_SHARED_OPTS='-KPIC'
6382                 fi
6383                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6384                 ;;
6385         (*)
6386                 CC_SHARED_OPTS='unknown'
6387                 MK_SHARED_LIB='echo unknown'
6388                 ;;
6389         esac
6390
6391         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6392         case "$cf_cv_shlib_version" in
6393         (rel|abi)
6394                 case "$MK_SHARED_LIB" in
6395                 (*'-o $@')
6396                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6397                         ;;
6398                 (*)
6399                         { echo "$as_me:6399: WARNING: ignored --with-shlib-version" >&5
6400 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6401                         ;;
6402                 esac
6403                 ;;
6404         esac
6405
6406         if test -n "$cf_try_cflags"
6407         then
6408 cat > conftest.$ac_ext <<EOF
6409 #line 6409 "${as_me:-configure}"
6410 #include <stdio.h>
6411 int main(int argc, char *argv[])
6412 {
6413         printf("hello\n");
6414         return (argv[argc-1] == 0) ;
6415 }
6416 EOF
6417                 cf_save_CFLAGS="$CFLAGS"
6418                 for cf_opt in $cf_try_cflags
6419                 do
6420                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6421                         echo "$as_me:6421: checking if CFLAGS option -$cf_opt works" >&5
6422 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6423                         if { (eval echo "$as_me:6423: \"$ac_compile\"") >&5
6424   (eval $ac_compile) 2>&5
6425   ac_status=$?
6426   echo "$as_me:6426: \$? = $ac_status" >&5
6427   (exit $ac_status); }; then
6428                                 echo "$as_me:6428: result: yes" >&5
6429 echo "${ECHO_T}yes" >&6
6430                                 cf_save_CFLAGS="$CFLAGS"
6431                         else
6432                                 echo "$as_me:6432: result: no" >&5
6433 echo "${ECHO_T}no" >&6
6434                         fi
6435                 done
6436                 CFLAGS="$cf_save_CFLAGS"
6437         fi
6438
6439         # RPATH_LIST is a colon-separated list of directories
6440         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6441         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6442
6443         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6444
6445         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6446
6447 echo "${as_me:-configure}:6447: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6448
6449         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6450
6451 echo "${as_me:-configure}:6451: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6452
6453 for model in $cf_list_models; do
6454         case $model in
6455         (libtool)
6456
6457 echo "$as_me:6457: checking for additional libtool options" >&5
6458 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6459
6460 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6461 if test "${with_libtool_opts+set}" = set; then
6462   withval="$with_libtool_opts"
6463   with_libtool_opts=$withval
6464 else
6465   with_libtool_opts=no
6466 fi;
6467 echo "$as_me:6467: result: $with_libtool_opts" >&5
6468 echo "${ECHO_T}$with_libtool_opts" >&6
6469
6470 case .$with_libtool_opts in
6471 (.yes|.no|.)
6472         ;;
6473 (*)
6474         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6475         ;;
6476 esac
6477
6478 echo "$as_me:6478: checking if exported-symbols file should be used" >&5
6479 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6480
6481 # Check whether --with-export-syms or --without-export-syms was given.
6482 if test "${with_export_syms+set}" = set; then
6483   withval="$with_export_syms"
6484   with_export_syms=$withval
6485 else
6486   with_export_syms=no
6487 fi;
6488 if test "x$with_export_syms" = xyes
6489 then
6490         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6491
6492 fi
6493 echo "$as_me:6493: result: $with_export_syms" >&5
6494 echo "${ECHO_T}$with_export_syms" >&6
6495 if test "x$with_export_syms" != xno
6496 then
6497         EXPORT_SYMS="-export-symbols $with_export_syms"
6498
6499 fi
6500
6501                 ;;
6502         (shared)
6503                 if test "$CC_SHARED_OPTS" = "unknown"; then
6504                         { { echo "$as_me:6504: error: Shared libraries are not supported in this version" >&5
6505 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6506    { (exit 1); exit 1; }; }
6507                 fi
6508
6509 echo "$as_me:6509: checking if versioned-symbols file should be used" >&5
6510 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6511
6512 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6513 if test "${with_versioned_syms+set}" = set; then
6514   withval="$with_versioned_syms"
6515   with_versioned_syms=$withval
6516 else
6517   with_versioned_syms=no
6518 fi;
6519 if test "x$with_versioned_syms" = xyes
6520 then
6521         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6522
6523 fi
6524 echo "$as_me:6524: result: $with_versioned_syms" >&5
6525 echo "${ECHO_T}$with_versioned_syms" >&6
6526
6527 RESULTING_SYMS=
6528 VERSIONED_SYMS=
6529 WILDCARD_SYMS=
6530
6531 if test "x$with_versioned_syms" != xno
6532 then
6533         RESULTING_SYMS=$with_versioned_syms
6534         case "x$MK_SHARED_LIB" in
6535         (*-Wl,*)
6536                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6537                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6538                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6539
6540 echo "${as_me:-configure}:6540: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6541
6542                 ;;
6543         (*-dy\ *)
6544                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6545                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6546                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6547
6548 echo "${as_me:-configure}:6548: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6549
6550                 ;;
6551         (*)
6552                 { echo "$as_me:6552: WARNING: this system does not support versioned-symbols" >&5
6553 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6554                 ;;
6555         esac
6556
6557         # Linux ld can selectively override scope, e.g., of symbols beginning with
6558         # "_" by first declaring some as global, and then using a wildcard to
6559         # declare the others as local.  Some other loaders cannot do this.  Check
6560         # by constructing a (very) simple shared library and inspecting its
6561         # symbols.
6562         if test "x$VERSIONED_SYMS" != "x"
6563         then
6564                 echo "$as_me:6564: checking if wildcards can be used to selectively omit symbols" >&5
6565 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6566                 WILDCARD_SYMS=no
6567
6568                 # make sources
6569                 rm -f conftest.*
6570
6571                 cat >conftest.ver <<EOF
6572 module_1.0 {
6573 global:
6574         globalf1;
6575 local:
6576         localf1;
6577 };
6578 module_2.0 {
6579 global:
6580         globalf2;
6581 local:
6582         localf2;
6583         _*;
6584 } module_1.0;
6585 submodule_1.0 {
6586 global:
6587         subglobalf1;
6588         _ismissing;
6589 local:
6590         sublocalf1;
6591 };
6592 submodule_2.0 {
6593 global:
6594         subglobalf2;
6595 local:
6596         sublocalf2;
6597         _*;
6598 } submodule_1.0;
6599 EOF
6600                 cat >conftest.$ac_ext <<EOF
6601 #line 6601 "configure"
6602 int     _ismissing(void) { return 1; }
6603 int     _localf1(void) { return 1; }
6604 int     _localf2(void) { return 2; }
6605 int     globalf1(void) { return 1; }
6606 int     globalf2(void) { return 2; }
6607 int     _sublocalf1(void) { return 1; }
6608 int     _sublocalf2(void) { return 2; }
6609 int     subglobalf1(void) { return 1; }
6610 int     subglobalf2(void) { return 2; }
6611 EOF
6612                 cat >conftest.mk <<EOF
6613 CC=${CC}
6614 CFLAGS=${CFLAGS}
6615 CPPFLAGS=${CPPFLAGS}
6616 LDFLAGS=${LDFLAGS}
6617 LIBS=${LIBS}
6618 VERSIONED_SYMS=${VERSIONED_SYMS}
6619 RESULTING_SYMS=conftest.ver
6620 MK_SHARED_LIB=${MK_SHARED_LIB}
6621 conftest.so: conftest.$ac_cv_objext
6622                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6623 EOF
6624
6625                 # compile source, make library
6626                 if make -f conftest.mk 2>&5 >/dev/null
6627                 then
6628                         # test for missing symbol
6629                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ]T[     ]'`
6630                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6631                 fi
6632                 echo "$as_me:6632: result: $WILDCARD_SYMS" >&5
6633 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6634                 rm -f conftest.*
6635         fi
6636 fi
6637
6638                 ;;
6639         esac
6640 done
6641
6642 # pretend that ncurses==ncursesw==ncursest
6643 echo "$as_me:6643: checking if you want to disable library suffixes" >&5
6644 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6645
6646 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6647 if test "${enable_lib_suffixes+set}" = set; then
6648   enableval="$enable_lib_suffixes"
6649   test "$enableval" != no && enableval=yes
6650   if test "$enableval" != "yes" ; then
6651     disable_lib_suffixes=yes
6652   else
6653     disable_lib_suffixes=no
6654   fi
6655 else
6656   enableval=yes
6657   disable_lib_suffixes=no
6658
6659 fi;
6660 echo "$as_me:6660: result: $disable_lib_suffixes" >&5
6661 echo "${ECHO_T}$disable_lib_suffixes" >&6
6662
6663 ### If we're building with rpath, try to link non-standard libs that way too.
6664 if test "$DFT_LWR_MODEL" = "shared"; then
6665
6666 echo "$as_me:6666: checking if rpath-hack should be disabled" >&5
6667 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6668
6669 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6670 if test "${enable_rpath_hack+set}" = set; then
6671   enableval="$enable_rpath_hack"
6672   test "$enableval" != no && enableval=yes
6673   if test "$enableval" != "yes" ; then
6674     cf_disable_rpath_hack=yes
6675   else
6676     cf_disable_rpath_hack=no
6677   fi
6678 else
6679   enableval=yes
6680   cf_disable_rpath_hack=no
6681
6682 fi;
6683 echo "$as_me:6683: result: $cf_disable_rpath_hack" >&5
6684 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6685 if test "$cf_disable_rpath_hack" = no ; then
6686
6687 echo "$as_me:6687: checking for updated LDFLAGS" >&5
6688 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6689 if test -n "$LD_RPATH_OPT" ; then
6690         echo "$as_me:6690: result: maybe" >&5
6691 echo "${ECHO_T}maybe" >&6
6692
6693         for ac_prog in ldd
6694 do
6695   # Extract the first word of "$ac_prog", so it can be a program name with args.
6696 set dummy $ac_prog; ac_word=$2
6697 echo "$as_me:6697: checking for $ac_word" >&5
6698 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6699 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6700   echo $ECHO_N "(cached) $ECHO_C" >&6
6701 else
6702   if test -n "$cf_ldd_prog"; then
6703   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6704 else
6705   ac_save_IFS=$IFS; IFS=$ac_path_separator
6706 ac_dummy="$PATH"
6707 for ac_dir in $ac_dummy; do
6708   IFS=$ac_save_IFS
6709   test -z "$ac_dir" && ac_dir=.
6710   $as_executable_p "$ac_dir/$ac_word" || continue
6711 ac_cv_prog_cf_ldd_prog="$ac_prog"
6712 echo "$as_me:6712: found $ac_dir/$ac_word" >&5
6713 break
6714 done
6715
6716 fi
6717 fi
6718 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6719 if test -n "$cf_ldd_prog"; then
6720   echo "$as_me:6720: result: $cf_ldd_prog" >&5
6721 echo "${ECHO_T}$cf_ldd_prog" >&6
6722 else
6723   echo "$as_me:6723: result: no" >&5
6724 echo "${ECHO_T}no" >&6
6725 fi
6726
6727   test -n "$cf_ldd_prog" && break
6728 done
6729 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6730
6731         cf_rpath_list="/usr/lib /lib"
6732         if test "$cf_ldd_prog" != no
6733         then
6734                 cf_rpath_oops=
6735
6736 cat >conftest.$ac_ext <<_ACEOF
6737 #line 6737 "configure"
6738 #include "confdefs.h"
6739 #include <stdio.h>
6740 int
6741 main ()
6742 {
6743 printf("Hello");
6744   ;
6745   return 0;
6746 }
6747 _ACEOF
6748 rm -f conftest.$ac_objext conftest$ac_exeext
6749 if { (eval echo "$as_me:6749: \"$ac_link\"") >&5
6750   (eval $ac_link) 2>&5
6751   ac_status=$?
6752   echo "$as_me:6752: \$? = $ac_status" >&5
6753   (exit $ac_status); } &&
6754          { ac_try='test -s conftest$ac_exeext'
6755   { (eval echo "$as_me:6755: \"$ac_try\"") >&5
6756   (eval $ac_try) 2>&5
6757   ac_status=$?
6758   echo "$as_me:6758: \$? = $ac_status" >&5
6759   (exit $ac_status); }; }; then
6760   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6761                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6762 else
6763   echo "$as_me: failed program was:" >&5
6764 cat conftest.$ac_ext >&5
6765 fi
6766 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6767
6768                 # If we passed the link-test, but get a "not found" on a given library,
6769                 # this could be due to inept reconfiguration of gcc to make it only
6770                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6771                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6772                 # /usr/local libraries.
6773                 if test -n "$cf_rpath_oops"
6774                 then
6775                         for cf_rpath_src in $cf_rpath_oops
6776                         do
6777                                 for cf_rpath_dir in \
6778                                         /usr/local \
6779                                         /usr/pkg \
6780                                         /opt/sfw
6781                                 do
6782                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6783                                         then
6784                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6785
6786 echo "${as_me:-configure}:6786: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6787
6788                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6789                                                 break
6790                                         fi
6791                                 done
6792                         done
6793                 fi
6794         fi
6795
6796         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6797
6798 echo "${as_me:-configure}:6798: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6799
6800 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6801
6802 echo "${as_me:-configure}:6802: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6803
6804 cf_rpath_dst=
6805 for cf_rpath_src in $LDFLAGS
6806 do
6807         case $cf_rpath_src in
6808         (-L*)
6809
6810                 # check if this refers to a directory which we will ignore
6811                 cf_rpath_skip=no
6812                 if test -n "$cf_rpath_list"
6813                 then
6814                         for cf_rpath_item in $cf_rpath_list
6815                         do
6816                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6817                                 then
6818                                         cf_rpath_skip=yes
6819                                         break
6820                                 fi
6821                         done
6822                 fi
6823
6824                 if test "$cf_rpath_skip" = no
6825                 then
6826                         # transform the option
6827                         if test "$LD_RPATH_OPT" = "-R " ; then
6828                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6829                         else
6830                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6831                         fi
6832
6833                         # if we have not already added this, add it now
6834                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6835                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6836                         then
6837                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6838
6839 echo "${as_me:-configure}:6839: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6840
6841                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6842                         fi
6843                 fi
6844                 ;;
6845         esac
6846         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6847 done
6848 LDFLAGS=$cf_rpath_dst
6849
6850 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6851
6852 echo "${as_me:-configure}:6852: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6853
6854 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6855
6856 echo "${as_me:-configure}:6856: testing ...checking LIBS $LIBS ..." 1>&5
6857
6858 cf_rpath_dst=
6859 for cf_rpath_src in $LIBS
6860 do
6861         case $cf_rpath_src in
6862         (-L*)
6863
6864                 # check if this refers to a directory which we will ignore
6865                 cf_rpath_skip=no
6866                 if test -n "$cf_rpath_list"
6867                 then
6868                         for cf_rpath_item in $cf_rpath_list
6869                         do
6870                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6871                                 then
6872                                         cf_rpath_skip=yes
6873                                         break
6874                                 fi
6875                         done
6876                 fi
6877
6878                 if test "$cf_rpath_skip" = no
6879                 then
6880                         # transform the option
6881                         if test "$LD_RPATH_OPT" = "-R " ; then
6882                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6883                         else
6884                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6885                         fi
6886
6887                         # if we have not already added this, add it now
6888                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6889                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6890                         then
6891                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6892
6893 echo "${as_me:-configure}:6893: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6894
6895                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6896                         fi
6897                 fi
6898                 ;;
6899         esac
6900         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6901 done
6902 LIBS=$cf_rpath_dst
6903
6904 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6905
6906 echo "${as_me:-configure}:6906: testing ...checked LIBS $LIBS ..." 1>&5
6907
6908         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6909
6910 echo "${as_me:-configure}:6910: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6911
6912 else
6913         echo "$as_me:6913: result: no" >&5
6914 echo "${ECHO_T}no" >&6
6915 fi
6916
6917 fi
6918
6919 fi
6920
6921 ###############################################################################
6922
6923 ###     use option --with-extra-suffix to append suffix to headers and libraries
6924 echo "$as_me:6924: checking if you wish to append extra suffix to header/library paths" >&5
6925 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
6926 EXTRA_SUFFIX=
6927
6928 # Check whether --with-extra-suffix or --without-extra-suffix was given.
6929 if test "${with_extra_suffix+set}" = set; then
6930   withval="$with_extra_suffix"
6931   case x$withval in
6932         (no)
6933                 ;;
6934         (xyes|x)
6935                 EXTRA_SUFFIX=$cf_cv_abi_version
6936                 ;;
6937         (*)
6938                 EXTRA_SUFFIX=$withval
6939                 ;;
6940         esac
6941
6942 fi;
6943 echo "$as_me:6943: result: $EXTRA_SUFFIX" >&5
6944 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
6945
6946 ###     use option --disable-overwrite to leave out the link to -lcurses
6947 echo "$as_me:6947: checking if you wish to install ncurses overwriting curses" >&5
6948 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6949
6950 # Check whether --enable-overwrite or --disable-overwrite was given.
6951 if test "${enable_overwrite+set}" = set; then
6952   enableval="$enable_overwrite"
6953   with_overwrite=$enableval
6954 else
6955   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6956 fi;
6957 echo "$as_me:6957: result: $with_overwrite" >&5
6958 echo "${ECHO_T}$with_overwrite" >&6
6959
6960 echo "$as_me:6960: checking if external terminfo-database is used" >&5
6961 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6962
6963 # Check whether --enable-database or --disable-database was given.
6964 if test "${enable_database+set}" = set; then
6965   enableval="$enable_database"
6966   use_database=$enableval
6967 else
6968   use_database=yes
6969 fi;
6970 echo "$as_me:6970: result: $use_database" >&5
6971 echo "${ECHO_T}$use_database" >&6
6972
6973 case $host_os in
6974 (os2*)
6975         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6976         ;;
6977 (*)
6978         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6979         ;;
6980 esac
6981
6982 NCURSES_USE_DATABASE=0
6983 if test "$use_database" != no ; then
6984         NCURSES_USE_DATABASE=1
6985
6986         echo "$as_me:6986: checking which terminfo source-file will be installed" >&5
6987 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6988
6989 # Check whether --with-database or --without-database was given.
6990 if test "${with_database+set}" = set; then
6991   withval="$with_database"
6992   TERMINFO_SRC=$withval
6993 fi;
6994         echo "$as_me:6994: result: $TERMINFO_SRC" >&5
6995 echo "${ECHO_T}$TERMINFO_SRC" >&6
6996
6997         echo "$as_me:6997: checking whether to use hashed database instead of directory/tree" >&5
6998 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6999
7000 # Check whether --with-hashed-db or --without-hashed-db was given.
7001 if test "${with_hashed_db+set}" = set; then
7002   withval="$with_hashed_db"
7003
7004 else
7005   with_hashed_db=no
7006 fi;
7007         echo "$as_me:7007: result: $with_hashed_db" >&5
7008 echo "${ECHO_T}$with_hashed_db" >&6
7009 else
7010         with_hashed_db=no
7011 fi
7012
7013 echo "$as_me:7013: checking for list of fallback descriptions" >&5
7014 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7015
7016 # Check whether --with-fallbacks or --without-fallbacks was given.
7017 if test "${with_fallbacks+set}" = set; then
7018   withval="$with_fallbacks"
7019   with_fallback=$withval
7020 else
7021   with_fallback=
7022 fi;
7023 echo "$as_me:7023: result: $with_fallback" >&5
7024 echo "${ECHO_T}$with_fallback" >&6
7025 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
7026
7027 echo "$as_me:7027: checking if you want modern xterm or antique" >&5
7028 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7029
7030 # Check whether --with-xterm-new or --without-xterm-new was given.
7031 if test "${with_xterm_new+set}" = set; then
7032   withval="$with_xterm_new"
7033   with_xterm_new=$withval
7034 else
7035   with_xterm_new=yes
7036 fi;
7037 case $with_xterm_new in
7038 (no) with_xterm_new=xterm-old;;
7039 (*)      with_xterm_new=xterm-new;;
7040 esac
7041 echo "$as_me:7041: result: $with_xterm_new" >&5
7042 echo "${ECHO_T}$with_xterm_new" >&6
7043 WHICH_XTERM=$with_xterm_new
7044
7045 echo "$as_me:7045: checking if xterm backspace sends BS or DEL" >&5
7046 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7047
7048 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7049 if test "${with_xterm_kbs+set}" = set; then
7050   withval="$with_xterm_kbs"
7051   with_xterm_kbs=$withval
7052 else
7053   with_xterm_kbs=BS
7054 fi;
7055 case x$with_xterm_kbs in
7056 (xyes|xno|xBS|xbs|x8)
7057         with_xterm_kbs=BS
7058         ;;
7059 (xDEL|xdel|x127)
7060         with_xterm_kbs=DEL
7061         ;;
7062 (*)
7063         with_xterm_kbs=$withval
7064         ;;
7065 esac
7066 echo "$as_me:7066: result: $with_xterm_kbs" >&5
7067 echo "${ECHO_T}$with_xterm_kbs" >&6
7068 XTERM_KBS=$with_xterm_kbs
7069
7070 MAKE_TERMINFO=
7071 if test "$use_database" = no ; then
7072         TERMINFO="${datadir}/terminfo"
7073         MAKE_TERMINFO="#"
7074 else
7075
7076 echo "$as_me:7076: checking for list of terminfo directories" >&5
7077 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7078
7079 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7080 if test "${with_terminfo_dirs+set}" = set; then
7081   withval="$with_terminfo_dirs"
7082
7083 else
7084   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7085 fi;
7086 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7087 cf_dst_path=
7088 for cf_src_path in $withval
7089 do
7090
7091 if test "x$prefix" != xNONE; then
7092         cf_path_syntax="$prefix"
7093 else
7094         cf_path_syntax="$ac_default_prefix"
7095 fi
7096
7097 case ".$cf_src_path" in
7098 (.\$\(*\)*|.\'*\'*)
7099         ;;
7100 (..|./*|.\\*)
7101         ;;
7102 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7103         ;;
7104 (.\${*prefix}*|.\${*dir}*)
7105         eval cf_src_path="$cf_src_path"
7106         case ".$cf_src_path" in
7107         (.NONE/*)
7108                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7109                 ;;
7110         esac
7111         ;;
7112 (.no|.NONE/*)
7113         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7114         ;;
7115 (*)
7116         { { echo "$as_me:7116: error: expected a pathname, not \"$cf_src_path\"" >&5
7117 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7118    { (exit 1); exit 1; }; }
7119         ;;
7120 esac
7121
7122   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7123   cf_dst_path="${cf_dst_path}${cf_src_path}"
7124 done
7125 IFS="$ac_save_ifs"
7126
7127 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7128 # so we have to check/work around.  We do prefer the result of "eval"...
7129 eval cf_dst_eval="$cf_dst_path"
7130 case "x$cf_dst_eval" in
7131 (xNONE*)
7132         TERMINFO_DIRS=$cf_dst_path
7133         ;;
7134 (*)
7135         TERMINFO_DIRS="$cf_dst_eval"
7136         ;;
7137 esac
7138
7139 echo "$as_me:7139: result: $TERMINFO_DIRS" >&5
7140 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7141 test -n "$TERMINFO_DIRS" &&
7142 cat >>confdefs.h <<EOF
7143 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7144 EOF
7145
7146 echo "$as_me:7146: checking for default terminfo directory" >&5
7147 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7148
7149 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7150 if test "${with_default_terminfo_dir+set}" = set; then
7151   withval="$with_default_terminfo_dir"
7152
7153 else
7154   withval="${TERMINFO:-${datadir}/terminfo}"
7155 fi; if test -n "${datadir}/terminfo" ; then
7156
7157 if test "x$prefix" != xNONE; then
7158         cf_path_syntax="$prefix"
7159 else
7160         cf_path_syntax="$ac_default_prefix"
7161 fi
7162
7163 case ".$withval" in
7164 (.\$\(*\)*|.\'*\'*)
7165         ;;
7166 (..|./*|.\\*)
7167         ;;
7168 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7169         ;;
7170 (.\${*prefix}*|.\${*dir}*)
7171         eval withval="$withval"
7172         case ".$withval" in
7173         (.NONE/*)
7174                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7175                 ;;
7176         esac
7177         ;;
7178 (.no|.NONE/*)
7179         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7180         ;;
7181 (*)
7182         { { echo "$as_me:7182: error: expected a pathname, not \"$withval\"" >&5
7183 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7184    { (exit 1); exit 1; }; }
7185         ;;
7186 esac
7187
7188 fi
7189 eval TERMINFO="$withval"
7190
7191 echo "$as_me:7191: result: $TERMINFO" >&5
7192 echo "${ECHO_T}$TERMINFO" >&6
7193
7194 cat >>confdefs.h <<EOF
7195 #define TERMINFO "$TERMINFO"
7196 EOF
7197
7198 fi
7199
7200 ###     use option --disable-big-core to make tic run on small machines
7201 ###     We need 4Mb, check if we can allocate 50% more than that.
7202 echo "$as_me:7202: checking if big-core option selected" >&5
7203 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7204
7205 # Check whether --enable-big-core or --disable-big-core was given.
7206 if test "${enable_big_core+set}" = set; then
7207   enableval="$enable_big_core"
7208   with_big_core=$enableval
7209 else
7210   if test "$cross_compiling" = yes; then
7211   with_big_core=no
7212 else
7213   cat >conftest.$ac_ext <<_ACEOF
7214 #line 7214 "configure"
7215 #include "confdefs.h"
7216
7217 #include <stdlib.h>
7218 #include <string.h>
7219 int main() {
7220         unsigned long n = 6000000L;
7221         char *s = malloc(n);
7222         if (s != 0)
7223                 s[0] = s[n-1] = 0;
7224         ${cf_cv_main_return:-return}(s == 0);
7225 }
7226 _ACEOF
7227 rm -f conftest$ac_exeext
7228 if { (eval echo "$as_me:7228: \"$ac_link\"") >&5
7229   (eval $ac_link) 2>&5
7230   ac_status=$?
7231   echo "$as_me:7231: \$? = $ac_status" >&5
7232   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7233   { (eval echo "$as_me:7233: \"$ac_try\"") >&5
7234   (eval $ac_try) 2>&5
7235   ac_status=$?
7236   echo "$as_me:7236: \$? = $ac_status" >&5
7237   (exit $ac_status); }; }; then
7238   with_big_core=yes
7239 else
7240   echo "$as_me: program exited with status $ac_status" >&5
7241 echo "$as_me: failed program was:" >&5
7242 cat conftest.$ac_ext >&5
7243 with_big_core=no
7244 fi
7245 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7246 fi
7247 fi;
7248 echo "$as_me:7248: result: $with_big_core" >&5
7249 echo "${ECHO_T}$with_big_core" >&6
7250 test "x$with_big_core" = "xyes" &&
7251 cat >>confdefs.h <<\EOF
7252 #define HAVE_BIG_CORE 1
7253 EOF
7254
7255 ### ISO C only guarantees 512-char strings, we have tables which load faster
7256 ### when constructed using "big" strings.  More than the C compiler, the awk
7257 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7258 echo "$as_me:7258: checking if big-strings option selected" >&5
7259 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7260
7261 # Check whether --enable-big-strings or --disable-big-strings was given.
7262 if test "${enable_big_strings+set}" = set; then
7263   enableval="$enable_big_strings"
7264   with_big_strings=$enableval
7265 else
7266
7267         case x$AWK in
7268         (x)
7269                 eval with_big_strings=no
7270                 ;;
7271         (*)
7272                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7273                         | $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
7274                         eval with_big_strings=yes
7275                 else
7276                         eval with_big_strings=no
7277                 fi
7278                 ;;
7279         esac
7280
7281 fi;
7282 echo "$as_me:7282: result: $with_big_strings" >&5
7283 echo "${ECHO_T}$with_big_strings" >&6
7284
7285 USE_BIG_STRINGS=0
7286 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7287
7288 ###     use option --enable-termcap to compile in the termcap fallback support
7289 echo "$as_me:7289: checking if you want termcap-fallback support" >&5
7290 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7291
7292 # Check whether --enable-termcap or --disable-termcap was given.
7293 if test "${enable_termcap+set}" = set; then
7294   enableval="$enable_termcap"
7295   with_termcap=$enableval
7296 else
7297   with_termcap=no
7298 fi;
7299 echo "$as_me:7299: result: $with_termcap" >&5
7300 echo "${ECHO_T}$with_termcap" >&6
7301
7302 NCURSES_USE_TERMCAP=0
7303 if test "x$with_termcap" != "xyes" ; then
7304         if test "$use_database" = no ; then
7305                 if test -z "$with_fallback" ; then
7306                         { { echo "$as_me:7306: error: You have disabled the database w/o specifying fallbacks" >&5
7307 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7308    { (exit 1); exit 1; }; }
7309                 fi
7310         fi
7311
7312 cat >>confdefs.h <<\EOF
7313 #define PURE_TERMINFO 1
7314 EOF
7315
7316 else
7317
7318         if test "$with_ticlib" != no ; then
7319                 { { echo "$as_me:7319: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7320 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7321    { (exit 1); exit 1; }; }
7322         fi
7323
7324         NCURSES_USE_TERMCAP=1
7325         echo "$as_me:7325: checking for list of termcap files" >&5
7326 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7327
7328 # Check whether --with-termpath or --without-termpath was given.
7329 if test "${with_termpath+set}" = set; then
7330   withval="$with_termpath"
7331
7332 else
7333   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7334 fi;
7335 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7336 cf_dst_path=
7337 for cf_src_path in $withval
7338 do
7339
7340 if test "x$prefix" != xNONE; then
7341         cf_path_syntax="$prefix"
7342 else
7343         cf_path_syntax="$ac_default_prefix"
7344 fi
7345
7346 case ".$cf_src_path" in
7347 (.\$\(*\)*|.\'*\'*)
7348         ;;
7349 (..|./*|.\\*)
7350         ;;
7351 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7352         ;;
7353 (.\${*prefix}*|.\${*dir}*)
7354         eval cf_src_path="$cf_src_path"
7355         case ".$cf_src_path" in
7356         (.NONE/*)
7357                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7358                 ;;
7359         esac
7360         ;;
7361 (.no|.NONE/*)
7362         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7363         ;;
7364 (*)
7365         { { echo "$as_me:7365: error: expected a pathname, not \"$cf_src_path\"" >&5
7366 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7367    { (exit 1); exit 1; }; }
7368         ;;
7369 esac
7370
7371   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7372   cf_dst_path="${cf_dst_path}${cf_src_path}"
7373 done
7374 IFS="$ac_save_ifs"
7375
7376 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7377 # so we have to check/work around.  We do prefer the result of "eval"...
7378 eval cf_dst_eval="$cf_dst_path"
7379 case "x$cf_dst_eval" in
7380 (xNONE*)
7381         TERMPATH=$cf_dst_path
7382         ;;
7383 (*)
7384         TERMPATH="$cf_dst_eval"
7385         ;;
7386 esac
7387
7388         echo "$as_me:7388: result: $TERMPATH" >&5
7389 echo "${ECHO_T}$TERMPATH" >&6
7390         test -n "$TERMPATH" &&
7391 cat >>confdefs.h <<EOF
7392 #define TERMPATH "$TERMPATH"
7393 EOF
7394
7395         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7396         echo "$as_me:7396: checking if fast termcap-loader is needed" >&5
7397 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7398
7399 # Check whether --enable-getcap or --disable-getcap was given.
7400 if test "${enable_getcap+set}" = set; then
7401   enableval="$enable_getcap"
7402   with_getcap=$enableval
7403 else
7404   with_getcap=no
7405 fi;
7406         echo "$as_me:7406: result: $with_getcap" >&5
7407 echo "${ECHO_T}$with_getcap" >&6
7408         test "x$with_getcap" = "xyes" &&
7409 cat >>confdefs.h <<\EOF
7410 #define USE_GETCAP 1
7411 EOF
7412
7413         echo "$as_me:7413: checking if translated termcaps will be cached in ~/.terminfo" >&5
7414 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7415
7416 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7417 if test "${enable_getcap_cache+set}" = set; then
7418   enableval="$enable_getcap_cache"
7419   with_getcap_cache=$enableval
7420 else
7421   with_getcap_cache=no
7422 fi;
7423         echo "$as_me:7423: result: $with_getcap_cache" >&5
7424 echo "${ECHO_T}$with_getcap_cache" >&6
7425         test "x$with_getcap_cache" = "xyes" &&
7426 cat >>confdefs.h <<\EOF
7427 #define USE_GETCAP_CACHE 1
7428 EOF
7429
7430 fi
7431
7432 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7433 echo "$as_me:7433: checking if ~/.terminfo is wanted" >&5
7434 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7435
7436 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7437 if test "${enable_home_terminfo+set}" = set; then
7438   enableval="$enable_home_terminfo"
7439   with_home_terminfo=$enableval
7440 else
7441   with_home_terminfo=yes
7442 fi;
7443 echo "$as_me:7443: result: $with_home_terminfo" >&5
7444 echo "${ECHO_T}$with_home_terminfo" >&6
7445 test "x$with_home_terminfo" = "xyes" &&
7446 cat >>confdefs.h <<\EOF
7447 #define USE_HOME_TERMINFO 1
7448 EOF
7449
7450 echo "$as_me:7450: checking if you want to use restricted environment when running as root" >&5
7451 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7452
7453 # Check whether --enable-root-environ or --disable-root-environ was given.
7454 if test "${enable_root_environ+set}" = set; then
7455   enableval="$enable_root_environ"
7456   with_root_environ=$enableval
7457 else
7458   with_root_environ=yes
7459 fi;
7460 echo "$as_me:7460: result: $with_root_environ" >&5
7461 echo "${ECHO_T}$with_root_environ" >&6
7462 test "x$with_root_environ" = xyes &&
7463 cat >>confdefs.h <<\EOF
7464 #define USE_ROOT_ENVIRON 1
7465 EOF
7466
7467 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7468 ###   to reduce storage requirements for the terminfo database.
7469
7470 for ac_func in \
7471         remove \
7472         unlink
7473 do
7474 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7475 echo "$as_me:7475: checking for $ac_func" >&5
7476 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7477 if eval "test \"\${$as_ac_var+set}\" = set"; then
7478   echo $ECHO_N "(cached) $ECHO_C" >&6
7479 else
7480   cat >conftest.$ac_ext <<_ACEOF
7481 #line 7481 "configure"
7482 #include "confdefs.h"
7483 /* System header to define __stub macros and hopefully few prototypes,
7484     which can conflict with char $ac_func (); below.  */
7485 #include <assert.h>
7486 /* Override any gcc2 internal prototype to avoid an error.  */
7487 #ifdef __cplusplus
7488 extern "C"
7489 #endif
7490 /* We use char because int might match the return type of a gcc2
7491    builtin and then its argument prototype would still apply.  */
7492 char $ac_func ();
7493 char (*f) ();
7494
7495 int
7496 main ()
7497 {
7498 /* The GNU C library defines this for functions which it implements
7499     to always fail with ENOSYS.  Some functions are actually named
7500     something starting with __ and the normal name is an alias.  */
7501 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7502 choke me
7503 #else
7504 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7505 #endif
7506
7507   ;
7508   return 0;
7509 }
7510 _ACEOF
7511 rm -f conftest.$ac_objext conftest$ac_exeext
7512 if { (eval echo "$as_me:7512: \"$ac_link\"") >&5
7513   (eval $ac_link) 2>&5
7514   ac_status=$?
7515   echo "$as_me:7515: \$? = $ac_status" >&5
7516   (exit $ac_status); } &&
7517          { ac_try='test -s conftest$ac_exeext'
7518   { (eval echo "$as_me:7518: \"$ac_try\"") >&5
7519   (eval $ac_try) 2>&5
7520   ac_status=$?
7521   echo "$as_me:7521: \$? = $ac_status" >&5
7522   (exit $ac_status); }; }; then
7523   eval "$as_ac_var=yes"
7524 else
7525   echo "$as_me: failed program was:" >&5
7526 cat conftest.$ac_ext >&5
7527 eval "$as_ac_var=no"
7528 fi
7529 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7530 fi
7531 echo "$as_me:7531: result: `eval echo '${'$as_ac_var'}'`" >&5
7532 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7533 if test `eval echo '${'$as_ac_var'}'` = yes; then
7534   cat >>confdefs.h <<EOF
7535 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7536 EOF
7537
7538 fi
7539 done
7540
7541 if test "$cross_compiling" = yes ; then
7542
7543 for ac_func in \
7544                 link \
7545                 symlink
7546 do
7547 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7548 echo "$as_me:7548: checking for $ac_func" >&5
7549 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7550 if eval "test \"\${$as_ac_var+set}\" = set"; then
7551   echo $ECHO_N "(cached) $ECHO_C" >&6
7552 else
7553   cat >conftest.$ac_ext <<_ACEOF
7554 #line 7554 "configure"
7555 #include "confdefs.h"
7556 /* System header to define __stub macros and hopefully few prototypes,
7557     which can conflict with char $ac_func (); below.  */
7558 #include <assert.h>
7559 /* Override any gcc2 internal prototype to avoid an error.  */
7560 #ifdef __cplusplus
7561 extern "C"
7562 #endif
7563 /* We use char because int might match the return type of a gcc2
7564    builtin and then its argument prototype would still apply.  */
7565 char $ac_func ();
7566 char (*f) ();
7567
7568 int
7569 main ()
7570 {
7571 /* The GNU C library defines this for functions which it implements
7572     to always fail with ENOSYS.  Some functions are actually named
7573     something starting with __ and the normal name is an alias.  */
7574 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7575 choke me
7576 #else
7577 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7578 #endif
7579
7580   ;
7581   return 0;
7582 }
7583 _ACEOF
7584 rm -f conftest.$ac_objext conftest$ac_exeext
7585 if { (eval echo "$as_me:7585: \"$ac_link\"") >&5
7586   (eval $ac_link) 2>&5
7587   ac_status=$?
7588   echo "$as_me:7588: \$? = $ac_status" >&5
7589   (exit $ac_status); } &&
7590          { ac_try='test -s conftest$ac_exeext'
7591   { (eval echo "$as_me:7591: \"$ac_try\"") >&5
7592   (eval $ac_try) 2>&5
7593   ac_status=$?
7594   echo "$as_me:7594: \$? = $ac_status" >&5
7595   (exit $ac_status); }; }; then
7596   eval "$as_ac_var=yes"
7597 else
7598   echo "$as_me: failed program was:" >&5
7599 cat conftest.$ac_ext >&5
7600 eval "$as_ac_var=no"
7601 fi
7602 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7603 fi
7604 echo "$as_me:7604: result: `eval echo '${'$as_ac_var'}'`" >&5
7605 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7606 if test `eval echo '${'$as_ac_var'}'` = yes; then
7607   cat >>confdefs.h <<EOF
7608 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7609 EOF
7610
7611 fi
7612 done
7613
7614 else
7615         echo "$as_me:7615: checking if link/symlink functions work" >&5
7616 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7617 if test "${cf_cv_link_funcs+set}" = set; then
7618   echo $ECHO_N "(cached) $ECHO_C" >&6
7619 else
7620
7621                 cf_cv_link_funcs=
7622                 for cf_func in link symlink ; do
7623                         if test "$cross_compiling" = yes; then
7624
7625                         eval 'ac_cv_func_'$cf_func'=error'
7626 else
7627   cat >conftest.$ac_ext <<_ACEOF
7628 #line 7628 "configure"
7629 #include "confdefs.h"
7630
7631 #include <sys/types.h>
7632 #include <sys/stat.h>
7633 #ifdef HAVE_UNISTD_H
7634 #include <unistd.h>
7635 #endif
7636 int main()
7637 {
7638         int fail = 0;
7639         char *src = "config.log";
7640         char *dst = "conftest.chk";
7641         struct stat src_sb;
7642         struct stat dst_sb;
7643
7644         stat(src, &src_sb);
7645         fail = ($cf_func("config.log", "conftest.chk") < 0)
7646             || (stat(dst, &dst_sb) < 0)
7647             || (dst_sb.st_mtime != src_sb.st_mtime);
7648 #ifdef HAVE_UNLINK
7649         unlink(dst);
7650 #else
7651         remove(dst);
7652 #endif
7653         ${cf_cv_main_return:-return} (fail);
7654 }
7655
7656 _ACEOF
7657 rm -f conftest$ac_exeext
7658 if { (eval echo "$as_me:7658: \"$ac_link\"") >&5
7659   (eval $ac_link) 2>&5
7660   ac_status=$?
7661   echo "$as_me:7661: \$? = $ac_status" >&5
7662   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7663   { (eval echo "$as_me:7663: \"$ac_try\"") >&5
7664   (eval $ac_try) 2>&5
7665   ac_status=$?
7666   echo "$as_me:7666: \$? = $ac_status" >&5
7667   (exit $ac_status); }; }; then
7668
7669                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7670                         eval 'ac_cv_func_'$cf_func'=yes'
7671 else
7672   echo "$as_me: program exited with status $ac_status" >&5
7673 echo "$as_me: failed program was:" >&5
7674 cat conftest.$ac_ext >&5
7675
7676                         eval 'ac_cv_func_'$cf_func'=no'
7677 fi
7678 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7679 fi
7680                 done
7681                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7682
7683 fi
7684 echo "$as_me:7684: result: $cf_cv_link_funcs" >&5
7685 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7686         test "$ac_cv_func_link"    = yes &&
7687 cat >>confdefs.h <<\EOF
7688 #define HAVE_LINK 1
7689 EOF
7690
7691         test "$ac_cv_func_symlink" = yes &&
7692 cat >>confdefs.h <<\EOF
7693 #define HAVE_SYMLINK 1
7694 EOF
7695
7696 fi
7697
7698 with_links=no
7699 with_symlinks=no
7700
7701 # soft links (symbolic links) are useful for some systems where hard links do
7702 # not work, or to make it simpler to copy terminfo trees around.
7703 if test "x$ac_cv_func_symlink" = xyes ; then
7704         echo "$as_me:7704: checking if tic should use symbolic links" >&5
7705 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7706
7707 # Check whether --enable-symlinks or --disable-symlinks was given.
7708 if test "${enable_symlinks+set}" = set; then
7709   enableval="$enable_symlinks"
7710   with_symlinks=$enableval
7711 else
7712   with_symlinks=no
7713 fi;
7714         echo "$as_me:7714: result: $with_symlinks" >&5
7715 echo "${ECHO_T}$with_symlinks" >&6
7716 fi
7717
7718 # If we have hard links and did not choose to use soft links instead, there is
7719 # no reason to make this choice optional - use the hard links.
7720 if test "$with_symlinks" = no ; then
7721         echo "$as_me:7721: checking if tic should use hard links" >&5
7722 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7723         if test "x$ac_cv_func_link" = xyes ; then
7724                 with_links=yes
7725         else
7726                 with_links=no
7727         fi
7728         echo "$as_me:7728: result: $with_links" >&5
7729 echo "${ECHO_T}$with_links" >&6
7730 fi
7731
7732 test "x$with_links" = xyes &&
7733 cat >>confdefs.h <<\EOF
7734 #define USE_LINKS 1
7735 EOF
7736
7737 test "x$with_symlinks" = xyes &&
7738 cat >>confdefs.h <<\EOF
7739 #define USE_SYMLINKS 1
7740 EOF
7741
7742 ###   use option --enable-broken-linker to force on use of broken-linker support
7743 echo "$as_me:7743: checking if you want broken-linker support code" >&5
7744 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7745
7746 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7747 if test "${enable_broken_linker+set}" = set; then
7748   enableval="$enable_broken_linker"
7749   with_broken_linker=$enableval
7750 else
7751   with_broken_linker=${BROKEN_LINKER:-no}
7752 fi;
7753 echo "$as_me:7753: result: $with_broken_linker" >&5
7754 echo "${ECHO_T}$with_broken_linker" >&6
7755
7756 BROKEN_LINKER=0
7757 if test "x$with_broken_linker" = xyes ; then
7758
7759 cat >>confdefs.h <<\EOF
7760 #define BROKEN_LINKER 1
7761 EOF
7762
7763         BROKEN_LINKER=1
7764 elif test "$DFT_LWR_MODEL" = shared ; then
7765         case $cf_cv_system_name in
7766         (cygwin*)
7767
7768 cat >>confdefs.h <<\EOF
7769 #define BROKEN_LINKER 1
7770 EOF
7771
7772                 BROKEN_LINKER=1
7773                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7774
7775 echo "${as_me:-configure}:7775: testing cygwin linker is broken anyway ..." 1>&5
7776
7777                 ;;
7778         esac
7779 fi
7780
7781 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7782 echo "$as_me:7782: checking if tputs should process BSD-style prefix padding" >&5
7783 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7784
7785 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7786 if test "${enable_bsdpad+set}" = set; then
7787   enableval="$enable_bsdpad"
7788   with_bsdpad=$enableval
7789 else
7790   with_bsdpad=no
7791 fi;
7792 echo "$as_me:7792: result: $with_bsdpad" >&5
7793 echo "${ECHO_T}$with_bsdpad" >&6
7794 test "x$with_bsdpad" = xyes &&
7795 cat >>confdefs.h <<\EOF
7796 #define BSD_TPUTS 1
7797 EOF
7798
7799 ###   use option --enable-widec to turn on use of wide-character support
7800 NCURSES_CH_T=chtype
7801 NCURSES_LIBUTF8=0
7802
7803 NEED_WCHAR_H=0
7804 NCURSES_MBSTATE_T=0
7805 NCURSES_WCHAR_T=0
7806 NCURSES_WINT_T=0
7807
7808 # Check to define _XOPEN_SOURCE "automatically"
7809 CPPFLAGS_before_XOPEN="$CPPFLAGS"
7810
7811 cf_XOPEN_SOURCE=500
7812 cf_POSIX_C_SOURCE=199506L
7813 cf_xopen_source=
7814
7815 case $host_os in
7816 (aix[4-7]*)
7817         cf_xopen_source="-D_ALL_SOURCE"
7818         ;;
7819 (cygwin|msys)
7820         cf_XOPEN_SOURCE=600
7821         ;;
7822 (darwin[0-8].*)
7823         cf_xopen_source="-D_APPLE_C_SOURCE"
7824         ;;
7825 (darwin*)
7826         cf_xopen_source="-D_DARWIN_C_SOURCE"
7827         cf_XOPEN_SOURCE=
7828         ;;
7829 (freebsd*|dragonfly*)
7830         # 5.x headers associate
7831         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7832         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7833         cf_POSIX_C_SOURCE=200112L
7834         cf_XOPEN_SOURCE=600
7835         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7836         ;;
7837 (hpux11*)
7838         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7839         ;;
7840 (hpux*)
7841         cf_xopen_source="-D_HPUX_SOURCE"
7842         ;;
7843 (irix[56].*)
7844         cf_xopen_source="-D_SGI_SOURCE"
7845         cf_XOPEN_SOURCE=
7846         ;;
7847 (linux*|gnu*|mint*|k*bsd*-gnu)
7848
7849 echo "$as_me:7849: checking if we must define _GNU_SOURCE" >&5
7850 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7851 if test "${cf_cv_gnu_source+set}" = set; then
7852   echo $ECHO_N "(cached) $ECHO_C" >&6
7853 else
7854
7855 cat >conftest.$ac_ext <<_ACEOF
7856 #line 7856 "configure"
7857 #include "confdefs.h"
7858 #include <sys/types.h>
7859 int
7860 main ()
7861 {
7862
7863 #ifndef _XOPEN_SOURCE
7864 make an error
7865 #endif
7866   ;
7867   return 0;
7868 }
7869 _ACEOF
7870 rm -f conftest.$ac_objext
7871 if { (eval echo "$as_me:7871: \"$ac_compile\"") >&5
7872   (eval $ac_compile) 2>&5
7873   ac_status=$?
7874   echo "$as_me:7874: \$? = $ac_status" >&5
7875   (exit $ac_status); } &&
7876          { ac_try='test -s conftest.$ac_objext'
7877   { (eval echo "$as_me:7877: \"$ac_try\"") >&5
7878   (eval $ac_try) 2>&5
7879   ac_status=$?
7880   echo "$as_me:7880: \$? = $ac_status" >&5
7881   (exit $ac_status); }; }; then
7882   cf_cv_gnu_source=no
7883 else
7884   echo "$as_me: failed program was:" >&5
7885 cat conftest.$ac_ext >&5
7886 cf_save="$CPPFLAGS"
7887          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7888          cat >conftest.$ac_ext <<_ACEOF
7889 #line 7889 "configure"
7890 #include "confdefs.h"
7891 #include <sys/types.h>
7892 int
7893 main ()
7894 {
7895
7896 #ifdef _XOPEN_SOURCE
7897 make an error
7898 #endif
7899   ;
7900   return 0;
7901 }
7902 _ACEOF
7903 rm -f conftest.$ac_objext
7904 if { (eval echo "$as_me:7904: \"$ac_compile\"") >&5
7905   (eval $ac_compile) 2>&5
7906   ac_status=$?
7907   echo "$as_me:7907: \$? = $ac_status" >&5
7908   (exit $ac_status); } &&
7909          { ac_try='test -s conftest.$ac_objext'
7910   { (eval echo "$as_me:7910: \"$ac_try\"") >&5
7911   (eval $ac_try) 2>&5
7912   ac_status=$?
7913   echo "$as_me:7913: \$? = $ac_status" >&5
7914   (exit $ac_status); }; }; then
7915   cf_cv_gnu_source=no
7916 else
7917   echo "$as_me: failed program was:" >&5
7918 cat conftest.$ac_ext >&5
7919 cf_cv_gnu_source=yes
7920 fi
7921 rm -f conftest.$ac_objext conftest.$ac_ext
7922         CPPFLAGS="$cf_save"
7923
7924 fi
7925 rm -f conftest.$ac_objext conftest.$ac_ext
7926
7927 fi
7928 echo "$as_me:7928: result: $cf_cv_gnu_source" >&5
7929 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7930 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7931
7932         ;;
7933 (minix*)
7934         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7935         ;;
7936 (mirbsd*)
7937         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7938         cf_XOPEN_SOURCE=
7939
7940 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7941
7942 cf_save_CFLAGS="$CFLAGS"
7943 cf_save_CPPFLAGS="$CPPFLAGS"
7944
7945 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7946         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7947                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7948
7949 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7950         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7951                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7952
7953 echo "$as_me:7953: checking if we should define _POSIX_C_SOURCE" >&5
7954 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7955 if test "${cf_cv_posix_c_source+set}" = set; then
7956   echo $ECHO_N "(cached) $ECHO_C" >&6
7957 else
7958
7959 echo "${as_me:-configure}:7959: testing if the symbol is already defined go no further ..." 1>&5
7960
7961         cat >conftest.$ac_ext <<_ACEOF
7962 #line 7962 "configure"
7963 #include "confdefs.h"
7964 #include <sys/types.h>
7965 int
7966 main ()
7967 {
7968
7969 #ifndef _POSIX_C_SOURCE
7970 make an error
7971 #endif
7972   ;
7973   return 0;
7974 }
7975 _ACEOF
7976 rm -f conftest.$ac_objext
7977 if { (eval echo "$as_me:7977: \"$ac_compile\"") >&5
7978   (eval $ac_compile) 2>&5
7979   ac_status=$?
7980   echo "$as_me:7980: \$? = $ac_status" >&5
7981   (exit $ac_status); } &&
7982          { ac_try='test -s conftest.$ac_objext'
7983   { (eval echo "$as_me:7983: \"$ac_try\"") >&5
7984   (eval $ac_try) 2>&5
7985   ac_status=$?
7986   echo "$as_me:7986: \$? = $ac_status" >&5
7987   (exit $ac_status); }; }; then
7988   cf_cv_posix_c_source=no
7989 else
7990   echo "$as_me: failed program was:" >&5
7991 cat conftest.$ac_ext >&5
7992 cf_want_posix_source=no
7993          case .$cf_POSIX_C_SOURCE in
7994          (.[12]??*)
7995                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7996                 ;;
7997          (.2)
7998                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7999                 cf_want_posix_source=yes
8000                 ;;
8001          (.*)
8002                 cf_want_posix_source=yes
8003                 ;;
8004          esac
8005          if test "$cf_want_posix_source" = yes ; then
8006                 cat >conftest.$ac_ext <<_ACEOF
8007 #line 8007 "configure"
8008 #include "confdefs.h"
8009 #include <sys/types.h>
8010 int
8011 main ()
8012 {
8013
8014 #ifdef _POSIX_SOURCE
8015 make an error
8016 #endif
8017   ;
8018   return 0;
8019 }
8020 _ACEOF
8021 rm -f conftest.$ac_objext
8022 if { (eval echo "$as_me:8022: \"$ac_compile\"") >&5
8023   (eval $ac_compile) 2>&5
8024   ac_status=$?
8025   echo "$as_me:8025: \$? = $ac_status" >&5
8026   (exit $ac_status); } &&
8027          { ac_try='test -s conftest.$ac_objext'
8028   { (eval echo "$as_me:8028: \"$ac_try\"") >&5
8029   (eval $ac_try) 2>&5
8030   ac_status=$?
8031   echo "$as_me:8031: \$? = $ac_status" >&5
8032   (exit $ac_status); }; }; then
8033   :
8034 else
8035   echo "$as_me: failed program was:" >&5
8036 cat conftest.$ac_ext >&5
8037 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8038 fi
8039 rm -f conftest.$ac_objext conftest.$ac_ext
8040          fi
8041
8042 echo "${as_me:-configure}:8042: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8043
8044          CFLAGS="$cf_trim_CFLAGS"
8045          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8046
8047 echo "${as_me:-configure}:8047: testing if the second compile does not leave our definition intact error ..." 1>&5
8048
8049          cat >conftest.$ac_ext <<_ACEOF
8050 #line 8050 "configure"
8051 #include "confdefs.h"
8052 #include <sys/types.h>
8053 int
8054 main ()
8055 {
8056
8057 #ifndef _POSIX_C_SOURCE
8058 make an error
8059 #endif
8060   ;
8061   return 0;
8062 }
8063 _ACEOF
8064 rm -f conftest.$ac_objext
8065 if { (eval echo "$as_me:8065: \"$ac_compile\"") >&5
8066   (eval $ac_compile) 2>&5
8067   ac_status=$?
8068   echo "$as_me:8068: \$? = $ac_status" >&5
8069   (exit $ac_status); } &&
8070          { ac_try='test -s conftest.$ac_objext'
8071   { (eval echo "$as_me:8071: \"$ac_try\"") >&5
8072   (eval $ac_try) 2>&5
8073   ac_status=$?
8074   echo "$as_me:8074: \$? = $ac_status" >&5
8075   (exit $ac_status); }; }; then
8076   :
8077 else
8078   echo "$as_me: failed program was:" >&5
8079 cat conftest.$ac_ext >&5
8080 cf_cv_posix_c_source=no
8081 fi
8082 rm -f conftest.$ac_objext conftest.$ac_ext
8083          CFLAGS="$cf_save_CFLAGS"
8084          CPPFLAGS="$cf_save_CPPFLAGS"
8085
8086 fi
8087 rm -f conftest.$ac_objext conftest.$ac_ext
8088
8089 fi
8090 echo "$as_me:8090: result: $cf_cv_posix_c_source" >&5
8091 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8092
8093 if test "$cf_cv_posix_c_source" != no ; then
8094         CFLAGS="$cf_trim_CFLAGS"
8095         CPPFLAGS="$cf_trim_CPPFLAGS"
8096
8097 cf_fix_cppflags=no
8098 cf_new_cflags=
8099 cf_new_cppflags=
8100 cf_new_extra_cppflags=
8101
8102 for cf_add_cflags in $cf_cv_posix_c_source
8103 do
8104 case $cf_fix_cppflags in
8105 (no)
8106         case $cf_add_cflags in
8107         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8108                 case $cf_add_cflags in
8109                 (-D*)
8110                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8111
8112                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8113                                 && test -z "${cf_tst_cflags}" \
8114                                 && cf_fix_cppflags=yes
8115
8116                         if test $cf_fix_cppflags = yes ; then
8117                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8118                                 continue
8119                         elif test "${cf_tst_cflags}" = "\"'" ; then
8120                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8121                                 continue
8122                         fi
8123                         ;;
8124                 esac
8125                 case "$CPPFLAGS" in
8126                 (*$cf_add_cflags)
8127                         ;;
8128                 (*)
8129                         case $cf_add_cflags in
8130                         (-D*)
8131                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8132
8133 CPPFLAGS=`echo "$CPPFLAGS" | \
8134         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8135                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8136
8137                                 ;;
8138                         esac
8139                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8140                         ;;
8141                 esac
8142                 ;;
8143         (*)
8144                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8145                 ;;
8146         esac
8147         ;;
8148 (yes)
8149         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8150
8151         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8152
8153         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8154                 && test -z "${cf_tst_cflags}" \
8155                 && cf_fix_cppflags=no
8156         ;;
8157 esac
8158 done
8159
8160 if test -n "$cf_new_cflags" ; then
8161
8162         CFLAGS="$CFLAGS $cf_new_cflags"
8163 fi
8164
8165 if test -n "$cf_new_cppflags" ; then
8166
8167         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8168 fi
8169
8170 if test -n "$cf_new_extra_cppflags" ; then
8171
8172         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8173 fi
8174
8175 fi
8176
8177         ;;
8178 (netbsd*)
8179         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8180         ;;
8181 (openbsd[4-9]*)
8182         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8183         cf_xopen_source="-D_BSD_SOURCE"
8184         cf_XOPEN_SOURCE=600
8185         ;;
8186 (openbsd*)
8187         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8188         ;;
8189 (osf[45]*)
8190         cf_xopen_source="-D_OSF_SOURCE"
8191         ;;
8192 (nto-qnx*)
8193         cf_xopen_source="-D_QNX_SOURCE"
8194         ;;
8195 (sco*)
8196         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8197         ;;
8198 (solaris2.*)
8199         cf_xopen_source="-D__EXTENSIONS__"
8200         cf_cv_xopen_source=broken
8201         ;;
8202 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8203         cf_XOPEN_SOURCE=
8204         cf_POSIX_C_SOURCE=
8205         ;;
8206 (*)
8207
8208 echo "$as_me:8208: checking if we should define _XOPEN_SOURCE" >&5
8209 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8210 if test "${cf_cv_xopen_source+set}" = set; then
8211   echo $ECHO_N "(cached) $ECHO_C" >&6
8212 else
8213
8214         cat >conftest.$ac_ext <<_ACEOF
8215 #line 8215 "configure"
8216 #include "confdefs.h"
8217
8218 #include <stdlib.h>
8219 #include <string.h>
8220 #include <sys/types.h>
8221
8222 int
8223 main ()
8224 {
8225
8226 #ifndef _XOPEN_SOURCE
8227 make an error
8228 #endif
8229   ;
8230   return 0;
8231 }
8232 _ACEOF
8233 rm -f conftest.$ac_objext
8234 if { (eval echo "$as_me:8234: \"$ac_compile\"") >&5
8235   (eval $ac_compile) 2>&5
8236   ac_status=$?
8237   echo "$as_me:8237: \$? = $ac_status" >&5
8238   (exit $ac_status); } &&
8239          { ac_try='test -s conftest.$ac_objext'
8240   { (eval echo "$as_me:8240: \"$ac_try\"") >&5
8241   (eval $ac_try) 2>&5
8242   ac_status=$?
8243   echo "$as_me:8243: \$? = $ac_status" >&5
8244   (exit $ac_status); }; }; then
8245   cf_cv_xopen_source=no
8246 else
8247   echo "$as_me: failed program was:" >&5
8248 cat conftest.$ac_ext >&5
8249 cf_save="$CPPFLAGS"
8250          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8251          cat >conftest.$ac_ext <<_ACEOF
8252 #line 8252 "configure"
8253 #include "confdefs.h"
8254
8255 #include <stdlib.h>
8256 #include <string.h>
8257 #include <sys/types.h>
8258
8259 int
8260 main ()
8261 {
8262
8263 #ifdef _XOPEN_SOURCE
8264 make an error
8265 #endif
8266   ;
8267   return 0;
8268 }
8269 _ACEOF
8270 rm -f conftest.$ac_objext
8271 if { (eval echo "$as_me:8271: \"$ac_compile\"") >&5
8272   (eval $ac_compile) 2>&5
8273   ac_status=$?
8274   echo "$as_me:8274: \$? = $ac_status" >&5
8275   (exit $ac_status); } &&
8276          { ac_try='test -s conftest.$ac_objext'
8277   { (eval echo "$as_me:8277: \"$ac_try\"") >&5
8278   (eval $ac_try) 2>&5
8279   ac_status=$?
8280   echo "$as_me:8280: \$? = $ac_status" >&5
8281   (exit $ac_status); }; }; then
8282   cf_cv_xopen_source=no
8283 else
8284   echo "$as_me: failed program was:" >&5
8285 cat conftest.$ac_ext >&5
8286 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8287 fi
8288 rm -f conftest.$ac_objext conftest.$ac_ext
8289         CPPFLAGS="$cf_save"
8290
8291 fi
8292 rm -f conftest.$ac_objext conftest.$ac_ext
8293
8294 fi
8295 echo "$as_me:8295: result: $cf_cv_xopen_source" >&5
8296 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8297
8298 if test "$cf_cv_xopen_source" != no ; then
8299
8300 CFLAGS=`echo "$CFLAGS" | \
8301         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8302                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8303
8304 CPPFLAGS=`echo "$CPPFLAGS" | \
8305         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8306                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8307
8308         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8309
8310 cf_fix_cppflags=no
8311 cf_new_cflags=
8312 cf_new_cppflags=
8313 cf_new_extra_cppflags=
8314
8315 for cf_add_cflags in $cf_temp_xopen_source
8316 do
8317 case $cf_fix_cppflags in
8318 (no)
8319         case $cf_add_cflags in
8320         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8321                 case $cf_add_cflags in
8322                 (-D*)
8323                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8324
8325                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8326                                 && test -z "${cf_tst_cflags}" \
8327                                 && cf_fix_cppflags=yes
8328
8329                         if test $cf_fix_cppflags = yes ; then
8330                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8331                                 continue
8332                         elif test "${cf_tst_cflags}" = "\"'" ; then
8333                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8334                                 continue
8335                         fi
8336                         ;;
8337                 esac
8338                 case "$CPPFLAGS" in
8339                 (*$cf_add_cflags)
8340                         ;;
8341                 (*)
8342                         case $cf_add_cflags in
8343                         (-D*)
8344                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8345
8346 CPPFLAGS=`echo "$CPPFLAGS" | \
8347         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8348                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8349
8350                                 ;;
8351                         esac
8352                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8353                         ;;
8354                 esac
8355                 ;;
8356         (*)
8357                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8358                 ;;
8359         esac
8360         ;;
8361 (yes)
8362         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8363
8364         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8365
8366         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8367                 && test -z "${cf_tst_cflags}" \
8368                 && cf_fix_cppflags=no
8369         ;;
8370 esac
8371 done
8372
8373 if test -n "$cf_new_cflags" ; then
8374
8375         CFLAGS="$CFLAGS $cf_new_cflags"
8376 fi
8377
8378 if test -n "$cf_new_cppflags" ; then
8379
8380         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8381 fi
8382
8383 if test -n "$cf_new_extra_cppflags" ; then
8384
8385         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8386 fi
8387
8388 fi
8389
8390 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8391
8392 cf_save_CFLAGS="$CFLAGS"
8393 cf_save_CPPFLAGS="$CPPFLAGS"
8394
8395 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8396         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8397                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8398
8399 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8400         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8401                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8402
8403 echo "$as_me:8403: checking if we should define _POSIX_C_SOURCE" >&5
8404 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8405 if test "${cf_cv_posix_c_source+set}" = set; then
8406   echo $ECHO_N "(cached) $ECHO_C" >&6
8407 else
8408
8409 echo "${as_me:-configure}:8409: testing if the symbol is already defined go no further ..." 1>&5
8410
8411         cat >conftest.$ac_ext <<_ACEOF
8412 #line 8412 "configure"
8413 #include "confdefs.h"
8414 #include <sys/types.h>
8415 int
8416 main ()
8417 {
8418
8419 #ifndef _POSIX_C_SOURCE
8420 make an error
8421 #endif
8422   ;
8423   return 0;
8424 }
8425 _ACEOF
8426 rm -f conftest.$ac_objext
8427 if { (eval echo "$as_me:8427: \"$ac_compile\"") >&5
8428   (eval $ac_compile) 2>&5
8429   ac_status=$?
8430   echo "$as_me:8430: \$? = $ac_status" >&5
8431   (exit $ac_status); } &&
8432          { ac_try='test -s conftest.$ac_objext'
8433   { (eval echo "$as_me:8433: \"$ac_try\"") >&5
8434   (eval $ac_try) 2>&5
8435   ac_status=$?
8436   echo "$as_me:8436: \$? = $ac_status" >&5
8437   (exit $ac_status); }; }; then
8438   cf_cv_posix_c_source=no
8439 else
8440   echo "$as_me: failed program was:" >&5
8441 cat conftest.$ac_ext >&5
8442 cf_want_posix_source=no
8443          case .$cf_POSIX_C_SOURCE in
8444          (.[12]??*)
8445                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8446                 ;;
8447          (.2)
8448                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8449                 cf_want_posix_source=yes
8450                 ;;
8451          (.*)
8452                 cf_want_posix_source=yes
8453                 ;;
8454          esac
8455          if test "$cf_want_posix_source" = yes ; then
8456                 cat >conftest.$ac_ext <<_ACEOF
8457 #line 8457 "configure"
8458 #include "confdefs.h"
8459 #include <sys/types.h>
8460 int
8461 main ()
8462 {
8463
8464 #ifdef _POSIX_SOURCE
8465 make an error
8466 #endif
8467   ;
8468   return 0;
8469 }
8470 _ACEOF
8471 rm -f conftest.$ac_objext
8472 if { (eval echo "$as_me:8472: \"$ac_compile\"") >&5
8473   (eval $ac_compile) 2>&5
8474   ac_status=$?
8475   echo "$as_me:8475: \$? = $ac_status" >&5
8476   (exit $ac_status); } &&
8477          { ac_try='test -s conftest.$ac_objext'
8478   { (eval echo "$as_me:8478: \"$ac_try\"") >&5
8479   (eval $ac_try) 2>&5
8480   ac_status=$?
8481   echo "$as_me:8481: \$? = $ac_status" >&5
8482   (exit $ac_status); }; }; then
8483   :
8484 else
8485   echo "$as_me: failed program was:" >&5
8486 cat conftest.$ac_ext >&5
8487 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8488 fi
8489 rm -f conftest.$ac_objext conftest.$ac_ext
8490          fi
8491
8492 echo "${as_me:-configure}:8492: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8493
8494          CFLAGS="$cf_trim_CFLAGS"
8495          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8496
8497 echo "${as_me:-configure}:8497: testing if the second compile does not leave our definition intact error ..." 1>&5
8498
8499          cat >conftest.$ac_ext <<_ACEOF
8500 #line 8500 "configure"
8501 #include "confdefs.h"
8502 #include <sys/types.h>
8503 int
8504 main ()
8505 {
8506
8507 #ifndef _POSIX_C_SOURCE
8508 make an error
8509 #endif
8510   ;
8511   return 0;
8512 }
8513 _ACEOF
8514 rm -f conftest.$ac_objext
8515 if { (eval echo "$as_me:8515: \"$ac_compile\"") >&5
8516   (eval $ac_compile) 2>&5
8517   ac_status=$?
8518   echo "$as_me:8518: \$? = $ac_status" >&5
8519   (exit $ac_status); } &&
8520          { ac_try='test -s conftest.$ac_objext'
8521   { (eval echo "$as_me:8521: \"$ac_try\"") >&5
8522   (eval $ac_try) 2>&5
8523   ac_status=$?
8524   echo "$as_me:8524: \$? = $ac_status" >&5
8525   (exit $ac_status); }; }; then
8526   :
8527 else
8528   echo "$as_me: failed program was:" >&5
8529 cat conftest.$ac_ext >&5
8530 cf_cv_posix_c_source=no
8531 fi
8532 rm -f conftest.$ac_objext conftest.$ac_ext
8533          CFLAGS="$cf_save_CFLAGS"
8534          CPPFLAGS="$cf_save_CPPFLAGS"
8535
8536 fi
8537 rm -f conftest.$ac_objext conftest.$ac_ext
8538
8539 fi
8540 echo "$as_me:8540: result: $cf_cv_posix_c_source" >&5
8541 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8542
8543 if test "$cf_cv_posix_c_source" != no ; then
8544         CFLAGS="$cf_trim_CFLAGS"
8545         CPPFLAGS="$cf_trim_CPPFLAGS"
8546
8547 cf_fix_cppflags=no
8548 cf_new_cflags=
8549 cf_new_cppflags=
8550 cf_new_extra_cppflags=
8551
8552 for cf_add_cflags in $cf_cv_posix_c_source
8553 do
8554 case $cf_fix_cppflags in
8555 (no)
8556         case $cf_add_cflags in
8557         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8558                 case $cf_add_cflags in
8559                 (-D*)
8560                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8561
8562                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8563                                 && test -z "${cf_tst_cflags}" \
8564                                 && cf_fix_cppflags=yes
8565
8566                         if test $cf_fix_cppflags = yes ; then
8567                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8568                                 continue
8569                         elif test "${cf_tst_cflags}" = "\"'" ; then
8570                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8571                                 continue
8572                         fi
8573                         ;;
8574                 esac
8575                 case "$CPPFLAGS" in
8576                 (*$cf_add_cflags)
8577                         ;;
8578                 (*)
8579                         case $cf_add_cflags in
8580                         (-D*)
8581                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8582
8583 CPPFLAGS=`echo "$CPPFLAGS" | \
8584         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8585                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8586
8587                                 ;;
8588                         esac
8589                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8590                         ;;
8591                 esac
8592                 ;;
8593         (*)
8594                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8595                 ;;
8596         esac
8597         ;;
8598 (yes)
8599         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8600
8601         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8602
8603         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8604                 && test -z "${cf_tst_cflags}" \
8605                 && cf_fix_cppflags=no
8606         ;;
8607 esac
8608 done
8609
8610 if test -n "$cf_new_cflags" ; then
8611
8612         CFLAGS="$CFLAGS $cf_new_cflags"
8613 fi
8614
8615 if test -n "$cf_new_cppflags" ; then
8616
8617         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8618 fi
8619
8620 if test -n "$cf_new_extra_cppflags" ; then
8621
8622         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8623 fi
8624
8625 fi
8626
8627         ;;
8628 esac
8629
8630 if test -n "$cf_xopen_source" ; then
8631
8632 cf_fix_cppflags=no
8633 cf_new_cflags=
8634 cf_new_cppflags=
8635 cf_new_extra_cppflags=
8636
8637 for cf_add_cflags in $cf_xopen_source
8638 do
8639 case $cf_fix_cppflags in
8640 (no)
8641         case $cf_add_cflags in
8642         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8643                 case $cf_add_cflags in
8644                 (-D*)
8645                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8646
8647                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8648                                 && test -z "${cf_tst_cflags}" \
8649                                 && cf_fix_cppflags=yes
8650
8651                         if test $cf_fix_cppflags = yes ; then
8652                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8653                                 continue
8654                         elif test "${cf_tst_cflags}" = "\"'" ; then
8655                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8656                                 continue
8657                         fi
8658                         ;;
8659                 esac
8660                 case "$CPPFLAGS" in
8661                 (*$cf_add_cflags)
8662                         ;;
8663                 (*)
8664                         case $cf_add_cflags in
8665                         (-D*)
8666                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8667
8668 CPPFLAGS=`echo "$CPPFLAGS" | \
8669         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8670                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8671
8672                                 ;;
8673                         esac
8674                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8675                         ;;
8676                 esac
8677                 ;;
8678         (*)
8679                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8680                 ;;
8681         esac
8682         ;;
8683 (yes)
8684         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8685
8686         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8687
8688         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8689                 && test -z "${cf_tst_cflags}" \
8690                 && cf_fix_cppflags=no
8691         ;;
8692 esac
8693 done
8694
8695 if test -n "$cf_new_cflags" ; then
8696         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8697
8698 echo "${as_me:-configure}:8698: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8699
8700         CFLAGS="$CFLAGS $cf_new_cflags"
8701 fi
8702
8703 if test -n "$cf_new_cppflags" ; then
8704         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8705
8706 echo "${as_me:-configure}:8706: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8707
8708         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8709 fi
8710
8711 if test -n "$cf_new_extra_cppflags" ; then
8712         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8713
8714 echo "${as_me:-configure}:8714: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8715
8716         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8717 fi
8718
8719 fi
8720
8721 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8722         echo "$as_me:8722: checking if _XOPEN_SOURCE really is set" >&5
8723 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8724         cat >conftest.$ac_ext <<_ACEOF
8725 #line 8725 "configure"
8726 #include "confdefs.h"
8727 #include <stdlib.h>
8728 int
8729 main ()
8730 {
8731
8732 #ifndef _XOPEN_SOURCE
8733 make an error
8734 #endif
8735   ;
8736   return 0;
8737 }
8738 _ACEOF
8739 rm -f conftest.$ac_objext
8740 if { (eval echo "$as_me:8740: \"$ac_compile\"") >&5
8741   (eval $ac_compile) 2>&5
8742   ac_status=$?
8743   echo "$as_me:8743: \$? = $ac_status" >&5
8744   (exit $ac_status); } &&
8745          { ac_try='test -s conftest.$ac_objext'
8746   { (eval echo "$as_me:8746: \"$ac_try\"") >&5
8747   (eval $ac_try) 2>&5
8748   ac_status=$?
8749   echo "$as_me:8749: \$? = $ac_status" >&5
8750   (exit $ac_status); }; }; then
8751   cf_XOPEN_SOURCE_set=yes
8752 else
8753   echo "$as_me: failed program was:" >&5
8754 cat conftest.$ac_ext >&5
8755 cf_XOPEN_SOURCE_set=no
8756 fi
8757 rm -f conftest.$ac_objext conftest.$ac_ext
8758         echo "$as_me:8758: result: $cf_XOPEN_SOURCE_set" >&5
8759 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8760         if test $cf_XOPEN_SOURCE_set = yes
8761         then
8762                 cat >conftest.$ac_ext <<_ACEOF
8763 #line 8763 "configure"
8764 #include "confdefs.h"
8765 #include <stdlib.h>
8766 int
8767 main ()
8768 {
8769
8770 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8771 make an error
8772 #endif
8773   ;
8774   return 0;
8775 }
8776 _ACEOF
8777 rm -f conftest.$ac_objext
8778 if { (eval echo "$as_me:8778: \"$ac_compile\"") >&5
8779   (eval $ac_compile) 2>&5
8780   ac_status=$?
8781   echo "$as_me:8781: \$? = $ac_status" >&5
8782   (exit $ac_status); } &&
8783          { ac_try='test -s conftest.$ac_objext'
8784   { (eval echo "$as_me:8784: \"$ac_try\"") >&5
8785   (eval $ac_try) 2>&5
8786   ac_status=$?
8787   echo "$as_me:8787: \$? = $ac_status" >&5
8788   (exit $ac_status); }; }; then
8789   cf_XOPEN_SOURCE_set_ok=yes
8790 else
8791   echo "$as_me: failed program was:" >&5
8792 cat conftest.$ac_ext >&5
8793 cf_XOPEN_SOURCE_set_ok=no
8794 fi
8795 rm -f conftest.$ac_objext conftest.$ac_ext
8796                 if test $cf_XOPEN_SOURCE_set_ok = no
8797                 then
8798                         { echo "$as_me:8798: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8799 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8800                 fi
8801         else
8802
8803 echo "$as_me:8803: checking if we should define _XOPEN_SOURCE" >&5
8804 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8805 if test "${cf_cv_xopen_source+set}" = set; then
8806   echo $ECHO_N "(cached) $ECHO_C" >&6
8807 else
8808
8809         cat >conftest.$ac_ext <<_ACEOF
8810 #line 8810 "configure"
8811 #include "confdefs.h"
8812
8813 #include <stdlib.h>
8814 #include <string.h>
8815 #include <sys/types.h>
8816
8817 int
8818 main ()
8819 {
8820
8821 #ifndef _XOPEN_SOURCE
8822 make an error
8823 #endif
8824   ;
8825   return 0;
8826 }
8827 _ACEOF
8828 rm -f conftest.$ac_objext
8829 if { (eval echo "$as_me:8829: \"$ac_compile\"") >&5
8830   (eval $ac_compile) 2>&5
8831   ac_status=$?
8832   echo "$as_me:8832: \$? = $ac_status" >&5
8833   (exit $ac_status); } &&
8834          { ac_try='test -s conftest.$ac_objext'
8835   { (eval echo "$as_me:8835: \"$ac_try\"") >&5
8836   (eval $ac_try) 2>&5
8837   ac_status=$?
8838   echo "$as_me:8838: \$? = $ac_status" >&5
8839   (exit $ac_status); }; }; then
8840   cf_cv_xopen_source=no
8841 else
8842   echo "$as_me: failed program was:" >&5
8843 cat conftest.$ac_ext >&5
8844 cf_save="$CPPFLAGS"
8845          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8846          cat >conftest.$ac_ext <<_ACEOF
8847 #line 8847 "configure"
8848 #include "confdefs.h"
8849
8850 #include <stdlib.h>
8851 #include <string.h>
8852 #include <sys/types.h>
8853
8854 int
8855 main ()
8856 {
8857
8858 #ifdef _XOPEN_SOURCE
8859 make an error
8860 #endif
8861   ;
8862   return 0;
8863 }
8864 _ACEOF
8865 rm -f conftest.$ac_objext
8866 if { (eval echo "$as_me:8866: \"$ac_compile\"") >&5
8867   (eval $ac_compile) 2>&5
8868   ac_status=$?
8869   echo "$as_me:8869: \$? = $ac_status" >&5
8870   (exit $ac_status); } &&
8871          { ac_try='test -s conftest.$ac_objext'
8872   { (eval echo "$as_me:8872: \"$ac_try\"") >&5
8873   (eval $ac_try) 2>&5
8874   ac_status=$?
8875   echo "$as_me:8875: \$? = $ac_status" >&5
8876   (exit $ac_status); }; }; then
8877   cf_cv_xopen_source=no
8878 else
8879   echo "$as_me: failed program was:" >&5
8880 cat conftest.$ac_ext >&5
8881 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8882 fi
8883 rm -f conftest.$ac_objext conftest.$ac_ext
8884         CPPFLAGS="$cf_save"
8885
8886 fi
8887 rm -f conftest.$ac_objext conftest.$ac_ext
8888
8889 fi
8890 echo "$as_me:8890: result: $cf_cv_xopen_source" >&5
8891 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8892
8893 if test "$cf_cv_xopen_source" != no ; then
8894
8895 CFLAGS=`echo "$CFLAGS" | \
8896         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8897                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8898
8899 CPPFLAGS=`echo "$CPPFLAGS" | \
8900         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8901                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8902
8903         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8904
8905 cf_fix_cppflags=no
8906 cf_new_cflags=
8907 cf_new_cppflags=
8908 cf_new_extra_cppflags=
8909
8910 for cf_add_cflags in $cf_temp_xopen_source
8911 do
8912 case $cf_fix_cppflags in
8913 (no)
8914         case $cf_add_cflags in
8915         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8916                 case $cf_add_cflags in
8917                 (-D*)
8918                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8919
8920                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8921                                 && test -z "${cf_tst_cflags}" \
8922                                 && cf_fix_cppflags=yes
8923
8924                         if test $cf_fix_cppflags = yes ; then
8925                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8926                                 continue
8927                         elif test "${cf_tst_cflags}" = "\"'" ; then
8928                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8929                                 continue
8930                         fi
8931                         ;;
8932                 esac
8933                 case "$CPPFLAGS" in
8934                 (*$cf_add_cflags)
8935                         ;;
8936                 (*)
8937                         case $cf_add_cflags in
8938                         (-D*)
8939                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8940
8941 CPPFLAGS=`echo "$CPPFLAGS" | \
8942         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8943                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8944
8945                                 ;;
8946                         esac
8947                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8948                         ;;
8949                 esac
8950                 ;;
8951         (*)
8952                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8953                 ;;
8954         esac
8955         ;;
8956 (yes)
8957         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8958
8959         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8960
8961         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8962                 && test -z "${cf_tst_cflags}" \
8963                 && cf_fix_cppflags=no
8964         ;;
8965 esac
8966 done
8967
8968 if test -n "$cf_new_cflags" ; then
8969
8970         CFLAGS="$CFLAGS $cf_new_cflags"
8971 fi
8972
8973 if test -n "$cf_new_cppflags" ; then
8974
8975         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8976 fi
8977
8978 if test -n "$cf_new_extra_cppflags" ; then
8979
8980         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8981 fi
8982
8983 fi
8984
8985         fi
8986 fi
8987
8988 CPPFLAGS_after_XOPEN="$CPPFLAGS"
8989
8990 # Work around breakage on OS X
8991
8992 echo "$as_me:8992: checking if SIGWINCH is defined" >&5
8993 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8994 if test "${cf_cv_define_sigwinch+set}" = set; then
8995   echo $ECHO_N "(cached) $ECHO_C" >&6
8996 else
8997
8998         cat >conftest.$ac_ext <<_ACEOF
8999 #line 8999 "configure"
9000 #include "confdefs.h"
9001
9002 #include <sys/types.h>
9003 #include <sys/signal.h>
9004
9005 int
9006 main ()
9007 {
9008 int x = SIGWINCH
9009   ;
9010   return 0;
9011 }
9012 _ACEOF
9013 rm -f conftest.$ac_objext
9014 if { (eval echo "$as_me:9014: \"$ac_compile\"") >&5
9015   (eval $ac_compile) 2>&5
9016   ac_status=$?
9017   echo "$as_me:9017: \$? = $ac_status" >&5
9018   (exit $ac_status); } &&
9019          { ac_try='test -s conftest.$ac_objext'
9020   { (eval echo "$as_me:9020: \"$ac_try\"") >&5
9021   (eval $ac_try) 2>&5
9022   ac_status=$?
9023   echo "$as_me:9023: \$? = $ac_status" >&5
9024   (exit $ac_status); }; }; then
9025   cf_cv_define_sigwinch=yes
9026 else
9027   echo "$as_me: failed program was:" >&5
9028 cat conftest.$ac_ext >&5
9029 cat >conftest.$ac_ext <<_ACEOF
9030 #line 9030 "configure"
9031 #include "confdefs.h"
9032
9033 #undef _XOPEN_SOURCE
9034 #undef _POSIX_SOURCE
9035 #undef _POSIX_C_SOURCE
9036 #include <sys/types.h>
9037 #include <sys/signal.h>
9038
9039 int
9040 main ()
9041 {
9042 int x = SIGWINCH
9043   ;
9044   return 0;
9045 }
9046 _ACEOF
9047 rm -f conftest.$ac_objext
9048 if { (eval echo "$as_me:9048: \"$ac_compile\"") >&5
9049   (eval $ac_compile) 2>&5
9050   ac_status=$?
9051   echo "$as_me:9051: \$? = $ac_status" >&5
9052   (exit $ac_status); } &&
9053          { ac_try='test -s conftest.$ac_objext'
9054   { (eval echo "$as_me:9054: \"$ac_try\"") >&5
9055   (eval $ac_try) 2>&5
9056   ac_status=$?
9057   echo "$as_me:9057: \$? = $ac_status" >&5
9058   (exit $ac_status); }; }; then
9059   cf_cv_define_sigwinch=maybe
9060 else
9061   echo "$as_me: failed program was:" >&5
9062 cat conftest.$ac_ext >&5
9063 cf_cv_define_sigwinch=no
9064 fi
9065 rm -f conftest.$ac_objext conftest.$ac_ext
9066
9067 fi
9068 rm -f conftest.$ac_objext conftest.$ac_ext
9069
9070 fi
9071 echo "$as_me:9071: result: $cf_cv_define_sigwinch" >&5
9072 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9073
9074 if test "$cf_cv_define_sigwinch" = maybe ; then
9075 echo "$as_me:9075: checking for actual SIGWINCH definition" >&5
9076 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9077 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9078   echo $ECHO_N "(cached) $ECHO_C" >&6
9079 else
9080
9081 cf_cv_fixup_sigwinch=unknown
9082 cf_sigwinch=32
9083 while test $cf_sigwinch != 1
9084 do
9085         cat >conftest.$ac_ext <<_ACEOF
9086 #line 9086 "configure"
9087 #include "confdefs.h"
9088
9089 #undef _XOPEN_SOURCE
9090 #undef _POSIX_SOURCE
9091 #undef _POSIX_C_SOURCE
9092 #include <sys/types.h>
9093 #include <sys/signal.h>
9094
9095 int
9096 main ()
9097 {
9098
9099 #if SIGWINCH != $cf_sigwinch
9100 make an error
9101 #endif
9102 int x = SIGWINCH
9103   ;
9104   return 0;
9105 }
9106 _ACEOF
9107 rm -f conftest.$ac_objext
9108 if { (eval echo "$as_me:9108: \"$ac_compile\"") >&5
9109   (eval $ac_compile) 2>&5
9110   ac_status=$?
9111   echo "$as_me:9111: \$? = $ac_status" >&5
9112   (exit $ac_status); } &&
9113          { ac_try='test -s conftest.$ac_objext'
9114   { (eval echo "$as_me:9114: \"$ac_try\"") >&5
9115   (eval $ac_try) 2>&5
9116   ac_status=$?
9117   echo "$as_me:9117: \$? = $ac_status" >&5
9118   (exit $ac_status); }; }; then
9119   cf_cv_fixup_sigwinch=$cf_sigwinch
9120          break
9121 else
9122   echo "$as_me: failed program was:" >&5
9123 cat conftest.$ac_ext >&5
9124 fi
9125 rm -f conftest.$ac_objext conftest.$ac_ext
9126
9127 cf_sigwinch=`expr $cf_sigwinch - 1`
9128 done
9129
9130 fi
9131 echo "$as_me:9131: result: $cf_cv_fixup_sigwinch" >&5
9132 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9133
9134         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9135                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9136         fi
9137 fi
9138
9139 # Checks for CODESET support.
9140
9141 echo "$as_me:9141: checking for nl_langinfo and CODESET" >&5
9142 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9143 if test "${am_cv_langinfo_codeset+set}" = set; then
9144   echo $ECHO_N "(cached) $ECHO_C" >&6
9145 else
9146   cat >conftest.$ac_ext <<_ACEOF
9147 #line 9147 "configure"
9148 #include "confdefs.h"
9149 #include <langinfo.h>
9150 int
9151 main ()
9152 {
9153 char* cs = nl_langinfo(CODESET);
9154   ;
9155   return 0;
9156 }
9157 _ACEOF
9158 rm -f conftest.$ac_objext conftest$ac_exeext
9159 if { (eval echo "$as_me:9159: \"$ac_link\"") >&5
9160   (eval $ac_link) 2>&5
9161   ac_status=$?
9162   echo "$as_me:9162: \$? = $ac_status" >&5
9163   (exit $ac_status); } &&
9164          { ac_try='test -s conftest$ac_exeext'
9165   { (eval echo "$as_me:9165: \"$ac_try\"") >&5
9166   (eval $ac_try) 2>&5
9167   ac_status=$?
9168   echo "$as_me:9168: \$? = $ac_status" >&5
9169   (exit $ac_status); }; }; then
9170   am_cv_langinfo_codeset=yes
9171 else
9172   echo "$as_me: failed program was:" >&5
9173 cat conftest.$ac_ext >&5
9174 am_cv_langinfo_codeset=no
9175 fi
9176 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9177
9178 fi
9179 echo "$as_me:9179: result: $am_cv_langinfo_codeset" >&5
9180 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9181         if test $am_cv_langinfo_codeset = yes; then
9182
9183 cat >>confdefs.h <<\EOF
9184 #define HAVE_LANGINFO_CODESET 1
9185 EOF
9186
9187         fi
9188
9189 # use these variables to work around a defect in gcc's fixincludes.
9190 NCURSES_OK_WCHAR_T=
9191 NCURSES_OK_WINT_T=
9192
9193 echo "$as_me:9193: checking if you want wide-character code" >&5
9194 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9195
9196 # Check whether --enable-widec or --disable-widec was given.
9197 if test "${enable_widec+set}" = set; then
9198   enableval="$enable_widec"
9199   with_widec=$enableval
9200 else
9201   with_widec=no
9202 fi;
9203 echo "$as_me:9203: result: $with_widec" >&5
9204 echo "${ECHO_T}$with_widec" >&6
9205 if test "x$with_widec" = xyes ; then
9206         if test "x$disable_lib_suffixes" = xno ; then
9207                 LIB_SUFFIX="w${LIB_SUFFIX}"
9208         fi
9209
9210 cat >>confdefs.h <<\EOF
9211 #define USE_WIDEC_SUPPORT 1
9212 EOF
9213
9214 cat >>confdefs.h <<\EOF
9215 #define NCURSES_WIDECHAR 1
9216 EOF
9217
9218 echo "$as_me:9218: checking if wchar.h can be used as is" >&5
9219 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9220 if test "${cf_cv_wchar_h_okay+set}" = set; then
9221   echo $ECHO_N "(cached) $ECHO_C" >&6
9222 else
9223
9224 cat >conftest.$ac_ext <<_ACEOF
9225 #line 9225 "configure"
9226 #include "confdefs.h"
9227
9228 #include <stdlib.h>
9229 #include <wchar.h>
9230
9231 int
9232 main ()
9233 {
9234
9235         wint_t foo = 0;
9236         int bar = iswpunct(foo)
9237   ;
9238   return 0;
9239 }
9240 _ACEOF
9241 rm -f conftest.$ac_objext
9242 if { (eval echo "$as_me:9242: \"$ac_compile\"") >&5
9243   (eval $ac_compile) 2>&5
9244   ac_status=$?
9245   echo "$as_me:9245: \$? = $ac_status" >&5
9246   (exit $ac_status); } &&
9247          { ac_try='test -s conftest.$ac_objext'
9248   { (eval echo "$as_me:9248: \"$ac_try\"") >&5
9249   (eval $ac_try) 2>&5
9250   ac_status=$?
9251   echo "$as_me:9251: \$? = $ac_status" >&5
9252   (exit $ac_status); }; }; then
9253   cf_cv_wchar_h_okay=yes
9254 else
9255   echo "$as_me: failed program was:" >&5
9256 cat conftest.$ac_ext >&5
9257 cf_cv_wchar_h_okay=no
9258 fi
9259 rm -f conftest.$ac_objext conftest.$ac_ext
9260 fi
9261 echo "$as_me:9261: result: $cf_cv_wchar_h_okay" >&5
9262 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9263
9264 if test $cf_cv_wchar_h_okay = no
9265 then
9266
9267 echo "$as_me:9267: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9268 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9269 cat >conftest.$ac_ext <<_ACEOF
9270 #line 9270 "configure"
9271 #include "confdefs.h"
9272 #include <sys/types.h>
9273
9274 int
9275 main ()
9276 {
9277
9278 #ifndef _XOPEN_SOURCE_EXTENDED
9279 make an error
9280 #endif
9281   ;
9282   return 0;
9283 }
9284 _ACEOF
9285 rm -f conftest.$ac_objext
9286 if { (eval echo "$as_me:9286: \"$ac_compile\"") >&5
9287   (eval $ac_compile) 2>&5
9288   ac_status=$?
9289   echo "$as_me:9289: \$? = $ac_status" >&5
9290   (exit $ac_status); } &&
9291          { ac_try='test -s conftest.$ac_objext'
9292   { (eval echo "$as_me:9292: \"$ac_try\"") >&5
9293   (eval $ac_try) 2>&5
9294   ac_status=$?
9295   echo "$as_me:9295: \$? = $ac_status" >&5
9296   (exit $ac_status); }; }; then
9297   cf_result=no
9298 else
9299   echo "$as_me: failed program was:" >&5
9300 cat conftest.$ac_ext >&5
9301 cf_result=yes
9302 fi
9303 rm -f conftest.$ac_objext conftest.$ac_ext
9304 echo "$as_me:9304: result: $cf_result" >&5
9305 echo "${ECHO_T}$cf_result" >&6
9306
9307 if test "$cf_result" = yes ; then
9308         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9309 elif test "x" != "x" ; then
9310         echo "$as_me:9310: checking checking for compatible value versus " >&5
9311 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9312         cat >conftest.$ac_ext <<_ACEOF
9313 #line 9313 "configure"
9314 #include "confdefs.h"
9315 #include <sys/types.h>
9316
9317 int
9318 main ()
9319 {
9320
9321 #if _XOPEN_SOURCE_EXTENDED- < 0
9322 make an error
9323 #endif
9324   ;
9325   return 0;
9326 }
9327 _ACEOF
9328 rm -f conftest.$ac_objext
9329 if { (eval echo "$as_me:9329: \"$ac_compile\"") >&5
9330   (eval $ac_compile) 2>&5
9331   ac_status=$?
9332   echo "$as_me:9332: \$? = $ac_status" >&5
9333   (exit $ac_status); } &&
9334          { ac_try='test -s conftest.$ac_objext'
9335   { (eval echo "$as_me:9335: \"$ac_try\"") >&5
9336   (eval $ac_try) 2>&5
9337   ac_status=$?
9338   echo "$as_me:9338: \$? = $ac_status" >&5
9339   (exit $ac_status); }; }; then
9340   cf_result=yes
9341 else
9342   echo "$as_me: failed program was:" >&5
9343 cat conftest.$ac_ext >&5
9344 cf_result=no
9345 fi
9346 rm -f conftest.$ac_objext conftest.$ac_ext
9347         echo "$as_me:9347: result: $cf_result" >&5
9348 echo "${ECHO_T}$cf_result" >&6
9349         if test "$cf_result" = no ; then
9350                 # perhaps we can override it - try...
9351                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9352         fi
9353 fi
9354
9355 fi
9356
9357         # with_overwrite=no
9358         NCURSES_CH_T=cchar_t
9359
9360 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9361 do
9362 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9363 echo "$as_me:9363: checking for $ac_func" >&5
9364 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9365 if eval "test \"\${$as_ac_var+set}\" = set"; then
9366   echo $ECHO_N "(cached) $ECHO_C" >&6
9367 else
9368   cat >conftest.$ac_ext <<_ACEOF
9369 #line 9369 "configure"
9370 #include "confdefs.h"
9371 /* System header to define __stub macros and hopefully few prototypes,
9372     which can conflict with char $ac_func (); below.  */
9373 #include <assert.h>
9374 /* Override any gcc2 internal prototype to avoid an error.  */
9375 #ifdef __cplusplus
9376 extern "C"
9377 #endif
9378 /* We use char because int might match the return type of a gcc2
9379    builtin and then its argument prototype would still apply.  */
9380 char $ac_func ();
9381 char (*f) ();
9382
9383 int
9384 main ()
9385 {
9386 /* The GNU C library defines this for functions which it implements
9387     to always fail with ENOSYS.  Some functions are actually named
9388     something starting with __ and the normal name is an alias.  */
9389 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9390 choke me
9391 #else
9392 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9393 #endif
9394
9395   ;
9396   return 0;
9397 }
9398 _ACEOF
9399 rm -f conftest.$ac_objext conftest$ac_exeext
9400 if { (eval echo "$as_me:9400: \"$ac_link\"") >&5
9401   (eval $ac_link) 2>&5
9402   ac_status=$?
9403   echo "$as_me:9403: \$? = $ac_status" >&5
9404   (exit $ac_status); } &&
9405          { ac_try='test -s conftest$ac_exeext'
9406   { (eval echo "$as_me:9406: \"$ac_try\"") >&5
9407   (eval $ac_try) 2>&5
9408   ac_status=$?
9409   echo "$as_me:9409: \$? = $ac_status" >&5
9410   (exit $ac_status); }; }; then
9411   eval "$as_ac_var=yes"
9412 else
9413   echo "$as_me: failed program was:" >&5
9414 cat conftest.$ac_ext >&5
9415 eval "$as_ac_var=no"
9416 fi
9417 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9418 fi
9419 echo "$as_me:9419: result: `eval echo '${'$as_ac_var'}'`" >&5
9420 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9421 if test `eval echo '${'$as_ac_var'}'` = yes; then
9422   cat >>confdefs.h <<EOF
9423 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9424 EOF
9425
9426 fi
9427 done
9428
9429         if test "x$ac_cv_func_putwc" != xyes ; then
9430
9431 echo "$as_me:9431: checking for multibyte character support" >&5
9432 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9433 if test "${cf_cv_utf8_lib+set}" = set; then
9434   echo $ECHO_N "(cached) $ECHO_C" >&6
9435 else
9436
9437         cf_save_LIBS="$LIBS"
9438         cat >conftest.$ac_ext <<_ACEOF
9439 #line 9439 "configure"
9440 #include "confdefs.h"
9441
9442 #include <stdlib.h>
9443 int
9444 main ()
9445 {
9446 putwc(0,0);
9447   ;
9448   return 0;
9449 }
9450 _ACEOF
9451 rm -f conftest.$ac_objext conftest$ac_exeext
9452 if { (eval echo "$as_me:9452: \"$ac_link\"") >&5
9453   (eval $ac_link) 2>&5
9454   ac_status=$?
9455   echo "$as_me:9455: \$? = $ac_status" >&5
9456   (exit $ac_status); } &&
9457          { ac_try='test -s conftest$ac_exeext'
9458   { (eval echo "$as_me:9458: \"$ac_try\"") >&5
9459   (eval $ac_try) 2>&5
9460   ac_status=$?
9461   echo "$as_me:9461: \$? = $ac_status" >&5
9462   (exit $ac_status); }; }; then
9463   cf_cv_utf8_lib=yes
9464 else
9465   echo "$as_me: failed program was:" >&5
9466 cat conftest.$ac_ext >&5
9467
9468 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9469 # will be set on completion of the AC_TRY_LINK below.
9470 cf_cv_header_path_utf8=
9471 cf_cv_library_path_utf8=
9472
9473 echo "${as_me:-configure}:9473: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9474
9475 cf_save_LIBS="$LIBS"
9476
9477 cat >conftest.$ac_ext <<_ACEOF
9478 #line 9478 "configure"
9479 #include "confdefs.h"
9480
9481 #include <libutf8.h>
9482 int
9483 main ()
9484 {
9485 putwc(0,0);
9486   ;
9487   return 0;
9488 }
9489 _ACEOF
9490 rm -f conftest.$ac_objext conftest$ac_exeext
9491 if { (eval echo "$as_me:9491: \"$ac_link\"") >&5
9492   (eval $ac_link) 2>&5
9493   ac_status=$?
9494   echo "$as_me:9494: \$? = $ac_status" >&5
9495   (exit $ac_status); } &&
9496          { ac_try='test -s conftest$ac_exeext'
9497   { (eval echo "$as_me:9497: \"$ac_try\"") >&5
9498   (eval $ac_try) 2>&5
9499   ac_status=$?
9500   echo "$as_me:9500: \$? = $ac_status" >&5
9501   (exit $ac_status); }; }; then
9502
9503         cf_cv_find_linkage_utf8=yes
9504         cf_cv_header_path_utf8=/usr/include
9505         cf_cv_library_path_utf8=/usr/lib
9506
9507 else
9508   echo "$as_me: failed program was:" >&5
9509 cat conftest.$ac_ext >&5
9510
9511 LIBS="-lutf8  $cf_save_LIBS"
9512
9513 cat >conftest.$ac_ext <<_ACEOF
9514 #line 9514 "configure"
9515 #include "confdefs.h"
9516
9517 #include <libutf8.h>
9518 int
9519 main ()
9520 {
9521 putwc(0,0);
9522   ;
9523   return 0;
9524 }
9525 _ACEOF
9526 rm -f conftest.$ac_objext conftest$ac_exeext
9527 if { (eval echo "$as_me:9527: \"$ac_link\"") >&5
9528   (eval $ac_link) 2>&5
9529   ac_status=$?
9530   echo "$as_me:9530: \$? = $ac_status" >&5
9531   (exit $ac_status); } &&
9532          { ac_try='test -s conftest$ac_exeext'
9533   { (eval echo "$as_me:9533: \"$ac_try\"") >&5
9534   (eval $ac_try) 2>&5
9535   ac_status=$?
9536   echo "$as_me:9536: \$? = $ac_status" >&5
9537   (exit $ac_status); }; }; then
9538
9539         cf_cv_find_linkage_utf8=yes
9540         cf_cv_header_path_utf8=/usr/include
9541         cf_cv_library_path_utf8=/usr/lib
9542         cf_cv_library_file_utf8="-lutf8"
9543
9544 else
9545   echo "$as_me: failed program was:" >&5
9546 cat conftest.$ac_ext >&5
9547
9548         cf_cv_find_linkage_utf8=no
9549         LIBS="$cf_save_LIBS"
9550
9551         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
9552
9553 echo "${as_me:-configure}:9553: testing find linkage for utf8 library ..." 1>&5
9554
9555 echo "${as_me:-configure}:9555: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9556
9557         cf_save_CPPFLAGS="$CPPFLAGS"
9558         cf_test_CPPFLAGS="$CPPFLAGS"
9559
9560 cf_search=
9561
9562 # collect the current set of include-directories from compiler flags
9563 cf_header_path_list=""
9564 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9565         for cf_header_path in $CPPFLAGS $CFLAGS
9566         do
9567                 case $cf_header_path in
9568                 (-I*)
9569                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9570
9571 test "x$cf_header_path" != "xNONE" && \
9572 test -d "$cf_header_path" && \
9573  {
9574         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9575         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9576         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9577         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9578         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9579         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9580 }
9581
9582                         cf_header_path_list="$cf_header_path_list $cf_search"
9583                         ;;
9584                 esac
9585         done
9586 fi
9587
9588 # add the variations for the package we are looking for
9589
9590 cf_search=
9591
9592 test "x$prefix" != "xNONE" && \
9593 test -d "$prefix" && \
9594  {
9595         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9596         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9597         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9598         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9599         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9600         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9601 }
9602
9603 for cf_subdir_prefix in \
9604         /usr \
9605         /usr/local \
9606         /usr/pkg \
9607         /opt \
9608         /opt/local \
9609         $HOME
9610 do
9611
9612 test "x$cf_subdir_prefix" != "x$prefix" && \
9613 test -d "$cf_subdir_prefix" && \
9614 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9615         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9616         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9617         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9618         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9619         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9620         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9621 }
9622
9623 done
9624
9625 test "$includedir" != NONE && \
9626 test "$includedir" != "/usr/include" && \
9627 test -d "$includedir" && {
9628         test -d $includedir &&    cf_search="$cf_search $includedir"
9629         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9630 }
9631
9632 test "$oldincludedir" != NONE && \
9633 test "$oldincludedir" != "/usr/include" && \
9634 test -d "$oldincludedir" && {
9635         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9636         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9637 }
9638
9639 cf_search="$cf_search $cf_header_path_list"
9640
9641         for cf_cv_header_path_utf8 in $cf_search
9642         do
9643                 if test -d $cf_cv_header_path_utf8 ; then
9644                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9645
9646 echo "${as_me:-configure}:9646: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9647
9648                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9649                         cat >conftest.$ac_ext <<_ACEOF
9650 #line 9650 "configure"
9651 #include "confdefs.h"
9652
9653 #include <libutf8.h>
9654 int
9655 main ()
9656 {
9657 putwc(0,0);
9658   ;
9659   return 0;
9660 }
9661 _ACEOF
9662 rm -f conftest.$ac_objext
9663 if { (eval echo "$as_me:9663: \"$ac_compile\"") >&5
9664   (eval $ac_compile) 2>&5
9665   ac_status=$?
9666   echo "$as_me:9666: \$? = $ac_status" >&5
9667   (exit $ac_status); } &&
9668          { ac_try='test -s conftest.$ac_objext'
9669   { (eval echo "$as_me:9669: \"$ac_try\"") >&5
9670   (eval $ac_try) 2>&5
9671   ac_status=$?
9672   echo "$as_me:9672: \$? = $ac_status" >&5
9673   (exit $ac_status); }; }; then
9674
9675                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9676
9677 echo "${as_me:-configure}:9677: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9678
9679                                 cf_cv_find_linkage_utf8=maybe
9680                                 cf_test_CPPFLAGS="$CPPFLAGS"
9681                                 break
9682 else
9683   echo "$as_me: failed program was:" >&5
9684 cat conftest.$ac_ext >&5
9685
9686                                 CPPFLAGS="$cf_save_CPPFLAGS"
9687
9688 fi
9689 rm -f conftest.$ac_objext conftest.$ac_ext
9690                 fi
9691         done
9692
9693         if test "$cf_cv_find_linkage_utf8" = maybe ; then
9694
9695 echo "${as_me:-configure}:9695: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9696
9697                 cf_save_LIBS="$LIBS"
9698                 cf_save_LDFLAGS="$LDFLAGS"
9699
9700                 if test "$cf_cv_find_linkage_utf8" != yes ; then
9701
9702 cf_search=
9703 cf_library_path_list=""
9704 if test -n "${LDFLAGS}${LIBS}" ; then
9705         for cf_library_path in $LDFLAGS $LIBS
9706         do
9707                 case $cf_library_path in
9708                 (-L*)
9709                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9710
9711 test "x$cf_library_path" != "xNONE" && \
9712 test -d "$cf_library_path" && \
9713  {
9714         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9715         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9716         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9717         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9718         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9719         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9720 }
9721
9722                         cf_library_path_list="$cf_library_path_list $cf_search"
9723                         ;;
9724                 esac
9725         done
9726 fi
9727
9728 cf_search=
9729
9730 test "x$prefix" != "xNONE" && \
9731 test -d "$prefix" && \
9732  {
9733         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9734         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9735         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9736         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9737         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9738         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9739 }
9740
9741 for cf_subdir_prefix in \
9742         /usr \
9743         /usr/local \
9744         /usr/pkg \
9745         /opt \
9746         /opt/local \
9747         $HOME
9748 do
9749
9750 test "x$cf_subdir_prefix" != "x$prefix" && \
9751 test -d "$cf_subdir_prefix" && \
9752 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9753         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
9754         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9755         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
9756         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
9757         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
9758         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
9759 }
9760
9761 done
9762
9763 cf_search="$cf_library_path_list $cf_search"
9764
9765                         for cf_cv_library_path_utf8 in $cf_search
9766                         do
9767                                 if test -d $cf_cv_library_path_utf8 ; then
9768                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
9769
9770 echo "${as_me:-configure}:9770: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9771
9772                                         CPPFLAGS="$cf_test_CPPFLAGS"
9773                                         LIBS="-lutf8  $cf_save_LIBS"
9774                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9775                                         cat >conftest.$ac_ext <<_ACEOF
9776 #line 9776 "configure"
9777 #include "confdefs.h"
9778
9779 #include <libutf8.h>
9780 int
9781 main ()
9782 {
9783 putwc(0,0);
9784   ;
9785   return 0;
9786 }
9787 _ACEOF
9788 rm -f conftest.$ac_objext conftest$ac_exeext
9789 if { (eval echo "$as_me:9789: \"$ac_link\"") >&5
9790   (eval $ac_link) 2>&5
9791   ac_status=$?
9792   echo "$as_me:9792: \$? = $ac_status" >&5
9793   (exit $ac_status); } &&
9794          { ac_try='test -s conftest$ac_exeext'
9795   { (eval echo "$as_me:9795: \"$ac_try\"") >&5
9796   (eval $ac_try) 2>&5
9797   ac_status=$?
9798   echo "$as_me:9798: \$? = $ac_status" >&5
9799   (exit $ac_status); }; }; then
9800
9801                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9802
9803 echo "${as_me:-configure}:9803: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9804
9805                                         cf_cv_find_linkage_utf8=yes
9806                                         cf_cv_library_file_utf8="-lutf8"
9807                                         break
9808 else
9809   echo "$as_me: failed program was:" >&5
9810 cat conftest.$ac_ext >&5
9811
9812                                         CPPFLAGS="$cf_save_CPPFLAGS"
9813                                         LIBS="$cf_save_LIBS"
9814                                         LDFLAGS="$cf_save_LDFLAGS"
9815
9816 fi
9817 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9818                                 fi
9819                         done
9820                         CPPFLAGS="$cf_save_CPPFLAGS"
9821                         LDFLAGS="$cf_save_LDFLAGS"
9822                 fi
9823
9824         else
9825                 cf_cv_find_linkage_utf8=no
9826         fi
9827
9828 fi
9829 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9830
9831 fi
9832 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9833
9834 LIBS="$cf_save_LIBS"
9835
9836 if test "$cf_cv_find_linkage_utf8" = yes ; then
9837 cf_cv_utf8_lib=add-on
9838 else
9839 cf_cv_utf8_lib=no
9840 fi
9841
9842 fi
9843 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9844 fi
9845 echo "$as_me:9845: result: $cf_cv_utf8_lib" >&5
9846 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9847
9848 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9849 # ncurses/ncursesw:
9850 if test "$cf_cv_utf8_lib" = "add-on" ; then
9851
9852 cat >>confdefs.h <<\EOF
9853 #define HAVE_LIBUTF8_H 1
9854 EOF
9855
9856 if test -n "$cf_cv_header_path_utf8" ; then
9857   for cf_add_incdir in $cf_cv_header_path_utf8
9858   do
9859         while test $cf_add_incdir != /usr/include
9860         do
9861           if test -d $cf_add_incdir
9862           then
9863                 cf_have_incdir=no
9864                 if test -n "$CFLAGS$CPPFLAGS" ; then
9865                   # a loop is needed to ensure we can add subdirs of existing dirs
9866                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9867                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9868                           cf_have_incdir=yes; break
9869                         fi
9870                   done
9871                 fi
9872
9873                 if test "$cf_have_incdir" = no ; then
9874                   if test "$cf_add_incdir" = /usr/local/include ; then
9875                         if test "$GCC" = yes
9876                         then
9877                           cf_save_CPPFLAGS=$CPPFLAGS
9878                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9879                           cat >conftest.$ac_ext <<_ACEOF
9880 #line 9880 "configure"
9881 #include "confdefs.h"
9882 #include <stdio.h>
9883 int
9884 main ()
9885 {
9886 printf("Hello")
9887   ;
9888   return 0;
9889 }
9890 _ACEOF
9891 rm -f conftest.$ac_objext
9892 if { (eval echo "$as_me:9892: \"$ac_compile\"") >&5
9893   (eval $ac_compile) 2>&5
9894   ac_status=$?
9895   echo "$as_me:9895: \$? = $ac_status" >&5
9896   (exit $ac_status); } &&
9897          { ac_try='test -s conftest.$ac_objext'
9898   { (eval echo "$as_me:9898: \"$ac_try\"") >&5
9899   (eval $ac_try) 2>&5
9900   ac_status=$?
9901   echo "$as_me:9901: \$? = $ac_status" >&5
9902   (exit $ac_status); }; }; then
9903   :
9904 else
9905   echo "$as_me: failed program was:" >&5
9906 cat conftest.$ac_ext >&5
9907 cf_have_incdir=yes
9908 fi
9909 rm -f conftest.$ac_objext conftest.$ac_ext
9910                           CPPFLAGS=$cf_save_CPPFLAGS
9911                         fi
9912                   fi
9913                 fi
9914
9915                 if test "$cf_have_incdir" = no ; then
9916                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9917
9918 echo "${as_me:-configure}:9918: testing adding $cf_add_incdir to include-path ..." 1>&5
9919
9920                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9921
9922                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9923                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9924                   cf_add_incdir="$cf_top_incdir"
9925                 else
9926                   break
9927                 fi
9928           fi
9929         done
9930   done
9931 fi
9932
9933 if test -n "$cf_cv_library_path_utf8" ; then
9934         for cf_add_libdir in $cf_cv_library_path_utf8
9935         do
9936                 if test $cf_add_libdir = /usr/lib ; then
9937                         :
9938                 elif test -d $cf_add_libdir
9939                 then
9940                         cf_have_libdir=no
9941                         if test -n "$LDFLAGS$LIBS" ; then
9942                                 # a loop is needed to ensure we can add subdirs of existing dirs
9943                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
9944                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9945                                                 cf_have_libdir=yes; break
9946                                         fi
9947                                 done
9948                         fi
9949                         if test "$cf_have_libdir" = no ; then
9950                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9951
9952 echo "${as_me:-configure}:9952: testing adding $cf_add_libdir to library-path ..." 1>&5
9953
9954                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9955                         fi
9956                 fi
9957         done
9958 fi
9959
9960 cf_add_libs="$cf_cv_library_file_utf8"
9961 # Filter out duplicates - this happens with badly-designed ".pc" files...
9962 for cf_add_1lib in $LIBS
9963 do
9964         for cf_add_2lib in $cf_add_libs
9965         do
9966                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9967                 then
9968                         cf_add_1lib=
9969                         break
9970                 fi
9971         done
9972         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9973 done
9974 LIBS="$cf_add_libs"
9975
9976 fi
9977
9978                 if test "$cf_cv_utf8_lib" != no ; then
9979                         NCURSES_LIBUTF8=1
9980                 fi
9981         fi
9982
9983 # This is needed on Tru64 5.0 to declare mbstate_t
9984 echo "$as_me:9984: checking if we must include wchar.h to declare mbstate_t" >&5
9985 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9986 if test "${cf_cv_mbstate_t+set}" = set; then
9987   echo $ECHO_N "(cached) $ECHO_C" >&6
9988 else
9989
9990 cat >conftest.$ac_ext <<_ACEOF
9991 #line 9991 "configure"
9992 #include "confdefs.h"
9993
9994 #include <stdlib.h>
9995 #include <stdarg.h>
9996 #include <stdio.h>
9997 #ifdef HAVE_LIBUTF8_H
9998 #include <libutf8.h>
9999 #endif
10000 int
10001 main ()
10002 {
10003 mbstate_t state
10004   ;
10005   return 0;
10006 }
10007 _ACEOF
10008 rm -f conftest.$ac_objext
10009 if { (eval echo "$as_me:10009: \"$ac_compile\"") >&5
10010   (eval $ac_compile) 2>&5
10011   ac_status=$?
10012   echo "$as_me:10012: \$? = $ac_status" >&5
10013   (exit $ac_status); } &&
10014          { ac_try='test -s conftest.$ac_objext'
10015   { (eval echo "$as_me:10015: \"$ac_try\"") >&5
10016   (eval $ac_try) 2>&5
10017   ac_status=$?
10018   echo "$as_me:10018: \$? = $ac_status" >&5
10019   (exit $ac_status); }; }; then
10020   cf_cv_mbstate_t=no
10021 else
10022   echo "$as_me: failed program was:" >&5
10023 cat conftest.$ac_ext >&5
10024 cat >conftest.$ac_ext <<_ACEOF
10025 #line 10025 "configure"
10026 #include "confdefs.h"
10027
10028 #include <stdlib.h>
10029 #include <stdarg.h>
10030 #include <stdio.h>
10031 #include <wchar.h>
10032 #ifdef HAVE_LIBUTF8_H
10033 #include <libutf8.h>
10034 #endif
10035 int
10036 main ()
10037 {
10038 mbstate_t value
10039   ;
10040   return 0;
10041 }
10042 _ACEOF
10043 rm -f conftest.$ac_objext
10044 if { (eval echo "$as_me:10044: \"$ac_compile\"") >&5
10045   (eval $ac_compile) 2>&5
10046   ac_status=$?
10047   echo "$as_me:10047: \$? = $ac_status" >&5
10048   (exit $ac_status); } &&
10049          { ac_try='test -s conftest.$ac_objext'
10050   { (eval echo "$as_me:10050: \"$ac_try\"") >&5
10051   (eval $ac_try) 2>&5
10052   ac_status=$?
10053   echo "$as_me:10053: \$? = $ac_status" >&5
10054   (exit $ac_status); }; }; then
10055   cf_cv_mbstate_t=yes
10056 else
10057   echo "$as_me: failed program was:" >&5
10058 cat conftest.$ac_ext >&5
10059 cf_cv_mbstate_t=unknown
10060 fi
10061 rm -f conftest.$ac_objext conftest.$ac_ext
10062 fi
10063 rm -f conftest.$ac_objext conftest.$ac_ext
10064 fi
10065 echo "$as_me:10065: result: $cf_cv_mbstate_t" >&5
10066 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10067
10068 if test "$cf_cv_mbstate_t" = yes ; then
10069
10070 cat >>confdefs.h <<\EOF
10071 #define NEED_WCHAR_H 1
10072 EOF
10073
10074         NEED_WCHAR_H=1
10075 fi
10076
10077 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10078 if test "$cf_cv_mbstate_t" = unknown ; then
10079         NCURSES_MBSTATE_T=1
10080 fi
10081
10082 # This is needed on Tru64 5.0 to declare wchar_t
10083 echo "$as_me:10083: checking if we must include wchar.h to declare wchar_t" >&5
10084 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10085 if test "${cf_cv_wchar_t+set}" = set; then
10086   echo $ECHO_N "(cached) $ECHO_C" >&6
10087 else
10088
10089 cat >conftest.$ac_ext <<_ACEOF
10090 #line 10090 "configure"
10091 #include "confdefs.h"
10092
10093 #include <stdlib.h>
10094 #include <stdarg.h>
10095 #include <stdio.h>
10096 #ifdef HAVE_LIBUTF8_H
10097 #include <libutf8.h>
10098 #endif
10099 int
10100 main ()
10101 {
10102 wchar_t state
10103   ;
10104   return 0;
10105 }
10106 _ACEOF
10107 rm -f conftest.$ac_objext
10108 if { (eval echo "$as_me:10108: \"$ac_compile\"") >&5
10109   (eval $ac_compile) 2>&5
10110   ac_status=$?
10111   echo "$as_me:10111: \$? = $ac_status" >&5
10112   (exit $ac_status); } &&
10113          { ac_try='test -s conftest.$ac_objext'
10114   { (eval echo "$as_me:10114: \"$ac_try\"") >&5
10115   (eval $ac_try) 2>&5
10116   ac_status=$?
10117   echo "$as_me:10117: \$? = $ac_status" >&5
10118   (exit $ac_status); }; }; then
10119   cf_cv_wchar_t=no
10120 else
10121   echo "$as_me: failed program was:" >&5
10122 cat conftest.$ac_ext >&5
10123 cat >conftest.$ac_ext <<_ACEOF
10124 #line 10124 "configure"
10125 #include "confdefs.h"
10126
10127 #include <stdlib.h>
10128 #include <stdarg.h>
10129 #include <stdio.h>
10130 #include <wchar.h>
10131 #ifdef HAVE_LIBUTF8_H
10132 #include <libutf8.h>
10133 #endif
10134 int
10135 main ()
10136 {
10137 wchar_t value
10138   ;
10139   return 0;
10140 }
10141 _ACEOF
10142 rm -f conftest.$ac_objext
10143 if { (eval echo "$as_me:10143: \"$ac_compile\"") >&5
10144   (eval $ac_compile) 2>&5
10145   ac_status=$?
10146   echo "$as_me:10146: \$? = $ac_status" >&5
10147   (exit $ac_status); } &&
10148          { ac_try='test -s conftest.$ac_objext'
10149   { (eval echo "$as_me:10149: \"$ac_try\"") >&5
10150   (eval $ac_try) 2>&5
10151   ac_status=$?
10152   echo "$as_me:10152: \$? = $ac_status" >&5
10153   (exit $ac_status); }; }; then
10154   cf_cv_wchar_t=yes
10155 else
10156   echo "$as_me: failed program was:" >&5
10157 cat conftest.$ac_ext >&5
10158 cf_cv_wchar_t=unknown
10159 fi
10160 rm -f conftest.$ac_objext conftest.$ac_ext
10161 fi
10162 rm -f conftest.$ac_objext conftest.$ac_ext
10163 fi
10164 echo "$as_me:10164: result: $cf_cv_wchar_t" >&5
10165 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10166
10167 if test "$cf_cv_wchar_t" = yes ; then
10168
10169 cat >>confdefs.h <<\EOF
10170 #define NEED_WCHAR_H 1
10171 EOF
10172
10173         NEED_WCHAR_H=1
10174 fi
10175
10176 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10177 if test "$cf_cv_wchar_t" = unknown ; then
10178         NCURSES_WCHAR_T=1
10179 fi
10180
10181 # if we find wchar_t in either place, use substitution to provide a fallback.
10182 if test "$cf_cv_wchar_t" != unknown ; then
10183         NCURSES_OK_WCHAR_T=1
10184 fi
10185
10186 # This is needed on Tru64 5.0 to declare wint_t
10187 echo "$as_me:10187: checking if we must include wchar.h to declare wint_t" >&5
10188 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10189 if test "${cf_cv_wint_t+set}" = set; then
10190   echo $ECHO_N "(cached) $ECHO_C" >&6
10191 else
10192
10193 cat >conftest.$ac_ext <<_ACEOF
10194 #line 10194 "configure"
10195 #include "confdefs.h"
10196
10197 #include <stdlib.h>
10198 #include <stdarg.h>
10199 #include <stdio.h>
10200 #ifdef HAVE_LIBUTF8_H
10201 #include <libutf8.h>
10202 #endif
10203 int
10204 main ()
10205 {
10206 wint_t state
10207   ;
10208   return 0;
10209 }
10210 _ACEOF
10211 rm -f conftest.$ac_objext
10212 if { (eval echo "$as_me:10212: \"$ac_compile\"") >&5
10213   (eval $ac_compile) 2>&5
10214   ac_status=$?
10215   echo "$as_me:10215: \$? = $ac_status" >&5
10216   (exit $ac_status); } &&
10217          { ac_try='test -s conftest.$ac_objext'
10218   { (eval echo "$as_me:10218: \"$ac_try\"") >&5
10219   (eval $ac_try) 2>&5
10220   ac_status=$?
10221   echo "$as_me:10221: \$? = $ac_status" >&5
10222   (exit $ac_status); }; }; then
10223   cf_cv_wint_t=no
10224 else
10225   echo "$as_me: failed program was:" >&5
10226 cat conftest.$ac_ext >&5
10227 cat >conftest.$ac_ext <<_ACEOF
10228 #line 10228 "configure"
10229 #include "confdefs.h"
10230
10231 #include <stdlib.h>
10232 #include <stdarg.h>
10233 #include <stdio.h>
10234 #include <wchar.h>
10235 #ifdef HAVE_LIBUTF8_H
10236 #include <libutf8.h>
10237 #endif
10238 int
10239 main ()
10240 {
10241 wint_t value
10242   ;
10243   return 0;
10244 }
10245 _ACEOF
10246 rm -f conftest.$ac_objext
10247 if { (eval echo "$as_me:10247: \"$ac_compile\"") >&5
10248   (eval $ac_compile) 2>&5
10249   ac_status=$?
10250   echo "$as_me:10250: \$? = $ac_status" >&5
10251   (exit $ac_status); } &&
10252          { ac_try='test -s conftest.$ac_objext'
10253   { (eval echo "$as_me:10253: \"$ac_try\"") >&5
10254   (eval $ac_try) 2>&5
10255   ac_status=$?
10256   echo "$as_me:10256: \$? = $ac_status" >&5
10257   (exit $ac_status); }; }; then
10258   cf_cv_wint_t=yes
10259 else
10260   echo "$as_me: failed program was:" >&5
10261 cat conftest.$ac_ext >&5
10262 cf_cv_wint_t=unknown
10263 fi
10264 rm -f conftest.$ac_objext conftest.$ac_ext
10265 fi
10266 rm -f conftest.$ac_objext conftest.$ac_ext
10267 fi
10268 echo "$as_me:10268: result: $cf_cv_wint_t" >&5
10269 echo "${ECHO_T}$cf_cv_wint_t" >&6
10270
10271 if test "$cf_cv_wint_t" = yes ; then
10272
10273 cat >>confdefs.h <<\EOF
10274 #define NEED_WCHAR_H 1
10275 EOF
10276
10277         NEED_WCHAR_H=1
10278 fi
10279
10280 # if we do not find wint_t in either place, use substitution to provide a fallback.
10281 if test "$cf_cv_wint_t" = unknown ; then
10282         NCURSES_WINT_T=1
10283 fi
10284
10285 # if we find wint_t in either place, use substitution to provide a fallback.
10286 if test "$cf_cv_wint_t" != unknown ; then
10287         NCURSES_OK_WINT_T=1
10288 fi
10289
10290         if test "$NCURSES_MBSTATE_T" != 0; then
10291
10292 cat >>confdefs.h <<\EOF
10293 #define NEED_MBSTATE_T_DEF 1
10294 EOF
10295
10296         fi
10297 fi
10298
10299 ###   use option --disable-lp64 to allow long chtype
10300 case $cf_cv_abi_version in
10301 ([345]*)
10302         default_with_lp64=no
10303         ;;
10304 (*)
10305         default_with_lp64=yes
10306         ;;
10307 esac
10308
10309 echo "$as_me:10309: checking whether to enable _LP64 definition in curses.h" >&5
10310 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10311
10312 # Check whether --enable-lp64 or --disable-lp64 was given.
10313 if test "${enable_lp64+set}" = set; then
10314   enableval="$enable_lp64"
10315   with_lp64=$enableval
10316 else
10317   with_lp64=$default_with_lp64
10318 fi;
10319 echo "$as_me:10319: result: $with_lp64" >&5
10320 echo "${ECHO_T}$with_lp64" >&6
10321
10322 if test "x$with_lp64" = xyes ; then
10323         cf_cv_enable_lp64=1
10324 else
10325         cf_cv_enable_lp64=0
10326 fi
10327
10328 # Check whether --enable-largefile or --disable-largefile was given.
10329 if test "${enable_largefile+set}" = set; then
10330   enableval="$enable_largefile"
10331
10332 fi;
10333 if test "$enable_largefile" != no; then
10334
10335   echo "$as_me:10335: checking for special C compiler options needed for large files" >&5
10336 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10337 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10338   echo $ECHO_N "(cached) $ECHO_C" >&6
10339 else
10340   ac_cv_sys_largefile_CC=no
10341      if test "$GCC" != yes; then
10342        ac_save_CC=$CC
10343        while :; do
10344          # IRIX 6.2 and later do not support large files by default,
10345          # so use the C compiler's -n32 option if that helps.
10346          cat >conftest.$ac_ext <<_ACEOF
10347 #line 10347 "configure"
10348 #include "confdefs.h"
10349 #include <sys/types.h>
10350  /* Check that off_t can represent 2**63 - 1 correctly.
10351     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10352     since some C++ compilers masquerading as C compilers
10353     incorrectly reject 9223372036854775807.  */
10354 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10355   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10356                        && LARGE_OFF_T % 2147483647 == 1)
10357                       ? 1 : -1];
10358 int
10359 main ()
10360 {
10361
10362   ;
10363   return 0;
10364 }
10365 _ACEOF
10366          rm -f conftest.$ac_objext
10367 if { (eval echo "$as_me:10367: \"$ac_compile\"") >&5
10368   (eval $ac_compile) 2>&5
10369   ac_status=$?
10370   echo "$as_me:10370: \$? = $ac_status" >&5
10371   (exit $ac_status); } &&
10372          { ac_try='test -s conftest.$ac_objext'
10373   { (eval echo "$as_me:10373: \"$ac_try\"") >&5
10374   (eval $ac_try) 2>&5
10375   ac_status=$?
10376   echo "$as_me:10376: \$? = $ac_status" >&5
10377   (exit $ac_status); }; }; then
10378   break
10379 else
10380   echo "$as_me: failed program was:" >&5
10381 cat conftest.$ac_ext >&5
10382 fi
10383 rm -f conftest.$ac_objext
10384          CC="$CC -n32"
10385          rm -f conftest.$ac_objext
10386 if { (eval echo "$as_me:10386: \"$ac_compile\"") >&5
10387   (eval $ac_compile) 2>&5
10388   ac_status=$?
10389   echo "$as_me:10389: \$? = $ac_status" >&5
10390   (exit $ac_status); } &&
10391          { ac_try='test -s conftest.$ac_objext'
10392   { (eval echo "$as_me:10392: \"$ac_try\"") >&5
10393   (eval $ac_try) 2>&5
10394   ac_status=$?
10395   echo "$as_me:10395: \$? = $ac_status" >&5
10396   (exit $ac_status); }; }; then
10397   ac_cv_sys_largefile_CC=' -n32'; break
10398 else
10399   echo "$as_me: failed program was:" >&5
10400 cat conftest.$ac_ext >&5
10401 fi
10402 rm -f conftest.$ac_objext
10403          break
10404        done
10405        CC=$ac_save_CC
10406        rm -f conftest.$ac_ext
10407     fi
10408 fi
10409 echo "$as_me:10409: result: $ac_cv_sys_largefile_CC" >&5
10410 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10411   if test "$ac_cv_sys_largefile_CC" != no; then
10412     CC=$CC$ac_cv_sys_largefile_CC
10413   fi
10414
10415   echo "$as_me:10415: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10416 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10417 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10418   echo $ECHO_N "(cached) $ECHO_C" >&6
10419 else
10420   while :; do
10421   ac_cv_sys_file_offset_bits=no
10422   cat >conftest.$ac_ext <<_ACEOF
10423 #line 10423 "configure"
10424 #include "confdefs.h"
10425 #include <sys/types.h>
10426  /* Check that off_t can represent 2**63 - 1 correctly.
10427     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10428     since some C++ compilers masquerading as C compilers
10429     incorrectly reject 9223372036854775807.  */
10430 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10431   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10432                        && LARGE_OFF_T % 2147483647 == 1)
10433                       ? 1 : -1];
10434 int
10435 main ()
10436 {
10437
10438   ;
10439   return 0;
10440 }
10441 _ACEOF
10442 rm -f conftest.$ac_objext
10443 if { (eval echo "$as_me:10443: \"$ac_compile\"") >&5
10444   (eval $ac_compile) 2>&5
10445   ac_status=$?
10446   echo "$as_me:10446: \$? = $ac_status" >&5
10447   (exit $ac_status); } &&
10448          { ac_try='test -s conftest.$ac_objext'
10449   { (eval echo "$as_me:10449: \"$ac_try\"") >&5
10450   (eval $ac_try) 2>&5
10451   ac_status=$?
10452   echo "$as_me:10452: \$? = $ac_status" >&5
10453   (exit $ac_status); }; }; then
10454   break
10455 else
10456   echo "$as_me: failed program was:" >&5
10457 cat conftest.$ac_ext >&5
10458 fi
10459 rm -f conftest.$ac_objext conftest.$ac_ext
10460   cat >conftest.$ac_ext <<_ACEOF
10461 #line 10461 "configure"
10462 #include "confdefs.h"
10463 #define _FILE_OFFSET_BITS 64
10464 #include <sys/types.h>
10465  /* Check that off_t can represent 2**63 - 1 correctly.
10466     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10467     since some C++ compilers masquerading as C compilers
10468     incorrectly reject 9223372036854775807.  */
10469 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10470   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10471                        && LARGE_OFF_T % 2147483647 == 1)
10472                       ? 1 : -1];
10473 int
10474 main ()
10475 {
10476
10477   ;
10478   return 0;
10479 }
10480 _ACEOF
10481 rm -f conftest.$ac_objext
10482 if { (eval echo "$as_me:10482: \"$ac_compile\"") >&5
10483   (eval $ac_compile) 2>&5
10484   ac_status=$?
10485   echo "$as_me:10485: \$? = $ac_status" >&5
10486   (exit $ac_status); } &&
10487          { ac_try='test -s conftest.$ac_objext'
10488   { (eval echo "$as_me:10488: \"$ac_try\"") >&5
10489   (eval $ac_try) 2>&5
10490   ac_status=$?
10491   echo "$as_me:10491: \$? = $ac_status" >&5
10492   (exit $ac_status); }; }; then
10493   ac_cv_sys_file_offset_bits=64; break
10494 else
10495   echo "$as_me: failed program was:" >&5
10496 cat conftest.$ac_ext >&5
10497 fi
10498 rm -f conftest.$ac_objext conftest.$ac_ext
10499   break
10500 done
10501 fi
10502 echo "$as_me:10502: result: $ac_cv_sys_file_offset_bits" >&5
10503 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10504 if test "$ac_cv_sys_file_offset_bits" != no; then
10505
10506 cat >>confdefs.h <<EOF
10507 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10508 EOF
10509
10510 fi
10511 rm -rf conftest*
10512   echo "$as_me:10512: checking for _LARGE_FILES value needed for large files" >&5
10513 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10514 if test "${ac_cv_sys_large_files+set}" = set; then
10515   echo $ECHO_N "(cached) $ECHO_C" >&6
10516 else
10517   while :; do
10518   ac_cv_sys_large_files=no
10519   cat >conftest.$ac_ext <<_ACEOF
10520 #line 10520 "configure"
10521 #include "confdefs.h"
10522 #include <sys/types.h>
10523  /* Check that off_t can represent 2**63 - 1 correctly.
10524     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10525     since some C++ compilers masquerading as C compilers
10526     incorrectly reject 9223372036854775807.  */
10527 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10528   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10529                        && LARGE_OFF_T % 2147483647 == 1)
10530                       ? 1 : -1];
10531 int
10532 main ()
10533 {
10534
10535   ;
10536   return 0;
10537 }
10538 _ACEOF
10539 rm -f conftest.$ac_objext
10540 if { (eval echo "$as_me:10540: \"$ac_compile\"") >&5
10541   (eval $ac_compile) 2>&5
10542   ac_status=$?
10543   echo "$as_me:10543: \$? = $ac_status" >&5
10544   (exit $ac_status); } &&
10545          { ac_try='test -s conftest.$ac_objext'
10546   { (eval echo "$as_me:10546: \"$ac_try\"") >&5
10547   (eval $ac_try) 2>&5
10548   ac_status=$?
10549   echo "$as_me:10549: \$? = $ac_status" >&5
10550   (exit $ac_status); }; }; then
10551   break
10552 else
10553   echo "$as_me: failed program was:" >&5
10554 cat conftest.$ac_ext >&5
10555 fi
10556 rm -f conftest.$ac_objext conftest.$ac_ext
10557   cat >conftest.$ac_ext <<_ACEOF
10558 #line 10558 "configure"
10559 #include "confdefs.h"
10560 #define _LARGE_FILES 1
10561 #include <sys/types.h>
10562  /* Check that off_t can represent 2**63 - 1 correctly.
10563     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10564     since some C++ compilers masquerading as C compilers
10565     incorrectly reject 9223372036854775807.  */
10566 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10567   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10568                        && LARGE_OFF_T % 2147483647 == 1)
10569                       ? 1 : -1];
10570 int
10571 main ()
10572 {
10573
10574   ;
10575   return 0;
10576 }
10577 _ACEOF
10578 rm -f conftest.$ac_objext
10579 if { (eval echo "$as_me:10579: \"$ac_compile\"") >&5
10580   (eval $ac_compile) 2>&5
10581   ac_status=$?
10582   echo "$as_me:10582: \$? = $ac_status" >&5
10583   (exit $ac_status); } &&
10584          { ac_try='test -s conftest.$ac_objext'
10585   { (eval echo "$as_me:10585: \"$ac_try\"") >&5
10586   (eval $ac_try) 2>&5
10587   ac_status=$?
10588   echo "$as_me:10588: \$? = $ac_status" >&5
10589   (exit $ac_status); }; }; then
10590   ac_cv_sys_large_files=1; break
10591 else
10592   echo "$as_me: failed program was:" >&5
10593 cat conftest.$ac_ext >&5
10594 fi
10595 rm -f conftest.$ac_objext conftest.$ac_ext
10596   break
10597 done
10598 fi
10599 echo "$as_me:10599: result: $ac_cv_sys_large_files" >&5
10600 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10601 if test "$ac_cv_sys_large_files" != no; then
10602
10603 cat >>confdefs.h <<EOF
10604 #define _LARGE_FILES $ac_cv_sys_large_files
10605 EOF
10606
10607 fi
10608 rm -rf conftest*
10609 fi
10610
10611         if test "$enable_largefile" != no ; then
10612         echo "$as_me:10612: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10613 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10614 if test "${ac_cv_sys_largefile_source+set}" = set; then
10615   echo $ECHO_N "(cached) $ECHO_C" >&6
10616 else
10617   while :; do
10618   ac_cv_sys_largefile_source=no
10619   cat >conftest.$ac_ext <<_ACEOF
10620 #line 10620 "configure"
10621 #include "confdefs.h"
10622 #include <stdio.h>
10623 int
10624 main ()
10625 {
10626 return !fseeko;
10627   ;
10628   return 0;
10629 }
10630 _ACEOF
10631 rm -f conftest.$ac_objext
10632 if { (eval echo "$as_me:10632: \"$ac_compile\"") >&5
10633   (eval $ac_compile) 2>&5
10634   ac_status=$?
10635   echo "$as_me:10635: \$? = $ac_status" >&5
10636   (exit $ac_status); } &&
10637          { ac_try='test -s conftest.$ac_objext'
10638   { (eval echo "$as_me:10638: \"$ac_try\"") >&5
10639   (eval $ac_try) 2>&5
10640   ac_status=$?
10641   echo "$as_me:10641: \$? = $ac_status" >&5
10642   (exit $ac_status); }; }; then
10643   break
10644 else
10645   echo "$as_me: failed program was:" >&5
10646 cat conftest.$ac_ext >&5
10647 fi
10648 rm -f conftest.$ac_objext conftest.$ac_ext
10649   cat >conftest.$ac_ext <<_ACEOF
10650 #line 10650 "configure"
10651 #include "confdefs.h"
10652 #define _LARGEFILE_SOURCE 1
10653 #include <stdio.h>
10654 int
10655 main ()
10656 {
10657 return !fseeko;
10658   ;
10659   return 0;
10660 }
10661 _ACEOF
10662 rm -f conftest.$ac_objext
10663 if { (eval echo "$as_me:10663: \"$ac_compile\"") >&5
10664   (eval $ac_compile) 2>&5
10665   ac_status=$?
10666   echo "$as_me:10666: \$? = $ac_status" >&5
10667   (exit $ac_status); } &&
10668          { ac_try='test -s conftest.$ac_objext'
10669   { (eval echo "$as_me:10669: \"$ac_try\"") >&5
10670   (eval $ac_try) 2>&5
10671   ac_status=$?
10672   echo "$as_me:10672: \$? = $ac_status" >&5
10673   (exit $ac_status); }; }; then
10674   ac_cv_sys_largefile_source=1; break
10675 else
10676   echo "$as_me: failed program was:" >&5
10677 cat conftest.$ac_ext >&5
10678 fi
10679 rm -f conftest.$ac_objext conftest.$ac_ext
10680   break
10681 done
10682 fi
10683 echo "$as_me:10683: result: $ac_cv_sys_largefile_source" >&5
10684 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10685 if test "$ac_cv_sys_largefile_source" != no; then
10686
10687 cat >>confdefs.h <<EOF
10688 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10689 EOF
10690
10691 fi
10692 rm -rf conftest*
10693
10694 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10695 # in glibc 2.1.3, but that breaks too many other things.
10696 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10697 echo "$as_me:10697: checking for fseeko" >&5
10698 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10699 if test "${ac_cv_func_fseeko+set}" = set; then
10700   echo $ECHO_N "(cached) $ECHO_C" >&6
10701 else
10702   cat >conftest.$ac_ext <<_ACEOF
10703 #line 10703 "configure"
10704 #include "confdefs.h"
10705 #include <stdio.h>
10706 int
10707 main ()
10708 {
10709 return fseeko && fseeko (stdin, 0, 0);
10710   ;
10711   return 0;
10712 }
10713 _ACEOF
10714 rm -f conftest.$ac_objext conftest$ac_exeext
10715 if { (eval echo "$as_me:10715: \"$ac_link\"") >&5
10716   (eval $ac_link) 2>&5
10717   ac_status=$?
10718   echo "$as_me:10718: \$? = $ac_status" >&5
10719   (exit $ac_status); } &&
10720          { ac_try='test -s conftest$ac_exeext'
10721   { (eval echo "$as_me:10721: \"$ac_try\"") >&5
10722   (eval $ac_try) 2>&5
10723   ac_status=$?
10724   echo "$as_me:10724: \$? = $ac_status" >&5
10725   (exit $ac_status); }; }; then
10726   ac_cv_func_fseeko=yes
10727 else
10728   echo "$as_me: failed program was:" >&5
10729 cat conftest.$ac_ext >&5
10730 ac_cv_func_fseeko=no
10731 fi
10732 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10733 fi
10734 echo "$as_me:10734: result: $ac_cv_func_fseeko" >&5
10735 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10736 if test $ac_cv_func_fseeko = yes; then
10737
10738 cat >>confdefs.h <<\EOF
10739 #define HAVE_FSEEKO 1
10740 EOF
10741
10742 fi
10743
10744         # Normally we would collect these definitions in the config.h,
10745         # but (like _XOPEN_SOURCE), some environments rely on having these
10746         # defined before any of the system headers are included.  Another
10747         # case comes up with C++, e.g., on AIX the compiler compiles the
10748         # header files by themselves before looking at the body files it is
10749         # told to compile.  For ncurses, those header files do not include
10750         # the config.h
10751         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10752         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10753         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10754
10755         echo "$as_me:10755: checking whether to use struct dirent64" >&5
10756 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10757 if test "${cf_cv_struct_dirent64+set}" = set; then
10758   echo $ECHO_N "(cached) $ECHO_C" >&6
10759 else
10760
10761                 cat >conftest.$ac_ext <<_ACEOF
10762 #line 10762 "configure"
10763 #include "confdefs.h"
10764
10765 #include <sys/types.h>
10766 #include <dirent.h>
10767
10768 int
10769 main ()
10770 {
10771
10772                 /* if transitional largefile support is setup, this is true */
10773                 extern struct dirent64 * readdir(DIR *);
10774                 struct dirent64 *x = readdir((DIR *)0);
10775                 struct dirent *y = readdir((DIR *)0);
10776                 int z = x - y;
10777
10778   ;
10779   return 0;
10780 }
10781 _ACEOF
10782 rm -f conftest.$ac_objext
10783 if { (eval echo "$as_me:10783: \"$ac_compile\"") >&5
10784   (eval $ac_compile) 2>&5
10785   ac_status=$?
10786   echo "$as_me:10786: \$? = $ac_status" >&5
10787   (exit $ac_status); } &&
10788          { ac_try='test -s conftest.$ac_objext'
10789   { (eval echo "$as_me:10789: \"$ac_try\"") >&5
10790   (eval $ac_try) 2>&5
10791   ac_status=$?
10792   echo "$as_me:10792: \$? = $ac_status" >&5
10793   (exit $ac_status); }; }; then
10794   cf_cv_struct_dirent64=yes
10795 else
10796   echo "$as_me: failed program was:" >&5
10797 cat conftest.$ac_ext >&5
10798 cf_cv_struct_dirent64=no
10799 fi
10800 rm -f conftest.$ac_objext conftest.$ac_ext
10801
10802 fi
10803 echo "$as_me:10803: result: $cf_cv_struct_dirent64" >&5
10804 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10805         test "$cf_cv_struct_dirent64" = yes &&
10806 cat >>confdefs.h <<\EOF
10807 #define HAVE_STRUCT_DIRENT64 1
10808 EOF
10809
10810         fi
10811
10812 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10813 echo "$as_me:10813: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10814 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10815
10816 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10817 if test "${enable_tparm_varargs+set}" = set; then
10818   enableval="$enable_tparm_varargs"
10819   with_tparm_varargs=$enableval
10820 else
10821   with_tparm_varargs=yes
10822 fi;
10823 echo "$as_me:10823: result: $with_tparm_varargs" >&5
10824 echo "${ECHO_T}$with_tparm_varargs" >&6
10825 NCURSES_TPARM_VARARGS=0
10826 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10827
10828 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10829 if test "$with_ticlib" != no ; then
10830 echo "$as_me:10830: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10831 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10832
10833 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10834 if test "${enable_tic_depends+set}" = set; then
10835   enableval="$enable_tic_depends"
10836   with_tic_depends=$enableval
10837 else
10838   with_tic_depends=yes
10839 fi;
10840 echo "$as_me:10840: result: $with_tic_depends" >&5
10841 echo "${ECHO_T}$with_tic_depends" >&6
10842 else
10843         with_tic_depends=no
10844 fi
10845
10846 ###   use option --with-bool to override bool's type
10847 echo "$as_me:10847: checking for type of bool" >&5
10848 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10849
10850 # Check whether --with-bool or --without-bool was given.
10851 if test "${with_bool+set}" = set; then
10852   withval="$with_bool"
10853   NCURSES_BOOL="$withval"
10854 else
10855   NCURSES_BOOL=auto
10856 fi;
10857 echo "$as_me:10857: result: $NCURSES_BOOL" >&5
10858 echo "${ECHO_T}$NCURSES_BOOL" >&6
10859
10860 echo "$as_me:10860: checking for alternate terminal capabilities file" >&5
10861 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10862
10863 # Check whether --with-caps or --without-caps was given.
10864 if test "${with_caps+set}" = set; then
10865   withval="$with_caps"
10866   TERMINFO_CAPS=Caps.$withval
10867 else
10868   TERMINFO_CAPS=Caps
10869 fi;
10870 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10871 echo "$as_me:10871: result: $TERMINFO_CAPS" >&5
10872 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10873
10874 ###   use option --with-chtype to override chtype's type
10875 echo "$as_me:10875: checking for type of chtype" >&5
10876 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10877
10878 # Check whether --with-chtype or --without-chtype was given.
10879 if test "${with_chtype+set}" = set; then
10880   withval="$with_chtype"
10881   NCURSES_CHTYPE="$withval"
10882 else
10883   NCURSES_CHTYPE=$cf_dft_chtype
10884 fi;
10885 echo "$as_me:10885: result: $NCURSES_CHTYPE" >&5
10886 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10887
10888 ###   use option --with-ospeed to override ospeed's type
10889 echo "$as_me:10889: checking for type of ospeed" >&5
10890 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10891
10892 # Check whether --with-ospeed or --without-ospeed was given.
10893 if test "${with_ospeed+set}" = set; then
10894   withval="$with_ospeed"
10895   NCURSES_OSPEED="$withval"
10896 else
10897   NCURSES_OSPEED=short
10898 fi;
10899 echo "$as_me:10899: result: $NCURSES_OSPEED" >&5
10900 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10901
10902 ###   use option --with-mmask-t to override mmask_t's type
10903 echo "$as_me:10903: checking for type of mmask_t" >&5
10904 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10905
10906 # Check whether --with-mmask-t or --without-mmask-t was given.
10907 if test "${with_mmask_t+set}" = set; then
10908   withval="$with_mmask_t"
10909   NCURSES_MMASK_T="$withval"
10910 else
10911   NCURSES_MMASK_T=$cf_dft_mmask_t
10912 fi;
10913 echo "$as_me:10913: result: $NCURSES_MMASK_T" >&5
10914 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10915
10916 ###   use option --with-ccharw-max to override CCHARW_MAX size
10917 echo "$as_me:10917: checking for size CCHARW_MAX" >&5
10918 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10919
10920 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10921 if test "${with_ccharw_max+set}" = set; then
10922   withval="$with_ccharw_max"
10923   NCURSES_CCHARW_MAX="$withval"
10924 else
10925   NCURSES_CCHARW_MAX=5
10926 fi;
10927 echo "$as_me:10927: result: $NCURSES_CCHARW_MAX" >&5
10928 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10929
10930 ###   use option --with-tparm-arg to override tparm's argument type
10931 echo "$as_me:10931: checking for type of tparm args" >&5
10932 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10933
10934 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10935 if test "${with_tparm_arg+set}" = set; then
10936   withval="$with_tparm_arg"
10937   NCURSES_TPARM_ARG="$withval"
10938 else
10939   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
10940 fi;
10941 echo "$as_me:10941: result: $NCURSES_TPARM_ARG" >&5
10942 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10943
10944 ### Enable compiling-in rcs id's
10945 echo "$as_me:10945: checking if RCS identifiers should be compiled-in" >&5
10946 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10947
10948 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10949 if test "${with_rcs_ids+set}" = set; then
10950   withval="$with_rcs_ids"
10951   with_rcs_ids=$withval
10952 else
10953   with_rcs_ids=no
10954 fi;
10955 echo "$as_me:10955: result: $with_rcs_ids" >&5
10956 echo "${ECHO_T}$with_rcs_ids" >&6
10957 test "x$with_rcs_ids" = xyes &&
10958 cat >>confdefs.h <<\EOF
10959 #define USE_RCS_IDS 1
10960 EOF
10961
10962 ###############################################################################
10963
10964 echo "$as_me:10964: checking format of man-pages" >&5
10965 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10966
10967 # Check whether --with-manpage-format or --without-manpage-format was given.
10968 if test "${with_manpage_format+set}" = set; then
10969   withval="$with_manpage_format"
10970   MANPAGE_FORMAT=$withval
10971 else
10972   MANPAGE_FORMAT=unknown
10973 fi;
10974
10975 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10976 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10977
10978 cf_unknown=
10979
10980 case $MANPAGE_FORMAT in
10981 (unknown)
10982         if test -z "$MANPATH" ; then
10983                 MANPATH="/usr/man:/usr/share/man"
10984         fi
10985
10986         # look for the 'date' man-page (it's most likely to be installed!)
10987         MANPAGE_FORMAT=
10988         cf_preform=no
10989         cf_catonly=yes
10990         cf_example=date
10991
10992         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10993         for cf_dir in $MANPATH; do
10994                 test -z "$cf_dir" && cf_dir=/usr/man
10995                 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
10996                 do
10997                         cf_test=`echo $cf_name | sed -e 's/*//'`
10998                         if test "x$cf_test" = "x$cf_name" ; then
10999
11000                                 case "$cf_name" in
11001                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11002                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11003                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11004                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11005                                 esac
11006
11007                                 case "$cf_name" in
11008                                 ($cf_dir/man*)
11009                                         cf_catonly=no
11010                                         ;;
11011                                 ($cf_dir/cat*)
11012                                         cf_preform=yes
11013                                         ;;
11014                                 esac
11015                                 break
11016                         fi
11017
11018                         # if we found a match in either man* or cat*, stop looking
11019                         if test -n "$MANPAGE_FORMAT" ; then
11020                                 cf_found=no
11021                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11022                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11023                                 case "$cf_name" in
11024                                 ($cf_dir/cat*)
11025                                         cf_found=yes
11026                                         ;;
11027                                 esac
11028                                 test $cf_found=yes && break
11029                         fi
11030                 done
11031                 # only check the first directory in $MANPATH where we find manpages
11032                 if test -n "$MANPAGE_FORMAT" ; then
11033                         break
11034                 fi
11035         done
11036         # if we did not find the example, just assume it is normal
11037         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11038         IFS="$ac_save_ifs"
11039         ;;
11040 (*)
11041         for cf_option in $MANPAGE_FORMAT; do
11042         case $cf_option in
11043         (gzip|compress|BSDI|normal|formatted|catonly)
11044                 ;;
11045         (*)
11046                 cf_unknown="$cf_unknown $cf_option"
11047                 ;;
11048         esac
11049         done
11050         ;;
11051 esac
11052
11053 echo "$as_me:11053: result: $MANPAGE_FORMAT" >&5
11054 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11055 if test -n "$cf_unknown" ; then
11056         { echo "$as_me:11056: WARNING: Unexpected manpage-format $cf_unknown" >&5
11057 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11058 fi
11059
11060 echo "$as_me:11060: checking for manpage renaming" >&5
11061 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11062
11063 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11064 if test "${with_manpage_renames+set}" = set; then
11065   withval="$with_manpage_renames"
11066   MANPAGE_RENAMES=$withval
11067 else
11068   MANPAGE_RENAMES=yes
11069 fi;
11070
11071 case ".$MANPAGE_RENAMES" in
11072 (.no)
11073         ;;
11074 (.|.yes)
11075         # Debian 'man' program?
11076         if test -f /etc/debian_version ; then
11077                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11078         else
11079                 MANPAGE_RENAMES=no
11080         fi
11081         ;;
11082 esac
11083
11084 if test "$MANPAGE_RENAMES" != no ; then
11085         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11086                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11087         elif test ! -f $MANPAGE_RENAMES ; then
11088                 { { echo "$as_me:11088: error: not a filename: $MANPAGE_RENAMES" >&5
11089 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11090    { (exit 1); exit 1; }; }
11091         fi
11092
11093         test ! -d man && mkdir man
11094
11095         # Construct a sed-script to perform renaming within man-pages
11096         if test -n "$MANPAGE_RENAMES" ; then
11097                 test ! -d man && mkdir man
11098                 sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11099         fi
11100 fi
11101
11102 echo "$as_me:11102: result: $MANPAGE_RENAMES" >&5
11103 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11104
11105 echo "$as_me:11105: checking if manpage aliases will be installed" >&5
11106 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11107
11108 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11109 if test "${with_manpage_aliases+set}" = set; then
11110   withval="$with_manpage_aliases"
11111   MANPAGE_ALIASES=$withval
11112 else
11113   MANPAGE_ALIASES=yes
11114 fi;
11115
11116 echo "$as_me:11116: result: $MANPAGE_ALIASES" >&5
11117 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11118
11119 case "x$LN_S" in
11120 (xln*)
11121         cf_use_symlinks=yes
11122         ;;
11123 (*)
11124         cf_use_symlinks=no
11125         ;;
11126 esac
11127
11128 MANPAGE_SYMLINKS=no
11129 if test "$MANPAGE_ALIASES" = yes ; then
11130 echo "$as_me:11130: checking if manpage symlinks should be used" >&5
11131 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11132
11133 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11134 if test "${with_manpage_symlinks+set}" = set; then
11135   withval="$with_manpage_symlinks"
11136   MANPAGE_SYMLINKS=$withval
11137 else
11138   MANPAGE_SYMLINKS=$cf_use_symlinks
11139 fi;
11140
11141 if test "$$cf_use_symlinks" = no; then
11142 if test "$MANPAGE_SYMLINKS" = yes ; then
11143         { echo "$as_me:11143: WARNING: cannot make symlinks" >&5
11144 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11145         MANPAGE_SYMLINKS=no
11146 fi
11147 fi
11148
11149 echo "$as_me:11149: result: $MANPAGE_SYMLINKS" >&5
11150 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11151 fi
11152
11153 echo "$as_me:11153: checking for manpage tbl" >&5
11154 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11155
11156 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11157 if test "${with_manpage_tbl+set}" = set; then
11158   withval="$with_manpage_tbl"
11159   MANPAGE_TBL=$withval
11160 else
11161   MANPAGE_TBL=no
11162 fi;
11163
11164 echo "$as_me:11164: result: $MANPAGE_TBL" >&5
11165 echo "${ECHO_T}$MANPAGE_TBL" >&6
11166
11167 if test "$prefix" = "NONE" ; then
11168         cf_prefix="$ac_default_prefix"
11169 else
11170         cf_prefix="$prefix"
11171 fi
11172
11173 case "$MANPAGE_FORMAT" in
11174 (*catonly*)
11175         cf_format=yes
11176         cf_inboth=no
11177         ;;
11178 (*formatted*)
11179         cf_format=yes
11180         cf_inboth=yes
11181         ;;
11182 (*)
11183         cf_format=no
11184         cf_inboth=no
11185         ;;
11186 esac
11187
11188 test ! -d man && mkdir man
11189
11190 cf_so_strip=
11191 cf_compress=
11192 case "$MANPAGE_FORMAT" in
11193 (*compress*)
11194         cf_so_strip="Z"
11195         cf_compress=compress
11196         ;;
11197 (*gzip*)
11198         cf_so_strip="gz"
11199         cf_compress=gzip
11200         ;;
11201 esac
11202
11203 cf_edit_man=./edit_man.sh
11204 cf_man_alias=`pwd`/man_alias.sed
11205
11206 cat >$cf_edit_man <<CF_EOF
11207 #! /bin/sh
11208 # this script is generated by the configure-script CF_MAN_PAGES macro.
11209
11210 prefix="$cf_prefix"
11211 datarootdir="$datarootdir"
11212 datadir="$datadir"
11213
11214 NCURSES_MAJOR="$NCURSES_MAJOR"
11215 NCURSES_MINOR="$NCURSES_MINOR"
11216 NCURSES_PATCH="$NCURSES_PATCH"
11217
11218 NCURSES_OSPEED="$NCURSES_OSPEED"
11219 TERMINFO="$TERMINFO"
11220
11221 INSTALL="$INSTALL"
11222 INSTALL_DATA="$INSTALL_DATA"
11223
11224 transform="$program_transform_name"
11225
11226 TMP=\${TMPDIR:=/tmp}/man\$\$
11227 trap "rm -f \$TMP" 0 1 2 5 15
11228
11229 form=\$1
11230 shift || exit 1
11231
11232 verb=\$1
11233 shift || exit 1
11234
11235 mandir=\$1
11236 shift || exit 1
11237
11238 srcdir=\$1
11239 top_srcdir=\$srcdir/..
11240 shift || exit 1
11241
11242 if test "\$form" = normal ; then
11243         if test "$cf_format" = yes ; then
11244         if test "$cf_inboth" = no ; then
11245                 sh \$0 format \$verb \$mandir \$srcdir \$*
11246                 exit $?
11247         fi
11248         fi
11249         cf_subdir=\$mandir/man
11250         cf_tables=$MANPAGE_TBL
11251 else
11252         cf_subdir=\$mandir/cat
11253         cf_tables=yes
11254 fi
11255
11256 # process the list of source-files
11257 for i in \$* ; do
11258 case \$i in
11259 (*.orig|*.rej) ;;
11260 (*.[0-9]*)
11261         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11262         if test \$verb = installing ; then
11263         if test ! -d \$cf_subdir\${section} ; then
11264                 mkdir -p \$cf_subdir\$section
11265         fi
11266         fi
11267
11268         # replace variables in man page
11269         if test ! -f $cf_man_alias ; then
11270 cat >>$cf_man_alias <<-CF_EOF2
11271                 s,@DATADIR@,\$datadir,g
11272                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11273                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11274                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11275                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11276                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11277                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11278 CF_EOF
11279
11280         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
11281         do
11282                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11283                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11284 cat >>$cf_edit_man <<-CF_EOF
11285                 s,@$cf_NAME@,$cf_name,g
11286 CF_EOF
11287         done
11288
11289 cat >>$cf_edit_man <<CF_EOF
11290 CF_EOF2
11291                 echo "...made $cf_man_alias"
11292         fi
11293
11294         aliases=
11295         cf_source=\`basename \$i\`
11296         inalias=\$cf_source
11297         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11298         if test ! -f \$inalias ; then
11299                 echo .. skipped \$cf_source
11300                 continue
11301         fi
11302 CF_EOF
11303
11304 if test "$MANPAGE_ALIASES" != no ; then
11305 cat >>$cf_edit_man <<CF_EOF
11306         nCurses=ignore.3x
11307         test $with_curses_h = yes && nCurses=ncurses.3x
11308         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11309 CF_EOF
11310 fi
11311
11312 if test "$MANPAGE_RENAMES" = no ; then
11313 cat >>$cf_edit_man <<CF_EOF
11314         # perform program transformations for section 1 man pages
11315         if test \$section = 1 ; then
11316                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11317         else
11318                 cf_target=\$cf_subdir\${section}/\$cf_source
11319         fi
11320 CF_EOF
11321 else
11322 cat >>$cf_edit_man <<CF_EOF
11323         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11324         if test -z "\$cf_target" ; then
11325                 echo '? missing rename for '\$cf_source
11326                 cf_target="\$cf_source"
11327         fi
11328         cf_target="\$cf_subdir\${section}/\${cf_target}"
11329
11330 CF_EOF
11331 fi
11332
11333 cat >>$cf_edit_man <<CF_EOF
11334         sed     -f $cf_man_alias \\
11335 CF_EOF
11336
11337 if test -f $MANPAGE_RENAMES ; then
11338 cat >>$cf_edit_man <<CF_EOF
11339                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11340 CF_EOF
11341 else
11342 cat >>$cf_edit_man <<CF_EOF
11343                 < \$i >\$TMP
11344 CF_EOF
11345 fi
11346
11347 cat >>$cf_edit_man <<CF_EOF
11348 if test \$cf_tables = yes ; then
11349         tbl \$TMP >\$TMP.out
11350         mv \$TMP.out \$TMP
11351 fi
11352 CF_EOF
11353
11354 if test $with_overwrite != yes ; then
11355 cat >>$cf_edit_man <<CF_EOF
11356         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11357         mv \$TMP.out \$TMP
11358 CF_EOF
11359 fi
11360
11361 if test $with_curses_h != yes ; then
11362 cat >>$cf_edit_man <<CF_EOF
11363         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11364         mv \$TMP.out \$TMP
11365 CF_EOF
11366 fi
11367
11368 cat >>$cf_edit_man <<CF_EOF
11369         if test \$form = format ; then
11370                 nroff -man \$TMP >\$TMP.out
11371                 mv \$TMP.out \$TMP
11372         fi
11373 CF_EOF
11374
11375 if test -n "$cf_compress" ; then
11376 cat >>$cf_edit_man <<CF_EOF
11377         if test \$verb = installing ; then
11378         if ( $cf_compress -f \$TMP )
11379         then
11380                 mv \$TMP.$cf_so_strip \$TMP
11381         fi
11382         fi
11383         cf_target="\$cf_target.$cf_so_strip"
11384 CF_EOF
11385 fi
11386
11387 case "$MANPAGE_FORMAT" in
11388 (*BSDI*)
11389 cat >>$cf_edit_man <<CF_EOF
11390         if test \$form = format ; then
11391                 # BSDI installs only .0 suffixes in the cat directories
11392                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11393         fi
11394 CF_EOF
11395   ;;
11396 esac
11397
11398 cat >>$cf_edit_man <<CF_EOF
11399         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11400         if test \$verb = installing ; then
11401                 echo \$verb \$cf_target
11402                 \$INSTALL_DATA \$TMP \$cf_target
11403                 test -d \$cf_subdir\${section} &&
11404                 test -n "\$aliases" && (
11405                         cd \$cf_subdir\${section} && (
11406                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11407                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11408                                 cf_target=\`basename \$cf_target\`
11409                                 for cf_alias in \$aliases
11410                                 do
11411                                         if test \$section = 1 ; then
11412                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11413                                         fi
11414
11415                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11416                                                 if test -f \$cf_alias\${suffix} ; then
11417                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11418                                                         then
11419                                                                 continue
11420                                                         fi
11421                                                 fi
11422                                                 echo .. \$verb alias \$cf_alias\${suffix}
11423 CF_EOF
11424 case "x$LN_S" in
11425 (*-f)
11426 cat >>$cf_edit_man <<CF_EOF
11427                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11428 CF_EOF
11429         ;;
11430 (*)
11431 cat >>$cf_edit_man <<CF_EOF
11432                                                 rm -f \$cf_alias\${suffix}
11433                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11434 CF_EOF
11435         ;;
11436 esac
11437 cat >>$cf_edit_man <<CF_EOF
11438                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11439                                                 echo ".so \$cf_source" >\$TMP
11440 CF_EOF
11441 if test -n "$cf_compress" ; then
11442 cat >>$cf_edit_man <<CF_EOF
11443                                                 if test -n "$cf_so_strip" ; then
11444                                                         $cf_compress -f \$TMP
11445                                                         mv \$TMP.$cf_so_strip \$TMP
11446                                                 fi
11447 CF_EOF
11448 fi
11449 cat >>$cf_edit_man <<CF_EOF
11450                                                 echo .. \$verb alias \$cf_alias\${suffix}
11451                                                 rm -f \$cf_alias\${suffix}
11452                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11453                                         fi
11454                                 done
11455                         )
11456                 )
11457         elif test \$verb = removing ; then
11458                 test -f \$cf_target && (
11459                         echo \$verb \$cf_target
11460                         rm -f \$cf_target
11461                 )
11462                 test -d \$cf_subdir\${section} &&
11463                 test -n "\$aliases" && (
11464                         cd \$cf_subdir\${section} && (
11465                                 for cf_alias in \$aliases
11466                                 do
11467                                         if test \$section = 1 ; then
11468                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11469                                         fi
11470
11471                                         echo .. \$verb alias \$cf_alias\${suffix}
11472                                         rm -f \$cf_alias\${suffix}
11473                                 done
11474                         )
11475                 )
11476         else
11477 #               echo ".hy 0"
11478                 cat \$TMP
11479         fi
11480         ;;
11481 esac
11482 done
11483
11484 if test $cf_inboth = yes ; then
11485 if test \$form != format ; then
11486         sh \$0 format \$verb \$mandir \$srcdir \$*
11487 fi
11488 fi
11489
11490 exit 0
11491 CF_EOF
11492 chmod 755 $cf_edit_man
11493
11494 ###############################################################################
11495
11496 ### Note that some functions (such as const) are normally disabled anyway.
11497 echo "$as_me:11497: checking if you want to build with function extensions" >&5
11498 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11499
11500 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11501 if test "${enable_ext_funcs+set}" = set; then
11502   enableval="$enable_ext_funcs"
11503   with_ext_funcs=$enableval
11504 else
11505   with_ext_funcs=yes
11506 fi;
11507 echo "$as_me:11507: result: $with_ext_funcs" >&5
11508 echo "${ECHO_T}$with_ext_funcs" >&6
11509 if test "x$with_ext_funcs" = xyes ; then
11510         NCURSES_EXT_FUNCS=1
11511
11512 cat >>confdefs.h <<\EOF
11513 #define HAVE_ASSUME_DEFAULT_COLORS 1
11514 EOF
11515
11516 cat >>confdefs.h <<\EOF
11517 #define HAVE_CURSES_VERSION 1
11518 EOF
11519
11520 cat >>confdefs.h <<\EOF
11521 #define HAVE_HAS_KEY 1
11522 EOF
11523
11524 cat >>confdefs.h <<\EOF
11525 #define HAVE_RESIZETERM 1
11526 EOF
11527
11528 cat >>confdefs.h <<\EOF
11529 #define HAVE_RESIZE_TERM 1
11530 EOF
11531
11532 cat >>confdefs.h <<\EOF
11533 #define HAVE_TERM_ENTRY_H 1
11534 EOF
11535
11536 cat >>confdefs.h <<\EOF
11537 #define HAVE_USE_DEFAULT_COLORS 1
11538 EOF
11539
11540 cat >>confdefs.h <<\EOF
11541 #define HAVE_USE_SCREEN 1
11542 EOF
11543
11544 cat >>confdefs.h <<\EOF
11545 #define HAVE_USE_WINDOW 1
11546 EOF
11547
11548 cat >>confdefs.h <<\EOF
11549 #define HAVE_WRESIZE 1
11550 EOF
11551
11552 cat >>confdefs.h <<\EOF
11553 #define NCURSES_EXT_FUNCS 1
11554 EOF
11555
11556         GENERATED_EXT_FUNCS=generated
11557 else
11558         NCURSES_EXT_FUNCS=0
11559         GENERATED_EXT_FUNCS=
11560 fi
11561
11562 echo "$as_me:11562: checking if you want to build with SCREEN extensions" >&5
11563 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
11564
11565 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11566 if test "${enable_sp_funcs+set}" = set; then
11567   enableval="$enable_sp_funcs"
11568   with_sp_funcs=$enableval
11569 else
11570   with_sp_funcs=$cf_dft_ext_spfuncs
11571 fi;
11572 echo "$as_me:11572: result: $with_sp_funcs" >&5
11573 echo "${ECHO_T}$with_sp_funcs" >&6
11574 if test "x$with_sp_funcs" = xyes ; then
11575         NCURSES_SP_FUNCS=1
11576
11577 cat >>confdefs.h <<\EOF
11578 #define NCURSES_SP_FUNCS 1
11579 EOF
11580
11581         GENERATED_SP_FUNCS=generated
11582 else
11583         NCURSES_SP_FUNCS=0
11584         GENERATED_SP_FUNCS=
11585 fi
11586
11587 echo "$as_me:11587: checking if you want to build with terminal-driver" >&5
11588 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
11589
11590 # Check whether --enable-term-driver or --disable-term-driver was given.
11591 if test "${enable_term_driver+set}" = set; then
11592   enableval="$enable_term_driver"
11593   with_term_driver=$enableval
11594 else
11595   with_term_driver=no
11596 fi;
11597 echo "$as_me:11597: result: $with_term_driver" >&5
11598 echo "${ECHO_T}$with_term_driver" >&6
11599 if test "x$with_term_driver" = xyes ; then
11600
11601 cat >>confdefs.h <<\EOF
11602 #define USE_TERM_DRIVER 1
11603 EOF
11604
11605         if test "x$with_sp_funcs" != xyes ; then
11606                 { { echo "$as_me:11606: error: The term-driver option relies upon sp-funcs" >&5
11607 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11608    { (exit 1); exit 1; }; }
11609         fi
11610 fi
11611
11612 ###   use option --enable-const to turn on use of const beyond that in XSI.
11613 echo "$as_me:11613: checking for extended use of const keyword" >&5
11614 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11615
11616 # Check whether --enable-const or --disable-const was given.
11617 if test "${enable_const+set}" = set; then
11618   enableval="$enable_const"
11619   with_ext_const=$enableval
11620 else
11621   with_ext_const=$cf_dft_ext_const
11622 fi;
11623 echo "$as_me:11623: result: $with_ext_const" >&5
11624 echo "${ECHO_T}$with_ext_const" >&6
11625 NCURSES_CONST='/*nothing*/'
11626 if test "x$with_ext_const" = xyes ; then
11627         NCURSES_CONST=const
11628 fi
11629
11630 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11631 echo "$as_me:11631: checking if you want to use extended colors" >&5
11632 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11633
11634 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11635 if test "${enable_ext_colors+set}" = set; then
11636   enableval="$enable_ext_colors"
11637   with_ext_colors=$enableval
11638 else
11639   with_ext_colors=$cf_dft_ext_colors
11640 fi;
11641 echo "$as_me:11641: result: $with_ext_colors" >&5
11642 echo "${ECHO_T}$with_ext_colors" >&6
11643 NCURSES_EXT_COLORS=0
11644 if test "x$with_ext_colors" = xyes ; then
11645         if test "x$with_widec" != xyes ; then
11646                 { echo "$as_me:11646: WARNING: This option applies only to wide-character library" >&5
11647 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
11648         else
11649                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11650
11651 if test "${with_abi_version+set}" != set; then
11652         case $cf_cv_rel_version in
11653         (5.*)
11654                 cf_cv_rel_version=6.0
11655                 cf_cv_abi_version=6
11656                 { echo "$as_me:11656: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11657 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11658                 ;;
11659         esac
11660 fi
11661
11662                 NCURSES_EXT_COLORS=1
11663
11664 cat >>confdefs.h <<\EOF
11665 #define NCURSES_EXT_COLORS 1
11666 EOF
11667
11668         fi
11669 fi
11670
11671 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11672 echo "$as_me:11672: checking if you want to use extended mouse encoding" >&5
11673 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11674
11675 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11676 if test "${enable_ext_mouse+set}" = set; then
11677   enableval="$enable_ext_mouse"
11678   with_ext_mouse=$enableval
11679 else
11680   with_ext_mouse=$cf_dft_ext_mouse
11681 fi;
11682 echo "$as_me:11682: result: $with_ext_mouse" >&5
11683 echo "${ECHO_T}$with_ext_mouse" >&6
11684 NCURSES_MOUSE_VERSION=1
11685 if test "x$with_ext_mouse" = xyes ; then
11686         NCURSES_MOUSE_VERSION=2
11687
11688 if test "${with_abi_version+set}" != set; then
11689         case $cf_cv_rel_version in
11690         (5.*)
11691                 cf_cv_rel_version=6.0
11692                 cf_cv_abi_version=6
11693                 { echo "$as_me:11693: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11694 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11695                 ;;
11696         esac
11697 fi
11698
11699 fi
11700
11701 ###   use option --enable-ext-putwin to turn on extended screendumps
11702 echo "$as_me:11702: checking if you want to use extended putwin/screendump" >&5
11703 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
11704
11705 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
11706 if test "${enable_ext_putwin+set}" = set; then
11707   enableval="$enable_ext_putwin"
11708   with_ext_putwin=$enableval
11709 else
11710   with_ext_putwin=$cf_dft_ext_putwin
11711 fi;
11712 echo "$as_me:11712: result: $with_ext_putwin" >&5
11713 echo "${ECHO_T}$with_ext_putwin" >&6
11714 if test "x$with_ext_putwin" = xyes ; then
11715
11716 cat >>confdefs.h <<\EOF
11717 #define NCURSES_EXT_PUTWIN 1
11718 EOF
11719
11720 fi
11721
11722 echo "$as_me:11722: checking if you want \$NCURSES_NO_PADDING code" >&5
11723 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11724
11725 # Check whether --enable-no-padding or --disable-no-padding was given.
11726 if test "${enable_no_padding+set}" = set; then
11727   enableval="$enable_no_padding"
11728   with_no_padding=$enableval
11729 else
11730   with_no_padding=$with_ext_funcs
11731 fi;
11732 echo "$as_me:11732: result: $with_no_padding" >&5
11733 echo "${ECHO_T}$with_no_padding" >&6
11734 test "x$with_no_padding" = xyes &&
11735 cat >>confdefs.h <<\EOF
11736 #define NCURSES_NO_PADDING 1
11737 EOF
11738
11739 echo "$as_me:11739: checking for ANSI C header files" >&5
11740 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11741 if test "${ac_cv_header_stdc+set}" = set; then
11742   echo $ECHO_N "(cached) $ECHO_C" >&6
11743 else
11744   cat >conftest.$ac_ext <<_ACEOF
11745 #line 11745 "configure"
11746 #include "confdefs.h"
11747 #include <stdlib.h>
11748 #include <stdarg.h>
11749 #include <string.h>
11750 #include <float.h>
11751
11752 _ACEOF
11753 if { (eval echo "$as_me:11753: \"$ac_cpp conftest.$ac_ext\"") >&5
11754   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11755   ac_status=$?
11756   egrep -v '^ *\+' conftest.er1 >conftest.err
11757   rm -f conftest.er1
11758   cat conftest.err >&5
11759   echo "$as_me:11759: \$? = $ac_status" >&5
11760   (exit $ac_status); } >/dev/null; then
11761   if test -s conftest.err; then
11762     ac_cpp_err=$ac_c_preproc_warn_flag
11763   else
11764     ac_cpp_err=
11765   fi
11766 else
11767   ac_cpp_err=yes
11768 fi
11769 if test -z "$ac_cpp_err"; then
11770   ac_cv_header_stdc=yes
11771 else
11772   echo "$as_me: failed program was:" >&5
11773   cat conftest.$ac_ext >&5
11774   ac_cv_header_stdc=no
11775 fi
11776 rm -f conftest.err conftest.$ac_ext
11777
11778 if test $ac_cv_header_stdc = yes; then
11779   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11780   cat >conftest.$ac_ext <<_ACEOF
11781 #line 11781 "configure"
11782 #include "confdefs.h"
11783 #include <string.h>
11784
11785 _ACEOF
11786 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11787   egrep "memchr" >/dev/null 2>&1; then
11788   :
11789 else
11790   ac_cv_header_stdc=no
11791 fi
11792 rm -rf conftest*
11793
11794 fi
11795
11796 if test $ac_cv_header_stdc = yes; then
11797   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11798   cat >conftest.$ac_ext <<_ACEOF
11799 #line 11799 "configure"
11800 #include "confdefs.h"
11801 #include <stdlib.h>
11802
11803 _ACEOF
11804 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11805   egrep "free" >/dev/null 2>&1; then
11806   :
11807 else
11808   ac_cv_header_stdc=no
11809 fi
11810 rm -rf conftest*
11811
11812 fi
11813
11814 if test $ac_cv_header_stdc = yes; then
11815   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11816   if test "$cross_compiling" = yes; then
11817   :
11818 else
11819   cat >conftest.$ac_ext <<_ACEOF
11820 #line 11820 "configure"
11821 #include "confdefs.h"
11822 #include <ctype.h>
11823 #if ((' ' & 0x0FF) == 0x020)
11824 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11825 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11826 #else
11827 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11828                      || ('j' <= (c) && (c) <= 'r') \
11829                      || ('s' <= (c) && (c) <= 'z'))
11830 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11831 #endif
11832
11833 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11834 int
11835 main ()
11836 {
11837   int i;
11838   for (i = 0; i < 256; i++)
11839     if (XOR (islower (i), ISLOWER (i))
11840         || toupper (i) != TOUPPER (i))
11841       $ac_main_return(2);
11842   $ac_main_return (0);
11843 }
11844 _ACEOF
11845 rm -f conftest$ac_exeext
11846 if { (eval echo "$as_me:11846: \"$ac_link\"") >&5
11847   (eval $ac_link) 2>&5
11848   ac_status=$?
11849   echo "$as_me:11849: \$? = $ac_status" >&5
11850   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11851   { (eval echo "$as_me:11851: \"$ac_try\"") >&5
11852   (eval $ac_try) 2>&5
11853   ac_status=$?
11854   echo "$as_me:11854: \$? = $ac_status" >&5
11855   (exit $ac_status); }; }; then
11856   :
11857 else
11858   echo "$as_me: program exited with status $ac_status" >&5
11859 echo "$as_me: failed program was:" >&5
11860 cat conftest.$ac_ext >&5
11861 ac_cv_header_stdc=no
11862 fi
11863 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11864 fi
11865 fi
11866 fi
11867 echo "$as_me:11867: result: $ac_cv_header_stdc" >&5
11868 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11869 if test $ac_cv_header_stdc = yes; then
11870
11871 cat >>confdefs.h <<\EOF
11872 #define STDC_HEADERS 1
11873 EOF
11874
11875 fi
11876
11877 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11878
11879 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11880                   inttypes.h stdint.h unistd.h
11881 do
11882 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11883 echo "$as_me:11883: checking for $ac_header" >&5
11884 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11885 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11886   echo $ECHO_N "(cached) $ECHO_C" >&6
11887 else
11888   cat >conftest.$ac_ext <<_ACEOF
11889 #line 11889 "configure"
11890 #include "confdefs.h"
11891 $ac_includes_default
11892 #include <$ac_header>
11893 _ACEOF
11894 rm -f conftest.$ac_objext
11895 if { (eval echo "$as_me:11895: \"$ac_compile\"") >&5
11896   (eval $ac_compile) 2>&5
11897   ac_status=$?
11898   echo "$as_me:11898: \$? = $ac_status" >&5
11899   (exit $ac_status); } &&
11900          { ac_try='test -s conftest.$ac_objext'
11901   { (eval echo "$as_me:11901: \"$ac_try\"") >&5
11902   (eval $ac_try) 2>&5
11903   ac_status=$?
11904   echo "$as_me:11904: \$? = $ac_status" >&5
11905   (exit $ac_status); }; }; then
11906   eval "$as_ac_Header=yes"
11907 else
11908   echo "$as_me: failed program was:" >&5
11909 cat conftest.$ac_ext >&5
11910 eval "$as_ac_Header=no"
11911 fi
11912 rm -f conftest.$ac_objext conftest.$ac_ext
11913 fi
11914 echo "$as_me:11914: result: `eval echo '${'$as_ac_Header'}'`" >&5
11915 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11916 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11917   cat >>confdefs.h <<EOF
11918 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11919 EOF
11920
11921 fi
11922 done
11923
11924 echo "$as_me:11924: checking for signed char" >&5
11925 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11926 if test "${ac_cv_type_signed_char+set}" = set; then
11927   echo $ECHO_N "(cached) $ECHO_C" >&6
11928 else
11929   cat >conftest.$ac_ext <<_ACEOF
11930 #line 11930 "configure"
11931 #include "confdefs.h"
11932 $ac_includes_default
11933 int
11934 main ()
11935 {
11936 if ((signed char *) 0)
11937   return 0;
11938 if (sizeof (signed char))
11939   return 0;
11940   ;
11941   return 0;
11942 }
11943 _ACEOF
11944 rm -f conftest.$ac_objext
11945 if { (eval echo "$as_me:11945: \"$ac_compile\"") >&5
11946   (eval $ac_compile) 2>&5
11947   ac_status=$?
11948   echo "$as_me:11948: \$? = $ac_status" >&5
11949   (exit $ac_status); } &&
11950          { ac_try='test -s conftest.$ac_objext'
11951   { (eval echo "$as_me:11951: \"$ac_try\"") >&5
11952   (eval $ac_try) 2>&5
11953   ac_status=$?
11954   echo "$as_me:11954: \$? = $ac_status" >&5
11955   (exit $ac_status); }; }; then
11956   ac_cv_type_signed_char=yes
11957 else
11958   echo "$as_me: failed program was:" >&5
11959 cat conftest.$ac_ext >&5
11960 ac_cv_type_signed_char=no
11961 fi
11962 rm -f conftest.$ac_objext conftest.$ac_ext
11963 fi
11964 echo "$as_me:11964: result: $ac_cv_type_signed_char" >&5
11965 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11966
11967 echo "$as_me:11967: checking size of signed char" >&5
11968 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11969 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11970   echo $ECHO_N "(cached) $ECHO_C" >&6
11971 else
11972   if test "$ac_cv_type_signed_char" = yes; then
11973   if test "$cross_compiling" = yes; then
11974   # Depending upon the size, compute the lo and hi bounds.
11975 cat >conftest.$ac_ext <<_ACEOF
11976 #line 11976 "configure"
11977 #include "confdefs.h"
11978 $ac_includes_default
11979 int
11980 main ()
11981 {
11982 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11983   ;
11984   return 0;
11985 }
11986 _ACEOF
11987 rm -f conftest.$ac_objext
11988 if { (eval echo "$as_me:11988: \"$ac_compile\"") >&5
11989   (eval $ac_compile) 2>&5
11990   ac_status=$?
11991   echo "$as_me:11991: \$? = $ac_status" >&5
11992   (exit $ac_status); } &&
11993          { ac_try='test -s conftest.$ac_objext'
11994   { (eval echo "$as_me:11994: \"$ac_try\"") >&5
11995   (eval $ac_try) 2>&5
11996   ac_status=$?
11997   echo "$as_me:11997: \$? = $ac_status" >&5
11998   (exit $ac_status); }; }; then
11999   ac_lo=0 ac_mid=0
12000   while :; do
12001     cat >conftest.$ac_ext <<_ACEOF
12002 #line 12002 "configure"
12003 #include "confdefs.h"
12004 $ac_includes_default
12005 int
12006 main ()
12007 {
12008 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12009   ;
12010   return 0;
12011 }
12012 _ACEOF
12013 rm -f conftest.$ac_objext
12014 if { (eval echo "$as_me:12014: \"$ac_compile\"") >&5
12015   (eval $ac_compile) 2>&5
12016   ac_status=$?
12017   echo "$as_me:12017: \$? = $ac_status" >&5
12018   (exit $ac_status); } &&
12019          { ac_try='test -s conftest.$ac_objext'
12020   { (eval echo "$as_me:12020: \"$ac_try\"") >&5
12021   (eval $ac_try) 2>&5
12022   ac_status=$?
12023   echo "$as_me:12023: \$? = $ac_status" >&5
12024   (exit $ac_status); }; }; then
12025   ac_hi=$ac_mid; break
12026 else
12027   echo "$as_me: failed program was:" >&5
12028 cat conftest.$ac_ext >&5
12029 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12030 fi
12031 rm -f conftest.$ac_objext conftest.$ac_ext
12032   done
12033 else
12034   echo "$as_me: failed program was:" >&5
12035 cat conftest.$ac_ext >&5
12036 ac_hi=-1 ac_mid=-1
12037   while :; do
12038     cat >conftest.$ac_ext <<_ACEOF
12039 #line 12039 "configure"
12040 #include "confdefs.h"
12041 $ac_includes_default
12042 int
12043 main ()
12044 {
12045 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12046   ;
12047   return 0;
12048 }
12049 _ACEOF
12050 rm -f conftest.$ac_objext
12051 if { (eval echo "$as_me:12051: \"$ac_compile\"") >&5
12052   (eval $ac_compile) 2>&5
12053   ac_status=$?
12054   echo "$as_me:12054: \$? = $ac_status" >&5
12055   (exit $ac_status); } &&
12056          { ac_try='test -s conftest.$ac_objext'
12057   { (eval echo "$as_me:12057: \"$ac_try\"") >&5
12058   (eval $ac_try) 2>&5
12059   ac_status=$?
12060   echo "$as_me:12060: \$? = $ac_status" >&5
12061   (exit $ac_status); }; }; then
12062   ac_lo=$ac_mid; break
12063 else
12064   echo "$as_me: failed program was:" >&5
12065 cat conftest.$ac_ext >&5
12066 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12067 fi
12068 rm -f conftest.$ac_objext conftest.$ac_ext
12069   done
12070 fi
12071 rm -f conftest.$ac_objext conftest.$ac_ext
12072 # Binary search between lo and hi bounds.
12073 while test "x$ac_lo" != "x$ac_hi"; do
12074   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12075   cat >conftest.$ac_ext <<_ACEOF
12076 #line 12076 "configure"
12077 #include "confdefs.h"
12078 $ac_includes_default
12079 int
12080 main ()
12081 {
12082 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12083   ;
12084   return 0;
12085 }
12086 _ACEOF
12087 rm -f conftest.$ac_objext
12088 if { (eval echo "$as_me:12088: \"$ac_compile\"") >&5
12089   (eval $ac_compile) 2>&5
12090   ac_status=$?
12091   echo "$as_me:12091: \$? = $ac_status" >&5
12092   (exit $ac_status); } &&
12093          { ac_try='test -s conftest.$ac_objext'
12094   { (eval echo "$as_me:12094: \"$ac_try\"") >&5
12095   (eval $ac_try) 2>&5
12096   ac_status=$?
12097   echo "$as_me:12097: \$? = $ac_status" >&5
12098   (exit $ac_status); }; }; then
12099   ac_hi=$ac_mid
12100 else
12101   echo "$as_me: failed program was:" >&5
12102 cat conftest.$ac_ext >&5
12103 ac_lo=`expr $ac_mid + 1`
12104 fi
12105 rm -f conftest.$ac_objext conftest.$ac_ext
12106 done
12107 ac_cv_sizeof_signed_char=$ac_lo
12108 else
12109   if test "$cross_compiling" = yes; then
12110   { { echo "$as_me:12110: error: cannot run test program while cross compiling" >&5
12111 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12112    { (exit 1); exit 1; }; }
12113 else
12114   cat >conftest.$ac_ext <<_ACEOF
12115 #line 12115 "configure"
12116 #include "confdefs.h"
12117 $ac_includes_default
12118 int
12119 main ()
12120 {
12121 FILE *f = fopen ("conftest.val", "w");
12122 if (!f)
12123   $ac_main_return (1);
12124 fprintf (f, "%d", (sizeof (signed char)));
12125 fclose (f);
12126   ;
12127   return 0;
12128 }
12129 _ACEOF
12130 rm -f conftest$ac_exeext
12131 if { (eval echo "$as_me:12131: \"$ac_link\"") >&5
12132   (eval $ac_link) 2>&5
12133   ac_status=$?
12134   echo "$as_me:12134: \$? = $ac_status" >&5
12135   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12136   { (eval echo "$as_me:12136: \"$ac_try\"") >&5
12137   (eval $ac_try) 2>&5
12138   ac_status=$?
12139   echo "$as_me:12139: \$? = $ac_status" >&5
12140   (exit $ac_status); }; }; then
12141   ac_cv_sizeof_signed_char=`cat conftest.val`
12142 else
12143   echo "$as_me: program exited with status $ac_status" >&5
12144 echo "$as_me: failed program was:" >&5
12145 cat conftest.$ac_ext >&5
12146 fi
12147 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12148 fi
12149 fi
12150 rm -f conftest.val
12151 else
12152   ac_cv_sizeof_signed_char=0
12153 fi
12154 fi
12155 echo "$as_me:12155: result: $ac_cv_sizeof_signed_char" >&5
12156 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12157 cat >>confdefs.h <<EOF
12158 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12159 EOF
12160
12161 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12162         NCURSES_SBOOL="signed char"
12163 else
12164         NCURSES_SBOOL="char"
12165 fi
12166 echo "$as_me:12166: checking if you want to use signed Boolean array in term.h" >&5
12167 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12168
12169 # Check whether --enable-signed-char or --disable-signed-char was given.
12170 if test "${enable_signed_char+set}" = set; then
12171   enableval="$enable_signed_char"
12172   with_signed_char=$enableval
12173 else
12174   with_signed_char=no
12175 fi;
12176 echo "$as_me:12176: result: $with_signed_char" >&5
12177 echo "${ECHO_T}$with_signed_char" >&6
12178 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12179
12180 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12181 echo "$as_me:12181: checking if you want SIGWINCH handler" >&5
12182 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12183
12184 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12185 if test "${enable_sigwinch+set}" = set; then
12186   enableval="$enable_sigwinch"
12187   with_sigwinch=$enableval
12188 else
12189   with_sigwinch=$with_ext_funcs
12190 fi;
12191 echo "$as_me:12191: result: $with_sigwinch" >&5
12192 echo "${ECHO_T}$with_sigwinch" >&6
12193 test "x$with_sigwinch" = xyes &&
12194 cat >>confdefs.h <<\EOF
12195 #define USE_SIGWINCH 1
12196 EOF
12197
12198 ###   use option --enable-tcap-names to allow user to define new capabilities
12199 echo "$as_me:12199: checking if you want user-definable terminal capabilities like termcap" >&5
12200 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12201
12202 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12203 if test "${enable_tcap_names+set}" = set; then
12204   enableval="$enable_tcap_names"
12205   with_tcap_names=$enableval
12206 else
12207   with_tcap_names=$with_ext_funcs
12208 fi;
12209 echo "$as_me:12209: result: $with_tcap_names" >&5
12210 echo "${ECHO_T}$with_tcap_names" >&6
12211 NCURSES_XNAMES=0
12212 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12213
12214 ###############################################################################
12215 # These options are relatively safe to experiment with.
12216
12217 echo "$as_me:12217: checking if you want all development code" >&5
12218 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12219
12220 # Check whether --with-develop or --without-develop was given.
12221 if test "${with_develop+set}" = set; then
12222   withval="$with_develop"
12223   with_develop=$withval
12224 else
12225   with_develop=no
12226 fi;
12227 echo "$as_me:12227: result: $with_develop" >&5
12228 echo "${ECHO_T}$with_develop" >&6
12229
12230 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12231 echo "$as_me:12231: checking if you want hard-tabs code" >&5
12232 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12233
12234 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12235 if test "${enable_hard_tabs+set}" = set; then
12236   enableval="$enable_hard_tabs"
12237
12238 else
12239   enable_hard_tabs=$with_develop
12240 fi;
12241 echo "$as_me:12241: result: $enable_hard_tabs" >&5
12242 echo "${ECHO_T}$enable_hard_tabs" >&6
12243 test "x$enable_hard_tabs" = xyes &&
12244 cat >>confdefs.h <<\EOF
12245 #define USE_HARD_TABS 1
12246 EOF
12247
12248 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12249 echo "$as_me:12249: checking if you want limited support for xmc" >&5
12250 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12251
12252 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12253 if test "${enable_xmc_glitch+set}" = set; then
12254   enableval="$enable_xmc_glitch"
12255
12256 else
12257   enable_xmc_glitch=$with_develop
12258 fi;
12259 echo "$as_me:12259: result: $enable_xmc_glitch" >&5
12260 echo "${ECHO_T}$enable_xmc_glitch" >&6
12261 test "x$enable_xmc_glitch" = xyes &&
12262 cat >>confdefs.h <<\EOF
12263 #define USE_XMC_SUPPORT 1
12264 EOF
12265
12266 ###############################################################################
12267 # These are just experimental, probably should not be in a package:
12268
12269 echo "$as_me:12269: checking if you do not want to assume colors are white-on-black" >&5
12270 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12271
12272 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12273 if test "${enable_assumed_color+set}" = set; then
12274   enableval="$enable_assumed_color"
12275   with_assumed_color=$enableval
12276 else
12277   with_assumed_color=yes
12278 fi;
12279 echo "$as_me:12279: result: $with_assumed_color" >&5
12280 echo "${ECHO_T}$with_assumed_color" >&6
12281 test "x$with_assumed_color" = xyes &&
12282 cat >>confdefs.h <<\EOF
12283 #define USE_ASSUMED_COLOR 1
12284 EOF
12285
12286 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12287 echo "$as_me:12287: checking if you want hashmap scrolling-optimization code" >&5
12288 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12289
12290 # Check whether --enable-hashmap or --disable-hashmap was given.
12291 if test "${enable_hashmap+set}" = set; then
12292   enableval="$enable_hashmap"
12293   with_hashmap=$enableval
12294 else
12295   with_hashmap=yes
12296 fi;
12297 echo "$as_me:12297: result: $with_hashmap" >&5
12298 echo "${ECHO_T}$with_hashmap" >&6
12299 test "x$with_hashmap" = xyes &&
12300 cat >>confdefs.h <<\EOF
12301 #define USE_HASHMAP 1
12302 EOF
12303
12304 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12305 echo "$as_me:12305: checking if you want colorfgbg code" >&5
12306 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12307
12308 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12309 if test "${enable_colorfgbg+set}" = set; then
12310   enableval="$enable_colorfgbg"
12311   with_colorfgbg=$enableval
12312 else
12313   with_colorfgbg=no
12314 fi;
12315 echo "$as_me:12315: result: $with_colorfgbg" >&5
12316 echo "${ECHO_T}$with_colorfgbg" >&6
12317 test "x$with_colorfgbg" = xyes &&
12318 cat >>confdefs.h <<\EOF
12319 #define USE_COLORFGBG 1
12320 EOF
12321
12322 ###   use option --enable-interop to turn on use of bindings used for interop
12323 echo "$as_me:12323: checking if you want interop bindings" >&5
12324 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12325
12326 # Check whether --enable-interop or --disable-interop was given.
12327 if test "${enable_interop+set}" = set; then
12328   enableval="$enable_interop"
12329   with_exp_interop=$enableval
12330 else
12331   with_exp_interop=$cf_dft_interop
12332 fi;
12333 echo "$as_me:12333: result: $with_exp_interop" >&5
12334 echo "${ECHO_T}$with_exp_interop" >&6
12335
12336 NCURSES_INTEROP_FUNCS=0
12337 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12338
12339 # This is still experimental (20080329), but should ultimately be moved to
12340 # the script-block --with-normal, etc.
12341
12342 echo "$as_me:12342: checking if you want to link with the pthread library" >&5
12343 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12344
12345 # Check whether --with-pthread or --without-pthread was given.
12346 if test "${with_pthread+set}" = set; then
12347   withval="$with_pthread"
12348   with_pthread=$withval
12349 else
12350   with_pthread=no
12351 fi;
12352 echo "$as_me:12352: result: $with_pthread" >&5
12353 echo "${ECHO_T}$with_pthread" >&6
12354
12355 if test "$with_pthread" != no ; then
12356         echo "$as_me:12356: checking for pthread.h" >&5
12357 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12358 if test "${ac_cv_header_pthread_h+set}" = set; then
12359   echo $ECHO_N "(cached) $ECHO_C" >&6
12360 else
12361   cat >conftest.$ac_ext <<_ACEOF
12362 #line 12362 "configure"
12363 #include "confdefs.h"
12364 #include <pthread.h>
12365 _ACEOF
12366 if { (eval echo "$as_me:12366: \"$ac_cpp conftest.$ac_ext\"") >&5
12367   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12368   ac_status=$?
12369   egrep -v '^ *\+' conftest.er1 >conftest.err
12370   rm -f conftest.er1
12371   cat conftest.err >&5
12372   echo "$as_me:12372: \$? = $ac_status" >&5
12373   (exit $ac_status); } >/dev/null; then
12374   if test -s conftest.err; then
12375     ac_cpp_err=$ac_c_preproc_warn_flag
12376   else
12377     ac_cpp_err=
12378   fi
12379 else
12380   ac_cpp_err=yes
12381 fi
12382 if test -z "$ac_cpp_err"; then
12383   ac_cv_header_pthread_h=yes
12384 else
12385   echo "$as_me: failed program was:" >&5
12386   cat conftest.$ac_ext >&5
12387   ac_cv_header_pthread_h=no
12388 fi
12389 rm -f conftest.err conftest.$ac_ext
12390 fi
12391 echo "$as_me:12391: result: $ac_cv_header_pthread_h" >&5
12392 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12393 if test $ac_cv_header_pthread_h = yes; then
12394
12395 cat >>confdefs.h <<\EOF
12396 #define HAVE_PTHREADS_H 1
12397 EOF
12398
12399         for cf_lib_pthread in pthread c_r
12400         do
12401             echo "$as_me:12401: checking if we can link with the $cf_lib_pthread library" >&5
12402 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12403             cf_save_LIBS="$LIBS"
12404
12405 cf_add_libs="-l$cf_lib_pthread"
12406 # Filter out duplicates - this happens with badly-designed ".pc" files...
12407 for cf_add_1lib in $LIBS
12408 do
12409         for cf_add_2lib in $cf_add_libs
12410         do
12411                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12412                 then
12413                         cf_add_1lib=
12414                         break
12415                 fi
12416         done
12417         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12418 done
12419 LIBS="$cf_add_libs"
12420
12421             cat >conftest.$ac_ext <<_ACEOF
12422 #line 12422 "configure"
12423 #include "confdefs.h"
12424
12425 #include <pthread.h>
12426
12427 int
12428 main ()
12429 {
12430
12431                 int rc = pthread_create(0,0,0,0);
12432                 int r2 = pthread_mutexattr_settype(0, 0);
12433
12434   ;
12435   return 0;
12436 }
12437 _ACEOF
12438 rm -f conftest.$ac_objext conftest$ac_exeext
12439 if { (eval echo "$as_me:12439: \"$ac_link\"") >&5
12440   (eval $ac_link) 2>&5
12441   ac_status=$?
12442   echo "$as_me:12442: \$? = $ac_status" >&5
12443   (exit $ac_status); } &&
12444          { ac_try='test -s conftest$ac_exeext'
12445   { (eval echo "$as_me:12445: \"$ac_try\"") >&5
12446   (eval $ac_try) 2>&5
12447   ac_status=$?
12448   echo "$as_me:12448: \$? = $ac_status" >&5
12449   (exit $ac_status); }; }; then
12450   with_pthread=yes
12451 else
12452   echo "$as_me: failed program was:" >&5
12453 cat conftest.$ac_ext >&5
12454 with_pthread=no
12455 fi
12456 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12457             LIBS="$cf_save_LIBS"
12458             echo "$as_me:12458: result: $with_pthread" >&5
12459 echo "${ECHO_T}$with_pthread" >&6
12460             test "$with_pthread" = yes && break
12461         done
12462
12463         if test "$with_pthread" = yes ; then
12464
12465 cf_add_libs="-l$cf_lib_pthread"
12466 # Filter out duplicates - this happens with badly-designed ".pc" files...
12467 for cf_add_1lib in $LIBS
12468 do
12469         for cf_add_2lib in $cf_add_libs
12470         do
12471                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12472                 then
12473                         cf_add_1lib=
12474                         break
12475                 fi
12476         done
12477         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12478 done
12479 LIBS="$cf_add_libs"
12480
12481 cat >>confdefs.h <<\EOF
12482 #define HAVE_LIBPTHREADS 1
12483 EOF
12484
12485         else
12486             { { echo "$as_me:12486: error: Cannot link with pthread library" >&5
12487 echo "$as_me: error: Cannot link with pthread library" >&2;}
12488    { (exit 1); exit 1; }; }
12489         fi
12490
12491 fi
12492
12493 fi
12494
12495 if test "x$with_pthread" != xno; then
12496         echo "$as_me:12496: checking for pthread_kill" >&5
12497 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12498 if test "${ac_cv_func_pthread_kill+set}" = set; then
12499   echo $ECHO_N "(cached) $ECHO_C" >&6
12500 else
12501   cat >conftest.$ac_ext <<_ACEOF
12502 #line 12502 "configure"
12503 #include "confdefs.h"
12504 /* System header to define __stub macros and hopefully few prototypes,
12505     which can conflict with char pthread_kill (); below.  */
12506 #include <assert.h>
12507 /* Override any gcc2 internal prototype to avoid an error.  */
12508 #ifdef __cplusplus
12509 extern "C"
12510 #endif
12511 /* We use char because int might match the return type of a gcc2
12512    builtin and then its argument prototype would still apply.  */
12513 char pthread_kill ();
12514 char (*f) ();
12515
12516 int
12517 main ()
12518 {
12519 /* The GNU C library defines this for functions which it implements
12520     to always fail with ENOSYS.  Some functions are actually named
12521     something starting with __ and the normal name is an alias.  */
12522 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12523 choke me
12524 #else
12525 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12526 #endif
12527
12528   ;
12529   return 0;
12530 }
12531 _ACEOF
12532 rm -f conftest.$ac_objext conftest$ac_exeext
12533 if { (eval echo "$as_me:12533: \"$ac_link\"") >&5
12534   (eval $ac_link) 2>&5
12535   ac_status=$?
12536   echo "$as_me:12536: \$? = $ac_status" >&5
12537   (exit $ac_status); } &&
12538          { ac_try='test -s conftest$ac_exeext'
12539   { (eval echo "$as_me:12539: \"$ac_try\"") >&5
12540   (eval $ac_try) 2>&5
12541   ac_status=$?
12542   echo "$as_me:12542: \$? = $ac_status" >&5
12543   (exit $ac_status); }; }; then
12544   ac_cv_func_pthread_kill=yes
12545 else
12546   echo "$as_me: failed program was:" >&5
12547 cat conftest.$ac_ext >&5
12548 ac_cv_func_pthread_kill=no
12549 fi
12550 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12551 fi
12552 echo "$as_me:12552: result: $ac_cv_func_pthread_kill" >&5
12553 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12554 if test $ac_cv_func_pthread_kill = yes; then
12555
12556                 echo "$as_me:12556: checking if you want to allow EINTR in wgetch with pthreads" >&5
12557 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12558
12559 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12560 if test "${enable_pthreads_eintr+set}" = set; then
12561   enableval="$enable_pthreads_eintr"
12562   use_pthreads_eintr=$enableval
12563 else
12564   use_pthreads_eintr=no
12565 fi;
12566                 echo "$as_me:12566: result: $use_pthreads_eintr" >&5
12567 echo "${ECHO_T}$use_pthreads_eintr" >&6
12568                 if test "x$use_pthreads_eintr" = xyes ; then
12569
12570 cat >>confdefs.h <<\EOF
12571 #define USE_PTHREADS_EINTR 1
12572 EOF
12573
12574                 fi
12575 fi
12576
12577         echo "$as_me:12577: checking if you want to use weak-symbols for pthreads" >&5
12578 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12579
12580 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12581 if test "${enable_weak_symbols+set}" = set; then
12582   enableval="$enable_weak_symbols"
12583   use_weak_symbols=$enableval
12584 else
12585   use_weak_symbols=no
12586 fi;
12587         echo "$as_me:12587: result: $use_weak_symbols" >&5
12588 echo "${ECHO_T}$use_weak_symbols" >&6
12589         if test "x$use_weak_symbols" = xyes ; then
12590
12591 echo "$as_me:12591: checking if $CC supports weak symbols" >&5
12592 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12593 if test "${cf_cv_weak_symbols+set}" = set; then
12594   echo $ECHO_N "(cached) $ECHO_C" >&6
12595 else
12596
12597 cat >conftest.$ac_ext <<_ACEOF
12598 #line 12598 "configure"
12599 #include "confdefs.h"
12600
12601 #include <stdio.h>
12602 int
12603 main ()
12604 {
12605
12606 #if defined(__GNUC__)
12607 #  if defined __USE_ISOC99
12608 #    define _cat_pragma(exp)    _Pragma(#exp)
12609 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12610 #  else
12611 #    define _weak_pragma(exp)
12612 #  endif
12613 #  define _declare(name)        __extension__ extern __typeof__(name) name
12614 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12615 #endif
12616
12617 weak_symbol(fopen);
12618
12619   ;
12620   return 0;
12621 }
12622 _ACEOF
12623 rm -f conftest.$ac_objext
12624 if { (eval echo "$as_me:12624: \"$ac_compile\"") >&5
12625   (eval $ac_compile) 2>&5
12626   ac_status=$?
12627   echo "$as_me:12627: \$? = $ac_status" >&5
12628   (exit $ac_status); } &&
12629          { ac_try='test -s conftest.$ac_objext'
12630   { (eval echo "$as_me:12630: \"$ac_try\"") >&5
12631   (eval $ac_try) 2>&5
12632   ac_status=$?
12633   echo "$as_me:12633: \$? = $ac_status" >&5
12634   (exit $ac_status); }; }; then
12635   cf_cv_weak_symbols=yes
12636 else
12637   echo "$as_me: failed program was:" >&5
12638 cat conftest.$ac_ext >&5
12639 cf_cv_weak_symbols=no
12640 fi
12641 rm -f conftest.$ac_objext conftest.$ac_ext
12642
12643 fi
12644 echo "$as_me:12644: result: $cf_cv_weak_symbols" >&5
12645 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12646
12647         else
12648                 cf_cv_weak_symbols=no
12649         fi
12650
12651         if test "x$cf_cv_weak_symbols" = xyes ; then
12652
12653 cat >>confdefs.h <<\EOF
12654 #define USE_WEAK_SYMBOLS 1
12655 EOF
12656
12657         fi
12658 fi
12659
12660 PTHREAD=
12661 if test "x$with_pthread" = "xyes" ; then
12662
12663 cat >>confdefs.h <<\EOF
12664 #define USE_PTHREADS 1
12665 EOF
12666
12667         enable_reentrant=yes
12668         if test "x$cf_cv_weak_symbols" = xyes ; then
12669                 PTHREAD=-lpthread
12670         fi
12671 fi
12672
12673 # Reentrant code has to be opaque; there's little advantage to making ncurses
12674 # opaque outside of that, so there is no --enable-opaque option.  We can use
12675 # this option without --with-pthreads, but this will be always set for
12676 # pthreads.
12677 echo "$as_me:12677: checking if you want reentrant code" >&5
12678 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
12679
12680 # Check whether --enable-reentrant or --disable-reentrant was given.
12681 if test "${enable_reentrant+set}" = set; then
12682   enableval="$enable_reentrant"
12683   with_reentrant=$enableval
12684 else
12685   with_reentrant=no
12686 fi;
12687 echo "$as_me:12687: result: $with_reentrant" >&5
12688 echo "${ECHO_T}$with_reentrant" >&6
12689 if test "x$with_reentrant" = xyes ; then
12690         cf_cv_enable_reentrant=1
12691         cf_cv_enable_opaque="NCURSES_INTERNALS"
12692         NCURSES_OPAQUE=1
12693         NCURSES_SIZE_T=int
12694         if test "x$cf_cv_weak_symbols" = xyes ; then
12695
12696 # remove pthread library from $LIBS
12697 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12698
12699 cf_add_libs="-lpthread"
12700 # Filter out duplicates - this happens with badly-designed ".pc" files...
12701 for cf_add_1lib in $TEST_LIBS
12702 do
12703         for cf_add_2lib in $cf_add_libs
12704         do
12705                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12706                 then
12707                         cf_add_1lib=
12708                         break
12709                 fi
12710         done
12711         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12712 done
12713 TEST_LIBS="$cf_add_libs"
12714
12715 cf_add_libs="-lpthread"
12716 # Filter out duplicates - this happens with badly-designed ".pc" files...
12717 for cf_add_1lib in $TEST_LIBS2
12718 do
12719         for cf_add_2lib in $cf_add_libs
12720         do
12721                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12722                 then
12723                         cf_add_1lib=
12724                         break
12725                 fi
12726         done
12727         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12728 done
12729 TEST_LIBS2="$cf_add_libs"
12730
12731         else
12732                 # when not using weak symbols but with_reentrant,
12733                 # add 't' to the library suffix on all platforms
12734                 # except cygwin, where we only do that if ALSO
12735                 # compiling with full thread support.
12736                 case "$host" in
12737                 (*cygwin* | *msys*)
12738                         if test "$with_pthread" = "yes" ; then
12739                                 if test "x$disable_lib_suffixes" = "xno" ; then
12740                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12741                                 fi
12742                         fi ;;
12743                 (*)
12744                         if test "x$disable_lib_suffixes" = "xno" ; then
12745                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12746                         fi
12747                         ;;
12748                 esac
12749         fi
12750
12751 cat >>confdefs.h <<\EOF
12752 #define USE_REENTRANT 1
12753 EOF
12754
12755 if test "${with_abi_version+set}" != set; then
12756         case $cf_cv_rel_version in
12757         (5.*)
12758                 cf_cv_rel_version=6.0
12759                 cf_cv_abi_version=6
12760                 { echo "$as_me:12760: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12761 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12762                 ;;
12763         esac
12764 fi
12765
12766 else
12767         cf_cv_enable_reentrant=0
12768         cf_cv_enable_opaque="NCURSES_OPAQUE"
12769         NCURSES_OPAQUE=0
12770         NCURSES_SIZE_T=short
12771 fi
12772
12773 ### Allow using a different wrap-prefix
12774 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12775         echo "$as_me:12775: checking for prefix used to wrap public variables" >&5
12776 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12777
12778 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12779 if test "${with_wrap_prefix+set}" = set; then
12780   withval="$with_wrap_prefix"
12781   NCURSES_WRAP_PREFIX=$withval
12782 else
12783   NCURSES_WRAP_PREFIX=_nc_
12784 fi;
12785         echo "$as_me:12785: result: $NCURSES_WRAP_PREFIX" >&5
12786 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12787 else
12788         NCURSES_WRAP_PREFIX=_nc_
12789 fi
12790
12791 cat >>confdefs.h <<EOF
12792 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12793 EOF
12794
12795 echo "$as_me:12795: checking if you want experimental safe-sprintf code" >&5
12796 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12797
12798 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12799 if test "${enable_safe_sprintf+set}" = set; then
12800   enableval="$enable_safe_sprintf"
12801   with_safe_sprintf=$enableval
12802 else
12803   with_safe_sprintf=no
12804 fi;
12805 echo "$as_me:12805: result: $with_safe_sprintf" >&5
12806 echo "${ECHO_T}$with_safe_sprintf" >&6
12807 test "x$with_safe_sprintf" = xyes &&
12808 cat >>confdefs.h <<\EOF
12809 #define USE_SAFE_SPRINTF 1
12810 EOF
12811
12812 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12813 # when hashmap is used scroll hints are useless
12814 if test "$with_hashmap" = no ; then
12815 echo "$as_me:12815: checking if you want to experiment without scrolling-hints code" >&5
12816 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12817
12818 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12819 if test "${enable_scroll_hints+set}" = set; then
12820   enableval="$enable_scroll_hints"
12821   with_scroll_hints=$enableval
12822 else
12823   with_scroll_hints=yes
12824 fi;
12825 echo "$as_me:12825: result: $with_scroll_hints" >&5
12826 echo "${ECHO_T}$with_scroll_hints" >&6
12827 test "x$with_scroll_hints" = xyes &&
12828 cat >>confdefs.h <<\EOF
12829 #define USE_SCROLL_HINTS 1
12830 EOF
12831
12832 fi
12833
12834 echo "$as_me:12834: checking if you want wgetch-events code" >&5
12835 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
12836
12837 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12838 if test "${enable_wgetch_events+set}" = set; then
12839   enableval="$enable_wgetch_events"
12840   with_wgetch_events=$enableval
12841 else
12842   with_wgetch_events=no
12843 fi;
12844 echo "$as_me:12844: result: $with_wgetch_events" >&5
12845 echo "${ECHO_T}$with_wgetch_events" >&6
12846 test "x$with_wgetch_events" = xyes &&
12847 cat >>confdefs.h <<\EOF
12848 #define NCURSES_WGETCH_EVENTS 1
12849 EOF
12850
12851 ###############################################################################
12852
12853 ###     use option --disable-echo to suppress full display compiling commands
12854
12855 echo "$as_me:12855: checking if you want to see long compiling messages" >&5
12856 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12857
12858 # Check whether --enable-echo or --disable-echo was given.
12859 if test "${enable_echo+set}" = set; then
12860   enableval="$enable_echo"
12861   test "$enableval" != no && enableval=yes
12862   if test "$enableval" != "yes" ; then
12863
12864         ECHO_LT='--silent'
12865         ECHO_LD='@echo linking $@;'
12866         RULE_CC='@echo compiling $<'
12867         SHOW_CC='@echo compiling $@'
12868         ECHO_CC='@'
12869
12870   else
12871
12872         ECHO_LT=''
12873         ECHO_LD=''
12874         RULE_CC=''
12875         SHOW_CC=''
12876         ECHO_CC=''
12877
12878   fi
12879 else
12880   enableval=yes
12881
12882         ECHO_LT=''
12883         ECHO_LD=''
12884         RULE_CC=''
12885         SHOW_CC=''
12886         ECHO_CC=''
12887
12888 fi;
12889 echo "$as_me:12889: result: $enableval" >&5
12890 echo "${ECHO_T}$enableval" >&6
12891
12892 if test "x$enable_echo" = xyes; then
12893         ECHO_LINK=
12894 else
12895         ECHO_LINK='@ echo linking $@ ... ;'
12896         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12897         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12898 fi
12899
12900 ###     use option --enable-warnings to turn on all gcc warnings
12901 echo "$as_me:12901: checking if you want to see compiler warnings" >&5
12902 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12903
12904 # Check whether --enable-warnings or --disable-warnings was given.
12905 if test "${enable_warnings+set}" = set; then
12906   enableval="$enable_warnings"
12907   with_warnings=$enableval
12908 fi;
12909 echo "$as_me:12909: result: $with_warnings" >&5
12910 echo "${ECHO_T}$with_warnings" >&6
12911
12912 if test "x$with_warnings" = "xyes"; then
12913
12914         ADAFLAGS="$ADAFLAGS -gnatg"
12915
12916 INTEL_COMPILER=no
12917
12918 if test "$GCC" = yes ; then
12919         case $host_os in
12920         (linux*|gnu*)
12921                 echo "$as_me:12921: checking if this is really Intel C compiler" >&5
12922 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12923                 cf_save_CFLAGS="$CFLAGS"
12924                 CFLAGS="$CFLAGS -no-gcc"
12925                 cat >conftest.$ac_ext <<_ACEOF
12926 #line 12926 "configure"
12927 #include "confdefs.h"
12928
12929 int
12930 main ()
12931 {
12932
12933 #ifdef __INTEL_COMPILER
12934 #else
12935 make an error
12936 #endif
12937
12938   ;
12939   return 0;
12940 }
12941 _ACEOF
12942 rm -f conftest.$ac_objext
12943 if { (eval echo "$as_me:12943: \"$ac_compile\"") >&5
12944   (eval $ac_compile) 2>&5
12945   ac_status=$?
12946   echo "$as_me:12946: \$? = $ac_status" >&5
12947   (exit $ac_status); } &&
12948          { ac_try='test -s conftest.$ac_objext'
12949   { (eval echo "$as_me:12949: \"$ac_try\"") >&5
12950   (eval $ac_try) 2>&5
12951   ac_status=$?
12952   echo "$as_me:12952: \$? = $ac_status" >&5
12953   (exit $ac_status); }; }; then
12954   INTEL_COMPILER=yes
12955 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12956
12957 else
12958   echo "$as_me: failed program was:" >&5
12959 cat conftest.$ac_ext >&5
12960 fi
12961 rm -f conftest.$ac_objext conftest.$ac_ext
12962                 CFLAGS="$cf_save_CFLAGS"
12963                 echo "$as_me:12963: result: $INTEL_COMPILER" >&5
12964 echo "${ECHO_T}$INTEL_COMPILER" >&6
12965                 ;;
12966         esac
12967 fi
12968
12969 CLANG_COMPILER=no
12970
12971 if test "$GCC" = yes ; then
12972         echo "$as_me:12972: checking if this is really Clang C compiler" >&5
12973 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12974         cf_save_CFLAGS="$CFLAGS"
12975         CFLAGS="$CFLAGS -Qunused-arguments"
12976         cat >conftest.$ac_ext <<_ACEOF
12977 #line 12977 "configure"
12978 #include "confdefs.h"
12979
12980 int
12981 main ()
12982 {
12983
12984 #ifdef __clang__
12985 #else
12986 make an error
12987 #endif
12988
12989   ;
12990   return 0;
12991 }
12992 _ACEOF
12993 rm -f conftest.$ac_objext
12994 if { (eval echo "$as_me:12994: \"$ac_compile\"") >&5
12995   (eval $ac_compile) 2>&5
12996   ac_status=$?
12997   echo "$as_me:12997: \$? = $ac_status" >&5
12998   (exit $ac_status); } &&
12999          { ac_try='test -s conftest.$ac_objext'
13000   { (eval echo "$as_me:13000: \"$ac_try\"") >&5
13001   (eval $ac_try) 2>&5
13002   ac_status=$?
13003   echo "$as_me:13003: \$? = $ac_status" >&5
13004   (exit $ac_status); }; }; then
13005   CLANG_COMPILER=yes
13006 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13007
13008 else
13009   echo "$as_me: failed program was:" >&5
13010 cat conftest.$ac_ext >&5
13011 fi
13012 rm -f conftest.$ac_objext conftest.$ac_ext
13013         CFLAGS="$cf_save_CFLAGS"
13014         echo "$as_me:13014: result: $CLANG_COMPILER" >&5
13015 echo "${ECHO_T}$CLANG_COMPILER" >&6
13016 fi
13017
13018 cat > conftest.$ac_ext <<EOF
13019 #line 13019 "${as_me:-configure}"
13020 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13021 EOF
13022
13023 if test "$INTEL_COMPILER" = yes
13024 then
13025 # The "-wdXXX" options suppress warnings:
13026 # remark #1419: external declaration in primary source file
13027 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13028 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13029 # remark #193: zero used for undefined preprocessing identifier
13030 # remark #593: variable "curs_sb_left_arrow" was set but never used
13031 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13032 # remark #869: parameter "tw" was never referenced
13033 # remark #981: operands are evaluated in unspecified order
13034 # warning #279: controlling expression is constant
13035
13036         { echo "$as_me:13036: checking for $CC warning options..." >&5
13037 echo "$as_me: checking for $CC warning options..." >&6;}
13038         cf_save_CFLAGS="$CFLAGS"
13039         EXTRA_CFLAGS="-Wall"
13040         for cf_opt in \
13041                 wd1419 \
13042                 wd1683 \
13043                 wd1684 \
13044                 wd193 \
13045                 wd593 \
13046                 wd279 \
13047                 wd810 \
13048                 wd869 \
13049                 wd981
13050         do
13051                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13052                 if { (eval echo "$as_me:13052: \"$ac_compile\"") >&5
13053   (eval $ac_compile) 2>&5
13054   ac_status=$?
13055   echo "$as_me:13055: \$? = $ac_status" >&5
13056   (exit $ac_status); }; then
13057                         test -n "$verbose" && echo "$as_me:13057: result: ... -$cf_opt" >&5
13058 echo "${ECHO_T}... -$cf_opt" >&6
13059                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13060                 fi
13061         done
13062         CFLAGS="$cf_save_CFLAGS"
13063
13064 elif test "$GCC" = yes
13065 then
13066         { echo "$as_me:13066: checking for $CC warning options..." >&5
13067 echo "$as_me: checking for $CC warning options..." >&6;}
13068         cf_save_CFLAGS="$CFLAGS"
13069         EXTRA_CFLAGS=
13070         cf_warn_CONST=""
13071         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13072         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13073         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13074         for cf_opt in W Wall \
13075                 Wbad-function-cast \
13076                 Wcast-align \
13077                 Wcast-qual \
13078                 Wdeclaration-after-statement \
13079                 Wextra \
13080                 Winline \
13081                 Wmissing-declarations \
13082                 Wmissing-prototypes \
13083                 Wnested-externs \
13084                 Wpointer-arith \
13085                 Wshadow \
13086                 Wstrict-prototypes \
13087                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13088         do
13089                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13090                 if { (eval echo "$as_me:13090: \"$ac_compile\"") >&5
13091   (eval $ac_compile) 2>&5
13092   ac_status=$?
13093   echo "$as_me:13093: \$? = $ac_status" >&5
13094   (exit $ac_status); }; then
13095                         test -n "$verbose" && echo "$as_me:13095: result: ... -$cf_opt" >&5
13096 echo "${ECHO_T}... -$cf_opt" >&6
13097                         case $cf_opt in
13098                         (Wcast-qual)
13099                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13100                                 ;;
13101                         (Winline)
13102                                 case $GCC_VERSION in
13103                                 ([34].*)
13104                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13105
13106 echo "${as_me:-configure}:13106: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13107
13108                                         continue;;
13109                                 esac
13110                                 ;;
13111                         (Wpointer-arith)
13112                                 case $GCC_VERSION in
13113                                 ([12].*)
13114                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13115
13116 echo "${as_me:-configure}:13116: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13117
13118                                         continue;;
13119                                 esac
13120                                 ;;
13121                         esac
13122                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13123                 fi
13124         done
13125         CFLAGS="$cf_save_CFLAGS"
13126 fi
13127 rm -rf conftest*
13128
13129         if test "x$cf_with_cxx" = xyes ; then
13130
13131 INTEL_CPLUSPLUS=no
13132
13133 if test "$GCC" = yes ; then
13134         case $host_os in
13135         (linux*|gnu*)
13136                 echo "$as_me:13136: checking if this is really Intel C++ compiler" >&5
13137 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13138                 cf_save_CFLAGS="$CXXFLAGS"
13139                 CXXFLAGS="$CXXFLAGS -no-gcc"
13140                 cat >conftest.$ac_ext <<_ACEOF
13141 #line 13141 "configure"
13142 #include "confdefs.h"
13143
13144 int
13145 main ()
13146 {
13147
13148 #ifdef __INTEL_COMPILER
13149 #else
13150 make an error
13151 #endif
13152
13153   ;
13154   return 0;
13155 }
13156 _ACEOF
13157 rm -f conftest.$ac_objext
13158 if { (eval echo "$as_me:13158: \"$ac_compile\"") >&5
13159   (eval $ac_compile) 2>&5
13160   ac_status=$?
13161   echo "$as_me:13161: \$? = $ac_status" >&5
13162   (exit $ac_status); } &&
13163          { ac_try='test -s conftest.$ac_objext'
13164   { (eval echo "$as_me:13164: \"$ac_try\"") >&5
13165   (eval $ac_try) 2>&5
13166   ac_status=$?
13167   echo "$as_me:13167: \$? = $ac_status" >&5
13168   (exit $ac_status); }; }; then
13169   INTEL_CPLUSPLUS=yes
13170 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13171
13172 else
13173   echo "$as_me: failed program was:" >&5
13174 cat conftest.$ac_ext >&5
13175 fi
13176 rm -f conftest.$ac_objext conftest.$ac_ext
13177                 CXXFLAGS="$cf_save_CFLAGS"
13178                 echo "$as_me:13178: result: $INTEL_CPLUSPLUS" >&5
13179 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13180                 ;;
13181         esac
13182 fi
13183
13184 CLANG_CPLUSPLUS=no
13185
13186 if test "$GCC" = yes ; then
13187         echo "$as_me:13187: checking if this is really Clang C++ compiler" >&5
13188 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13189         cf_save_CFLAGS="$CXXFLAGS"
13190         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13191         cat >conftest.$ac_ext <<_ACEOF
13192 #line 13192 "configure"
13193 #include "confdefs.h"
13194
13195 int
13196 main ()
13197 {
13198
13199 #ifdef __clang__
13200 #else
13201 make an error
13202 #endif
13203
13204   ;
13205   return 0;
13206 }
13207 _ACEOF
13208 rm -f conftest.$ac_objext
13209 if { (eval echo "$as_me:13209: \"$ac_compile\"") >&5
13210   (eval $ac_compile) 2>&5
13211   ac_status=$?
13212   echo "$as_me:13212: \$? = $ac_status" >&5
13213   (exit $ac_status); } &&
13214          { ac_try='test -s conftest.$ac_objext'
13215   { (eval echo "$as_me:13215: \"$ac_try\"") >&5
13216   (eval $ac_try) 2>&5
13217   ac_status=$?
13218   echo "$as_me:13218: \$? = $ac_status" >&5
13219   (exit $ac_status); }; }; then
13220   CLANG_CPLUSPLUS=yes
13221 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13222
13223 else
13224   echo "$as_me: failed program was:" >&5
13225 cat conftest.$ac_ext >&5
13226 fi
13227 rm -f conftest.$ac_objext conftest.$ac_ext
13228         CXXFLAGS="$cf_save_CFLAGS"
13229         echo "$as_me:13229: result: $CLANG_CPLUSPLUS" >&5
13230 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13231 fi
13232
13233 ac_ext=cc
13234 ac_cpp='$CXXCPP $CPPFLAGS'
13235 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13236 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13237 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13238 ac_main_return=return
13239
13240 cat > conftest.$ac_ext <<EOF
13241 #line 13241 "configure"
13242 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13243 EOF
13244
13245 if test "$INTEL_CPLUSPLUS" = yes
13246 then
13247 # The "-wdXXX" options suppress warnings:
13248 # remark #1419: external declaration in primary source file
13249 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13250 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13251 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13252 # remark #193: zero used for undefined preprocessing identifier
13253 # remark #593: variable "curs_sb_left_arrow" was set but never used
13254 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13255 # remark #869: parameter "tw" was never referenced
13256 # remark #981: operands are evaluated in unspecified order
13257 # warning #269: invalid format string conversion
13258
13259         { echo "$as_me:13259: checking for $CC warning options..." >&5
13260 echo "$as_me: checking for $CC warning options..." >&6;}
13261         cf_save_CXXFLAGS="$CXXFLAGS"
13262         EXTRA_CXXFLAGS="-Wall"
13263         for cf_opt in \
13264                 wd1419 \
13265                 wd1682 \
13266                 wd1683 \
13267                 wd1684 \
13268                 wd193 \
13269                 wd279 \
13270                 wd593 \
13271                 wd810 \
13272                 wd869 \
13273                 wd981
13274         do
13275                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13276                 if { (eval echo "$as_me:13276: \"$ac_compile\"") >&5
13277   (eval $ac_compile) 2>&5
13278   ac_status=$?
13279   echo "$as_me:13279: \$? = $ac_status" >&5
13280   (exit $ac_status); }; then
13281                         test -n "$verbose" && echo "$as_me:13281: result: ... -$cf_opt" >&5
13282 echo "${ECHO_T}... -$cf_opt" >&6
13283                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13284                 fi
13285         done
13286         CXXFLAGS="$cf_save_CXXFLAGS"
13287
13288 elif test "$GXX" = yes
13289 then
13290         { echo "$as_me:13290: checking for $CXX warning options..." >&5
13291 echo "$as_me: checking for $CXX warning options..." >&6;}
13292         cf_save_CXXFLAGS="$CXXFLAGS"
13293         EXTRA_CXXFLAGS="-W -Wall"
13294         cf_gxx_extra_warnings=""
13295         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13296         case "$GCC_VERSION" in
13297         ([1-2].*)
13298                 ;;
13299         (*)
13300                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13301                 ;;
13302         esac
13303         for cf_opt in \
13304                 Wabi \
13305                 fabi-version=0 \
13306                 Wextra \
13307                 Wignored-qualifiers \
13308                 Wlogical-op \
13309                 Woverloaded-virtual \
13310                 Wsign-promo \
13311                 Wsynth \
13312                 Wold-style-cast \
13313                 Wcast-align \
13314                 Wcast-qual \
13315                 Wpointer-arith \
13316                 Wshadow \
13317                 Wundef $cf_gxx_extra_warnings Wno-unused
13318         do
13319                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13320                 if { (eval echo "$as_me:13320: \"$ac_compile\"") >&5
13321   (eval $ac_compile) 2>&5
13322   ac_status=$?
13323   echo "$as_me:13323: \$? = $ac_status" >&5
13324   (exit $ac_status); }; then
13325                         test -n "$verbose" && echo "$as_me:13325: result: ... -$cf_opt" >&5
13326 echo "${ECHO_T}... -$cf_opt" >&6
13327                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13328                 else
13329                         test -n "$verbose" && echo "$as_me:13329: result: ... no -$cf_opt" >&5
13330 echo "${ECHO_T}... no -$cf_opt" >&6
13331                 fi
13332         done
13333         CXXFLAGS="$cf_save_CXXFLAGS"
13334 fi
13335
13336 rm -rf conftest*
13337 ac_ext=c
13338 ac_cpp='$CPP $CPPFLAGS'
13339 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13340 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13341 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13342 ac_main_return=return
13343
13344         fi
13345 fi
13346
13347 if test "$GCC" = yes
13348 then
13349 cat > conftest.i <<EOF
13350 #ifndef GCC_PRINTF
13351 #define GCC_PRINTF 0
13352 #endif
13353 #ifndef GCC_SCANF
13354 #define GCC_SCANF 0
13355 #endif
13356 #ifndef GCC_NORETURN
13357 #define GCC_NORETURN /* nothing */
13358 #endif
13359 #ifndef GCC_UNUSED
13360 #define GCC_UNUSED /* nothing */
13361 #endif
13362 EOF
13363 if test "$GCC" = yes
13364 then
13365         { echo "$as_me:13365: checking for $CC __attribute__ directives..." >&5
13366 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13367 cat > conftest.$ac_ext <<EOF
13368 #line 13368 "${as_me:-configure}"
13369 #include "confdefs.h"
13370 #include "conftest.h"
13371 #include "conftest.i"
13372 #if     GCC_PRINTF
13373 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13374 #else
13375 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13376 #endif
13377 #if     GCC_SCANF
13378 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13379 #else
13380 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13381 #endif
13382 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13383 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13384 extern void foo(void) GCC_NORETURN;
13385 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13386 EOF
13387         cf_printf_attribute=no
13388         cf_scanf_attribute=no
13389         for cf_attribute in scanf printf unused noreturn
13390         do
13391
13392 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13393
13394                 cf_directive="__attribute__(($cf_attribute))"
13395                 echo "checking for $CC $cf_directive" 1>&5
13396
13397                 case $cf_attribute in
13398                 (printf)
13399                         cf_printf_attribute=yes
13400                         cat >conftest.h <<EOF
13401 #define GCC_$cf_ATTRIBUTE 1
13402 EOF
13403                         ;;
13404                 (scanf)
13405                         cf_scanf_attribute=yes
13406                         cat >conftest.h <<EOF
13407 #define GCC_$cf_ATTRIBUTE 1
13408 EOF
13409                         ;;
13410                 (*)
13411                         cat >conftest.h <<EOF
13412 #define GCC_$cf_ATTRIBUTE $cf_directive
13413 EOF
13414                         ;;
13415                 esac
13416
13417                 if { (eval echo "$as_me:13417: \"$ac_compile\"") >&5
13418   (eval $ac_compile) 2>&5
13419   ac_status=$?
13420   echo "$as_me:13420: \$? = $ac_status" >&5
13421   (exit $ac_status); }; then
13422                         test -n "$verbose" && echo "$as_me:13422: result: ... $cf_attribute" >&5
13423 echo "${ECHO_T}... $cf_attribute" >&6
13424                         cat conftest.h >>confdefs.h
13425                         case $cf_attribute in
13426                         (noreturn)
13427
13428 cat >>confdefs.h <<EOF
13429 #define GCC_NORETURN $cf_directive
13430 EOF
13431
13432                                 ;;
13433                         (printf)
13434                                 cf_value='/* nothing */'
13435                                 if test "$cf_printf_attribute" != no ; then
13436                                         cf_value='__attribute__((format(printf,fmt,var)))'
13437
13438 cat >>confdefs.h <<\EOF
13439 #define GCC_PRINTF 1
13440 EOF
13441
13442                                 fi
13443
13444 cat >>confdefs.h <<EOF
13445 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13446 EOF
13447
13448                                 ;;
13449                         (scanf)
13450                                 cf_value='/* nothing */'
13451                                 if test "$cf_scanf_attribute" != no ; then
13452                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13453
13454 cat >>confdefs.h <<\EOF
13455 #define GCC_SCANF 1
13456 EOF
13457
13458                                 fi
13459
13460 cat >>confdefs.h <<EOF
13461 #define GCC_SCANFLIKE(fmt,var) $cf_value
13462 EOF
13463
13464                                 ;;
13465                         (unused)
13466
13467 cat >>confdefs.h <<EOF
13468 #define GCC_UNUSED $cf_directive
13469 EOF
13470
13471                                 ;;
13472                         esac
13473                 fi
13474         done
13475 else
13476         fgrep define conftest.i >>confdefs.h
13477 fi
13478 rm -rf conftest*
13479 fi
13480
13481 echo "$as_me:13481: checking if you want to work around bogus compiler/loader warnings" >&5
13482 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13483
13484 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13485 if test "${enable_string_hacks+set}" = set; then
13486   enableval="$enable_string_hacks"
13487   with_string_hacks=$enableval
13488 else
13489   with_string_hacks=no
13490 fi;
13491 echo "$as_me:13491: result: $with_string_hacks" >&5
13492 echo "${ECHO_T}$with_string_hacks" >&6
13493
13494 if test "x$with_string_hacks" = "xyes"; then
13495
13496 cat >>confdefs.h <<\EOF
13497 #define USE_STRING_HACKS 1
13498 EOF
13499
13500         { echo "$as_me:13500: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13501 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13502
13503 for ac_func in strlcat strlcpy snprintf
13504 do
13505 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13506 echo "$as_me:13506: checking for $ac_func" >&5
13507 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13508 if eval "test \"\${$as_ac_var+set}\" = set"; then
13509   echo $ECHO_N "(cached) $ECHO_C" >&6
13510 else
13511   cat >conftest.$ac_ext <<_ACEOF
13512 #line 13512 "configure"
13513 #include "confdefs.h"
13514 /* System header to define __stub macros and hopefully few prototypes,
13515     which can conflict with char $ac_func (); below.  */
13516 #include <assert.h>
13517 /* Override any gcc2 internal prototype to avoid an error.  */
13518 #ifdef __cplusplus
13519 extern "C"
13520 #endif
13521 /* We use char because int might match the return type of a gcc2
13522    builtin and then its argument prototype would still apply.  */
13523 char $ac_func ();
13524 char (*f) ();
13525
13526 int
13527 main ()
13528 {
13529 /* The GNU C library defines this for functions which it implements
13530     to always fail with ENOSYS.  Some functions are actually named
13531     something starting with __ and the normal name is an alias.  */
13532 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13533 choke me
13534 #else
13535 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13536 #endif
13537
13538   ;
13539   return 0;
13540 }
13541 _ACEOF
13542 rm -f conftest.$ac_objext conftest$ac_exeext
13543 if { (eval echo "$as_me:13543: \"$ac_link\"") >&5
13544   (eval $ac_link) 2>&5
13545   ac_status=$?
13546   echo "$as_me:13546: \$? = $ac_status" >&5
13547   (exit $ac_status); } &&
13548          { ac_try='test -s conftest$ac_exeext'
13549   { (eval echo "$as_me:13549: \"$ac_try\"") >&5
13550   (eval $ac_try) 2>&5
13551   ac_status=$?
13552   echo "$as_me:13552: \$? = $ac_status" >&5
13553   (exit $ac_status); }; }; then
13554   eval "$as_ac_var=yes"
13555 else
13556   echo "$as_me: failed program was:" >&5
13557 cat conftest.$ac_ext >&5
13558 eval "$as_ac_var=no"
13559 fi
13560 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13561 fi
13562 echo "$as_me:13562: result: `eval echo '${'$as_ac_var'}'`" >&5
13563 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13564 if test `eval echo '${'$as_ac_var'}'` = yes; then
13565   cat >>confdefs.h <<EOF
13566 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13567 EOF
13568
13569 fi
13570 done
13571
13572 fi
13573
13574 ###     use option --enable-assertions to turn on generation of assertion code
13575 echo "$as_me:13575: checking if you want to enable runtime assertions" >&5
13576 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13577
13578 # Check whether --enable-assertions or --disable-assertions was given.
13579 if test "${enable_assertions+set}" = set; then
13580   enableval="$enable_assertions"
13581   with_assertions=$enableval
13582 else
13583   with_assertions=no
13584 fi;
13585 echo "$as_me:13585: result: $with_assertions" >&5
13586 echo "${ECHO_T}$with_assertions" >&6
13587 if test -n "$GCC"
13588 then
13589         if test "$with_assertions" = no
13590         then
13591                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13592         else
13593
13594         ADAFLAGS="$ADAFLAGS -gnata"
13595
13596         fi
13597 fi
13598
13599 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13600
13601 echo "$as_me:13601: checking if you want to use dmalloc for testing" >&5
13602 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13603
13604 # Check whether --with-dmalloc or --without-dmalloc was given.
13605 if test "${with_dmalloc+set}" = set; then
13606   withval="$with_dmalloc"
13607
13608 cat >>confdefs.h <<EOF
13609 #define USE_DMALLOC 1
13610 EOF
13611
13612         : ${with_cflags:=-g}
13613         : ${with_no_leaks:=yes}
13614          with_dmalloc=yes
13615 else
13616   with_dmalloc=
13617 fi;
13618 echo "$as_me:13618: result: ${with_dmalloc:-no}" >&5
13619 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13620
13621 case .$with_cflags in
13622 (.*-g*)
13623         case .$CFLAGS in
13624         (.*-g*)
13625                 ;;
13626         (*)
13627
13628 cf_fix_cppflags=no
13629 cf_new_cflags=
13630 cf_new_cppflags=
13631 cf_new_extra_cppflags=
13632
13633 for cf_add_cflags in -g
13634 do
13635 case $cf_fix_cppflags in
13636 (no)
13637         case $cf_add_cflags in
13638         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13639                 case $cf_add_cflags in
13640                 (-D*)
13641                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13642
13643                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13644                                 && test -z "${cf_tst_cflags}" \
13645                                 && cf_fix_cppflags=yes
13646
13647                         if test $cf_fix_cppflags = yes ; then
13648                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13649                                 continue
13650                         elif test "${cf_tst_cflags}" = "\"'" ; then
13651                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13652                                 continue
13653                         fi
13654                         ;;
13655                 esac
13656                 case "$CPPFLAGS" in
13657                 (*$cf_add_cflags)
13658                         ;;
13659                 (*)
13660                         case $cf_add_cflags in
13661                         (-D*)
13662                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13663
13664 CPPFLAGS=`echo "$CPPFLAGS" | \
13665         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13666                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13667
13668                                 ;;
13669                         esac
13670                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13671                         ;;
13672                 esac
13673                 ;;
13674         (*)
13675                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13676                 ;;
13677         esac
13678         ;;
13679 (yes)
13680         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13681
13682         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13683
13684         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13685                 && test -z "${cf_tst_cflags}" \
13686                 && cf_fix_cppflags=no
13687         ;;
13688 esac
13689 done
13690
13691 if test -n "$cf_new_cflags" ; then
13692
13693         CFLAGS="$CFLAGS $cf_new_cflags"
13694 fi
13695
13696 if test -n "$cf_new_cppflags" ; then
13697
13698         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13699 fi
13700
13701 if test -n "$cf_new_extra_cppflags" ; then
13702
13703         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13704 fi
13705
13706                 ;;
13707         esac
13708         ;;
13709 esac
13710
13711 if test "$with_dmalloc" = yes ; then
13712         echo "$as_me:13712: checking for dmalloc.h" >&5
13713 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13714 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13715   echo $ECHO_N "(cached) $ECHO_C" >&6
13716 else
13717   cat >conftest.$ac_ext <<_ACEOF
13718 #line 13718 "configure"
13719 #include "confdefs.h"
13720 #include <dmalloc.h>
13721 _ACEOF
13722 if { (eval echo "$as_me:13722: \"$ac_cpp conftest.$ac_ext\"") >&5
13723   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13724   ac_status=$?
13725   egrep -v '^ *\+' conftest.er1 >conftest.err
13726   rm -f conftest.er1
13727   cat conftest.err >&5
13728   echo "$as_me:13728: \$? = $ac_status" >&5
13729   (exit $ac_status); } >/dev/null; then
13730   if test -s conftest.err; then
13731     ac_cpp_err=$ac_c_preproc_warn_flag
13732   else
13733     ac_cpp_err=
13734   fi
13735 else
13736   ac_cpp_err=yes
13737 fi
13738 if test -z "$ac_cpp_err"; then
13739   ac_cv_header_dmalloc_h=yes
13740 else
13741   echo "$as_me: failed program was:" >&5
13742   cat conftest.$ac_ext >&5
13743   ac_cv_header_dmalloc_h=no
13744 fi
13745 rm -f conftest.err conftest.$ac_ext
13746 fi
13747 echo "$as_me:13747: result: $ac_cv_header_dmalloc_h" >&5
13748 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13749 if test $ac_cv_header_dmalloc_h = yes; then
13750
13751 echo "$as_me:13751: checking for dmalloc_debug in -ldmalloc" >&5
13752 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13753 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13754   echo $ECHO_N "(cached) $ECHO_C" >&6
13755 else
13756   ac_check_lib_save_LIBS=$LIBS
13757 LIBS="-ldmalloc  $LIBS"
13758 cat >conftest.$ac_ext <<_ACEOF
13759 #line 13759 "configure"
13760 #include "confdefs.h"
13761
13762 /* Override any gcc2 internal prototype to avoid an error.  */
13763 #ifdef __cplusplus
13764 extern "C"
13765 #endif
13766 /* We use char because int might match the return type of a gcc2
13767    builtin and then its argument prototype would still apply.  */
13768 char dmalloc_debug ();
13769 int
13770 main ()
13771 {
13772 dmalloc_debug ();
13773   ;
13774   return 0;
13775 }
13776 _ACEOF
13777 rm -f conftest.$ac_objext conftest$ac_exeext
13778 if { (eval echo "$as_me:13778: \"$ac_link\"") >&5
13779   (eval $ac_link) 2>&5
13780   ac_status=$?
13781   echo "$as_me:13781: \$? = $ac_status" >&5
13782   (exit $ac_status); } &&
13783          { ac_try='test -s conftest$ac_exeext'
13784   { (eval echo "$as_me:13784: \"$ac_try\"") >&5
13785   (eval $ac_try) 2>&5
13786   ac_status=$?
13787   echo "$as_me:13787: \$? = $ac_status" >&5
13788   (exit $ac_status); }; }; then
13789   ac_cv_lib_dmalloc_dmalloc_debug=yes
13790 else
13791   echo "$as_me: failed program was:" >&5
13792 cat conftest.$ac_ext >&5
13793 ac_cv_lib_dmalloc_dmalloc_debug=no
13794 fi
13795 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13796 LIBS=$ac_check_lib_save_LIBS
13797 fi
13798 echo "$as_me:13798: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13799 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13800 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13801   cat >>confdefs.h <<EOF
13802 #define HAVE_LIBDMALLOC 1
13803 EOF
13804
13805   LIBS="-ldmalloc $LIBS"
13806
13807 fi
13808
13809 fi
13810
13811 fi
13812
13813 echo "$as_me:13813: checking if you want to use dbmalloc for testing" >&5
13814 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13815
13816 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13817 if test "${with_dbmalloc+set}" = set; then
13818   withval="$with_dbmalloc"
13819
13820 cat >>confdefs.h <<EOF
13821 #define USE_DBMALLOC 1
13822 EOF
13823
13824         : ${with_cflags:=-g}
13825         : ${with_no_leaks:=yes}
13826          with_dbmalloc=yes
13827 else
13828   with_dbmalloc=
13829 fi;
13830 echo "$as_me:13830: result: ${with_dbmalloc:-no}" >&5
13831 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13832
13833 case .$with_cflags in
13834 (.*-g*)
13835         case .$CFLAGS in
13836         (.*-g*)
13837                 ;;
13838         (*)
13839
13840 cf_fix_cppflags=no
13841 cf_new_cflags=
13842 cf_new_cppflags=
13843 cf_new_extra_cppflags=
13844
13845 for cf_add_cflags in -g
13846 do
13847 case $cf_fix_cppflags in
13848 (no)
13849         case $cf_add_cflags in
13850         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13851                 case $cf_add_cflags in
13852                 (-D*)
13853                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13854
13855                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13856                                 && test -z "${cf_tst_cflags}" \
13857                                 && cf_fix_cppflags=yes
13858
13859                         if test $cf_fix_cppflags = yes ; then
13860                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13861                                 continue
13862                         elif test "${cf_tst_cflags}" = "\"'" ; then
13863                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13864                                 continue
13865                         fi
13866                         ;;
13867                 esac
13868                 case "$CPPFLAGS" in
13869                 (*$cf_add_cflags)
13870                         ;;
13871                 (*)
13872                         case $cf_add_cflags in
13873                         (-D*)
13874                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13875
13876 CPPFLAGS=`echo "$CPPFLAGS" | \
13877         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13878                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13879
13880                                 ;;
13881                         esac
13882                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13883                         ;;
13884                 esac
13885                 ;;
13886         (*)
13887                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13888                 ;;
13889         esac
13890         ;;
13891 (yes)
13892         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13893
13894         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13895
13896         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13897                 && test -z "${cf_tst_cflags}" \
13898                 && cf_fix_cppflags=no
13899         ;;
13900 esac
13901 done
13902
13903 if test -n "$cf_new_cflags" ; then
13904
13905         CFLAGS="$CFLAGS $cf_new_cflags"
13906 fi
13907
13908 if test -n "$cf_new_cppflags" ; then
13909
13910         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13911 fi
13912
13913 if test -n "$cf_new_extra_cppflags" ; then
13914
13915         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13916 fi
13917
13918                 ;;
13919         esac
13920         ;;
13921 esac
13922
13923 if test "$with_dbmalloc" = yes ; then
13924         echo "$as_me:13924: checking for dbmalloc.h" >&5
13925 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13926 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13927   echo $ECHO_N "(cached) $ECHO_C" >&6
13928 else
13929   cat >conftest.$ac_ext <<_ACEOF
13930 #line 13930 "configure"
13931 #include "confdefs.h"
13932 #include <dbmalloc.h>
13933 _ACEOF
13934 if { (eval echo "$as_me:13934: \"$ac_cpp conftest.$ac_ext\"") >&5
13935   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13936   ac_status=$?
13937   egrep -v '^ *\+' conftest.er1 >conftest.err
13938   rm -f conftest.er1
13939   cat conftest.err >&5
13940   echo "$as_me:13940: \$? = $ac_status" >&5
13941   (exit $ac_status); } >/dev/null; then
13942   if test -s conftest.err; then
13943     ac_cpp_err=$ac_c_preproc_warn_flag
13944   else
13945     ac_cpp_err=
13946   fi
13947 else
13948   ac_cpp_err=yes
13949 fi
13950 if test -z "$ac_cpp_err"; then
13951   ac_cv_header_dbmalloc_h=yes
13952 else
13953   echo "$as_me: failed program was:" >&5
13954   cat conftest.$ac_ext >&5
13955   ac_cv_header_dbmalloc_h=no
13956 fi
13957 rm -f conftest.err conftest.$ac_ext
13958 fi
13959 echo "$as_me:13959: result: $ac_cv_header_dbmalloc_h" >&5
13960 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13961 if test $ac_cv_header_dbmalloc_h = yes; then
13962
13963 echo "$as_me:13963: checking for debug_malloc in -ldbmalloc" >&5
13964 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13965 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13966   echo $ECHO_N "(cached) $ECHO_C" >&6
13967 else
13968   ac_check_lib_save_LIBS=$LIBS
13969 LIBS="-ldbmalloc  $LIBS"
13970 cat >conftest.$ac_ext <<_ACEOF
13971 #line 13971 "configure"
13972 #include "confdefs.h"
13973
13974 /* Override any gcc2 internal prototype to avoid an error.  */
13975 #ifdef __cplusplus
13976 extern "C"
13977 #endif
13978 /* We use char because int might match the return type of a gcc2
13979    builtin and then its argument prototype would still apply.  */
13980 char debug_malloc ();
13981 int
13982 main ()
13983 {
13984 debug_malloc ();
13985   ;
13986   return 0;
13987 }
13988 _ACEOF
13989 rm -f conftest.$ac_objext conftest$ac_exeext
13990 if { (eval echo "$as_me:13990: \"$ac_link\"") >&5
13991   (eval $ac_link) 2>&5
13992   ac_status=$?
13993   echo "$as_me:13993: \$? = $ac_status" >&5
13994   (exit $ac_status); } &&
13995          { ac_try='test -s conftest$ac_exeext'
13996   { (eval echo "$as_me:13996: \"$ac_try\"") >&5
13997   (eval $ac_try) 2>&5
13998   ac_status=$?
13999   echo "$as_me:13999: \$? = $ac_status" >&5
14000   (exit $ac_status); }; }; then
14001   ac_cv_lib_dbmalloc_debug_malloc=yes
14002 else
14003   echo "$as_me: failed program was:" >&5
14004 cat conftest.$ac_ext >&5
14005 ac_cv_lib_dbmalloc_debug_malloc=no
14006 fi
14007 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14008 LIBS=$ac_check_lib_save_LIBS
14009 fi
14010 echo "$as_me:14010: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14011 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14012 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14013   cat >>confdefs.h <<EOF
14014 #define HAVE_LIBDBMALLOC 1
14015 EOF
14016
14017   LIBS="-ldbmalloc $LIBS"
14018
14019 fi
14020
14021 fi
14022
14023 fi
14024
14025 echo "$as_me:14025: checking if you want to use valgrind for testing" >&5
14026 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14027
14028 # Check whether --with-valgrind or --without-valgrind was given.
14029 if test "${with_valgrind+set}" = set; then
14030   withval="$with_valgrind"
14031
14032 cat >>confdefs.h <<EOF
14033 #define USE_VALGRIND 1
14034 EOF
14035
14036         : ${with_cflags:=-g}
14037         : ${with_no_leaks:=yes}
14038          with_valgrind=yes
14039 else
14040   with_valgrind=
14041 fi;
14042 echo "$as_me:14042: result: ${with_valgrind:-no}" >&5
14043 echo "${ECHO_T}${with_valgrind:-no}" >&6
14044
14045 case .$with_cflags in
14046 (.*-g*)
14047         case .$CFLAGS in
14048         (.*-g*)
14049                 ;;
14050         (*)
14051
14052 cf_fix_cppflags=no
14053 cf_new_cflags=
14054 cf_new_cppflags=
14055 cf_new_extra_cppflags=
14056
14057 for cf_add_cflags in -g
14058 do
14059 case $cf_fix_cppflags in
14060 (no)
14061         case $cf_add_cflags in
14062         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14063                 case $cf_add_cflags in
14064                 (-D*)
14065                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14066
14067                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14068                                 && test -z "${cf_tst_cflags}" \
14069                                 && cf_fix_cppflags=yes
14070
14071                         if test $cf_fix_cppflags = yes ; then
14072                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14073                                 continue
14074                         elif test "${cf_tst_cflags}" = "\"'" ; then
14075                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14076                                 continue
14077                         fi
14078                         ;;
14079                 esac
14080                 case "$CPPFLAGS" in
14081                 (*$cf_add_cflags)
14082                         ;;
14083                 (*)
14084                         case $cf_add_cflags in
14085                         (-D*)
14086                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14087
14088 CPPFLAGS=`echo "$CPPFLAGS" | \
14089         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14090                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14091
14092                                 ;;
14093                         esac
14094                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14095                         ;;
14096                 esac
14097                 ;;
14098         (*)
14099                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14100                 ;;
14101         esac
14102         ;;
14103 (yes)
14104         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14105
14106         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14107
14108         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14109                 && test -z "${cf_tst_cflags}" \
14110                 && cf_fix_cppflags=no
14111         ;;
14112 esac
14113 done
14114
14115 if test -n "$cf_new_cflags" ; then
14116
14117         CFLAGS="$CFLAGS $cf_new_cflags"
14118 fi
14119
14120 if test -n "$cf_new_cppflags" ; then
14121
14122         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14123 fi
14124
14125 if test -n "$cf_new_extra_cppflags" ; then
14126
14127         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14128 fi
14129
14130                 ;;
14131         esac
14132         ;;
14133 esac
14134
14135 echo "$as_me:14135: checking if you want to perform memory-leak testing" >&5
14136 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14137
14138 # Check whether --enable-leaks or --disable-leaks was given.
14139 if test "${enable_leaks+set}" = set; then
14140   enableval="$enable_leaks"
14141   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14142 else
14143   : ${with_no_leaks:=no}
14144 fi;
14145 echo "$as_me:14145: result: $with_no_leaks" >&5
14146 echo "${ECHO_T}$with_no_leaks" >&6
14147
14148 if test "$with_no_leaks" = yes ; then
14149
14150 cat >>confdefs.h <<\EOF
14151 #define NO_LEAKS 1
14152 EOF
14153
14154 cat >>confdefs.h <<\EOF
14155 #define YY_NO_LEAKS 1
14156 EOF
14157
14158 fi
14159
14160 cat >>confdefs.h <<\EOF
14161 #define HAVE_NC_ALLOC_H 1
14162 EOF
14163
14164 ###     use option --enable-expanded to generate certain macros as functions
14165
14166 # Check whether --enable-expanded or --disable-expanded was given.
14167 if test "${enable_expanded+set}" = set; then
14168   enableval="$enable_expanded"
14169   test "x$enableval" = xyes &&
14170 cat >>confdefs.h <<\EOF
14171 #define NCURSES_EXPANDED 1
14172 EOF
14173
14174 fi;
14175
14176 ###     use option --disable-macros to suppress macros in favor of functions
14177
14178 # Check whether --enable-macros or --disable-macros was given.
14179 if test "${enable_macros+set}" = set; then
14180   enableval="$enable_macros"
14181   test "$enableval" = no &&
14182 cat >>confdefs.h <<\EOF
14183 #define NCURSES_NOMACROS 1
14184 EOF
14185
14186 fi;
14187
14188 # Normally we only add trace() to the debug-library.  Allow this to be
14189 # extended to all models of the ncurses library:
14190 cf_all_traces=no
14191 case "$CFLAGS $CPPFLAGS" in
14192 (*-DTRACE*)
14193         cf_all_traces=yes
14194         ;;
14195 esac
14196
14197 echo "$as_me:14197: checking whether to add trace feature to all models" >&5
14198 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14199
14200 # Check whether --with-trace or --without-trace was given.
14201 if test "${with_trace+set}" = set; then
14202   withval="$with_trace"
14203   cf_with_trace=$withval
14204 else
14205   cf_with_trace=$cf_all_traces
14206 fi;
14207 echo "$as_me:14207: result: $cf_with_trace" >&5
14208 echo "${ECHO_T}$cf_with_trace" >&6
14209
14210 if test "x$cf_with_trace" = xyes ; then
14211         LIB_TRACING=all
14212         ADA_TRACE=TRUE
14213
14214 cf_fix_cppflags=no
14215 cf_new_cflags=
14216 cf_new_cppflags=
14217 cf_new_extra_cppflags=
14218
14219 for cf_add_cflags in -DTRACE
14220 do
14221 case $cf_fix_cppflags in
14222 (no)
14223         case $cf_add_cflags in
14224         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14225                 case $cf_add_cflags in
14226                 (-D*)
14227                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14228
14229                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14230                                 && test -z "${cf_tst_cflags}" \
14231                                 && cf_fix_cppflags=yes
14232
14233                         if test $cf_fix_cppflags = yes ; then
14234                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14235                                 continue
14236                         elif test "${cf_tst_cflags}" = "\"'" ; then
14237                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14238                                 continue
14239                         fi
14240                         ;;
14241                 esac
14242                 case "$CPPFLAGS" in
14243                 (*$cf_add_cflags)
14244                         ;;
14245                 (*)
14246                         case $cf_add_cflags in
14247                         (-D*)
14248                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14249
14250 CPPFLAGS=`echo "$CPPFLAGS" | \
14251         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14252                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14253
14254                                 ;;
14255                         esac
14256                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14257                         ;;
14258                 esac
14259                 ;;
14260         (*)
14261                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14262                 ;;
14263         esac
14264         ;;
14265 (yes)
14266         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14267
14268         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14269
14270         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14271                 && test -z "${cf_tst_cflags}" \
14272                 && cf_fix_cppflags=no
14273         ;;
14274 esac
14275 done
14276
14277 if test -n "$cf_new_cflags" ; then
14278
14279         CFLAGS="$CFLAGS $cf_new_cflags"
14280 fi
14281
14282 if test -n "$cf_new_cppflags" ; then
14283
14284         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14285 fi
14286
14287 if test -n "$cf_new_extra_cppflags" ; then
14288
14289         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14290 fi
14291
14292 else
14293         LIB_TRACING=DEBUG
14294         ADA_TRACE=FALSE
14295 fi
14296
14297 echo "$as_me:14297: checking if we want to use GNAT projects" >&5
14298 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14299
14300 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14301 if test "${enable_gnat_projects+set}" = set; then
14302   enableval="$enable_gnat_projects"
14303   test "$enableval" != no && enableval=yes
14304   if test "$enableval" != "yes" ; then
14305     enable_gnat_projects=no
14306   else
14307     enable_gnat_projects=yes
14308   fi
14309 else
14310   enableval=yes
14311   enable_gnat_projects=yes
14312
14313 fi;
14314 echo "$as_me:14314: result: $enable_gnat_projects" >&5
14315 echo "${ECHO_T}$enable_gnat_projects" >&6
14316
14317 ###     Checks for libraries.
14318 case $cf_cv_system_name in
14319 (*mingw32*|*mingw64*)
14320         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
14321         LIBS=" -lpsapi $LIBS"
14322         ;;
14323 (*)
14324 echo "$as_me:14324: checking for gettimeofday" >&5
14325 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14326 if test "${ac_cv_func_gettimeofday+set}" = set; then
14327   echo $ECHO_N "(cached) $ECHO_C" >&6
14328 else
14329   cat >conftest.$ac_ext <<_ACEOF
14330 #line 14330 "configure"
14331 #include "confdefs.h"
14332 /* System header to define __stub macros and hopefully few prototypes,
14333     which can conflict with char gettimeofday (); below.  */
14334 #include <assert.h>
14335 /* Override any gcc2 internal prototype to avoid an error.  */
14336 #ifdef __cplusplus
14337 extern "C"
14338 #endif
14339 /* We use char because int might match the return type of a gcc2
14340    builtin and then its argument prototype would still apply.  */
14341 char gettimeofday ();
14342 char (*f) ();
14343
14344 int
14345 main ()
14346 {
14347 /* The GNU C library defines this for functions which it implements
14348     to always fail with ENOSYS.  Some functions are actually named
14349     something starting with __ and the normal name is an alias.  */
14350 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14351 choke me
14352 #else
14353 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14354 #endif
14355
14356   ;
14357   return 0;
14358 }
14359 _ACEOF
14360 rm -f conftest.$ac_objext conftest$ac_exeext
14361 if { (eval echo "$as_me:14361: \"$ac_link\"") >&5
14362   (eval $ac_link) 2>&5
14363   ac_status=$?
14364   echo "$as_me:14364: \$? = $ac_status" >&5
14365   (exit $ac_status); } &&
14366          { ac_try='test -s conftest$ac_exeext'
14367   { (eval echo "$as_me:14367: \"$ac_try\"") >&5
14368   (eval $ac_try) 2>&5
14369   ac_status=$?
14370   echo "$as_me:14370: \$? = $ac_status" >&5
14371   (exit $ac_status); }; }; then
14372   ac_cv_func_gettimeofday=yes
14373 else
14374   echo "$as_me: failed program was:" >&5
14375 cat conftest.$ac_ext >&5
14376 ac_cv_func_gettimeofday=no
14377 fi
14378 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14379 fi
14380 echo "$as_me:14380: result: $ac_cv_func_gettimeofday" >&5
14381 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14382 if test $ac_cv_func_gettimeofday = yes; then
14383
14384 cat >>confdefs.h <<\EOF
14385 #define HAVE_GETTIMEOFDAY 1
14386 EOF
14387
14388 else
14389
14390 echo "$as_me:14390: checking for gettimeofday in -lbsd" >&5
14391 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14392 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14393   echo $ECHO_N "(cached) $ECHO_C" >&6
14394 else
14395   ac_check_lib_save_LIBS=$LIBS
14396 LIBS="-lbsd  $LIBS"
14397 cat >conftest.$ac_ext <<_ACEOF
14398 #line 14398 "configure"
14399 #include "confdefs.h"
14400
14401 /* Override any gcc2 internal prototype to avoid an error.  */
14402 #ifdef __cplusplus
14403 extern "C"
14404 #endif
14405 /* We use char because int might match the return type of a gcc2
14406    builtin and then its argument prototype would still apply.  */
14407 char gettimeofday ();
14408 int
14409 main ()
14410 {
14411 gettimeofday ();
14412   ;
14413   return 0;
14414 }
14415 _ACEOF
14416 rm -f conftest.$ac_objext conftest$ac_exeext
14417 if { (eval echo "$as_me:14417: \"$ac_link\"") >&5
14418   (eval $ac_link) 2>&5
14419   ac_status=$?
14420   echo "$as_me:14420: \$? = $ac_status" >&5
14421   (exit $ac_status); } &&
14422          { ac_try='test -s conftest$ac_exeext'
14423   { (eval echo "$as_me:14423: \"$ac_try\"") >&5
14424   (eval $ac_try) 2>&5
14425   ac_status=$?
14426   echo "$as_me:14426: \$? = $ac_status" >&5
14427   (exit $ac_status); }; }; then
14428   ac_cv_lib_bsd_gettimeofday=yes
14429 else
14430   echo "$as_me: failed program was:" >&5
14431 cat conftest.$ac_ext >&5
14432 ac_cv_lib_bsd_gettimeofday=no
14433 fi
14434 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14435 LIBS=$ac_check_lib_save_LIBS
14436 fi
14437 echo "$as_me:14437: result: $ac_cv_lib_bsd_gettimeofday" >&5
14438 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14439 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14440
14441 cat >>confdefs.h <<\EOF
14442 #define HAVE_GETTIMEOFDAY 1
14443 EOF
14444
14445 cf_add_libs="-lbsd"
14446 # Filter out duplicates - this happens with badly-designed ".pc" files...
14447 for cf_add_1lib in $LIBS
14448 do
14449         for cf_add_2lib in $cf_add_libs
14450         do
14451                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14452                 then
14453                         cf_add_1lib=
14454                         break
14455                 fi
14456         done
14457         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14458 done
14459 LIBS="$cf_add_libs"
14460
14461 fi
14462
14463 fi
14464         ;;
14465 esac
14466
14467 echo "$as_me:14467: checking if -lm needed for math functions" >&5
14468 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14469 if test "${cf_cv_need_libm+set}" = set; then
14470   echo $ECHO_N "(cached) $ECHO_C" >&6
14471 else
14472
14473         cat >conftest.$ac_ext <<_ACEOF
14474 #line 14474 "configure"
14475 #include "confdefs.h"
14476
14477         #include <stdio.h>
14478         #include <math.h>
14479
14480 int
14481 main ()
14482 {
14483 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14484   ;
14485   return 0;
14486 }
14487 _ACEOF
14488 rm -f conftest.$ac_objext conftest$ac_exeext
14489 if { (eval echo "$as_me:14489: \"$ac_link\"") >&5
14490   (eval $ac_link) 2>&5
14491   ac_status=$?
14492   echo "$as_me:14492: \$? = $ac_status" >&5
14493   (exit $ac_status); } &&
14494          { ac_try='test -s conftest$ac_exeext'
14495   { (eval echo "$as_me:14495: \"$ac_try\"") >&5
14496   (eval $ac_try) 2>&5
14497   ac_status=$?
14498   echo "$as_me:14498: \$? = $ac_status" >&5
14499   (exit $ac_status); }; }; then
14500   cf_cv_need_libm=no
14501 else
14502   echo "$as_me: failed program was:" >&5
14503 cat conftest.$ac_ext >&5
14504 cf_cv_need_libm=yes
14505 fi
14506 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14507 fi
14508 echo "$as_me:14508: result: $cf_cv_need_libm" >&5
14509 echo "${ECHO_T}$cf_cv_need_libm" >&6
14510 if test "$cf_cv_need_libm" = yes
14511 then
14512 MATH_LIB=-lm
14513 fi
14514
14515 ###     Checks for header files.
14516 echo "$as_me:14516: checking for ANSI C header files" >&5
14517 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14518 if test "${ac_cv_header_stdc+set}" = set; then
14519   echo $ECHO_N "(cached) $ECHO_C" >&6
14520 else
14521   cat >conftest.$ac_ext <<_ACEOF
14522 #line 14522 "configure"
14523 #include "confdefs.h"
14524 #include <stdlib.h>
14525 #include <stdarg.h>
14526 #include <string.h>
14527 #include <float.h>
14528
14529 _ACEOF
14530 if { (eval echo "$as_me:14530: \"$ac_cpp conftest.$ac_ext\"") >&5
14531   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14532   ac_status=$?
14533   egrep -v '^ *\+' conftest.er1 >conftest.err
14534   rm -f conftest.er1
14535   cat conftest.err >&5
14536   echo "$as_me:14536: \$? = $ac_status" >&5
14537   (exit $ac_status); } >/dev/null; then
14538   if test -s conftest.err; then
14539     ac_cpp_err=$ac_c_preproc_warn_flag
14540   else
14541     ac_cpp_err=
14542   fi
14543 else
14544   ac_cpp_err=yes
14545 fi
14546 if test -z "$ac_cpp_err"; then
14547   ac_cv_header_stdc=yes
14548 else
14549   echo "$as_me: failed program was:" >&5
14550   cat conftest.$ac_ext >&5
14551   ac_cv_header_stdc=no
14552 fi
14553 rm -f conftest.err conftest.$ac_ext
14554
14555 if test $ac_cv_header_stdc = yes; then
14556   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14557   cat >conftest.$ac_ext <<_ACEOF
14558 #line 14558 "configure"
14559 #include "confdefs.h"
14560 #include <string.h>
14561
14562 _ACEOF
14563 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14564   egrep "memchr" >/dev/null 2>&1; then
14565   :
14566 else
14567   ac_cv_header_stdc=no
14568 fi
14569 rm -rf conftest*
14570
14571 fi
14572
14573 if test $ac_cv_header_stdc = yes; then
14574   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14575   cat >conftest.$ac_ext <<_ACEOF
14576 #line 14576 "configure"
14577 #include "confdefs.h"
14578 #include <stdlib.h>
14579
14580 _ACEOF
14581 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14582   egrep "free" >/dev/null 2>&1; then
14583   :
14584 else
14585   ac_cv_header_stdc=no
14586 fi
14587 rm -rf conftest*
14588
14589 fi
14590
14591 if test $ac_cv_header_stdc = yes; then
14592   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14593   if test "$cross_compiling" = yes; then
14594   :
14595 else
14596   cat >conftest.$ac_ext <<_ACEOF
14597 #line 14597 "configure"
14598 #include "confdefs.h"
14599 #include <ctype.h>
14600 #if ((' ' & 0x0FF) == 0x020)
14601 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14602 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14603 #else
14604 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14605                      || ('j' <= (c) && (c) <= 'r') \
14606                      || ('s' <= (c) && (c) <= 'z'))
14607 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14608 #endif
14609
14610 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14611 int
14612 main ()
14613 {
14614   int i;
14615   for (i = 0; i < 256; i++)
14616     if (XOR (islower (i), ISLOWER (i))
14617         || toupper (i) != TOUPPER (i))
14618       $ac_main_return(2);
14619   $ac_main_return (0);
14620 }
14621 _ACEOF
14622 rm -f conftest$ac_exeext
14623 if { (eval echo "$as_me:14623: \"$ac_link\"") >&5
14624   (eval $ac_link) 2>&5
14625   ac_status=$?
14626   echo "$as_me:14626: \$? = $ac_status" >&5
14627   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14628   { (eval echo "$as_me:14628: \"$ac_try\"") >&5
14629   (eval $ac_try) 2>&5
14630   ac_status=$?
14631   echo "$as_me:14631: \$? = $ac_status" >&5
14632   (exit $ac_status); }; }; then
14633   :
14634 else
14635   echo "$as_me: program exited with status $ac_status" >&5
14636 echo "$as_me: failed program was:" >&5
14637 cat conftest.$ac_ext >&5
14638 ac_cv_header_stdc=no
14639 fi
14640 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14641 fi
14642 fi
14643 fi
14644 echo "$as_me:14644: result: $ac_cv_header_stdc" >&5
14645 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14646 if test $ac_cv_header_stdc = yes; then
14647
14648 cat >>confdefs.h <<\EOF
14649 #define STDC_HEADERS 1
14650 EOF
14651
14652 fi
14653
14654 ac_header_dirent=no
14655 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14656   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14657 echo "$as_me:14657: checking for $ac_hdr that defines DIR" >&5
14658 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14659 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14660   echo $ECHO_N "(cached) $ECHO_C" >&6
14661 else
14662   cat >conftest.$ac_ext <<_ACEOF
14663 #line 14663 "configure"
14664 #include "confdefs.h"
14665 #include <sys/types.h>
14666 #include <$ac_hdr>
14667
14668 int
14669 main ()
14670 {
14671 if ((DIR *) 0)
14672 return 0;
14673   ;
14674   return 0;
14675 }
14676 _ACEOF
14677 rm -f conftest.$ac_objext
14678 if { (eval echo "$as_me:14678: \"$ac_compile\"") >&5
14679   (eval $ac_compile) 2>&5
14680   ac_status=$?
14681   echo "$as_me:14681: \$? = $ac_status" >&5
14682   (exit $ac_status); } &&
14683          { ac_try='test -s conftest.$ac_objext'
14684   { (eval echo "$as_me:14684: \"$ac_try\"") >&5
14685   (eval $ac_try) 2>&5
14686   ac_status=$?
14687   echo "$as_me:14687: \$? = $ac_status" >&5
14688   (exit $ac_status); }; }; then
14689   eval "$as_ac_Header=yes"
14690 else
14691   echo "$as_me: failed program was:" >&5
14692 cat conftest.$ac_ext >&5
14693 eval "$as_ac_Header=no"
14694 fi
14695 rm -f conftest.$ac_objext conftest.$ac_ext
14696 fi
14697 echo "$as_me:14697: result: `eval echo '${'$as_ac_Header'}'`" >&5
14698 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14699 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14700   cat >>confdefs.h <<EOF
14701 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14702 EOF
14703
14704 ac_header_dirent=$ac_hdr; break
14705 fi
14706
14707 done
14708 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14709 if test $ac_header_dirent = dirent.h; then
14710   echo "$as_me:14710: checking for opendir in -ldir" >&5
14711 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14712 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14713   echo $ECHO_N "(cached) $ECHO_C" >&6
14714 else
14715   ac_check_lib_save_LIBS=$LIBS
14716 LIBS="-ldir  $LIBS"
14717 cat >conftest.$ac_ext <<_ACEOF
14718 #line 14718 "configure"
14719 #include "confdefs.h"
14720
14721 /* Override any gcc2 internal prototype to avoid an error.  */
14722 #ifdef __cplusplus
14723 extern "C"
14724 #endif
14725 /* We use char because int might match the return type of a gcc2
14726    builtin and then its argument prototype would still apply.  */
14727 char opendir ();
14728 int
14729 main ()
14730 {
14731 opendir ();
14732   ;
14733   return 0;
14734 }
14735 _ACEOF
14736 rm -f conftest.$ac_objext conftest$ac_exeext
14737 if { (eval echo "$as_me:14737: \"$ac_link\"") >&5
14738   (eval $ac_link) 2>&5
14739   ac_status=$?
14740   echo "$as_me:14740: \$? = $ac_status" >&5
14741   (exit $ac_status); } &&
14742          { ac_try='test -s conftest$ac_exeext'
14743   { (eval echo "$as_me:14743: \"$ac_try\"") >&5
14744   (eval $ac_try) 2>&5
14745   ac_status=$?
14746   echo "$as_me:14746: \$? = $ac_status" >&5
14747   (exit $ac_status); }; }; then
14748   ac_cv_lib_dir_opendir=yes
14749 else
14750   echo "$as_me: failed program was:" >&5
14751 cat conftest.$ac_ext >&5
14752 ac_cv_lib_dir_opendir=no
14753 fi
14754 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14755 LIBS=$ac_check_lib_save_LIBS
14756 fi
14757 echo "$as_me:14757: result: $ac_cv_lib_dir_opendir" >&5
14758 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14759 if test $ac_cv_lib_dir_opendir = yes; then
14760   LIBS="$LIBS -ldir"
14761 fi
14762
14763 else
14764   echo "$as_me:14764: checking for opendir in -lx" >&5
14765 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14766 if test "${ac_cv_lib_x_opendir+set}" = set; then
14767   echo $ECHO_N "(cached) $ECHO_C" >&6
14768 else
14769   ac_check_lib_save_LIBS=$LIBS
14770 LIBS="-lx  $LIBS"
14771 cat >conftest.$ac_ext <<_ACEOF
14772 #line 14772 "configure"
14773 #include "confdefs.h"
14774
14775 /* Override any gcc2 internal prototype to avoid an error.  */
14776 #ifdef __cplusplus
14777 extern "C"
14778 #endif
14779 /* We use char because int might match the return type of a gcc2
14780    builtin and then its argument prototype would still apply.  */
14781 char opendir ();
14782 int
14783 main ()
14784 {
14785 opendir ();
14786   ;
14787   return 0;
14788 }
14789 _ACEOF
14790 rm -f conftest.$ac_objext conftest$ac_exeext
14791 if { (eval echo "$as_me:14791: \"$ac_link\"") >&5
14792   (eval $ac_link) 2>&5
14793   ac_status=$?
14794   echo "$as_me:14794: \$? = $ac_status" >&5
14795   (exit $ac_status); } &&
14796          { ac_try='test -s conftest$ac_exeext'
14797   { (eval echo "$as_me:14797: \"$ac_try\"") >&5
14798   (eval $ac_try) 2>&5
14799   ac_status=$?
14800   echo "$as_me:14800: \$? = $ac_status" >&5
14801   (exit $ac_status); }; }; then
14802   ac_cv_lib_x_opendir=yes
14803 else
14804   echo "$as_me: failed program was:" >&5
14805 cat conftest.$ac_ext >&5
14806 ac_cv_lib_x_opendir=no
14807 fi
14808 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14809 LIBS=$ac_check_lib_save_LIBS
14810 fi
14811 echo "$as_me:14811: result: $ac_cv_lib_x_opendir" >&5
14812 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14813 if test $ac_cv_lib_x_opendir = yes; then
14814   LIBS="$LIBS -lx"
14815 fi
14816
14817 fi
14818
14819 echo "$as_me:14819: checking whether time.h and sys/time.h may both be included" >&5
14820 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14821 if test "${ac_cv_header_time+set}" = set; then
14822   echo $ECHO_N "(cached) $ECHO_C" >&6
14823 else
14824   cat >conftest.$ac_ext <<_ACEOF
14825 #line 14825 "configure"
14826 #include "confdefs.h"
14827 #include <sys/types.h>
14828 #include <sys/time.h>
14829 #include <time.h>
14830
14831 int
14832 main ()
14833 {
14834 if ((struct tm *) 0)
14835 return 0;
14836   ;
14837   return 0;
14838 }
14839 _ACEOF
14840 rm -f conftest.$ac_objext
14841 if { (eval echo "$as_me:14841: \"$ac_compile\"") >&5
14842   (eval $ac_compile) 2>&5
14843   ac_status=$?
14844   echo "$as_me:14844: \$? = $ac_status" >&5
14845   (exit $ac_status); } &&
14846          { ac_try='test -s conftest.$ac_objext'
14847   { (eval echo "$as_me:14847: \"$ac_try\"") >&5
14848   (eval $ac_try) 2>&5
14849   ac_status=$?
14850   echo "$as_me:14850: \$? = $ac_status" >&5
14851   (exit $ac_status); }; }; then
14852   ac_cv_header_time=yes
14853 else
14854   echo "$as_me: failed program was:" >&5
14855 cat conftest.$ac_ext >&5
14856 ac_cv_header_time=no
14857 fi
14858 rm -f conftest.$ac_objext conftest.$ac_ext
14859 fi
14860 echo "$as_me:14860: result: $ac_cv_header_time" >&5
14861 echo "${ECHO_T}$ac_cv_header_time" >&6
14862 if test $ac_cv_header_time = yes; then
14863
14864 cat >>confdefs.h <<\EOF
14865 #define TIME_WITH_SYS_TIME 1
14866 EOF
14867
14868 fi
14869
14870 cf_regex_func=no
14871
14872 cf_regex_libs="regex re"
14873 case $host_os in
14874 (mingw*)
14875         cf_regex_libs="gnurx $cf_regex_libs"
14876         ;;
14877 esac
14878
14879 echo "$as_me:14879: checking for regcomp" >&5
14880 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14881 if test "${ac_cv_func_regcomp+set}" = set; then
14882   echo $ECHO_N "(cached) $ECHO_C" >&6
14883 else
14884   cat >conftest.$ac_ext <<_ACEOF
14885 #line 14885 "configure"
14886 #include "confdefs.h"
14887 /* System header to define __stub macros and hopefully few prototypes,
14888     which can conflict with char regcomp (); below.  */
14889 #include <assert.h>
14890 /* Override any gcc2 internal prototype to avoid an error.  */
14891 #ifdef __cplusplus
14892 extern "C"
14893 #endif
14894 /* We use char because int might match the return type of a gcc2
14895    builtin and then its argument prototype would still apply.  */
14896 char regcomp ();
14897 char (*f) ();
14898
14899 int
14900 main ()
14901 {
14902 /* The GNU C library defines this for functions which it implements
14903     to always fail with ENOSYS.  Some functions are actually named
14904     something starting with __ and the normal name is an alias.  */
14905 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14906 choke me
14907 #else
14908 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14909 #endif
14910
14911   ;
14912   return 0;
14913 }
14914 _ACEOF
14915 rm -f conftest.$ac_objext conftest$ac_exeext
14916 if { (eval echo "$as_me:14916: \"$ac_link\"") >&5
14917   (eval $ac_link) 2>&5
14918   ac_status=$?
14919   echo "$as_me:14919: \$? = $ac_status" >&5
14920   (exit $ac_status); } &&
14921          { ac_try='test -s conftest$ac_exeext'
14922   { (eval echo "$as_me:14922: \"$ac_try\"") >&5
14923   (eval $ac_try) 2>&5
14924   ac_status=$?
14925   echo "$as_me:14925: \$? = $ac_status" >&5
14926   (exit $ac_status); }; }; then
14927   ac_cv_func_regcomp=yes
14928 else
14929   echo "$as_me: failed program was:" >&5
14930 cat conftest.$ac_ext >&5
14931 ac_cv_func_regcomp=no
14932 fi
14933 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14934 fi
14935 echo "$as_me:14935: result: $ac_cv_func_regcomp" >&5
14936 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14937 if test $ac_cv_func_regcomp = yes; then
14938   cf_regex_func=regcomp
14939 else
14940
14941         for cf_regex_lib in $cf_regex_libs
14942         do
14943                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14944 echo "$as_me:14944: checking for regcomp in -l$cf_regex_lib" >&5
14945 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14946 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14947   echo $ECHO_N "(cached) $ECHO_C" >&6
14948 else
14949   ac_check_lib_save_LIBS=$LIBS
14950 LIBS="-l$cf_regex_lib  $LIBS"
14951 cat >conftest.$ac_ext <<_ACEOF
14952 #line 14952 "configure"
14953 #include "confdefs.h"
14954
14955 /* Override any gcc2 internal prototype to avoid an error.  */
14956 #ifdef __cplusplus
14957 extern "C"
14958 #endif
14959 /* We use char because int might match the return type of a gcc2
14960    builtin and then its argument prototype would still apply.  */
14961 char regcomp ();
14962 int
14963 main ()
14964 {
14965 regcomp ();
14966   ;
14967   return 0;
14968 }
14969 _ACEOF
14970 rm -f conftest.$ac_objext conftest$ac_exeext
14971 if { (eval echo "$as_me:14971: \"$ac_link\"") >&5
14972   (eval $ac_link) 2>&5
14973   ac_status=$?
14974   echo "$as_me:14974: \$? = $ac_status" >&5
14975   (exit $ac_status); } &&
14976          { ac_try='test -s conftest$ac_exeext'
14977   { (eval echo "$as_me:14977: \"$ac_try\"") >&5
14978   (eval $ac_try) 2>&5
14979   ac_status=$?
14980   echo "$as_me:14980: \$? = $ac_status" >&5
14981   (exit $ac_status); }; }; then
14982   eval "$as_ac_Lib=yes"
14983 else
14984   echo "$as_me: failed program was:" >&5
14985 cat conftest.$ac_ext >&5
14986 eval "$as_ac_Lib=no"
14987 fi
14988 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14989 LIBS=$ac_check_lib_save_LIBS
14990 fi
14991 echo "$as_me:14991: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14992 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14993 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14994
14995 cf_add_libs="-l$cf_regex_lib"
14996 # Filter out duplicates - this happens with badly-designed ".pc" files...
14997 for cf_add_1lib in $LIBS
14998 do
14999         for cf_add_2lib in $cf_add_libs
15000         do
15001                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15002                 then
15003                         cf_add_1lib=
15004                         break
15005                 fi
15006         done
15007         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15008 done
15009 LIBS="$cf_add_libs"
15010
15011                                 cf_regex_func=regcomp
15012                                 break
15013 fi
15014
15015         done
15016
15017 fi
15018
15019 if test "$cf_regex_func" = no ; then
15020         echo "$as_me:15020: checking for compile" >&5
15021 echo $ECHO_N "checking for compile... $ECHO_C" >&6
15022 if test "${ac_cv_func_compile+set}" = set; then
15023   echo $ECHO_N "(cached) $ECHO_C" >&6
15024 else
15025   cat >conftest.$ac_ext <<_ACEOF
15026 #line 15026 "configure"
15027 #include "confdefs.h"
15028 /* System header to define __stub macros and hopefully few prototypes,
15029     which can conflict with char compile (); below.  */
15030 #include <assert.h>
15031 /* Override any gcc2 internal prototype to avoid an error.  */
15032 #ifdef __cplusplus
15033 extern "C"
15034 #endif
15035 /* We use char because int might match the return type of a gcc2
15036    builtin and then its argument prototype would still apply.  */
15037 char compile ();
15038 char (*f) ();
15039
15040 int
15041 main ()
15042 {
15043 /* The GNU C library defines this for functions which it implements
15044     to always fail with ENOSYS.  Some functions are actually named
15045     something starting with __ and the normal name is an alias.  */
15046 #if defined (__stub_compile) || defined (__stub___compile)
15047 choke me
15048 #else
15049 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15050 #endif
15051
15052   ;
15053   return 0;
15054 }
15055 _ACEOF
15056 rm -f conftest.$ac_objext conftest$ac_exeext
15057 if { (eval echo "$as_me:15057: \"$ac_link\"") >&5
15058   (eval $ac_link) 2>&5
15059   ac_status=$?
15060   echo "$as_me:15060: \$? = $ac_status" >&5
15061   (exit $ac_status); } &&
15062          { ac_try='test -s conftest$ac_exeext'
15063   { (eval echo "$as_me:15063: \"$ac_try\"") >&5
15064   (eval $ac_try) 2>&5
15065   ac_status=$?
15066   echo "$as_me:15066: \$? = $ac_status" >&5
15067   (exit $ac_status); }; }; then
15068   ac_cv_func_compile=yes
15069 else
15070   echo "$as_me: failed program was:" >&5
15071 cat conftest.$ac_ext >&5
15072 ac_cv_func_compile=no
15073 fi
15074 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15075 fi
15076 echo "$as_me:15076: result: $ac_cv_func_compile" >&5
15077 echo "${ECHO_T}$ac_cv_func_compile" >&6
15078 if test $ac_cv_func_compile = yes; then
15079   cf_regex_func=compile
15080 else
15081
15082                 echo "$as_me:15082: checking for compile in -lgen" >&5
15083 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15084 if test "${ac_cv_lib_gen_compile+set}" = set; then
15085   echo $ECHO_N "(cached) $ECHO_C" >&6
15086 else
15087   ac_check_lib_save_LIBS=$LIBS
15088 LIBS="-lgen  $LIBS"
15089 cat >conftest.$ac_ext <<_ACEOF
15090 #line 15090 "configure"
15091 #include "confdefs.h"
15092
15093 /* Override any gcc2 internal prototype to avoid an error.  */
15094 #ifdef __cplusplus
15095 extern "C"
15096 #endif
15097 /* We use char because int might match the return type of a gcc2
15098    builtin and then its argument prototype would still apply.  */
15099 char compile ();
15100 int
15101 main ()
15102 {
15103 compile ();
15104   ;
15105   return 0;
15106 }
15107 _ACEOF
15108 rm -f conftest.$ac_objext conftest$ac_exeext
15109 if { (eval echo "$as_me:15109: \"$ac_link\"") >&5
15110   (eval $ac_link) 2>&5
15111   ac_status=$?
15112   echo "$as_me:15112: \$? = $ac_status" >&5
15113   (exit $ac_status); } &&
15114          { ac_try='test -s conftest$ac_exeext'
15115   { (eval echo "$as_me:15115: \"$ac_try\"") >&5
15116   (eval $ac_try) 2>&5
15117   ac_status=$?
15118   echo "$as_me:15118: \$? = $ac_status" >&5
15119   (exit $ac_status); }; }; then
15120   ac_cv_lib_gen_compile=yes
15121 else
15122   echo "$as_me: failed program was:" >&5
15123 cat conftest.$ac_ext >&5
15124 ac_cv_lib_gen_compile=no
15125 fi
15126 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15127 LIBS=$ac_check_lib_save_LIBS
15128 fi
15129 echo "$as_me:15129: result: $ac_cv_lib_gen_compile" >&5
15130 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15131 if test $ac_cv_lib_gen_compile = yes; then
15132
15133 cf_add_libs="-lgen"
15134 # Filter out duplicates - this happens with badly-designed ".pc" files...
15135 for cf_add_1lib in $LIBS
15136 do
15137         for cf_add_2lib in $cf_add_libs
15138         do
15139                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15140                 then
15141                         cf_add_1lib=
15142                         break
15143                 fi
15144         done
15145         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15146 done
15147 LIBS="$cf_add_libs"
15148
15149                                 cf_regex_func=compile
15150 fi
15151
15152 fi
15153
15154 fi
15155
15156 if test "$cf_regex_func" = no ; then
15157         { echo "$as_me:15157: WARNING: cannot find regular expression library" >&5
15158 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15159 fi
15160
15161 echo "$as_me:15161: checking for regular-expression headers" >&5
15162 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15163 if test "${cf_cv_regex_hdrs+set}" = set; then
15164   echo $ECHO_N "(cached) $ECHO_C" >&6
15165 else
15166
15167 cf_cv_regex_hdrs=no
15168 case $cf_regex_func in
15169 (compile)
15170         for cf_regex_hdr in regexp.h regexpr.h
15171         do
15172                 cat >conftest.$ac_ext <<_ACEOF
15173 #line 15173 "configure"
15174 #include "confdefs.h"
15175 #include <$cf_regex_hdr>
15176 int
15177 main ()
15178 {
15179
15180                         char *p = compile("", "", "", 0);
15181                         int x = step("", "");
15182
15183   ;
15184   return 0;
15185 }
15186 _ACEOF
15187 rm -f conftest.$ac_objext conftest$ac_exeext
15188 if { (eval echo "$as_me:15188: \"$ac_link\"") >&5
15189   (eval $ac_link) 2>&5
15190   ac_status=$?
15191   echo "$as_me:15191: \$? = $ac_status" >&5
15192   (exit $ac_status); } &&
15193          { ac_try='test -s conftest$ac_exeext'
15194   { (eval echo "$as_me:15194: \"$ac_try\"") >&5
15195   (eval $ac_try) 2>&5
15196   ac_status=$?
15197   echo "$as_me:15197: \$? = $ac_status" >&5
15198   (exit $ac_status); }; }; then
15199
15200                         cf_cv_regex_hdrs=$cf_regex_hdr
15201                         break
15202
15203 else
15204   echo "$as_me: failed program was:" >&5
15205 cat conftest.$ac_ext >&5
15206 fi
15207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15208         done
15209         ;;
15210 (*)
15211         for cf_regex_hdr in regex.h
15212         do
15213                 cat >conftest.$ac_ext <<_ACEOF
15214 #line 15214 "configure"
15215 #include "confdefs.h"
15216 #include <sys/types.h>
15217 #include <$cf_regex_hdr>
15218 int
15219 main ()
15220 {
15221
15222                         regex_t *p;
15223                         int x = regcomp(p, "", 0);
15224                         int y = regexec(p, "", 0, 0, 0);
15225                         regfree(p);
15226
15227   ;
15228   return 0;
15229 }
15230 _ACEOF
15231 rm -f conftest.$ac_objext conftest$ac_exeext
15232 if { (eval echo "$as_me:15232: \"$ac_link\"") >&5
15233   (eval $ac_link) 2>&5
15234   ac_status=$?
15235   echo "$as_me:15235: \$? = $ac_status" >&5
15236   (exit $ac_status); } &&
15237          { ac_try='test -s conftest$ac_exeext'
15238   { (eval echo "$as_me:15238: \"$ac_try\"") >&5
15239   (eval $ac_try) 2>&5
15240   ac_status=$?
15241   echo "$as_me:15241: \$? = $ac_status" >&5
15242   (exit $ac_status); }; }; then
15243
15244                         cf_cv_regex_hdrs=$cf_regex_hdr
15245                         break
15246
15247 else
15248   echo "$as_me: failed program was:" >&5
15249 cat conftest.$ac_ext >&5
15250 fi
15251 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15252         done
15253         ;;
15254 esac
15255
15256 fi
15257 echo "$as_me:15257: result: $cf_cv_regex_hdrs" >&5
15258 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15259
15260 case $cf_cv_regex_hdrs in
15261         (no)            { echo "$as_me:15261: WARNING: no regular expression header found" >&5
15262 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
15263         (regex.h)
15264 cat >>confdefs.h <<\EOF
15265 #define HAVE_REGEX_H_FUNCS 1
15266 EOF
15267  ;;
15268         (regexp.h)
15269 cat >>confdefs.h <<\EOF
15270 #define HAVE_REGEXP_H_FUNCS 1
15271 EOF
15272  ;;
15273         (regexpr.h)
15274 cat >>confdefs.h <<\EOF
15275 #define HAVE_REGEXPR_H_FUNCS 1
15276 EOF
15277  ;;
15278 esac
15279
15280 for ac_header in \
15281 fcntl.h \
15282 getopt.h \
15283 limits.h \
15284 locale.h \
15285 math.h \
15286 poll.h \
15287 sys/bsdtypes.h \
15288 sys/ioctl.h \
15289 sys/param.h \
15290 sys/poll.h \
15291 sys/select.h \
15292 sys/time.h \
15293 sys/times.h \
15294 ttyent.h \
15295 unistd.h \
15296 wctype.h \
15297
15298 do
15299 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15300 echo "$as_me:15300: checking for $ac_header" >&5
15301 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15302 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15303   echo $ECHO_N "(cached) $ECHO_C" >&6
15304 else
15305   cat >conftest.$ac_ext <<_ACEOF
15306 #line 15306 "configure"
15307 #include "confdefs.h"
15308 #include <$ac_header>
15309 _ACEOF
15310 if { (eval echo "$as_me:15310: \"$ac_cpp conftest.$ac_ext\"") >&5
15311   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15312   ac_status=$?
15313   egrep -v '^ *\+' conftest.er1 >conftest.err
15314   rm -f conftest.er1
15315   cat conftest.err >&5
15316   echo "$as_me:15316: \$? = $ac_status" >&5
15317   (exit $ac_status); } >/dev/null; then
15318   if test -s conftest.err; then
15319     ac_cpp_err=$ac_c_preproc_warn_flag
15320   else
15321     ac_cpp_err=
15322   fi
15323 else
15324   ac_cpp_err=yes
15325 fi
15326 if test -z "$ac_cpp_err"; then
15327   eval "$as_ac_Header=yes"
15328 else
15329   echo "$as_me: failed program was:" >&5
15330   cat conftest.$ac_ext >&5
15331   eval "$as_ac_Header=no"
15332 fi
15333 rm -f conftest.err conftest.$ac_ext
15334 fi
15335 echo "$as_me:15335: result: `eval echo '${'$as_ac_Header'}'`" >&5
15336 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15337 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15338   cat >>confdefs.h <<EOF
15339 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15340 EOF
15341
15342 fi
15343 done
15344
15345 for ac_header in unistd.h getopt.h
15346 do
15347 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15348 echo "$as_me:15348: checking for $ac_header" >&5
15349 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15350 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15351   echo $ECHO_N "(cached) $ECHO_C" >&6
15352 else
15353   cat >conftest.$ac_ext <<_ACEOF
15354 #line 15354 "configure"
15355 #include "confdefs.h"
15356 #include <$ac_header>
15357 _ACEOF
15358 if { (eval echo "$as_me:15358: \"$ac_cpp conftest.$ac_ext\"") >&5
15359   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15360   ac_status=$?
15361   egrep -v '^ *\+' conftest.er1 >conftest.err
15362   rm -f conftest.er1
15363   cat conftest.err >&5
15364   echo "$as_me:15364: \$? = $ac_status" >&5
15365   (exit $ac_status); } >/dev/null; then
15366   if test -s conftest.err; then
15367     ac_cpp_err=$ac_c_preproc_warn_flag
15368   else
15369     ac_cpp_err=
15370   fi
15371 else
15372   ac_cpp_err=yes
15373 fi
15374 if test -z "$ac_cpp_err"; then
15375   eval "$as_ac_Header=yes"
15376 else
15377   echo "$as_me: failed program was:" >&5
15378   cat conftest.$ac_ext >&5
15379   eval "$as_ac_Header=no"
15380 fi
15381 rm -f conftest.err conftest.$ac_ext
15382 fi
15383 echo "$as_me:15383: result: `eval echo '${'$as_ac_Header'}'`" >&5
15384 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15385 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15386   cat >>confdefs.h <<EOF
15387 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15388 EOF
15389
15390 fi
15391 done
15392
15393 echo "$as_me:15393: checking for header declaring getopt variables" >&5
15394 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15395 if test "${cf_cv_getopt_header+set}" = set; then
15396   echo $ECHO_N "(cached) $ECHO_C" >&6
15397 else
15398
15399 cf_cv_getopt_header=none
15400 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15401 do
15402 cat >conftest.$ac_ext <<_ACEOF
15403 #line 15403 "configure"
15404 #include "confdefs.h"
15405
15406 #include <$cf_header>
15407 int
15408 main ()
15409 {
15410 int x = optind; char *y = optarg
15411   ;
15412   return 0;
15413 }
15414 _ACEOF
15415 rm -f conftest.$ac_objext
15416 if { (eval echo "$as_me:15416: \"$ac_compile\"") >&5
15417   (eval $ac_compile) 2>&5
15418   ac_status=$?
15419   echo "$as_me:15419: \$? = $ac_status" >&5
15420   (exit $ac_status); } &&
15421          { ac_try='test -s conftest.$ac_objext'
15422   { (eval echo "$as_me:15422: \"$ac_try\"") >&5
15423   (eval $ac_try) 2>&5
15424   ac_status=$?
15425   echo "$as_me:15425: \$? = $ac_status" >&5
15426   (exit $ac_status); }; }; then
15427   cf_cv_getopt_header=$cf_header
15428  break
15429 else
15430   echo "$as_me: failed program was:" >&5
15431 cat conftest.$ac_ext >&5
15432 fi
15433 rm -f conftest.$ac_objext conftest.$ac_ext
15434 done
15435
15436 fi
15437 echo "$as_me:15437: result: $cf_cv_getopt_header" >&5
15438 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15439 if test $cf_cv_getopt_header != none ; then
15440
15441 cat >>confdefs.h <<\EOF
15442 #define HAVE_GETOPT_HEADER 1
15443 EOF
15444
15445 fi
15446 if test $cf_cv_getopt_header = getopt.h ; then
15447
15448 cat >>confdefs.h <<\EOF
15449 #define NEED_GETOPT_H 1
15450 EOF
15451
15452 fi
15453
15454 # check for ISC (this may also define _POSIX_SOURCE)
15455 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15456 if test "x$ISC" = xyes ; then
15457
15458 echo "$as_me:15458: checking for main in -lcposix" >&5
15459 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15460 if test "${ac_cv_lib_cposix_main+set}" = set; then
15461   echo $ECHO_N "(cached) $ECHO_C" >&6
15462 else
15463   ac_check_lib_save_LIBS=$LIBS
15464 LIBS="-lcposix  $LIBS"
15465 cat >conftest.$ac_ext <<_ACEOF
15466 #line 15466 "configure"
15467 #include "confdefs.h"
15468
15469 int
15470 main ()
15471 {
15472 main ();
15473   ;
15474   return 0;
15475 }
15476 _ACEOF
15477 rm -f conftest.$ac_objext conftest$ac_exeext
15478 if { (eval echo "$as_me:15478: \"$ac_link\"") >&5
15479   (eval $ac_link) 2>&5
15480   ac_status=$?
15481   echo "$as_me:15481: \$? = $ac_status" >&5
15482   (exit $ac_status); } &&
15483          { ac_try='test -s conftest$ac_exeext'
15484   { (eval echo "$as_me:15484: \"$ac_try\"") >&5
15485   (eval $ac_try) 2>&5
15486   ac_status=$?
15487   echo "$as_me:15487: \$? = $ac_status" >&5
15488   (exit $ac_status); }; }; then
15489   ac_cv_lib_cposix_main=yes
15490 else
15491   echo "$as_me: failed program was:" >&5
15492 cat conftest.$ac_ext >&5
15493 ac_cv_lib_cposix_main=no
15494 fi
15495 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15496 LIBS=$ac_check_lib_save_LIBS
15497 fi
15498 echo "$as_me:15498: result: $ac_cv_lib_cposix_main" >&5
15499 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15500 if test $ac_cv_lib_cposix_main = yes; then
15501   cat >>confdefs.h <<EOF
15502 #define HAVE_LIBCPOSIX 1
15503 EOF
15504
15505   LIBS="-lcposix $LIBS"
15506
15507 fi
15508
15509         echo "$as_me:15509: checking for bzero in -linet" >&5
15510 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15511 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15512   echo $ECHO_N "(cached) $ECHO_C" >&6
15513 else
15514   ac_check_lib_save_LIBS=$LIBS
15515 LIBS="-linet  $LIBS"
15516 cat >conftest.$ac_ext <<_ACEOF
15517 #line 15517 "configure"
15518 #include "confdefs.h"
15519
15520 /* Override any gcc2 internal prototype to avoid an error.  */
15521 #ifdef __cplusplus
15522 extern "C"
15523 #endif
15524 /* We use char because int might match the return type of a gcc2
15525    builtin and then its argument prototype would still apply.  */
15526 char bzero ();
15527 int
15528 main ()
15529 {
15530 bzero ();
15531   ;
15532   return 0;
15533 }
15534 _ACEOF
15535 rm -f conftest.$ac_objext conftest$ac_exeext
15536 if { (eval echo "$as_me:15536: \"$ac_link\"") >&5
15537   (eval $ac_link) 2>&5
15538   ac_status=$?
15539   echo "$as_me:15539: \$? = $ac_status" >&5
15540   (exit $ac_status); } &&
15541          { ac_try='test -s conftest$ac_exeext'
15542   { (eval echo "$as_me:15542: \"$ac_try\"") >&5
15543   (eval $ac_try) 2>&5
15544   ac_status=$?
15545   echo "$as_me:15545: \$? = $ac_status" >&5
15546   (exit $ac_status); }; }; then
15547   ac_cv_lib_inet_bzero=yes
15548 else
15549   echo "$as_me: failed program was:" >&5
15550 cat conftest.$ac_ext >&5
15551 ac_cv_lib_inet_bzero=no
15552 fi
15553 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15554 LIBS=$ac_check_lib_save_LIBS
15555 fi
15556 echo "$as_me:15556: result: $ac_cv_lib_inet_bzero" >&5
15557 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15558 if test $ac_cv_lib_inet_bzero = yes; then
15559
15560 cf_add_libs="-linet"
15561 # Filter out duplicates - this happens with badly-designed ".pc" files...
15562 for cf_add_1lib in $LIBS
15563 do
15564         for cf_add_2lib in $cf_add_libs
15565         do
15566                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15567                 then
15568                         cf_add_1lib=
15569                         break
15570                 fi
15571         done
15572         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15573 done
15574 LIBS="$cf_add_libs"
15575
15576 fi
15577 fi
15578
15579 echo "$as_me:15579: checking if sys/time.h works with sys/select.h" >&5
15580 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15581 if test "${cf_cv_sys_time_select+set}" = set; then
15582   echo $ECHO_N "(cached) $ECHO_C" >&6
15583 else
15584
15585 cat >conftest.$ac_ext <<_ACEOF
15586 #line 15586 "configure"
15587 #include "confdefs.h"
15588
15589 #include <sys/types.h>
15590 #ifdef HAVE_SYS_TIME_H
15591 #include <sys/time.h>
15592 #endif
15593 #ifdef HAVE_SYS_SELECT_H
15594 #include <sys/select.h>
15595 #endif
15596
15597 int
15598 main ()
15599 {
15600
15601   ;
15602   return 0;
15603 }
15604 _ACEOF
15605 rm -f conftest.$ac_objext
15606 if { (eval echo "$as_me:15606: \"$ac_compile\"") >&5
15607   (eval $ac_compile) 2>&5
15608   ac_status=$?
15609   echo "$as_me:15609: \$? = $ac_status" >&5
15610   (exit $ac_status); } &&
15611          { ac_try='test -s conftest.$ac_objext'
15612   { (eval echo "$as_me:15612: \"$ac_try\"") >&5
15613   (eval $ac_try) 2>&5
15614   ac_status=$?
15615   echo "$as_me:15615: \$? = $ac_status" >&5
15616   (exit $ac_status); }; }; then
15617   cf_cv_sys_time_select=yes
15618 else
15619   echo "$as_me: failed program was:" >&5
15620 cat conftest.$ac_ext >&5
15621 cf_cv_sys_time_select=no
15622 fi
15623 rm -f conftest.$ac_objext conftest.$ac_ext
15624
15625 fi
15626
15627 echo "$as_me:15627: result: $cf_cv_sys_time_select" >&5
15628 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15629 test "$cf_cv_sys_time_select" = yes &&
15630 cat >>confdefs.h <<\EOF
15631 #define HAVE_SYS_TIME_SELECT 1
15632 EOF
15633
15634 ###     checks for compiler characteristics
15635 ac_ext=c
15636 ac_cpp='$CPP $CPPFLAGS'
15637 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15638 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15639 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15640 ac_main_return=return
15641
15642 echo "$as_me:15642: checking for an ANSI C-conforming const" >&5
15643 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15644 if test "${ac_cv_c_const+set}" = set; then
15645   echo $ECHO_N "(cached) $ECHO_C" >&6
15646 else
15647   cat >conftest.$ac_ext <<_ACEOF
15648 #line 15648 "configure"
15649 #include "confdefs.h"
15650
15651 int
15652 main ()
15653 {
15654 /* FIXME: Include the comments suggested by Paul. */
15655 #ifndef __cplusplus
15656   /* Ultrix mips cc rejects this.  */
15657   typedef int charset[2];
15658   const charset x;
15659   /* SunOS 4.1.1 cc rejects this.  */
15660   char const *const *ccp;
15661   char **p;
15662   /* NEC SVR4.0.2 mips cc rejects this.  */
15663   struct point {int x, y;};
15664   static struct point const zero = {0,0};
15665   /* AIX XL C 1.02.0.0 rejects this.
15666      It does not let you subtract one const X* pointer from another in
15667      an arm of an if-expression whose if-part is not a constant
15668      expression */
15669   const char *g = "string";
15670   ccp = &g + (g ? g-g : 0);
15671   /* HPUX 7.0 cc rejects these. */
15672   ++ccp;
15673   p = (char**) ccp;
15674   ccp = (char const *const *) p;
15675   { /* SCO 3.2v4 cc rejects this.  */
15676     char *t;
15677     char const *s = 0 ? (char *) 0 : (char const *) 0;
15678
15679     *t++ = 0;
15680   }
15681   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15682     int x[] = {25, 17};
15683     const int *foo = &x[0];
15684     ++foo;
15685   }
15686   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15687     typedef const int *iptr;
15688     iptr p = 0;
15689     ++p;
15690   }
15691   { /* AIX XL C 1.02.0.0 rejects this saying
15692        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15693     struct s { int j; const int *ap[3]; };
15694     struct s *b; b->j = 5;
15695   }
15696   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15697     const int foo = 10;
15698   }
15699 #endif
15700
15701   ;
15702   return 0;
15703 }
15704 _ACEOF
15705 rm -f conftest.$ac_objext
15706 if { (eval echo "$as_me:15706: \"$ac_compile\"") >&5
15707   (eval $ac_compile) 2>&5
15708   ac_status=$?
15709   echo "$as_me:15709: \$? = $ac_status" >&5
15710   (exit $ac_status); } &&
15711          { ac_try='test -s conftest.$ac_objext'
15712   { (eval echo "$as_me:15712: \"$ac_try\"") >&5
15713   (eval $ac_try) 2>&5
15714   ac_status=$?
15715   echo "$as_me:15715: \$? = $ac_status" >&5
15716   (exit $ac_status); }; }; then
15717   ac_cv_c_const=yes
15718 else
15719   echo "$as_me: failed program was:" >&5
15720 cat conftest.$ac_ext >&5
15721 ac_cv_c_const=no
15722 fi
15723 rm -f conftest.$ac_objext conftest.$ac_ext
15724 fi
15725 echo "$as_me:15725: result: $ac_cv_c_const" >&5
15726 echo "${ECHO_T}$ac_cv_c_const" >&6
15727 if test $ac_cv_c_const = no; then
15728
15729 cat >>confdefs.h <<\EOF
15730 #define const
15731 EOF
15732
15733 fi
15734
15735 echo "$as_me:15735: checking for inline" >&5
15736 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15737 if test "${ac_cv_c_inline+set}" = set; then
15738   echo $ECHO_N "(cached) $ECHO_C" >&6
15739 else
15740   ac_cv_c_inline=no
15741 for ac_kw in inline __inline__ __inline; do
15742   cat >conftest.$ac_ext <<_ACEOF
15743 #line 15743 "configure"
15744 #include "confdefs.h"
15745 #ifndef __cplusplus
15746 static $ac_kw int static_foo () {return 0; }
15747 $ac_kw int foo () {return 0; }
15748 #endif
15749
15750 _ACEOF
15751 rm -f conftest.$ac_objext
15752 if { (eval echo "$as_me:15752: \"$ac_compile\"") >&5
15753   (eval $ac_compile) 2>&5
15754   ac_status=$?
15755   echo "$as_me:15755: \$? = $ac_status" >&5
15756   (exit $ac_status); } &&
15757          { ac_try='test -s conftest.$ac_objext'
15758   { (eval echo "$as_me:15758: \"$ac_try\"") >&5
15759   (eval $ac_try) 2>&5
15760   ac_status=$?
15761   echo "$as_me:15761: \$? = $ac_status" >&5
15762   (exit $ac_status); }; }; then
15763   ac_cv_c_inline=$ac_kw; break
15764 else
15765   echo "$as_me: failed program was:" >&5
15766 cat conftest.$ac_ext >&5
15767 fi
15768 rm -f conftest.$ac_objext conftest.$ac_ext
15769 done
15770
15771 fi
15772 echo "$as_me:15772: result: $ac_cv_c_inline" >&5
15773 echo "${ECHO_T}$ac_cv_c_inline" >&6
15774 case $ac_cv_c_inline in
15775   inline | yes) ;;
15776   no)
15777 cat >>confdefs.h <<\EOF
15778 #define inline
15779 EOF
15780  ;;
15781   *)  cat >>confdefs.h <<EOF
15782 #define inline $ac_cv_c_inline
15783 EOF
15784  ;;
15785 esac
15786
15787 NCURSES_INLINE=
15788 if test "$ac_cv_c_inline" != no ; then
15789         NCURSES_INLINE=inline
15790         if test "$INTEL_COMPILER" = yes
15791         then
15792                 :
15793         elif test "$CLANG_COMPILER" = yes
15794         then
15795                 :
15796         elif test "$GCC" = yes
15797         then
15798                 echo "$as_me:15798: checking if $CC supports options to tune inlining" >&5
15799 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15800 if test "${cf_cv_gcc_inline+set}" = set; then
15801   echo $ECHO_N "(cached) $ECHO_C" >&6
15802 else
15803
15804                 cf_save_CFLAGS=$CFLAGS
15805                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15806                 cat >conftest.$ac_ext <<_ACEOF
15807 #line 15807 "configure"
15808 #include "confdefs.h"
15809 inline int foo(void) { return 1; }
15810 int
15811 main ()
15812 {
15813 ${cf_cv_main_return:-return} foo()
15814   ;
15815   return 0;
15816 }
15817 _ACEOF
15818 rm -f conftest.$ac_objext
15819 if { (eval echo "$as_me:15819: \"$ac_compile\"") >&5
15820   (eval $ac_compile) 2>&5
15821   ac_status=$?
15822   echo "$as_me:15822: \$? = $ac_status" >&5
15823   (exit $ac_status); } &&
15824          { ac_try='test -s conftest.$ac_objext'
15825   { (eval echo "$as_me:15825: \"$ac_try\"") >&5
15826   (eval $ac_try) 2>&5
15827   ac_status=$?
15828   echo "$as_me:15828: \$? = $ac_status" >&5
15829   (exit $ac_status); }; }; then
15830   cf_cv_gcc_inline=yes
15831 else
15832   echo "$as_me: failed program was:" >&5
15833 cat conftest.$ac_ext >&5
15834 cf_cv_gcc_inline=no
15835 fi
15836 rm -f conftest.$ac_objext conftest.$ac_ext
15837                 CFLAGS=$cf_save_CFLAGS
15838
15839 fi
15840 echo "$as_me:15840: result: $cf_cv_gcc_inline" >&5
15841 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15842                 if test "$cf_cv_gcc_inline" = yes ; then
15843
15844 cf_fix_cppflags=no
15845 cf_new_cflags=
15846 cf_new_cppflags=
15847 cf_new_extra_cppflags=
15848
15849 for cf_add_cflags in --param max-inline-insns-single=1200
15850 do
15851 case $cf_fix_cppflags in
15852 (no)
15853         case $cf_add_cflags in
15854         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15855                 case $cf_add_cflags in
15856                 (-D*)
15857                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15858
15859                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15860                                 && test -z "${cf_tst_cflags}" \
15861                                 && cf_fix_cppflags=yes
15862
15863                         if test $cf_fix_cppflags = yes ; then
15864                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15865                                 continue
15866                         elif test "${cf_tst_cflags}" = "\"'" ; then
15867                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15868                                 continue
15869                         fi
15870                         ;;
15871                 esac
15872                 case "$CPPFLAGS" in
15873                 (*$cf_add_cflags)
15874                         ;;
15875                 (*)
15876                         case $cf_add_cflags in
15877                         (-D*)
15878                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15879
15880 CPPFLAGS=`echo "$CPPFLAGS" | \
15881         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15882                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15883
15884                                 ;;
15885                         esac
15886                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15887                         ;;
15888                 esac
15889                 ;;
15890         (*)
15891                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15892                 ;;
15893         esac
15894         ;;
15895 (yes)
15896         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15897
15898         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15899
15900         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15901                 && test -z "${cf_tst_cflags}" \
15902                 && cf_fix_cppflags=no
15903         ;;
15904 esac
15905 done
15906
15907 if test -n "$cf_new_cflags" ; then
15908
15909         CFLAGS="$CFLAGS $cf_new_cflags"
15910 fi
15911
15912 if test -n "$cf_new_cppflags" ; then
15913
15914         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15915 fi
15916
15917 if test -n "$cf_new_extra_cppflags" ; then
15918
15919         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15920 fi
15921
15922                 fi
15923         fi
15924 fi
15925
15926 echo "$as_me:15926: checking for signal global datatype" >&5
15927 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15928 if test "${cf_cv_sig_atomic_t+set}" = set; then
15929   echo $ECHO_N "(cached) $ECHO_C" >&6
15930 else
15931
15932         for cf_type in \
15933                 "volatile sig_atomic_t" \
15934                 "sig_atomic_t" \
15935                 "int"
15936         do
15937         cat >conftest.$ac_ext <<_ACEOF
15938 #line 15938 "configure"
15939 #include "confdefs.h"
15940
15941 #include <sys/types.h>
15942 #include <signal.h>
15943 #include <stdio.h>
15944
15945 extern $cf_type x;
15946 $cf_type x;
15947 static void handler(int sig)
15948 {
15949         x = 5;
15950 }
15951 int
15952 main ()
15953 {
15954 signal(SIGINT, handler);
15955                  x = 1
15956   ;
15957   return 0;
15958 }
15959 _ACEOF
15960 rm -f conftest.$ac_objext
15961 if { (eval echo "$as_me:15961: \"$ac_compile\"") >&5
15962   (eval $ac_compile) 2>&5
15963   ac_status=$?
15964   echo "$as_me:15964: \$? = $ac_status" >&5
15965   (exit $ac_status); } &&
15966          { ac_try='test -s conftest.$ac_objext'
15967   { (eval echo "$as_me:15967: \"$ac_try\"") >&5
15968   (eval $ac_try) 2>&5
15969   ac_status=$?
15970   echo "$as_me:15970: \$? = $ac_status" >&5
15971   (exit $ac_status); }; }; then
15972   cf_cv_sig_atomic_t=$cf_type
15973 else
15974   echo "$as_me: failed program was:" >&5
15975 cat conftest.$ac_ext >&5
15976 cf_cv_sig_atomic_t=no
15977 fi
15978 rm -f conftest.$ac_objext conftest.$ac_ext
15979                 test "$cf_cv_sig_atomic_t" != no && break
15980         done
15981
15982 fi
15983
15984 echo "$as_me:15984: result: $cf_cv_sig_atomic_t" >&5
15985 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15986 test "$cf_cv_sig_atomic_t" != no &&
15987 cat >>confdefs.h <<EOF
15988 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15989 EOF
15990
15991 if test $NCURSES_CHTYPE = auto ; then
15992
15993 echo "$as_me:15993: checking for type of chtype" >&5
15994 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15995 if test "${cf_cv_typeof_chtype+set}" = set; then
15996   echo $ECHO_N "(cached) $ECHO_C" >&6
15997 else
15998
15999                 if test "$cross_compiling" = yes; then
16000   cf_cv_typeof_chtype=long
16001 else
16002   cat >conftest.$ac_ext <<_ACEOF
16003 #line 16003 "configure"
16004 #include "confdefs.h"
16005
16006 #define WANT_BITS 31
16007 #include <stdio.h>
16008 int main()
16009 {
16010         FILE *fp = fopen("cf_test.out", "w");
16011         if (fp != 0) {
16012                 char *result = "long";
16013                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
16014                         int n;
16015                         unsigned int x, y;
16016                         for (n = 0; n < WANT_BITS; n++) {
16017                                 x = (1 << n);
16018                                 y = (x >> n);
16019                                 if (y != 1 || x == 0) {
16020                                         x = 0;
16021                                         break;
16022                                 }
16023                         }
16024                         /*
16025                          * If x is nonzero, an int is big enough for the bits
16026                          * that we want.
16027                          */
16028                         result = (x != 0) ? "int" : "long";
16029                 }
16030                 fputs(result, fp);
16031                 fclose(fp);
16032         }
16033         ${cf_cv_main_return:-return}(0);
16034 }
16035
16036 _ACEOF
16037 rm -f conftest$ac_exeext
16038 if { (eval echo "$as_me:16038: \"$ac_link\"") >&5
16039   (eval $ac_link) 2>&5
16040   ac_status=$?
16041   echo "$as_me:16041: \$? = $ac_status" >&5
16042   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16043   { (eval echo "$as_me:16043: \"$ac_try\"") >&5
16044   (eval $ac_try) 2>&5
16045   ac_status=$?
16046   echo "$as_me:16046: \$? = $ac_status" >&5
16047   (exit $ac_status); }; }; then
16048   cf_cv_typeof_chtype=`cat cf_test.out`
16049 else
16050   echo "$as_me: program exited with status $ac_status" >&5
16051 echo "$as_me: failed program was:" >&5
16052 cat conftest.$ac_ext >&5
16053 cf_cv_typeof_chtype=long
16054 fi
16055 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16056 fi
16057                 rm -f cf_test.out
16058
16059 fi
16060
16061 echo "$as_me:16061: result: $cf_cv_typeof_chtype" >&5
16062 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
16063
16064 cat >>confdefs.h <<EOF
16065 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
16066 EOF
16067
16068 else
16069         cf_cv_typeof_chtype=$NCURSES_CHTYPE
16070 fi
16071 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
16072
16073 echo "$as_me:16073: checking if unsigned literals are legal" >&5
16074 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
16075 if test "${cf_cv_unsigned_literals+set}" = set; then
16076   echo $ECHO_N "(cached) $ECHO_C" >&6
16077 else
16078
16079         cat >conftest.$ac_ext <<_ACEOF
16080 #line 16080 "configure"
16081 #include "confdefs.h"
16082
16083 int
16084 main ()
16085 {
16086 long x = 1L + 1UL + 1U + 1
16087   ;
16088   return 0;
16089 }
16090 _ACEOF
16091 rm -f conftest.$ac_objext
16092 if { (eval echo "$as_me:16092: \"$ac_compile\"") >&5
16093   (eval $ac_compile) 2>&5
16094   ac_status=$?
16095   echo "$as_me:16095: \$? = $ac_status" >&5
16096   (exit $ac_status); } &&
16097          { ac_try='test -s conftest.$ac_objext'
16098   { (eval echo "$as_me:16098: \"$ac_try\"") >&5
16099   (eval $ac_try) 2>&5
16100   ac_status=$?
16101   echo "$as_me:16101: \$? = $ac_status" >&5
16102   (exit $ac_status); }; }; then
16103   cf_cv_unsigned_literals=yes
16104 else
16105   echo "$as_me: failed program was:" >&5
16106 cat conftest.$ac_ext >&5
16107 cf_cv_unsigned_literals=no
16108 fi
16109 rm -f conftest.$ac_objext conftest.$ac_ext
16110
16111 fi
16112
16113 echo "$as_me:16113: result: $cf_cv_unsigned_literals" >&5
16114 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16115
16116 cf_cv_1UL="1"
16117 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16118 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
16119
16120 if test $NCURSES_MMASK_T = auto ; then
16121         cf_cv_typeof_mmask_t=long
16122 else
16123         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16124 fi
16125 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16126
16127 ###     Checks for external-data
16128
16129 echo "$as_me:16129: checking if external errno is declared" >&5
16130 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16131 if test "${cf_cv_dcl_errno+set}" = set; then
16132   echo $ECHO_N "(cached) $ECHO_C" >&6
16133 else
16134
16135         cat >conftest.$ac_ext <<_ACEOF
16136 #line 16136 "configure"
16137 #include "confdefs.h"
16138
16139 #ifdef HAVE_STDLIB_H
16140 #include <stdlib.h>
16141 #endif
16142 #include <stdio.h>
16143 #include <sys/types.h>
16144 #include <errno.h>
16145 int
16146 main ()
16147 {
16148 int x = (int) errno
16149   ;
16150   return 0;
16151 }
16152 _ACEOF
16153 rm -f conftest.$ac_objext
16154 if { (eval echo "$as_me:16154: \"$ac_compile\"") >&5
16155   (eval $ac_compile) 2>&5
16156   ac_status=$?
16157   echo "$as_me:16157: \$? = $ac_status" >&5
16158   (exit $ac_status); } &&
16159          { ac_try='test -s conftest.$ac_objext'
16160   { (eval echo "$as_me:16160: \"$ac_try\"") >&5
16161   (eval $ac_try) 2>&5
16162   ac_status=$?
16163   echo "$as_me:16163: \$? = $ac_status" >&5
16164   (exit $ac_status); }; }; then
16165   cf_cv_dcl_errno=yes
16166 else
16167   echo "$as_me: failed program was:" >&5
16168 cat conftest.$ac_ext >&5
16169 cf_cv_dcl_errno=no
16170 fi
16171 rm -f conftest.$ac_objext conftest.$ac_ext
16172
16173 fi
16174 echo "$as_me:16174: result: $cf_cv_dcl_errno" >&5
16175 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16176
16177 if test "$cf_cv_dcl_errno" = no ; then
16178
16179 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16180
16181         cat >>confdefs.h <<EOF
16182 #define $cf_result 1
16183 EOF
16184
16185 fi
16186
16187 # It's possible (for near-UNIX clones) that the data doesn't exist
16188
16189 echo "$as_me:16189: checking if external errno exists" >&5
16190 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16191 if test "${cf_cv_have_errno+set}" = set; then
16192   echo $ECHO_N "(cached) $ECHO_C" >&6
16193 else
16194
16195         cat >conftest.$ac_ext <<_ACEOF
16196 #line 16196 "configure"
16197 #include "confdefs.h"
16198
16199 #undef errno
16200 extern int errno;
16201
16202 int
16203 main ()
16204 {
16205 errno = 2
16206   ;
16207   return 0;
16208 }
16209 _ACEOF
16210 rm -f conftest.$ac_objext conftest$ac_exeext
16211 if { (eval echo "$as_me:16211: \"$ac_link\"") >&5
16212   (eval $ac_link) 2>&5
16213   ac_status=$?
16214   echo "$as_me:16214: \$? = $ac_status" >&5
16215   (exit $ac_status); } &&
16216          { ac_try='test -s conftest$ac_exeext'
16217   { (eval echo "$as_me:16217: \"$ac_try\"") >&5
16218   (eval $ac_try) 2>&5
16219   ac_status=$?
16220   echo "$as_me:16220: \$? = $ac_status" >&5
16221   (exit $ac_status); }; }; then
16222   cf_cv_have_errno=yes
16223 else
16224   echo "$as_me: failed program was:" >&5
16225 cat conftest.$ac_ext >&5
16226 cf_cv_have_errno=no
16227 fi
16228 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16229
16230 fi
16231 echo "$as_me:16231: result: $cf_cv_have_errno" >&5
16232 echo "${ECHO_T}$cf_cv_have_errno" >&6
16233
16234 if test "$cf_cv_have_errno" = yes ; then
16235
16236 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16237
16238         cat >>confdefs.h <<EOF
16239 #define $cf_result 1
16240 EOF
16241
16242 fi
16243
16244 echo "$as_me:16244: checking if data-only library module links" >&5
16245 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16246 if test "${cf_cv_link_dataonly+set}" = set; then
16247   echo $ECHO_N "(cached) $ECHO_C" >&6
16248 else
16249
16250         rm -f conftest.a
16251         cat >conftest.$ac_ext <<EOF
16252 #line 16252 "configure"
16253 int     testdata[3] = { 123, 456, 789 };
16254 EOF
16255         if { (eval echo "$as_me:16255: \"$ac_compile\"") >&5
16256   (eval $ac_compile) 2>&5
16257   ac_status=$?
16258   echo "$as_me:16258: \$? = $ac_status" >&5
16259   (exit $ac_status); } ; then
16260                 mv conftest.o data.o && \
16261                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16262         fi
16263         rm -f conftest.$ac_ext data.o
16264         cat >conftest.$ac_ext <<EOF
16265 #line 16265 "configure"
16266 int     testfunc()
16267 {
16268 #if defined(NeXT)
16269         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16270 #else
16271         extern int testdata[3];
16272         return testdata[0] == 123
16273            &&  testdata[1] == 456
16274            &&  testdata[2] == 789;
16275 #endif
16276 }
16277 EOF
16278         if { (eval echo "$as_me:16278: \"$ac_compile\"") >&5
16279   (eval $ac_compile) 2>&5
16280   ac_status=$?
16281   echo "$as_me:16281: \$? = $ac_status" >&5
16282   (exit $ac_status); }; then
16283                 mv conftest.o func.o && \
16284                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16285         fi
16286         rm -f conftest.$ac_ext func.o
16287         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16288         cf_saveLIBS="$LIBS"
16289         LIBS="conftest.a $LIBS"
16290         if test "$cross_compiling" = yes; then
16291   cf_cv_link_dataonly=unknown
16292 else
16293   cat >conftest.$ac_ext <<_ACEOF
16294 #line 16294 "configure"
16295 #include "confdefs.h"
16296
16297         int main()
16298         {
16299                 extern int testfunc();
16300                 ${cf_cv_main_return:-return} (!testfunc());
16301         }
16302
16303 _ACEOF
16304 rm -f conftest$ac_exeext
16305 if { (eval echo "$as_me:16305: \"$ac_link\"") >&5
16306   (eval $ac_link) 2>&5
16307   ac_status=$?
16308   echo "$as_me:16308: \$? = $ac_status" >&5
16309   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16310   { (eval echo "$as_me:16310: \"$ac_try\"") >&5
16311   (eval $ac_try) 2>&5
16312   ac_status=$?
16313   echo "$as_me:16313: \$? = $ac_status" >&5
16314   (exit $ac_status); }; }; then
16315   cf_cv_link_dataonly=yes
16316 else
16317   echo "$as_me: program exited with status $ac_status" >&5
16318 echo "$as_me: failed program was:" >&5
16319 cat conftest.$ac_ext >&5
16320 cf_cv_link_dataonly=no
16321 fi
16322 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16323 fi
16324         LIBS="$cf_saveLIBS"
16325
16326 fi
16327
16328 echo "$as_me:16328: result: $cf_cv_link_dataonly" >&5
16329 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16330
16331 if test "$cf_cv_link_dataonly" = no ; then
16332
16333 cat >>confdefs.h <<\EOF
16334 #define BROKEN_LINKER 1
16335 EOF
16336
16337         BROKEN_LINKER=1
16338 fi
16339
16340 ###     Checks for library functions.
16341
16342 for ac_func in \
16343 getcwd \
16344 getegid \
16345 geteuid \
16346 getopt \
16347 getttynam \
16348 issetugid \
16349 poll \
16350 putenv \
16351 remove \
16352 select \
16353 setbuf \
16354 setbuffer \
16355 setenv \
16356 setvbuf \
16357 sigaction \
16358 sigvec \
16359 strdup \
16360 strstr \
16361 tcgetpgrp \
16362 times \
16363 vsnprintf \
16364
16365 do
16366 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16367 echo "$as_me:16367: checking for $ac_func" >&5
16368 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16369 if eval "test \"\${$as_ac_var+set}\" = set"; then
16370   echo $ECHO_N "(cached) $ECHO_C" >&6
16371 else
16372   cat >conftest.$ac_ext <<_ACEOF
16373 #line 16373 "configure"
16374 #include "confdefs.h"
16375 /* System header to define __stub macros and hopefully few prototypes,
16376     which can conflict with char $ac_func (); below.  */
16377 #include <assert.h>
16378 /* Override any gcc2 internal prototype to avoid an error.  */
16379 #ifdef __cplusplus
16380 extern "C"
16381 #endif
16382 /* We use char because int might match the return type of a gcc2
16383    builtin and then its argument prototype would still apply.  */
16384 char $ac_func ();
16385 char (*f) ();
16386
16387 int
16388 main ()
16389 {
16390 /* The GNU C library defines this for functions which it implements
16391     to always fail with ENOSYS.  Some functions are actually named
16392     something starting with __ and the normal name is an alias.  */
16393 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16394 choke me
16395 #else
16396 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16397 #endif
16398
16399   ;
16400   return 0;
16401 }
16402 _ACEOF
16403 rm -f conftest.$ac_objext conftest$ac_exeext
16404 if { (eval echo "$as_me:16404: \"$ac_link\"") >&5
16405   (eval $ac_link) 2>&5
16406   ac_status=$?
16407   echo "$as_me:16407: \$? = $ac_status" >&5
16408   (exit $ac_status); } &&
16409          { ac_try='test -s conftest$ac_exeext'
16410   { (eval echo "$as_me:16410: \"$ac_try\"") >&5
16411   (eval $ac_try) 2>&5
16412   ac_status=$?
16413   echo "$as_me:16413: \$? = $ac_status" >&5
16414   (exit $ac_status); }; }; then
16415   eval "$as_ac_var=yes"
16416 else
16417   echo "$as_me: failed program was:" >&5
16418 cat conftest.$ac_ext >&5
16419 eval "$as_ac_var=no"
16420 fi
16421 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16422 fi
16423 echo "$as_me:16423: result: `eval echo '${'$as_ac_var'}'`" >&5
16424 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16425 if test `eval echo '${'$as_ac_var'}'` = yes; then
16426   cat >>confdefs.h <<EOF
16427 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16428 EOF
16429
16430 fi
16431 done
16432
16433 if test "x$ac_cv_func_getopt" = xno &&
16434    test "x$cf_with_progs$cf_with_tests" != xnono; then
16435         { { echo "$as_me:16435: error: getopt is required for building programs" >&5
16436 echo "$as_me: error: getopt is required for building programs" >&2;}
16437    { (exit 1); exit 1; }; }
16438 fi
16439
16440 if test "x$with_getcap" = "xyes" ; then
16441
16442 echo "$as_me:16442: checking for terminal-capability database functions" >&5
16443 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16444 if test "${cf_cv_cgetent+set}" = set; then
16445   echo $ECHO_N "(cached) $ECHO_C" >&6
16446 else
16447
16448 cat >conftest.$ac_ext <<_ACEOF
16449 #line 16449 "configure"
16450 #include "confdefs.h"
16451
16452 #include <stdlib.h>
16453 int
16454 main ()
16455 {
16456
16457         char temp[128];
16458         char *buf = temp;
16459         char *db_array = temp;
16460         cgetent(&buf, &db_array, "vt100");
16461         cgetcap(buf, "tc", '=');
16462         cgetmatch(buf, "tc");
16463
16464   ;
16465   return 0;
16466 }
16467 _ACEOF
16468 rm -f conftest.$ac_objext conftest$ac_exeext
16469 if { (eval echo "$as_me:16469: \"$ac_link\"") >&5
16470   (eval $ac_link) 2>&5
16471   ac_status=$?
16472   echo "$as_me:16472: \$? = $ac_status" >&5
16473   (exit $ac_status); } &&
16474          { ac_try='test -s conftest$ac_exeext'
16475   { (eval echo "$as_me:16475: \"$ac_try\"") >&5
16476   (eval $ac_try) 2>&5
16477   ac_status=$?
16478   echo "$as_me:16478: \$? = $ac_status" >&5
16479   (exit $ac_status); }; }; then
16480   cf_cv_cgetent=yes
16481 else
16482   echo "$as_me: failed program was:" >&5
16483 cat conftest.$ac_ext >&5
16484 cf_cv_cgetent=no
16485 fi
16486 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16487
16488 fi
16489 echo "$as_me:16489: result: $cf_cv_cgetent" >&5
16490 echo "${ECHO_T}$cf_cv_cgetent" >&6
16491
16492 if test "$cf_cv_cgetent" = yes
16493 then
16494
16495 cat >>confdefs.h <<\EOF
16496 #define HAVE_BSD_CGETENT 1
16497 EOF
16498
16499 echo "$as_me:16499: checking if cgetent uses const parameter" >&5
16500 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16501 if test "${cf_cv_cgetent_const+set}" = set; then
16502   echo $ECHO_N "(cached) $ECHO_C" >&6
16503 else
16504
16505 cat >conftest.$ac_ext <<_ACEOF
16506 #line 16506 "configure"
16507 #include "confdefs.h"
16508
16509 #include <stdlib.h>
16510 int
16511 main ()
16512 {
16513
16514         char temp[128];
16515         char *buf = temp;
16516 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16517         const char *db_array = temp;
16518         cgetent(&buf, &db_array, "vt100");
16519 #endif
16520         cgetcap(buf, "tc", '=');
16521         cgetmatch(buf, "tc");
16522
16523   ;
16524   return 0;
16525 }
16526 _ACEOF
16527 rm -f conftest.$ac_objext conftest$ac_exeext
16528 if { (eval echo "$as_me:16528: \"$ac_link\"") >&5
16529   (eval $ac_link) 2>&5
16530   ac_status=$?
16531   echo "$as_me:16531: \$? = $ac_status" >&5
16532   (exit $ac_status); } &&
16533          { ac_try='test -s conftest$ac_exeext'
16534   { (eval echo "$as_me:16534: \"$ac_try\"") >&5
16535   (eval $ac_try) 2>&5
16536   ac_status=$?
16537   echo "$as_me:16537: \$? = $ac_status" >&5
16538   (exit $ac_status); }; }; then
16539   cf_cv_cgetent_const=yes
16540 else
16541   echo "$as_me: failed program was:" >&5
16542 cat conftest.$ac_ext >&5
16543 cf_cv_cgetent_const=no
16544 fi
16545 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16546
16547 fi
16548 echo "$as_me:16548: result: $cf_cv_cgetent_const" >&5
16549 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16550         if test "$cf_cv_cgetent_const" = yes
16551         then
16552
16553 cat >>confdefs.h <<EOF
16554 #define CGETENT_CONST const
16555 EOF
16556
16557         fi
16558 fi
16559
16560 fi
16561
16562 echo "$as_me:16562: checking for isascii" >&5
16563 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16564 if test "${cf_cv_have_isascii+set}" = set; then
16565   echo $ECHO_N "(cached) $ECHO_C" >&6
16566 else
16567
16568         cat >conftest.$ac_ext <<_ACEOF
16569 #line 16569 "configure"
16570 #include "confdefs.h"
16571 #include <ctype.h>
16572 int
16573 main ()
16574 {
16575 int x = isascii(' ')
16576   ;
16577   return 0;
16578 }
16579 _ACEOF
16580 rm -f conftest.$ac_objext conftest$ac_exeext
16581 if { (eval echo "$as_me:16581: \"$ac_link\"") >&5
16582   (eval $ac_link) 2>&5
16583   ac_status=$?
16584   echo "$as_me:16584: \$? = $ac_status" >&5
16585   (exit $ac_status); } &&
16586          { ac_try='test -s conftest$ac_exeext'
16587   { (eval echo "$as_me:16587: \"$ac_try\"") >&5
16588   (eval $ac_try) 2>&5
16589   ac_status=$?
16590   echo "$as_me:16590: \$? = $ac_status" >&5
16591   (exit $ac_status); }; }; then
16592   cf_cv_have_isascii=yes
16593 else
16594   echo "$as_me: failed program was:" >&5
16595 cat conftest.$ac_ext >&5
16596 cf_cv_have_isascii=no
16597 fi
16598 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16599
16600 fi
16601 echo "$as_me:16601: result: $cf_cv_have_isascii" >&5
16602 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16603 test "$cf_cv_have_isascii" = yes &&
16604 cat >>confdefs.h <<\EOF
16605 #define HAVE_ISASCII 1
16606 EOF
16607
16608 if test "$ac_cv_func_sigaction" = yes; then
16609 echo "$as_me:16609: checking whether sigaction needs _POSIX_SOURCE" >&5
16610 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16611 cat >conftest.$ac_ext <<_ACEOF
16612 #line 16612 "configure"
16613 #include "confdefs.h"
16614
16615 #include <sys/types.h>
16616 #include <signal.h>
16617 int
16618 main ()
16619 {
16620 struct sigaction act
16621   ;
16622   return 0;
16623 }
16624 _ACEOF
16625 rm -f conftest.$ac_objext
16626 if { (eval echo "$as_me:16626: \"$ac_compile\"") >&5
16627   (eval $ac_compile) 2>&5
16628   ac_status=$?
16629   echo "$as_me:16629: \$? = $ac_status" >&5
16630   (exit $ac_status); } &&
16631          { ac_try='test -s conftest.$ac_objext'
16632   { (eval echo "$as_me:16632: \"$ac_try\"") >&5
16633   (eval $ac_try) 2>&5
16634   ac_status=$?
16635   echo "$as_me:16635: \$? = $ac_status" >&5
16636   (exit $ac_status); }; }; then
16637   sigact_bad=no
16638 else
16639   echo "$as_me: failed program was:" >&5
16640 cat conftest.$ac_ext >&5
16641
16642 cat >conftest.$ac_ext <<_ACEOF
16643 #line 16643 "configure"
16644 #include "confdefs.h"
16645
16646 #define _POSIX_SOURCE
16647 #include <sys/types.h>
16648 #include <signal.h>
16649 int
16650 main ()
16651 {
16652 struct sigaction act
16653   ;
16654   return 0;
16655 }
16656 _ACEOF
16657 rm -f conftest.$ac_objext
16658 if { (eval echo "$as_me:16658: \"$ac_compile\"") >&5
16659   (eval $ac_compile) 2>&5
16660   ac_status=$?
16661   echo "$as_me:16661: \$? = $ac_status" >&5
16662   (exit $ac_status); } &&
16663          { ac_try='test -s conftest.$ac_objext'
16664   { (eval echo "$as_me:16664: \"$ac_try\"") >&5
16665   (eval $ac_try) 2>&5
16666   ac_status=$?
16667   echo "$as_me:16667: \$? = $ac_status" >&5
16668   (exit $ac_status); }; }; then
16669   sigact_bad=yes
16670
16671 cat >>confdefs.h <<\EOF
16672 #define _POSIX_SOURCE 1
16673 EOF
16674
16675 else
16676   echo "$as_me: failed program was:" >&5
16677 cat conftest.$ac_ext >&5
16678 sigact_bad=unknown
16679 fi
16680 rm -f conftest.$ac_objext conftest.$ac_ext
16681 fi
16682 rm -f conftest.$ac_objext conftest.$ac_ext
16683 echo "$as_me:16683: result: $sigact_bad" >&5
16684 echo "${ECHO_T}$sigact_bad" >&6
16685 fi
16686
16687 echo "$as_me:16687: checking if nanosleep really works" >&5
16688 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16689 if test "${cf_cv_func_nanosleep+set}" = set; then
16690   echo $ECHO_N "(cached) $ECHO_C" >&6
16691 else
16692
16693 if test "$cross_compiling" = yes; then
16694   cf_cv_func_nanosleep=unknown
16695 else
16696   cat >conftest.$ac_ext <<_ACEOF
16697 #line 16697 "configure"
16698 #include "confdefs.h"
16699
16700 #include <stdio.h>
16701 #include <errno.h>
16702 #include <time.h>
16703
16704 #ifdef HAVE_SYS_TIME_H
16705 #include <sys/time.h>
16706 #endif
16707
16708 int main() {
16709         struct timespec ts1, ts2;
16710         int code;
16711         ts1.tv_sec  = 0;
16712         ts1.tv_nsec = 750000000;
16713         ts2.tv_sec  = 0;
16714         ts2.tv_nsec = 0;
16715         errno = 0;
16716         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16717         ${cf_cv_main_return:-return}(code != 0);
16718 }
16719
16720 _ACEOF
16721 rm -f conftest$ac_exeext
16722 if { (eval echo "$as_me:16722: \"$ac_link\"") >&5
16723   (eval $ac_link) 2>&5
16724   ac_status=$?
16725   echo "$as_me:16725: \$? = $ac_status" >&5
16726   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16727   { (eval echo "$as_me:16727: \"$ac_try\"") >&5
16728   (eval $ac_try) 2>&5
16729   ac_status=$?
16730   echo "$as_me:16730: \$? = $ac_status" >&5
16731   (exit $ac_status); }; }; then
16732   cf_cv_func_nanosleep=yes
16733 else
16734   echo "$as_me: program exited with status $ac_status" >&5
16735 echo "$as_me: failed program was:" >&5
16736 cat conftest.$ac_ext >&5
16737 cf_cv_func_nanosleep=no
16738 fi
16739 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16740 fi
16741 fi
16742 echo "$as_me:16742: result: $cf_cv_func_nanosleep" >&5
16743 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16744
16745 test "$cf_cv_func_nanosleep" = "yes" &&
16746 cat >>confdefs.h <<\EOF
16747 #define HAVE_NANOSLEEP 1
16748 EOF
16749
16750 for ac_header in \
16751 termio.h \
16752 termios.h \
16753 unistd.h \
16754
16755 do
16756 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16757 echo "$as_me:16757: checking for $ac_header" >&5
16758 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16759 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16760   echo $ECHO_N "(cached) $ECHO_C" >&6
16761 else
16762   cat >conftest.$ac_ext <<_ACEOF
16763 #line 16763 "configure"
16764 #include "confdefs.h"
16765 #include <$ac_header>
16766 _ACEOF
16767 if { (eval echo "$as_me:16767: \"$ac_cpp conftest.$ac_ext\"") >&5
16768   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16769   ac_status=$?
16770   egrep -v '^ *\+' conftest.er1 >conftest.err
16771   rm -f conftest.er1
16772   cat conftest.err >&5
16773   echo "$as_me:16773: \$? = $ac_status" >&5
16774   (exit $ac_status); } >/dev/null; then
16775   if test -s conftest.err; then
16776     ac_cpp_err=$ac_c_preproc_warn_flag
16777   else
16778     ac_cpp_err=
16779   fi
16780 else
16781   ac_cpp_err=yes
16782 fi
16783 if test -z "$ac_cpp_err"; then
16784   eval "$as_ac_Header=yes"
16785 else
16786   echo "$as_me: failed program was:" >&5
16787   cat conftest.$ac_ext >&5
16788   eval "$as_ac_Header=no"
16789 fi
16790 rm -f conftest.err conftest.$ac_ext
16791 fi
16792 echo "$as_me:16792: result: `eval echo '${'$as_ac_Header'}'`" >&5
16793 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16794 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16795   cat >>confdefs.h <<EOF
16796 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16797 EOF
16798
16799 fi
16800 done
16801
16802 if test "$ISC" = yes ; then
16803
16804 for ac_header in sys/termio.h
16805 do
16806 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16807 echo "$as_me:16807: checking for $ac_header" >&5
16808 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16809 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16810   echo $ECHO_N "(cached) $ECHO_C" >&6
16811 else
16812   cat >conftest.$ac_ext <<_ACEOF
16813 #line 16813 "configure"
16814 #include "confdefs.h"
16815 #include <$ac_header>
16816 _ACEOF
16817 if { (eval echo "$as_me:16817: \"$ac_cpp conftest.$ac_ext\"") >&5
16818   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16819   ac_status=$?
16820   egrep -v '^ *\+' conftest.er1 >conftest.err
16821   rm -f conftest.er1
16822   cat conftest.err >&5
16823   echo "$as_me:16823: \$? = $ac_status" >&5
16824   (exit $ac_status); } >/dev/null; then
16825   if test -s conftest.err; then
16826     ac_cpp_err=$ac_c_preproc_warn_flag
16827   else
16828     ac_cpp_err=
16829   fi
16830 else
16831   ac_cpp_err=yes
16832 fi
16833 if test -z "$ac_cpp_err"; then
16834   eval "$as_ac_Header=yes"
16835 else
16836   echo "$as_me: failed program was:" >&5
16837   cat conftest.$ac_ext >&5
16838   eval "$as_ac_Header=no"
16839 fi
16840 rm -f conftest.err conftest.$ac_ext
16841 fi
16842 echo "$as_me:16842: result: `eval echo '${'$as_ac_Header'}'`" >&5
16843 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16844 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16845   cat >>confdefs.h <<EOF
16846 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16847 EOF
16848
16849 fi
16850 done
16851
16852 fi
16853 if test "$ac_cv_header_termios_h" = yes ; then
16854         case "$CFLAGS $CPPFLAGS" in
16855         (*-D_POSIX_SOURCE*)
16856                 termios_bad=dunno ;;
16857         (*)     termios_bad=maybe ;;
16858         esac
16859         if test "$termios_bad" = maybe ; then
16860         echo "$as_me:16860: checking whether termios.h needs _POSIX_SOURCE" >&5
16861 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16862         cat >conftest.$ac_ext <<_ACEOF
16863 #line 16863 "configure"
16864 #include "confdefs.h"
16865 #include <termios.h>
16866 int
16867 main ()
16868 {
16869 struct termios foo; int x = foo.c_iflag
16870   ;
16871   return 0;
16872 }
16873 _ACEOF
16874 rm -f conftest.$ac_objext
16875 if { (eval echo "$as_me:16875: \"$ac_compile\"") >&5
16876   (eval $ac_compile) 2>&5
16877   ac_status=$?
16878   echo "$as_me:16878: \$? = $ac_status" >&5
16879   (exit $ac_status); } &&
16880          { ac_try='test -s conftest.$ac_objext'
16881   { (eval echo "$as_me:16881: \"$ac_try\"") >&5
16882   (eval $ac_try) 2>&5
16883   ac_status=$?
16884   echo "$as_me:16884: \$? = $ac_status" >&5
16885   (exit $ac_status); }; }; then
16886   termios_bad=no
16887 else
16888   echo "$as_me: failed program was:" >&5
16889 cat conftest.$ac_ext >&5
16890
16891                 cat >conftest.$ac_ext <<_ACEOF
16892 #line 16892 "configure"
16893 #include "confdefs.h"
16894
16895 #define _POSIX_SOURCE
16896 #include <termios.h>
16897 int
16898 main ()
16899 {
16900 struct termios foo; int x = foo.c_iflag
16901   ;
16902   return 0;
16903 }
16904 _ACEOF
16905 rm -f conftest.$ac_objext
16906 if { (eval echo "$as_me:16906: \"$ac_compile\"") >&5
16907   (eval $ac_compile) 2>&5
16908   ac_status=$?
16909   echo "$as_me:16909: \$? = $ac_status" >&5
16910   (exit $ac_status); } &&
16911          { ac_try='test -s conftest.$ac_objext'
16912   { (eval echo "$as_me:16912: \"$ac_try\"") >&5
16913   (eval $ac_try) 2>&5
16914   ac_status=$?
16915   echo "$as_me:16915: \$? = $ac_status" >&5
16916   (exit $ac_status); }; }; then
16917   termios_bad=unknown
16918 else
16919   echo "$as_me: failed program was:" >&5
16920 cat conftest.$ac_ext >&5
16921 termios_bad=yes
16922 cat >>confdefs.h <<\EOF
16923 #define _POSIX_SOURCE 1
16924 EOF
16925
16926 fi
16927 rm -f conftest.$ac_objext conftest.$ac_ext
16928
16929 fi
16930 rm -f conftest.$ac_objext conftest.$ac_ext
16931         echo "$as_me:16931: result: $termios_bad" >&5
16932 echo "${ECHO_T}$termios_bad" >&6
16933         fi
16934 fi
16935
16936 echo "$as_me:16936: checking for tcgetattr" >&5
16937 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16938 if test "${cf_cv_have_tcgetattr+set}" = set; then
16939   echo $ECHO_N "(cached) $ECHO_C" >&6
16940 else
16941
16942 cat >conftest.$ac_ext <<_ACEOF
16943 #line 16943 "configure"
16944 #include "confdefs.h"
16945
16946 #include <sys/types.h>
16947 #ifdef HAVE_UNISTD_H
16948 #include <unistd.h>
16949 #endif
16950 #ifdef HAVE_TERMIOS_H
16951 #include <termios.h>
16952 #define TTY struct termios
16953 #else
16954 #ifdef HAVE_TERMIO_H
16955 #include <termio.h>
16956 #define TTY struct termio
16957 #endif
16958 #endif
16959
16960 int
16961 main ()
16962 {
16963
16964 TTY foo;
16965 tcgetattr(1, &foo);
16966   ;
16967   return 0;
16968 }
16969 _ACEOF
16970 rm -f conftest.$ac_objext conftest$ac_exeext
16971 if { (eval echo "$as_me:16971: \"$ac_link\"") >&5
16972   (eval $ac_link) 2>&5
16973   ac_status=$?
16974   echo "$as_me:16974: \$? = $ac_status" >&5
16975   (exit $ac_status); } &&
16976          { ac_try='test -s conftest$ac_exeext'
16977   { (eval echo "$as_me:16977: \"$ac_try\"") >&5
16978   (eval $ac_try) 2>&5
16979   ac_status=$?
16980   echo "$as_me:16980: \$? = $ac_status" >&5
16981   (exit $ac_status); }; }; then
16982   cf_cv_have_tcgetattr=yes
16983 else
16984   echo "$as_me: failed program was:" >&5
16985 cat conftest.$ac_ext >&5
16986 cf_cv_have_tcgetattr=no
16987 fi
16988 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16989 fi
16990 echo "$as_me:16990: result: $cf_cv_have_tcgetattr" >&5
16991 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16992 test "$cf_cv_have_tcgetattr" = yes &&
16993 cat >>confdefs.h <<\EOF
16994 #define HAVE_TCGETATTR 1
16995 EOF
16996
16997 echo "$as_me:16997: checking for vsscanf function or workaround" >&5
16998 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16999 if test "${cf_cv_func_vsscanf+set}" = set; then
17000   echo $ECHO_N "(cached) $ECHO_C" >&6
17001 else
17002
17003 cat >conftest.$ac_ext <<_ACEOF
17004 #line 17004 "configure"
17005 #include "confdefs.h"
17006
17007 #include <stdarg.h>
17008 #include <stdio.h>
17009 int
17010 main ()
17011 {
17012
17013         va_list ap;
17014         vsscanf("from", "%d", ap)
17015   ;
17016   return 0;
17017 }
17018 _ACEOF
17019 rm -f conftest.$ac_objext conftest$ac_exeext
17020 if { (eval echo "$as_me:17020: \"$ac_link\"") >&5
17021   (eval $ac_link) 2>&5
17022   ac_status=$?
17023   echo "$as_me:17023: \$? = $ac_status" >&5
17024   (exit $ac_status); } &&
17025          { ac_try='test -s conftest$ac_exeext'
17026   { (eval echo "$as_me:17026: \"$ac_try\"") >&5
17027   (eval $ac_try) 2>&5
17028   ac_status=$?
17029   echo "$as_me:17029: \$? = $ac_status" >&5
17030   (exit $ac_status); }; }; then
17031   cf_cv_func_vsscanf=vsscanf
17032 else
17033   echo "$as_me: failed program was:" >&5
17034 cat conftest.$ac_ext >&5
17035
17036 cat >conftest.$ac_ext <<_ACEOF
17037 #line 17037 "configure"
17038 #include "confdefs.h"
17039
17040 #include <stdarg.h>
17041 #include <stdio.h>
17042 int
17043 main ()
17044 {
17045
17046         FILE strbuf;
17047         char *str = "from";
17048
17049         strbuf._flag = _IOREAD;
17050         strbuf._ptr = strbuf._base = (unsigned char *) str;
17051         strbuf._cnt = strlen(str);
17052         strbuf._file = _NFILE;
17053         return (vfscanf(&strbuf, "%d", ap))
17054   ;
17055   return 0;
17056 }
17057 _ACEOF
17058 rm -f conftest.$ac_objext conftest$ac_exeext
17059 if { (eval echo "$as_me:17059: \"$ac_link\"") >&5
17060   (eval $ac_link) 2>&5
17061   ac_status=$?
17062   echo "$as_me:17062: \$? = $ac_status" >&5
17063   (exit $ac_status); } &&
17064          { ac_try='test -s conftest$ac_exeext'
17065   { (eval echo "$as_me:17065: \"$ac_try\"") >&5
17066   (eval $ac_try) 2>&5
17067   ac_status=$?
17068   echo "$as_me:17068: \$? = $ac_status" >&5
17069   (exit $ac_status); }; }; then
17070   cf_cv_func_vsscanf=vfscanf
17071 else
17072   echo "$as_me: failed program was:" >&5
17073 cat conftest.$ac_ext >&5
17074
17075 cat >conftest.$ac_ext <<_ACEOF
17076 #line 17076 "configure"
17077 #include "confdefs.h"
17078
17079 #include <stdarg.h>
17080 #include <stdio.h>
17081 int
17082 main ()
17083 {
17084
17085         FILE strbuf;
17086         char *str = "from";
17087
17088         strbuf._flag = _IOREAD;
17089         strbuf._ptr = strbuf._base = (unsigned char *) str;
17090         strbuf._cnt = strlen(str);
17091         strbuf._file = _NFILE;
17092         return (_doscan(&strbuf, "%d", ap))
17093   ;
17094   return 0;
17095 }
17096 _ACEOF
17097 rm -f conftest.$ac_objext conftest$ac_exeext
17098 if { (eval echo "$as_me:17098: \"$ac_link\"") >&5
17099   (eval $ac_link) 2>&5
17100   ac_status=$?
17101   echo "$as_me:17101: \$? = $ac_status" >&5
17102   (exit $ac_status); } &&
17103          { ac_try='test -s conftest$ac_exeext'
17104   { (eval echo "$as_me:17104: \"$ac_try\"") >&5
17105   (eval $ac_try) 2>&5
17106   ac_status=$?
17107   echo "$as_me:17107: \$? = $ac_status" >&5
17108   (exit $ac_status); }; }; then
17109   cf_cv_func_vsscanf=_doscan
17110 else
17111   echo "$as_me: failed program was:" >&5
17112 cat conftest.$ac_ext >&5
17113
17114 cf_cv_func_vsscanf=no
17115 fi
17116 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17117 fi
17118 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17119 fi
17120 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17121 fi
17122 echo "$as_me:17122: result: $cf_cv_func_vsscanf" >&5
17123 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17124
17125 case $cf_cv_func_vsscanf in
17126 (vsscanf)
17127 cat >>confdefs.h <<\EOF
17128 #define HAVE_VSSCANF 1
17129 EOF
17130 ;;
17131 (vfscanf)
17132 cat >>confdefs.h <<\EOF
17133 #define HAVE_VFSCANF 1
17134 EOF
17135 ;;
17136 (_doscan)
17137 cat >>confdefs.h <<\EOF
17138 #define HAVE__DOSCAN 1
17139 EOF
17140 ;;
17141 esac
17142
17143 echo "$as_me:17143: checking for working mkstemp" >&5
17144 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17145 if test "${cf_cv_func_mkstemp+set}" = set; then
17146   echo $ECHO_N "(cached) $ECHO_C" >&6
17147 else
17148
17149 rm -rf conftest*
17150 if test "$cross_compiling" = yes; then
17151   cf_cv_func_mkstemp=maybe
17152 else
17153   cat >conftest.$ac_ext <<_ACEOF
17154 #line 17154 "configure"
17155 #include "confdefs.h"
17156
17157 #include <sys/types.h>
17158 #include <stdlib.h>
17159 #include <stdio.h>
17160 #include <string.h>
17161 #include <sys/stat.h>
17162 int main()
17163 {
17164         char *tmpl = "conftestXXXXXX";
17165         char name[2][80];
17166         int n;
17167         int result = 0;
17168         int fd;
17169         struct stat sb;
17170
17171         umask(077);
17172         for (n = 0; n < 2; ++n) {
17173                 strcpy(name[n], tmpl);
17174                 if ((fd = mkstemp(name[n])) >= 0) {
17175                         if (!strcmp(name[n], tmpl)
17176                          || stat(name[n], &sb) != 0
17177                          || (sb.st_mode & S_IFMT) != S_IFREG
17178                          || (sb.st_mode & 077) != 0) {
17179                                 result = 1;
17180                         }
17181                         close(fd);
17182                 }
17183         }
17184         if (result == 0
17185          && !strcmp(name[0], name[1]))
17186                 result = 1;
17187         ${cf_cv_main_return:-return}(result);
17188 }
17189
17190 _ACEOF
17191 rm -f conftest$ac_exeext
17192 if { (eval echo "$as_me:17192: \"$ac_link\"") >&5
17193   (eval $ac_link) 2>&5
17194   ac_status=$?
17195   echo "$as_me:17195: \$? = $ac_status" >&5
17196   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17197   { (eval echo "$as_me:17197: \"$ac_try\"") >&5
17198   (eval $ac_try) 2>&5
17199   ac_status=$?
17200   echo "$as_me:17200: \$? = $ac_status" >&5
17201   (exit $ac_status); }; }; then
17202   cf_cv_func_mkstemp=yes
17203
17204 else
17205   echo "$as_me: program exited with status $ac_status" >&5
17206 echo "$as_me: failed program was:" >&5
17207 cat conftest.$ac_ext >&5
17208 cf_cv_func_mkstemp=no
17209
17210 fi
17211 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17212 fi
17213
17214 fi
17215 echo "$as_me:17215: result: $cf_cv_func_mkstemp" >&5
17216 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17217 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17218         echo "$as_me:17218: checking for mkstemp" >&5
17219 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17220 if test "${ac_cv_func_mkstemp+set}" = set; then
17221   echo $ECHO_N "(cached) $ECHO_C" >&6
17222 else
17223   cat >conftest.$ac_ext <<_ACEOF
17224 #line 17224 "configure"
17225 #include "confdefs.h"
17226 /* System header to define __stub macros and hopefully few prototypes,
17227     which can conflict with char mkstemp (); below.  */
17228 #include <assert.h>
17229 /* Override any gcc2 internal prototype to avoid an error.  */
17230 #ifdef __cplusplus
17231 extern "C"
17232 #endif
17233 /* We use char because int might match the return type of a gcc2
17234    builtin and then its argument prototype would still apply.  */
17235 char mkstemp ();
17236 char (*f) ();
17237
17238 int
17239 main ()
17240 {
17241 /* The GNU C library defines this for functions which it implements
17242     to always fail with ENOSYS.  Some functions are actually named
17243     something starting with __ and the normal name is an alias.  */
17244 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17245 choke me
17246 #else
17247 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17248 #endif
17249
17250   ;
17251   return 0;
17252 }
17253 _ACEOF
17254 rm -f conftest.$ac_objext conftest$ac_exeext
17255 if { (eval echo "$as_me:17255: \"$ac_link\"") >&5
17256   (eval $ac_link) 2>&5
17257   ac_status=$?
17258   echo "$as_me:17258: \$? = $ac_status" >&5
17259   (exit $ac_status); } &&
17260          { ac_try='test -s conftest$ac_exeext'
17261   { (eval echo "$as_me:17261: \"$ac_try\"") >&5
17262   (eval $ac_try) 2>&5
17263   ac_status=$?
17264   echo "$as_me:17264: \$? = $ac_status" >&5
17265   (exit $ac_status); }; }; then
17266   ac_cv_func_mkstemp=yes
17267 else
17268   echo "$as_me: failed program was:" >&5
17269 cat conftest.$ac_ext >&5
17270 ac_cv_func_mkstemp=no
17271 fi
17272 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17273 fi
17274 echo "$as_me:17274: result: $ac_cv_func_mkstemp" >&5
17275 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17276
17277 fi
17278 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17279
17280 cat >>confdefs.h <<\EOF
17281 #define HAVE_MKSTEMP 1
17282 EOF
17283
17284 fi
17285
17286 # setup for prototype of fallback for vsscanf()
17287
17288 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17289         HAVE_VSSCANF=1
17290 else
17291         HAVE_VSSCANF=0
17292 fi
17293
17294 if test "x$cross_compiling" = xyes ; then
17295         { echo "$as_me:17295: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17296 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17297 else
17298         echo "$as_me:17298: checking whether setvbuf arguments are reversed" >&5
17299 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17300 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17301   echo $ECHO_N "(cached) $ECHO_C" >&6
17302 else
17303   if test "$cross_compiling" = yes; then
17304   { { echo "$as_me:17304: error: cannot run test program while cross compiling" >&5
17305 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17306    { (exit 1); exit 1; }; }
17307 else
17308   cat >conftest.$ac_ext <<_ACEOF
17309 #line 17309 "configure"
17310 #include "confdefs.h"
17311 #include <stdio.h>
17312 /* If setvbuf has the reversed format, exit 0. */
17313 int
17314 main ()
17315 {
17316   /* This call has the arguments reversed.
17317      A reversed system may check and see that the address of main
17318      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17319   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17320     $ac_main_return(1);
17321   putc('\r', stdout);
17322   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17323 }
17324 _ACEOF
17325 rm -f conftest$ac_exeext
17326 if { (eval echo "$as_me:17326: \"$ac_link\"") >&5
17327   (eval $ac_link) 2>&5
17328   ac_status=$?
17329   echo "$as_me:17329: \$? = $ac_status" >&5
17330   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17331   { (eval echo "$as_me:17331: \"$ac_try\"") >&5
17332   (eval $ac_try) 2>&5
17333   ac_status=$?
17334   echo "$as_me:17334: \$? = $ac_status" >&5
17335   (exit $ac_status); }; }; then
17336   ac_cv_func_setvbuf_reversed=yes
17337 else
17338   echo "$as_me: program exited with status $ac_status" >&5
17339 echo "$as_me: failed program was:" >&5
17340 cat conftest.$ac_ext >&5
17341 ac_cv_func_setvbuf_reversed=no
17342 fi
17343 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17344 fi
17345 rm -f core core.* *.core
17346 fi
17347 echo "$as_me:17347: result: $ac_cv_func_setvbuf_reversed" >&5
17348 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17349 if test $ac_cv_func_setvbuf_reversed = yes; then
17350
17351 cat >>confdefs.h <<\EOF
17352 #define SETVBUF_REVERSED 1
17353 EOF
17354
17355 fi
17356
17357 fi
17358 echo "$as_me:17358: checking for intptr_t" >&5
17359 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17360 if test "${ac_cv_type_intptr_t+set}" = set; then
17361   echo $ECHO_N "(cached) $ECHO_C" >&6
17362 else
17363   cat >conftest.$ac_ext <<_ACEOF
17364 #line 17364 "configure"
17365 #include "confdefs.h"
17366 $ac_includes_default
17367 int
17368 main ()
17369 {
17370 if ((intptr_t *) 0)
17371   return 0;
17372 if (sizeof (intptr_t))
17373   return 0;
17374   ;
17375   return 0;
17376 }
17377 _ACEOF
17378 rm -f conftest.$ac_objext
17379 if { (eval echo "$as_me:17379: \"$ac_compile\"") >&5
17380   (eval $ac_compile) 2>&5
17381   ac_status=$?
17382   echo "$as_me:17382: \$? = $ac_status" >&5
17383   (exit $ac_status); } &&
17384          { ac_try='test -s conftest.$ac_objext'
17385   { (eval echo "$as_me:17385: \"$ac_try\"") >&5
17386   (eval $ac_try) 2>&5
17387   ac_status=$?
17388   echo "$as_me:17388: \$? = $ac_status" >&5
17389   (exit $ac_status); }; }; then
17390   ac_cv_type_intptr_t=yes
17391 else
17392   echo "$as_me: failed program was:" >&5
17393 cat conftest.$ac_ext >&5
17394 ac_cv_type_intptr_t=no
17395 fi
17396 rm -f conftest.$ac_objext conftest.$ac_ext
17397 fi
17398 echo "$as_me:17398: result: $ac_cv_type_intptr_t" >&5
17399 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17400 if test $ac_cv_type_intptr_t = yes; then
17401   :
17402 else
17403
17404 cat >>confdefs.h <<EOF
17405 #define intptr_t long
17406 EOF
17407
17408 fi
17409
17410 echo "$as_me:17410: checking for ssize_t" >&5
17411 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17412 if test "${ac_cv_type_ssize_t+set}" = set; then
17413   echo $ECHO_N "(cached) $ECHO_C" >&6
17414 else
17415   cat >conftest.$ac_ext <<_ACEOF
17416 #line 17416 "configure"
17417 #include "confdefs.h"
17418 $ac_includes_default
17419 int
17420 main ()
17421 {
17422 if ((ssize_t *) 0)
17423   return 0;
17424 if (sizeof (ssize_t))
17425   return 0;
17426   ;
17427   return 0;
17428 }
17429 _ACEOF
17430 rm -f conftest.$ac_objext
17431 if { (eval echo "$as_me:17431: \"$ac_compile\"") >&5
17432   (eval $ac_compile) 2>&5
17433   ac_status=$?
17434   echo "$as_me:17434: \$? = $ac_status" >&5
17435   (exit $ac_status); } &&
17436          { ac_try='test -s conftest.$ac_objext'
17437   { (eval echo "$as_me:17437: \"$ac_try\"") >&5
17438   (eval $ac_try) 2>&5
17439   ac_status=$?
17440   echo "$as_me:17440: \$? = $ac_status" >&5
17441   (exit $ac_status); }; }; then
17442   ac_cv_type_ssize_t=yes
17443 else
17444   echo "$as_me: failed program was:" >&5
17445 cat conftest.$ac_ext >&5
17446 ac_cv_type_ssize_t=no
17447 fi
17448 rm -f conftest.$ac_objext conftest.$ac_ext
17449 fi
17450 echo "$as_me:17450: result: $ac_cv_type_ssize_t" >&5
17451 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17452 if test $ac_cv_type_ssize_t = yes; then
17453   :
17454 else
17455
17456 cat >>confdefs.h <<EOF
17457 #define ssize_t int
17458 EOF
17459
17460 fi
17461
17462 echo "$as_me:17462: checking for type sigaction_t" >&5
17463 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17464 if test "${cf_cv_type_sigaction+set}" = set; then
17465   echo $ECHO_N "(cached) $ECHO_C" >&6
17466 else
17467
17468         cat >conftest.$ac_ext <<_ACEOF
17469 #line 17469 "configure"
17470 #include "confdefs.h"
17471
17472 #include <signal.h>
17473 int
17474 main ()
17475 {
17476 sigaction_t x
17477   ;
17478   return 0;
17479 }
17480 _ACEOF
17481 rm -f conftest.$ac_objext
17482 if { (eval echo "$as_me:17482: \"$ac_compile\"") >&5
17483   (eval $ac_compile) 2>&5
17484   ac_status=$?
17485   echo "$as_me:17485: \$? = $ac_status" >&5
17486   (exit $ac_status); } &&
17487          { ac_try='test -s conftest.$ac_objext'
17488   { (eval echo "$as_me:17488: \"$ac_try\"") >&5
17489   (eval $ac_try) 2>&5
17490   ac_status=$?
17491   echo "$as_me:17491: \$? = $ac_status" >&5
17492   (exit $ac_status); }; }; then
17493   cf_cv_type_sigaction=yes
17494 else
17495   echo "$as_me: failed program was:" >&5
17496 cat conftest.$ac_ext >&5
17497 cf_cv_type_sigaction=no
17498 fi
17499 rm -f conftest.$ac_objext conftest.$ac_ext
17500 fi
17501
17502 echo "$as_me:17502: result: $cf_cv_type_sigaction" >&5
17503 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17504 test "$cf_cv_type_sigaction" = yes &&
17505 cat >>confdefs.h <<\EOF
17506 #define HAVE_TYPE_SIGACTION 1
17507 EOF
17508
17509 echo "$as_me:17509: checking declaration of size-change" >&5
17510 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17511 if test "${cf_cv_sizechange+set}" = set; then
17512   echo $ECHO_N "(cached) $ECHO_C" >&6
17513 else
17514
17515         cf_cv_sizechange=unknown
17516         cf_save_CPPFLAGS="$CPPFLAGS"
17517
17518 for cf_opts in "" "NEED_PTEM_H"
17519 do
17520
17521         CPPFLAGS="$cf_save_CPPFLAGS"
17522         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17523         cat >conftest.$ac_ext <<_ACEOF
17524 #line 17524 "configure"
17525 #include "confdefs.h"
17526 #include <sys/types.h>
17527 #ifdef HAVE_TERMIOS_H
17528 #include <termios.h>
17529 #else
17530 #ifdef HAVE_TERMIO_H
17531 #include <termio.h>
17532 #endif
17533 #endif
17534 #ifdef NEED_PTEM_H
17535 /* This is a workaround for SCO:  they neglected to define struct winsize in
17536  * termios.h -- it's only in termio.h and ptem.h
17537  */
17538 #include        <sys/stream.h>
17539 #include        <sys/ptem.h>
17540 #endif
17541 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17542 #include <sys/ioctl.h>
17543 #endif
17544
17545 int
17546 main ()
17547 {
17548
17549 #ifdef TIOCGSIZE
17550         struct ttysize win;     /* FIXME: what system is this? */
17551         int y = win.ts_lines;
17552         int x = win.ts_cols;
17553 #else
17554 #ifdef TIOCGWINSZ
17555         struct winsize win;
17556         int y = win.ws_row;
17557         int x = win.ws_col;
17558 #else
17559         no TIOCGSIZE or TIOCGWINSZ
17560 #endif /* TIOCGWINSZ */
17561 #endif /* TIOCGSIZE */
17562
17563   ;
17564   return 0;
17565 }
17566 _ACEOF
17567 rm -f conftest.$ac_objext
17568 if { (eval echo "$as_me:17568: \"$ac_compile\"") >&5
17569   (eval $ac_compile) 2>&5
17570   ac_status=$?
17571   echo "$as_me:17571: \$? = $ac_status" >&5
17572   (exit $ac_status); } &&
17573          { ac_try='test -s conftest.$ac_objext'
17574   { (eval echo "$as_me:17574: \"$ac_try\"") >&5
17575   (eval $ac_try) 2>&5
17576   ac_status=$?
17577   echo "$as_me:17577: \$? = $ac_status" >&5
17578   (exit $ac_status); }; }; then
17579   cf_cv_sizechange=yes
17580 else
17581   echo "$as_me: failed program was:" >&5
17582 cat conftest.$ac_ext >&5
17583 cf_cv_sizechange=no
17584 fi
17585 rm -f conftest.$ac_objext conftest.$ac_ext
17586
17587         CPPFLAGS="$cf_save_CPPFLAGS"
17588         if test "$cf_cv_sizechange" = yes ; then
17589                 echo "size-change succeeded ($cf_opts)" >&5
17590                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17591                 break
17592         fi
17593 done
17594
17595 fi
17596 echo "$as_me:17596: result: $cf_cv_sizechange" >&5
17597 echo "${ECHO_T}$cf_cv_sizechange" >&6
17598 if test "$cf_cv_sizechange" != no ; then
17599
17600 cat >>confdefs.h <<\EOF
17601 #define HAVE_SIZECHANGE 1
17602 EOF
17603
17604         case $cf_cv_sizechange in
17605         (NEED*)
17606                 cat >>confdefs.h <<EOF
17607 #define $cf_cv_sizechange  1
17608 EOF
17609
17610                 ;;
17611         esac
17612 fi
17613
17614 echo "$as_me:17614: checking for memmove" >&5
17615 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17616 if test "${ac_cv_func_memmove+set}" = set; then
17617   echo $ECHO_N "(cached) $ECHO_C" >&6
17618 else
17619   cat >conftest.$ac_ext <<_ACEOF
17620 #line 17620 "configure"
17621 #include "confdefs.h"
17622 /* System header to define __stub macros and hopefully few prototypes,
17623     which can conflict with char memmove (); below.  */
17624 #include <assert.h>
17625 /* Override any gcc2 internal prototype to avoid an error.  */
17626 #ifdef __cplusplus
17627 extern "C"
17628 #endif
17629 /* We use char because int might match the return type of a gcc2
17630    builtin and then its argument prototype would still apply.  */
17631 char memmove ();
17632 char (*f) ();
17633
17634 int
17635 main ()
17636 {
17637 /* The GNU C library defines this for functions which it implements
17638     to always fail with ENOSYS.  Some functions are actually named
17639     something starting with __ and the normal name is an alias.  */
17640 #if defined (__stub_memmove) || defined (__stub___memmove)
17641 choke me
17642 #else
17643 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17644 #endif
17645
17646   ;
17647   return 0;
17648 }
17649 _ACEOF
17650 rm -f conftest.$ac_objext conftest$ac_exeext
17651 if { (eval echo "$as_me:17651: \"$ac_link\"") >&5
17652   (eval $ac_link) 2>&5
17653   ac_status=$?
17654   echo "$as_me:17654: \$? = $ac_status" >&5
17655   (exit $ac_status); } &&
17656          { ac_try='test -s conftest$ac_exeext'
17657   { (eval echo "$as_me:17657: \"$ac_try\"") >&5
17658   (eval $ac_try) 2>&5
17659   ac_status=$?
17660   echo "$as_me:17660: \$? = $ac_status" >&5
17661   (exit $ac_status); }; }; then
17662   ac_cv_func_memmove=yes
17663 else
17664   echo "$as_me: failed program was:" >&5
17665 cat conftest.$ac_ext >&5
17666 ac_cv_func_memmove=no
17667 fi
17668 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17669 fi
17670 echo "$as_me:17670: result: $ac_cv_func_memmove" >&5
17671 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17672 if test $ac_cv_func_memmove = yes; then
17673   :
17674 else
17675
17676 echo "$as_me:17676: checking for bcopy" >&5
17677 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17678 if test "${ac_cv_func_bcopy+set}" = set; then
17679   echo $ECHO_N "(cached) $ECHO_C" >&6
17680 else
17681   cat >conftest.$ac_ext <<_ACEOF
17682 #line 17682 "configure"
17683 #include "confdefs.h"
17684 /* System header to define __stub macros and hopefully few prototypes,
17685     which can conflict with char bcopy (); below.  */
17686 #include <assert.h>
17687 /* Override any gcc2 internal prototype to avoid an error.  */
17688 #ifdef __cplusplus
17689 extern "C"
17690 #endif
17691 /* We use char because int might match the return type of a gcc2
17692    builtin and then its argument prototype would still apply.  */
17693 char bcopy ();
17694 char (*f) ();
17695
17696 int
17697 main ()
17698 {
17699 /* The GNU C library defines this for functions which it implements
17700     to always fail with ENOSYS.  Some functions are actually named
17701     something starting with __ and the normal name is an alias.  */
17702 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17703 choke me
17704 #else
17705 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17706 #endif
17707
17708   ;
17709   return 0;
17710 }
17711 _ACEOF
17712 rm -f conftest.$ac_objext conftest$ac_exeext
17713 if { (eval echo "$as_me:17713: \"$ac_link\"") >&5
17714   (eval $ac_link) 2>&5
17715   ac_status=$?
17716   echo "$as_me:17716: \$? = $ac_status" >&5
17717   (exit $ac_status); } &&
17718          { ac_try='test -s conftest$ac_exeext'
17719   { (eval echo "$as_me:17719: \"$ac_try\"") >&5
17720   (eval $ac_try) 2>&5
17721   ac_status=$?
17722   echo "$as_me:17722: \$? = $ac_status" >&5
17723   (exit $ac_status); }; }; then
17724   ac_cv_func_bcopy=yes
17725 else
17726   echo "$as_me: failed program was:" >&5
17727 cat conftest.$ac_ext >&5
17728 ac_cv_func_bcopy=no
17729 fi
17730 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17731 fi
17732 echo "$as_me:17732: result: $ac_cv_func_bcopy" >&5
17733 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17734 if test $ac_cv_func_bcopy = yes; then
17735
17736         echo "$as_me:17736: checking if bcopy does overlapping moves" >&5
17737 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17738 if test "${cf_cv_good_bcopy+set}" = set; then
17739   echo $ECHO_N "(cached) $ECHO_C" >&6
17740 else
17741
17742                 if test "$cross_compiling" = yes; then
17743   cf_cv_good_bcopy=unknown
17744 else
17745   cat >conftest.$ac_ext <<_ACEOF
17746 #line 17746 "configure"
17747 #include "confdefs.h"
17748
17749 int main() {
17750         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17751         char temp[40];
17752         bcopy(data, temp, sizeof(data));
17753         bcopy(temp+10, temp, 15);
17754         bcopy(temp+5, temp+15, 10);
17755         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17756 }
17757
17758 _ACEOF
17759 rm -f conftest$ac_exeext
17760 if { (eval echo "$as_me:17760: \"$ac_link\"") >&5
17761   (eval $ac_link) 2>&5
17762   ac_status=$?
17763   echo "$as_me:17763: \$? = $ac_status" >&5
17764   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17765   { (eval echo "$as_me:17765: \"$ac_try\"") >&5
17766   (eval $ac_try) 2>&5
17767   ac_status=$?
17768   echo "$as_me:17768: \$? = $ac_status" >&5
17769   (exit $ac_status); }; }; then
17770   cf_cv_good_bcopy=yes
17771 else
17772   echo "$as_me: program exited with status $ac_status" >&5
17773 echo "$as_me: failed program was:" >&5
17774 cat conftest.$ac_ext >&5
17775 cf_cv_good_bcopy=no
17776 fi
17777 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17778 fi
17779
17780 fi
17781 echo "$as_me:17781: result: $cf_cv_good_bcopy" >&5
17782 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17783
17784 else
17785   cf_cv_good_bcopy=no
17786 fi
17787
17788         if test "$cf_cv_good_bcopy" = yes ; then
17789
17790 cat >>confdefs.h <<\EOF
17791 #define USE_OK_BCOPY 1
17792 EOF
17793
17794         else
17795
17796 cat >>confdefs.h <<\EOF
17797 #define USE_MY_MEMMOVE 1
17798 EOF
17799
17800         fi
17801
17802 fi
17803
17804 echo "$as_me:17804: checking if poll really works" >&5
17805 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17806 if test "${cf_cv_working_poll+set}" = set; then
17807   echo $ECHO_N "(cached) $ECHO_C" >&6
17808 else
17809
17810 if test "$cross_compiling" = yes; then
17811   cf_cv_working_poll=unknown
17812 else
17813   cat >conftest.$ac_ext <<_ACEOF
17814 #line 17814 "configure"
17815 #include "confdefs.h"
17816
17817 #include <stdlib.h>
17818 #include <stdio.h>
17819 #include <unistd.h>
17820 #include <fcntl.h>
17821 #ifdef HAVE_POLL_H
17822 #include <poll.h>
17823 #else
17824 #include <sys/poll.h>
17825 #endif
17826 int main() {
17827         struct pollfd myfds;
17828         int ret;
17829
17830         /* check for Darwin bug with respect to "devices" */
17831         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17832         if (myfds.fd < 0)
17833                 myfds.fd = 0;
17834         myfds.events = POLLIN;
17835         myfds.revents = 0;
17836
17837         ret = poll(&myfds, 1, 100);
17838
17839         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17840                 ret = -1;
17841         } else {
17842                 int fd = 0;
17843                 if (!isatty(fd)) {
17844                         fd = open("/dev/tty", 2);       /* O_RDWR */
17845                 }
17846
17847                 if (fd >= 0) {
17848                         /* also check with standard input */
17849                         myfds.fd = fd;
17850                         myfds.events = POLLIN;
17851                         myfds.revents = 0;
17852                         ret = poll(&myfds, 1, 100);
17853                 } else {
17854                         ret = -1;
17855                 }
17856         }
17857         ${cf_cv_main_return:-return}(ret < 0);
17858 }
17859 _ACEOF
17860 rm -f conftest$ac_exeext
17861 if { (eval echo "$as_me:17861: \"$ac_link\"") >&5
17862   (eval $ac_link) 2>&5
17863   ac_status=$?
17864   echo "$as_me:17864: \$? = $ac_status" >&5
17865   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17866   { (eval echo "$as_me:17866: \"$ac_try\"") >&5
17867   (eval $ac_try) 2>&5
17868   ac_status=$?
17869   echo "$as_me:17869: \$? = $ac_status" >&5
17870   (exit $ac_status); }; }; then
17871   cf_cv_working_poll=yes
17872 else
17873   echo "$as_me: program exited with status $ac_status" >&5
17874 echo "$as_me: failed program was:" >&5
17875 cat conftest.$ac_ext >&5
17876 cf_cv_working_poll=no
17877 fi
17878 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17879 fi
17880 fi
17881 echo "$as_me:17881: result: $cf_cv_working_poll" >&5
17882 echo "${ECHO_T}$cf_cv_working_poll" >&6
17883 test "$cf_cv_working_poll" = "yes" &&
17884 cat >>confdefs.h <<\EOF
17885 #define HAVE_WORKING_POLL 1
17886 EOF
17887
17888 echo "$as_me:17888: checking for va_copy" >&5
17889 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17890 if test "${cf_cv_have_va_copy+set}" = set; then
17891   echo $ECHO_N "(cached) $ECHO_C" >&6
17892 else
17893
17894 cat >conftest.$ac_ext <<_ACEOF
17895 #line 17895 "configure"
17896 #include "confdefs.h"
17897
17898 #include <stdarg.h>
17899
17900 int
17901 main ()
17902 {
17903
17904         static va_list dst;
17905         static va_list src;
17906         va_copy(dst, src)
17907   ;
17908   return 0;
17909 }
17910 _ACEOF
17911 rm -f conftest.$ac_objext conftest$ac_exeext
17912 if { (eval echo "$as_me:17912: \"$ac_link\"") >&5
17913   (eval $ac_link) 2>&5
17914   ac_status=$?
17915   echo "$as_me:17915: \$? = $ac_status" >&5
17916   (exit $ac_status); } &&
17917          { ac_try='test -s conftest$ac_exeext'
17918   { (eval echo "$as_me:17918: \"$ac_try\"") >&5
17919   (eval $ac_try) 2>&5
17920   ac_status=$?
17921   echo "$as_me:17921: \$? = $ac_status" >&5
17922   (exit $ac_status); }; }; then
17923   cf_cv_have_va_copy=yes
17924 else
17925   echo "$as_me: failed program was:" >&5
17926 cat conftest.$ac_ext >&5
17927 cf_cv_have_va_copy=no
17928 fi
17929 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17930 fi
17931 echo "$as_me:17931: result: $cf_cv_have_va_copy" >&5
17932 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17933
17934 test "$cf_cv_have_va_copy" = yes &&
17935 cat >>confdefs.h <<\EOF
17936 #define HAVE_VA_COPY 1
17937 EOF
17938
17939 echo "$as_me:17939: checking for __va_copy" >&5
17940 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17941 if test "${cf_cv_have___va_copy+set}" = set; then
17942   echo $ECHO_N "(cached) $ECHO_C" >&6
17943 else
17944
17945 cat >conftest.$ac_ext <<_ACEOF
17946 #line 17946 "configure"
17947 #include "confdefs.h"
17948
17949 #include <stdarg.h>
17950
17951 int
17952 main ()
17953 {
17954
17955         static va_list dst;
17956         static va_list src;
17957         __va_copy(dst, src)
17958   ;
17959   return 0;
17960 }
17961 _ACEOF
17962 rm -f conftest.$ac_objext conftest$ac_exeext
17963 if { (eval echo "$as_me:17963: \"$ac_link\"") >&5
17964   (eval $ac_link) 2>&5
17965   ac_status=$?
17966   echo "$as_me:17966: \$? = $ac_status" >&5
17967   (exit $ac_status); } &&
17968          { ac_try='test -s conftest$ac_exeext'
17969   { (eval echo "$as_me:17969: \"$ac_try\"") >&5
17970   (eval $ac_try) 2>&5
17971   ac_status=$?
17972   echo "$as_me:17972: \$? = $ac_status" >&5
17973   (exit $ac_status); }; }; then
17974   cf_cv_have___va_copy=yes
17975 else
17976   echo "$as_me: failed program was:" >&5
17977 cat conftest.$ac_ext >&5
17978 cf_cv_have___va_copy=no
17979 fi
17980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17981 fi
17982 echo "$as_me:17982: result: $cf_cv_have___va_copy" >&5
17983 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17984
17985 test "$cf_cv_have___va_copy" = yes &&
17986 cat >>confdefs.h <<\EOF
17987 #define HAVE___VA_COPY 1
17988 EOF
17989
17990 echo "$as_me:17990: checking for pid_t" >&5
17991 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17992 if test "${ac_cv_type_pid_t+set}" = set; then
17993   echo $ECHO_N "(cached) $ECHO_C" >&6
17994 else
17995   cat >conftest.$ac_ext <<_ACEOF
17996 #line 17996 "configure"
17997 #include "confdefs.h"
17998 $ac_includes_default
17999 int
18000 main ()
18001 {
18002 if ((pid_t *) 0)
18003   return 0;
18004 if (sizeof (pid_t))
18005   return 0;
18006   ;
18007   return 0;
18008 }
18009 _ACEOF
18010 rm -f conftest.$ac_objext
18011 if { (eval echo "$as_me:18011: \"$ac_compile\"") >&5
18012   (eval $ac_compile) 2>&5
18013   ac_status=$?
18014   echo "$as_me:18014: \$? = $ac_status" >&5
18015   (exit $ac_status); } &&
18016          { ac_try='test -s conftest.$ac_objext'
18017   { (eval echo "$as_me:18017: \"$ac_try\"") >&5
18018   (eval $ac_try) 2>&5
18019   ac_status=$?
18020   echo "$as_me:18020: \$? = $ac_status" >&5
18021   (exit $ac_status); }; }; then
18022   ac_cv_type_pid_t=yes
18023 else
18024   echo "$as_me: failed program was:" >&5
18025 cat conftest.$ac_ext >&5
18026 ac_cv_type_pid_t=no
18027 fi
18028 rm -f conftest.$ac_objext conftest.$ac_ext
18029 fi
18030 echo "$as_me:18030: result: $ac_cv_type_pid_t" >&5
18031 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
18032 if test $ac_cv_type_pid_t = yes; then
18033   :
18034 else
18035
18036 cat >>confdefs.h <<EOF
18037 #define pid_t int
18038 EOF
18039
18040 fi
18041
18042 for ac_header in unistd.h vfork.h
18043 do
18044 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18045 echo "$as_me:18045: checking for $ac_header" >&5
18046 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18047 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18048   echo $ECHO_N "(cached) $ECHO_C" >&6
18049 else
18050   cat >conftest.$ac_ext <<_ACEOF
18051 #line 18051 "configure"
18052 #include "confdefs.h"
18053 #include <$ac_header>
18054 _ACEOF
18055 if { (eval echo "$as_me:18055: \"$ac_cpp conftest.$ac_ext\"") >&5
18056   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18057   ac_status=$?
18058   egrep -v '^ *\+' conftest.er1 >conftest.err
18059   rm -f conftest.er1
18060   cat conftest.err >&5
18061   echo "$as_me:18061: \$? = $ac_status" >&5
18062   (exit $ac_status); } >/dev/null; then
18063   if test -s conftest.err; then
18064     ac_cpp_err=$ac_c_preproc_warn_flag
18065   else
18066     ac_cpp_err=
18067   fi
18068 else
18069   ac_cpp_err=yes
18070 fi
18071 if test -z "$ac_cpp_err"; then
18072   eval "$as_ac_Header=yes"
18073 else
18074   echo "$as_me: failed program was:" >&5
18075   cat conftest.$ac_ext >&5
18076   eval "$as_ac_Header=no"
18077 fi
18078 rm -f conftest.err conftest.$ac_ext
18079 fi
18080 echo "$as_me:18080: result: `eval echo '${'$as_ac_Header'}'`" >&5
18081 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18082 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18083   cat >>confdefs.h <<EOF
18084 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18085 EOF
18086
18087 fi
18088 done
18089
18090 for ac_func in fork vfork
18091 do
18092 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18093 echo "$as_me:18093: checking for $ac_func" >&5
18094 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18095 if eval "test \"\${$as_ac_var+set}\" = set"; then
18096   echo $ECHO_N "(cached) $ECHO_C" >&6
18097 else
18098   cat >conftest.$ac_ext <<_ACEOF
18099 #line 18099 "configure"
18100 #include "confdefs.h"
18101 /* System header to define __stub macros and hopefully few prototypes,
18102     which can conflict with char $ac_func (); below.  */
18103 #include <assert.h>
18104 /* Override any gcc2 internal prototype to avoid an error.  */
18105 #ifdef __cplusplus
18106 extern "C"
18107 #endif
18108 /* We use char because int might match the return type of a gcc2
18109    builtin and then its argument prototype would still apply.  */
18110 char $ac_func ();
18111 char (*f) ();
18112
18113 int
18114 main ()
18115 {
18116 /* The GNU C library defines this for functions which it implements
18117     to always fail with ENOSYS.  Some functions are actually named
18118     something starting with __ and the normal name is an alias.  */
18119 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18120 choke me
18121 #else
18122 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18123 #endif
18124
18125   ;
18126   return 0;
18127 }
18128 _ACEOF
18129 rm -f conftest.$ac_objext conftest$ac_exeext
18130 if { (eval echo "$as_me:18130: \"$ac_link\"") >&5
18131   (eval $ac_link) 2>&5
18132   ac_status=$?
18133   echo "$as_me:18133: \$? = $ac_status" >&5
18134   (exit $ac_status); } &&
18135          { ac_try='test -s conftest$ac_exeext'
18136   { (eval echo "$as_me:18136: \"$ac_try\"") >&5
18137   (eval $ac_try) 2>&5
18138   ac_status=$?
18139   echo "$as_me:18139: \$? = $ac_status" >&5
18140   (exit $ac_status); }; }; then
18141   eval "$as_ac_var=yes"
18142 else
18143   echo "$as_me: failed program was:" >&5
18144 cat conftest.$ac_ext >&5
18145 eval "$as_ac_var=no"
18146 fi
18147 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18148 fi
18149 echo "$as_me:18149: result: `eval echo '${'$as_ac_var'}'`" >&5
18150 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18151 if test `eval echo '${'$as_ac_var'}'` = yes; then
18152   cat >>confdefs.h <<EOF
18153 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18154 EOF
18155
18156 fi
18157 done
18158
18159 ac_cv_func_fork_works=$ac_cv_func_fork
18160 if test "x$ac_cv_func_fork" = xyes; then
18161   echo "$as_me:18161: checking for working fork" >&5
18162 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18163 if test "${ac_cv_func_fork_works+set}" = set; then
18164   echo $ECHO_N "(cached) $ECHO_C" >&6
18165 else
18166   if test "$cross_compiling" = yes; then
18167   ac_cv_func_fork_works=cross
18168 else
18169   cat >conftest.$ac_ext <<_ACEOF
18170 /* By Rüdiger Kuhlmann. */
18171       #include <sys/types.h>
18172       #if HAVE_UNISTD_H
18173       # include <unistd.h>
18174       #endif
18175       /* Some systems only have a dummy stub for fork() */
18176       int main ()
18177       {
18178         if (fork() < 0)
18179           $ac_main_return (1);
18180         $ac_main_return (0);
18181       }
18182 _ACEOF
18183 rm -f conftest$ac_exeext
18184 if { (eval echo "$as_me:18184: \"$ac_link\"") >&5
18185   (eval $ac_link) 2>&5
18186   ac_status=$?
18187   echo "$as_me:18187: \$? = $ac_status" >&5
18188   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18189   { (eval echo "$as_me:18189: \"$ac_try\"") >&5
18190   (eval $ac_try) 2>&5
18191   ac_status=$?
18192   echo "$as_me:18192: \$? = $ac_status" >&5
18193   (exit $ac_status); }; }; then
18194   ac_cv_func_fork_works=yes
18195 else
18196   echo "$as_me: program exited with status $ac_status" >&5
18197 echo "$as_me: failed program was:" >&5
18198 cat conftest.$ac_ext >&5
18199 ac_cv_func_fork_works=no
18200 fi
18201 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18202 fi
18203 fi
18204 echo "$as_me:18204: result: $ac_cv_func_fork_works" >&5
18205 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18206
18207 fi
18208 if test "x$ac_cv_func_fork_works" = xcross; then
18209   case $host in
18210     *-*-amigaos* | *-*-msdosdjgpp*)
18211       # Override, as these systems have only a dummy fork() stub
18212       ac_cv_func_fork_works=no
18213       ;;
18214     *)
18215       ac_cv_func_fork_works=yes
18216       ;;
18217   esac
18218   { echo "$as_me:18218: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18219 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18220 fi
18221 ac_cv_func_vfork_works=$ac_cv_func_vfork
18222 if test "x$ac_cv_func_vfork" = xyes; then
18223   echo "$as_me:18223: checking for working vfork" >&5
18224 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18225 if test "${ac_cv_func_vfork_works+set}" = set; then
18226   echo $ECHO_N "(cached) $ECHO_C" >&6
18227 else
18228   if test "$cross_compiling" = yes; then
18229   ac_cv_func_vfork_works=cross
18230 else
18231   cat >conftest.$ac_ext <<_ACEOF
18232 #line 18232 "configure"
18233 #include "confdefs.h"
18234 /* Thanks to Paul Eggert for this test.  */
18235 #include <stdio.h>
18236 #include <sys/types.h>
18237 #include <sys/stat.h>
18238 #if HAVE_UNISTD_H
18239 # include <unistd.h>
18240 #endif
18241 #if HAVE_VFORK_H
18242 # include <vfork.h>
18243 #endif
18244 /* On some sparc systems, changes by the child to local and incoming
18245    argument registers are propagated back to the parent.  The compiler
18246    is told about this with #include <vfork.h>, but some compilers
18247    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18248    static variable whose address is put into a register that is
18249    clobbered by the vfork.  */
18250 static
18251 #ifdef __cplusplus
18252 sparc_address_test (int arg)
18253 # else
18254 sparc_address_test (arg) int arg;
18255 #endif
18256 {
18257   static pid_t child;
18258   if (!child) {
18259     child = vfork ();
18260     if (child < 0) {
18261       perror ("vfork");
18262       _exit(2);
18263     }
18264     if (!child) {
18265       arg = getpid();
18266       write(-1, "", 0);
18267       _exit (arg);
18268     }
18269   }
18270 }
18271
18272 int
18273 main ()
18274 {
18275   pid_t parent = getpid ();
18276   pid_t child;
18277
18278   sparc_address_test ();
18279
18280   child = vfork ();
18281
18282   if (child == 0) {
18283     /* Here is another test for sparc vfork register problems.  This
18284        test uses lots of local variables, at least as many local
18285        variables as main has allocated so far including compiler
18286        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18287        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18288        reuse the register of parent for one of the local variables,
18289        since it will think that parent can't possibly be used any more
18290        in this routine.  Assigning to the local variable will thus
18291        munge parent in the parent process.  */
18292     pid_t
18293       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18294       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18295     /* Convince the compiler that p..p7 are live; otherwise, it might
18296        use the same hardware register for all 8 local variables.  */
18297     if (p != p1 || p != p2 || p != p3 || p != p4
18298         || p != p5 || p != p6 || p != p7)
18299       _exit(1);
18300
18301     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18302        from child file descriptors.  If the child closes a descriptor
18303        before it execs or exits, this munges the parent's descriptor
18304        as well.  Test for this by closing stdout in the child.  */
18305     _exit(close(fileno(stdout)) != 0);
18306   } else {
18307     int status;
18308     struct stat st;
18309
18310     while (wait(&status) != child)
18311       ;
18312     $ac_main_return(
18313          /* Was there some problem with vforking?  */
18314          child < 0
18315
18316          /* Did the child fail?  (This shouldn't happen.)  */
18317          || status
18318
18319          /* Did the vfork/compiler bug occur?  */
18320          || parent != getpid()
18321
18322          /* Did the file descriptor bug occur?  */
18323          || fstat(fileno(stdout), &st) != 0
18324          );
18325   }
18326 }
18327 _ACEOF
18328 rm -f conftest$ac_exeext
18329 if { (eval echo "$as_me:18329: \"$ac_link\"") >&5
18330   (eval $ac_link) 2>&5
18331   ac_status=$?
18332   echo "$as_me:18332: \$? = $ac_status" >&5
18333   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18334   { (eval echo "$as_me:18334: \"$ac_try\"") >&5
18335   (eval $ac_try) 2>&5
18336   ac_status=$?
18337   echo "$as_me:18337: \$? = $ac_status" >&5
18338   (exit $ac_status); }; }; then
18339   ac_cv_func_vfork_works=yes
18340 else
18341   echo "$as_me: program exited with status $ac_status" >&5
18342 echo "$as_me: failed program was:" >&5
18343 cat conftest.$ac_ext >&5
18344 ac_cv_func_vfork_works=no
18345 fi
18346 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18347 fi
18348 fi
18349 echo "$as_me:18349: result: $ac_cv_func_vfork_works" >&5
18350 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18351
18352 fi;
18353 if test "x$ac_cv_func_fork_works" = xcross; then
18354   ac_cv_func_vfork_works=ac_cv_func_vfork
18355   { echo "$as_me:18355: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18356 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18357 fi
18358
18359 if test "x$ac_cv_func_vfork_works" = xyes; then
18360
18361 cat >>confdefs.h <<\EOF
18362 #define HAVE_WORKING_VFORK 1
18363 EOF
18364
18365 else
18366
18367 cat >>confdefs.h <<\EOF
18368 #define vfork fork
18369 EOF
18370
18371 fi
18372 if test "x$ac_cv_func_fork_works" = xyes; then
18373
18374 cat >>confdefs.h <<\EOF
18375 #define HAVE_WORKING_FORK 1
18376 EOF
18377
18378 fi
18379
18380 # special check for test/ditto.c
18381
18382 echo "$as_me:18382: checking for openpty in -lutil" >&5
18383 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18384 if test "${ac_cv_lib_util_openpty+set}" = set; then
18385   echo $ECHO_N "(cached) $ECHO_C" >&6
18386 else
18387   ac_check_lib_save_LIBS=$LIBS
18388 LIBS="-lutil  $LIBS"
18389 cat >conftest.$ac_ext <<_ACEOF
18390 #line 18390 "configure"
18391 #include "confdefs.h"
18392
18393 /* Override any gcc2 internal prototype to avoid an error.  */
18394 #ifdef __cplusplus
18395 extern "C"
18396 #endif
18397 /* We use char because int might match the return type of a gcc2
18398    builtin and then its argument prototype would still apply.  */
18399 char openpty ();
18400 int
18401 main ()
18402 {
18403 openpty ();
18404   ;
18405   return 0;
18406 }
18407 _ACEOF
18408 rm -f conftest.$ac_objext conftest$ac_exeext
18409 if { (eval echo "$as_me:18409: \"$ac_link\"") >&5
18410   (eval $ac_link) 2>&5
18411   ac_status=$?
18412   echo "$as_me:18412: \$? = $ac_status" >&5
18413   (exit $ac_status); } &&
18414          { ac_try='test -s conftest$ac_exeext'
18415   { (eval echo "$as_me:18415: \"$ac_try\"") >&5
18416   (eval $ac_try) 2>&5
18417   ac_status=$?
18418   echo "$as_me:18418: \$? = $ac_status" >&5
18419   (exit $ac_status); }; }; then
18420   ac_cv_lib_util_openpty=yes
18421 else
18422   echo "$as_me: failed program was:" >&5
18423 cat conftest.$ac_ext >&5
18424 ac_cv_lib_util_openpty=no
18425 fi
18426 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18427 LIBS=$ac_check_lib_save_LIBS
18428 fi
18429 echo "$as_me:18429: result: $ac_cv_lib_util_openpty" >&5
18430 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18431 if test $ac_cv_lib_util_openpty = yes; then
18432   cf_cv_lib_util=yes
18433 else
18434   cf_cv_lib_util=no
18435 fi
18436
18437 echo "$as_me:18437: checking for openpty header" >&5
18438 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18439 if test "${cf_cv_func_openpty+set}" = set; then
18440   echo $ECHO_N "(cached) $ECHO_C" >&6
18441 else
18442
18443         cf_save_LIBS="$LIBS"
18444         test $cf_cv_lib_util = yes &&
18445 cf_add_libs="-lutil"
18446 # Filter out duplicates - this happens with badly-designed ".pc" files...
18447 for cf_add_1lib in $LIBS
18448 do
18449         for cf_add_2lib in $cf_add_libs
18450         do
18451                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18452                 then
18453                         cf_add_1lib=
18454                         break
18455                 fi
18456         done
18457         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18458 done
18459 LIBS="$cf_add_libs"
18460
18461         for cf_header in pty.h libutil.h util.h
18462         do
18463         cat >conftest.$ac_ext <<_ACEOF
18464 #line 18464 "configure"
18465 #include "confdefs.h"
18466
18467 #include <$cf_header>
18468
18469 int
18470 main ()
18471 {
18472
18473         int x = openpty((int *)0, (int *)0, (char *)0,
18474                                    (struct termios *)0, (struct winsize *)0);
18475
18476   ;
18477   return 0;
18478 }
18479 _ACEOF
18480 rm -f conftest.$ac_objext conftest$ac_exeext
18481 if { (eval echo "$as_me:18481: \"$ac_link\"") >&5
18482   (eval $ac_link) 2>&5
18483   ac_status=$?
18484   echo "$as_me:18484: \$? = $ac_status" >&5
18485   (exit $ac_status); } &&
18486          { ac_try='test -s conftest$ac_exeext'
18487   { (eval echo "$as_me:18487: \"$ac_try\"") >&5
18488   (eval $ac_try) 2>&5
18489   ac_status=$?
18490   echo "$as_me:18490: \$? = $ac_status" >&5
18491   (exit $ac_status); }; }; then
18492
18493                 cf_cv_func_openpty=$cf_header
18494                 break
18495
18496 else
18497   echo "$as_me: failed program was:" >&5
18498 cat conftest.$ac_ext >&5
18499
18500                 cf_cv_func_openpty=no
18501
18502 fi
18503 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18504         done
18505         LIBS="$cf_save_LIBS"
18506
18507 fi
18508 echo "$as_me:18508: result: $cf_cv_func_openpty" >&5
18509 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18510
18511 if test "$cf_cv_func_openpty" != no ; then
18512
18513 cat >>confdefs.h <<EOF
18514 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18515 EOF
18516
18517 cat >>confdefs.h <<\EOF
18518 #define USE_XTERM_PTY 1
18519 EOF
18520
18521         if test "x$cf_cv_lib_util" = xyes ; then
18522
18523 cf_add_libs="-lutil"
18524 # Filter out duplicates - this happens with badly-designed ".pc" files...
18525 for cf_add_1lib in $TEST_LIBS
18526 do
18527         for cf_add_2lib in $cf_add_libs
18528         do
18529                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18530                 then
18531                         cf_add_1lib=
18532                         break
18533                 fi
18534         done
18535         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18536 done
18537 TEST_LIBS="$cf_add_libs"
18538
18539         fi
18540 fi
18541
18542 if test "$with_hashed_db" != no ; then
18543
18544 cat >>confdefs.h <<\EOF
18545 #define USE_HASHED_DB 1
18546 EOF
18547
18548 case $with_hashed_db in
18549 (yes|*able*)
18550         ;;
18551 (*)
18552         if test -d "$with_hashed_db" ; then
18553
18554 if test -n "$with_hashed_db/include" ; then
18555   for cf_add_incdir in $with_hashed_db/include
18556   do
18557         while test $cf_add_incdir != /usr/include
18558         do
18559           if test -d $cf_add_incdir
18560           then
18561                 cf_have_incdir=no
18562                 if test -n "$CFLAGS$CPPFLAGS" ; then
18563                   # a loop is needed to ensure we can add subdirs of existing dirs
18564                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18565                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18566                           cf_have_incdir=yes; break
18567                         fi
18568                   done
18569                 fi
18570
18571                 if test "$cf_have_incdir" = no ; then
18572                   if test "$cf_add_incdir" = /usr/local/include ; then
18573                         if test "$GCC" = yes
18574                         then
18575                           cf_save_CPPFLAGS=$CPPFLAGS
18576                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18577                           cat >conftest.$ac_ext <<_ACEOF
18578 #line 18578 "configure"
18579 #include "confdefs.h"
18580 #include <stdio.h>
18581 int
18582 main ()
18583 {
18584 printf("Hello")
18585   ;
18586   return 0;
18587 }
18588 _ACEOF
18589 rm -f conftest.$ac_objext
18590 if { (eval echo "$as_me:18590: \"$ac_compile\"") >&5
18591   (eval $ac_compile) 2>&5
18592   ac_status=$?
18593   echo "$as_me:18593: \$? = $ac_status" >&5
18594   (exit $ac_status); } &&
18595          { ac_try='test -s conftest.$ac_objext'
18596   { (eval echo "$as_me:18596: \"$ac_try\"") >&5
18597   (eval $ac_try) 2>&5
18598   ac_status=$?
18599   echo "$as_me:18599: \$? = $ac_status" >&5
18600   (exit $ac_status); }; }; then
18601   :
18602 else
18603   echo "$as_me: failed program was:" >&5
18604 cat conftest.$ac_ext >&5
18605 cf_have_incdir=yes
18606 fi
18607 rm -f conftest.$ac_objext conftest.$ac_ext
18608                           CPPFLAGS=$cf_save_CPPFLAGS
18609                         fi
18610                   fi
18611                 fi
18612
18613                 if test "$cf_have_incdir" = no ; then
18614                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18615
18616 echo "${as_me:-configure}:18616: testing adding $cf_add_incdir to include-path ..." 1>&5
18617
18618                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18619
18620                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18621                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18622                   cf_add_incdir="$cf_top_incdir"
18623                 else
18624                   break
18625                 fi
18626           fi
18627         done
18628   done
18629 fi
18630
18631 if test -n "$with_hashed_db/lib" ; then
18632         for cf_add_libdir in $with_hashed_db/lib
18633         do
18634                 if test $cf_add_libdir = /usr/lib ; then
18635                         :
18636                 elif test -d $cf_add_libdir
18637                 then
18638                         cf_have_libdir=no
18639                         if test -n "$LDFLAGS$LIBS" ; then
18640                                 # a loop is needed to ensure we can add subdirs of existing dirs
18641                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
18642                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18643                                                 cf_have_libdir=yes; break
18644                                         fi
18645                                 done
18646                         fi
18647                         if test "$cf_have_libdir" = no ; then
18648                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18649
18650 echo "${as_me:-configure}:18650: testing adding $cf_add_libdir to library-path ..." 1>&5
18651
18652                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18653                         fi
18654                 fi
18655         done
18656 fi
18657
18658         else
18659                 case "$with_hashed_db" in
18660                 (./*|../*|/*)
18661                         { echo "$as_me:18661: WARNING: no such directory $with_hashed_db" >&5
18662 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18663                         ;;
18664                 (*)
18665
18666 cf_search=
18667
18668 test "x$prefix" != "xNONE" && \
18669 test -d "$prefix" && \
18670  {
18671         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18672         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18673         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18674         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18675         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18676         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18677 }
18678
18679 for cf_subdir_prefix in \
18680         /usr \
18681         /usr/local \
18682         /usr/pkg \
18683         /opt \
18684         /opt/local \
18685         $HOME
18686 do
18687
18688 test "x$cf_subdir_prefix" != "x$prefix" && \
18689 test -d "$cf_subdir_prefix" && \
18690 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18691         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
18692         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
18693         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
18694         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
18695         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
18696         test -d $cf_subdir_prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include/$with_hashed_db"
18697 }
18698
18699 done
18700
18701         for cf_item in $cf_search
18702         do
18703                 case $cf_item in
18704                 (*/$with_hashed_db)
18705
18706 if test -n "$cf_item" ; then
18707   for cf_add_incdir in $cf_item
18708   do
18709         while test $cf_add_incdir != /usr/include
18710         do
18711           if test -d $cf_add_incdir
18712           then
18713                 cf_have_incdir=no
18714                 if test -n "$CFLAGS$CPPFLAGS" ; then
18715                   # a loop is needed to ensure we can add subdirs of existing dirs
18716                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18717                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18718                           cf_have_incdir=yes; break
18719                         fi
18720                   done
18721                 fi
18722
18723                 if test "$cf_have_incdir" = no ; then
18724                   if test "$cf_add_incdir" = /usr/local/include ; then
18725                         if test "$GCC" = yes
18726                         then
18727                           cf_save_CPPFLAGS=$CPPFLAGS
18728                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18729                           cat >conftest.$ac_ext <<_ACEOF
18730 #line 18730 "configure"
18731 #include "confdefs.h"
18732 #include <stdio.h>
18733 int
18734 main ()
18735 {
18736 printf("Hello")
18737   ;
18738   return 0;
18739 }
18740 _ACEOF
18741 rm -f conftest.$ac_objext
18742 if { (eval echo "$as_me:18742: \"$ac_compile\"") >&5
18743   (eval $ac_compile) 2>&5
18744   ac_status=$?
18745   echo "$as_me:18745: \$? = $ac_status" >&5
18746   (exit $ac_status); } &&
18747          { ac_try='test -s conftest.$ac_objext'
18748   { (eval echo "$as_me:18748: \"$ac_try\"") >&5
18749   (eval $ac_try) 2>&5
18750   ac_status=$?
18751   echo "$as_me:18751: \$? = $ac_status" >&5
18752   (exit $ac_status); }; }; then
18753   :
18754 else
18755   echo "$as_me: failed program was:" >&5
18756 cat conftest.$ac_ext >&5
18757 cf_have_incdir=yes
18758 fi
18759 rm -f conftest.$ac_objext conftest.$ac_ext
18760                           CPPFLAGS=$cf_save_CPPFLAGS
18761                         fi
18762                   fi
18763                 fi
18764
18765                 if test "$cf_have_incdir" = no ; then
18766                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18767
18768 echo "${as_me:-configure}:18768: testing adding $cf_add_incdir to include-path ..." 1>&5
18769
18770                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18771
18772                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18773                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18774                   cf_add_incdir="$cf_top_incdir"
18775                 else
18776                   break
18777                 fi
18778           fi
18779         done
18780   done
18781 fi
18782
18783                         ;;
18784                 esac
18785         done
18786
18787 cf_search=
18788
18789 test "x$prefix" != "xNONE" && \
18790 test -d "$prefix" && \
18791  {
18792         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18793         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18794         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18795         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18796         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18797         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18798 }
18799
18800 for cf_subdir_prefix in \
18801         /usr \
18802         /usr/local \
18803         /usr/pkg \
18804         /opt \
18805         /opt/local \
18806         $HOME
18807 do
18808
18809 test "x$cf_subdir_prefix" != "x$prefix" && \
18810 test -d "$cf_subdir_prefix" && \
18811 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18812         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
18813         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
18814         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
18815         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
18816         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
18817         test -d $cf_subdir_prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib/$with_hashed_db"
18818 }
18819
18820 done
18821
18822         for cf_item in $cf_search
18823         do
18824                 case $cf_item in
18825                 (*/$with_hashed_db)
18826
18827 if test -n "$cf_item" ; then
18828         for cf_add_libdir in $cf_item
18829         do
18830                 if test $cf_add_libdir = /usr/lib ; then
18831                         :
18832                 elif test -d $cf_add_libdir
18833                 then
18834                         cf_have_libdir=no
18835                         if test -n "$LDFLAGS$LIBS" ; then
18836                                 # a loop is needed to ensure we can add subdirs of existing dirs
18837                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
18838                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18839                                                 cf_have_libdir=yes; break
18840                                         fi
18841                                 done
18842                         fi
18843                         if test "$cf_have_libdir" = no ; then
18844                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18845
18846 echo "${as_me:-configure}:18846: testing adding $cf_add_libdir to library-path ..." 1>&5
18847
18848                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18849                         fi
18850                 fi
18851         done
18852 fi
18853
18854                         ;;
18855                 esac
18856         done
18857
18858                         ;;
18859                 esac
18860         fi
18861 esac
18862
18863 echo "$as_me:18863: checking for db.h" >&5
18864 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18865 if test "${ac_cv_header_db_h+set}" = set; then
18866   echo $ECHO_N "(cached) $ECHO_C" >&6
18867 else
18868   cat >conftest.$ac_ext <<_ACEOF
18869 #line 18869 "configure"
18870 #include "confdefs.h"
18871 #include <db.h>
18872 _ACEOF
18873 if { (eval echo "$as_me:18873: \"$ac_cpp conftest.$ac_ext\"") >&5
18874   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18875   ac_status=$?
18876   egrep -v '^ *\+' conftest.er1 >conftest.err
18877   rm -f conftest.er1
18878   cat conftest.err >&5
18879   echo "$as_me:18879: \$? = $ac_status" >&5
18880   (exit $ac_status); } >/dev/null; then
18881   if test -s conftest.err; then
18882     ac_cpp_err=$ac_c_preproc_warn_flag
18883   else
18884     ac_cpp_err=
18885   fi
18886 else
18887   ac_cpp_err=yes
18888 fi
18889 if test -z "$ac_cpp_err"; then
18890   ac_cv_header_db_h=yes
18891 else
18892   echo "$as_me: failed program was:" >&5
18893   cat conftest.$ac_ext >&5
18894   ac_cv_header_db_h=no
18895 fi
18896 rm -f conftest.err conftest.$ac_ext
18897 fi
18898 echo "$as_me:18898: result: $ac_cv_header_db_h" >&5
18899 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18900 if test $ac_cv_header_db_h = yes; then
18901
18902 echo "$as_me:18902: checking for version of db" >&5
18903 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18904 if test "${cf_cv_hashed_db_version+set}" = set; then
18905   echo $ECHO_N "(cached) $ECHO_C" >&6
18906 else
18907
18908 cf_cv_hashed_db_version=unknown
18909
18910 for cf_db_version in 1 2 3 4 5 6
18911 do
18912
18913 echo "${as_me:-configure}:18913: testing checking for db version $cf_db_version ..." 1>&5
18914
18915         cat >conftest.$ac_ext <<_ACEOF
18916 #line 18916 "configure"
18917 #include "confdefs.h"
18918
18919 $ac_includes_default
18920 #include <db.h>
18921
18922 #ifdef DB_VERSION_MAJOR
18923         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18924 #if $cf_db_version == DB_VERSION_MAJOR
18925         /* ok */
18926 #else
18927         make an error
18928 #endif
18929 #else
18930 #if $cf_db_version == 1
18931         /* ok: assuming this is DB 1.8.5 */
18932 #else
18933         make an error
18934 #endif
18935 #endif
18936
18937 int
18938 main ()
18939 {
18940 DBT *foo = 0
18941   ;
18942   return 0;
18943 }
18944 _ACEOF
18945 rm -f conftest.$ac_objext
18946 if { (eval echo "$as_me:18946: \"$ac_compile\"") >&5
18947   (eval $ac_compile) 2>&5
18948   ac_status=$?
18949   echo "$as_me:18949: \$? = $ac_status" >&5
18950   (exit $ac_status); } &&
18951          { ac_try='test -s conftest.$ac_objext'
18952   { (eval echo "$as_me:18952: \"$ac_try\"") >&5
18953   (eval $ac_try) 2>&5
18954   ac_status=$?
18955   echo "$as_me:18955: \$? = $ac_status" >&5
18956   (exit $ac_status); }; }; then
18957
18958         cf_cv_hashed_db_version=$cf_db_version
18959         break
18960
18961 else
18962   echo "$as_me: failed program was:" >&5
18963 cat conftest.$ac_ext >&5
18964 fi
18965 rm -f conftest.$ac_objext conftest.$ac_ext
18966 done
18967
18968 fi
18969 echo "$as_me:18969: result: $cf_cv_hashed_db_version" >&5
18970 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
18971
18972 if test "$cf_cv_hashed_db_version" = unknown ; then
18973         { { echo "$as_me:18973: error: Cannot determine version of db" >&5
18974 echo "$as_me: error: Cannot determine version of db" >&2;}
18975    { (exit 1); exit 1; }; }
18976 else
18977
18978 echo "$as_me:18978: checking for db libraries" >&5
18979 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
18980 if test "${cf_cv_hashed_db_libs+set}" = set; then
18981   echo $ECHO_N "(cached) $ECHO_C" >&6
18982 else
18983
18984 cf_cv_hashed_db_libs=unknown
18985 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
18986 do
18987         cf_save_libs="$LIBS"
18988         if test -n "$cf_db_libs"; then
18989
18990 cf_add_libs="-l$cf_db_libs"
18991 # Filter out duplicates - this happens with badly-designed ".pc" files...
18992 for cf_add_1lib in $LIBS
18993 do
18994         for cf_add_2lib in $cf_add_libs
18995         do
18996                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18997                 then
18998                         cf_add_1lib=
18999                         break
19000                 fi
19001         done
19002         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19003 done
19004 LIBS="$cf_add_libs"
19005
19006         fi
19007
19008 echo "${as_me:-configure}:19008: testing checking for library "$cf_db_libs" ..." 1>&5
19009
19010         cat >conftest.$ac_ext <<_ACEOF
19011 #line 19011 "configure"
19012 #include "confdefs.h"
19013
19014 $ac_includes_default
19015 #include <db.h>
19016
19017 int
19018 main ()
19019 {
19020
19021         char *path = "/tmp/foo";
19022 #ifdef DB_VERSION_MAJOR
19023 #if DB_VERSION_MAJOR >= 4
19024         DB *result = 0;
19025         db_create(&result, NULL, 0);
19026         result->open(result,
19027                 NULL,
19028                 path,
19029                 path,
19030                 DB_HASH,
19031                 DB_CREATE,
19032                 0644);
19033 #elif DB_VERSION_MAJOR >= 3
19034         DB *result = 0;
19035         db_create(&result, NULL, 0);
19036         result->open(result,
19037                 path,
19038                 path,
19039                 DB_HASH,
19040                 DB_CREATE,
19041                 0644);
19042 #elif DB_VERSION_MAJOR >= 2
19043         DB *result = 0;
19044         db_open(path,
19045                 DB_HASH,
19046                 DB_CREATE,
19047                 0644,
19048                 (DB_ENV *) 0,
19049                 (DB_INFO *) 0,
19050                 &result);
19051 #endif /* DB_VERSION_MAJOR */
19052 #else
19053         DB *result = dbopen(path,
19054                      2,
19055                      0644,
19056                      DB_HASH,
19057                      0);
19058 #endif
19059         ${cf_cv_main_return:-return}(result != 0)
19060
19061   ;
19062   return 0;
19063 }
19064 _ACEOF
19065 rm -f conftest.$ac_objext conftest$ac_exeext
19066 if { (eval echo "$as_me:19066: \"$ac_link\"") >&5
19067   (eval $ac_link) 2>&5
19068   ac_status=$?
19069   echo "$as_me:19069: \$? = $ac_status" >&5
19070   (exit $ac_status); } &&
19071          { ac_try='test -s conftest$ac_exeext'
19072   { (eval echo "$as_me:19072: \"$ac_try\"") >&5
19073   (eval $ac_try) 2>&5
19074   ac_status=$?
19075   echo "$as_me:19075: \$? = $ac_status" >&5
19076   (exit $ac_status); }; }; then
19077
19078         if test -n "$cf_db_libs" ; then
19079                 cf_cv_hashed_db_libs=$cf_db_libs
19080         else
19081                 cf_cv_hashed_db_libs=default
19082         fi
19083         LIBS="$cf_save_libs"
19084         break
19085
19086 else
19087   echo "$as_me: failed program was:" >&5
19088 cat conftest.$ac_ext >&5
19089 fi
19090 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19091         LIBS="$cf_save_libs"
19092 done
19093
19094 fi
19095 echo "$as_me:19095: result: $cf_cv_hashed_db_libs" >&5
19096 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19097
19098         if test "$cf_cv_hashed_db_libs" = unknown ; then
19099                 { { echo "$as_me:19099: error: Cannot determine library for db" >&5
19100 echo "$as_me: error: Cannot determine library for db" >&2;}
19101    { (exit 1); exit 1; }; }
19102         elif test "$cf_cv_hashed_db_libs" != default ; then
19103
19104 cf_add_libs="-l$cf_cv_hashed_db_libs"
19105 # Filter out duplicates - this happens with badly-designed ".pc" files...
19106 for cf_add_1lib in $LIBS
19107 do
19108         for cf_add_2lib in $cf_add_libs
19109         do
19110                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19111                 then
19112                         cf_add_1lib=
19113                         break
19114                 fi
19115         done
19116         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19117 done
19118 LIBS="$cf_add_libs"
19119
19120         fi
19121 fi
19122
19123 else
19124
19125         { { echo "$as_me:19125: error: Cannot find db.h" >&5
19126 echo "$as_me: error: Cannot find db.h" >&2;}
19127    { (exit 1); exit 1; }; }
19128
19129 fi
19130
19131 fi
19132
19133 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19134         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19135         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19136 fi
19137
19138 # Just in case, check if the C compiler has a bool type.
19139
19140 echo "$as_me:19140: checking if we should include stdbool.h" >&5
19141 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19142
19143 if test "${cf_cv_header_stdbool_h+set}" = set; then
19144   echo $ECHO_N "(cached) $ECHO_C" >&6
19145 else
19146
19147         cat >conftest.$ac_ext <<_ACEOF
19148 #line 19148 "configure"
19149 #include "confdefs.h"
19150
19151 int
19152 main ()
19153 {
19154 bool foo = false
19155   ;
19156   return 0;
19157 }
19158 _ACEOF
19159 rm -f conftest.$ac_objext
19160 if { (eval echo "$as_me:19160: \"$ac_compile\"") >&5
19161   (eval $ac_compile) 2>&5
19162   ac_status=$?
19163   echo "$as_me:19163: \$? = $ac_status" >&5
19164   (exit $ac_status); } &&
19165          { ac_try='test -s conftest.$ac_objext'
19166   { (eval echo "$as_me:19166: \"$ac_try\"") >&5
19167   (eval $ac_try) 2>&5
19168   ac_status=$?
19169   echo "$as_me:19169: \$? = $ac_status" >&5
19170   (exit $ac_status); }; }; then
19171   cf_cv_header_stdbool_h=0
19172 else
19173   echo "$as_me: failed program was:" >&5
19174 cat conftest.$ac_ext >&5
19175 cat >conftest.$ac_ext <<_ACEOF
19176 #line 19176 "configure"
19177 #include "confdefs.h"
19178
19179 #ifndef __BEOS__
19180 #include <stdbool.h>
19181 #endif
19182
19183 int
19184 main ()
19185 {
19186 bool foo = false
19187   ;
19188   return 0;
19189 }
19190 _ACEOF
19191 rm -f conftest.$ac_objext
19192 if { (eval echo "$as_me:19192: \"$ac_compile\"") >&5
19193   (eval $ac_compile) 2>&5
19194   ac_status=$?
19195   echo "$as_me:19195: \$? = $ac_status" >&5
19196   (exit $ac_status); } &&
19197          { ac_try='test -s conftest.$ac_objext'
19198   { (eval echo "$as_me:19198: \"$ac_try\"") >&5
19199   (eval $ac_try) 2>&5
19200   ac_status=$?
19201   echo "$as_me:19201: \$? = $ac_status" >&5
19202   (exit $ac_status); }; }; then
19203   cf_cv_header_stdbool_h=1
19204 else
19205   echo "$as_me: failed program was:" >&5
19206 cat conftest.$ac_ext >&5
19207 cf_cv_header_stdbool_h=0
19208 fi
19209 rm -f conftest.$ac_objext conftest.$ac_ext
19210 fi
19211 rm -f conftest.$ac_objext conftest.$ac_ext
19212 fi
19213
19214 if test "$cf_cv_header_stdbool_h" = 1
19215 then    echo "$as_me:19215: result: yes" >&5
19216 echo "${ECHO_T}yes" >&6
19217 else    echo "$as_me:19217: result: no" >&5
19218 echo "${ECHO_T}no" >&6
19219 fi
19220
19221 echo "$as_me:19221: checking for builtin bool type" >&5
19222 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19223
19224 if test "${cf_cv_cc_bool_type+set}" = set; then
19225   echo $ECHO_N "(cached) $ECHO_C" >&6
19226 else
19227
19228         cat >conftest.$ac_ext <<_ACEOF
19229 #line 19229 "configure"
19230 #include "confdefs.h"
19231
19232 #include <stdio.h>
19233 #include <sys/types.h>
19234
19235 int
19236 main ()
19237 {
19238 bool x = false
19239   ;
19240   return 0;
19241 }
19242 _ACEOF
19243 rm -f conftest.$ac_objext
19244 if { (eval echo "$as_me:19244: \"$ac_compile\"") >&5
19245   (eval $ac_compile) 2>&5
19246   ac_status=$?
19247   echo "$as_me:19247: \$? = $ac_status" >&5
19248   (exit $ac_status); } &&
19249          { ac_try='test -s conftest.$ac_objext'
19250   { (eval echo "$as_me:19250: \"$ac_try\"") >&5
19251   (eval $ac_try) 2>&5
19252   ac_status=$?
19253   echo "$as_me:19253: \$? = $ac_status" >&5
19254   (exit $ac_status); }; }; then
19255   cf_cv_cc_bool_type=1
19256 else
19257   echo "$as_me: failed program was:" >&5
19258 cat conftest.$ac_ext >&5
19259 cf_cv_cc_bool_type=0
19260 fi
19261 rm -f conftest.$ac_objext conftest.$ac_ext
19262
19263 fi
19264
19265 if test "$cf_cv_cc_bool_type" = 1
19266 then    echo "$as_me:19266: result: yes" >&5
19267 echo "${ECHO_T}yes" >&6
19268 else    echo "$as_me:19268: result: no" >&5
19269 echo "${ECHO_T}no" >&6
19270 fi
19271
19272 # Check for C++ compiler characteristics (and ensure that it's there!)
19273 if test -n "$CXX" ; then
19274         ac_ext=cc
19275 ac_cpp='$CXXCPP $CPPFLAGS'
19276 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19277 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19278 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19279 ac_main_return=return
19280
19281 if test -n "$GXX" ; then
19282 case $cf_cv_system_name in
19283 (os2*)
19284         cf_stdcpp_libname=stdcpp
19285         ;;
19286 (*)
19287         cf_stdcpp_libname=stdc++
19288         ;;
19289 esac
19290 echo "$as_me:19290: checking for library $cf_stdcpp_libname" >&5
19291 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19292 if test "${cf_cv_libstdcpp+set}" = set; then
19293   echo $ECHO_N "(cached) $ECHO_C" >&6
19294 else
19295
19296         cf_save="$LIBS"
19297
19298 cf_add_libs="-l$cf_stdcpp_libname"
19299 # Filter out duplicates - this happens with badly-designed ".pc" files...
19300 for cf_add_1lib in $LIBS
19301 do
19302         for cf_add_2lib in $cf_add_libs
19303         do
19304                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19305                 then
19306                         cf_add_1lib=
19307                         break
19308                 fi
19309         done
19310         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19311 done
19312 LIBS="$cf_add_libs"
19313
19314 cat >conftest.$ac_ext <<_ACEOF
19315 #line 19315 "configure"
19316 #include "confdefs.h"
19317
19318 #include <strstream.h>
19319 int
19320 main ()
19321 {
19322
19323 char buf[80];
19324 strstreambuf foo(buf, sizeof(buf))
19325
19326   ;
19327   return 0;
19328 }
19329 _ACEOF
19330 rm -f conftest.$ac_objext conftest$ac_exeext
19331 if { (eval echo "$as_me:19331: \"$ac_link\"") >&5
19332   (eval $ac_link) 2>&5
19333   ac_status=$?
19334   echo "$as_me:19334: \$? = $ac_status" >&5
19335   (exit $ac_status); } &&
19336          { ac_try='test -s conftest$ac_exeext'
19337   { (eval echo "$as_me:19337: \"$ac_try\"") >&5
19338   (eval $ac_try) 2>&5
19339   ac_status=$?
19340   echo "$as_me:19340: \$? = $ac_status" >&5
19341   (exit $ac_status); }; }; then
19342   cf_cv_libstdcpp=yes
19343 else
19344   echo "$as_me: failed program was:" >&5
19345 cat conftest.$ac_ext >&5
19346 cf_cv_libstdcpp=no
19347 fi
19348 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19349         LIBS="$cf_save"
19350
19351 fi
19352 echo "$as_me:19352: result: $cf_cv_libstdcpp" >&5
19353 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19354 test "$cf_cv_libstdcpp" = yes &&
19355 cf_add_libs="-l$cf_stdcpp_libname"
19356 # Filter out duplicates - this happens with badly-designed ".pc" files...
19357 for cf_add_1lib in $CXXLIBS
19358 do
19359         for cf_add_2lib in $cf_add_libs
19360         do
19361                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19362                 then
19363                         cf_add_1lib=
19364                         break
19365                 fi
19366         done
19367         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19368 done
19369 CXXLIBS="$cf_add_libs"
19370
19371 fi
19372
19373         echo "$as_me:19373: checking whether $CXX understands -c and -o together" >&5
19374 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19375 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19376   echo $ECHO_N "(cached) $ECHO_C" >&6
19377 else
19378
19379 cat > conftest.$ac_ext <<CF_EOF
19380 #include <stdio.h>
19381 int main()
19382 {
19383         ${cf_cv_main_return:-return}(0);
19384 }
19385 CF_EOF
19386 # We do the test twice because some compilers refuse to overwrite an
19387 # existing .o file with -o, though they will create one.
19388 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19389 if { (eval echo "$as_me:19389: \"$ac_try\"") >&5
19390   (eval $ac_try) 2>&5
19391   ac_status=$?
19392   echo "$as_me:19392: \$? = $ac_status" >&5
19393   (exit $ac_status); } &&
19394   test -f conftest2.$ac_objext && { (eval echo "$as_me:19394: \"$ac_try\"") >&5
19395   (eval $ac_try) 2>&5
19396   ac_status=$?
19397   echo "$as_me:19397: \$? = $ac_status" >&5
19398   (exit $ac_status); };
19399 then
19400   eval cf_cv_prog_CXX_c_o=yes
19401 else
19402   eval cf_cv_prog_CXX_c_o=no
19403 fi
19404 rm -rf conftest*
19405
19406 fi
19407 if test $cf_cv_prog_CXX_c_o = yes; then
19408   echo "$as_me:19408: result: yes" >&5
19409 echo "${ECHO_T}yes" >&6
19410 else
19411   echo "$as_me:19411: result: no" >&5
19412 echo "${ECHO_T}no" >&6
19413 fi
19414
19415         case $GXX_VERSION in
19416         (1*|2.0-6*)
19417                 cf_cxx_library=yes
19418                 ;;
19419         (*-2.7*|2.7*)
19420
19421 cf_cxx_library=unknown
19422 case $cf_cv_system_name in
19423 (os2*)
19424         cf_gpp_libname=gpp
19425         ;;
19426 (*)
19427         cf_gpp_libname=g++
19428         ;;
19429 esac
19430 if test "$GXX" = yes; then
19431         echo "$as_me:19431: checking for lib$cf_gpp_libname" >&5
19432 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19433         cf_save="$LIBS"
19434
19435 cf_add_libs="-l$cf_gpp_libname"
19436 # Filter out duplicates - this happens with badly-designed ".pc" files...
19437 for cf_add_1lib in $LIBS
19438 do
19439         for cf_add_2lib in $cf_add_libs
19440         do
19441                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19442                 then
19443                         cf_add_1lib=
19444                         break
19445                 fi
19446         done
19447         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19448 done
19449 LIBS="$cf_add_libs"
19450
19451         cat >conftest.$ac_ext <<_ACEOF
19452 #line 19452 "configure"
19453 #include "confdefs.h"
19454
19455 #include <$cf_gpp_libname/builtin.h>
19456
19457 int
19458 main ()
19459 {
19460 two_arg_error_handler_t foo2 = lib_error_handler
19461   ;
19462   return 0;
19463 }
19464 _ACEOF
19465 rm -f conftest.$ac_objext conftest$ac_exeext
19466 if { (eval echo "$as_me:19466: \"$ac_link\"") >&5
19467   (eval $ac_link) 2>&5
19468   ac_status=$?
19469   echo "$as_me:19469: \$? = $ac_status" >&5
19470   (exit $ac_status); } &&
19471          { ac_try='test -s conftest$ac_exeext'
19472   { (eval echo "$as_me:19472: \"$ac_try\"") >&5
19473   (eval $ac_try) 2>&5
19474   ac_status=$?
19475   echo "$as_me:19475: \$? = $ac_status" >&5
19476   (exit $ac_status); }; }; then
19477   cf_cxx_library=yes
19478
19479 cf_add_libs="-l$cf_gpp_libname"
19480 # Filter out duplicates - this happens with badly-designed ".pc" files...
19481 for cf_add_1lib in $CXXLIBS
19482 do
19483         for cf_add_2lib in $cf_add_libs
19484         do
19485                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19486                 then
19487                         cf_add_1lib=
19488                         break
19489                 fi
19490         done
19491         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19492 done
19493 CXXLIBS="$cf_add_libs"
19494
19495          if test "$cf_gpp_libname" = cpp ; then
19496
19497 cat >>confdefs.h <<\EOF
19498 #define HAVE_GPP_BUILTIN_H 1
19499 EOF
19500
19501          else
19502
19503 cat >>confdefs.h <<\EOF
19504 #define HAVE_GXX_BUILTIN_H 1
19505 EOF
19506
19507          fi
19508 else
19509   echo "$as_me: failed program was:" >&5
19510 cat conftest.$ac_ext >&5
19511 cat >conftest.$ac_ext <<_ACEOF
19512 #line 19512 "configure"
19513 #include "confdefs.h"
19514
19515 #include <builtin.h>
19516
19517 int
19518 main ()
19519 {
19520 two_arg_error_handler_t foo2 = lib_error_handler
19521   ;
19522   return 0;
19523 }
19524 _ACEOF
19525 rm -f conftest.$ac_objext conftest$ac_exeext
19526 if { (eval echo "$as_me:19526: \"$ac_link\"") >&5
19527   (eval $ac_link) 2>&5
19528   ac_status=$?
19529   echo "$as_me:19529: \$? = $ac_status" >&5
19530   (exit $ac_status); } &&
19531          { ac_try='test -s conftest$ac_exeext'
19532   { (eval echo "$as_me:19532: \"$ac_try\"") >&5
19533   (eval $ac_try) 2>&5
19534   ac_status=$?
19535   echo "$as_me:19535: \$? = $ac_status" >&5
19536   (exit $ac_status); }; }; then
19537   cf_cxx_library=yes
19538
19539 cf_add_libs="-l$cf_gpp_libname"
19540 # Filter out duplicates - this happens with badly-designed ".pc" files...
19541 for cf_add_1lib in $CXXLIBS
19542 do
19543         for cf_add_2lib in $cf_add_libs
19544         do
19545                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19546                 then
19547                         cf_add_1lib=
19548                         break
19549                 fi
19550         done
19551         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19552 done
19553 CXXLIBS="$cf_add_libs"
19554
19555 cat >>confdefs.h <<\EOF
19556 #define HAVE_BUILTIN_H 1
19557 EOF
19558
19559 else
19560   echo "$as_me: failed program was:" >&5
19561 cat conftest.$ac_ext >&5
19562 cf_cxx_library=no
19563 fi
19564 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19565 fi
19566 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19567         LIBS="$cf_save"
19568         echo "$as_me:19568: result: $cf_cxx_library" >&5
19569 echo "${ECHO_T}$cf_cxx_library" >&6
19570 fi
19571
19572                 ;;
19573         (*)
19574                 cf_cxx_library=no
19575                 ;;
19576         esac
19577
19578         ac_ext=cc
19579 ac_cpp='$CXXCPP $CPPFLAGS'
19580 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19581 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19582 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19583 ac_main_return=return
19584 echo "$as_me:19584: checking how to run the C++ preprocessor" >&5
19585 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19586 if test -z "$CXXCPP"; then
19587   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19588   echo $ECHO_N "(cached) $ECHO_C" >&6
19589 else
19590       # Double quotes because CXXCPP needs to be expanded
19591     for CXXCPP in "$CXX -E" "/lib/cpp"
19592     do
19593       ac_preproc_ok=false
19594 for ac_cxx_preproc_warn_flag in '' yes
19595 do
19596   # Use a header file that comes with gcc, so configuring glibc
19597   # with a fresh cross-compiler works.
19598   # On the NeXT, cc -E runs the code through the compiler's parser,
19599   # not just through cpp. "Syntax error" is here to catch this case.
19600   cat >conftest.$ac_ext <<_ACEOF
19601 #line 19601 "configure"
19602 #include "confdefs.h"
19603 #include <assert.h>
19604                      Syntax error
19605 _ACEOF
19606 if { (eval echo "$as_me:19606: \"$ac_cpp conftest.$ac_ext\"") >&5
19607   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19608   ac_status=$?
19609   egrep -v '^ *\+' conftest.er1 >conftest.err
19610   rm -f conftest.er1
19611   cat conftest.err >&5
19612   echo "$as_me:19612: \$? = $ac_status" >&5
19613   (exit $ac_status); } >/dev/null; then
19614   if test -s conftest.err; then
19615     ac_cpp_err=$ac_cxx_preproc_warn_flag
19616   else
19617     ac_cpp_err=
19618   fi
19619 else
19620   ac_cpp_err=yes
19621 fi
19622 if test -z "$ac_cpp_err"; then
19623   :
19624 else
19625   echo "$as_me: failed program was:" >&5
19626   cat conftest.$ac_ext >&5
19627   # Broken: fails on valid input.
19628 continue
19629 fi
19630 rm -f conftest.err conftest.$ac_ext
19631
19632   # OK, works on sane cases.  Now check whether non-existent headers
19633   # can be detected and how.
19634   cat >conftest.$ac_ext <<_ACEOF
19635 #line 19635 "configure"
19636 #include "confdefs.h"
19637 #include <ac_nonexistent.h>
19638 _ACEOF
19639 if { (eval echo "$as_me:19639: \"$ac_cpp conftest.$ac_ext\"") >&5
19640   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19641   ac_status=$?
19642   egrep -v '^ *\+' conftest.er1 >conftest.err
19643   rm -f conftest.er1
19644   cat conftest.err >&5
19645   echo "$as_me:19645: \$? = $ac_status" >&5
19646   (exit $ac_status); } >/dev/null; then
19647   if test -s conftest.err; then
19648     ac_cpp_err=$ac_cxx_preproc_warn_flag
19649   else
19650     ac_cpp_err=
19651   fi
19652 else
19653   ac_cpp_err=yes
19654 fi
19655 if test -z "$ac_cpp_err"; then
19656   # Broken: success on invalid input.
19657 continue
19658 else
19659   echo "$as_me: failed program was:" >&5
19660   cat conftest.$ac_ext >&5
19661   # Passes both tests.
19662 ac_preproc_ok=:
19663 break
19664 fi
19665 rm -f conftest.err conftest.$ac_ext
19666
19667 done
19668 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19669 rm -f conftest.err conftest.$ac_ext
19670 if $ac_preproc_ok; then
19671   break
19672 fi
19673
19674     done
19675     ac_cv_prog_CXXCPP=$CXXCPP
19676
19677 fi
19678   CXXCPP=$ac_cv_prog_CXXCPP
19679 else
19680   ac_cv_prog_CXXCPP=$CXXCPP
19681 fi
19682 echo "$as_me:19682: result: $CXXCPP" >&5
19683 echo "${ECHO_T}$CXXCPP" >&6
19684 ac_preproc_ok=false
19685 for ac_cxx_preproc_warn_flag in '' yes
19686 do
19687   # Use a header file that comes with gcc, so configuring glibc
19688   # with a fresh cross-compiler works.
19689   # On the NeXT, cc -E runs the code through the compiler's parser,
19690   # not just through cpp. "Syntax error" is here to catch this case.
19691   cat >conftest.$ac_ext <<_ACEOF
19692 #line 19692 "configure"
19693 #include "confdefs.h"
19694 #include <assert.h>
19695                      Syntax error
19696 _ACEOF
19697 if { (eval echo "$as_me:19697: \"$ac_cpp conftest.$ac_ext\"") >&5
19698   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19699   ac_status=$?
19700   egrep -v '^ *\+' conftest.er1 >conftest.err
19701   rm -f conftest.er1
19702   cat conftest.err >&5
19703   echo "$as_me:19703: \$? = $ac_status" >&5
19704   (exit $ac_status); } >/dev/null; then
19705   if test -s conftest.err; then
19706     ac_cpp_err=$ac_cxx_preproc_warn_flag
19707   else
19708     ac_cpp_err=
19709   fi
19710 else
19711   ac_cpp_err=yes
19712 fi
19713 if test -z "$ac_cpp_err"; then
19714   :
19715 else
19716   echo "$as_me: failed program was:" >&5
19717   cat conftest.$ac_ext >&5
19718   # Broken: fails on valid input.
19719 continue
19720 fi
19721 rm -f conftest.err conftest.$ac_ext
19722
19723   # OK, works on sane cases.  Now check whether non-existent headers
19724   # can be detected and how.
19725   cat >conftest.$ac_ext <<_ACEOF
19726 #line 19726 "configure"
19727 #include "confdefs.h"
19728 #include <ac_nonexistent.h>
19729 _ACEOF
19730 if { (eval echo "$as_me:19730: \"$ac_cpp conftest.$ac_ext\"") >&5
19731   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19732   ac_status=$?
19733   egrep -v '^ *\+' conftest.er1 >conftest.err
19734   rm -f conftest.er1
19735   cat conftest.err >&5
19736   echo "$as_me:19736: \$? = $ac_status" >&5
19737   (exit $ac_status); } >/dev/null; then
19738   if test -s conftest.err; then
19739     ac_cpp_err=$ac_cxx_preproc_warn_flag
19740   else
19741     ac_cpp_err=
19742   fi
19743 else
19744   ac_cpp_err=yes
19745 fi
19746 if test -z "$ac_cpp_err"; then
19747   # Broken: success on invalid input.
19748 continue
19749 else
19750   echo "$as_me: failed program was:" >&5
19751   cat conftest.$ac_ext >&5
19752   # Passes both tests.
19753 ac_preproc_ok=:
19754 break
19755 fi
19756 rm -f conftest.err conftest.$ac_ext
19757
19758 done
19759 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19760 rm -f conftest.err conftest.$ac_ext
19761 if $ac_preproc_ok; then
19762   :
19763 else
19764   { { echo "$as_me:19764: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19765 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19766    { (exit 1); exit 1; }; }
19767 fi
19768
19769 ac_ext=cc
19770 ac_cpp='$CXXCPP $CPPFLAGS'
19771 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19772 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19773 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19774 ac_main_return=return
19775
19776 for ac_header in typeinfo
19777 do
19778 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19779 echo "$as_me:19779: checking for $ac_header" >&5
19780 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19781 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19782   echo $ECHO_N "(cached) $ECHO_C" >&6
19783 else
19784   cat >conftest.$ac_ext <<_ACEOF
19785 #line 19785 "configure"
19786 #include "confdefs.h"
19787 #include <$ac_header>
19788 _ACEOF
19789 if { (eval echo "$as_me:19789: \"$ac_cpp conftest.$ac_ext\"") >&5
19790   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19791   ac_status=$?
19792   egrep -v '^ *\+' conftest.er1 >conftest.err
19793   rm -f conftest.er1
19794   cat conftest.err >&5
19795   echo "$as_me:19795: \$? = $ac_status" >&5
19796   (exit $ac_status); } >/dev/null; then
19797   if test -s conftest.err; then
19798     ac_cpp_err=$ac_cxx_preproc_warn_flag
19799   else
19800     ac_cpp_err=
19801   fi
19802 else
19803   ac_cpp_err=yes
19804 fi
19805 if test -z "$ac_cpp_err"; then
19806   eval "$as_ac_Header=yes"
19807 else
19808   echo "$as_me: failed program was:" >&5
19809   cat conftest.$ac_ext >&5
19810   eval "$as_ac_Header=no"
19811 fi
19812 rm -f conftest.err conftest.$ac_ext
19813 fi
19814 echo "$as_me:19814: result: `eval echo '${'$as_ac_Header'}'`" >&5
19815 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19816 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19817   cat >>confdefs.h <<EOF
19818 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19819 EOF
19820
19821 fi
19822 done
19823
19824 for ac_header in iostream
19825 do
19826 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19827 echo "$as_me:19827: checking for $ac_header" >&5
19828 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19829 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19830   echo $ECHO_N "(cached) $ECHO_C" >&6
19831 else
19832   cat >conftest.$ac_ext <<_ACEOF
19833 #line 19833 "configure"
19834 #include "confdefs.h"
19835 #include <$ac_header>
19836 _ACEOF
19837 if { (eval echo "$as_me:19837: \"$ac_cpp conftest.$ac_ext\"") >&5
19838   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19839   ac_status=$?
19840   egrep -v '^ *\+' conftest.er1 >conftest.err
19841   rm -f conftest.er1
19842   cat conftest.err >&5
19843   echo "$as_me:19843: \$? = $ac_status" >&5
19844   (exit $ac_status); } >/dev/null; then
19845   if test -s conftest.err; then
19846     ac_cpp_err=$ac_cxx_preproc_warn_flag
19847   else
19848     ac_cpp_err=
19849   fi
19850 else
19851   ac_cpp_err=yes
19852 fi
19853 if test -z "$ac_cpp_err"; then
19854   eval "$as_ac_Header=yes"
19855 else
19856   echo "$as_me: failed program was:" >&5
19857   cat conftest.$ac_ext >&5
19858   eval "$as_ac_Header=no"
19859 fi
19860 rm -f conftest.err conftest.$ac_ext
19861 fi
19862 echo "$as_me:19862: result: `eval echo '${'$as_ac_Header'}'`" >&5
19863 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19864 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19865   cat >>confdefs.h <<EOF
19866 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19867 EOF
19868
19869 fi
19870 done
19871
19872 if test x"$ac_cv_header_iostream" = xyes ; then
19873         echo "$as_me:19873: checking if iostream uses std-namespace" >&5
19874 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
19875         cat >conftest.$ac_ext <<_ACEOF
19876 #line 19876 "configure"
19877 #include "confdefs.h"
19878
19879 #include <iostream>
19880 using std::endl;
19881 using std::cerr;
19882 int
19883 main ()
19884 {
19885
19886 cerr << "testing" << endl;
19887
19888   ;
19889   return 0;
19890 }
19891 _ACEOF
19892 rm -f conftest.$ac_objext
19893 if { (eval echo "$as_me:19893: \"$ac_compile\"") >&5
19894   (eval $ac_compile) 2>&5
19895   ac_status=$?
19896   echo "$as_me:19896: \$? = $ac_status" >&5
19897   (exit $ac_status); } &&
19898          { ac_try='test -s conftest.$ac_objext'
19899   { (eval echo "$as_me:19899: \"$ac_try\"") >&5
19900   (eval $ac_try) 2>&5
19901   ac_status=$?
19902   echo "$as_me:19902: \$? = $ac_status" >&5
19903   (exit $ac_status); }; }; then
19904   cf_iostream_namespace=yes
19905 else
19906   echo "$as_me: failed program was:" >&5
19907 cat conftest.$ac_ext >&5
19908 cf_iostream_namespace=no
19909 fi
19910 rm -f conftest.$ac_objext conftest.$ac_ext
19911         echo "$as_me:19911: result: $cf_iostream_namespace" >&5
19912 echo "${ECHO_T}$cf_iostream_namespace" >&6
19913         if test "$cf_iostream_namespace" = yes ; then
19914
19915 cat >>confdefs.h <<\EOF
19916 #define IOSTREAM_NAMESPACE 1
19917 EOF
19918
19919         fi
19920 fi
19921
19922 echo "$as_me:19922: checking if we should include stdbool.h" >&5
19923 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19924
19925 if test "${cf_cv_header_stdbool_h+set}" = set; then
19926   echo $ECHO_N "(cached) $ECHO_C" >&6
19927 else
19928
19929         cat >conftest.$ac_ext <<_ACEOF
19930 #line 19930 "configure"
19931 #include "confdefs.h"
19932
19933 int
19934 main ()
19935 {
19936 bool foo = false
19937   ;
19938   return 0;
19939 }
19940 _ACEOF
19941 rm -f conftest.$ac_objext
19942 if { (eval echo "$as_me:19942: \"$ac_compile\"") >&5
19943   (eval $ac_compile) 2>&5
19944   ac_status=$?
19945   echo "$as_me:19945: \$? = $ac_status" >&5
19946   (exit $ac_status); } &&
19947          { ac_try='test -s conftest.$ac_objext'
19948   { (eval echo "$as_me:19948: \"$ac_try\"") >&5
19949   (eval $ac_try) 2>&5
19950   ac_status=$?
19951   echo "$as_me:19951: \$? = $ac_status" >&5
19952   (exit $ac_status); }; }; then
19953   cf_cv_header_stdbool_h=0
19954 else
19955   echo "$as_me: failed program was:" >&5
19956 cat conftest.$ac_ext >&5
19957 cat >conftest.$ac_ext <<_ACEOF
19958 #line 19958 "configure"
19959 #include "confdefs.h"
19960
19961 #ifndef __BEOS__
19962 #include <stdbool.h>
19963 #endif
19964
19965 int
19966 main ()
19967 {
19968 bool foo = false
19969   ;
19970   return 0;
19971 }
19972 _ACEOF
19973 rm -f conftest.$ac_objext
19974 if { (eval echo "$as_me:19974: \"$ac_compile\"") >&5
19975   (eval $ac_compile) 2>&5
19976   ac_status=$?
19977   echo "$as_me:19977: \$? = $ac_status" >&5
19978   (exit $ac_status); } &&
19979          { ac_try='test -s conftest.$ac_objext'
19980   { (eval echo "$as_me:19980: \"$ac_try\"") >&5
19981   (eval $ac_try) 2>&5
19982   ac_status=$?
19983   echo "$as_me:19983: \$? = $ac_status" >&5
19984   (exit $ac_status); }; }; then
19985   cf_cv_header_stdbool_h=1
19986 else
19987   echo "$as_me: failed program was:" >&5
19988 cat conftest.$ac_ext >&5
19989 cf_cv_header_stdbool_h=0
19990 fi
19991 rm -f conftest.$ac_objext conftest.$ac_ext
19992 fi
19993 rm -f conftest.$ac_objext conftest.$ac_ext
19994 fi
19995
19996 if test "$cf_cv_header_stdbool_h" = 1
19997 then    echo "$as_me:19997: result: yes" >&5
19998 echo "${ECHO_T}yes" >&6
19999 else    echo "$as_me:19999: result: no" >&5
20000 echo "${ECHO_T}no" >&6
20001 fi
20002
20003 echo "$as_me:20003: checking for builtin bool type" >&5
20004 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20005
20006 if test "${cf_cv_builtin_bool+set}" = set; then
20007   echo $ECHO_N "(cached) $ECHO_C" >&6
20008 else
20009
20010         cat >conftest.$ac_ext <<_ACEOF
20011 #line 20011 "configure"
20012 #include "confdefs.h"
20013
20014 #include <stdio.h>
20015 #include <sys/types.h>
20016
20017 int
20018 main ()
20019 {
20020 bool x = false
20021   ;
20022   return 0;
20023 }
20024 _ACEOF
20025 rm -f conftest.$ac_objext
20026 if { (eval echo "$as_me:20026: \"$ac_compile\"") >&5
20027   (eval $ac_compile) 2>&5
20028   ac_status=$?
20029   echo "$as_me:20029: \$? = $ac_status" >&5
20030   (exit $ac_status); } &&
20031          { ac_try='test -s conftest.$ac_objext'
20032   { (eval echo "$as_me:20032: \"$ac_try\"") >&5
20033   (eval $ac_try) 2>&5
20034   ac_status=$?
20035   echo "$as_me:20035: \$? = $ac_status" >&5
20036   (exit $ac_status); }; }; then
20037   cf_cv_builtin_bool=1
20038 else
20039   echo "$as_me: failed program was:" >&5
20040 cat conftest.$ac_ext >&5
20041 cf_cv_builtin_bool=0
20042 fi
20043 rm -f conftest.$ac_objext conftest.$ac_ext
20044
20045 fi
20046
20047 if test "$cf_cv_builtin_bool" = 1
20048 then    echo "$as_me:20048: result: yes" >&5
20049 echo "${ECHO_T}yes" >&6
20050 else    echo "$as_me:20050: result: no" >&5
20051 echo "${ECHO_T}no" >&6
20052 fi
20053
20054 echo "$as_me:20054: checking for size of bool" >&5
20055 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20056 if test "${cf_cv_type_of_bool+set}" = set; then
20057   echo $ECHO_N "(cached) $ECHO_C" >&6
20058 else
20059
20060         rm -f cf_test.out
20061         if test "$cross_compiling" = yes; then
20062   cf_cv_type_of_bool=unknown
20063 else
20064   cat >conftest.$ac_ext <<_ACEOF
20065 #line 20065 "configure"
20066 #include "confdefs.h"
20067
20068 #include <stdlib.h>
20069 #include <stdio.h>
20070
20071 #if defined(__cplusplus)
20072
20073 #ifdef HAVE_GXX_BUILTIN_H
20074 #include <g++/builtin.h>
20075 #elif HAVE_GPP_BUILTIN_H
20076 #include <gpp/builtin.h>
20077 #elif HAVE_BUILTIN_H
20078 #include <builtin.h>
20079 #endif
20080
20081 #else
20082
20083 #if $cf_cv_header_stdbool_h
20084 #include <stdbool.h>
20085 #endif
20086
20087 #endif
20088
20089 int main()
20090 {
20091         FILE *fp = fopen("cf_test.out", "w");
20092         if (fp != 0) {
20093                 bool x = true;
20094                 if ((bool)(-x) >= 0)
20095                         fputs("unsigned ", fp);
20096                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20097                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20098                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20099                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20100                 fclose(fp);
20101         }
20102         ${cf_cv_main_return:-return}(0);
20103 }
20104
20105 _ACEOF
20106 rm -f conftest$ac_exeext
20107 if { (eval echo "$as_me:20107: \"$ac_link\"") >&5
20108   (eval $ac_link) 2>&5
20109   ac_status=$?
20110   echo "$as_me:20110: \$? = $ac_status" >&5
20111   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20112   { (eval echo "$as_me:20112: \"$ac_try\"") >&5
20113   (eval $ac_try) 2>&5
20114   ac_status=$?
20115   echo "$as_me:20115: \$? = $ac_status" >&5
20116   (exit $ac_status); }; }; then
20117   cf_cv_type_of_bool=`cat cf_test.out`
20118                  if test -z "$cf_cv_type_of_bool"; then
20119                    cf_cv_type_of_bool=unknown
20120                  fi
20121 else
20122   echo "$as_me: program exited with status $ac_status" >&5
20123 echo "$as_me: failed program was:" >&5
20124 cat conftest.$ac_ext >&5
20125 cf_cv_type_of_bool=unknown
20126 fi
20127 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20128 fi
20129
20130 fi
20131
20132         rm -f cf_test.out
20133 echo "$as_me:20133: result: $cf_cv_type_of_bool" >&5
20134 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20135 if test "$cf_cv_type_of_bool" = unknown ; then
20136         case .$NCURSES_BOOL in
20137         (.auto|.) NCURSES_BOOL=unsigned;;
20138         esac
20139         { echo "$as_me:20139: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20140 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20141         cf_cv_type_of_bool=$NCURSES_BOOL
20142 fi
20143
20144 echo "$as_me:20144: checking for special defines needed for etip.h" >&5
20145 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20146 cf_save_CXXFLAGS="$CXXFLAGS"
20147 cf_result="none"
20148
20149 # etip.h includes ncurses.h which includes ncurses_dll.h
20150 # But ncurses_dll.h is generated - fix here.
20151 test -d include || mkdir include
20152 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
20153
20154 for cf_math in "" MATH_H
20155 do
20156 for cf_excp in "" MATH_EXCEPTION
20157 do
20158         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
20159         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20160         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20161 cat >conftest.$ac_ext <<_ACEOF
20162 #line 20162 "configure"
20163 #include "confdefs.h"
20164
20165 #include <etip.h.in>
20166
20167 int
20168 main ()
20169 {
20170
20171   ;
20172   return 0;
20173 }
20174 _ACEOF
20175 rm -f conftest.$ac_objext
20176 if { (eval echo "$as_me:20176: \"$ac_compile\"") >&5
20177   (eval $ac_compile) 2>&5
20178   ac_status=$?
20179   echo "$as_me:20179: \$? = $ac_status" >&5
20180   (exit $ac_status); } &&
20181          { ac_try='test -s conftest.$ac_objext'
20182   { (eval echo "$as_me:20182: \"$ac_try\"") >&5
20183   (eval $ac_try) 2>&5
20184   ac_status=$?
20185   echo "$as_me:20185: \$? = $ac_status" >&5
20186   (exit $ac_status); }; }; then
20187
20188         test -n "$cf_math" && cat >>confdefs.h <<EOF
20189 #define ETIP_NEEDS_${cf_math} 1
20190 EOF
20191
20192         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20193 #define ETIP_NEEDS_${cf_excp} 1
20194 EOF
20195
20196         cf_result="$cf_math $cf_excp"
20197         break 2
20198
20199 else
20200   echo "$as_me: failed program was:" >&5
20201 cat conftest.$ac_ext >&5
20202 fi
20203 rm -f conftest.$ac_objext conftest.$ac_ext
20204 done
20205 done
20206 echo "$as_me:20206: result: $cf_result" >&5
20207 echo "${ECHO_T}$cf_result" >&6
20208 CXXFLAGS="$cf_save_CXXFLAGS"
20209
20210 if test -n "$CXX"; then
20211 echo "$as_me:20211: checking if $CXX accepts parameter initialization" >&5
20212 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20213 if test "${cf_cv_cpp_param_init+set}" = set; then
20214   echo $ECHO_N "(cached) $ECHO_C" >&6
20215 else
20216
20217         ac_ext=cc
20218 ac_cpp='$CXXCPP $CPPFLAGS'
20219 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20220 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20221 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20222 ac_main_return=return
20223
20224         if test "$cross_compiling" = yes; then
20225   cf_cv_cpp_param_init=unknown
20226 else
20227   cat >conftest.$ac_ext <<_ACEOF
20228 #line 20228 "configure"
20229 #include "confdefs.h"
20230
20231 class TEST {
20232 private:
20233         int value;
20234 public:
20235         TEST(int x = 1);
20236         ~TEST();
20237 };
20238
20239 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20240 {
20241         value = x;
20242 }
20243 int main() { }
20244
20245 _ACEOF
20246 rm -f conftest$ac_exeext
20247 if { (eval echo "$as_me:20247: \"$ac_link\"") >&5
20248   (eval $ac_link) 2>&5
20249   ac_status=$?
20250   echo "$as_me:20250: \$? = $ac_status" >&5
20251   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20252   { (eval echo "$as_me:20252: \"$ac_try\"") >&5
20253   (eval $ac_try) 2>&5
20254   ac_status=$?
20255   echo "$as_me:20255: \$? = $ac_status" >&5
20256   (exit $ac_status); }; }; then
20257   cf_cv_cpp_param_init=yes
20258 else
20259   echo "$as_me: program exited with status $ac_status" >&5
20260 echo "$as_me: failed program was:" >&5
20261 cat conftest.$ac_ext >&5
20262 cf_cv_cpp_param_init=no
20263 fi
20264 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20265 fi
20266         ac_ext=cc
20267 ac_cpp='$CXXCPP $CPPFLAGS'
20268 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20269 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20270 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20271 ac_main_return=return
20272
20273 fi
20274 echo "$as_me:20274: result: $cf_cv_cpp_param_init" >&5
20275 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20276 fi
20277 test "$cf_cv_cpp_param_init" = yes &&
20278 cat >>confdefs.h <<\EOF
20279 #define CPP_HAS_PARAM_INIT 1
20280 EOF
20281
20282 if test -n "$CXX"; then
20283
20284 echo "$as_me:20284: checking if $CXX accepts static_cast" >&5
20285 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20286 if test "${cf_cv_cpp_static_cast+set}" = set; then
20287   echo $ECHO_N "(cached) $ECHO_C" >&6
20288 else
20289
20290         ac_ext=cc
20291 ac_cpp='$CXXCPP $CPPFLAGS'
20292 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20293 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20294 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20295 ac_main_return=return
20296
20297         cat >conftest.$ac_ext <<_ACEOF
20298 #line 20298 "configure"
20299 #include "confdefs.h"
20300
20301 class NCursesPanel
20302 {
20303 public:
20304   NCursesPanel(int nlines,
20305                int ncols,
20306                int begin_y = 0,
20307                int begin_x = 0)
20308   {
20309   }
20310   NCursesPanel();
20311   ~NCursesPanel();
20312 };
20313
20314 template<class T> class NCursesUserPanel : public NCursesPanel
20315 {
20316 public:
20317   NCursesUserPanel (int nlines,
20318                     int ncols,
20319                     int begin_y = 0,
20320                     int begin_x = 0,
20321                     const T* p_UserData = static_cast<T*>(0))
20322     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20323   {
20324   };
20325   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20326   {
20327   };
20328
20329   virtual ~NCursesUserPanel() {};
20330 };
20331
20332 int
20333 main ()
20334 {
20335
20336         const char* p_UserData = static_cast<char*>(0)
20337   ;
20338   return 0;
20339 }
20340 _ACEOF
20341 rm -f conftest.$ac_objext
20342 if { (eval echo "$as_me:20342: \"$ac_compile\"") >&5
20343   (eval $ac_compile) 2>&5
20344   ac_status=$?
20345   echo "$as_me:20345: \$? = $ac_status" >&5
20346   (exit $ac_status); } &&
20347          { ac_try='test -s conftest.$ac_objext'
20348   { (eval echo "$as_me:20348: \"$ac_try\"") >&5
20349   (eval $ac_try) 2>&5
20350   ac_status=$?
20351   echo "$as_me:20351: \$? = $ac_status" >&5
20352   (exit $ac_status); }; }; then
20353   cf_cv_cpp_static_cast=yes
20354 else
20355   echo "$as_me: failed program was:" >&5
20356 cat conftest.$ac_ext >&5
20357 cf_cv_cpp_static_cast=no
20358 fi
20359 rm -f conftest.$ac_objext conftest.$ac_ext
20360
20361         ac_ext=cc
20362 ac_cpp='$CXXCPP $CPPFLAGS'
20363 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20364 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20365 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20366 ac_main_return=return
20367
20368 fi
20369 echo "$as_me:20369: result: $cf_cv_cpp_static_cast" >&5
20370 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20371
20372 fi
20373
20374 test "$cf_cv_cpp_static_cast" = yes &&
20375 cat >>confdefs.h <<\EOF
20376 #define CPP_HAS_STATIC_CAST 1
20377 EOF
20378
20379         CXX_AR='$(AR)'
20380         CXX_ARFLAGS='$(ARFLAGS)'
20381         case $cf_cv_system_name in
20382         (irix*)
20383             if test "$GXX" != yes ; then
20384                 CXX_AR='$(CXX)'
20385                 CXX_ARFLAGS='-ar -o'
20386             fi
20387             ;;
20388         (sco3.2v5*)
20389             CXXLDFLAGS="-u main"
20390             ;;
20391         (solaris2*)
20392             if test "$GXX" != yes ; then
20393                 CXX_AR='$(CXX)'
20394                 CXX_ARFLAGS='-xar -o'
20395             fi
20396             ;;
20397         esac
20398
20399 else
20400         cf_cxx_library=no
20401         cf_cv_builtin_bool=1
20402
20403         # Just because we are not configuring against C++ right now does not
20404         # mean that a user will not want to use C++.  Some distributors disable
20405         # the C++ portion of this configuration as a shortcut (or just to avoid
20406         # compiling the demo in the c++ directory).  So we need a reasonable
20407         # default for the 'bool' type.
20408         #
20409         # Caveat: since the storage of the bool type is not standardized, it
20410         # may change.
20411
20412         if test "$NCURSES_BOOL" != auto ; then
20413                 cf_cv_type_of_bool=$NCURSES_BOOL
20414                 cf_cv_header_stdbool_h=0
20415         else
20416                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20417
20418 echo "$as_me:20418: checking for size of bool" >&5
20419 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20420 if test "${cf_cv_type_of_bool+set}" = set; then
20421   echo $ECHO_N "(cached) $ECHO_C" >&6
20422 else
20423
20424         rm -f cf_test.out
20425         if test "$cross_compiling" = yes; then
20426   cf_cv_type_of_bool=unknown
20427 else
20428   cat >conftest.$ac_ext <<_ACEOF
20429 #line 20429 "configure"
20430 #include "confdefs.h"
20431
20432 #include <stdlib.h>
20433 #include <stdio.h>
20434
20435 #if defined(__cplusplus)
20436
20437 #ifdef HAVE_GXX_BUILTIN_H
20438 #include <g++/builtin.h>
20439 #elif HAVE_GPP_BUILTIN_H
20440 #include <gpp/builtin.h>
20441 #elif HAVE_BUILTIN_H
20442 #include <builtin.h>
20443 #endif
20444
20445 #else
20446
20447 #if $cf_cv_header_stdbool_h
20448 #include <stdbool.h>
20449 #endif
20450
20451 #endif
20452
20453 int main()
20454 {
20455         FILE *fp = fopen("cf_test.out", "w");
20456         if (fp != 0) {
20457                 bool x = true;
20458                 if ((bool)(-x) >= 0)
20459                         fputs("unsigned ", fp);
20460                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20461                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20462                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20463                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20464                 fclose(fp);
20465         }
20466         ${cf_cv_main_return:-return}(0);
20467 }
20468
20469 _ACEOF
20470 rm -f conftest$ac_exeext
20471 if { (eval echo "$as_me:20471: \"$ac_link\"") >&5
20472   (eval $ac_link) 2>&5
20473   ac_status=$?
20474   echo "$as_me:20474: \$? = $ac_status" >&5
20475   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20476   { (eval echo "$as_me:20476: \"$ac_try\"") >&5
20477   (eval $ac_try) 2>&5
20478   ac_status=$?
20479   echo "$as_me:20479: \$? = $ac_status" >&5
20480   (exit $ac_status); }; }; then
20481   cf_cv_type_of_bool=`cat cf_test.out`
20482                  if test -z "$cf_cv_type_of_bool"; then
20483                    cf_cv_type_of_bool=unknown
20484                  fi
20485 else
20486   echo "$as_me: program exited with status $ac_status" >&5
20487 echo "$as_me: failed program was:" >&5
20488 cat conftest.$ac_ext >&5
20489 cf_cv_type_of_bool=unknown
20490 fi
20491 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20492 fi
20493
20494 fi
20495
20496         rm -f cf_test.out
20497 echo "$as_me:20497: result: $cf_cv_type_of_bool" >&5
20498 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20499 if test "$cf_cv_type_of_bool" = unknown ; then
20500         case .$NCURSES_BOOL in
20501         (.auto|.) NCURSES_BOOL=unsigned;;
20502         esac
20503         { echo "$as_me:20503: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20504 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20505         cf_cv_type_of_bool=$NCURSES_BOOL
20506 fi
20507
20508                 else
20509                         echo "$as_me:20509: checking for fallback type of bool" >&5
20510 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20511                         case "$host_cpu" in
20512                         (i?86)  cf_cv_type_of_bool=char ;;
20513                         (*)     cf_cv_type_of_bool=int  ;;
20514                         esac
20515                         echo "$as_me:20515: result: $cf_cv_type_of_bool" >&5
20516 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20517                 fi
20518         fi
20519 fi
20520
20521 # If the C compiler did not declare bool, and we did not determine that the C++
20522 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20523 # ncurses library use the same type as C++ bool.  Note that this allows one to
20524 # specify the type of bool in a configure-script option and postpone
20525 # integration with the C++ compiler provided that the types are compatible.
20526 USE_CXX_BOOL=1
20527 if test $cf_cv_cc_bool_type = 1
20528 then
20529         # oops: C has a bool.  Unlikely, but C++ could differ.
20530         USE_CXX_BOOL=0
20531 elif test $cf_cv_builtin_bool = 0
20532 then
20533         # C++ has no bool
20534         USE_CXX_BOOL=0
20535 else
20536         # this is the normal case
20537         USE_CXX_BOOL='defined(__cplusplus)'
20538 fi
20539
20540 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20541
20542         if test "$cf_with_ada" != "no" ; then
20543                 if test "$with_libtool" != "no"; then
20544                         { echo "$as_me:20544: WARNING: libtool does not support Ada - disabling feature" >&5
20545 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20546                         cf_with_ada=no
20547                 fi
20548         fi
20549
20550         if test "$cf_with_ada" != "no" ; then
20551
20552 cf_ada_make=gnatmake
20553 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20554 set dummy $cf_ada_make; ac_word=$2
20555 echo "$as_me:20555: checking for $ac_word" >&5
20556 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20557 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20558   echo $ECHO_N "(cached) $ECHO_C" >&6
20559 else
20560   if test -n "$gnat_exists"; then
20561   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20562 else
20563   ac_save_IFS=$IFS; IFS=$ac_path_separator
20564 ac_dummy="$PATH"
20565 for ac_dir in $ac_dummy; do
20566   IFS=$ac_save_IFS
20567   test -z "$ac_dir" && ac_dir=.
20568   $as_executable_p "$ac_dir/$ac_word" || continue
20569 ac_cv_prog_gnat_exists="yes"
20570 echo "$as_me:20570: found $ac_dir/$ac_word" >&5
20571 break
20572 done
20573
20574   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20575 fi
20576 fi
20577 gnat_exists=$ac_cv_prog_gnat_exists
20578 if test -n "$gnat_exists"; then
20579   echo "$as_me:20579: result: $gnat_exists" >&5
20580 echo "${ECHO_T}$gnat_exists" >&6
20581 else
20582   echo "$as_me:20582: result: no" >&5
20583 echo "${ECHO_T}no" >&6
20584 fi
20585
20586 if test "$ac_cv_prog_gnat_exists" = no; then
20587         cf_ada_make=
20588         cf_cv_prog_gnat_correct=no
20589 else
20590
20591 echo "$as_me:20591: checking for gnat version" >&5
20592 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20593 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20594         grep '[0-9].[0-9][0-9]*' |\
20595         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20596 echo "$as_me:20596: result: $cf_gnat_version" >&5
20597 echo "${ECHO_T}$cf_gnat_version" >&6
20598
20599 case $cf_gnat_version in
20600 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
20601         cf_cv_prog_gnat_correct=yes
20602         ;;
20603 (*)
20604         { echo "$as_me:20604: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20605 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20606         cf_cv_prog_gnat_correct=no
20607         ;;
20608 esac
20609
20610         # Extract the first word of "m4", so it can be a program name with args.
20611 set dummy m4; ac_word=$2
20612 echo "$as_me:20612: checking for $ac_word" >&5
20613 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20614 if test "${ac_cv_prog_M4_exists+set}" = set; then
20615   echo $ECHO_N "(cached) $ECHO_C" >&6
20616 else
20617   if test -n "$M4_exists"; then
20618   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20619 else
20620   ac_save_IFS=$IFS; IFS=$ac_path_separator
20621 ac_dummy="$PATH"
20622 for ac_dir in $ac_dummy; do
20623   IFS=$ac_save_IFS
20624   test -z "$ac_dir" && ac_dir=.
20625   $as_executable_p "$ac_dir/$ac_word" || continue
20626 ac_cv_prog_M4_exists="yes"
20627 echo "$as_me:20627: found $ac_dir/$ac_word" >&5
20628 break
20629 done
20630
20631   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20632 fi
20633 fi
20634 M4_exists=$ac_cv_prog_M4_exists
20635 if test -n "$M4_exists"; then
20636   echo "$as_me:20636: result: $M4_exists" >&5
20637 echo "${ECHO_T}$M4_exists" >&6
20638 else
20639   echo "$as_me:20639: result: no" >&5
20640 echo "${ECHO_T}no" >&6
20641 fi
20642
20643         if test "$ac_cv_prog_M4_exists" = no; then
20644                 cf_cv_prog_gnat_correct=no
20645                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20646         fi
20647         if test "$cf_cv_prog_gnat_correct" = yes; then
20648                 echo "$as_me:20648: checking if GNAT works" >&5
20649 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20650
20651 rm -rf conftest* *~conftest*
20652 cat >>conftest.ads <<CF_EOF
20653 procedure conftest;
20654 CF_EOF
20655 cat >>conftest.adb <<CF_EOF
20656 with Text_IO;
20657 with GNAT.OS_Lib;
20658 procedure conftest is
20659 begin
20660    Text_IO.Put ("Hello World");
20661    Text_IO.New_Line;
20662    GNAT.OS_Lib.OS_Exit (0);
20663 end conftest;
20664 CF_EOF
20665 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20666    if ( ./conftest 1>&5 2>&1 ) ; then
20667       cf_cv_prog_gnat_correct=yes
20668    else
20669       cf_cv_prog_gnat_correct=no
20670    fi
20671 else
20672    cf_cv_prog_gnat_correct=no
20673 fi
20674 rm -rf conftest* *~conftest*
20675
20676                 echo "$as_me:20676: result: $cf_cv_prog_gnat_correct" >&5
20677 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20678         fi
20679 fi
20680
20681                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20682
20683         ADAFLAGS="$ADAFLAGS -gnatpn"
20684
20685         echo "$as_me:20685: checking optimization options for ADAFLAGS" >&5
20686 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20687         case "$CFLAGS" in
20688         (*-g*)
20689
20690         ADAFLAGS="$ADAFLAGS -g"
20691
20692                 ;;
20693         esac
20694         case "$CFLAGS" in
20695         (*-O*)
20696                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20697
20698         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20699
20700                 ;;
20701         esac
20702         echo "$as_me:20702: result: $ADAFLAGS" >&5
20703 echo "${ECHO_T}$ADAFLAGS" >&6
20704
20705 echo "$as_me:20705: checking if GNATPREP supports -T option" >&5
20706 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20707 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20708   echo $ECHO_N "(cached) $ECHO_C" >&6
20709 else
20710
20711 cf_cv_gnatprep_opt_t=no
20712 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20713
20714 fi
20715 echo "$as_me:20715: result: $cf_cv_gnatprep_opt_t" >&5
20716 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20717 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20718
20719 echo "$as_me:20719: checking if GNAT supports generics" >&5
20720 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20721 case $cf_gnat_version in
20722 (3.[1-9]*|[4-9].*)
20723         cf_gnat_generics=yes
20724         ;;
20725 (*)
20726         cf_gnat_generics=no
20727         ;;
20728 esac
20729 echo "$as_me:20729: result: $cf_gnat_generics" >&5
20730 echo "${ECHO_T}$cf_gnat_generics" >&6
20731
20732 if test "$cf_gnat_generics" = yes
20733 then
20734         cf_compile_generics=generics
20735         cf_generic_objects="\${GENOBJS}"
20736 else
20737         cf_compile_generics=
20738         cf_generic_objects=
20739 fi
20740
20741 echo "$as_me:20741: checking if GNAT supports SIGINT" >&5
20742 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20743 if test "${cf_cv_gnat_sigint+set}" = set; then
20744   echo $ECHO_N "(cached) $ECHO_C" >&6
20745 else
20746
20747 rm -rf conftest* *~conftest*
20748 cat >>conftest.ads <<CF_EOF
20749 with Ada.Interrupts.Names;
20750
20751 package ConfTest is
20752
20753    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20754    pragma Unreserve_All_Interrupts;
20755    pragma Warnings (On);
20756
20757    protected Process is
20758       procedure Stop;
20759       function Continue return Boolean;
20760       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20761    private
20762       Done : Boolean := False;
20763    end Process;
20764
20765 end ConfTest;
20766 CF_EOF
20767 cat >>conftest.adb <<CF_EOF
20768 package body ConfTest is
20769    protected body Process is
20770       procedure Stop is
20771       begin
20772          Done := True;
20773       end Stop;
20774       function Continue return Boolean is
20775       begin
20776          return not Done;
20777       end Continue;
20778    end Process;
20779 end ConfTest;
20780 CF_EOF
20781 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20782       cf_cv_gnat_sigint=yes
20783 else
20784    cf_cv_gnat_sigint=no
20785 fi
20786 rm -rf conftest* *~conftest*
20787
20788 fi
20789 echo "$as_me:20789: result: $cf_cv_gnat_sigint" >&5
20790 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20791
20792 if test $cf_cv_gnat_sigint = yes ; then
20793         USE_GNAT_SIGINT=""
20794 else
20795         USE_GNAT_SIGINT="#"
20796 fi
20797
20798 cf_gnat_libraries=no
20799 cf_gnat_projects=no
20800
20801 if test "$enable_gnat_projects" != no ; then
20802 echo "$as_me:20802: checking if GNAT supports project files" >&5
20803 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20804 case $cf_gnat_version in
20805 (3.[0-9]*)
20806         ;;
20807 (*)
20808         case $cf_cv_system_name in
20809         (cygwin*|msys*)
20810                 ;;
20811         (*)
20812                 mkdir conftest.src conftest.bin conftest.lib
20813                 cd conftest.src
20814                 rm -rf conftest* *~conftest*
20815                 cat >>library.gpr <<CF_EOF
20816 project Library is
20817   Kind := External ("LIB_KIND");
20818   for Library_Name use "ConfTest";
20819   for Object_Dir use ".";
20820   for Library_ALI_Dir use External("LIBRARY_DIR");
20821   for Library_Version use External ("SONAME");
20822   for Library_Kind use Kind;
20823   for Library_Dir use External("BUILD_DIR");
20824   Source_Dir := External ("SOURCE_DIR");
20825   for Source_Dirs use (Source_Dir);
20826 end Library;
20827 CF_EOF
20828                 cat >>confpackage.ads <<CF_EOF
20829 package ConfPackage is
20830    procedure conftest;
20831 end ConfPackage;
20832 CF_EOF
20833                 cat >>confpackage.adb <<CF_EOF
20834 with Text_IO;
20835 package body ConfPackage is
20836    procedure conftest is
20837    begin
20838       Text_IO.Put ("Hello World");
20839       Text_IO.New_Line;
20840    end conftest;
20841 end ConfPackage;
20842 CF_EOF
20843                 if ( $cf_ada_make $ADAFLAGS \
20844                                 -Plibrary.gpr \
20845                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
20846                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
20847                                 -XSOURCE_DIR=`pwd` \
20848                                 -XSONAME=libConfTest.so.1 \
20849                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
20850                         cf_gnat_projects=yes
20851                 fi
20852                 cd ..
20853                 if test -f conftest.lib/confpackage.ali
20854                 then
20855                         cf_gnat_libraries=yes
20856                 fi
20857                 rm -rf conftest* *~conftest*
20858                 ;;
20859         esac
20860         ;;
20861 esac
20862 echo "$as_me:20862: result: $cf_gnat_projects" >&5
20863 echo "${ECHO_T}$cf_gnat_projects" >&6
20864 fi # enable_gnat_projects
20865
20866 if test $cf_gnat_projects = yes
20867 then
20868         echo "$as_me:20868: checking if GNAT supports libraries" >&5
20869 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
20870         echo "$as_me:20870: result: $cf_gnat_libraries" >&5
20871 echo "${ECHO_T}$cf_gnat_libraries" >&6
20872 fi
20873
20874 if test "$cf_gnat_projects" = yes
20875 then
20876         USE_OLD_MAKERULES="#"
20877         USE_GNAT_PROJECTS=""
20878 else
20879         USE_OLD_MAKERULES=""
20880         USE_GNAT_PROJECTS="#"
20881 fi
20882
20883 if test "$cf_gnat_libraries" = yes
20884 then
20885         USE_GNAT_LIBRARIES=""
20886 else
20887         USE_GNAT_LIBRARIES="#"
20888 fi
20889
20890 echo "$as_me:20890: checking for ada-compiler" >&5
20891 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
20892
20893 # Check whether --with-ada-compiler or --without-ada-compiler was given.
20894 if test "${with_ada_compiler+set}" = set; then
20895   withval="$with_ada_compiler"
20896   cf_ada_compiler=$withval
20897 else
20898   cf_ada_compiler=gnatmake
20899 fi;
20900
20901 echo "$as_me:20901: result: $cf_ada_compiler" >&5
20902 echo "${ECHO_T}$cf_ada_compiler" >&6
20903
20904                         cf_ada_package=terminal_interface
20905
20906 echo "$as_me:20906: checking for ada-include" >&5
20907 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
20908
20909 # Check whether --with-ada-include or --without-ada-include was given.
20910 if test "${with_ada_include+set}" = set; then
20911   withval="$with_ada_include"
20912
20913 else
20914   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20915 fi; if test -n "$prefix/share/ada/adainclude" ; then
20916
20917 if test "x$prefix" != xNONE; then
20918         cf_path_syntax="$prefix"
20919 else
20920         cf_path_syntax="$ac_default_prefix"
20921 fi
20922
20923 case ".$withval" in
20924 (.\$\(*\)*|.\'*\'*)
20925         ;;
20926 (..|./*|.\\*)
20927         ;;
20928 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
20929         ;;
20930 (.\${*prefix}*|.\${*dir}*)
20931         eval withval="$withval"
20932         case ".$withval" in
20933         (.NONE/*)
20934                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20935                 ;;
20936         esac
20937         ;;
20938 (.no|.NONE/*)
20939         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20940         ;;
20941 (*)
20942         { { echo "$as_me:20942: error: expected a pathname, not \"$withval\"" >&5
20943 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20944    { (exit 1); exit 1; }; }
20945         ;;
20946 esac
20947
20948 fi
20949 eval ADA_INCLUDE="$withval"
20950
20951 echo "$as_me:20951: result: $ADA_INCLUDE" >&5
20952 echo "${ECHO_T}$ADA_INCLUDE" >&6
20953
20954 echo "$as_me:20954: checking for ada-objects" >&5
20955 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
20956
20957 # Check whether --with-ada-objects or --without-ada-objects was given.
20958 if test "${with_ada_objects+set}" = set; then
20959   withval="$with_ada_objects"
20960
20961 else
20962   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
20963 fi; if test -n "$prefix/lib/ada/adalib" ; then
20964
20965 if test "x$prefix" != xNONE; then
20966         cf_path_syntax="$prefix"
20967 else
20968         cf_path_syntax="$ac_default_prefix"
20969 fi
20970
20971 case ".$withval" in
20972 (.\$\(*\)*|.\'*\'*)
20973         ;;
20974 (..|./*|.\\*)
20975         ;;
20976 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
20977         ;;
20978 (.\${*prefix}*|.\${*dir}*)
20979         eval withval="$withval"
20980         case ".$withval" in
20981         (.NONE/*)
20982                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20983                 ;;
20984         esac
20985         ;;
20986 (.no|.NONE/*)
20987         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20988         ;;
20989 (*)
20990         { { echo "$as_me:20990: error: expected a pathname, not \"$withval\"" >&5
20991 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20992    { (exit 1); exit 1; }; }
20993         ;;
20994 esac
20995
20996 fi
20997 eval ADA_OBJECTS="$withval"
20998
20999 echo "$as_me:20999: result: $ADA_OBJECTS" >&5
21000 echo "${ECHO_T}$ADA_OBJECTS" >&6
21001
21002 echo "$as_me:21002: checking if an Ada95 shared-library should be built" >&5
21003 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
21004
21005 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
21006 if test "${with_ada_sharedlib+set}" = set; then
21007   withval="$with_ada_sharedlib"
21008   with_ada_sharedlib=$withval
21009 else
21010   with_ada_sharedlib=no
21011 fi;
21012 echo "$as_me:21012: result: $with_ada_sharedlib" >&5
21013 echo "${ECHO_T}$with_ada_sharedlib" >&6
21014
21015 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
21016 MAKE_ADA_SHAREDLIB="#"
21017
21018 if test "x$with_ada_sharedlib" != xno
21019 then
21020         MAKE_ADA_SHAREDLIB=
21021         if test "x$with_ada_sharedlib" != xyes
21022         then
21023                 ADA_SHAREDLIB="$with_ada_sharedlib"
21024         fi
21025 fi
21026
21027                 fi
21028         fi
21029 else
21030         cf_with_ada=no
21031 fi
21032
21033 # do this "late" to avoid conflict with header-checks
21034 if test "x$with_widec" = xyes ; then
21035         echo "$as_me:21035: checking for wchar_t" >&5
21036 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
21037 if test "${ac_cv_type_wchar_t+set}" = set; then
21038   echo $ECHO_N "(cached) $ECHO_C" >&6
21039 else
21040   cat >conftest.$ac_ext <<_ACEOF
21041 #line 21041 "configure"
21042 #include "confdefs.h"
21043 $ac_includes_default
21044 int
21045 main ()
21046 {
21047 if ((wchar_t *) 0)
21048   return 0;
21049 if (sizeof (wchar_t))
21050   return 0;
21051   ;
21052   return 0;
21053 }
21054 _ACEOF
21055 rm -f conftest.$ac_objext
21056 if { (eval echo "$as_me:21056: \"$ac_compile\"") >&5
21057   (eval $ac_compile) 2>&5
21058   ac_status=$?
21059   echo "$as_me:21059: \$? = $ac_status" >&5
21060   (exit $ac_status); } &&
21061          { ac_try='test -s conftest.$ac_objext'
21062   { (eval echo "$as_me:21062: \"$ac_try\"") >&5
21063   (eval $ac_try) 2>&5
21064   ac_status=$?
21065   echo "$as_me:21065: \$? = $ac_status" >&5
21066   (exit $ac_status); }; }; then
21067   ac_cv_type_wchar_t=yes
21068 else
21069   echo "$as_me: failed program was:" >&5
21070 cat conftest.$ac_ext >&5
21071 ac_cv_type_wchar_t=no
21072 fi
21073 rm -f conftest.$ac_objext conftest.$ac_ext
21074 fi
21075 echo "$as_me:21075: result: $ac_cv_type_wchar_t" >&5
21076 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
21077
21078 echo "$as_me:21078: checking size of wchar_t" >&5
21079 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21080 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21081   echo $ECHO_N "(cached) $ECHO_C" >&6
21082 else
21083   if test "$ac_cv_type_wchar_t" = yes; then
21084   if test "$cross_compiling" = yes; then
21085   # Depending upon the size, compute the lo and hi bounds.
21086 cat >conftest.$ac_ext <<_ACEOF
21087 #line 21087 "configure"
21088 #include "confdefs.h"
21089 $ac_includes_default
21090 int
21091 main ()
21092 {
21093 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21094   ;
21095   return 0;
21096 }
21097 _ACEOF
21098 rm -f conftest.$ac_objext
21099 if { (eval echo "$as_me:21099: \"$ac_compile\"") >&5
21100   (eval $ac_compile) 2>&5
21101   ac_status=$?
21102   echo "$as_me:21102: \$? = $ac_status" >&5
21103   (exit $ac_status); } &&
21104          { ac_try='test -s conftest.$ac_objext'
21105   { (eval echo "$as_me:21105: \"$ac_try\"") >&5
21106   (eval $ac_try) 2>&5
21107   ac_status=$?
21108   echo "$as_me:21108: \$? = $ac_status" >&5
21109   (exit $ac_status); }; }; then
21110   ac_lo=0 ac_mid=0
21111   while :; do
21112     cat >conftest.$ac_ext <<_ACEOF
21113 #line 21113 "configure"
21114 #include "confdefs.h"
21115 $ac_includes_default
21116 int
21117 main ()
21118 {
21119 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21120   ;
21121   return 0;
21122 }
21123 _ACEOF
21124 rm -f conftest.$ac_objext
21125 if { (eval echo "$as_me:21125: \"$ac_compile\"") >&5
21126   (eval $ac_compile) 2>&5
21127   ac_status=$?
21128   echo "$as_me:21128: \$? = $ac_status" >&5
21129   (exit $ac_status); } &&
21130          { ac_try='test -s conftest.$ac_objext'
21131   { (eval echo "$as_me:21131: \"$ac_try\"") >&5
21132   (eval $ac_try) 2>&5
21133   ac_status=$?
21134   echo "$as_me:21134: \$? = $ac_status" >&5
21135   (exit $ac_status); }; }; then
21136   ac_hi=$ac_mid; break
21137 else
21138   echo "$as_me: failed program was:" >&5
21139 cat conftest.$ac_ext >&5
21140 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21141 fi
21142 rm -f conftest.$ac_objext conftest.$ac_ext
21143   done
21144 else
21145   echo "$as_me: failed program was:" >&5
21146 cat conftest.$ac_ext >&5
21147 ac_hi=-1 ac_mid=-1
21148   while :; do
21149     cat >conftest.$ac_ext <<_ACEOF
21150 #line 21150 "configure"
21151 #include "confdefs.h"
21152 $ac_includes_default
21153 int
21154 main ()
21155 {
21156 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21157   ;
21158   return 0;
21159 }
21160 _ACEOF
21161 rm -f conftest.$ac_objext
21162 if { (eval echo "$as_me:21162: \"$ac_compile\"") >&5
21163   (eval $ac_compile) 2>&5
21164   ac_status=$?
21165   echo "$as_me:21165: \$? = $ac_status" >&5
21166   (exit $ac_status); } &&
21167          { ac_try='test -s conftest.$ac_objext'
21168   { (eval echo "$as_me:21168: \"$ac_try\"") >&5
21169   (eval $ac_try) 2>&5
21170   ac_status=$?
21171   echo "$as_me:21171: \$? = $ac_status" >&5
21172   (exit $ac_status); }; }; then
21173   ac_lo=$ac_mid; break
21174 else
21175   echo "$as_me: failed program was:" >&5
21176 cat conftest.$ac_ext >&5
21177 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21178 fi
21179 rm -f conftest.$ac_objext conftest.$ac_ext
21180   done
21181 fi
21182 rm -f conftest.$ac_objext conftest.$ac_ext
21183 # Binary search between lo and hi bounds.
21184 while test "x$ac_lo" != "x$ac_hi"; do
21185   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21186   cat >conftest.$ac_ext <<_ACEOF
21187 #line 21187 "configure"
21188 #include "confdefs.h"
21189 $ac_includes_default
21190 int
21191 main ()
21192 {
21193 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21194   ;
21195   return 0;
21196 }
21197 _ACEOF
21198 rm -f conftest.$ac_objext
21199 if { (eval echo "$as_me:21199: \"$ac_compile\"") >&5
21200   (eval $ac_compile) 2>&5
21201   ac_status=$?
21202   echo "$as_me:21202: \$? = $ac_status" >&5
21203   (exit $ac_status); } &&
21204          { ac_try='test -s conftest.$ac_objext'
21205   { (eval echo "$as_me:21205: \"$ac_try\"") >&5
21206   (eval $ac_try) 2>&5
21207   ac_status=$?
21208   echo "$as_me:21208: \$? = $ac_status" >&5
21209   (exit $ac_status); }; }; then
21210   ac_hi=$ac_mid
21211 else
21212   echo "$as_me: failed program was:" >&5
21213 cat conftest.$ac_ext >&5
21214 ac_lo=`expr $ac_mid + 1`
21215 fi
21216 rm -f conftest.$ac_objext conftest.$ac_ext
21217 done
21218 ac_cv_sizeof_wchar_t=$ac_lo
21219 else
21220   if test "$cross_compiling" = yes; then
21221   { { echo "$as_me:21221: error: cannot run test program while cross compiling" >&5
21222 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21223    { (exit 1); exit 1; }; }
21224 else
21225   cat >conftest.$ac_ext <<_ACEOF
21226 #line 21226 "configure"
21227 #include "confdefs.h"
21228 $ac_includes_default
21229 int
21230 main ()
21231 {
21232 FILE *f = fopen ("conftest.val", "w");
21233 if (!f)
21234   $ac_main_return (1);
21235 fprintf (f, "%d", (sizeof (wchar_t)));
21236 fclose (f);
21237   ;
21238   return 0;
21239 }
21240 _ACEOF
21241 rm -f conftest$ac_exeext
21242 if { (eval echo "$as_me:21242: \"$ac_link\"") >&5
21243   (eval $ac_link) 2>&5
21244   ac_status=$?
21245   echo "$as_me:21245: \$? = $ac_status" >&5
21246   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21247   { (eval echo "$as_me:21247: \"$ac_try\"") >&5
21248   (eval $ac_try) 2>&5
21249   ac_status=$?
21250   echo "$as_me:21250: \$? = $ac_status" >&5
21251   (exit $ac_status); }; }; then
21252   ac_cv_sizeof_wchar_t=`cat conftest.val`
21253 else
21254   echo "$as_me: program exited with status $ac_status" >&5
21255 echo "$as_me: failed program was:" >&5
21256 cat conftest.$ac_ext >&5
21257 fi
21258 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21259 fi
21260 fi
21261 rm -f conftest.val
21262 else
21263   ac_cv_sizeof_wchar_t=0
21264 fi
21265 fi
21266 echo "$as_me:21266: result: $ac_cv_sizeof_wchar_t" >&5
21267 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21268 cat >>confdefs.h <<EOF
21269 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21270 EOF
21271
21272 fi
21273
21274 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21275 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21276 ###
21277 ### ticlib modules may be a separate library, otherwise contained in termlib.
21278 ### termlib modules may be a separate library, otherwise contained in ncurses.
21279 ###
21280 ### The of "+" or " " between the tokens controls the way the script
21281 ### chooses to split module lists into libraries.
21282 ###
21283 ### (see CF_LIB_RULES).
21284 echo "$as_me:21284: checking for library subsets" >&5
21285 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21286 LIB_SUBSETS=
21287
21288 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21289         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21290         if test "$with_ticlib" != no ; then
21291                 LIB_SUBSETS="${LIB_SUBSETS} "
21292         else
21293                 LIB_SUBSETS="${LIB_SUBSETS}+"
21294         fi
21295 fi
21296
21297 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21298 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21299
21300 if test "$with_termlib" != no ; then
21301         LIB_SUBSETS="${LIB_SUBSETS} "
21302 else
21303         LIB_SUBSETS="${LIB_SUBSETS}+"
21304 fi
21305
21306 LIB_SUBSETS="${LIB_SUBSETS}base"
21307
21308 # Most term-driver calls are to tinfo, but some like init_pair are to the
21309 # base library (so it resides in base).
21310 if test "$with_term_driver" != no ; then
21311         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21312         case $cf_cv_system_name in
21313         (*mingw32*|*mingw64*)
21314                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21315                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21316                 ;;
21317         (*)
21318                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21319                 ;;
21320         esac
21321 fi
21322
21323 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21324 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21325
21326 echo "$as_me:21326: result: $LIB_SUBSETS" >&5
21327 echo "${ECHO_T}$LIB_SUBSETS" >&6
21328
21329 ### Construct the list of include-directories to be generated
21330
21331 if test "$srcdir" != "."; then
21332         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21333 fi
21334 CPPFLAGS="-I../include $CPPFLAGS"
21335 if test "$srcdir" != "."; then
21336         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21337 fi
21338 CPPFLAGS="-I. $CPPFLAGS"
21339
21340 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21341 if test "$srcdir" != "."; then
21342         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21343 fi
21344 if test "$GCC" != yes; then
21345         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21346 elif test "$includedir" != "/usr/include"; then
21347         if test "$includedir" = '${prefix}/include' ; then
21348                 if test x$prefix != x/usr ; then
21349                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21350                 fi
21351         else
21352                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21353         fi
21354 fi
21355
21356 ### Build up pieces for makefile rules
21357 echo "$as_me:21357: checking default library suffix" >&5
21358 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21359
21360         case $DFT_LWR_MODEL in
21361         (libtool) DFT_ARG_SUFFIX=''   ;;
21362         (normal)  DFT_ARG_SUFFIX=''   ;;
21363         (debug)   DFT_ARG_SUFFIX='_g' ;;
21364         (profile) DFT_ARG_SUFFIX='_p' ;;
21365         (shared)  DFT_ARG_SUFFIX=''   ;;
21366         esac
21367         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21368 echo "$as_me:21368: result: $DFT_ARG_SUFFIX" >&5
21369 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21370
21371 echo "$as_me:21371: checking default library-dependency suffix" >&5
21372 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21373
21374         case X$DFT_LWR_MODEL in
21375         (Xlibtool)
21376                 DFT_LIB_SUFFIX='.la'
21377                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21378                 ;;
21379         (Xdebug)
21380                 DFT_LIB_SUFFIX='_g.a'
21381                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21382                 ;;
21383         (Xprofile)
21384                 DFT_LIB_SUFFIX='_p.a'
21385                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21386                 ;;
21387         (Xshared)
21388                 case $cf_cv_system_name in
21389                 (aix[5-7]*)
21390                         DFT_LIB_SUFFIX='.so'
21391                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21392                         ;;
21393                 (cygwin*|msys*|mingw*)
21394                         DFT_LIB_SUFFIX='.dll'
21395                         DFT_DEP_SUFFIX='.dll.a'
21396                         ;;
21397                 (darwin*)
21398                         DFT_LIB_SUFFIX='.dylib'
21399                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21400                         ;;
21401                 (hpux*)
21402                         case $target in
21403                         (ia64*)
21404                                 DFT_LIB_SUFFIX='.so'
21405                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21406                                 ;;
21407                         (*)
21408                                 DFT_LIB_SUFFIX='.sl'
21409                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21410                                 ;;
21411                         esac
21412                         ;;
21413                 (*)
21414                         DFT_LIB_SUFFIX='.so'
21415                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21416                         ;;
21417                 esac
21418                 ;;
21419         (*)
21420                 DFT_LIB_SUFFIX='.a'
21421                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21422                 ;;
21423         esac
21424         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21425         then
21426                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
21427                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
21428         fi
21429 echo "$as_me:21429: result: $DFT_DEP_SUFFIX" >&5
21430 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21431
21432 echo "$as_me:21432: checking default object directory" >&5
21433 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21434
21435         case $DFT_LWR_MODEL in
21436         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21437         (normal)  DFT_OBJ_SUBDIR='objects' ;;
21438         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21439         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
21440         (shared)
21441                 case $cf_cv_system_name in
21442                 (cygwin|msys)
21443                         DFT_OBJ_SUBDIR='objects' ;;
21444                 (*)
21445                         DFT_OBJ_SUBDIR='obj_s' ;;
21446                 esac
21447         esac
21448 echo "$as_me:21448: result: $DFT_OBJ_SUBDIR" >&5
21449 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21450
21451 if test "x$cf_with_cxx" = xyes ; then
21452 echo "$as_me:21452: checking c++ library-dependency suffix" >&5
21453 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21454 if test "$with_libtool" != "no"; then
21455         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21456         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21457 elif test "$with_shared_cxx" != "no"; then
21458         # also for g++ users...
21459         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21460 else
21461         # we normally make a static library because C/C++ library rules differ
21462
21463         case Xnormal in
21464         (Xlibtool)
21465                 CXX_LIB_SUFFIX='.la'
21466                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21467                 ;;
21468         (Xdebug)
21469                 CXX_LIB_SUFFIX='_g.a'
21470                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21471                 ;;
21472         (Xprofile)
21473                 CXX_LIB_SUFFIX='_p.a'
21474                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21475                 ;;
21476         (Xshared)
21477                 case $cf_cv_system_name in
21478                 (aix[5-7]*)
21479                         CXX_LIB_SUFFIX='.so'
21480                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21481                         ;;
21482                 (cygwin*|msys*|mingw*)
21483                         CXX_LIB_SUFFIX='.dll'
21484                         CXX_DEP_SUFFIX='.dll.a'
21485                         ;;
21486                 (darwin*)
21487                         CXX_LIB_SUFFIX='.dylib'
21488                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21489                         ;;
21490                 (hpux*)
21491                         case $target in
21492                         (ia64*)
21493                                 CXX_LIB_SUFFIX='.so'
21494                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21495                                 ;;
21496                         (*)
21497                                 CXX_LIB_SUFFIX='.sl'
21498                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21499                                 ;;
21500                         esac
21501                         ;;
21502                 (*)
21503                         CXX_LIB_SUFFIX='.so'
21504                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21505                         ;;
21506                 esac
21507                 ;;
21508         (*)
21509                 CXX_LIB_SUFFIX='.a'
21510                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21511                 ;;
21512         esac
21513         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21514         then
21515                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
21516                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
21517         fi
21518
21519 fi
21520 echo "$as_me:21520: result: $CXX_LIB_SUFFIX" >&5
21521 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21522
21523 fi
21524
21525 # do not want -ldl in build except as needed for -lncurses dependency
21526 if test "x$with_dlsym" = xyes ; then
21527 if test $DFT_LWR_MODEL = shared || \
21528    test $DFT_LWR_MODEL = libtool ; then
21529
21530 # remove dl library from $LIBS
21531 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21532
21533 fi
21534 fi
21535 ### Set up low-level terminfo dependencies for makefiles.
21536
21537 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21538 # do not need libdl
21539 TICS_LIST=
21540 if test "x$with_dlsym" = xyes ; then
21541
21542 # remove dl library from $SHLIB_LIST
21543 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21544
21545 fi
21546
21547 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
21548 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
21549 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
21550 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
21551 then
21552         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
21553 fi
21554
21555 if test "$with_ticlib" != no ; then
21556
21557         if test "x$with_ticlib" != xyes ; then
21558                 TICS_NAME=$with_ticlib
21559                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21560                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21561                 TICS_LIB_SUFFIX="${with_ticlib}"
21562         else
21563                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
21564                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21565                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
21566         fi
21567         TICS_LDFLAGS="-L${LIB_DIR}"
21568         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21569 else
21570         TICS_LDFLAGS="-L${LIB_DIR}"
21571         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21572 fi
21573
21574 if test "$with_termlib" != no ; then
21575
21576         if test "x$with_termlib" != xyes ; then
21577                 TINFO_NAME=$with_termlib
21578                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
21579                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21580                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21581                 TINFO_LIB_SUFFIX="${with_termlib}"
21582         else
21583                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21584                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
21585                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21586                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
21587         fi
21588
21589         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21590         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21591         if test "$DFT_LWR_MODEL" = "libtool"; then
21592                 TEST_ARGS="${TEST_DEPS}"
21593                 TEST_ARG2="${TEST_DEP2}"
21594                 TINFO_LDFLAGS="-L${LIB_DIR}"
21595                 TINFO_LIBS="$TEST_ARGS"
21596                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21597                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21598         else
21599                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21600                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21601                 if test "x$with_term_driver" != xno ; then
21602                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21603                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
21604                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21605                 else
21606                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21607                         TINFO_LIBS="$TEST_ARGS"
21608                 fi
21609                 TINFO_LDFLAGS="-L${LIB_DIR}"
21610                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21611         fi
21612 else
21613         # the next lines are needed for linking libtic over libncurses
21614         TINFO_NAME=${LIB_NAME}
21615         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21616         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
21617         if test "x$with_tic_depends" = xyes ; then
21618                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21619         else
21620                 TICS_LIST="$SHLIB_LIST"
21621         fi
21622
21623         TINFO_LDFLAGS="-L${LIB_DIR}"
21624         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21625 fi
21626
21627 if test "$DFT_LWR_MODEL" = shared ; then
21628         case $cf_cv_system_name in
21629         (cygwin*|msys*)
21630                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21631                 TINFO_SUFFIX=.dll
21632                 ;;
21633         esac
21634 fi
21635
21636 if test "x$with_dlsym" = xyes ; then
21637
21638 # remove dl library from $TICS_LIST
21639 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21640
21641 fi
21642
21643 if test "$DFT_LWR_MODEL" = "libtool"; then
21644         OBJEXT=lo
21645 fi
21646
21647 # needed for Ada95
21648 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21649
21650 case $DFT_LWR_MODEL in
21651 (normal|debug|profile)
21652
21653 if test "$GCC" = yes ; then
21654         case $cf_cv_system_name in
21655         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
21656                 LDFLAGS_STATIC=
21657                 LDFLAGS_SHARED=
21658                 ;;
21659         (*)     # normally, except when broken
21660                 LDFLAGS_STATIC=-static
21661                 LDFLAGS_SHARED=-dynamic
21662                 ;;
21663         esac
21664 else
21665         case $cf_cv_system_name in
21666         (aix[4-7]*)     # from ld manpage
21667                 LDFLAGS_STATIC=-bstatic
21668                 LDFLAGS_SHARED=-bdynamic
21669                 ;;
21670         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
21671                 # We could also use just "archive" and "shared".
21672                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21673                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21674                 ;;
21675         (irix*)         # from ld manpage IRIX64
21676                 LDFLAGS_STATIC=-Bstatic
21677                 LDFLAGS_SHARED=-Bdynamic
21678                 ;;
21679         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
21680                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21681                 LDFLAGS_STATIC=-noso
21682                 LDFLAGS_SHARED=-so_archive
21683                 ;;
21684         (solaris2*)
21685                 LDFLAGS_STATIC=-Bstatic
21686                 LDFLAGS_SHARED=-Bdynamic
21687                 ;;
21688         esac
21689 fi
21690
21691 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21692 then
21693         echo "$as_me:21693: checking if linker supports switching between static/dynamic" >&5
21694 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21695
21696         rm -f libconftest.a
21697         cat >conftest.$ac_ext <<EOF
21698 #line 21698 "configure"
21699 #include <stdio.h>
21700 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21701 EOF
21702         if { (eval echo "$as_me:21702: \"$ac_compile\"") >&5
21703   (eval $ac_compile) 2>&5
21704   ac_status=$?
21705   echo "$as_me:21705: \$? = $ac_status" >&5
21706   (exit $ac_status); } ; then
21707                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21708                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21709         fi
21710         rm -f conftest.*
21711
21712         cf_save_LIBS="$LIBS"
21713
21714         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21715         cat >conftest.$ac_ext <<_ACEOF
21716 #line 21716 "configure"
21717 #include "confdefs.h"
21718
21719 #line 21719 "configure"
21720 #include <stdio.h>
21721 int cf_ldflags_static(FILE *fp);
21722
21723 int
21724 main ()
21725 {
21726
21727         return cf_ldflags_static(stdin);
21728
21729   ;
21730   return 0;
21731 }
21732 _ACEOF
21733 rm -f conftest.$ac_objext conftest$ac_exeext
21734 if { (eval echo "$as_me:21734: \"$ac_link\"") >&5
21735   (eval $ac_link) 2>&5
21736   ac_status=$?
21737   echo "$as_me:21737: \$? = $ac_status" >&5
21738   (exit $ac_status); } &&
21739          { ac_try='test -s conftest$ac_exeext'
21740   { (eval echo "$as_me:21740: \"$ac_try\"") >&5
21741   (eval $ac_try) 2>&5
21742   ac_status=$?
21743   echo "$as_me:21743: \$? = $ac_status" >&5
21744   (exit $ac_status); }; }; then
21745
21746         # some linkers simply ignore the -dynamic
21747         case x`file conftest$ac_exeext 2>/dev/null` in
21748         (*static*)
21749                 cf_ldflags_static=no
21750                 ;;
21751         (*)
21752                 cf_ldflags_static=yes
21753                 ;;
21754         esac
21755
21756 else
21757   echo "$as_me: failed program was:" >&5
21758 cat conftest.$ac_ext >&5
21759 cf_ldflags_static=no
21760 fi
21761 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21762
21763         rm -f libconftest.*
21764         LIBS="$cf_save_LIBS"
21765
21766         echo "$as_me:21766: result: $cf_ldflags_static" >&5
21767 echo "${ECHO_T}$cf_ldflags_static" >&6
21768
21769         if test $cf_ldflags_static != yes
21770         then
21771                 LDFLAGS_STATIC=
21772                 LDFLAGS_SHARED=
21773         fi
21774 else
21775         LDFLAGS_STATIC=
21776         LDFLAGS_SHARED=
21777 fi
21778
21779         ;;
21780 esac
21781
21782 echo "$as_me:21782: checking where we will install curses.h" >&5
21783 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21784
21785 includesubdir=
21786 if test "$with_overwrite" = no && \
21787  ( test "x$includedir" = 'x${prefix}/include' || \
21788    test "x$includedir" = "x${prefix}/include" )
21789 then
21790         includesubdir="/ncurses${USE_LIB_SUFFIX}"
21791 fi
21792 echo "$as_me:21792: result: ${includedir}${includesubdir}" >&5
21793 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21794
21795 ### Resolve a conflict between normal and wide-curses by forcing applications
21796 ### that will need libutf8 to add it to their configure script.
21797 if test "$with_overwrite" != no ; then
21798 if test "$NCURSES_LIBUTF8" = 1 ; then
21799         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21800         { echo "$as_me:21800: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21801 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21802 fi
21803 fi
21804 WITH_OVERWRITE=$with_overwrite
21805
21806 # used to separate tack out of the tree
21807 NCURSES_TREE=
21808
21809 ### predefined stuff for the test programs
21810
21811 cat >>confdefs.h <<\EOF
21812 #define HAVE_SLK_COLOR 1
21813 EOF
21814
21815 ### Construct the list of subdirectories for which we'll customize makefiles
21816 ### with the appropriate compile-rules.
21817
21818 echo "$as_me:21818: checking for src modules" >&5
21819 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21820
21821 # dependencies and linker-arguments for test-programs
21822 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21823 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21824 if test "$DFT_LWR_MODEL" = "libtool"; then
21825         TEST_ARGS="${TEST_DEPS}"
21826         TEST_ARG2="${TEST_DEP2}"
21827 else
21828         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21829         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
21830 fi
21831
21832 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
21833 cf_cv_src_modules=
21834 for cf_dir in $modules_to_build
21835 do
21836         if test -f $srcdir/$cf_dir/modules; then
21837
21838                 # We may/may not have tack in the distribution, though the
21839                 # makefile is.
21840                 if test $cf_dir = tack ; then
21841                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
21842                                 continue
21843                         fi
21844                 fi
21845
21846                 if test -z "$cf_cv_src_modules"; then
21847                         cf_cv_src_modules=$cf_dir
21848                 else
21849                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
21850                 fi
21851
21852                 # Make the ncurses_cfg.h file record the library interface files as
21853                 # well.  These are header files that are the same name as their
21854                 # directory.  Ncurses is the only library that does not follow
21855                 # that pattern.
21856                 if test $cf_dir = tack ; then
21857                         continue
21858                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
21859
21860 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21861
21862                         cat >>confdefs.h <<EOF
21863 #define HAVE_${cf_have_include}_H 1
21864 EOF
21865
21866                         cat >>confdefs.h <<EOF
21867 #define HAVE_LIB${cf_have_include} 1
21868 EOF
21869
21870                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
21871                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
21872                         if test "$DFT_LWR_MODEL" = "libtool"; then
21873                                 TEST_ARGS="${TEST_DEPS}"
21874                                 TEST_ARG2="${TEST_DEP2}"
21875                         else
21876                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
21877                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
21878                         fi
21879                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
21880                 fi
21881         fi
21882 done
21883 echo "$as_me:21883: result: $cf_cv_src_modules" >&5
21884 echo "${ECHO_T}$cf_cv_src_modules" >&6
21885
21886 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21887 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21888
21889 SRC_SUBDIRS=
21890 if test "x$cf_with_manpages" != xno ; then
21891         SRC_SUBDIRS="$SRC_SUBDIRS man"
21892 fi
21893 SRC_SUBDIRS="$SRC_SUBDIRS include"
21894 for cf_dir in $cf_cv_src_modules
21895 do
21896         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21897 done
21898 if test "x$cf_with_tests" != "xno" ; then
21899         SRC_SUBDIRS="$SRC_SUBDIRS test"
21900 fi
21901 # always make this, to install the ncurses-config script
21902 SRC_SUBDIRS="$SRC_SUBDIRS misc"
21903 if test "$cf_with_cxx_binding" != no; then
21904         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
21905         SRC_SUBDIRS="$SRC_SUBDIRS c++"
21906 fi
21907
21908 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21909 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
21910
21911 ADA_SUBDIRS=
21912 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
21913         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
21914         ADA_SUBDIRS="gen src"
21915         if test "x$cf_with_tests" != "xno" ; then
21916                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
21917         fi
21918 fi
21919
21920 SUB_MAKEFILES=
21921 for cf_dir in $SRC_SUBDIRS
21922 do
21923         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
21924 done
21925
21926 if test -n "$ADA_SUBDIRS"; then
21927         for cf_dir in $ADA_SUBDIRS
21928         do
21929                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
21930         done
21931
21932 fi
21933
21934 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21935    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
21936    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
21937 fi
21938
21939 DIRS_TO_MAKE="lib"
21940 for cf_item in $cf_list_models
21941 do
21942
21943         case $cf_item in
21944         (libtool) cf_subdir='obj_lo'  ;;
21945         (normal)  cf_subdir='objects' ;;
21946         (debug)   cf_subdir='obj_g' ;;
21947         (profile) cf_subdir='obj_p' ;;
21948         (shared)
21949                 case $cf_cv_system_name in
21950                 (cygwin|msys)
21951                         cf_subdir='objects' ;;
21952                 (*)
21953                         cf_subdir='obj_s' ;;
21954                 esac
21955         esac
21956
21957         for cf_item2 in $DIRS_TO_MAKE
21958         do
21959                 test $cf_item2 = $cf_subdir && break
21960         done
21961         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21962 done
21963 for cf_dir in $DIRS_TO_MAKE
21964 do
21965         test ! -d $cf_dir && mkdir $cf_dir
21966 done
21967
21968 # symbols that differ when compiling Ada95 by itself.
21969 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
21970
21971 # values to use as strings
21972
21973 cat >>confdefs.h <<EOF
21974 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
21975 EOF
21976
21977 cat >>confdefs.h <<EOF
21978 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
21979 EOF
21980
21981 ### Now that we're done running tests, add the compiler-warnings, if any
21982
21983 cf_fix_cppflags=no
21984 cf_new_cflags=
21985 cf_new_cppflags=
21986 cf_new_extra_cppflags=
21987
21988 for cf_add_cflags in $EXTRA_CFLAGS
21989 do
21990 case $cf_fix_cppflags in
21991 (no)
21992         case $cf_add_cflags in
21993         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21994                 case $cf_add_cflags in
21995                 (-D*)
21996                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21997
21998                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21999                                 && test -z "${cf_tst_cflags}" \
22000                                 && cf_fix_cppflags=yes
22001
22002                         if test $cf_fix_cppflags = yes ; then
22003                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22004                                 continue
22005                         elif test "${cf_tst_cflags}" = "\"'" ; then
22006                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22007                                 continue
22008                         fi
22009                         ;;
22010                 esac
22011                 case "$CPPFLAGS" in
22012                 (*$cf_add_cflags)
22013                         ;;
22014                 (*)
22015                         case $cf_add_cflags in
22016                         (-D*)
22017                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22018
22019 CPPFLAGS=`echo "$CPPFLAGS" | \
22020         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
22021                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
22022
22023                                 ;;
22024                         esac
22025                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
22026                         ;;
22027                 esac
22028                 ;;
22029         (*)
22030                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
22031                 ;;
22032         esac
22033         ;;
22034 (yes)
22035         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22036
22037         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22038
22039         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22040                 && test -z "${cf_tst_cflags}" \
22041                 && cf_fix_cppflags=no
22042         ;;
22043 esac
22044 done
22045
22046 if test -n "$cf_new_cflags" ; then
22047
22048         CFLAGS="$CFLAGS $cf_new_cflags"
22049 fi
22050
22051 if test -n "$cf_new_cppflags" ; then
22052
22053         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
22054 fi
22055
22056 if test -n "$cf_new_extra_cppflags" ; then
22057
22058         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
22059 fi
22060
22061 ### Define substitutions for header files to avoid name-pollution
22062
22063 if test "x$cf_cv_have_tcgetattr" = xyes ; then
22064         HAVE_TCGETATTR=1
22065 else
22066         HAVE_TCGETATTR=0
22067 fi
22068
22069 if test "x$ac_cv_header_stdint_h" = xyes ; then
22070         HAVE_STDINT_H=1
22071 else
22072         HAVE_STDINT_H=0
22073 fi
22074
22075 if test "x$ac_cv_header_termio_h" = xyes ; then
22076         HAVE_TERMIO_H=1
22077 else
22078         HAVE_TERMIO_H=0
22079 fi
22080
22081 if test "x$ac_cv_header_termios_h" = xyes ; then
22082         HAVE_TERMIOS_H=1
22083 else
22084         HAVE_TERMIOS_H=0
22085 fi
22086
22087 ################################################################################
22088 test "x$use_database" = xyes && \
22089 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
22090
22091 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
22092 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
22093
22094 if test "x$enable_pc_files" = xyes ; then \
22095 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22096 MAKE_PC_FILES=
22097 else
22098 MAKE_PC_FILES="#"
22099 fi
22100
22101 # Extract the first word of "tic", so it can be a program name with args.
22102 set dummy tic; ac_word=$2
22103 echo "$as_me:22103: checking for $ac_word" >&5
22104 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22105 if test "${ac_cv_path_TIC_PATH+set}" = set; then
22106   echo $ECHO_N "(cached) $ECHO_C" >&6
22107 else
22108   case $TIC_PATH in
22109   [\\/]* | ?:[\\/]*)
22110   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22111   ;;
22112   *)
22113   ac_save_IFS=$IFS; IFS=$ac_path_separator
22114 ac_dummy="$PATH:/usr/local/ncurses/bin"
22115 for ac_dir in $ac_dummy; do
22116   IFS=$ac_save_IFS
22117   test -z "$ac_dir" && ac_dir=.
22118   if $as_executable_p "$ac_dir/$ac_word"; then
22119    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
22120    echo "$as_me:22120: found $ac_dir/$ac_word" >&5
22121    break
22122 fi
22123 done
22124
22125   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22126   ;;
22127 esac
22128 fi
22129 TIC_PATH=$ac_cv_path_TIC_PATH
22130
22131 if test -n "$TIC_PATH"; then
22132   echo "$as_me:22132: result: $TIC_PATH" >&5
22133 echo "${ECHO_T}$TIC_PATH" >&6
22134 else
22135   echo "$as_me:22135: result: no" >&5
22136 echo "${ECHO_T}no" >&6
22137 fi
22138
22139 if test -n "$FALLBACK_LIST"
22140 then
22141         if test "$TIC_PATH" = unknown
22142         then
22143                 { echo "$as_me:22143: WARNING: no tic program found for fallbacks" >&5
22144 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22145         fi
22146 fi
22147
22148 if test "x$cf_with_tests" != xno ; then
22149         MAKE_TESTS=
22150 else
22151         MAKE_TESTS="#"
22152 fi
22153
22154 ADAHTML_DIR=../../doc/html/ada
22155
22156 # these could be configurable, but are not currently
22157 PANEL_NAME=panel
22158 MENU_NAME=menu
22159 FORM_NAME=form
22160 CXX_NAME=ncurses++
22161
22162 # workaround for g++ versus Solaris (20131116)
22163 case $cf_cv_system_name in
22164 (solaris2*)
22165         case "x$CPPFLAGS" in
22166         (*-D_XOPEN_SOURCE_EXTENDED*)
22167                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
22168
22169 echo "${as_me:-configure}:22169: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22170
22171                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22172                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22173                 ;;
22174         esac
22175         ;;
22176 esac
22177
22178 # Help to automatically enable the extended curses features when using either
22179 # the *-config or the ".pc" files by adding defines.
22180 echo "$as_me:22180: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
22181 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
22182 PKG_CFLAGS=
22183 for cf_loop1 in $CPPFLAGS_after_XOPEN
22184 do
22185         cf_found=no
22186         for cf_loop2 in $CPPFLAGS_before_XOPEN
22187         do
22188                 if test "x$cf_loop1" = "x$cf_loop2"
22189                 then
22190                         cf_found=yes
22191                         break
22192                 fi
22193         done
22194         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
22195 done
22196 echo "$as_me:22196: result: $PKG_CFLAGS" >&5
22197 echo "${ECHO_T}$PKG_CFLAGS" >&6
22198
22199 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
22200 case "x$NCURSES_OSPEED" in
22201 (*short*)
22202         cf_compatible=1
22203         ;;
22204 (*)
22205         cf_compatible=0
22206         ;;
22207 esac
22208
22209 cat >>confdefs.h <<EOF
22210 #define NCURSES_OSPEED_COMPAT $cf_compatible
22211 EOF
22212
22213 case "x$cf_cv_typeof_chtype" in
22214 (xshort|xint|xlong)
22215         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22216         ;;
22217 esac
22218
22219 case "x$cf_cv_typeof_mmask_t" in
22220 (xshort|xint|xlong)
22221         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22222         ;;
22223 esac
22224
22225 # substitute into misc/Makefile to suppress
22226 # (un)install.data from the
22227 # (un)install rules.
22228 if test "x$cf_with_db_install" = "xno"; then
22229         MISC_INSTALL_DATA=
22230         MISC_UNINSTALL_DATA=
22231 else
22232         MISC_INSTALL_DATA=install.data
22233         MISC_UNINSTALL_DATA=uninstall.data
22234 fi
22235
22236 SUB_SCRIPTS=
22237
22238 if test -n "$PACKAGE"
22239 then
22240         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22241         export PACKAGE
22242         echo "package: $PACKAGE"
22243 fi
22244
22245 UNALTERED_SYMS=
22246 cf_filter_syms=no
22247
22248 if test -n "$RESULTING_SYMS"
22249 then
22250         case $cf_cv_abi_version in
22251         ([6789])
22252                 test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
22253
22254 echo "${as_me:-configure}:22254: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22255
22256                 cf_filter_syms=yes
22257                 ;;
22258         (*)
22259                 test -n "$verbose" && echo "    will map symbols to default ABI" 1>&6
22260
22261 echo "${as_me:-configure}:22261: testing will map symbols to default ABI ..." 1>&5
22262
22263                 ;;
22264         esac
22265 fi
22266
22267 if test "x$WILDCARD_SYMS" = xno
22268 then
22269         cf_filter_syms=yes
22270 fi
22271
22272 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22273 if test $cf_filter_syms = yes
22274 then
22275         RESULTING_SYMS=resulting.map
22276 fi
22277
22278 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"
22279 ac_config_commands="$ac_config_commands default"
22280 cat >confcache <<\_ACEOF
22281 # This file is a shell script that caches the results of configure
22282 # tests run on this system so they can be shared between configure
22283 # scripts and configure runs, see configure's option --config-cache.
22284 # It is not useful on other systems.  If it contains results you don't
22285 # want to keep, you may remove or edit it.
22286 #
22287 # config.status only pays attention to the cache file if you give it
22288 # the --recheck option to rerun configure.
22289 #
22290 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22291 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22292 # following values.
22293
22294 _ACEOF
22295
22296 # The following way of writing the cache mishandles newlines in values,
22297 # but we know of no workaround that is simple, portable, and efficient.
22298 # So, don't put newlines in cache variables' values.
22299 # Ultrix sh set writes to stderr and can't be redirected directly,
22300 # and sets the high bit in the cache file unless we assign to the vars.
22301 {
22302   (set) 2>&1 |
22303     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22304     *ac_space=\ *)
22305       # `set' does not quote correctly, so add quotes (double-quote
22306       # substitution turns \\\\ into \\, and sed turns \\ into \).
22307       sed -n \
22308         "s/'/'\\\\''/g;
22309           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22310       ;;
22311     *)
22312       # `set' quotes correctly as required by POSIX, so do not add quotes.
22313       sed -n \
22314         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22315       ;;
22316     esac;
22317 } |
22318   sed '
22319      t clear
22320      : clear
22321      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22322      t end
22323      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22324      : end' >>confcache
22325 if cmp -s $cache_file confcache; then :; else
22326   if test -w $cache_file; then
22327     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22328     cat confcache >$cache_file
22329   else
22330     echo "not updating unwritable cache $cache_file"
22331   fi
22332 fi
22333 rm -f confcache
22334
22335 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22336 # Let make expand exec_prefix.
22337 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22338
22339 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22340 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22341 # trailing colons and then remove the whole line if VPATH becomes empty
22342 # (actually we leave an empty line to preserve line numbers).
22343 if test "x$srcdir" = x.; then
22344   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22345 s/:*\$(srcdir):*/:/;
22346 s/:*\${srcdir}:*/:/;
22347 s/:*@srcdir@:*/:/;
22348 s/^\([^=]*=[    ]*\):*/\1/;
22349 s/:*$//;
22350 s/^[^=]*=[      ]*$//;
22351 }'
22352 fi
22353
22354 DEFS=-DHAVE_CONFIG_H
22355
22356 : ${CONFIG_STATUS=./config.status}
22357 ac_clean_files_save=$ac_clean_files
22358 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22359 { echo "$as_me:22359: creating $CONFIG_STATUS" >&5
22360 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22361 cat >$CONFIG_STATUS <<_ACEOF
22362 #! $SHELL
22363 # Generated automatically by configure.
22364 # Run this file to recreate the current configuration.
22365 # Compiler output produced by configure, useful for debugging
22366 # configure, is in config.log if it exists.
22367
22368 debug=false
22369 SHELL=\${CONFIG_SHELL-$SHELL}
22370 ac_cs_invocation="\$0 \$@"
22371
22372 _ACEOF
22373
22374 cat >>$CONFIG_STATUS <<\_ACEOF
22375 # Be Bourne compatible
22376 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22377   emulate sh
22378   NULLCMD=:
22379 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22380   set -o posix
22381 fi
22382
22383 # Name of the executable.
22384 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22385
22386 if expr a : '\(a\)' >/dev/null 2>&1; then
22387   as_expr=expr
22388 else
22389   as_expr=false
22390 fi
22391
22392 rm -f conf$$ conf$$.exe conf$$.file
22393 echo >conf$$.file
22394 if ln -s conf$$.file conf$$ 2>/dev/null; then
22395   # We could just check for DJGPP; but this test a) works b) is more generic
22396   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22397   if test -f conf$$.exe; then
22398     # Don't use ln at all; we don't have any links
22399     as_ln_s='cp -p'
22400   else
22401     as_ln_s='ln -s'
22402   fi
22403 elif ln conf$$.file conf$$ 2>/dev/null; then
22404   as_ln_s=ln
22405 else
22406   as_ln_s='cp -p'
22407 fi
22408 rm -f conf$$ conf$$.exe conf$$.file
22409
22410 as_executable_p="test -f"
22411
22412 # Support unset when possible.
22413 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22414   as_unset=unset
22415 else
22416   as_unset=false
22417 fi
22418
22419 # NLS nuisances.
22420 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22421 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22422 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22423 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22424 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22425 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22426 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22427 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22428
22429 # IFS
22430 # We need space, tab and new line, in precisely that order.
22431 as_nl='
22432 '
22433 IFS="   $as_nl"
22434
22435 # CDPATH.
22436 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22437
22438 exec 6>&1
22439
22440 _ACEOF
22441
22442 # Files that config.status was made for.
22443 if test -n "$ac_config_files"; then
22444   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22445 fi
22446
22447 if test -n "$ac_config_headers"; then
22448   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22449 fi
22450
22451 if test -n "$ac_config_links"; then
22452   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22453 fi
22454
22455 if test -n "$ac_config_commands"; then
22456   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22457 fi
22458
22459 cat >>$CONFIG_STATUS <<\EOF
22460
22461 ac_cs_usage="\
22462 \`$as_me' instantiates files from templates according to the
22463 current configuration.
22464
22465 Usage: $0 [OPTIONS] [FILE]...
22466
22467   -h, --help       print this help, then exit
22468   -V, --version    print version number, then exit
22469   -d, --debug      don't remove temporary files
22470       --recheck    update $as_me by reconfiguring in the same conditions
22471   --file=FILE[:TEMPLATE]
22472                    instantiate the configuration file FILE
22473   --header=FILE[:TEMPLATE]
22474                    instantiate the configuration header FILE
22475
22476 Configuration files:
22477 $config_files
22478
22479 Configuration headers:
22480 $config_headers
22481
22482 Configuration commands:
22483 $config_commands
22484
22485 Report bugs to <dickey@invisible-island.net>."
22486 EOF
22487
22488 cat >>$CONFIG_STATUS <<EOF
22489 ac_cs_version="\\
22490 config.status
22491 configured by $0, generated by GNU Autoconf 2.52.20141204,
22492   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22493
22494 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22495 Free Software Foundation, Inc.
22496 This config.status script is free software; the Free Software Foundation
22497 gives unlimited permission to copy, distribute and modify it."
22498 srcdir=$srcdir
22499 INSTALL="$INSTALL"
22500 EOF
22501
22502 cat >>$CONFIG_STATUS <<\EOF
22503 # If no file are specified by the user, then we need to provide default
22504 # value.  By we need to know if files were specified by the user.
22505 ac_need_defaults=:
22506 while test $# != 0
22507 do
22508   case $1 in
22509   --*=*)
22510     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22511     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22512     shift
22513     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22514     shift
22515     ;;
22516   -*);;
22517   *) # This is not an option, so the user has probably given explicit
22518      # arguments.
22519      ac_need_defaults=false;;
22520   esac
22521
22522   case $1 in
22523   # Handling of the options.
22524 EOF
22525 cat >>$CONFIG_STATUS <<EOF
22526   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22527     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22528     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22529 EOF
22530 cat >>$CONFIG_STATUS <<\EOF
22531   --version | --vers* | -V )
22532     echo "$ac_cs_version"; exit 0 ;;
22533   --he | --h)
22534     # Conflict between --help and --header
22535     { { echo "$as_me:22535: error: ambiguous option: $1
22536 Try \`$0 --help' for more information." >&5
22537 echo "$as_me: error: ambiguous option: $1
22538 Try \`$0 --help' for more information." >&2;}
22539    { (exit 1); exit 1; }; };;
22540   --help | --hel | -h )
22541     echo "$ac_cs_usage"; exit 0 ;;
22542   --debug | --d* | -d )
22543     debug=: ;;
22544   --file | --fil | --fi | --f )
22545     shift
22546     CONFIG_FILES="$CONFIG_FILES $1"
22547     ac_need_defaults=false;;
22548   --header | --heade | --head | --hea )
22549     shift
22550     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22551     ac_need_defaults=false;;
22552
22553   # This is an error.
22554   -*) { { echo "$as_me:22554: error: unrecognized option: $1
22555 Try \`$0 --help' for more information." >&5
22556 echo "$as_me: error: unrecognized option: $1
22557 Try \`$0 --help' for more information." >&2;}
22558    { (exit 1); exit 1; }; } ;;
22559
22560   *) ac_config_targets="$ac_config_targets $1" ;;
22561
22562   esac
22563   shift
22564 done
22565
22566 exec 5>>config.log
22567 cat >&5 << _ACEOF
22568
22569 ## ----------------------- ##
22570 ## Running config.status.  ##
22571 ## ----------------------- ##
22572
22573 This file was extended by $as_me 2.52.20141204, executed with
22574   CONFIG_FILES    = $CONFIG_FILES
22575   CONFIG_HEADERS  = $CONFIG_HEADERS
22576   CONFIG_LINKS    = $CONFIG_LINKS
22577   CONFIG_COMMANDS = $CONFIG_COMMANDS
22578   > $ac_cs_invocation
22579 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22580
22581 _ACEOF
22582 EOF
22583
22584 cat >>$CONFIG_STATUS <<EOF
22585 #
22586 # INIT-COMMANDS section.
22587 #
22588
22589 ### Special initialization commands, used to pass information from the
22590 ### configuration-run into config.status
22591
22592 AWK="$AWK"
22593 ALTERNATE_SYMS="$ALTERNATE_SYMS"
22594 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22595 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22596 ECHO_LD="$ECHO_LD"
22597 EXTRA_SUFFIX="$EXTRA_SUFFIX"
22598 LDCONFIG="$LDCONFIG"
22599 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22600 LIB_NAME="$LIB_NAME"
22601 LIB_PREFIX="$LIB_PREFIX"
22602 LIB_SUBSETS="$LIB_SUBSETS"
22603 LIB_SUFFIX="$LIB_SUFFIX"
22604 LIB_TRACING="$LIB_TRACING"
22605 LN_S="$LN_S"
22606 MAKE_TERMINFO="$MAKE_TERMINFO"
22607 NCURSES_MAJOR="$NCURSES_MAJOR"
22608 NCURSES_MINOR="$NCURSES_MINOR"
22609 NCURSES_OSPEED="$NCURSES_OSPEED"
22610 NCURSES_PATCH="$NCURSES_PATCH"
22611 SRC_SUBDIRS="$SRC_SUBDIRS"
22612 TERMINFO="$TERMINFO"
22613 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22614 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22615 TICS_NAME="$TICS_NAME"
22616 TIC_PATH="$TIC_PATH"
22617 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22618 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22619 TINFO_NAME="$TINFO_NAME"
22620 TINFO_SUFFIX="$TINFO_SUFFIX"
22621 UNALTERED_SYMS="$UNALTERED_SYMS"
22622 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
22623 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
22624 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
22625 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22626 WILDCARD_SYMS="$WILDCARD_SYMS"
22627 WITH_CURSES_H="$with_curses_h"
22628 WITH_ECHO="${enable_echo:=yes}"
22629 WITH_OVERWRITE="$with_overwrite"
22630 cf_LIST_MODELS="$cf_list_models"
22631 cf_cv_abi_version="$cf_cv_abi_version"
22632 cf_cv_do_relink="$cf_cv_do_relink"
22633 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22634 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22635 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22636 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22637 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22638 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22639 cf_cv_rel_version="$cf_cv_rel_version"
22640 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22641 cf_cv_shared_soname='$cf_cv_shared_soname'
22642 cf_cv_shlib_version="$cf_cv_shlib_version"
22643 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22644 cf_cv_system_name="$cf_cv_system_name"
22645 cf_cv_term_driver="$with_term_driver"
22646 cf_with_ada="$cf_with_ada"
22647 cf_with_cxx_binding="$cf_with_cxx_binding"
22648 cf_with_db_install="$cf_with_db_install"
22649 cf_with_manpages="$cf_with_manpages"
22650 cf_with_tests="$cf_with_tests"
22651 host="$host"
22652 target="$target"
22653 with_shared_cxx="$with_shared_cxx"
22654
22655 EOF
22656
22657 cat >>$CONFIG_STATUS <<\EOF
22658 for ac_config_target in $ac_config_targets
22659 do
22660   case "$ac_config_target" in
22661   # Handling of arguments.
22662   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22663   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22664   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22665   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22666   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22667   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22668   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22669   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22670   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22671   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22672   *) { { echo "$as_me:22672: error: invalid argument: $ac_config_target" >&5
22673 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22674    { (exit 1); exit 1; }; };;
22675   esac
22676 done
22677
22678 # If the user did not use the arguments to specify the items to instantiate,
22679 # then the envvar interface is used.  Set only those that are not.
22680 # We use the long form for the default assignment because of an extremely
22681 # bizarre bug on SunOS 4.1.3.
22682 if $ac_need_defaults; then
22683   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22684   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22685   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22686 fi
22687
22688 # Create a temporary directory, and hook for its removal unless debugging.
22689 $debug ||
22690 {
22691   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22692   trap '{ (exit 1); exit 1; }' 1 2 13 15
22693 }
22694
22695 # Create a (secure) tmp directory for tmp files.
22696 : ${TMPDIR=/tmp}
22697 {
22698   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22699   test -n "$tmp" && test -d "$tmp"
22700 }  ||
22701 {
22702   tmp=$TMPDIR/cs$$-$RANDOM
22703   (umask 077 && mkdir $tmp)
22704 } ||
22705 {
22706    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22707    { (exit 1); exit 1; }
22708 }
22709
22710 EOF
22711
22712 cat >>$CONFIG_STATUS <<EOF
22713
22714 #
22715 # CONFIG_FILES section.
22716 #
22717
22718 # No need to generate the scripts if there are no CONFIG_FILES.
22719 # This happens for instance when ./config.status config.h
22720 if test -n "\$CONFIG_FILES"; then
22721   # Protect against being on the right side of a sed subst in config.status.
22722   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22723    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22724 s,@SHELL@,$SHELL,;t t
22725 s,@exec_prefix@,$exec_prefix,;t t
22726 s,@prefix@,$prefix,;t t
22727 s,@program_transform_name@,$program_transform_name,;t t
22728 s,@bindir@,$bindir,;t t
22729 s,@sbindir@,$sbindir,;t t
22730 s,@libexecdir@,$libexecdir,;t t
22731 s,@datarootdir@,$datarootdir,;t t
22732 s,@datadir@,$datadir,;t t
22733 s,@sysconfdir@,$sysconfdir,;t t
22734 s,@sharedstatedir@,$sharedstatedir,;t t
22735 s,@localstatedir@,$localstatedir,;t t
22736 s,@libdir@,$libdir,;t t
22737 s,@includedir@,$includedir,;t t
22738 s,@oldincludedir@,$oldincludedir,;t t
22739 s,@infodir@,$infodir,;t t
22740 s,@mandir@,$mandir,;t t
22741 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22742 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22743 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22744 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22745 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22746 s,@build_alias@,$build_alias,;t t
22747 s,@host_alias@,$host_alias,;t t
22748 s,@target_alias@,$target_alias,;t t
22749 s,@ECHO_C@,$ECHO_C,;t t
22750 s,@ECHO_N@,$ECHO_N,;t t
22751 s,@ECHO_T@,$ECHO_T,;t t
22752 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22753 s,@DEFS@,$DEFS,;t t
22754 s,@LIBS@,$LIBS,;t t
22755 s,@top_builddir@,$top_builddir,;t t
22756 s,@EGREP@,$EGREP,;t t
22757 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22758 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22759 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22760 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22761 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22762 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22763 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22764 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22765 s,@VERSION@,$VERSION,;t t
22766 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
22767 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
22768 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
22769 s,@PACKAGE@,$PACKAGE,;t t
22770 s,@build@,$build,;t t
22771 s,@build_cpu@,$build_cpu,;t t
22772 s,@build_vendor@,$build_vendor,;t t
22773 s,@build_os@,$build_os,;t t
22774 s,@host@,$host,;t t
22775 s,@host_cpu@,$host_cpu,;t t
22776 s,@host_vendor@,$host_vendor,;t t
22777 s,@host_os@,$host_os,;t t
22778 s,@target@,$target,;t t
22779 s,@target_cpu@,$target_cpu,;t t
22780 s,@target_vendor@,$target_vendor,;t t
22781 s,@target_os@,$target_os,;t t
22782 s,@CC@,$CC,;t t
22783 s,@CFLAGS@,$CFLAGS,;t t
22784 s,@LDFLAGS@,$LDFLAGS,;t t
22785 s,@CPPFLAGS@,$CPPFLAGS,;t t
22786 s,@ac_ct_CC@,$ac_ct_CC,;t t
22787 s,@EXEEXT@,$EXEEXT,;t t
22788 s,@OBJEXT@,$OBJEXT,;t t
22789 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22790 s,@CPP@,$CPP,;t t
22791 s,@LDCONFIG@,$LDCONFIG,;t t
22792 s,@CXX@,$CXX,;t t
22793 s,@CXXFLAGS@,$CXXFLAGS,;t t
22794 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22795 s,@AWK@,$AWK,;t t
22796 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22797 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22798 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22799 s,@LINT@,$LINT,;t t
22800 s,@LINT_OPTS@,$LINT_OPTS,;t t
22801 s,@LN_S@,$LN_S,;t t
22802 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22803 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22804 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22805 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22806 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
22807 s,@SET_MAKE@,$SET_MAKE,;t t
22808 s,@CTAGS@,$CTAGS,;t t
22809 s,@ETAGS@,$ETAGS,;t t
22810 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22811 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22812 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22813 s,@RANLIB@,$RANLIB,;t t
22814 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22815 s,@LD@,$LD,;t t
22816 s,@ac_ct_LD@,$ac_ct_LD,;t t
22817 s,@AR@,$AR,;t t
22818 s,@ac_ct_AR@,$ac_ct_AR,;t t
22819 s,@NM@,$NM,;t t
22820 s,@ac_ct_NM@,$ac_ct_NM,;t t
22821 s,@ARFLAGS@,$ARFLAGS,;t t
22822 s,@DESTDIR@,$DESTDIR,;t t
22823 s,@BUILD_CC@,$BUILD_CC,;t t
22824 s,@BUILD_CPP@,$BUILD_CPP,;t t
22825 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22826 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22827 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22828 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22829 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22830 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22831 s,@cf_list_models@,$cf_list_models,;t t
22832 s,@ABI_VERSION@,$ABI_VERSION,;t t
22833 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
22834 s,@LIBTOOL@,$LIBTOOL,;t t
22835 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22836 s,@LT_UNDEF@,$LT_UNDEF,;t t
22837 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22838 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22839 s,@LIB_CREATE@,$LIB_CREATE,;t t
22840 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22841 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22842 s,@LIB_PREP@,$LIB_PREP,;t t
22843 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22844 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22845 s,@LIB_LINK@,$LIB_LINK,;t t
22846 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22847 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
22848 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
22849 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
22850 s,@TICS_NAME@,$TICS_NAME,;t t
22851 s,@TINFO_NAME@,$TINFO_NAME,;t t
22852 s,@LIB_NAME@,$LIB_NAME,;t t
22853 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
22854 s,@CC_G_OPT@,$CC_G_OPT,;t t
22855 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
22856 s,@LD_MODEL@,$LD_MODEL,;t t
22857 s,@shlibdir@,$shlibdir,;t t
22858 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
22859 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
22860 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
22861 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
22862 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
22863 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
22864 s,@LINK_PROGS@,$LINK_PROGS,;t t
22865 s,@LINK_TESTS@,$LINK_TESTS,;t t
22866 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22867 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
22868 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
22869 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
22870 s,@RPATH_LIST@,$RPATH_LIST,;t t
22871 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
22872 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
22873 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
22874 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
22875 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22876 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
22877 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
22878 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
22879 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
22880 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
22881 s,@XTERM_KBS@,$XTERM_KBS,;t t
22882 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
22883 s,@TERMINFO@,$TERMINFO,;t t
22884 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
22885 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
22886 s,@TERMPATH@,$TERMPATH,;t t
22887 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
22888 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
22889 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
22890 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
22891 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
22892 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
22893 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
22894 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
22895 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
22896 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
22897 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
22898 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
22899 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
22900 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
22901 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
22902 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
22903 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
22904 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
22905 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
22906 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
22907 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
22908 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
22909 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
22910 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
22911 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
22912 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
22913 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
22914 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
22915 s,@PTHREAD@,$PTHREAD,;t t
22916 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
22917 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
22918 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
22919 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
22920 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
22921 s,@ECHO_LT@,$ECHO_LT,;t t
22922 s,@ECHO_LD@,$ECHO_LD,;t t
22923 s,@RULE_CC@,$RULE_CC,;t t
22924 s,@SHOW_CC@,$SHOW_CC,;t t
22925 s,@ECHO_CC@,$ECHO_CC,;t t
22926 s,@ECHO_LINK@,$ECHO_LINK,;t t
22927 s,@ADAFLAGS@,$ADAFLAGS,;t t
22928 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
22929 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
22930 s,@ADA_TRACE@,$ADA_TRACE,;t t
22931 s,@MATH_LIB@,$MATH_LIB,;t t
22932 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
22933 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
22934 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
22935 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
22936 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
22937 s,@TEST_LIBS@,$TEST_LIBS,;t t
22938 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
22939 s,@CXXCPP@,$CXXCPP,;t t
22940 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
22941 s,@CXX_AR@,$CXX_AR,;t t
22942 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
22943 s,@CXXLIBS@,$CXXLIBS,;t t
22944 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
22945 s,@gnat_exists@,$gnat_exists,;t t
22946 s,@M4_exists@,$M4_exists,;t t
22947 s,@cf_ada_make@,$cf_ada_make,;t t
22948 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
22949 s,@cf_compile_generics@,$cf_compile_generics,;t t
22950 s,@cf_generic_objects@,$cf_generic_objects,;t t
22951 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
22952 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
22953 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
22954 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
22955 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
22956 s,@cf_ada_package@,$cf_ada_package,;t t
22957 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
22958 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
22959 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
22960 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
22961 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
22962 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
22963 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
22964 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
22965 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
22966 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
22967 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
22968 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
22969 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
22970 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
22971 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
22972 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
22973 s,@TICS_LIBS@,$TICS_LIBS,;t t
22974 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
22975 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
22976 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
22977 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
22978 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
22979 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
22980 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
22981 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
22982 s,@includesubdir@,$includesubdir,;t t
22983 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
22984 s,@TICS_LIST@,$TICS_LIST,;t t
22985 s,@TINFO_LIST@,$TINFO_LIST,;t t
22986 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
22987 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
22988 s,@TEST_ARGS@,$TEST_ARGS,;t t
22989 s,@TEST_DEPS@,$TEST_DEPS,;t t
22990 s,@TEST_ARG2@,$TEST_ARG2,;t t
22991 s,@TEST_DEP2@,$TEST_DEP2,;t t
22992 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
22993 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
22994 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
22995 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
22996 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
22997 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
22998 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
22999 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
23000 s,@cross_compiling@,$cross_compiling,;t t
23001 s,@TIC_PATH@,$TIC_PATH,;t t
23002 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
23003 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
23004 s,@PANEL_NAME@,$PANEL_NAME,;t t
23005 s,@MENU_NAME@,$MENU_NAME,;t t
23006 s,@FORM_NAME@,$FORM_NAME,;t t
23007 s,@CXX_NAME@,$CXX_NAME,;t t
23008 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
23009 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
23010 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
23011 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
23012 CEOF
23013
23014 EOF
23015
23016   cat >>$CONFIG_STATUS <<\EOF
23017   # Split the substitutions into bite-sized pieces for seds with
23018   # small command number limits, like on Digital OSF/1 and HP-UX.
23019   ac_max_sed_lines=48
23020   ac_sed_frag=1 # Number of current file.
23021   ac_beg=1 # First line for current file.
23022   ac_end=$ac_max_sed_lines # Line after last line for current file.
23023   ac_more_lines=:
23024   ac_sed_cmds=
23025   while $ac_more_lines; do
23026     if test $ac_beg -gt 1; then
23027       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23028     else
23029       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23030     fi
23031     if test ! -s $tmp/subs.frag; then
23032       ac_more_lines=false
23033     else
23034       # The purpose of the label and of the branching condition is to
23035       # speed up the sed processing (if there are no `@' at all, there
23036       # is no need to browse any of the substitutions).
23037       # These are the two extra sed commands mentioned above.
23038       (echo ':t
23039   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23040       if test -z "$ac_sed_cmds"; then
23041         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23042       else
23043         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23044       fi
23045       ac_sed_frag=`expr $ac_sed_frag + 1`
23046       ac_beg=$ac_end
23047       ac_end=`expr $ac_end + $ac_max_sed_lines`
23048     fi
23049   done
23050   if test -z "$ac_sed_cmds"; then
23051     ac_sed_cmds=cat
23052   fi
23053 fi # test -n "$CONFIG_FILES"
23054
23055 EOF
23056 cat >>$CONFIG_STATUS <<\EOF
23057 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23058   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23059   case $ac_file in
23060   - | *:- | *:-:* ) # input from stdin
23061         cat >$tmp/stdin
23062         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23063         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23064   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23065         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23066   * )   ac_file_in=$ac_file.in ;;
23067   esac
23068
23069   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23070   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23071          X"$ac_file" : 'X\(//\)[^/]' \| \
23072          X"$ac_file" : 'X\(//\)$' \| \
23073          X"$ac_file" : 'X\(/\)' \| \
23074          .     : '\(.\)' 2>/dev/null ||
23075 echo X"$ac_file" |
23076     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23077           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23078           /^X\(\/\/\)$/{ s//\1/; q; }
23079           /^X\(\/\).*/{ s//\1/; q; }
23080           s/.*/./; q'`
23081   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23082     { case "$ac_dir" in
23083   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23084   *)                      as_incr_dir=.;;
23085 esac
23086 as_dummy="$ac_dir"
23087 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23088   case $as_mkdir_dir in
23089     # Skip DOS drivespec
23090     ?:) as_incr_dir=$as_mkdir_dir ;;
23091     *)
23092       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23093       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23094     ;;
23095   esac
23096 done; }
23097
23098     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23099     # A "../" for each directory in $ac_dir_suffix.
23100     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23101   else
23102     ac_dir_suffix= ac_dots=
23103   fi
23104
23105   case $srcdir in
23106   .)  ac_srcdir=.
23107       if test -z "$ac_dots"; then
23108          ac_top_srcdir=.
23109       else
23110          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23111       fi ;;
23112   [\\/]* | ?:[\\/]* )
23113       ac_srcdir=$srcdir$ac_dir_suffix;
23114       ac_top_srcdir=$srcdir ;;
23115   *) # Relative path.
23116     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23117     ac_top_srcdir=$ac_dots$srcdir ;;
23118   esac
23119
23120   case $INSTALL in
23121   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23122   *) ac_INSTALL=$ac_dots$INSTALL ;;
23123   esac
23124
23125   if test x"$ac_file" != x-; then
23126     { echo "$as_me:23126: creating $ac_file" >&5
23127 echo "$as_me: creating $ac_file" >&6;}
23128     rm -f "$ac_file"
23129   fi
23130   # Let's still pretend it is `configure' which instantiates (i.e., don't
23131   # use $as_me), people would be surprised to read:
23132   #    /* config.h.  Generated automatically by config.status.  */
23133   configure_input="Generated automatically from `echo $ac_file_in |
23134                                                  sed 's,.*/,,'` by configure."
23135
23136   # First look for the input files in the build tree, otherwise in the
23137   # src tree.
23138   ac_file_inputs=`IFS=:
23139     for f in $ac_file_in; do
23140       case $f in
23141       -) echo $tmp/stdin ;;
23142       [\\/$]*)
23143          # Absolute (can't be DOS-style, as IFS=:)
23144          test -f "$f" || { { echo "$as_me:23144: error: cannot find input file: $f" >&5
23145 echo "$as_me: error: cannot find input file: $f" >&2;}
23146    { (exit 1); exit 1; }; }
23147          echo $f;;
23148       *) # Relative
23149          if test -f "$f"; then
23150            # Build tree
23151            echo $f
23152          elif test -f "$srcdir/$f"; then
23153            # Source tree
23154            echo $srcdir/$f
23155          else
23156            # /dev/null tree
23157            { { echo "$as_me:23157: error: cannot find input file: $f" >&5
23158 echo "$as_me: error: cannot find input file: $f" >&2;}
23159    { (exit 1); exit 1; }; }
23160          fi;;
23161       esac
23162     done` || { (exit 1); exit 1; }
23163 EOF
23164 cat >>$CONFIG_STATUS <<\EOF
23165   ac_warn_datarootdir=no
23166   if test x"$ac_file" != x-; then
23167     for ac_item in $ac_file_inputs
23168     do
23169       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23170       if test -n "$ac_seen"; then
23171         ac_used=`grep '@datarootdir@' $ac_item`
23172         if test -z "$ac_used"; then
23173           { echo "$as_me:23173: WARNING: datarootdir was used implicitly but not set:
23174 $ac_seen" >&5
23175 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23176 $ac_seen" >&2;}
23177           ac_warn_datarootdir=yes
23178         fi
23179       fi
23180       ac_seen=`grep '${datarootdir}' $ac_item`
23181       if test -n "$ac_seen"; then
23182         { echo "$as_me:23182: WARNING: datarootdir was used explicitly but not set:
23183 $ac_seen" >&5
23184 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23185 $ac_seen" >&2;}
23186         ac_warn_datarootdir=yes
23187       fi
23188     done
23189   fi
23190
23191 if test "x$ac_warn_datarootdir" = xyes; then
23192   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23193 fi
23194
23195 EOF
23196 cat >>$CONFIG_STATUS <<EOF
23197   sed "$ac_vpsub
23198 $extrasub
23199 EOF
23200 cat >>$CONFIG_STATUS <<\EOF
23201 :t
23202 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23203 s,@configure_input@,$configure_input,;t t
23204 s,@srcdir@,$ac_srcdir,;t t
23205 s,@top_srcdir@,$ac_top_srcdir,;t t
23206 s,@INSTALL@,$ac_INSTALL,;t t
23207 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23208   rm -f $tmp/stdin
23209   if test x"$ac_file" != x-; then
23210     cp $tmp/out $ac_file
23211
23212     for ac_name in prefix exec_prefix datarootdir
23213     do
23214         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23215         if test -n "$ac_seen"; then
23216             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
23217             if test -z "$ac_init"; then
23218               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23219               { echo "$as_me:23219: WARNING: Variable $ac_name is used but was not set:
23220 $ac_seen" >&5
23221 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23222 $ac_seen" >&2;}
23223             fi
23224         fi
23225     done
23226     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23227     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23228     if test -s $tmp/out; then
23229       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23230       { echo "$as_me:23230: WARNING: Some variables may not be substituted:
23231 $ac_seen" >&5
23232 echo "$as_me: WARNING: Some variables may not be substituted:
23233 $ac_seen" >&2;}
23234     fi
23235   else
23236     cat $tmp/out
23237   fi
23238   rm -f $tmp/out
23239
23240 done
23241 EOF
23242 cat >>$CONFIG_STATUS <<\EOF
23243
23244 #
23245 # CONFIG_HEADER section.
23246 #
23247
23248 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23249 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23250 #
23251 # ac_d sets the value in "#define NAME VALUE" lines.
23252 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23253 ac_dB='[        ].*$,\1#\2'
23254 ac_dC=' '
23255 ac_dD=',;t'
23256 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23257 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23258 ac_iB='\([      ]\),\1#\2define\3'
23259 ac_iC=' '
23260 ac_iD='\4,;t'
23261 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23262 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23263 ac_uB='$,\1#\2define\3'
23264 ac_uC=' '
23265 ac_uD=',;t'
23266
23267 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23268   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23269   case $ac_file in
23270   - | *:- | *:-:* ) # input from stdin
23271         cat >$tmp/stdin
23272         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23273         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23274   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23275         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23276   * )   ac_file_in=$ac_file.in ;;
23277   esac
23278
23279   test x"$ac_file" != x- && { echo "$as_me:23279: creating $ac_file" >&5
23280 echo "$as_me: creating $ac_file" >&6;}
23281
23282   # First look for the input files in the build tree, otherwise in the
23283   # src tree.
23284   ac_file_inputs=`IFS=:
23285     for f in $ac_file_in; do
23286       case $f in
23287       -) echo $tmp/stdin ;;
23288       [\\/$]*)
23289          # Absolute (can't be DOS-style, as IFS=:)
23290          test -f "$f" || { { echo "$as_me:23290: error: cannot find input file: $f" >&5
23291 echo "$as_me: error: cannot find input file: $f" >&2;}
23292    { (exit 1); exit 1; }; }
23293          echo $f;;
23294       *) # Relative
23295          if test -f "$f"; then
23296            # Build tree
23297            echo $f
23298          elif test -f "$srcdir/$f"; then
23299            # Source tree
23300            echo $srcdir/$f
23301          else
23302            # /dev/null tree
23303            { { echo "$as_me:23303: error: cannot find input file: $f" >&5
23304 echo "$as_me: error: cannot find input file: $f" >&2;}
23305    { (exit 1); exit 1; }; }
23306          fi;;
23307       esac
23308     done` || { (exit 1); exit 1; }
23309   # Remove the trailing spaces.
23310   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23311
23312 EOF
23313
23314 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23315 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23316 # be either 'cat' or 'sort'.
23317 cat confdefs.h | uniq >conftest.vals
23318
23319 # Break up conftest.vals because some shells have a limit on
23320 # the size of here documents, and old seds have small limits too.
23321
23322 rm -f conftest.tail
23323 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23324 while grep . conftest.vals >/dev/null
23325 do
23326   # Write chunks of a limited-size here document to conftest.frag.
23327   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23328   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23329   echo 'CEOF' >> $CONFIG_STATUS
23330   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23331   rm -f conftest.vals
23332   mv conftest.tail conftest.vals
23333 done
23334 rm -f conftest.vals
23335
23336 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23337 # marker @DEFS@.
23338 echo '  cat >> conftest.edit <<CEOF
23339 /@DEFS@/r conftest.frag
23340 /@DEFS@/d
23341 CEOF
23342 sed -f conftest.edit $tmp/in > $tmp/out
23343 rm -f $tmp/in
23344 mv $tmp/out $tmp/in
23345 rm -f conftest.edit conftest.frag
23346 ' >> $CONFIG_STATUS
23347
23348 cat >>$CONFIG_STATUS <<\EOF
23349   # Let's still pretend it is `configure' which instantiates (i.e., don't
23350   # use $as_me), people would be surprised to read:
23351   #    /* config.h.  Generated automatically by config.status.  */
23352   if test x"$ac_file" = x-; then
23353     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23354   else
23355     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23356   fi
23357   cat $tmp/in >>$tmp/config.h
23358   rm -f $tmp/in
23359   if test x"$ac_file" != x-; then
23360     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23361       { echo "$as_me:23361: $ac_file is unchanged" >&5
23362 echo "$as_me: $ac_file is unchanged" >&6;}
23363     else
23364       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23365          X"$ac_file" : 'X\(//\)[^/]' \| \
23366          X"$ac_file" : 'X\(//\)$' \| \
23367          X"$ac_file" : 'X\(/\)' \| \
23368          .     : '\(.\)' 2>/dev/null ||
23369 echo X"$ac_file" |
23370     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23371           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23372           /^X\(\/\/\)$/{ s//\1/; q; }
23373           /^X\(\/\).*/{ s//\1/; q; }
23374           s/.*/./; q'`
23375       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23376         { case "$ac_dir" in
23377   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23378   *)                      as_incr_dir=.;;
23379 esac
23380 as_dummy="$ac_dir"
23381 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23382   case $as_mkdir_dir in
23383     # Skip DOS drivespec
23384     ?:) as_incr_dir=$as_mkdir_dir ;;
23385     *)
23386       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23387       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23388     ;;
23389   esac
23390 done; }
23391
23392       fi
23393       rm -f $ac_file
23394       mv $tmp/config.h $ac_file
23395     fi
23396   else
23397     cat $tmp/config.h
23398     rm -f $tmp/config.h
23399   fi
23400 done
23401 EOF
23402 cat >>$CONFIG_STATUS <<\EOF
23403 #
23404 # CONFIG_COMMANDS section.
23405 #
23406 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23407   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23408   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23409
23410   case $ac_dest in
23411     default )
23412 if test "x$cf_with_tests" != xno ; then
23413
23414 for cf_dir in test
23415 do
23416         if test ! -d $srcdir/$cf_dir; then
23417                 continue
23418         elif test -f $srcdir/$cf_dir/programs; then
23419                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23420         fi
23421 done
23422
23423 fi
23424
23425 cf_prefix=$LIB_PREFIX
23426
23427 case $cf_cv_shlib_version in
23428 (cygdll|msysdll|mingw)
23429         TINFO_NAME=$TINFO_ARG_SUFFIX
23430         TINFO_SUFFIX=.dll
23431         ;;
23432 esac
23433
23434 if test -n "$TINFO_SUFFIX" ; then
23435         case $TINFO_SUFFIX in
23436         (tw*)
23437                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
23438                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
23439                 ;;
23440         (t*)
23441                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
23442                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
23443                 ;;
23444         (w*)
23445                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
23446                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
23447                 ;;
23448         esac
23449 fi
23450
23451 for cf_dir in $SRC_SUBDIRS
23452 do
23453         if test ! -d $srcdir/$cf_dir ; then
23454                 continue
23455         elif test -f $srcdir/$cf_dir/modules; then
23456
23457                 SHARED_LIB=
23458                 Libs_To_Make=
23459
23460                 cf_sed_options=
23461                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23462                 then
23463                         cf_sed_options="$cf_sed_options -e \"s/NCURSES\\([WT]\\+\\)\?_/NCURSES\\1${cf_cv_abi_version}_/g\""
23464                 fi
23465
23466                 if test "x$WILDCARD_SYMS" = xno
23467                 then
23468                         cf_sed_options="$cf_sed_options -e \"s/_\*;//g\""
23469                 fi
23470
23471                 if test "x$cf_sed_options" != "x"
23472                 then
23473                         cat >>$cf_dir/Makefile <<CF_EOF
23474
23475 # Generated by CF_LIB_RULES
23476 resulting.map: $UNALTERED_SYMS
23477         sed $cf_sed_options < $UNALTERED_SYMS >\$@
23478
23479 clean::
23480         rm -f resulting.map
23481 CF_EOF
23482                 fi
23483
23484                 for cf_item in $cf_LIST_MODELS
23485                 do
23486
23487         case X$cf_item in
23488         (Xlibtool)
23489                 cf_suffix='.la'
23490                 cf_depsuf=$cf_suffix
23491                 ;;
23492         (Xdebug)
23493                 cf_suffix='_g.a'
23494                 cf_depsuf=$cf_suffix
23495                 ;;
23496         (Xprofile)
23497                 cf_suffix='_p.a'
23498                 cf_depsuf=$cf_suffix
23499                 ;;
23500         (Xshared)
23501                 case $cf_cv_system_name in
23502                 (aix[5-7]*)
23503                         cf_suffix='.so'
23504                         cf_depsuf=$cf_suffix
23505                         ;;
23506                 (cygwin*|msys*|mingw*)
23507                         cf_suffix='.dll'
23508                         cf_depsuf='.dll.a'
23509                         ;;
23510                 (darwin*)
23511                         cf_suffix='.dylib'
23512                         cf_depsuf=$cf_suffix
23513                         ;;
23514                 (hpux*)
23515                         case $target in
23516                         (ia64*)
23517                                 cf_suffix='.so'
23518                                 cf_depsuf=$cf_suffix
23519                                 ;;
23520                         (*)
23521                                 cf_suffix='.sl'
23522                                 cf_depsuf=$cf_suffix
23523                                 ;;
23524                         esac
23525                         ;;
23526                 (*)
23527                         cf_suffix='.so'
23528                         cf_depsuf=$cf_suffix
23529                         ;;
23530                 esac
23531                 ;;
23532         (*)
23533                 cf_suffix='.a'
23534                 cf_depsuf=$cf_suffix
23535                 ;;
23536         esac
23537         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23538         then
23539                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23540                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23541         fi
23542
23543                         cf_libname=$cf_dir
23544                         test "$cf_dir" = c++ && cf_libname=ncurses++
23545                         if test $cf_item = shared ; then
23546                                 if test -n "${LIB_SUFFIX}"
23547                                 then
23548                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23549                                 else
23550                                         cf_shared_suffix="$cf_suffix"
23551                                 fi
23552                                 if test "$cf_cv_do_symlinks" = yes ; then
23553                                         cf_version_name=
23554
23555                                         case "$cf_cv_shlib_version" in
23556                                         (rel)
23557                                                 cf_version_name=REL_VERSION
23558                                                 ;;
23559                                         (abi)
23560                                                 cf_version_name=ABI_VERSION
23561                                                 ;;
23562                                         esac
23563
23564                                         if test -n "$cf_version_name"
23565                                         then
23566                                                 case "$cf_cv_system_name" in
23567                                                 (darwin*)
23568                                                         # "w", etc?
23569                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23570                                                         ;;
23571                                                 (*)
23572                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23573                                                         ;;
23574                                                 esac
23575                                         fi
23576                                         if test -n "${USE_LIB_SUFFIX}"
23577                                         then
23578                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23579                                         else
23580                                                 cf_shared_suffix="$cf_suffix"
23581                                         fi
23582                                 fi
23583                                 # cygwin needs import library, and has unique naming convention
23584                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23585                                 # use 'cyg' prefix for shared lib.
23586                                 case $cf_cv_shlib_version in
23587                                 (cygdll)
23588                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23589                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
23590                                         ;;
23591                                 (msysdll)
23592                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23593                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
23594                                         ;;
23595                                 (mingw)
23596                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23597                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
23598                                         ;;
23599                                 (*)
23600                                         cf_add_lib=
23601                                         ;;
23602                                 esac
23603                                 if test -n "$cf_add_lib"
23604                                 then
23605                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
23606                                         continue
23607                                 fi
23608                         fi
23609                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23610                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
23611                 done
23612
23613                 if test $cf_dir = ncurses ; then
23614                         cf_subsets="$LIB_SUBSETS"
23615                         cf_r_parts="$cf_subsets"
23616                         cf_liblist="$Libs_To_Make"
23617
23618                         while test -n "$cf_r_parts"
23619                         do
23620                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
23621                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
23622                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
23623                                         cf_add_lib=
23624                                         case $cf_l_parts in
23625                                         (*termlib*)
23626                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
23627                                                 ;;
23628                                         (*ticlib*)
23629                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
23630                                                 ;;
23631                                         (*)
23632                                                 break
23633                                                 ;;
23634                                         esac
23635                                         if test -n "$cf_add_lib"; then
23636                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
23637                                         fi
23638                                 else
23639                                         break
23640                                 fi
23641                         done
23642                 else
23643                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23644                 fi
23645
23646                 if test $cf_dir = c++; then
23647                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23648                                 cf_list=
23649                                 for cf_item in $Libs_To_Make
23650                                 do
23651                                         case $cf_item in
23652                                         (*.a)
23653                                                 ;;
23654                                         (*)
23655                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23656                                                 ;;
23657                                         esac
23658                                         for cf_test in $cf_list
23659                                         do
23660                                                 if test "$cf_test" = "$cf_item"
23661                                                 then
23662                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23663                                                         cf_item=
23664                                                         break
23665                                                 fi
23666                                         done
23667                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
23668                                 done
23669                                 Libs_To_Make="$cf_list"
23670                         fi
23671                 fi
23672
23673                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23674                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23675                         $cf_dir/Makefile >$cf_dir/Makefile.out
23676                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23677
23678                 $AWK -f $srcdir/mk-0th.awk \
23679                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23680                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23681
23682                 for cf_subset in $cf_subsets
23683                 do
23684                         cf_subdirs=
23685                         for cf_item in $cf_LIST_MODELS
23686                         do
23687
23688                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23689
23690 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23691
23692                         CXX_MODEL=$cf_ITEM
23693                         if test "$CXX_MODEL" = SHARED; then
23694                                 case $cf_cv_shlib_version in
23695                                 (cygdll|msysdll|mingw)
23696                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23697
23698 echo "${as_me:-configure}:23698: testing overriding CXX_MODEL to SHARED ..." 1>&5
23699
23700                                         with_shared_cxx=yes
23701                                         ;;
23702                                 (*)
23703                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23704                                         ;;
23705                                 esac
23706                         fi
23707
23708         case X$cf_item in
23709         (Xlibtool)
23710                 cf_suffix='.la'
23711                 cf_depsuf=$cf_suffix
23712                 ;;
23713         (Xdebug)
23714                 cf_suffix='_g.a'
23715                 cf_depsuf=$cf_suffix
23716                 ;;
23717         (Xprofile)
23718                 cf_suffix='_p.a'
23719                 cf_depsuf=$cf_suffix
23720                 ;;
23721         (Xshared)
23722                 case $cf_cv_system_name in
23723                 (aix[5-7]*)
23724                         cf_suffix='.so'
23725                         cf_depsuf=$cf_suffix
23726                         ;;
23727                 (cygwin*|msys*|mingw*)
23728                         cf_suffix='.dll'
23729                         cf_depsuf='.dll.a'
23730                         ;;
23731                 (darwin*)
23732                         cf_suffix='.dylib'
23733                         cf_depsuf=$cf_suffix
23734                         ;;
23735                 (hpux*)
23736                         case $target in
23737                         (ia64*)
23738                                 cf_suffix='.so'
23739                                 cf_depsuf=$cf_suffix
23740                                 ;;
23741                         (*)
23742                                 cf_suffix='.sl'
23743                                 cf_depsuf=$cf_suffix
23744                                 ;;
23745                         esac
23746                         ;;
23747                 (*)
23748                         cf_suffix='.so'
23749                         cf_depsuf=$cf_suffix
23750                         ;;
23751                 esac
23752                 ;;
23753         (*)
23754                 cf_suffix='.a'
23755                 cf_depsuf=$cf_suffix
23756                 ;;
23757         esac
23758         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23759         then
23760                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23761                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23762         fi
23763
23764         case $cf_item in
23765         (libtool) cf_subdir='obj_lo'  ;;
23766         (normal)  cf_subdir='objects' ;;
23767         (debug)   cf_subdir='obj_g' ;;
23768         (profile) cf_subdir='obj_p' ;;
23769         (shared)
23770                 case $cf_cv_system_name in
23771                 (cygwin|msys)
23772                         cf_subdir='objects' ;;
23773                 (*)
23774                         cf_subdir='obj_s' ;;
23775                 esac
23776         esac
23777
23778                         # Test for case where we build libtinfo with a different name.
23779                         cf_libname=$cf_dir
23780                         if test $cf_dir = ncurses ; then
23781                                 case $cf_subset in
23782                                 (*base*)
23783                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
23784                                         ;;
23785                                 (*termlib*)
23786                                         cf_libname=$TINFO_LIB_SUFFIX
23787                                         ;;
23788                                 (ticlib*)
23789                                         cf_libname=$TICS_LIB_SUFFIX
23790                                         ;;
23791                                 esac
23792                         elif test $cf_dir = c++ ; then
23793                                 cf_libname=ncurses++$USE_LIB_SUFFIX
23794                         else
23795                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
23796                         fi
23797                         if test -n "${USE_ARG_SUFFIX}" ; then
23798                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
23799                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
23800                         fi
23801
23802                         # These dependencies really are for development, not
23803                         # builds, but they are useful in porting, too.
23804                         cf_depend="../include/ncurses_cfg.h"
23805                         if test "$srcdir" = "."; then
23806                                 cf_reldir="."
23807                         else
23808                                 cf_reldir="\${srcdir}"
23809                         fi
23810
23811                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
23812                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
23813                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
23814                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
23815                         fi
23816
23817                         cf_dir_suffix=
23818                         old_cf_suffix="$cf_suffix"
23819                         if test "$cf_cv_shlib_version_infix" = yes ; then
23820                         if test -n "$USE_LIB_SUFFIX" ; then
23821                                 case $USE_LIB_SUFFIX in
23822                                 (tw*)
23823                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
23824                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
23825                                         cf_dir_suffix=tw$EXTRA_SUFFIX
23826                                         ;;
23827                                 (t*)
23828                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
23829                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
23830                                         cf_dir_suffix=t$EXTRA_SUFFIX
23831                                         ;;
23832                                 (w*)
23833                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
23834                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
23835                                         cf_dir_suffix=w$EXTRA_SUFFIX
23836                                         ;;
23837                                 (*)
23838                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
23839                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
23840                                         cf_dir_suffix=$EXTRA_SUFFIX
23841                                         ;;
23842                                 esac
23843                         fi
23844                         fi
23845
23846                         $AWK -f $srcdir/mk-1st.awk \
23847                                 name=${cf_libname}${cf_dir_suffix} \
23848                                 traces=$LIB_TRACING \
23849                                 MODEL=$cf_ITEM \
23850                                 CXX_MODEL=$CXX_MODEL \
23851                                 model=$cf_subdir \
23852                                 prefix=$cf_prefix \
23853                                 suffix=$cf_suffix \
23854                                 subset=$cf_subset \
23855                                 driver=$cf_cv_term_driver \
23856                                 SymLink="$LN_S" \
23857                                 TermlibRoot=$TINFO_NAME \
23858                                 TermlibSuffix=$TINFO_SUFFIX \
23859                                 ShlibVer=$cf_cv_shlib_version \
23860                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
23861                                 ReLink=${cf_cv_do_relink:-no} \
23862                                 DoLinks=$cf_cv_do_symlinks \
23863                                 rmSoLocs=$cf_cv_rm_so_locs \
23864                                 ldconfig="$LDCONFIG" \
23865                                 overwrite=$WITH_OVERWRITE \
23866                                 depend="$cf_depend" \
23867                                 host="$host" \
23868                                 libtool_version="$LIBTOOL_VERSION" \
23869                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23870
23871                         cf_suffix="$old_cf_suffix"
23872
23873                         for cf_subdir2 in $cf_subdirs lib
23874                         do
23875                                 test $cf_subdir = $cf_subdir2 && break
23876                         done
23877                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
23878                         $AWK -f $srcdir/mk-2nd.awk \
23879                                 name=$cf_dir \
23880                                 traces=$LIB_TRACING \
23881                                 MODEL=$cf_ITEM \
23882                                 model=$cf_subdir \
23883                                 subset=$cf_subset \
23884                                 srcdir=$srcdir \
23885                                 echo=$WITH_ECHO \
23886                                 crenames=$cf_cv_prog_CC_c_o \
23887                                 cxxrenames=$cf_cv_prog_CXX_c_o \
23888                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23889                         cf_subdirs="$cf_subdirs $cf_subdir"
23890                         done
23891                 done
23892         fi
23893
23894         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
23895 done
23896
23897 for cf_dir in $SRC_SUBDIRS
23898 do
23899         if test ! -d $srcdir/$cf_dir ; then
23900                 continue
23901         fi
23902
23903         if test -f $cf_dir/Makefile ; then
23904                 case "$cf_dir" in
23905                 (Ada95)
23906                         echo 'libs \' >> Makefile
23907                         echo 'install.libs \' >> Makefile
23908                         echo 'uninstall.libs ::' >> Makefile
23909                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
23910                         ;;
23911                 esac
23912         fi
23913
23914         if test -f $srcdir/$cf_dir/modules; then
23915                 echo >> Makefile
23916                 if test -f $srcdir/$cf_dir/headers; then
23917 cat >> Makefile <<CF_EOF
23918 install.includes \\
23919 uninstall.includes \\
23920 CF_EOF
23921                 fi
23922 if test "$cf_dir" != "c++" ; then
23923 echo 'lint \' >> Makefile
23924 fi
23925 cat >> Makefile <<CF_EOF
23926 libs \\
23927 lintlib \\
23928 install.libs \\
23929 uninstall.libs \\
23930 install.$cf_dir \\
23931 uninstall.$cf_dir ::
23932         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23933 CF_EOF
23934         elif test -f $srcdir/$cf_dir/headers; then
23935 cat >> Makefile <<CF_EOF
23936
23937 libs \\
23938 install.libs \\
23939 uninstall.libs \\
23940 install.includes \\
23941 uninstall.includes ::
23942         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23943 CF_EOF
23944 fi
23945 done
23946
23947 if test "x$cf_with_db_install" = xyes; then
23948 cat >> Makefile <<CF_EOF
23949
23950 install.libs uninstall.libs \\
23951 install.data uninstall.data ::
23952 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23953 CF_EOF
23954 else
23955 cat >> Makefile <<CF_EOF
23956
23957 install.libs uninstall.libs ::
23958         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23959 CF_EOF
23960 fi
23961
23962 if test "x$cf_with_manpages" = xyes; then
23963 cat >> Makefile <<CF_EOF
23964
23965 install.man \\
23966 uninstall.man ::
23967         cd man && \${MAKE} \${TOP_MFLAGS} \$@
23968 CF_EOF
23969 fi
23970
23971 cat >> Makefile <<CF_EOF
23972
23973 distclean ::
23974         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
23975         rm -f headers.sh headers.sed mk_shared_lib.sh
23976         rm -f edit_man.* man_alias.*
23977         rm -rf \${DIRS_TO_MAKE}
23978 CF_EOF
23979
23980 # Special case: tack's manpage lives in its own directory.
23981 if test "x$cf_with_manpages" = xyes; then
23982 if test -d tack ; then
23983 if test -f $srcdir/$tack.h; then
23984 cat >> Makefile <<CF_EOF
23985
23986 install.man \\
23987 uninstall.man ::
23988         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
23989 CF_EOF
23990 fi
23991 fi
23992 fi
23993
23994 rm -f headers.sed headers.sh
23995
23996 echo creating headers.sh
23997 cat >headers.sh <<CF_EOF
23998 #! /bin/sh
23999 # This shell script is generated by the 'configure' script.  It is invoked in a
24000 # subdirectory of the build tree.  It generates a sed-script in the parent
24001 # directory that is used to adjust includes for header files that reside in a
24002 # subdirectory of /usr/include, etc.
24003 PRG=""
24004 while test \$# != 3
24005 do
24006 PRG="\$PRG \$1"; shift
24007 done
24008 DST=\$1
24009 REF=\$2
24010 SRC=\$3
24011 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
24012 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
24013 echo installing \$SRC in \$DST
24014 CF_EOF
24015
24016 if test $WITH_CURSES_H = yes; then
24017         cat >>headers.sh <<CF_EOF
24018 case \$DST in
24019 (/*/include/*)
24020         END=\`basename \$DST\`
24021         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24022         do
24023                 NAME=\`basename \$i\`
24024                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24025         done
24026         ;;
24027 (*)
24028         echo "" >> \$TMPSED
24029         ;;
24030 esac
24031 CF_EOF
24032
24033 else
24034         cat >>headers.sh <<CF_EOF
24035 case \$DST in
24036 (/*/include/*)
24037         END=\`basename \$DST\`
24038         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24039         do
24040                 NAME=\`basename \$i\`
24041                 if test "\$NAME" = "curses.h"
24042                 then
24043                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24044                         NAME=ncurses.h
24045                 fi
24046                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24047         done
24048         ;;
24049 (*)
24050         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24051         ;;
24052 esac
24053 CF_EOF
24054 fi
24055 cat >>headers.sh <<CF_EOF
24056 rm -f \$TMPSRC
24057 sed -f \$TMPSED \$SRC > \$TMPSRC
24058 NAME=\`basename \$SRC\`
24059 CF_EOF
24060 if test $WITH_CURSES_H != yes; then
24061         cat >>headers.sh <<CF_EOF
24062 test "\$NAME" = "curses.h" && NAME=ncurses.h
24063 CF_EOF
24064 fi
24065 cat >>headers.sh <<CF_EOF
24066 # Just in case someone gzip'd manpages, remove the conflicting copy.
24067 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
24068
24069 eval \$PRG \$TMPSRC \$DST/\$NAME
24070 rm -f \$TMPSRC \$TMPSED
24071 CF_EOF
24072
24073 chmod 0755 headers.sh
24074
24075 for cf_dir in $SRC_SUBDIRS
24076 do
24077         if test ! -d $srcdir/$cf_dir ; then
24078                 continue
24079         fi
24080
24081         if test -f $srcdir/$cf_dir/headers; then
24082                 $AWK -f $srcdir/mk-hdr.awk \
24083                         subset="$LIB_SUBSETS" \
24084                         compat="$WITH_CURSES_H" \
24085                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
24086         fi
24087
24088         if test -f $srcdir/$cf_dir/modules; then
24089                 if test "$cf_dir" != "c++" ; then
24090                         cat >>$cf_dir/Makefile <<"CF_EOF"
24091 depend : ${AUTO_SRC}
24092         makedepend -- ${CPPFLAGS} -- ${C_SRC}
24093
24094 # DO NOT DELETE THIS LINE -- make depend depends on it.
24095 CF_EOF
24096                 fi
24097         fi
24098 done
24099
24100 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24101 if test -z "$USE_OLD_MAKERULES" ; then
24102         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
24103 fi
24104 fi
24105  ;;
24106   esac
24107 done
24108 EOF
24109
24110 cat >>$CONFIG_STATUS <<\EOF
24111
24112 { (exit 0); exit 0; }
24113 EOF
24114 chmod +x $CONFIG_STATUS
24115 ac_clean_files=$ac_clean_files_save
24116
24117 # configure is writing to config.log, and then calls config.status.
24118 # config.status does its own redirection, appending to config.log.
24119 # Unfortunately, on DOS this fails, as config.log is still kept open
24120 # by configure, so config.status won't be able to write to it; its
24121 # output is simply discarded.  So we exec the FD to /dev/null,
24122 # effectively closing config.log, so it can be properly (re)opened and
24123 # appended to by config.status.  When coming back to configure, we
24124 # need to make the FD available again.
24125 if test "$no_create" != yes; then
24126   ac_cs_success=:
24127   exec 5>/dev/null
24128   $SHELL $CONFIG_STATUS || ac_cs_success=false
24129   exec 5>>config.log
24130   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24131   # would make configure fail if this is the last instruction.
24132   $ac_cs_success || { (exit 1); exit 1; }
24133 fi
24134 ${MAKE:-make} preinstall