]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
a28bff7b49846ead4aec8a994af1e3f966a08b75
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.582 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20121002.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tests         suppress build/install with test-programs
713   --without-curses-h      install curses.h as ncurses.h only
714   --with-pkg-config{=path} enable/disable use of pkg-config
715   --with-pkg-config-libdir=XXX use given directory for installing pc-files
716   --enable-pc-files       generate and install .pc files for pkg-config
717   --enable-mixed-case     tic should assume mixed-case filenames
718   --with-install-prefix   prefixes actual install-location ($DESTDIR)
719 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
720   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
721   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
722   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
723   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
724   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
725   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
726 Options to Specify the Libraries Built/Used:
727   --disable-libtool-version  enable to use libtool's incompatible naming scheme
728   --with-libtool          generate libraries with libtool
729   --with-shared           generate shared-libraries
730   --with-normal           generate normal-libraries (default)
731   --with-debug            generate debug-libraries (default)
732   --with-profile          generate profile-libraries
733   --with-cxx-shared       generate C++ shared-libraries
734   --with-lib-prefix       override library-prefix
735   --with-termlib          generate separate terminfo library
736   --with-ticlib           generate separate tic library
737   --with-gpm              use Alessandro Rubini's GPM library
738   --without-dlsym         do not use dlsym() to load GPM dynamically
739   --with-sysmouse         use sysmouse (FreeBSD console)
740   --enable-rpath          use rpath option when generating shared libraries
741   --disable-relink        relink shared libraries during install
742   --with-shlib-version=X  Specify rel or abi version for shared libs
743   --disable-lib-suffixes  disable library suffixes
744   --disable-rpath-hack    don't add rpath options for additional libraries
745 Fine-Tuning Your Configuration:
746   --disable-overwrite     leave out the link to -lcurses
747   --disable-database      do not use terminfo, only fallbacks/termcap
748   --with-database=XXX     specify terminfo source to install
749   --with-hashed-db        specify hashed-database library
750   --with-fallbacks=XXX    specify list of fallback terminal descriptions
751   --without-xterm-new     specify if xterm terminfo should be old version
752   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
753   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
754   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
755   --disable-big-core      assume machine has little memory
756   --disable-big-strings   assume compiler has only standard-size strings
757   --enable-termcap        compile in termcap fallback support
758   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
759   --enable-getcap         fast termcap load, no xrefs to terminfo
760   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
761   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
762   --disable-root-environ  restrict environment when running as root
763   --enable-symlinks       make tic use symbolic links not hard links
764   --enable-broken_linker  compile with broken-linker support code
765   --enable-bsdpad         recognize BSD-style prefix padding
766   --enable-widec          compile with wide-char/UTF-8 code
767   --disable-lp64          allow chtype to be long (ignore _LP64)
768   --disable-largefile     omit support for large files
769   --disable-tparm-varargs compile tparm() without varargs interface
770   --disable-tic-depends   link tic library without explicit dependency on ncurses library
771   --with-bool=TYPE        override fallback type of bool variable
772   --with-caps=alt         compile with alternate Caps file
773   --with-chtype=TYPE      override type of chtype
774   --with-ospeed=TYPE      override type of ospeed variable
775   --with-mmask-t=TYPE     override type of mmask_t
776   --with-ccharw-max=XXX   override size CCHARW_MAX
777   --with-tparm-arg=TYPE   override parameter type of tparm
778   --with-rcs-ids          compile-in RCS identifiers
779 Options to Specify How Manpages are Installed:
780   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
781                           optionally formatted/catonly, e.g., gzip,formatted
782   --with-manpage-renames  specify manpage-renaming
783   --with-manpage-aliases  specify manpage-aliases using .so
784   --with-manpage-symlinks specify manpage-aliases using symlinks
785   --with-manpage-tbl      specify manpage processing with tbl
786 Extensions:
787   --disable-ext-funcs     disable function-extensions
788   --enable-sp-funcs       enable experimental SCREEN-extensions
789   --enable-term-driver    enable experimental terminal-driver
790   --enable-const          compile with extra/non-standard const
791   --enable-ext-colors     compile for 256-color support
792   --enable-ext-mouse      compile for extended mouse-encoding
793   --enable-no-padding     compile with $NCURSES_NO_PADDING code
794   --enable-signed-char    compile using signed Boolean's in term.h
795   --enable-sigwinch       compile with SIGWINCH handler
796   --enable-tcap-names     compile with user-definable terminal capabilities
797 Development Code:
798   --without-develop       disable development options
799   --enable-hard-tabs      compile with hard-tabs code
800   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
801 Experimental Code:
802   --disable-assumed-color do not assume anything about default-colors
803   --disable-hashmap       compile without hashmap scrolling-optimization
804   --enable-colorfgbg      compile-in experimental $COLORFGBG code
805   --enable-interop        compile-in experimental interop bindings
806   --with-pthread          use POSIX thread library
807   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
808   --enable-weak-symbols   enable weak-symbols for pthreads
809   --enable-reentrant      compile with experimental reentrant code
810   --with-wrap-prefix=XXX  override prefix used for public variables
811   --enable-safe-sprintf   compile with experimental safe-sprintf code
812   --disable-scroll-hints  compile without scroll-hints code
813   --enable-wgetch-events  compile with experimental wgetch-events code
814 Testing/development Options:
815   --disable-echo          do not display "compiling" commands
816   --enable-warnings       build: turn on GCC compiler warnings
817   --enable-string-hacks   work around bogus compiler/loader warnings
818   --enable-assertions     test: turn on generation of assertion code
819   --with-dmalloc          test: use Gray Watson's dmalloc library
820   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
821   --with-valgrind         test: use valgrind
822   --disable-leaks         test: free permanent memory, analyze leaks
823   --enable-expanded       test: generate functions for certain macros
824   --disable-macros        test: use functions rather than macros
825   --with-trace            test: add trace() function to all models of ncurses
826   --disable-gnat-projects test: disable GNAT projects even if usable
827 Ada95 Binding Options:
828   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
829   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
830   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
831   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
832
833 Some influential environment variables:
834   CC          C compiler command
835   CFLAGS      C compiler flags
836   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
837               nonstandard directory <lib dir>
838   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
839               headers in a nonstandard directory <include dir>
840   CPP         C preprocessor
841   CXX         C++ compiler command
842   CXXFLAGS    C++ compiler flags
843   CXXCPP      C++ preprocessor
844
845 Use these variables to override the choices made by `configure' or to help
846 it to find libraries and programs with nonstandard names/locations.
847
848 EOF
849 fi
850
851 if test "$ac_init_help" = "recursive"; then
852   # If there are subdirs, report their specific --help.
853   ac_popdir=`pwd`
854   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
855     cd $ac_subdir
856     # A "../" for each directory in /$ac_subdir.
857     ac_dots=`echo $ac_subdir |
858              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
859
860     case $srcdir in
861     .) # No --srcdir option.  We are building in place.
862       ac_sub_srcdir=$srcdir ;;
863     [\\/]* | ?:[\\/]* ) # Absolute path.
864       ac_sub_srcdir=$srcdir/$ac_subdir ;;
865     *) # Relative path.
866       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
867     esac
868
869     # Check for guested configure; otherwise get Cygnus style configure.
870     if test -f $ac_sub_srcdir/configure.gnu; then
871       echo
872       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
873     elif test -f $ac_sub_srcdir/configure; then
874       echo
875       $SHELL $ac_sub_srcdir/configure  --help=recursive
876     elif test -f $ac_sub_srcdir/configure.ac ||
877            test -f $ac_sub_srcdir/configure.in; then
878       echo
879       $ac_configure --help
880     else
881       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
882     fi
883     cd $ac_popdir
884   done
885 fi
886
887 test -n "$ac_init_help" && exit 0
888 if $ac_init_version; then
889   cat <<\EOF
890
891 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
892 Free Software Foundation, Inc.
893 This configure script is free software; the Free Software Foundation
894 gives unlimited permission to copy, distribute and modify it.
895 EOF
896   exit 0
897 fi
898 exec 5>config.log
899 cat >&5 <<EOF
900 This file contains any messages produced by compilers while
901 running configure, to aid debugging if configure makes a mistake.
902
903 It was created by $as_me, which was
904 generated by GNU Autoconf 2.52.20121002.  Invocation command line was
905
906   $ $0 $@
907
908 EOF
909 {
910 cat <<_ASUNAME
911 ## ---------- ##
912 ## Platform.  ##
913 ## ---------- ##
914
915 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
916 uname -m = `(uname -m) 2>/dev/null || echo unknown`
917 uname -r = `(uname -r) 2>/dev/null || echo unknown`
918 uname -s = `(uname -s) 2>/dev/null || echo unknown`
919 uname -v = `(uname -v) 2>/dev/null || echo unknown`
920
921 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
922 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
923
924 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
925 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
926 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
927 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
928 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
929 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
930 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
931
932 PATH = $PATH
933
934 _ASUNAME
935 } >&5
936
937 cat >&5 <<EOF
938 ## ------------ ##
939 ## Core tests.  ##
940 ## ------------ ##
941
942 EOF
943
944 # Keep a trace of the command line.
945 # Strip out --no-create and --no-recursion so they do not pile up.
946 # Also quote any args containing shell meta-characters.
947 ac_configure_args=
948 ac_sep=
949 for ac_arg
950 do
951   case $ac_arg in
952   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
953   | --no-cr | --no-c) ;;
954   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
955   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
956   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
957     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
958     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
959     ac_sep=" " ;;
960   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
961      ac_sep=" " ;;
962   esac
963   # Get rid of the leading space.
964 done
965
966 # When interrupted or exit'd, cleanup temporary files, and complete
967 # config.log.  We remove comments because anyway the quotes in there
968 # would cause problems or look ugly.
969 trap 'exit_status=$?
970   # Save into config.log some information that might help in debugging.
971   echo >&5
972   echo "## ----------------- ##" >&5
973   echo "## Cache variables.  ##" >&5
974   echo "## ----------------- ##" >&5
975   echo >&5
976   # The following way of writing the cache mishandles newlines in values,
977 {
978   (set) 2>&1 |
979     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
980     *ac_space=\ *)
981       sed -n \
982         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
983           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
984       ;;
985     *)
986       sed -n \
987         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
988       ;;
989     esac;
990 } >&5
991   sed "/^$/d" confdefs.h >conftest.log
992   if test -s conftest.log; then
993     echo >&5
994     echo "## ------------ ##" >&5
995     echo "## confdefs.h.  ##" >&5
996     echo "## ------------ ##" >&5
997     echo >&5
998     cat conftest.log >&5
999   fi
1000   (echo; echo) >&5
1001   test "$ac_signal" != 0 &&
1002     echo "$as_me: caught signal $ac_signal" >&5
1003   echo "$as_me: exit $exit_status" >&5
1004   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1005     exit $exit_status
1006      ' 0
1007 for ac_signal in 1 2 13 15; do
1008   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1009 done
1010 ac_signal=0
1011
1012 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1013 rm -rf conftest* confdefs.h
1014 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1015 echo >confdefs.h
1016
1017 # Let the site file select an alternate cache file if it wants to.
1018 # Prefer explicitly selected file to automatically selected ones.
1019 if test -z "$CONFIG_SITE"; then
1020   if test "x$prefix" != xNONE; then
1021     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1022   else
1023     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1024   fi
1025 fi
1026 for ac_site_file in $CONFIG_SITE; do
1027   if test -r "$ac_site_file"; then
1028     { echo "$as_me:1028: loading site script $ac_site_file" >&5
1029 echo "$as_me: loading site script $ac_site_file" >&6;}
1030     cat "$ac_site_file" >&5
1031     . "$ac_site_file"
1032   fi
1033 done
1034
1035 if test -r "$cache_file"; then
1036   # Some versions of bash will fail to source /dev/null (special
1037   # files actually), so we avoid doing that.
1038   if test -f "$cache_file"; then
1039     { echo "$as_me:1039: loading cache $cache_file" >&5
1040 echo "$as_me: loading cache $cache_file" >&6;}
1041     case $cache_file in
1042       [\\/]* | ?:[\\/]* ) . $cache_file;;
1043       *)                      . ./$cache_file;;
1044     esac
1045   fi
1046 else
1047   { echo "$as_me:1047: creating cache $cache_file" >&5
1048 echo "$as_me: creating cache $cache_file" >&6;}
1049   >$cache_file
1050 fi
1051
1052 # Check that the precious variables saved in the cache have kept the same
1053 # value.
1054 ac_cache_corrupted=false
1055 for ac_var in `(set) 2>&1 |
1056                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1057   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1058   eval ac_new_set=\$ac_env_${ac_var}_set
1059   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1060   eval ac_new_val="\$ac_env_${ac_var}_value"
1061   case $ac_old_set,$ac_new_set in
1062     set,)
1063       { echo "$as_me:1063: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1064 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1065       ac_cache_corrupted=: ;;
1066     ,set)
1067       { echo "$as_me:1067: error: \`$ac_var' was not set in the previous run" >&5
1068 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1069       ac_cache_corrupted=: ;;
1070     ,);;
1071     *)
1072       if test "x$ac_old_val" != "x$ac_new_val"; then
1073         { echo "$as_me:1073: error: \`$ac_var' has changed since the previous run:" >&5
1074 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1075         { echo "$as_me:1075:   former value:  $ac_old_val" >&5
1076 echo "$as_me:   former value:  $ac_old_val" >&2;}
1077         { echo "$as_me:1077:   current value: $ac_new_val" >&5
1078 echo "$as_me:   current value: $ac_new_val" >&2;}
1079         ac_cache_corrupted=:
1080       fi;;
1081   esac
1082   # Pass precious variables to config.status.  It doesn't matter if
1083   # we pass some twice (in addition to the command line arguments).
1084   if test "$ac_new_set" = set; then
1085     case $ac_new_val in
1086     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1087       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1088       ac_configure_args="$ac_configure_args '$ac_arg'"
1089       ;;
1090     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1091        ;;
1092     esac
1093   fi
1094 done
1095 if $ac_cache_corrupted; then
1096   { echo "$as_me:1096: error: changes in the environment can compromise the build" >&5
1097 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1098   { { echo "$as_me:1098: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1099 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1100    { (exit 1); exit 1; }; }
1101 fi
1102
1103 ac_ext=c
1104 ac_cpp='$CPP $CPPFLAGS'
1105 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1106 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1107 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1108 ac_main_return=return
1109
1110 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1111   *c*,-n*) ECHO_N= ECHO_C='
1112 ' ECHO_T='      ' ;;
1113   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1114   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1115 esac
1116 echo "#! $SHELL" >conftest.sh
1117 echo  "exit 0"   >>conftest.sh
1118 chmod +x conftest.sh
1119 if { (echo "$as_me:1119: PATH=\".;.\"; conftest.sh") >&5
1120   (PATH=".;."; conftest.sh) 2>&5
1121   ac_status=$?
1122   echo "$as_me:1122: \$? = $ac_status" >&5
1123   (exit $ac_status); }; then
1124   ac_path_separator=';'
1125 else
1126   ac_path_separator=:
1127 fi
1128 PATH_SEPARATOR="$ac_path_separator"
1129 rm -f conftest.sh
1130
1131 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1132
1133 top_builddir=`pwd`
1134
1135 echo "$as_me:1135: checking for egrep" >&5
1136 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1137 if test "${ac_cv_prog_egrep+set}" = set; then
1138   echo $ECHO_N "(cached) $ECHO_C" >&6
1139 else
1140   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1141     then ac_cv_prog_egrep='grep -E'
1142     else ac_cv_prog_egrep='egrep'
1143     fi
1144 fi
1145 echo "$as_me:1145: result: $ac_cv_prog_egrep" >&5
1146 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1147  EGREP=$ac_cv_prog_egrep
1148
1149 test -z "$EGREP" && { { echo "$as_me:1149: error: No egrep program found" >&5
1150 echo "$as_me: error: No egrep program found" >&2;}
1151    { (exit 1); exit 1; }; }
1152
1153 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1154 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1155 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1156 cf_cv_abi_version=${NCURSES_MAJOR}
1157 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1158 cf_cv_timestamp=`date`
1159 echo "$as_me:1159: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1160 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1161
1162 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1163
1164 # Check whether --with-rel-version or --without-rel-version was given.
1165 if test "${with_rel_version+set}" = set; then
1166   withval="$with_rel_version"
1167   { echo "$as_me:1167: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1168 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1169  cf_cv_rel_version=$withval
1170 fi;
1171
1172  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1173  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1174
1175 if test -n "$NCURSES_MAJOR" ; then
1176   case $NCURSES_MAJOR in #(vi
1177   [0-9]*) #(vi
1178         ;;
1179   *)
1180         { { echo "$as_me:1180: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1181 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1182    { (exit 1); exit 1; }; }
1183         ;;
1184   esac
1185 else
1186   { { echo "$as_me:1186: error: Release major-version value is empty" >&5
1187 echo "$as_me: error: Release major-version value is empty" >&2;}
1188    { (exit 1); exit 1; }; }
1189 fi
1190
1191 if test -n "$NCURSES_MINOR" ; then
1192   case $NCURSES_MINOR in #(vi
1193   [0-9]*) #(vi
1194         ;;
1195   *)
1196         { { echo "$as_me:1196: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1197 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1198    { (exit 1); exit 1; }; }
1199         ;;
1200   esac
1201 else
1202   { { echo "$as_me:1202: error: Release minor-version value is empty" >&5
1203 echo "$as_me: error: Release minor-version value is empty" >&2;}
1204    { (exit 1); exit 1; }; }
1205 fi
1206
1207 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1208
1209 # Check whether --with-abi-version or --without-abi-version was given.
1210 if test "${with_abi_version+set}" = set; then
1211   withval="$with_abi_version"
1212   { echo "$as_me:1212: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1213 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1214  cf_cv_abi_version=$withval
1215 fi;
1216
1217 if test -n "$cf_cv_abi_version" ; then
1218   case $cf_cv_abi_version in #(vi
1219   [0-9]*) #(vi
1220         ;;
1221   *)
1222         { { echo "$as_me:1222: error: ABI version is not a number: $cf_cv_abi_version" >&5
1223 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1224    { (exit 1); exit 1; }; }
1225         ;;
1226   esac
1227 else
1228   { { echo "$as_me:1228: error: ABI version value is empty" >&5
1229 echo "$as_me: error: ABI version value is empty" >&2;}
1230    { (exit 1); exit 1; }; }
1231 fi
1232
1233 ac_aux_dir=
1234 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1235   if test -f $ac_dir/install-sh; then
1236     ac_aux_dir=$ac_dir
1237     ac_install_sh="$ac_aux_dir/install-sh -c"
1238     break
1239   elif test -f $ac_dir/install.sh; then
1240     ac_aux_dir=$ac_dir
1241     ac_install_sh="$ac_aux_dir/install.sh -c"
1242     break
1243   elif test -f $ac_dir/shtool; then
1244     ac_aux_dir=$ac_dir
1245     ac_install_sh="$ac_aux_dir/shtool install -c"
1246     break
1247   fi
1248 done
1249 if test -z "$ac_aux_dir"; then
1250   { { echo "$as_me:1250: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1251 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1252    { (exit 1); exit 1; }; }
1253 fi
1254 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1255 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1256 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1257
1258 # Make sure we can run config.sub.
1259 $ac_config_sub sun4 >/dev/null 2>&1 ||
1260   { { echo "$as_me:1260: error: cannot run $ac_config_sub" >&5
1261 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1262    { (exit 1); exit 1; }; }
1263
1264 echo "$as_me:1264: checking build system type" >&5
1265 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1266 if test "${ac_cv_build+set}" = set; then
1267   echo $ECHO_N "(cached) $ECHO_C" >&6
1268 else
1269   ac_cv_build_alias=$build_alias
1270 test -z "$ac_cv_build_alias" &&
1271   ac_cv_build_alias=`$ac_config_guess`
1272 test -z "$ac_cv_build_alias" &&
1273   { { echo "$as_me:1273: error: cannot guess build type; you must specify one" >&5
1274 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1275    { (exit 1); exit 1; }; }
1276 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1277   { { echo "$as_me:1277: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1278 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1279    { (exit 1); exit 1; }; }
1280
1281 fi
1282 echo "$as_me:1282: result: $ac_cv_build" >&5
1283 echo "${ECHO_T}$ac_cv_build" >&6
1284 build=$ac_cv_build
1285 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1286 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1287 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1288
1289 echo "$as_me:1289: checking host system type" >&5
1290 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1291 if test "${ac_cv_host+set}" = set; then
1292   echo $ECHO_N "(cached) $ECHO_C" >&6
1293 else
1294   ac_cv_host_alias=$host_alias
1295 test -z "$ac_cv_host_alias" &&
1296   ac_cv_host_alias=$ac_cv_build_alias
1297 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1298   { { echo "$as_me:1298: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1299 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1300    { (exit 1); exit 1; }; }
1301
1302 fi
1303 echo "$as_me:1303: result: $ac_cv_host" >&5
1304 echo "${ECHO_T}$ac_cv_host" >&6
1305 host=$ac_cv_host
1306 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1307 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1308 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1309
1310 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1311         echo "$as_me:1311: checking target system type" >&5
1312 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1313 if test "${ac_cv_target+set}" = set; then
1314   echo $ECHO_N "(cached) $ECHO_C" >&6
1315 else
1316   ac_cv_target_alias=$target_alias
1317 test "x$ac_cv_target_alias" = "x" &&
1318   ac_cv_target_alias=$ac_cv_host_alias
1319 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1320   { { echo "$as_me:1320: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1321 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1322    { (exit 1); exit 1; }; }
1323
1324 fi
1325 echo "$as_me:1325: result: $ac_cv_target" >&5
1326 echo "${ECHO_T}$ac_cv_target" >&6
1327 target=$ac_cv_target
1328 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1329 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1330 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1331
1332 # The aliases save the names the user supplied, while $host etc.
1333 # will get canonicalized.
1334 test -n "$target_alias" &&
1335   test "$program_prefix$program_suffix$program_transform_name" = \
1336     NONENONEs,x,x, &&
1337   program_prefix=${target_alias}-
1338         system_name="$host_os"
1339 else
1340         system_name="`(uname -s -r) 2>/dev/null`"
1341         if test -z "$system_name" ; then
1342                 system_name="`(hostname) 2>/dev/null`"
1343         fi
1344 fi
1345 test -n "$system_name" &&
1346 cat >>confdefs.h <<EOF
1347 #define SYSTEM_NAME "$system_name"
1348 EOF
1349
1350 if test "${cf_cv_system_name+set}" = set; then
1351   echo $ECHO_N "(cached) $ECHO_C" >&6
1352 else
1353   cf_cv_system_name="$system_name"
1354 fi
1355
1356 test -z "$system_name" && system_name="$cf_cv_system_name"
1357 test -n "$cf_cv_system_name" && echo "$as_me:1357: result: Configuring for $cf_cv_system_name" >&5
1358 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1359
1360 if test ".$system_name" != ".$cf_cv_system_name" ; then
1361         echo "$as_me:1361: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1362 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1363         { { echo "$as_me:1363: error: \"Please remove config.cache and try again.\"" >&5
1364 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1365    { (exit 1); exit 1; }; }
1366 fi
1367
1368 # Check whether --with-system-type or --without-system-type was given.
1369 if test "${with_system_type+set}" = set; then
1370   withval="$with_system_type"
1371   { echo "$as_me:1371: WARNING: overriding system type to $withval" >&5
1372 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1373         cf_cv_system_name=$withval
1374         host_os=$withval
1375
1376 fi;
1377
1378 ###     Save the given $CFLAGS to allow user-override.
1379 cf_user_CFLAGS="$CFLAGS"
1380
1381 ###     Default install-location
1382
1383 echo "$as_me:1383: checking for prefix" >&5
1384 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1385 if test "x$prefix" = "xNONE" ; then
1386         case "$cf_cv_system_name" in
1387                 # non-vendor systems don't have a conflict
1388         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1389                 prefix=/usr
1390                 ;;
1391         *)      prefix=$ac_default_prefix
1392                 ;;
1393         esac
1394 fi
1395 echo "$as_me:1395: result: $prefix" >&5
1396 echo "${ECHO_T}$prefix" >&6
1397
1398 if test "x$prefix" = "xNONE" ; then
1399 echo "$as_me:1399: checking for default include-directory" >&5
1400 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1401 test -n "$verbose" && echo 1>&6
1402 for cf_symbol in \
1403         $includedir \
1404         $includedir/ncurses \
1405         $prefix/include \
1406         $prefix/include/ncurses \
1407         /usr/local/include \
1408         /usr/local/include/ncurses \
1409         /usr/include \
1410         /usr/include/ncurses
1411 do
1412         cf_dir=`eval echo $cf_symbol`
1413         if test -f $cf_dir/curses.h ; then
1414         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1415                 includedir="$cf_symbol"
1416                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1417                 break
1418         fi
1419         fi
1420         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1421 done
1422 echo "$as_me:1422: result: $includedir" >&5
1423 echo "${ECHO_T}$includedir" >&6
1424 fi
1425
1426 ###     Checks for programs.
1427
1428 # Check whether --with-ada or --without-ada was given.
1429 if test "${with_ada+set}" = set; then
1430   withval="$with_ada"
1431   cf_with_ada=$withval
1432 else
1433   cf_with_ada=yes
1434 fi;
1435 if test "x$cf_with_ada" = xyes
1436 then
1437         cf_PROG_CC="gnatgcc gcc cc"
1438 else
1439         cf_PROG_CC="gcc cc"
1440 fi
1441
1442 ac_ext=c
1443 ac_cpp='$CPP $CPPFLAGS'
1444 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1445 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1446 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1447 ac_main_return=return
1448 if test -n "$ac_tool_prefix"; then
1449   for ac_prog in $cf_PROG_CC
1450   do
1451     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1452 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1453 echo "$as_me:1453: checking for $ac_word" >&5
1454 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1455 if test "${ac_cv_prog_CC+set}" = set; then
1456   echo $ECHO_N "(cached) $ECHO_C" >&6
1457 else
1458   if test -n "$CC"; then
1459   ac_cv_prog_CC="$CC" # Let the user override the test.
1460 else
1461   ac_save_IFS=$IFS; IFS=$ac_path_separator
1462 ac_dummy="$PATH"
1463 for ac_dir in $ac_dummy; do
1464   IFS=$ac_save_IFS
1465   test -z "$ac_dir" && ac_dir=.
1466   $as_executable_p "$ac_dir/$ac_word" || continue
1467 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1468 echo "$as_me:1468: found $ac_dir/$ac_word" >&5
1469 break
1470 done
1471
1472 fi
1473 fi
1474 CC=$ac_cv_prog_CC
1475 if test -n "$CC"; then
1476   echo "$as_me:1476: result: $CC" >&5
1477 echo "${ECHO_T}$CC" >&6
1478 else
1479   echo "$as_me:1479: result: no" >&5
1480 echo "${ECHO_T}no" >&6
1481 fi
1482
1483     test -n "$CC" && break
1484   done
1485 fi
1486 if test -z "$CC"; then
1487   ac_ct_CC=$CC
1488   for ac_prog in $cf_PROG_CC
1489 do
1490   # Extract the first word of "$ac_prog", so it can be a program name with args.
1491 set dummy $ac_prog; ac_word=$2
1492 echo "$as_me:1492: checking for $ac_word" >&5
1493 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1494 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1495   echo $ECHO_N "(cached) $ECHO_C" >&6
1496 else
1497   if test -n "$ac_ct_CC"; then
1498   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1499 else
1500   ac_save_IFS=$IFS; IFS=$ac_path_separator
1501 ac_dummy="$PATH"
1502 for ac_dir in $ac_dummy; do
1503   IFS=$ac_save_IFS
1504   test -z "$ac_dir" && ac_dir=.
1505   $as_executable_p "$ac_dir/$ac_word" || continue
1506 ac_cv_prog_ac_ct_CC="$ac_prog"
1507 echo "$as_me:1507: found $ac_dir/$ac_word" >&5
1508 break
1509 done
1510
1511 fi
1512 fi
1513 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1514 if test -n "$ac_ct_CC"; then
1515   echo "$as_me:1515: result: $ac_ct_CC" >&5
1516 echo "${ECHO_T}$ac_ct_CC" >&6
1517 else
1518   echo "$as_me:1518: result: no" >&5
1519 echo "${ECHO_T}no" >&6
1520 fi
1521
1522   test -n "$ac_ct_CC" && break
1523 done
1524
1525   CC=$ac_ct_CC
1526 fi
1527
1528 test -z "$CC" && { { echo "$as_me:1528: error: no acceptable cc found in \$PATH" >&5
1529 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1530    { (exit 1); exit 1; }; }
1531
1532 # Provide some information about the compiler.
1533 echo "$as_me:1533:" \
1534      "checking for C compiler version" >&5
1535 ac_compiler=`set X $ac_compile; echo $2`
1536 { (eval echo "$as_me:1536: \"$ac_compiler --version </dev/null >&5\"") >&5
1537   (eval $ac_compiler --version </dev/null >&5) 2>&5
1538   ac_status=$?
1539   echo "$as_me:1539: \$? = $ac_status" >&5
1540   (exit $ac_status); }
1541 { (eval echo "$as_me:1541: \"$ac_compiler -v </dev/null >&5\"") >&5
1542   (eval $ac_compiler -v </dev/null >&5) 2>&5
1543   ac_status=$?
1544   echo "$as_me:1544: \$? = $ac_status" >&5
1545   (exit $ac_status); }
1546 { (eval echo "$as_me:1546: \"$ac_compiler -V </dev/null >&5\"") >&5
1547   (eval $ac_compiler -V </dev/null >&5) 2>&5
1548   ac_status=$?
1549   echo "$as_me:1549: \$? = $ac_status" >&5
1550   (exit $ac_status); }
1551
1552 cat >conftest.$ac_ext <<_ACEOF
1553 #line 1553 "configure"
1554 #include "confdefs.h"
1555
1556 int
1557 main ()
1558 {
1559
1560   ;
1561   return 0;
1562 }
1563 _ACEOF
1564 ac_clean_files_save=$ac_clean_files
1565 ac_clean_files="$ac_clean_files a.out a.exe"
1566 # Try to create an executable without -o first, disregard a.out.
1567 # It will help us diagnose broken compilers, and finding out an intuition
1568 # of exeext.
1569 echo "$as_me:1569: checking for C compiler default output" >&5
1570 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1571 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1572 if { (eval echo "$as_me:1572: \"$ac_link_default\"") >&5
1573   (eval $ac_link_default) 2>&5
1574   ac_status=$?
1575   echo "$as_me:1575: \$? = $ac_status" >&5
1576   (exit $ac_status); }; then
1577   # Find the output, starting from the most likely.  This scheme is
1578 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1579 # resort.
1580 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1581                 ls a.out conftest 2>/dev/null;
1582                 ls a.* conftest.* 2>/dev/null`; do
1583   case $ac_file in
1584     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1585     a.out ) # We found the default executable, but exeext='' is most
1586             # certainly right.
1587             break;;
1588     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1589           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1590           export ac_cv_exeext
1591           break;;
1592     * ) break;;
1593   esac
1594 done
1595 else
1596   echo "$as_me: failed program was:" >&5
1597 cat conftest.$ac_ext >&5
1598 { { echo "$as_me:1598: error: C compiler cannot create executables" >&5
1599 echo "$as_me: error: C compiler cannot create executables" >&2;}
1600    { (exit 77); exit 77; }; }
1601 fi
1602
1603 ac_exeext=$ac_cv_exeext
1604 echo "$as_me:1604: result: $ac_file" >&5
1605 echo "${ECHO_T}$ac_file" >&6
1606
1607 # Check the compiler produces executables we can run.  If not, either
1608 # the compiler is broken, or we cross compile.
1609 echo "$as_me:1609: checking whether the C compiler works" >&5
1610 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1611 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1612 # If not cross compiling, check that we can run a simple program.
1613 if test "$cross_compiling" != yes; then
1614   if { ac_try='./$ac_file'
1615   { (eval echo "$as_me:1615: \"$ac_try\"") >&5
1616   (eval $ac_try) 2>&5
1617   ac_status=$?
1618   echo "$as_me:1618: \$? = $ac_status" >&5
1619   (exit $ac_status); }; }; then
1620     cross_compiling=no
1621   else
1622     if test "$cross_compiling" = maybe; then
1623         cross_compiling=yes
1624     else
1625         { { echo "$as_me:1625: error: cannot run C compiled programs.
1626 If you meant to cross compile, use \`--host'." >&5
1627 echo "$as_me: error: cannot run C compiled programs.
1628 If you meant to cross compile, use \`--host'." >&2;}
1629    { (exit 1); exit 1; }; }
1630     fi
1631   fi
1632 fi
1633 echo "$as_me:1633: result: yes" >&5
1634 echo "${ECHO_T}yes" >&6
1635
1636 rm -f a.out a.exe conftest$ac_cv_exeext
1637 ac_clean_files=$ac_clean_files_save
1638 # Check the compiler produces executables we can run.  If not, either
1639 # the compiler is broken, or we cross compile.
1640 echo "$as_me:1640: checking whether we are cross compiling" >&5
1641 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1642 echo "$as_me:1642: result: $cross_compiling" >&5
1643 echo "${ECHO_T}$cross_compiling" >&6
1644
1645 echo "$as_me:1645: checking for executable suffix" >&5
1646 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1647 if { (eval echo "$as_me:1647: \"$ac_link\"") >&5
1648   (eval $ac_link) 2>&5
1649   ac_status=$?
1650   echo "$as_me:1650: \$? = $ac_status" >&5
1651   (exit $ac_status); }; then
1652   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1653 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1654 # work properly (i.e., refer to `conftest.exe'), while it won't with
1655 # `rm'.
1656 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1657   case $ac_file in
1658     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1659     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1660           export ac_cv_exeext
1661           break;;
1662     * ) break;;
1663   esac
1664 done
1665 else
1666   { { echo "$as_me:1666: error: cannot compute EXEEXT: cannot compile and link" >&5
1667 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1668    { (exit 1); exit 1; }; }
1669 fi
1670
1671 rm -f conftest$ac_cv_exeext
1672 echo "$as_me:1672: result: $ac_cv_exeext" >&5
1673 echo "${ECHO_T}$ac_cv_exeext" >&6
1674
1675 rm -f conftest.$ac_ext
1676 EXEEXT=$ac_cv_exeext
1677 ac_exeext=$EXEEXT
1678 echo "$as_me:1678: checking for object suffix" >&5
1679 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1680 if test "${ac_cv_objext+set}" = set; then
1681   echo $ECHO_N "(cached) $ECHO_C" >&6
1682 else
1683   cat >conftest.$ac_ext <<_ACEOF
1684 #line 1684 "configure"
1685 #include "confdefs.h"
1686
1687 int
1688 main ()
1689 {
1690
1691   ;
1692   return 0;
1693 }
1694 _ACEOF
1695 rm -f conftest.o conftest.obj
1696 if { (eval echo "$as_me:1696: \"$ac_compile\"") >&5
1697   (eval $ac_compile) 2>&5
1698   ac_status=$?
1699   echo "$as_me:1699: \$? = $ac_status" >&5
1700   (exit $ac_status); }; then
1701   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1702   case $ac_file in
1703     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1704     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1705        break;;
1706   esac
1707 done
1708 else
1709   echo "$as_me: failed program was:" >&5
1710 cat conftest.$ac_ext >&5
1711 { { echo "$as_me:1711: error: cannot compute OBJEXT: cannot compile" >&5
1712 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1713    { (exit 1); exit 1; }; }
1714 fi
1715
1716 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1717 fi
1718 echo "$as_me:1718: result: $ac_cv_objext" >&5
1719 echo "${ECHO_T}$ac_cv_objext" >&6
1720 OBJEXT=$ac_cv_objext
1721 ac_objext=$OBJEXT
1722 echo "$as_me:1722: checking whether we are using the GNU C compiler" >&5
1723 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1724 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1725   echo $ECHO_N "(cached) $ECHO_C" >&6
1726 else
1727   cat >conftest.$ac_ext <<_ACEOF
1728 #line 1728 "configure"
1729 #include "confdefs.h"
1730
1731 int
1732 main ()
1733 {
1734 #ifndef __GNUC__
1735        choke me
1736 #endif
1737
1738   ;
1739   return 0;
1740 }
1741 _ACEOF
1742 rm -f conftest.$ac_objext
1743 if { (eval echo "$as_me:1743: \"$ac_compile\"") >&5
1744   (eval $ac_compile) 2>&5
1745   ac_status=$?
1746   echo "$as_me:1746: \$? = $ac_status" >&5
1747   (exit $ac_status); } &&
1748          { ac_try='test -s conftest.$ac_objext'
1749   { (eval echo "$as_me:1749: \"$ac_try\"") >&5
1750   (eval $ac_try) 2>&5
1751   ac_status=$?
1752   echo "$as_me:1752: \$? = $ac_status" >&5
1753   (exit $ac_status); }; }; then
1754   ac_compiler_gnu=yes
1755 else
1756   echo "$as_me: failed program was:" >&5
1757 cat conftest.$ac_ext >&5
1758 ac_compiler_gnu=no
1759 fi
1760 rm -f conftest.$ac_objext conftest.$ac_ext
1761 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1762
1763 fi
1764 echo "$as_me:1764: result: $ac_cv_c_compiler_gnu" >&5
1765 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1766 GCC=`test $ac_compiler_gnu = yes && echo yes`
1767 ac_test_CFLAGS=${CFLAGS+set}
1768 ac_save_CFLAGS=$CFLAGS
1769 CFLAGS="-g"
1770 echo "$as_me:1770: checking whether $CC accepts -g" >&5
1771 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1772 if test "${ac_cv_prog_cc_g+set}" = set; then
1773   echo $ECHO_N "(cached) $ECHO_C" >&6
1774 else
1775   cat >conftest.$ac_ext <<_ACEOF
1776 #line 1776 "configure"
1777 #include "confdefs.h"
1778
1779 int
1780 main ()
1781 {
1782
1783   ;
1784   return 0;
1785 }
1786 _ACEOF
1787 rm -f conftest.$ac_objext
1788 if { (eval echo "$as_me:1788: \"$ac_compile\"") >&5
1789   (eval $ac_compile) 2>&5
1790   ac_status=$?
1791   echo "$as_me:1791: \$? = $ac_status" >&5
1792   (exit $ac_status); } &&
1793          { ac_try='test -s conftest.$ac_objext'
1794   { (eval echo "$as_me:1794: \"$ac_try\"") >&5
1795   (eval $ac_try) 2>&5
1796   ac_status=$?
1797   echo "$as_me:1797: \$? = $ac_status" >&5
1798   (exit $ac_status); }; }; then
1799   ac_cv_prog_cc_g=yes
1800 else
1801   echo "$as_me: failed program was:" >&5
1802 cat conftest.$ac_ext >&5
1803 ac_cv_prog_cc_g=no
1804 fi
1805 rm -f conftest.$ac_objext conftest.$ac_ext
1806 fi
1807 echo "$as_me:1807: result: $ac_cv_prog_cc_g" >&5
1808 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1809 if test "$ac_test_CFLAGS" = set; then
1810   CFLAGS=$ac_save_CFLAGS
1811 elif test $ac_cv_prog_cc_g = yes; then
1812   if test "$GCC" = yes; then
1813     CFLAGS="-g -O2"
1814   else
1815     CFLAGS="-g"
1816   fi
1817 else
1818   if test "$GCC" = yes; then
1819     CFLAGS="-O2"
1820   else
1821     CFLAGS=
1822   fi
1823 fi
1824 # Some people use a C++ compiler to compile C.  Since we use `exit',
1825 # in C++ we need to declare it.  In case someone uses the same compiler
1826 # for both compiling C and C++ we need to have the C++ compiler decide
1827 # the declaration of exit, since it's the most demanding environment.
1828 cat >conftest.$ac_ext <<_ACEOF
1829 #ifndef __cplusplus
1830   choke me
1831 #endif
1832 _ACEOF
1833 rm -f conftest.$ac_objext
1834 if { (eval echo "$as_me:1834: \"$ac_compile\"") >&5
1835   (eval $ac_compile) 2>&5
1836   ac_status=$?
1837   echo "$as_me:1837: \$? = $ac_status" >&5
1838   (exit $ac_status); } &&
1839          { ac_try='test -s conftest.$ac_objext'
1840   { (eval echo "$as_me:1840: \"$ac_try\"") >&5
1841   (eval $ac_try) 2>&5
1842   ac_status=$?
1843   echo "$as_me:1843: \$? = $ac_status" >&5
1844   (exit $ac_status); }; }; then
1845   for ac_declaration in \
1846    ''\
1847    '#include <stdlib.h>' \
1848    'extern "C" void std::exit (int) throw (); using std::exit;' \
1849    'extern "C" void std::exit (int); using std::exit;' \
1850    'extern "C" void exit (int) throw ();' \
1851    'extern "C" void exit (int);' \
1852    'void exit (int);'
1853 do
1854   cat >conftest.$ac_ext <<_ACEOF
1855 #line 1855 "configure"
1856 #include "confdefs.h"
1857 #include <stdlib.h>
1858 $ac_declaration
1859 int
1860 main ()
1861 {
1862 exit (42);
1863   ;
1864   return 0;
1865 }
1866 _ACEOF
1867 rm -f conftest.$ac_objext
1868 if { (eval echo "$as_me:1868: \"$ac_compile\"") >&5
1869   (eval $ac_compile) 2>&5
1870   ac_status=$?
1871   echo "$as_me:1871: \$? = $ac_status" >&5
1872   (exit $ac_status); } &&
1873          { ac_try='test -s conftest.$ac_objext'
1874   { (eval echo "$as_me:1874: \"$ac_try\"") >&5
1875   (eval $ac_try) 2>&5
1876   ac_status=$?
1877   echo "$as_me:1877: \$? = $ac_status" >&5
1878   (exit $ac_status); }; }; then
1879   :
1880 else
1881   echo "$as_me: failed program was:" >&5
1882 cat conftest.$ac_ext >&5
1883 continue
1884 fi
1885 rm -f conftest.$ac_objext conftest.$ac_ext
1886   cat >conftest.$ac_ext <<_ACEOF
1887 #line 1887 "configure"
1888 #include "confdefs.h"
1889 $ac_declaration
1890 int
1891 main ()
1892 {
1893 exit (42);
1894   ;
1895   return 0;
1896 }
1897 _ACEOF
1898 rm -f conftest.$ac_objext
1899 if { (eval echo "$as_me:1899: \"$ac_compile\"") >&5
1900   (eval $ac_compile) 2>&5
1901   ac_status=$?
1902   echo "$as_me:1902: \$? = $ac_status" >&5
1903   (exit $ac_status); } &&
1904          { ac_try='test -s conftest.$ac_objext'
1905   { (eval echo "$as_me:1905: \"$ac_try\"") >&5
1906   (eval $ac_try) 2>&5
1907   ac_status=$?
1908   echo "$as_me:1908: \$? = $ac_status" >&5
1909   (exit $ac_status); }; }; then
1910   break
1911 else
1912   echo "$as_me: failed program was:" >&5
1913 cat conftest.$ac_ext >&5
1914 fi
1915 rm -f conftest.$ac_objext conftest.$ac_ext
1916 done
1917 rm -rf conftest*
1918 if test -n "$ac_declaration"; then
1919   echo '#ifdef __cplusplus' >>confdefs.h
1920   echo $ac_declaration      >>confdefs.h
1921   echo '#endif'             >>confdefs.h
1922 fi
1923
1924 else
1925   echo "$as_me: failed program was:" >&5
1926 cat conftest.$ac_ext >&5
1927 fi
1928 rm -f conftest.$ac_objext conftest.$ac_ext
1929 ac_ext=c
1930 ac_cpp='$CPP $CPPFLAGS'
1931 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1932 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1933 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1934 ac_main_return=return
1935
1936 GCC_VERSION=none
1937 if test "$GCC" = yes ; then
1938         echo "$as_me:1938: checking version of $CC" >&5
1939 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1940         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1941         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1942         echo "$as_me:1942: result: $GCC_VERSION" >&5
1943 echo "${ECHO_T}$GCC_VERSION" >&6
1944 fi
1945
1946 echo "$as_me:1946: checking for $CC option to accept ANSI C" >&5
1947 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1948 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1949   echo $ECHO_N "(cached) $ECHO_C" >&6
1950 else
1951   ac_cv_prog_cc_stdc=no
1952 ac_save_CC=$CC
1953 cat >conftest.$ac_ext <<_ACEOF
1954 #line 1954 "configure"
1955 #include "confdefs.h"
1956 #include <stdarg.h>
1957 #include <stdio.h>
1958 #include <sys/types.h>
1959 #include <sys/stat.h>
1960 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1961 struct buf { int x; };
1962 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1963 static char *e (p, i)
1964      char **p;
1965      int i;
1966 {
1967   return p[i];
1968 }
1969 static char *f (char * (*g) (char **, int), char **p, ...)
1970 {
1971   char *s;
1972   va_list v;
1973   va_start (v,p);
1974   s = g (p, va_arg (v,int));
1975   va_end (v);
1976   return s;
1977 }
1978 int test (int i, double x);
1979 struct s1 {int (*f) (int a);};
1980 struct s2 {int (*f) (double a);};
1981 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1982 int argc;
1983 char **argv;
1984 int
1985 main ()
1986 {
1987 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1988   ;
1989   return 0;
1990 }
1991 _ACEOF
1992 # Don't try gcc -ansi; that turns off useful extensions and
1993 # breaks some systems' header files.
1994 # AIX                   -qlanglvl=ansi
1995 # Ultrix and OSF/1      -std1
1996 # HP-UX 10.20 and later -Ae
1997 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1998 # SVR4                  -Xc -D__EXTENSIONS__
1999 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2000 do
2001   CC="$ac_save_CC $ac_arg"
2002   rm -f conftest.$ac_objext
2003 if { (eval echo "$as_me:2003: \"$ac_compile\"") >&5
2004   (eval $ac_compile) 2>&5
2005   ac_status=$?
2006   echo "$as_me:2006: \$? = $ac_status" >&5
2007   (exit $ac_status); } &&
2008          { ac_try='test -s conftest.$ac_objext'
2009   { (eval echo "$as_me:2009: \"$ac_try\"") >&5
2010   (eval $ac_try) 2>&5
2011   ac_status=$?
2012   echo "$as_me:2012: \$? = $ac_status" >&5
2013   (exit $ac_status); }; }; then
2014   ac_cv_prog_cc_stdc=$ac_arg
2015 break
2016 else
2017   echo "$as_me: failed program was:" >&5
2018 cat conftest.$ac_ext >&5
2019 fi
2020 rm -f conftest.$ac_objext
2021 done
2022 rm -f conftest.$ac_ext conftest.$ac_objext
2023 CC=$ac_save_CC
2024
2025 fi
2026
2027 case "x$ac_cv_prog_cc_stdc" in
2028   x|xno)
2029     echo "$as_me:2029: result: none needed" >&5
2030 echo "${ECHO_T}none needed" >&6 ;;
2031   *)
2032     echo "$as_me:2032: result: $ac_cv_prog_cc_stdc" >&5
2033 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2034     CC="$CC $ac_cv_prog_cc_stdc" ;;
2035 esac
2036
2037 # This should have been defined by AC_PROG_CC
2038 : ${CC:=cc}
2039
2040 echo "$as_me:2040: checking \$CC variable" >&5
2041 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2042 case "$CC" in #(vi
2043 *[\ \   ]-[IUD]*)
2044         echo "$as_me:2044: result: broken" >&5
2045 echo "${ECHO_T}broken" >&6
2046         { echo "$as_me:2046: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2047 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2048         # humor him...
2049         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2050         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2051
2052 cf_fix_cppflags=no
2053 cf_new_cflags=
2054 cf_new_cppflags=
2055 cf_new_extra_cppflags=
2056
2057 for cf_add_cflags in $cf_flags
2058 do
2059 case $cf_fix_cppflags in
2060 no)
2061         case $cf_add_cflags in #(vi
2062         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2063                 case $cf_add_cflags in
2064                 -D*)
2065                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2066
2067                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2068                                 && test -z "${cf_tst_cflags}" \
2069                                 && cf_fix_cppflags=yes
2070
2071                         if test $cf_fix_cppflags = yes ; then
2072                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2073                                 continue
2074                         elif test "${cf_tst_cflags}" = "\"'" ; then
2075                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2076                                 continue
2077                         fi
2078                         ;;
2079                 esac
2080                 case "$CPPFLAGS" in
2081                 *$cf_add_cflags) #(vi
2082                         ;;
2083                 *) #(vi
2084                         case $cf_add_cflags in #(vi
2085                         -D*)
2086                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2087
2088 CPPFLAGS=`echo "$CPPFLAGS" | \
2089         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2090                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2091
2092                                 ;;
2093                         esac
2094                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2095                         ;;
2096                 esac
2097                 ;;
2098         *)
2099                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2100                 ;;
2101         esac
2102         ;;
2103 yes)
2104         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2105
2106         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2107
2108         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2109                 && test -z "${cf_tst_cflags}" \
2110                 && cf_fix_cppflags=no
2111         ;;
2112 esac
2113 done
2114
2115 if test -n "$cf_new_cflags" ; then
2116
2117         CFLAGS="$CFLAGS $cf_new_cflags"
2118 fi
2119
2120 if test -n "$cf_new_cppflags" ; then
2121
2122         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2123 fi
2124
2125 if test -n "$cf_new_extra_cppflags" ; then
2126
2127         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2128 fi
2129
2130         ;;
2131 *)
2132         echo "$as_me:2132: result: ok" >&5
2133 echo "${ECHO_T}ok" >&6
2134         ;;
2135 esac
2136
2137 ac_ext=c
2138 ac_cpp='$CPP $CPPFLAGS'
2139 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2140 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2141 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2142 ac_main_return=return
2143 echo "$as_me:2143: checking how to run the C preprocessor" >&5
2144 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2145 # On Suns, sometimes $CPP names a directory.
2146 if test -n "$CPP" && test -d "$CPP"; then
2147   CPP=
2148 fi
2149 if test -z "$CPP"; then
2150   if test "${ac_cv_prog_CPP+set}" = set; then
2151   echo $ECHO_N "(cached) $ECHO_C" >&6
2152 else
2153       # Double quotes because CPP needs to be expanded
2154     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2155     do
2156       ac_preproc_ok=false
2157 for ac_c_preproc_warn_flag in '' yes
2158 do
2159   # Use a header file that comes with gcc, so configuring glibc
2160   # with a fresh cross-compiler works.
2161   # On the NeXT, cc -E runs the code through the compiler's parser,
2162   # not just through cpp. "Syntax error" is here to catch this case.
2163   cat >conftest.$ac_ext <<_ACEOF
2164 #line 2164 "configure"
2165 #include "confdefs.h"
2166 #include <assert.h>
2167                      Syntax error
2168 _ACEOF
2169 if { (eval echo "$as_me:2169: \"$ac_cpp conftest.$ac_ext\"") >&5
2170   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2171   ac_status=$?
2172   egrep -v '^ *\+' conftest.er1 >conftest.err
2173   rm -f conftest.er1
2174   cat conftest.err >&5
2175   echo "$as_me:2175: \$? = $ac_status" >&5
2176   (exit $ac_status); } >/dev/null; then
2177   if test -s conftest.err; then
2178     ac_cpp_err=$ac_c_preproc_warn_flag
2179   else
2180     ac_cpp_err=
2181   fi
2182 else
2183   ac_cpp_err=yes
2184 fi
2185 if test -z "$ac_cpp_err"; then
2186   :
2187 else
2188   echo "$as_me: failed program was:" >&5
2189   cat conftest.$ac_ext >&5
2190   # Broken: fails on valid input.
2191 continue
2192 fi
2193 rm -f conftest.err conftest.$ac_ext
2194
2195   # OK, works on sane cases.  Now check whether non-existent headers
2196   # can be detected and how.
2197   cat >conftest.$ac_ext <<_ACEOF
2198 #line 2198 "configure"
2199 #include "confdefs.h"
2200 #include <ac_nonexistent.h>
2201 _ACEOF
2202 if { (eval echo "$as_me:2202: \"$ac_cpp conftest.$ac_ext\"") >&5
2203   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2204   ac_status=$?
2205   egrep -v '^ *\+' conftest.er1 >conftest.err
2206   rm -f conftest.er1
2207   cat conftest.err >&5
2208   echo "$as_me:2208: \$? = $ac_status" >&5
2209   (exit $ac_status); } >/dev/null; then
2210   if test -s conftest.err; then
2211     ac_cpp_err=$ac_c_preproc_warn_flag
2212   else
2213     ac_cpp_err=
2214   fi
2215 else
2216   ac_cpp_err=yes
2217 fi
2218 if test -z "$ac_cpp_err"; then
2219   # Broken: success on invalid input.
2220 continue
2221 else
2222   echo "$as_me: failed program was:" >&5
2223   cat conftest.$ac_ext >&5
2224   # Passes both tests.
2225 ac_preproc_ok=:
2226 break
2227 fi
2228 rm -f conftest.err conftest.$ac_ext
2229
2230 done
2231 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2232 rm -f conftest.err conftest.$ac_ext
2233 if $ac_preproc_ok; then
2234   break
2235 fi
2236
2237     done
2238     ac_cv_prog_CPP=$CPP
2239
2240 fi
2241   CPP=$ac_cv_prog_CPP
2242 else
2243   ac_cv_prog_CPP=$CPP
2244 fi
2245 echo "$as_me:2245: result: $CPP" >&5
2246 echo "${ECHO_T}$CPP" >&6
2247 ac_preproc_ok=false
2248 for ac_c_preproc_warn_flag in '' yes
2249 do
2250   # Use a header file that comes with gcc, so configuring glibc
2251   # with a fresh cross-compiler works.
2252   # On the NeXT, cc -E runs the code through the compiler's parser,
2253   # not just through cpp. "Syntax error" is here to catch this case.
2254   cat >conftest.$ac_ext <<_ACEOF
2255 #line 2255 "configure"
2256 #include "confdefs.h"
2257 #include <assert.h>
2258                      Syntax error
2259 _ACEOF
2260 if { (eval echo "$as_me:2260: \"$ac_cpp conftest.$ac_ext\"") >&5
2261   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2262   ac_status=$?
2263   egrep -v '^ *\+' conftest.er1 >conftest.err
2264   rm -f conftest.er1
2265   cat conftest.err >&5
2266   echo "$as_me:2266: \$? = $ac_status" >&5
2267   (exit $ac_status); } >/dev/null; then
2268   if test -s conftest.err; then
2269     ac_cpp_err=$ac_c_preproc_warn_flag
2270   else
2271     ac_cpp_err=
2272   fi
2273 else
2274   ac_cpp_err=yes
2275 fi
2276 if test -z "$ac_cpp_err"; then
2277   :
2278 else
2279   echo "$as_me: failed program was:" >&5
2280   cat conftest.$ac_ext >&5
2281   # Broken: fails on valid input.
2282 continue
2283 fi
2284 rm -f conftest.err conftest.$ac_ext
2285
2286   # OK, works on sane cases.  Now check whether non-existent headers
2287   # can be detected and how.
2288   cat >conftest.$ac_ext <<_ACEOF
2289 #line 2289 "configure"
2290 #include "confdefs.h"
2291 #include <ac_nonexistent.h>
2292 _ACEOF
2293 if { (eval echo "$as_me:2293: \"$ac_cpp conftest.$ac_ext\"") >&5
2294   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2295   ac_status=$?
2296   egrep -v '^ *\+' conftest.er1 >conftest.err
2297   rm -f conftest.er1
2298   cat conftest.err >&5
2299   echo "$as_me:2299: \$? = $ac_status" >&5
2300   (exit $ac_status); } >/dev/null; then
2301   if test -s conftest.err; then
2302     ac_cpp_err=$ac_c_preproc_warn_flag
2303   else
2304     ac_cpp_err=
2305   fi
2306 else
2307   ac_cpp_err=yes
2308 fi
2309 if test -z "$ac_cpp_err"; then
2310   # Broken: success on invalid input.
2311 continue
2312 else
2313   echo "$as_me: failed program was:" >&5
2314   cat conftest.$ac_ext >&5
2315   # Passes both tests.
2316 ac_preproc_ok=:
2317 break
2318 fi
2319 rm -f conftest.err conftest.$ac_ext
2320
2321 done
2322 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2323 rm -f conftest.err conftest.$ac_ext
2324 if $ac_preproc_ok; then
2325   :
2326 else
2327   { { echo "$as_me:2327: error: C preprocessor \"$CPP\" fails sanity check" >&5
2328 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2329    { (exit 1); exit 1; }; }
2330 fi
2331
2332 ac_ext=c
2333 ac_cpp='$CPP $CPPFLAGS'
2334 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2335 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2336 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2337 ac_main_return=return
2338
2339 if test $ac_cv_c_compiler_gnu = yes; then
2340     echo "$as_me:2340: checking whether $CC needs -traditional" >&5
2341 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2342 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2343   echo $ECHO_N "(cached) $ECHO_C" >&6
2344 else
2345     ac_pattern="Autoconf.*'x'"
2346   cat >conftest.$ac_ext <<_ACEOF
2347 #line 2347 "configure"
2348 #include "confdefs.h"
2349 #include <sgtty.h>
2350 int Autoconf = TIOCGETP;
2351 _ACEOF
2352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2353   egrep "$ac_pattern" >/dev/null 2>&1; then
2354   ac_cv_prog_gcc_traditional=yes
2355 else
2356   ac_cv_prog_gcc_traditional=no
2357 fi
2358 rm -rf conftest*
2359
2360   if test $ac_cv_prog_gcc_traditional = no; then
2361     cat >conftest.$ac_ext <<_ACEOF
2362 #line 2362 "configure"
2363 #include "confdefs.h"
2364 #include <termio.h>
2365 int Autoconf = TCGETA;
2366 _ACEOF
2367 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2368   egrep "$ac_pattern" >/dev/null 2>&1; then
2369   ac_cv_prog_gcc_traditional=yes
2370 fi
2371 rm -rf conftest*
2372
2373   fi
2374 fi
2375 echo "$as_me:2375: result: $ac_cv_prog_gcc_traditional" >&5
2376 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2377   if test $ac_cv_prog_gcc_traditional = yes; then
2378     CC="$CC -traditional"
2379   fi
2380 fi
2381
2382 echo "$as_me:2382: checking whether $CC understands -c and -o together" >&5
2383 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2384 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2385   echo $ECHO_N "(cached) $ECHO_C" >&6
2386 else
2387
2388 cat > conftest.$ac_ext <<CF_EOF
2389 #include <stdio.h>
2390 int main()
2391 {
2392         ${cf_cv_main_return:-return}(0);
2393 }
2394 CF_EOF
2395 # We do the test twice because some compilers refuse to overwrite an
2396 # existing .o file with -o, though they will create one.
2397 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2398 if { (eval echo "$as_me:2398: \"$ac_try\"") >&5
2399   (eval $ac_try) 2>&5
2400   ac_status=$?
2401   echo "$as_me:2401: \$? = $ac_status" >&5
2402   (exit $ac_status); } &&
2403   test -f conftest2.$ac_objext && { (eval echo "$as_me:2403: \"$ac_try\"") >&5
2404   (eval $ac_try) 2>&5
2405   ac_status=$?
2406   echo "$as_me:2406: \$? = $ac_status" >&5
2407   (exit $ac_status); };
2408 then
2409   eval cf_cv_prog_CC_c_o=yes
2410 else
2411   eval cf_cv_prog_CC_c_o=no
2412 fi
2413 rm -rf conftest*
2414
2415 fi
2416 if test $cf_cv_prog_CC_c_o = yes; then
2417   echo "$as_me:2417: result: yes" >&5
2418 echo "${ECHO_T}yes" >&6
2419 else
2420   echo "$as_me:2420: result: no" >&5
2421 echo "${ECHO_T}no" >&6
2422 fi
2423
2424 if test "$cross_compiling" = yes ; then
2425   LDCONFIG=:
2426 else
2427 case "$cf_cv_system_name" in #(vi
2428 dragonfly*|mirbsd*|freebsd*) #(vi
2429   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2430   ;;
2431 *) LDPATH=$PATH:/sbin:/usr/sbin
2432   # Extract the first word of "ldconfig", so it can be a program name with args.
2433 set dummy ldconfig; ac_word=$2
2434 echo "$as_me:2434: checking for $ac_word" >&5
2435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2436 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2437   echo $ECHO_N "(cached) $ECHO_C" >&6
2438 else
2439   case $LDCONFIG in
2440   [\\/]* | ?:[\\/]*)
2441   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2442   ;;
2443   *)
2444   ac_save_IFS=$IFS; IFS=$ac_path_separator
2445 ac_dummy="$LDPATH"
2446 for ac_dir in $ac_dummy; do
2447   IFS=$ac_save_IFS
2448   test -z "$ac_dir" && ac_dir=.
2449   if $as_executable_p "$ac_dir/$ac_word"; then
2450    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2451    echo "$as_me:2451: found $ac_dir/$ac_word" >&5
2452    break
2453 fi
2454 done
2455
2456   ;;
2457 esac
2458 fi
2459 LDCONFIG=$ac_cv_path_LDCONFIG
2460
2461 if test -n "$LDCONFIG"; then
2462   echo "$as_me:2462: result: $LDCONFIG" >&5
2463 echo "${ECHO_T}$LDCONFIG" >&6
2464 else
2465   echo "$as_me:2465: result: no" >&5
2466 echo "${ECHO_T}no" >&6
2467 fi
2468
2469   ;;
2470 esac
2471 fi
2472
2473 echo "$as_me:2473: checking if you want to ensure bool is consistent with C++" >&5
2474 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2475
2476 # Check whether --with-cxx or --without-cxx was given.
2477 if test "${with_cxx+set}" = set; then
2478   withval="$with_cxx"
2479   cf_with_cxx=$withval
2480 else
2481   cf_with_cxx=yes
2482 fi;
2483 echo "$as_me:2483: result: $cf_with_cxx" >&5
2484 echo "${ECHO_T}$cf_with_cxx" >&6
2485 if test "X$cf_with_cxx" = Xno ; then
2486         CXX=""
2487         GXX=""
2488 else
2489         # with autoconf 2.13, we can change the error to a warning:
2490                 ac_ext=cc
2491 ac_cpp='$CXXCPP $CPPFLAGS'
2492 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2493 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2494 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2495 ac_main_return=return
2496 if test -n "$ac_tool_prefix"; then
2497   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2498   do
2499     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2500 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2501 echo "$as_me:2501: checking for $ac_word" >&5
2502 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2503 if test "${ac_cv_prog_CXX+set}" = set; then
2504   echo $ECHO_N "(cached) $ECHO_C" >&6
2505 else
2506   if test -n "$CXX"; then
2507   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2508 else
2509   ac_save_IFS=$IFS; IFS=$ac_path_separator
2510 ac_dummy="$PATH"
2511 for ac_dir in $ac_dummy; do
2512   IFS=$ac_save_IFS
2513   test -z "$ac_dir" && ac_dir=.
2514   $as_executable_p "$ac_dir/$ac_word" || continue
2515 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2516 echo "$as_me:2516: found $ac_dir/$ac_word" >&5
2517 break
2518 done
2519
2520 fi
2521 fi
2522 CXX=$ac_cv_prog_CXX
2523 if test -n "$CXX"; then
2524   echo "$as_me:2524: result: $CXX" >&5
2525 echo "${ECHO_T}$CXX" >&6
2526 else
2527   echo "$as_me:2527: result: no" >&5
2528 echo "${ECHO_T}no" >&6
2529 fi
2530
2531     test -n "$CXX" && break
2532   done
2533 fi
2534 if test -z "$CXX"; then
2535   ac_ct_CXX=$CXX
2536   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2537 do
2538   # Extract the first word of "$ac_prog", so it can be a program name with args.
2539 set dummy $ac_prog; ac_word=$2
2540 echo "$as_me:2540: checking for $ac_word" >&5
2541 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2542 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2543   echo $ECHO_N "(cached) $ECHO_C" >&6
2544 else
2545   if test -n "$ac_ct_CXX"; then
2546   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2547 else
2548   ac_save_IFS=$IFS; IFS=$ac_path_separator
2549 ac_dummy="$PATH"
2550 for ac_dir in $ac_dummy; do
2551   IFS=$ac_save_IFS
2552   test -z "$ac_dir" && ac_dir=.
2553   $as_executable_p "$ac_dir/$ac_word" || continue
2554 ac_cv_prog_ac_ct_CXX="$ac_prog"
2555 echo "$as_me:2555: found $ac_dir/$ac_word" >&5
2556 break
2557 done
2558
2559 fi
2560 fi
2561 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2562 if test -n "$ac_ct_CXX"; then
2563   echo "$as_me:2563: result: $ac_ct_CXX" >&5
2564 echo "${ECHO_T}$ac_ct_CXX" >&6
2565 else
2566   echo "$as_me:2566: result: no" >&5
2567 echo "${ECHO_T}no" >&6
2568 fi
2569
2570   test -n "$ac_ct_CXX" && break
2571 done
2572 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2573
2574   CXX=$ac_ct_CXX
2575 fi
2576
2577 # Provide some information about the compiler.
2578 echo "$as_me:2578:" \
2579      "checking for C++ compiler version" >&5
2580 ac_compiler=`set X $ac_compile; echo $2`
2581 { (eval echo "$as_me:2581: \"$ac_compiler --version </dev/null >&5\"") >&5
2582   (eval $ac_compiler --version </dev/null >&5) 2>&5
2583   ac_status=$?
2584   echo "$as_me:2584: \$? = $ac_status" >&5
2585   (exit $ac_status); }
2586 { (eval echo "$as_me:2586: \"$ac_compiler -v </dev/null >&5\"") >&5
2587   (eval $ac_compiler -v </dev/null >&5) 2>&5
2588   ac_status=$?
2589   echo "$as_me:2589: \$? = $ac_status" >&5
2590   (exit $ac_status); }
2591 { (eval echo "$as_me:2591: \"$ac_compiler -V </dev/null >&5\"") >&5
2592   (eval $ac_compiler -V </dev/null >&5) 2>&5
2593   ac_status=$?
2594   echo "$as_me:2594: \$? = $ac_status" >&5
2595   (exit $ac_status); }
2596
2597 echo "$as_me:2597: checking whether we are using the GNU C++ compiler" >&5
2598 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2599 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2600   echo $ECHO_N "(cached) $ECHO_C" >&6
2601 else
2602   cat >conftest.$ac_ext <<_ACEOF
2603 #line 2603 "configure"
2604 #include "confdefs.h"
2605
2606 int
2607 main ()
2608 {
2609 #ifndef __GNUC__
2610        choke me
2611 #endif
2612
2613   ;
2614   return 0;
2615 }
2616 _ACEOF
2617 rm -f conftest.$ac_objext
2618 if { (eval echo "$as_me:2618: \"$ac_compile\"") >&5
2619   (eval $ac_compile) 2>&5
2620   ac_status=$?
2621   echo "$as_me:2621: \$? = $ac_status" >&5
2622   (exit $ac_status); } &&
2623          { ac_try='test -s conftest.$ac_objext'
2624   { (eval echo "$as_me:2624: \"$ac_try\"") >&5
2625   (eval $ac_try) 2>&5
2626   ac_status=$?
2627   echo "$as_me:2627: \$? = $ac_status" >&5
2628   (exit $ac_status); }; }; then
2629   ac_compiler_gnu=yes
2630 else
2631   echo "$as_me: failed program was:" >&5
2632 cat conftest.$ac_ext >&5
2633 ac_compiler_gnu=no
2634 fi
2635 rm -f conftest.$ac_objext conftest.$ac_ext
2636 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2637
2638 fi
2639 echo "$as_me:2639: result: $ac_cv_cxx_compiler_gnu" >&5
2640 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2641 GXX=`test $ac_compiler_gnu = yes && echo yes`
2642 ac_test_CXXFLAGS=${CXXFLAGS+set}
2643 ac_save_CXXFLAGS=$CXXFLAGS
2644 CXXFLAGS="-g"
2645 echo "$as_me:2645: checking whether $CXX accepts -g" >&5
2646 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2647 if test "${ac_cv_prog_cxx_g+set}" = set; then
2648   echo $ECHO_N "(cached) $ECHO_C" >&6
2649 else
2650   cat >conftest.$ac_ext <<_ACEOF
2651 #line 2651 "configure"
2652 #include "confdefs.h"
2653
2654 int
2655 main ()
2656 {
2657
2658   ;
2659   return 0;
2660 }
2661 _ACEOF
2662 rm -f conftest.$ac_objext
2663 if { (eval echo "$as_me:2663: \"$ac_compile\"") >&5
2664   (eval $ac_compile) 2>&5
2665   ac_status=$?
2666   echo "$as_me:2666: \$? = $ac_status" >&5
2667   (exit $ac_status); } &&
2668          { ac_try='test -s conftest.$ac_objext'
2669   { (eval echo "$as_me:2669: \"$ac_try\"") >&5
2670   (eval $ac_try) 2>&5
2671   ac_status=$?
2672   echo "$as_me:2672: \$? = $ac_status" >&5
2673   (exit $ac_status); }; }; then
2674   ac_cv_prog_cxx_g=yes
2675 else
2676   echo "$as_me: failed program was:" >&5
2677 cat conftest.$ac_ext >&5
2678 ac_cv_prog_cxx_g=no
2679 fi
2680 rm -f conftest.$ac_objext conftest.$ac_ext
2681 fi
2682 echo "$as_me:2682: result: $ac_cv_prog_cxx_g" >&5
2683 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2684 if test "$ac_test_CXXFLAGS" = set; then
2685   CXXFLAGS=$ac_save_CXXFLAGS
2686 elif test $ac_cv_prog_cxx_g = yes; then
2687   if test "$GXX" = yes; then
2688     CXXFLAGS="-g -O2"
2689   else
2690     CXXFLAGS="-g"
2691   fi
2692 else
2693   if test "$GXX" = yes; then
2694     CXXFLAGS="-O2"
2695   else
2696     CXXFLAGS=
2697   fi
2698 fi
2699 for ac_declaration in \
2700    ''\
2701    '#include <stdlib.h>' \
2702    'extern "C" void std::exit (int) throw (); using std::exit;' \
2703    'extern "C" void std::exit (int); using std::exit;' \
2704    'extern "C" void exit (int) throw ();' \
2705    'extern "C" void exit (int);' \
2706    'void exit (int);'
2707 do
2708   cat >conftest.$ac_ext <<_ACEOF
2709 #line 2709 "configure"
2710 #include "confdefs.h"
2711 #include <stdlib.h>
2712 $ac_declaration
2713 int
2714 main ()
2715 {
2716 exit (42);
2717   ;
2718   return 0;
2719 }
2720 _ACEOF
2721 rm -f conftest.$ac_objext
2722 if { (eval echo "$as_me:2722: \"$ac_compile\"") >&5
2723   (eval $ac_compile) 2>&5
2724   ac_status=$?
2725   echo "$as_me:2725: \$? = $ac_status" >&5
2726   (exit $ac_status); } &&
2727          { ac_try='test -s conftest.$ac_objext'
2728   { (eval echo "$as_me:2728: \"$ac_try\"") >&5
2729   (eval $ac_try) 2>&5
2730   ac_status=$?
2731   echo "$as_me:2731: \$? = $ac_status" >&5
2732   (exit $ac_status); }; }; then
2733   :
2734 else
2735   echo "$as_me: failed program was:" >&5
2736 cat conftest.$ac_ext >&5
2737 continue
2738 fi
2739 rm -f conftest.$ac_objext conftest.$ac_ext
2740   cat >conftest.$ac_ext <<_ACEOF
2741 #line 2741 "configure"
2742 #include "confdefs.h"
2743 $ac_declaration
2744 int
2745 main ()
2746 {
2747 exit (42);
2748   ;
2749   return 0;
2750 }
2751 _ACEOF
2752 rm -f conftest.$ac_objext
2753 if { (eval echo "$as_me:2753: \"$ac_compile\"") >&5
2754   (eval $ac_compile) 2>&5
2755   ac_status=$?
2756   echo "$as_me:2756: \$? = $ac_status" >&5
2757   (exit $ac_status); } &&
2758          { ac_try='test -s conftest.$ac_objext'
2759   { (eval echo "$as_me:2759: \"$ac_try\"") >&5
2760   (eval $ac_try) 2>&5
2761   ac_status=$?
2762   echo "$as_me:2762: \$? = $ac_status" >&5
2763   (exit $ac_status); }; }; then
2764   break
2765 else
2766   echo "$as_me: failed program was:" >&5
2767 cat conftest.$ac_ext >&5
2768 fi
2769 rm -f conftest.$ac_objext conftest.$ac_ext
2770 done
2771 rm -rf conftest*
2772 if test -n "$ac_declaration"; then
2773   echo '#ifdef __cplusplus' >>confdefs.h
2774   echo $ac_declaration      >>confdefs.h
2775   echo '#endif'             >>confdefs.h
2776 fi
2777
2778 ac_ext=c
2779 ac_cpp='$CPP $CPPFLAGS'
2780 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2781 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2782 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2783 ac_main_return=return
2784
2785                 # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2786         if test "$CXX" = "g++" ; then
2787                 # Extract the first word of "g++", so it can be a program name with args.
2788 set dummy g++; ac_word=$2
2789 echo "$as_me:2789: checking for $ac_word" >&5
2790 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2791 if test "${ac_cv_path_CXX+set}" = set; then
2792   echo $ECHO_N "(cached) $ECHO_C" >&6
2793 else
2794   case $CXX in
2795   [\\/]* | ?:[\\/]*)
2796   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2797   ;;
2798   *)
2799   ac_save_IFS=$IFS; IFS=$ac_path_separator
2800 ac_dummy="$PATH"
2801 for ac_dir in $ac_dummy; do
2802   IFS=$ac_save_IFS
2803   test -z "$ac_dir" && ac_dir=.
2804   if $as_executable_p "$ac_dir/$ac_word"; then
2805    ac_cv_path_CXX="$ac_dir/$ac_word"
2806    echo "$as_me:2806: found $ac_dir/$ac_word" >&5
2807    break
2808 fi
2809 done
2810
2811   ;;
2812 esac
2813 fi
2814 CXX=$ac_cv_path_CXX
2815
2816 if test -n "$CXX"; then
2817   echo "$as_me:2817: result: $CXX" >&5
2818 echo "${ECHO_T}$CXX" >&6
2819 else
2820   echo "$as_me:2820: result: no" >&5
2821 echo "${ECHO_T}no" >&6
2822 fi
2823
2824         fi
2825         case "x$CXX" in #(vi
2826         x|xg++)
2827                 { echo "$as_me:2827: WARNING: You don't have any C++ compiler, too bad" >&5
2828 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2829                 cf_with_cxx=no; CXX=""; GXX="";
2830                 ;;
2831         esac
2832 fi
2833
2834 GXX_VERSION=none
2835 if test "$GXX" = yes; then
2836         echo "$as_me:2836: checking version of ${CXX:-g++}" >&5
2837 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2838         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2839         test -z "$GXX_VERSION" && GXX_VERSION=unknown
2840         echo "$as_me:2840: result: $GXX_VERSION" >&5
2841 echo "${ECHO_T}$GXX_VERSION" >&6
2842 fi
2843
2844 case $GXX_VERSION in
2845 1*|2.[0-6]*)
2846         # GXX=""; CXX=""; ac_cv_prog_gxx=no
2847         # cf_cxx_library=no
2848         { echo "$as_me:2848: WARNING: templates do not work" >&5
2849 echo "$as_me: WARNING: templates do not work" >&2;}
2850         ;;
2851 esac
2852
2853 echo "$as_me:2853: checking if you want to build C++ binding and demo" >&5
2854 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
2855
2856 # Check whether --with-cxx-binding or --without-cxx-binding was given.
2857 if test "${with_cxx_binding+set}" = set; then
2858   withval="$with_cxx_binding"
2859   cf_with_cxx_binding=$withval
2860 else
2861   cf_with_cxx_binding=$cf_with_cxx
2862 fi;
2863 echo "$as_me:2863: result: $cf_with_cxx_binding" >&5
2864 echo "${ECHO_T}$cf_with_cxx_binding" >&6
2865
2866 echo "$as_me:2866: checking if you want to build with Ada95" >&5
2867 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
2868 echo "$as_me:2868: result: $cf_with_ada" >&5
2869 echo "${ECHO_T}$cf_with_ada" >&6
2870
2871 echo "$as_me:2871: checking if you want to install terminal database" >&5
2872 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
2873
2874 # Check whether --enable-db-install or --disable-db-install was given.
2875 if test "${enable_db_install+set}" = set; then
2876   enableval="$enable_db_install"
2877   cf_with_db_install=$enableval
2878 else
2879   cf_with_db_install=yes
2880 fi;
2881 echo "$as_me:2881: result: $cf_with_db_install" >&5
2882 echo "${ECHO_T}$cf_with_db_install" >&6
2883
2884 echo "$as_me:2884: checking if you want to install manpages" >&5
2885 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
2886
2887 # Check whether --with-manpages or --without-manpages was given.
2888 if test "${with_manpages+set}" = set; then
2889   withval="$with_manpages"
2890   cf_with_manpages=$withval
2891 else
2892   cf_with_manpages=yes
2893 fi;
2894 echo "$as_me:2894: result: $cf_with_manpages" >&5
2895 echo "${ECHO_T}$cf_with_manpages" >&6
2896
2897 echo "$as_me:2897: checking if you want to build programs such as tic" >&5
2898 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
2899
2900 # Check whether --with-progs or --without-progs was given.
2901 if test "${with_progs+set}" = set; then
2902   withval="$with_progs"
2903   cf_with_progs=$withval
2904 else
2905   cf_with_progs=yes
2906 fi;
2907 echo "$as_me:2907: result: $cf_with_progs" >&5
2908 echo "${ECHO_T}$cf_with_progs" >&6
2909
2910 echo "$as_me:2910: checking if you want to build test-programs" >&5
2911 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2912
2913 # Check whether --with-tests or --without-tests was given.
2914 if test "${with_tests+set}" = set; then
2915   withval="$with_tests"
2916   cf_with_tests=$withval
2917 else
2918   cf_with_tests=yes
2919 fi;
2920 echo "$as_me:2920: result: $cf_with_tests" >&5
2921 echo "${ECHO_T}$cf_with_tests" >&6
2922
2923 echo "$as_me:2923: checking if you wish to install curses.h" >&5
2924 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
2925
2926 # Check whether --with-curses-h or --without-curses-h was given.
2927 if test "${with_curses_h+set}" = set; then
2928   withval="$with_curses_h"
2929   with_curses_h=$withval
2930 else
2931   with_curses_h=yes
2932 fi;
2933 echo "$as_me:2933: result: $with_curses_h" >&5
2934 echo "${ECHO_T}$with_curses_h" >&6
2935
2936 modules_to_build="ncurses"
2937 if test "X$cf_with_progs" != Xno ; then
2938 modules_to_build="$modules_to_build progs tack"
2939 fi
2940 modules_to_build="$modules_to_build panel menu form"
2941
2942 test "$program_prefix" != NONE &&
2943   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2944 # Use a double $ so make ignores it.
2945 test "$program_suffix" != NONE &&
2946   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2947 # Double any \ or $.  echo might interpret backslashes.
2948 # By default was `s,x,x', remove it if useless.
2949 cat <<\_ACEOF >conftest.sed
2950 s/[\\$]/&&/g;s/;s,x,x,$//
2951 _ACEOF
2952 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2953 rm conftest.sed
2954
2955 for ac_prog in mawk gawk nawk awk
2956 do
2957   # Extract the first word of "$ac_prog", so it can be a program name with args.
2958 set dummy $ac_prog; ac_word=$2
2959 echo "$as_me:2959: checking for $ac_word" >&5
2960 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2961 if test "${ac_cv_prog_AWK+set}" = set; then
2962   echo $ECHO_N "(cached) $ECHO_C" >&6
2963 else
2964   if test -n "$AWK"; then
2965   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2966 else
2967   ac_save_IFS=$IFS; IFS=$ac_path_separator
2968 ac_dummy="$PATH"
2969 for ac_dir in $ac_dummy; do
2970   IFS=$ac_save_IFS
2971   test -z "$ac_dir" && ac_dir=.
2972   $as_executable_p "$ac_dir/$ac_word" || continue
2973 ac_cv_prog_AWK="$ac_prog"
2974 echo "$as_me:2974: found $ac_dir/$ac_word" >&5
2975 break
2976 done
2977
2978 fi
2979 fi
2980 AWK=$ac_cv_prog_AWK
2981 if test -n "$AWK"; then
2982   echo "$as_me:2982: result: $AWK" >&5
2983 echo "${ECHO_T}$AWK" >&6
2984 else
2985   echo "$as_me:2985: result: no" >&5
2986 echo "${ECHO_T}no" >&6
2987 fi
2988
2989   test -n "$AWK" && break
2990 done
2991
2992 test -z "$AWK" && { { echo "$as_me:2992: error: No awk program found" >&5
2993 echo "$as_me: error: No awk program found" >&2;}
2994    { (exit 1); exit 1; }; }
2995
2996 echo "$as_me:2996: checking for egrep" >&5
2997 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2998 if test "${ac_cv_prog_egrep+set}" = set; then
2999   echo $ECHO_N "(cached) $ECHO_C" >&6
3000 else
3001   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3002     then ac_cv_prog_egrep='grep -E'
3003     else ac_cv_prog_egrep='egrep'
3004     fi
3005 fi
3006 echo "$as_me:3006: result: $ac_cv_prog_egrep" >&5
3007 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3008  EGREP=$ac_cv_prog_egrep
3009
3010 test -z "$EGREP" && { { echo "$as_me:3010: error: No egrep program found" >&5
3011 echo "$as_me: error: No egrep program found" >&2;}
3012    { (exit 1); exit 1; }; }
3013
3014 # Find a good install program.  We prefer a C program (faster),
3015 # so one script is as good as another.  But avoid the broken or
3016 # incompatible versions:
3017 # SysV /etc/install, /usr/sbin/install
3018 # SunOS /usr/etc/install
3019 # IRIX /sbin/install
3020 # AIX /bin/install
3021 # AmigaOS /C/install, which installs bootblocks on floppy discs
3022 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3023 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3024 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3025 # ./install, which can be erroneously created by make from ./install.sh.
3026 echo "$as_me:3026: checking for a BSD compatible install" >&5
3027 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3028 if test -z "$INSTALL"; then
3029 if test "${ac_cv_path_install+set}" = set; then
3030   echo $ECHO_N "(cached) $ECHO_C" >&6
3031 else
3032     ac_save_IFS=$IFS; IFS=$ac_path_separator
3033   for ac_dir in $PATH; do
3034     IFS=$ac_save_IFS
3035     # Account for people who put trailing slashes in PATH elements.
3036     case $ac_dir/ in
3037     / | ./ | .// | /cC/* \
3038     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3039     | /usr/ucb/* ) ;;
3040     *)
3041       # OSF1 and SCO ODT 3.0 have their own names for install.
3042       # Don't use installbsd from OSF since it installs stuff as root
3043       # by default.
3044       for ac_prog in ginstall scoinst install; do
3045         if $as_executable_p "$ac_dir/$ac_prog"; then
3046           if test $ac_prog = install &&
3047             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3048             # AIX install.  It has an incompatible calling convention.
3049             :
3050           elif test $ac_prog = install &&
3051             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3052             # program-specific install script used by HP pwplus--don't use.
3053             :
3054           else
3055             ac_cv_path_install="$ac_dir/$ac_prog -c"
3056             break 2
3057           fi
3058         fi
3059       done
3060       ;;
3061     esac
3062   done
3063
3064 fi
3065   if test "${ac_cv_path_install+set}" = set; then
3066     INSTALL=$ac_cv_path_install
3067   else
3068     # As a last resort, use the slow shell script.  We don't cache a
3069     # path for INSTALL within a source directory, because that will
3070     # break other packages using the cache if that directory is
3071     # removed, or if the path is relative.
3072     INSTALL=$ac_install_sh
3073   fi
3074 fi
3075 echo "$as_me:3075: result: $INSTALL" >&5
3076 echo "${ECHO_T}$INSTALL" >&6
3077
3078 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3079 # It thinks the first close brace ends the variable substitution.
3080 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3081
3082 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3083
3084 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3085
3086 case $INSTALL in
3087 /*)
3088   ;;
3089 *)
3090   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3091   test -z "$cf_dir" && cf_dir=.
3092   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3093   ;;
3094 esac
3095
3096 for ac_prog in tdlint lint alint splint lclint
3097 do
3098   # Extract the first word of "$ac_prog", so it can be a program name with args.
3099 set dummy $ac_prog; ac_word=$2
3100 echo "$as_me:3100: checking for $ac_word" >&5
3101 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3102 if test "${ac_cv_prog_LINT+set}" = set; then
3103   echo $ECHO_N "(cached) $ECHO_C" >&6
3104 else
3105   if test -n "$LINT"; then
3106   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3107 else
3108   ac_save_IFS=$IFS; IFS=$ac_path_separator
3109 ac_dummy="$PATH"
3110 for ac_dir in $ac_dummy; do
3111   IFS=$ac_save_IFS
3112   test -z "$ac_dir" && ac_dir=.
3113   $as_executable_p "$ac_dir/$ac_word" || continue
3114 ac_cv_prog_LINT="$ac_prog"
3115 echo "$as_me:3115: found $ac_dir/$ac_word" >&5
3116 break
3117 done
3118
3119 fi
3120 fi
3121 LINT=$ac_cv_prog_LINT
3122 if test -n "$LINT"; then
3123   echo "$as_me:3123: result: $LINT" >&5
3124 echo "${ECHO_T}$LINT" >&6
3125 else
3126   echo "$as_me:3126: result: no" >&5
3127 echo "${ECHO_T}no" >&6
3128 fi
3129
3130   test -n "$LINT" && break
3131 done
3132
3133 echo "$as_me:3133: checking whether ln -s works" >&5
3134 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3135 LN_S=$as_ln_s
3136 if test "$LN_S" = "ln -s"; then
3137   echo "$as_me:3137: result: yes" >&5
3138 echo "${ECHO_T}yes" >&6
3139 else
3140   echo "$as_me:3140: result: no, using $LN_S" >&5
3141 echo "${ECHO_T}no, using $LN_S" >&6
3142 fi
3143
3144 echo "$as_me:3144: checking if $LN_S -f options work" >&5
3145 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3146
3147 rm -f conf$$.src conf$$dst
3148 echo >conf$$.dst
3149 echo first >conf$$.src
3150 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3151         cf_prog_ln_sf=yes
3152 else
3153         cf_prog_ln_sf=no
3154 fi
3155 rm -f conf$$.dst conf$$src
3156 echo "$as_me:3156: result: $cf_prog_ln_sf" >&5
3157 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3158
3159 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3160
3161 echo "$as_me:3161: checking for long file names" >&5
3162 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3163 if test "${ac_cv_sys_long_file_names+set}" = set; then
3164   echo $ECHO_N "(cached) $ECHO_C" >&6
3165 else
3166   ac_cv_sys_long_file_names=yes
3167 # Test for long file names in all the places we know might matter:
3168 #      .                the current directory, where building will happen
3169 #      $prefix/lib      where we will be installing things
3170 #      $exec_prefix/lib likewise
3171 # eval it to expand exec_prefix.
3172 #      $TMPDIR          if set, where it might want to write temporary files
3173 # if $TMPDIR is not set:
3174 #      /tmp             where it might want to write temporary files
3175 #      /var/tmp         likewise
3176 #      /usr/tmp         likewise
3177 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3178   ac_tmpdirs=$TMPDIR
3179 else
3180   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3181 fi
3182 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3183   test -d $ac_dir || continue
3184   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3185   ac_xdir=$ac_dir/cf$$
3186   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3187   ac_tf1=$ac_xdir/conftest9012345
3188   ac_tf2=$ac_xdir/conftest9012346
3189   (echo 1 >$ac_tf1) 2>/dev/null
3190   (echo 2 >$ac_tf2) 2>/dev/null
3191   ac_val=`cat $ac_tf1 2>/dev/null`
3192   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3193     ac_cv_sys_long_file_names=no
3194     rm -rf $ac_xdir 2>/dev/null
3195     break
3196   fi
3197   rm -rf $ac_xdir 2>/dev/null
3198 done
3199 fi
3200 echo "$as_me:3200: result: $ac_cv_sys_long_file_names" >&5
3201 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3202 if test $ac_cv_sys_long_file_names = yes; then
3203
3204 cat >>confdefs.h <<\EOF
3205 #define HAVE_LONG_FILE_NAMES 1
3206 EOF
3207
3208 fi
3209
3210 # if we find pkg-config, check if we should install the ".pc" files.
3211
3212 echo "$as_me:3212: checking if you want to use pkg-config" >&5
3213 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3214
3215 # Check whether --with-pkg-config or --without-pkg-config was given.
3216 if test "${with_pkg_config+set}" = set; then
3217   withval="$with_pkg_config"
3218   cf_pkg_config=$withval
3219 else
3220   cf_pkg_config=yes
3221 fi;
3222 echo "$as_me:3222: result: $cf_pkg_config" >&5
3223 echo "${ECHO_T}$cf_pkg_config" >&6
3224
3225 case $cf_pkg_config in #(vi
3226 no) #(vi
3227         PKG_CONFIG=none
3228         ;;
3229 yes) #(vi
3230
3231 if test -n "$ac_tool_prefix"; then
3232   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3233 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3234 echo "$as_me:3234: checking for $ac_word" >&5
3235 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3236 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3237   echo $ECHO_N "(cached) $ECHO_C" >&6
3238 else
3239   case $PKG_CONFIG in
3240   [\\/]* | ?:[\\/]*)
3241   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3242   ;;
3243   *)
3244   ac_save_IFS=$IFS; IFS=$ac_path_separator
3245 ac_dummy="$PATH"
3246 for ac_dir in $ac_dummy; do
3247   IFS=$ac_save_IFS
3248   test -z "$ac_dir" && ac_dir=.
3249   if $as_executable_p "$ac_dir/$ac_word"; then
3250    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3251    echo "$as_me:3251: found $ac_dir/$ac_word" >&5
3252    break
3253 fi
3254 done
3255
3256   ;;
3257 esac
3258 fi
3259 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3260
3261 if test -n "$PKG_CONFIG"; then
3262   echo "$as_me:3262: result: $PKG_CONFIG" >&5
3263 echo "${ECHO_T}$PKG_CONFIG" >&6
3264 else
3265   echo "$as_me:3265: result: no" >&5
3266 echo "${ECHO_T}no" >&6
3267 fi
3268
3269 fi
3270 if test -z "$ac_cv_path_PKG_CONFIG"; then
3271   ac_pt_PKG_CONFIG=$PKG_CONFIG
3272   # Extract the first word of "pkg-config", so it can be a program name with args.
3273 set dummy pkg-config; ac_word=$2
3274 echo "$as_me:3274: checking for $ac_word" >&5
3275 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3276 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3277   echo $ECHO_N "(cached) $ECHO_C" >&6
3278 else
3279   case $ac_pt_PKG_CONFIG in
3280   [\\/]* | ?:[\\/]*)
3281   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3282   ;;
3283   *)
3284   ac_save_IFS=$IFS; IFS=$ac_path_separator
3285 ac_dummy="$PATH"
3286 for ac_dir in $ac_dummy; do
3287   IFS=$ac_save_IFS
3288   test -z "$ac_dir" && ac_dir=.
3289   if $as_executable_p "$ac_dir/$ac_word"; then
3290    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3291    echo "$as_me:3291: found $ac_dir/$ac_word" >&5
3292    break
3293 fi
3294 done
3295
3296   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3297   ;;
3298 esac
3299 fi
3300 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3301
3302 if test -n "$ac_pt_PKG_CONFIG"; then
3303   echo "$as_me:3303: result: $ac_pt_PKG_CONFIG" >&5
3304 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3305 else
3306   echo "$as_me:3306: result: no" >&5
3307 echo "${ECHO_T}no" >&6
3308 fi
3309
3310   PKG_CONFIG=$ac_pt_PKG_CONFIG
3311 else
3312   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3313 fi
3314
3315         ;;
3316 *)
3317         PKG_CONFIG=$withval
3318         ;;
3319 esac
3320
3321 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3322 if test "$PKG_CONFIG" != none ; then
3323
3324 if test "x$prefix" != xNONE; then
3325   cf_path_syntax="$prefix"
3326 else
3327   cf_path_syntax="$ac_default_prefix"
3328 fi
3329
3330 case ".$PKG_CONFIG" in #(vi
3331 .\$\(*\)*|.\'*\'*) #(vi
3332   ;;
3333 ..|./*|.\\*) #(vi
3334   ;;
3335 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3336   ;;
3337 .\${*prefix}*|.\${*dir}*) #(vi
3338   eval PKG_CONFIG="$PKG_CONFIG"
3339   case ".$PKG_CONFIG" in #(vi
3340   .NONE/*)
3341     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3342     ;;
3343   esac
3344   ;; #(vi
3345 .no|.NONE/*)
3346   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3347   ;;
3348 *)
3349   { { echo "$as_me:3349: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3350 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3351    { (exit 1); exit 1; }; }
3352   ;;
3353 esac
3354
3355 fi
3356
3357 if test "$PKG_CONFIG" != none ; then
3358         echo "$as_me:3358: checking for $PKG_CONFIG library directory" >&5
3359 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3360
3361 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3362 if test "${with_pkg_config_libdir+set}" = set; then
3363   withval="$with_pkg_config_libdir"
3364   PKG_CONFIG_LIBDIR=$withval
3365 else
3366   PKG_CONFIG_LIBDIR=yes
3367 fi;
3368
3369         case x$PKG_CONFIG_LIBDIR in #(vi
3370         x/*) #(vi
3371                 ;;
3372         xyes) #(vi
3373                 # look for the library directory using the same prefix as the executable
3374                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3375                 case x`(arch) 2>/dev/null` in #(vi
3376                 *64) #(vi
3377                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3378                         do
3379                                 if test -d $cf_config/pkgconfig
3380                                 then
3381                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3382                                         break
3383                                 fi
3384                         done
3385                         ;;
3386                 *)
3387                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3388                         ;;
3389                 esac
3390                 ;;
3391         *)
3392                 ;;
3393         esac
3394
3395         echo "$as_me:3395: result: $PKG_CONFIG_LIBDIR" >&5
3396 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3397 fi
3398
3399 if test "$PKG_CONFIG" != none ; then
3400         echo "$as_me:3400: checking if we should install .pc files for $PKG_CONFIG" >&5
3401 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3402
3403 # Check whether --enable-pc-files or --disable-pc-files was given.
3404 if test "${enable_pc_files+set}" = set; then
3405   enableval="$enable_pc_files"
3406   enable_pc_files=$enableval
3407 else
3408   enable_pc_files=no
3409 fi;
3410         echo "$as_me:3410: result: $enable_pc_files" >&5
3411 echo "${ECHO_T}$enable_pc_files" >&6
3412         if test "$enable_pc_files" != no
3413         then
3414
3415 if test "x$prefix" != xNONE; then
3416   cf_path_syntax="$prefix"
3417 else
3418   cf_path_syntax="$ac_default_prefix"
3419 fi
3420
3421 case ".$PKG_CONFIG_LIBDIR" in #(vi
3422 .\$\(*\)*|.\'*\'*) #(vi
3423   ;;
3424 ..|./*|.\\*) #(vi
3425   ;;
3426 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3427   ;;
3428 .\${*prefix}*|.\${*dir}*) #(vi
3429   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3430   case ".$PKG_CONFIG_LIBDIR" in #(vi
3431   .NONE/*)
3432     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3433     ;;
3434   esac
3435   ;; #(vi
3436 .no|.NONE/*)
3437   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3438   ;;
3439 *)
3440   { { echo "$as_me:3440: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3441 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3442    { (exit 1); exit 1; }; }
3443   ;;
3444 esac
3445
3446         fi
3447 else
3448         enable_pc_files=no
3449 fi
3450
3451 echo "$as_me:3451: checking if we should assume mixed-case filenames" >&5
3452 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3453
3454 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3455 if test "${enable_mixed_case+set}" = set; then
3456   enableval="$enable_mixed_case"
3457   enable_mixedcase=$enableval
3458 else
3459   enable_mixedcase=auto
3460 fi;
3461 echo "$as_me:3461: result: $enable_mixedcase" >&5
3462 echo "${ECHO_T}$enable_mixedcase" >&6
3463 if test "$enable_mixedcase" = "auto" ; then
3464
3465 echo "$as_me:3465: checking if filesystem supports mixed-case filenames" >&5
3466 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3467 if test "${cf_cv_mixedcase+set}" = set; then
3468   echo $ECHO_N "(cached) $ECHO_C" >&6
3469 else
3470
3471 if test "$cross_compiling" = yes ; then
3472         case $target_alias in #(vi
3473         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
3474                 cf_cv_mixedcase=no
3475                 ;;
3476         *)
3477                 cf_cv_mixedcase=yes
3478                 ;;
3479         esac
3480 else
3481         rm -f conftest CONFTEST
3482         echo test >conftest
3483         if test -f CONFTEST ; then
3484                 cf_cv_mixedcase=no
3485         else
3486                 cf_cv_mixedcase=yes
3487         fi
3488         rm -f conftest CONFTEST
3489 fi
3490
3491 fi
3492 echo "$as_me:3492: result: $cf_cv_mixedcase" >&5
3493 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3494 test "$cf_cv_mixedcase" = yes &&
3495 cat >>confdefs.h <<\EOF
3496 #define MIXEDCASE_FILENAMES 1
3497 EOF
3498
3499 else
3500     cf_cv_mixedcase=$enable_mixedcase
3501     if test "x$enable_mixedcase" = "xyes" ; then
3502
3503 cat >>confdefs.h <<\EOF
3504 #define MIXEDCASE_FILENAMES 1
3505 EOF
3506
3507     fi
3508 fi
3509
3510 # do this after mixed-case option (tags/TAGS is not as important as tic).
3511 echo "$as_me:3511: checking whether ${MAKE-make} sets \${MAKE}" >&5
3512 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3513 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3514 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3515   echo $ECHO_N "(cached) $ECHO_C" >&6
3516 else
3517   cat >conftest.make <<\EOF
3518 all:
3519         @echo 'ac_maketemp="${MAKE}"'
3520 EOF
3521 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3522 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3523 if test -n "$ac_maketemp"; then
3524   eval ac_cv_prog_make_${ac_make}_set=yes
3525 else
3526   eval ac_cv_prog_make_${ac_make}_set=no
3527 fi
3528 rm -f conftest.make
3529 fi
3530 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3531   echo "$as_me:3531: result: yes" >&5
3532 echo "${ECHO_T}yes" >&6
3533   SET_MAKE=
3534 else
3535   echo "$as_me:3535: result: no" >&5
3536 echo "${ECHO_T}no" >&6
3537   SET_MAKE="MAKE=${MAKE-make}"
3538 fi
3539
3540 for ac_prog in exctags ctags
3541 do
3542   # Extract the first word of "$ac_prog", so it can be a program name with args.
3543 set dummy $ac_prog; ac_word=$2
3544 echo "$as_me:3544: checking for $ac_word" >&5
3545 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3546 if test "${ac_cv_prog_CTAGS+set}" = set; then
3547   echo $ECHO_N "(cached) $ECHO_C" >&6
3548 else
3549   if test -n "$CTAGS"; then
3550   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3551 else
3552   ac_save_IFS=$IFS; IFS=$ac_path_separator
3553 ac_dummy="$PATH"
3554 for ac_dir in $ac_dummy; do
3555   IFS=$ac_save_IFS
3556   test -z "$ac_dir" && ac_dir=.
3557   $as_executable_p "$ac_dir/$ac_word" || continue
3558 ac_cv_prog_CTAGS="$ac_prog"
3559 echo "$as_me:3559: found $ac_dir/$ac_word" >&5
3560 break
3561 done
3562
3563 fi
3564 fi
3565 CTAGS=$ac_cv_prog_CTAGS
3566 if test -n "$CTAGS"; then
3567   echo "$as_me:3567: result: $CTAGS" >&5
3568 echo "${ECHO_T}$CTAGS" >&6
3569 else
3570   echo "$as_me:3570: result: no" >&5
3571 echo "${ECHO_T}no" >&6
3572 fi
3573
3574   test -n "$CTAGS" && break
3575 done
3576
3577 for ac_prog in exetags etags
3578 do
3579   # Extract the first word of "$ac_prog", so it can be a program name with args.
3580 set dummy $ac_prog; ac_word=$2
3581 echo "$as_me:3581: checking for $ac_word" >&5
3582 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3583 if test "${ac_cv_prog_ETAGS+set}" = set; then
3584   echo $ECHO_N "(cached) $ECHO_C" >&6
3585 else
3586   if test -n "$ETAGS"; then
3587   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3588 else
3589   ac_save_IFS=$IFS; IFS=$ac_path_separator
3590 ac_dummy="$PATH"
3591 for ac_dir in $ac_dummy; do
3592   IFS=$ac_save_IFS
3593   test -z "$ac_dir" && ac_dir=.
3594   $as_executable_p "$ac_dir/$ac_word" || continue
3595 ac_cv_prog_ETAGS="$ac_prog"
3596 echo "$as_me:3596: found $ac_dir/$ac_word" >&5
3597 break
3598 done
3599
3600 fi
3601 fi
3602 ETAGS=$ac_cv_prog_ETAGS
3603 if test -n "$ETAGS"; then
3604   echo "$as_me:3604: result: $ETAGS" >&5
3605 echo "${ECHO_T}$ETAGS" >&6
3606 else
3607   echo "$as_me:3607: result: no" >&5
3608 echo "${ECHO_T}no" >&6
3609 fi
3610
3611   test -n "$ETAGS" && break
3612 done
3613
3614 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3615 set dummy ${CTAGS:-ctags}; ac_word=$2
3616 echo "$as_me:3616: checking for $ac_word" >&5
3617 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3618 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3619   echo $ECHO_N "(cached) $ECHO_C" >&6
3620 else
3621   if test -n "$MAKE_LOWER_TAGS"; then
3622   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3623 else
3624   ac_save_IFS=$IFS; IFS=$ac_path_separator
3625 ac_dummy="$PATH"
3626 for ac_dir in $ac_dummy; do
3627   IFS=$ac_save_IFS
3628   test -z "$ac_dir" && ac_dir=.
3629   $as_executable_p "$ac_dir/$ac_word" || continue
3630 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3631 echo "$as_me:3631: found $ac_dir/$ac_word" >&5
3632 break
3633 done
3634
3635   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3636 fi
3637 fi
3638 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3639 if test -n "$MAKE_LOWER_TAGS"; then
3640   echo "$as_me:3640: result: $MAKE_LOWER_TAGS" >&5
3641 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3642 else
3643   echo "$as_me:3643: result: no" >&5
3644 echo "${ECHO_T}no" >&6
3645 fi
3646
3647 if test "$cf_cv_mixedcase" = yes ; then
3648         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3649 set dummy ${ETAGS:-etags}; ac_word=$2
3650 echo "$as_me:3650: checking for $ac_word" >&5
3651 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3652 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3653   echo $ECHO_N "(cached) $ECHO_C" >&6
3654 else
3655   if test -n "$MAKE_UPPER_TAGS"; then
3656   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3657 else
3658   ac_save_IFS=$IFS; IFS=$ac_path_separator
3659 ac_dummy="$PATH"
3660 for ac_dir in $ac_dummy; do
3661   IFS=$ac_save_IFS
3662   test -z "$ac_dir" && ac_dir=.
3663   $as_executable_p "$ac_dir/$ac_word" || continue
3664 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3665 echo "$as_me:3665: found $ac_dir/$ac_word" >&5
3666 break
3667 done
3668
3669   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3670 fi
3671 fi
3672 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3673 if test -n "$MAKE_UPPER_TAGS"; then
3674   echo "$as_me:3674: result: $MAKE_UPPER_TAGS" >&5
3675 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3676 else
3677   echo "$as_me:3677: result: no" >&5
3678 echo "${ECHO_T}no" >&6
3679 fi
3680
3681 else
3682         MAKE_UPPER_TAGS=no
3683 fi
3684
3685 if test "$MAKE_UPPER_TAGS" = yes ; then
3686         MAKE_UPPER_TAGS=
3687 else
3688         MAKE_UPPER_TAGS="#"
3689 fi
3690
3691 if test "$MAKE_LOWER_TAGS" = yes ; then
3692         MAKE_LOWER_TAGS=
3693 else
3694         MAKE_LOWER_TAGS="#"
3695 fi
3696
3697 echo "$as_me:3697: checking for makeflags variable" >&5
3698 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3699 if test "${cf_cv_makeflags+set}" = set; then
3700   echo $ECHO_N "(cached) $ECHO_C" >&6
3701 else
3702
3703         cf_cv_makeflags=''
3704         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3705         do
3706                 cat >cf_makeflags.tmp <<CF_EOF
3707 SHELL = /bin/sh
3708 all :
3709         @ echo '.$cf_option'
3710 CF_EOF
3711                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3712                 case "$cf_result" in
3713                 .*k|.*kw)
3714                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3715                         case "$cf_result" in
3716                         .*CC=*) cf_cv_makeflags=
3717                                 ;;
3718                         *)      cf_cv_makeflags=$cf_option
3719                                 ;;
3720                         esac
3721                         break
3722                         ;;
3723                 .-)     ;;
3724                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3725                         ;;
3726                 esac
3727         done
3728         rm -f cf_makeflags.tmp
3729
3730 fi
3731 echo "$as_me:3731: result: $cf_cv_makeflags" >&5
3732 echo "${ECHO_T}$cf_cv_makeflags" >&6
3733
3734 if test -n "$ac_tool_prefix"; then
3735   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3736 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3737 echo "$as_me:3737: checking for $ac_word" >&5
3738 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3739 if test "${ac_cv_prog_RANLIB+set}" = set; then
3740   echo $ECHO_N "(cached) $ECHO_C" >&6
3741 else
3742   if test -n "$RANLIB"; then
3743   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3744 else
3745   ac_save_IFS=$IFS; IFS=$ac_path_separator
3746 ac_dummy="$PATH"
3747 for ac_dir in $ac_dummy; do
3748   IFS=$ac_save_IFS
3749   test -z "$ac_dir" && ac_dir=.
3750   $as_executable_p "$ac_dir/$ac_word" || continue
3751 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3752 echo "$as_me:3752: found $ac_dir/$ac_word" >&5
3753 break
3754 done
3755
3756 fi
3757 fi
3758 RANLIB=$ac_cv_prog_RANLIB
3759 if test -n "$RANLIB"; then
3760   echo "$as_me:3760: result: $RANLIB" >&5
3761 echo "${ECHO_T}$RANLIB" >&6
3762 else
3763   echo "$as_me:3763: result: no" >&5
3764 echo "${ECHO_T}no" >&6
3765 fi
3766
3767 fi
3768 if test -z "$ac_cv_prog_RANLIB"; then
3769   ac_ct_RANLIB=$RANLIB
3770   # Extract the first word of "ranlib", so it can be a program name with args.
3771 set dummy ranlib; ac_word=$2
3772 echo "$as_me:3772: checking for $ac_word" >&5
3773 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3774 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3775   echo $ECHO_N "(cached) $ECHO_C" >&6
3776 else
3777   if test -n "$ac_ct_RANLIB"; then
3778   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3779 else
3780   ac_save_IFS=$IFS; IFS=$ac_path_separator
3781 ac_dummy="$PATH"
3782 for ac_dir in $ac_dummy; do
3783   IFS=$ac_save_IFS
3784   test -z "$ac_dir" && ac_dir=.
3785   $as_executable_p "$ac_dir/$ac_word" || continue
3786 ac_cv_prog_ac_ct_RANLIB="ranlib"
3787 echo "$as_me:3787: found $ac_dir/$ac_word" >&5
3788 break
3789 done
3790
3791   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3792 fi
3793 fi
3794 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3795 if test -n "$ac_ct_RANLIB"; then
3796   echo "$as_me:3796: result: $ac_ct_RANLIB" >&5
3797 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3798 else
3799   echo "$as_me:3799: result: no" >&5
3800 echo "${ECHO_T}no" >&6
3801 fi
3802
3803   RANLIB=$ac_ct_RANLIB
3804 else
3805   RANLIB="$ac_cv_prog_RANLIB"
3806 fi
3807
3808 if test -n "$ac_tool_prefix"; then
3809   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3810 set dummy ${ac_tool_prefix}ld; ac_word=$2
3811 echo "$as_me:3811: checking for $ac_word" >&5
3812 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3813 if test "${ac_cv_prog_LD+set}" = set; then
3814   echo $ECHO_N "(cached) $ECHO_C" >&6
3815 else
3816   if test -n "$LD"; then
3817   ac_cv_prog_LD="$LD" # Let the user override the test.
3818 else
3819   ac_save_IFS=$IFS; IFS=$ac_path_separator
3820 ac_dummy="$PATH"
3821 for ac_dir in $ac_dummy; do
3822   IFS=$ac_save_IFS
3823   test -z "$ac_dir" && ac_dir=.
3824   $as_executable_p "$ac_dir/$ac_word" || continue
3825 ac_cv_prog_LD="${ac_tool_prefix}ld"
3826 echo "$as_me:3826: found $ac_dir/$ac_word" >&5
3827 break
3828 done
3829
3830 fi
3831 fi
3832 LD=$ac_cv_prog_LD
3833 if test -n "$LD"; then
3834   echo "$as_me:3834: result: $LD" >&5
3835 echo "${ECHO_T}$LD" >&6
3836 else
3837   echo "$as_me:3837: result: no" >&5
3838 echo "${ECHO_T}no" >&6
3839 fi
3840
3841 fi
3842 if test -z "$ac_cv_prog_LD"; then
3843   ac_ct_LD=$LD
3844   # Extract the first word of "ld", so it can be a program name with args.
3845 set dummy ld; ac_word=$2
3846 echo "$as_me:3846: checking for $ac_word" >&5
3847 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3848 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3849   echo $ECHO_N "(cached) $ECHO_C" >&6
3850 else
3851   if test -n "$ac_ct_LD"; then
3852   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3853 else
3854   ac_save_IFS=$IFS; IFS=$ac_path_separator
3855 ac_dummy="$PATH"
3856 for ac_dir in $ac_dummy; do
3857   IFS=$ac_save_IFS
3858   test -z "$ac_dir" && ac_dir=.
3859   $as_executable_p "$ac_dir/$ac_word" || continue
3860 ac_cv_prog_ac_ct_LD="ld"
3861 echo "$as_me:3861: found $ac_dir/$ac_word" >&5
3862 break
3863 done
3864
3865   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3866 fi
3867 fi
3868 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3869 if test -n "$ac_ct_LD"; then
3870   echo "$as_me:3870: result: $ac_ct_LD" >&5
3871 echo "${ECHO_T}$ac_ct_LD" >&6
3872 else
3873   echo "$as_me:3873: result: no" >&5
3874 echo "${ECHO_T}no" >&6
3875 fi
3876
3877   LD=$ac_ct_LD
3878 else
3879   LD="$ac_cv_prog_LD"
3880 fi
3881
3882 if test -n "$ac_tool_prefix"; then
3883   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3884 set dummy ${ac_tool_prefix}ar; ac_word=$2
3885 echo "$as_me:3885: checking for $ac_word" >&5
3886 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3887 if test "${ac_cv_prog_AR+set}" = set; then
3888   echo $ECHO_N "(cached) $ECHO_C" >&6
3889 else
3890   if test -n "$AR"; then
3891   ac_cv_prog_AR="$AR" # Let the user override the test.
3892 else
3893   ac_save_IFS=$IFS; IFS=$ac_path_separator
3894 ac_dummy="$PATH"
3895 for ac_dir in $ac_dummy; do
3896   IFS=$ac_save_IFS
3897   test -z "$ac_dir" && ac_dir=.
3898   $as_executable_p "$ac_dir/$ac_word" || continue
3899 ac_cv_prog_AR="${ac_tool_prefix}ar"
3900 echo "$as_me:3900: found $ac_dir/$ac_word" >&5
3901 break
3902 done
3903
3904 fi
3905 fi
3906 AR=$ac_cv_prog_AR
3907 if test -n "$AR"; then
3908   echo "$as_me:3908: result: $AR" >&5
3909 echo "${ECHO_T}$AR" >&6
3910 else
3911   echo "$as_me:3911: result: no" >&5
3912 echo "${ECHO_T}no" >&6
3913 fi
3914
3915 fi
3916 if test -z "$ac_cv_prog_AR"; then
3917   ac_ct_AR=$AR
3918   # Extract the first word of "ar", so it can be a program name with args.
3919 set dummy ar; ac_word=$2
3920 echo "$as_me:3920: checking for $ac_word" >&5
3921 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3922 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3923   echo $ECHO_N "(cached) $ECHO_C" >&6
3924 else
3925   if test -n "$ac_ct_AR"; then
3926   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3927 else
3928   ac_save_IFS=$IFS; IFS=$ac_path_separator
3929 ac_dummy="$PATH"
3930 for ac_dir in $ac_dummy; do
3931   IFS=$ac_save_IFS
3932   test -z "$ac_dir" && ac_dir=.
3933   $as_executable_p "$ac_dir/$ac_word" || continue
3934 ac_cv_prog_ac_ct_AR="ar"
3935 echo "$as_me:3935: found $ac_dir/$ac_word" >&5
3936 break
3937 done
3938
3939   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3940 fi
3941 fi
3942 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3943 if test -n "$ac_ct_AR"; then
3944   echo "$as_me:3944: result: $ac_ct_AR" >&5
3945 echo "${ECHO_T}$ac_ct_AR" >&6
3946 else
3947   echo "$as_me:3947: result: no" >&5
3948 echo "${ECHO_T}no" >&6
3949 fi
3950
3951   AR=$ac_ct_AR
3952 else
3953   AR="$ac_cv_prog_AR"
3954 fi
3955
3956 if test -n "$ac_tool_prefix"; then
3957   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
3958 set dummy ${ac_tool_prefix}nm; ac_word=$2
3959 echo "$as_me:3959: checking for $ac_word" >&5
3960 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3961 if test "${ac_cv_prog_NM+set}" = set; then
3962   echo $ECHO_N "(cached) $ECHO_C" >&6
3963 else
3964   if test -n "$NM"; then
3965   ac_cv_prog_NM="$NM" # Let the user override the test.
3966 else
3967   ac_save_IFS=$IFS; IFS=$ac_path_separator
3968 ac_dummy="$PATH"
3969 for ac_dir in $ac_dummy; do
3970   IFS=$ac_save_IFS
3971   test -z "$ac_dir" && ac_dir=.
3972   $as_executable_p "$ac_dir/$ac_word" || continue
3973 ac_cv_prog_NM="${ac_tool_prefix}nm"
3974 echo "$as_me:3974: found $ac_dir/$ac_word" >&5
3975 break
3976 done
3977
3978 fi
3979 fi
3980 NM=$ac_cv_prog_NM
3981 if test -n "$NM"; then
3982   echo "$as_me:3982: result: $NM" >&5
3983 echo "${ECHO_T}$NM" >&6
3984 else
3985   echo "$as_me:3985: result: no" >&5
3986 echo "${ECHO_T}no" >&6
3987 fi
3988
3989 fi
3990 if test -z "$ac_cv_prog_NM"; then
3991   ac_ct_NM=$NM
3992   # Extract the first word of "nm", so it can be a program name with args.
3993 set dummy nm; ac_word=$2
3994 echo "$as_me:3994: checking for $ac_word" >&5
3995 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3996 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
3997   echo $ECHO_N "(cached) $ECHO_C" >&6
3998 else
3999   if test -n "$ac_ct_NM"; then
4000   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4001 else
4002   ac_save_IFS=$IFS; IFS=$ac_path_separator
4003 ac_dummy="$PATH"
4004 for ac_dir in $ac_dummy; do
4005   IFS=$ac_save_IFS
4006   test -z "$ac_dir" && ac_dir=.
4007   $as_executable_p "$ac_dir/$ac_word" || continue
4008 ac_cv_prog_ac_ct_NM="nm"
4009 echo "$as_me:4009: found $ac_dir/$ac_word" >&5
4010 break
4011 done
4012
4013   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4014 fi
4015 fi
4016 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4017 if test -n "$ac_ct_NM"; then
4018   echo "$as_me:4018: result: $ac_ct_NM" >&5
4019 echo "${ECHO_T}$ac_ct_NM" >&6
4020 else
4021   echo "$as_me:4021: result: no" >&5
4022 echo "${ECHO_T}no" >&6
4023 fi
4024
4025   NM=$ac_ct_NM
4026 else
4027   NM="$ac_cv_prog_NM"
4028 fi
4029
4030 if test -n "$ac_tool_prefix"; then
4031   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4032 set dummy ${ac_tool_prefix}ar; ac_word=$2
4033 echo "$as_me:4033: checking for $ac_word" >&5
4034 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4035 if test "${ac_cv_prog_AR+set}" = set; then
4036   echo $ECHO_N "(cached) $ECHO_C" >&6
4037 else
4038   if test -n "$AR"; then
4039   ac_cv_prog_AR="$AR" # Let the user override the test.
4040 else
4041   ac_save_IFS=$IFS; IFS=$ac_path_separator
4042 ac_dummy="$PATH"
4043 for ac_dir in $ac_dummy; do
4044   IFS=$ac_save_IFS
4045   test -z "$ac_dir" && ac_dir=.
4046   $as_executable_p "$ac_dir/$ac_word" || continue
4047 ac_cv_prog_AR="${ac_tool_prefix}ar"
4048 echo "$as_me:4048: found $ac_dir/$ac_word" >&5
4049 break
4050 done
4051
4052 fi
4053 fi
4054 AR=$ac_cv_prog_AR
4055 if test -n "$AR"; then
4056   echo "$as_me:4056: result: $AR" >&5
4057 echo "${ECHO_T}$AR" >&6
4058 else
4059   echo "$as_me:4059: result: no" >&5
4060 echo "${ECHO_T}no" >&6
4061 fi
4062
4063 fi
4064 if test -z "$ac_cv_prog_AR"; then
4065   ac_ct_AR=$AR
4066   # Extract the first word of "ar", so it can be a program name with args.
4067 set dummy ar; ac_word=$2
4068 echo "$as_me:4068: checking for $ac_word" >&5
4069 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4070 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4071   echo $ECHO_N "(cached) $ECHO_C" >&6
4072 else
4073   if test -n "$ac_ct_AR"; then
4074   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4075 else
4076   ac_save_IFS=$IFS; IFS=$ac_path_separator
4077 ac_dummy="$PATH"
4078 for ac_dir in $ac_dummy; do
4079   IFS=$ac_save_IFS
4080   test -z "$ac_dir" && ac_dir=.
4081   $as_executable_p "$ac_dir/$ac_word" || continue
4082 ac_cv_prog_ac_ct_AR="ar"
4083 echo "$as_me:4083: found $ac_dir/$ac_word" >&5
4084 break
4085 done
4086
4087   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4088 fi
4089 fi
4090 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4091 if test -n "$ac_ct_AR"; then
4092   echo "$as_me:4092: result: $ac_ct_AR" >&5
4093 echo "${ECHO_T}$ac_ct_AR" >&6
4094 else
4095   echo "$as_me:4095: result: no" >&5
4096 echo "${ECHO_T}no" >&6
4097 fi
4098
4099   AR=$ac_ct_AR
4100 else
4101   AR="$ac_cv_prog_AR"
4102 fi
4103
4104 echo "$as_me:4104: checking for options to update archives" >&5
4105 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4106 if test "${cf_cv_ar_flags+set}" = set; then
4107   echo $ECHO_N "(cached) $ECHO_C" >&6
4108 else
4109
4110         cf_cv_ar_flags=unknown
4111         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4112         do
4113
4114                 # check if $ARFLAGS already contains this choice
4115                 if test "x$ARFLAGS" != "x" ; then
4116                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4117                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4118                                 cf_cv_ar_flags=
4119                                 break
4120                         fi
4121                 fi
4122
4123                 rm -f conftest.$ac_cv_objext
4124                 rm -f conftest.a
4125
4126                 cat >conftest.$ac_ext <<EOF
4127 #line 4127 "configure"
4128 int     testdata[3] = { 123, 456, 789 };
4129 EOF
4130                 if { (eval echo "$as_me:4130: \"$ac_compile\"") >&5
4131   (eval $ac_compile) 2>&5
4132   ac_status=$?
4133   echo "$as_me:4133: \$? = $ac_status" >&5
4134   (exit $ac_status); } ; then
4135                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4136                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4137                         if test -f conftest.a ; then
4138                                 cf_cv_ar_flags=$cf_ar_flags
4139                                 break
4140                         fi
4141                 else
4142                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4143
4144 echo "${as_me:-configure}:4144: testing cannot compile test-program ..." 1>&5
4145
4146                         break
4147                 fi
4148         done
4149         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4150
4151 fi
4152 echo "$as_me:4152: result: $cf_cv_ar_flags" >&5
4153 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4154
4155 if test -n "$ARFLAGS" ; then
4156         if test -n "$cf_cv_ar_flags" ; then
4157                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4158         fi
4159 else
4160         ARFLAGS=$cf_cv_ar_flags
4161 fi
4162
4163 echo "$as_me:4163: checking if you have specified an install-prefix" >&5
4164 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4165
4166 # Check whether --with-install-prefix or --without-install-prefix was given.
4167 if test "${with_install_prefix+set}" = set; then
4168   withval="$with_install_prefix"
4169   case "x$withval" in #(vi
4170         xyes|xno) #(vi
4171                 ;;
4172         *)      DESTDIR="$withval"
4173                 ;;
4174         esac
4175 fi;
4176 echo "$as_me:4176: result: $DESTDIR" >&5
4177 echo "${ECHO_T}$DESTDIR" >&6
4178
4179 ###############################################################################
4180
4181 # If we're cross-compiling, allow the user to override the tools and their
4182 # options.  The configure script is oriented toward identifying the host
4183 # compiler, etc., but we need a build compiler to generate parts of the source.
4184
4185 if test "$cross_compiling" = yes ; then
4186
4187         # defaults that we might want to override
4188         : ${BUILD_CFLAGS:=''}
4189         : ${BUILD_CPPFLAGS:=''}
4190         : ${BUILD_LDFLAGS:=''}
4191         : ${BUILD_LIBS:=''}
4192         : ${BUILD_EXEEXT:='$x'}
4193         : ${BUILD_OBJEXT:='o'}
4194
4195 # Check whether --with-build-cc or --without-build-cc was given.
4196 if test "${with_build_cc+set}" = set; then
4197   withval="$with_build_cc"
4198   BUILD_CC="$withval"
4199 else
4200   for ac_prog in gcc cc cl
4201 do
4202   # Extract the first word of "$ac_prog", so it can be a program name with args.
4203 set dummy $ac_prog; ac_word=$2
4204 echo "$as_me:4204: checking for $ac_word" >&5
4205 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4206 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4207   echo $ECHO_N "(cached) $ECHO_C" >&6
4208 else
4209   if test -n "$BUILD_CC"; then
4210   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4211 else
4212   ac_save_IFS=$IFS; IFS=$ac_path_separator
4213 ac_dummy="$PATH"
4214 for ac_dir in $ac_dummy; do
4215   IFS=$ac_save_IFS
4216   test -z "$ac_dir" && ac_dir=.
4217   $as_executable_p "$ac_dir/$ac_word" || continue
4218 ac_cv_prog_BUILD_CC="$ac_prog"
4219 echo "$as_me:4219: found $ac_dir/$ac_word" >&5
4220 break
4221 done
4222
4223 fi
4224 fi
4225 BUILD_CC=$ac_cv_prog_BUILD_CC
4226 if test -n "$BUILD_CC"; then
4227   echo "$as_me:4227: result: $BUILD_CC" >&5
4228 echo "${ECHO_T}$BUILD_CC" >&6
4229 else
4230   echo "$as_me:4230: result: no" >&5
4231 echo "${ECHO_T}no" >&6
4232 fi
4233
4234   test -n "$BUILD_CC" && break
4235 done
4236
4237 fi;
4238         echo "$as_me:4238: checking for native build C compiler" >&5
4239 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4240         echo "$as_me:4240: result: $BUILD_CC" >&5
4241 echo "${ECHO_T}$BUILD_CC" >&6
4242
4243         echo "$as_me:4243: checking for native build C preprocessor" >&5
4244 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4245
4246 # Check whether --with-build-cpp or --without-build-cpp was given.
4247 if test "${with_build_cpp+set}" = set; then
4248   withval="$with_build_cpp"
4249   BUILD_CPP="$withval"
4250 else
4251   BUILD_CPP='${BUILD_CC} -E'
4252 fi;
4253         echo "$as_me:4253: result: $BUILD_CPP" >&5
4254 echo "${ECHO_T}$BUILD_CPP" >&6
4255
4256         echo "$as_me:4256: checking for native build C flags" >&5
4257 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4258
4259 # Check whether --with-build-cflags or --without-build-cflags was given.
4260 if test "${with_build_cflags+set}" = set; then
4261   withval="$with_build_cflags"
4262   BUILD_CFLAGS="$withval"
4263 fi;
4264         echo "$as_me:4264: result: $BUILD_CFLAGS" >&5
4265 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4266
4267         echo "$as_me:4267: checking for native build C preprocessor-flags" >&5
4268 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4269
4270 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4271 if test "${with_build_cppflags+set}" = set; then
4272   withval="$with_build_cppflags"
4273   BUILD_CPPFLAGS="$withval"
4274 fi;
4275         echo "$as_me:4275: result: $BUILD_CPPFLAGS" >&5
4276 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4277
4278         echo "$as_me:4278: checking for native build linker-flags" >&5
4279 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4280
4281 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4282 if test "${with_build_ldflags+set}" = set; then
4283   withval="$with_build_ldflags"
4284   BUILD_LDFLAGS="$withval"
4285 fi;
4286         echo "$as_me:4286: result: $BUILD_LDFLAGS" >&5
4287 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4288
4289         echo "$as_me:4289: checking for native build linker-libraries" >&5
4290 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4291
4292 # Check whether --with-build-libs or --without-build-libs was given.
4293 if test "${with_build_libs+set}" = set; then
4294   withval="$with_build_libs"
4295   BUILD_LIBS="$withval"
4296 fi;
4297         echo "$as_me:4297: result: $BUILD_LIBS" >&5
4298 echo "${ECHO_T}$BUILD_LIBS" >&6
4299
4300         # this assumes we're on Unix.
4301         BUILD_EXEEXT=
4302         BUILD_OBJEXT=o
4303
4304         : ${BUILD_CC:='${CC}'}
4305
4306         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4307                 { { echo "$as_me:4307: error: Cross-build requires two compilers.
4308 Use --with-build-cc to specify the native compiler." >&5
4309 echo "$as_me: error: Cross-build requires two compilers.
4310 Use --with-build-cc to specify the native compiler." >&2;}
4311    { (exit 1); exit 1; }; }
4312         fi
4313
4314 else
4315         : ${BUILD_CC:='${CC}'}
4316         : ${BUILD_CPP:='${CPP}'}
4317         : ${BUILD_CFLAGS:='${CFLAGS}'}
4318         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4319         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4320         : ${BUILD_LIBS:='${LIBS}'}
4321         : ${BUILD_EXEEXT:='$x'}
4322         : ${BUILD_OBJEXT:='o'}
4323 fi
4324
4325 ###############################################################################
4326
4327 ### Options to allow the user to specify the set of libraries which are used.
4328 ### Use "--without-normal --with-shared" to allow the default model to be
4329 ### shared, for example.
4330 cf_list_models=""
4331
4332 echo "$as_me:4332: checking if libtool -version-number should be used" >&5
4333 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4334
4335 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4336 if test "${enable_libtool_version+set}" = set; then
4337   enableval="$enable_libtool_version"
4338   test "$enableval" != no && enableval=yes
4339   if test "$enableval" != "yes" ; then
4340     cf_libtool_version=no
4341   else
4342     cf_libtool_version=yes
4343   fi
4344 else
4345   enableval=yes
4346   cf_libtool_version=yes
4347
4348 fi;
4349 echo "$as_me:4349: result: $cf_libtool_version" >&5
4350 echo "${ECHO_T}$cf_libtool_version" >&6
4351
4352 if test "$cf_libtool_version" = yes ; then
4353         LIBTOOL_VERSION="-version-number"
4354 else
4355         LIBTOOL_VERSION="-version-info"
4356 fi
4357
4358 LIBTOOL=
4359
4360 # common library maintenance symbols that are convenient for libtool scripts:
4361 LIB_CREATE='${AR} -cr'
4362 LIB_OBJECT='${OBJECTS}'
4363 LIB_SUFFIX=.a
4364 LIB_PREP="$RANLIB"
4365
4366 # symbols used to prop libtool up to enable it to determine what it should be
4367 # doing:
4368 LIB_CLEAN=
4369 LIB_COMPILE=
4370 LIB_LINK='${CC}'
4371 LIB_INSTALL=
4372 LIB_UNINSTALL=
4373
4374 echo "$as_me:4374: checking if you want to build libraries with libtool" >&5
4375 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4376
4377 # Check whether --with-libtool or --without-libtool was given.
4378 if test "${with_libtool+set}" = set; then
4379   withval="$with_libtool"
4380   with_libtool=$withval
4381 else
4382   with_libtool=no
4383 fi;
4384 echo "$as_me:4384: result: $with_libtool" >&5
4385 echo "${ECHO_T}$with_libtool" >&6
4386 if test "$with_libtool" != "no"; then
4387
4388         if test "$with_libtool" != "yes" ; then
4389
4390 if test "x$prefix" != xNONE; then
4391   cf_path_syntax="$prefix"
4392 else
4393   cf_path_syntax="$ac_default_prefix"
4394 fi
4395
4396 case ".$with_libtool" in #(vi
4397 .\$\(*\)*|.\'*\'*) #(vi
4398   ;;
4399 ..|./*|.\\*) #(vi
4400   ;;
4401 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4402   ;;
4403 .\${*prefix}*|.\${*dir}*) #(vi
4404   eval with_libtool="$with_libtool"
4405   case ".$with_libtool" in #(vi
4406   .NONE/*)
4407     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4408     ;;
4409   esac
4410   ;; #(vi
4411 .no|.NONE/*)
4412   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4413   ;;
4414 *)
4415   { { echo "$as_me:4415: error: expected a pathname, not \"$with_libtool\"" >&5
4416 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4417    { (exit 1); exit 1; }; }
4418   ;;
4419 esac
4420
4421                 LIBTOOL=$with_libtool
4422         else
4423                 if test -n "$ac_tool_prefix"; then
4424   for ac_prog in libtool glibtool
4425   do
4426     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4427 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4428 echo "$as_me:4428: checking for $ac_word" >&5
4429 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4430 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4431   echo $ECHO_N "(cached) $ECHO_C" >&6
4432 else
4433   if test -n "$LIBTOOL"; then
4434   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4435 else
4436   ac_save_IFS=$IFS; IFS=$ac_path_separator
4437 ac_dummy="$PATH"
4438 for ac_dir in $ac_dummy; do
4439   IFS=$ac_save_IFS
4440   test -z "$ac_dir" && ac_dir=.
4441   $as_executable_p "$ac_dir/$ac_word" || continue
4442 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4443 echo "$as_me:4443: found $ac_dir/$ac_word" >&5
4444 break
4445 done
4446
4447 fi
4448 fi
4449 LIBTOOL=$ac_cv_prog_LIBTOOL
4450 if test -n "$LIBTOOL"; then
4451   echo "$as_me:4451: result: $LIBTOOL" >&5
4452 echo "${ECHO_T}$LIBTOOL" >&6
4453 else
4454   echo "$as_me:4454: result: no" >&5
4455 echo "${ECHO_T}no" >&6
4456 fi
4457
4458     test -n "$LIBTOOL" && break
4459   done
4460 fi
4461 if test -z "$LIBTOOL"; then
4462   ac_ct_LIBTOOL=$LIBTOOL
4463   for ac_prog in libtool glibtool
4464 do
4465   # Extract the first word of "$ac_prog", so it can be a program name with args.
4466 set dummy $ac_prog; ac_word=$2
4467 echo "$as_me:4467: checking for $ac_word" >&5
4468 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4469 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4470   echo $ECHO_N "(cached) $ECHO_C" >&6
4471 else
4472   if test -n "$ac_ct_LIBTOOL"; then
4473   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4474 else
4475   ac_save_IFS=$IFS; IFS=$ac_path_separator
4476 ac_dummy="$PATH"
4477 for ac_dir in $ac_dummy; do
4478   IFS=$ac_save_IFS
4479   test -z "$ac_dir" && ac_dir=.
4480   $as_executable_p "$ac_dir/$ac_word" || continue
4481 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4482 echo "$as_me:4482: found $ac_dir/$ac_word" >&5
4483 break
4484 done
4485
4486 fi
4487 fi
4488 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4489 if test -n "$ac_ct_LIBTOOL"; then
4490   echo "$as_me:4490: result: $ac_ct_LIBTOOL" >&5
4491 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4492 else
4493   echo "$as_me:4493: result: no" >&5
4494 echo "${ECHO_T}no" >&6
4495 fi
4496
4497   test -n "$ac_ct_LIBTOOL" && break
4498 done
4499 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4500
4501   LIBTOOL=$ac_ct_LIBTOOL
4502 fi
4503
4504 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4505 then
4506         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4507 else
4508         cf_cv_libtool_version=
4509 fi
4510 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4511
4512                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4513                 then
4514
4515 unset ac_cv_prog_ac_ct_LIBTOOL
4516 unset ac_ct_LIBTOOL
4517 unset LIBTOOL
4518
4519                         if test -n "$ac_tool_prefix"; then
4520   for ac_prog in glibtool
4521   do
4522     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4523 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4524 echo "$as_me:4524: checking for $ac_word" >&5
4525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4526 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4527   echo $ECHO_N "(cached) $ECHO_C" >&6
4528 else
4529   if test -n "$LIBTOOL"; then
4530   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4531 else
4532   ac_save_IFS=$IFS; IFS=$ac_path_separator
4533 ac_dummy="$PATH"
4534 for ac_dir in $ac_dummy; do
4535   IFS=$ac_save_IFS
4536   test -z "$ac_dir" && ac_dir=.
4537   $as_executable_p "$ac_dir/$ac_word" || continue
4538 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4539 echo "$as_me:4539: found $ac_dir/$ac_word" >&5
4540 break
4541 done
4542
4543 fi
4544 fi
4545 LIBTOOL=$ac_cv_prog_LIBTOOL
4546 if test -n "$LIBTOOL"; then
4547   echo "$as_me:4547: result: $LIBTOOL" >&5
4548 echo "${ECHO_T}$LIBTOOL" >&6
4549 else
4550   echo "$as_me:4550: result: no" >&5
4551 echo "${ECHO_T}no" >&6
4552 fi
4553
4554     test -n "$LIBTOOL" && break
4555   done
4556 fi
4557 if test -z "$LIBTOOL"; then
4558   ac_ct_LIBTOOL=$LIBTOOL
4559   for ac_prog in glibtool
4560 do
4561   # Extract the first word of "$ac_prog", so it can be a program name with args.
4562 set dummy $ac_prog; ac_word=$2
4563 echo "$as_me:4563: checking for $ac_word" >&5
4564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4565 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4566   echo $ECHO_N "(cached) $ECHO_C" >&6
4567 else
4568   if test -n "$ac_ct_LIBTOOL"; then
4569   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4570 else
4571   ac_save_IFS=$IFS; IFS=$ac_path_separator
4572 ac_dummy="$PATH"
4573 for ac_dir in $ac_dummy; do
4574   IFS=$ac_save_IFS
4575   test -z "$ac_dir" && ac_dir=.
4576   $as_executable_p "$ac_dir/$ac_word" || continue
4577 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4578 echo "$as_me:4578: found $ac_dir/$ac_word" >&5
4579 break
4580 done
4581
4582 fi
4583 fi
4584 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4585 if test -n "$ac_ct_LIBTOOL"; then
4586   echo "$as_me:4586: result: $ac_ct_LIBTOOL" >&5
4587 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4588 else
4589   echo "$as_me:4589: result: no" >&5
4590 echo "${ECHO_T}no" >&6
4591 fi
4592
4593   test -n "$ac_ct_LIBTOOL" && break
4594 done
4595 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4596
4597   LIBTOOL=$ac_ct_LIBTOOL
4598 fi
4599
4600 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4601 then
4602         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4603 else
4604         cf_cv_libtool_version=
4605 fi
4606 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4607
4608                 fi
4609         fi
4610         if test -z "$LIBTOOL" ; then
4611                 { { echo "$as_me:4611: error: Cannot find libtool" >&5
4612 echo "$as_me: error: Cannot find libtool" >&2;}
4613    { (exit 1); exit 1; }; }
4614         fi
4615         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4616         LIB_OBJECT='${OBJECTS:.o=.lo}'
4617         LIB_SUFFIX=.la
4618         LIB_CLEAN='${LIBTOOL} --mode=clean'
4619         LIB_COMPILE='${LIBTOOL} --mode=compile'
4620         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4621         LIB_INSTALL='${LIBTOOL} --mode=install'
4622         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4623         LIB_PREP=:
4624
4625 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4626 then
4627         echo "$as_me:4627: checking version of $LIBTOOL" >&5
4628 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4629
4630 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4631 then
4632         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4633 else
4634         cf_cv_libtool_version=
4635 fi
4636 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4637
4638         echo "$as_me:4638: result: $cf_cv_libtool_version" >&5
4639 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4640         if test -z "$cf_cv_libtool_version" ; then
4641                 { { echo "$as_me:4641: error: This is not GNU libtool" >&5
4642 echo "$as_me: error: This is not GNU libtool" >&2;}
4643    { (exit 1); exit 1; }; }
4644         fi
4645 else
4646         { { echo "$as_me:4646: error: GNU libtool has not been found" >&5
4647 echo "$as_me: error: GNU libtool has not been found" >&2;}
4648    { (exit 1); exit 1; }; }
4649 fi
4650
4651         # special hack to add -no-undefined (which libtool should do for itself)
4652         LT_UNDEF=
4653         case "$cf_cv_system_name" in #(vi
4654         cygwin*|msys*|mingw32*|uwin*|aix[4-7]) #(vi
4655                 LT_UNDEF=-no-undefined
4656                 ;;
4657         esac
4658
4659         # special hack to add --tag option for C++ compiler
4660         case $cf_cv_libtool_version in #(vi
4661         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4662                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4663                 LIBTOOL="$LIBTOOL --tag=CC"
4664                 ;;
4665         *)
4666                 LIBTOOL_CXX="$LIBTOOL"
4667                 ;;
4668         esac
4669 else
4670         LIBTOOL=""
4671         LIBTOOL_CXX=""
4672 fi
4673
4674 test -z "$LIBTOOL" && ECHO_LT=
4675
4676 if test "$with_libtool" != "no" ; then
4677
4678 cf_list_models="$cf_list_models libtool"
4679
4680 else
4681
4682 echo "$as_me:4682: checking if you want to build shared libraries" >&5
4683 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4684
4685 # Check whether --with-shared or --without-shared was given.
4686 if test "${with_shared+set}" = set; then
4687   withval="$with_shared"
4688   with_shared=$withval
4689 else
4690   with_shared=no
4691 fi;
4692 echo "$as_me:4692: result: $with_shared" >&5
4693 echo "${ECHO_T}$with_shared" >&6
4694 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4695
4696 echo "$as_me:4696: checking if you want to build static libraries" >&5
4697 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4698
4699 # Check whether --with-normal or --without-normal was given.
4700 if test "${with_normal+set}" = set; then
4701   withval="$with_normal"
4702   with_normal=$withval
4703 else
4704   with_normal=yes
4705 fi;
4706 echo "$as_me:4706: result: $with_normal" >&5
4707 echo "${ECHO_T}$with_normal" >&6
4708 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4709
4710 echo "$as_me:4710: checking if you want to build debug libraries" >&5
4711 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4712
4713 # Check whether --with-debug or --without-debug was given.
4714 if test "${with_debug+set}" = set; then
4715   withval="$with_debug"
4716   with_debug=$withval
4717 else
4718   with_debug=yes
4719 fi;
4720 echo "$as_me:4720: result: $with_debug" >&5
4721 echo "${ECHO_T}$with_debug" >&6
4722 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4723
4724 echo "$as_me:4724: checking if you want to build profiling libraries" >&5
4725 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4726
4727 # Check whether --with-profile or --without-profile was given.
4728 if test "${with_profile+set}" = set; then
4729   withval="$with_profile"
4730   with_profile=$withval
4731 else
4732   with_profile=no
4733 fi;
4734 echo "$as_me:4734: result: $with_profile" >&5
4735 echo "${ECHO_T}$with_profile" >&6
4736 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4737
4738 fi
4739
4740 if test "X$cf_with_cxx_binding" != Xno; then
4741 if test "x$with_shared" = "xyes"; then
4742 echo "$as_me:4742: checking if you want to build C++ shared libraries" >&5
4743 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
4744
4745 # Check whether --with-cxx-shared or --without-cxx-shared was given.
4746 if test "${with_cxx_shared+set}" = set; then
4747   withval="$with_cxx_shared"
4748   with_shared_cxx=$withval
4749 else
4750   with_shared_cxx=no
4751 fi;
4752 echo "$as_me:4752: result: $with_shared_cxx" >&5
4753 echo "${ECHO_T}$with_shared_cxx" >&6
4754 fi
4755 fi
4756
4757 ###############################################################################
4758
4759 echo "$as_me:4759: checking for specified models" >&5
4760 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4761 test -z "$cf_list_models" && cf_list_models=normal
4762 test "$with_libtool" != "no" && cf_list_models=libtool
4763 echo "$as_me:4763: result: $cf_list_models" >&5
4764 echo "${ECHO_T}$cf_list_models" >&6
4765
4766 ### Use the first model as the default, and save its suffix for use in building
4767 ### up test-applications.
4768 echo "$as_me:4768: checking for default model" >&5
4769 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4770 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4771 echo "$as_me:4771: result: $DFT_LWR_MODEL" >&5
4772 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4773
4774 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4775
4776 TICS_NAME=tic
4777
4778 TINFO_NAME=tinfo
4779
4780 LIB_NAME=ncurses
4781
4782 LIB_DIR=../lib
4783 LIB_2ND=../../lib
4784
4785 echo "$as_me:4785: checking if you want to have a library-prefix" >&5
4786 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4787
4788 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4789 if test "${with_lib_prefix+set}" = set; then
4790   withval="$with_lib_prefix"
4791   with_lib_prefix=$withval
4792 else
4793   with_lib_prefix=auto
4794 fi;
4795 echo "$as_me:4795: result: $with_lib_prefix" >&5
4796 echo "${ECHO_T}$with_lib_prefix" >&6
4797
4798 if test $with_lib_prefix = auto
4799 then
4800
4801         case $cf_cv_system_name in #(vi
4802         OS/2*|os2*) #(vi
4803         LIB_PREFIX=''
4804         ;;
4805         *)      LIB_PREFIX='lib'
4806         ;;
4807         esac
4808 cf_prefix=$LIB_PREFIX
4809
4810 elif test $with_lib_prefix = no
4811 then
4812         LIB_PREFIX=
4813 else
4814         LIB_PREFIX=$with_lib_prefix
4815 fi
4816
4817 LIB_SUFFIX=
4818
4819         echo "$as_me:4819: checking for PATH separator" >&5
4820 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4821         case $cf_cv_system_name in
4822         os2*)   PATH_SEPARATOR=';'  ;;
4823         *)      ${PATH_SEPARATOR:=':'}  ;;
4824         esac
4825
4826         echo "$as_me:4826: result: $PATH_SEPARATOR" >&5
4827 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4828
4829 ###############################################################################
4830
4831 echo "$as_me:4831: checking if you want to build a separate terminfo library" >&5
4832 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4833
4834 # Check whether --with-termlib or --without-termlib was given.
4835 if test "${with_termlib+set}" = set; then
4836   withval="$with_termlib"
4837   with_termlib=$withval
4838 else
4839   with_termlib=no
4840 fi;
4841 echo "$as_me:4841: result: $with_termlib" >&5
4842 echo "${ECHO_T}$with_termlib" >&6
4843
4844 echo "$as_me:4844: checking if you want to build a separate tic library" >&5
4845 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4846
4847 # Check whether --with-ticlib or --without-ticlib was given.
4848 if test "${with_ticlib+set}" = set; then
4849   withval="$with_ticlib"
4850   with_ticlib=$withval
4851 else
4852   with_ticlib=no
4853 fi;
4854 echo "$as_me:4854: result: $with_ticlib" >&5
4855 echo "${ECHO_T}$with_ticlib" >&6
4856
4857 ### Checks for special libraries, must be done up-front.
4858 SHLIB_LIST=""
4859
4860 echo "$as_me:4860: checking if you want to link with the GPM mouse library" >&5
4861 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4862
4863 # Check whether --with-gpm or --without-gpm was given.
4864 if test "${with_gpm+set}" = set; then
4865   withval="$with_gpm"
4866   with_gpm=$withval
4867 else
4868   with_gpm=maybe
4869 fi;
4870 echo "$as_me:4870: result: $with_gpm" >&5
4871 echo "${ECHO_T}$with_gpm" >&6
4872
4873 if test "$with_gpm" != no ; then
4874         echo "$as_me:4874: checking for gpm.h" >&5
4875 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4876 if test "${ac_cv_header_gpm_h+set}" = set; then
4877   echo $ECHO_N "(cached) $ECHO_C" >&6
4878 else
4879   cat >conftest.$ac_ext <<_ACEOF
4880 #line 4880 "configure"
4881 #include "confdefs.h"
4882 #include <gpm.h>
4883 _ACEOF
4884 if { (eval echo "$as_me:4884: \"$ac_cpp conftest.$ac_ext\"") >&5
4885   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4886   ac_status=$?
4887   egrep -v '^ *\+' conftest.er1 >conftest.err
4888   rm -f conftest.er1
4889   cat conftest.err >&5
4890   echo "$as_me:4890: \$? = $ac_status" >&5
4891   (exit $ac_status); } >/dev/null; then
4892   if test -s conftest.err; then
4893     ac_cpp_err=$ac_c_preproc_warn_flag
4894   else
4895     ac_cpp_err=
4896   fi
4897 else
4898   ac_cpp_err=yes
4899 fi
4900 if test -z "$ac_cpp_err"; then
4901   ac_cv_header_gpm_h=yes
4902 else
4903   echo "$as_me: failed program was:" >&5
4904   cat conftest.$ac_ext >&5
4905   ac_cv_header_gpm_h=no
4906 fi
4907 rm -f conftest.err conftest.$ac_ext
4908 fi
4909 echo "$as_me:4909: result: $ac_cv_header_gpm_h" >&5
4910 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4911 if test $ac_cv_header_gpm_h = yes; then
4912
4913 cat >>confdefs.h <<\EOF
4914 #define HAVE_GPM_H 1
4915 EOF
4916
4917                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4918                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4919
4920 echo "${as_me:-configure}:4920: testing assuming we really have GPM library ..." 1>&5
4921
4922 cat >>confdefs.h <<\EOF
4923 #define HAVE_LIBGPM 1
4924 EOF
4925
4926                 else
4927                         echo "$as_me:4927: checking for Gpm_Open in -lgpm" >&5
4928 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4929 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4930   echo $ECHO_N "(cached) $ECHO_C" >&6
4931 else
4932   ac_check_lib_save_LIBS=$LIBS
4933 LIBS="-lgpm  $LIBS"
4934 cat >conftest.$ac_ext <<_ACEOF
4935 #line 4935 "configure"
4936 #include "confdefs.h"
4937
4938 /* Override any gcc2 internal prototype to avoid an error.  */
4939 #ifdef __cplusplus
4940 extern "C"
4941 #endif
4942 /* We use char because int might match the return type of a gcc2
4943    builtin and then its argument prototype would still apply.  */
4944 char Gpm_Open ();
4945 int
4946 main ()
4947 {
4948 Gpm_Open ();
4949   ;
4950   return 0;
4951 }
4952 _ACEOF
4953 rm -f conftest.$ac_objext conftest$ac_exeext
4954 if { (eval echo "$as_me:4954: \"$ac_link\"") >&5
4955   (eval $ac_link) 2>&5
4956   ac_status=$?
4957   echo "$as_me:4957: \$? = $ac_status" >&5
4958   (exit $ac_status); } &&
4959          { ac_try='test -s conftest$ac_exeext'
4960   { (eval echo "$as_me:4960: \"$ac_try\"") >&5
4961   (eval $ac_try) 2>&5
4962   ac_status=$?
4963   echo "$as_me:4963: \$? = $ac_status" >&5
4964   (exit $ac_status); }; }; then
4965   ac_cv_lib_gpm_Gpm_Open=yes
4966 else
4967   echo "$as_me: failed program was:" >&5
4968 cat conftest.$ac_ext >&5
4969 ac_cv_lib_gpm_Gpm_Open=no
4970 fi
4971 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4972 LIBS=$ac_check_lib_save_LIBS
4973 fi
4974 echo "$as_me:4974: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4975 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4976 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4977   :
4978 else
4979
4980                                 { { echo "$as_me:4980: error: Cannot link with GPM library" >&5
4981 echo "$as_me: error: Cannot link with GPM library" >&2;}
4982    { (exit 1); exit 1; }; }
4983                 fi
4984                 with_gpm=yes
4985
4986 fi
4987
4988 else
4989
4990                 test "$with_gpm" != maybe && { echo "$as_me:4990: WARNING: Cannot find GPM header" >&5
4991 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4992                 with_gpm=no
4993
4994 fi
4995
4996 fi
4997
4998 if test "$with_gpm" != no ; then
4999         echo "$as_me:4999: checking if you want to load GPM dynamically" >&5
5000 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5001
5002 # Check whether --with-dlsym or --without-dlsym was given.
5003 if test "${with_dlsym+set}" = set; then
5004   withval="$with_dlsym"
5005   with_dlsym=$withval
5006 else
5007   with_dlsym=yes
5008 fi;
5009         echo "$as_me:5009: result: $with_dlsym" >&5
5010 echo "${ECHO_T}$with_dlsym" >&6
5011         if test "x$with_dlsym" = xyes ; then
5012
5013 cf_have_dlsym=no
5014 echo "$as_me:5014: checking for dlsym" >&5
5015 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5016 if test "${ac_cv_func_dlsym+set}" = set; then
5017   echo $ECHO_N "(cached) $ECHO_C" >&6
5018 else
5019   cat >conftest.$ac_ext <<_ACEOF
5020 #line 5020 "configure"
5021 #include "confdefs.h"
5022 /* System header to define __stub macros and hopefully few prototypes,
5023     which can conflict with char dlsym (); below.  */
5024 #include <assert.h>
5025 /* Override any gcc2 internal prototype to avoid an error.  */
5026 #ifdef __cplusplus
5027 extern "C"
5028 #endif
5029 /* We use char because int might match the return type of a gcc2
5030    builtin and then its argument prototype would still apply.  */
5031 char dlsym ();
5032 char (*f) ();
5033
5034 int
5035 main ()
5036 {
5037 /* The GNU C library defines this for functions which it implements
5038     to always fail with ENOSYS.  Some functions are actually named
5039     something starting with __ and the normal name is an alias.  */
5040 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5041 choke me
5042 #else
5043 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5044 #endif
5045
5046   ;
5047   return 0;
5048 }
5049 _ACEOF
5050 rm -f conftest.$ac_objext conftest$ac_exeext
5051 if { (eval echo "$as_me:5051: \"$ac_link\"") >&5
5052   (eval $ac_link) 2>&5
5053   ac_status=$?
5054   echo "$as_me:5054: \$? = $ac_status" >&5
5055   (exit $ac_status); } &&
5056          { ac_try='test -s conftest$ac_exeext'
5057   { (eval echo "$as_me:5057: \"$ac_try\"") >&5
5058   (eval $ac_try) 2>&5
5059   ac_status=$?
5060   echo "$as_me:5060: \$? = $ac_status" >&5
5061   (exit $ac_status); }; }; then
5062   ac_cv_func_dlsym=yes
5063 else
5064   echo "$as_me: failed program was:" >&5
5065 cat conftest.$ac_ext >&5
5066 ac_cv_func_dlsym=no
5067 fi
5068 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5069 fi
5070 echo "$as_me:5070: result: $ac_cv_func_dlsym" >&5
5071 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5072 if test $ac_cv_func_dlsym = yes; then
5073   cf_have_dlsym=yes
5074 else
5075
5076 cf_have_libdl=no
5077 echo "$as_me:5077: checking for dlsym in -ldl" >&5
5078 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5079 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5080   echo $ECHO_N "(cached) $ECHO_C" >&6
5081 else
5082   ac_check_lib_save_LIBS=$LIBS
5083 LIBS="-ldl  $LIBS"
5084 cat >conftest.$ac_ext <<_ACEOF
5085 #line 5085 "configure"
5086 #include "confdefs.h"
5087
5088 /* Override any gcc2 internal prototype to avoid an error.  */
5089 #ifdef __cplusplus
5090 extern "C"
5091 #endif
5092 /* We use char because int might match the return type of a gcc2
5093    builtin and then its argument prototype would still apply.  */
5094 char dlsym ();
5095 int
5096 main ()
5097 {
5098 dlsym ();
5099   ;
5100   return 0;
5101 }
5102 _ACEOF
5103 rm -f conftest.$ac_objext conftest$ac_exeext
5104 if { (eval echo "$as_me:5104: \"$ac_link\"") >&5
5105   (eval $ac_link) 2>&5
5106   ac_status=$?
5107   echo "$as_me:5107: \$? = $ac_status" >&5
5108   (exit $ac_status); } &&
5109          { ac_try='test -s conftest$ac_exeext'
5110   { (eval echo "$as_me:5110: \"$ac_try\"") >&5
5111   (eval $ac_try) 2>&5
5112   ac_status=$?
5113   echo "$as_me:5113: \$? = $ac_status" >&5
5114   (exit $ac_status); }; }; then
5115   ac_cv_lib_dl_dlsym=yes
5116 else
5117   echo "$as_me: failed program was:" >&5
5118 cat conftest.$ac_ext >&5
5119 ac_cv_lib_dl_dlsym=no
5120 fi
5121 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5122 LIBS=$ac_check_lib_save_LIBS
5123 fi
5124 echo "$as_me:5124: result: $ac_cv_lib_dl_dlsym" >&5
5125 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5126 if test $ac_cv_lib_dl_dlsym = yes; then
5127
5128         cf_have_dlsym=yes
5129         cf_have_libdl=yes
5130 fi
5131
5132 fi
5133
5134 if test "$cf_have_dlsym" = yes ; then
5135         test "$cf_have_libdl" = yes &&
5136 cf_add_libs="-ldl"
5137 # Filter out duplicates - this happens with badly-designed ".pc" files...
5138 for cf_add_1lib in $LIBS
5139 do
5140         for cf_add_2lib in $cf_add_libs
5141         do
5142                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5143                 then
5144                         cf_add_1lib=
5145                         break
5146                 fi
5147         done
5148         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5149 done
5150 LIBS="$cf_add_libs"
5151
5152         echo "$as_me:5152: checking whether able to link to dl*() functions" >&5
5153 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5154         cat >conftest.$ac_ext <<_ACEOF
5155 #line 5155 "configure"
5156 #include "confdefs.h"
5157 #include <dlfcn.h>
5158 int
5159 main ()
5160 {
5161
5162                 void *obj;
5163                 if ((obj = dlopen("filename", 0)) != 0) {
5164                         if (dlsym(obj, "symbolname") == 0) {
5165                         dlclose(obj);
5166                         }
5167                 }
5168   ;
5169   return 0;
5170 }
5171 _ACEOF
5172 rm -f conftest.$ac_objext conftest$ac_exeext
5173 if { (eval echo "$as_me:5173: \"$ac_link\"") >&5
5174   (eval $ac_link) 2>&5
5175   ac_status=$?
5176   echo "$as_me:5176: \$? = $ac_status" >&5
5177   (exit $ac_status); } &&
5178          { ac_try='test -s conftest$ac_exeext'
5179   { (eval echo "$as_me:5179: \"$ac_try\"") >&5
5180   (eval $ac_try) 2>&5
5181   ac_status=$?
5182   echo "$as_me:5182: \$? = $ac_status" >&5
5183   (exit $ac_status); }; }; then
5184
5185 cat >>confdefs.h <<\EOF
5186 #define HAVE_LIBDL 1
5187 EOF
5188
5189 else
5190   echo "$as_me: failed program was:" >&5
5191 cat conftest.$ac_ext >&5
5192
5193                 { { echo "$as_me:5193: error: Cannot link test program for libdl" >&5
5194 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5195    { (exit 1); exit 1; }; }
5196 fi
5197 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5198         echo "$as_me:5198: result: ok" >&5
5199 echo "${ECHO_T}ok" >&6
5200 else
5201         { { echo "$as_me:5201: error: Cannot find dlsym function" >&5
5202 echo "$as_me: error: Cannot find dlsym function" >&2;}
5203    { (exit 1); exit 1; }; }
5204 fi
5205
5206                 if test "x$with_gpm" != xyes ; then
5207                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5208
5209 echo "${as_me:-configure}:5209: testing assuming soname for gpm is $with_gpm ..." 1>&5
5210
5211                         cf_cv_gpm_soname="$with_gpm"
5212                 else
5213
5214 echo "$as_me:5214: checking for soname of gpm library" >&5
5215 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5216 if test "${cf_cv_gpm_soname+set}" = set; then
5217   echo $ECHO_N "(cached) $ECHO_C" >&6
5218 else
5219
5220 cf_cv_gpm_soname=unknown
5221 if test "$cross_compiling" != yes ; then
5222 cat >conftest.$ac_ext <<CF_EOF
5223 #include <gpm.h>
5224 int main()
5225 {
5226 if (Gpm_Open(0,0)) Gpm_Close();
5227         ${cf_cv_main_return:-return}(0);
5228 }
5229 CF_EOF
5230 cf_save_LIBS="$LIBS"
5231
5232 cf_add_libs="-lgpm"
5233 # Filter out duplicates - this happens with badly-designed ".pc" files...
5234 for cf_add_1lib in $LIBS
5235 do
5236         for cf_add_2lib in $cf_add_libs
5237         do
5238                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5239                 then
5240                         cf_add_1lib=
5241                         break
5242                 fi
5243         done
5244         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5245 done
5246 LIBS="$cf_add_libs"
5247
5248         if { (eval echo "$as_me:5248: \"$ac_compile\"") >&5
5249   (eval $ac_compile) 2>&5
5250   ac_status=$?
5251   echo "$as_me:5251: \$? = $ac_status" >&5
5252   (exit $ac_status); } ; then
5253                 if { (eval echo "$as_me:5253: \"$ac_link\"") >&5
5254   (eval $ac_link) 2>&5
5255   ac_status=$?
5256   echo "$as_me:5256: \$? = $ac_status" >&5
5257   (exit $ac_status); } ; then
5258                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5259                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5260                 fi
5261         fi
5262 rm -rf conftest*
5263 LIBS="$cf_save_LIBS"
5264 fi
5265
5266 fi
5267 echo "$as_me:5267: result: $cf_cv_gpm_soname" >&5
5268 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5269
5270                 fi
5271                 test "$cf_cv_gpm_soname" != "unknown" &&
5272 cat >>confdefs.h <<EOF
5273 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5274 EOF
5275
5276                 SHLIB_LIST="-ldl $SHLIB_LIST"
5277         else
5278                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5279
5280 cf_add_libs="-lgpm"
5281 # Filter out duplicates - this happens with badly-designed ".pc" files...
5282 for cf_add_1lib in $TEST_LIBS
5283 do
5284         for cf_add_2lib in $cf_add_libs
5285         do
5286                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5287                 then
5288                         cf_add_1lib=
5289                         break
5290                 fi
5291         done
5292         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5293 done
5294 TEST_LIBS="$cf_add_libs"
5295
5296         fi
5297
5298 cat >>confdefs.h <<\EOF
5299 #define HAVE_LIBGPM 1
5300 EOF
5301
5302 echo "$as_me:5302: checking for Gpm_Wgetch in -lgpm" >&5
5303 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5304 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5305   echo $ECHO_N "(cached) $ECHO_C" >&6
5306 else
5307   ac_check_lib_save_LIBS=$LIBS
5308 LIBS="-lgpm  $LIBS"
5309 cat >conftest.$ac_ext <<_ACEOF
5310 #line 5310 "configure"
5311 #include "confdefs.h"
5312
5313 /* Override any gcc2 internal prototype to avoid an error.  */
5314 #ifdef __cplusplus
5315 extern "C"
5316 #endif
5317 /* We use char because int might match the return type of a gcc2
5318    builtin and then its argument prototype would still apply.  */
5319 char Gpm_Wgetch ();
5320 int
5321 main ()
5322 {
5323 Gpm_Wgetch ();
5324   ;
5325   return 0;
5326 }
5327 _ACEOF
5328 rm -f conftest.$ac_objext conftest$ac_exeext
5329 if { (eval echo "$as_me:5329: \"$ac_link\"") >&5
5330   (eval $ac_link) 2>&5
5331   ac_status=$?
5332   echo "$as_me:5332: \$? = $ac_status" >&5
5333   (exit $ac_status); } &&
5334          { ac_try='test -s conftest$ac_exeext'
5335   { (eval echo "$as_me:5335: \"$ac_try\"") >&5
5336   (eval $ac_try) 2>&5
5337   ac_status=$?
5338   echo "$as_me:5338: \$? = $ac_status" >&5
5339   (exit $ac_status); }; }; then
5340   ac_cv_lib_gpm_Gpm_Wgetch=yes
5341 else
5342   echo "$as_me: failed program was:" >&5
5343 cat conftest.$ac_ext >&5
5344 ac_cv_lib_gpm_Gpm_Wgetch=no
5345 fi
5346 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5347 LIBS=$ac_check_lib_save_LIBS
5348 fi
5349 echo "$as_me:5349: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5350 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5351 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5352
5353 echo "$as_me:5353: checking if GPM is weakly bound to curses library" >&5
5354 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5355 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5356   echo $ECHO_N "(cached) $ECHO_C" >&6
5357 else
5358
5359 cf_cv_check_gpm_wgetch=unknown
5360 if test "$cross_compiling" != yes ; then
5361
5362 cat >conftest.$ac_ext <<CF_EOF
5363 #include <gpm.h>
5364 int main()
5365 {
5366         Gpm_Wgetch();
5367         ${cf_cv_main_return:-return}(0);
5368 }
5369 CF_EOF
5370
5371         cf_save_LIBS="$LIBS"
5372         # This only works if we can look at the symbol table.  If a shared
5373         # library is stripped for install, we cannot use that.  So we're forced
5374         # to rely on the static library, noting that some packagers may not
5375         # include it.
5376         LIBS="-static -lgpm -dynamic $LIBS"
5377         if { (eval echo "$as_me:5377: \"$ac_compile\"") >&5
5378   (eval $ac_compile) 2>&5
5379   ac_status=$?
5380   echo "$as_me:5380: \$? = $ac_status" >&5
5381   (exit $ac_status); } ; then
5382                 if { (eval echo "$as_me:5382: \"$ac_link\"") >&5
5383   (eval $ac_link) 2>&5
5384   ac_status=$?
5385   echo "$as_me:5385: \$? = $ac_status" >&5
5386   (exit $ac_status); } ; then
5387                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5388                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5389                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5390                 fi
5391         fi
5392         rm -rf conftest*
5393         LIBS="$cf_save_LIBS"
5394 fi
5395
5396 fi
5397 echo "$as_me:5397: result: $cf_cv_check_gpm_wgetch" >&5
5398 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5399
5400 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5401         { echo "$as_me:5401: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5402 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5403 fi
5404
5405 fi
5406
5407 fi
5408
5409 # not everyone has "test -c"
5410 if test -c /dev/sysmouse 2>/dev/null ; then
5411 echo "$as_me:5411: checking if you want to use sysmouse" >&5
5412 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5413
5414 # Check whether --with-sysmouse or --without-sysmouse was given.
5415 if test "${with_sysmouse+set}" = set; then
5416   withval="$with_sysmouse"
5417   cf_with_sysmouse=$withval
5418 else
5419   cf_with_sysmouse=maybe
5420 fi;
5421         if test "$cf_with_sysmouse" != no ; then
5422         cat >conftest.$ac_ext <<_ACEOF
5423 #line 5423 "configure"
5424 #include "confdefs.h"
5425
5426 #include <osreldate.h>
5427 #if (__FreeBSD_version >= 400017)
5428 #include <sys/consio.h>
5429 #include <sys/fbio.h>
5430 #else
5431 #include <machine/console.h>
5432 #endif
5433
5434 int
5435 main ()
5436 {
5437
5438         struct mouse_info the_mouse;
5439         ioctl(0, CONS_MOUSECTL, &the_mouse);
5440
5441   ;
5442   return 0;
5443 }
5444 _ACEOF
5445 rm -f conftest.$ac_objext
5446 if { (eval echo "$as_me:5446: \"$ac_compile\"") >&5
5447   (eval $ac_compile) 2>&5
5448   ac_status=$?
5449   echo "$as_me:5449: \$? = $ac_status" >&5
5450   (exit $ac_status); } &&
5451          { ac_try='test -s conftest.$ac_objext'
5452   { (eval echo "$as_me:5452: \"$ac_try\"") >&5
5453   (eval $ac_try) 2>&5
5454   ac_status=$?
5455   echo "$as_me:5455: \$? = $ac_status" >&5
5456   (exit $ac_status); }; }; then
5457   cf_with_sysmouse=yes
5458 else
5459   echo "$as_me: failed program was:" >&5
5460 cat conftest.$ac_ext >&5
5461 cf_with_sysmouse=no
5462 fi
5463 rm -f conftest.$ac_objext conftest.$ac_ext
5464         fi
5465 echo "$as_me:5465: result: $cf_with_sysmouse" >&5
5466 echo "${ECHO_T}$cf_with_sysmouse" >&6
5467 test "$cf_with_sysmouse" = yes &&
5468 cat >>confdefs.h <<\EOF
5469 #define USE_SYSMOUSE 1
5470 EOF
5471
5472 fi
5473
5474 if test X"$CC_G_OPT" = X"" ; then
5475         CC_G_OPT='-g'
5476         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5477 fi
5478
5479 if test X"$CXX_G_OPT" = X"" ; then
5480         CXX_G_OPT='-g'
5481         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5482 fi
5483
5484 echo "$as_me:5484: checking for default loader flags" >&5
5485 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5486 case $DFT_LWR_MODEL in
5487 libtool) LD_MODEL=''   ;;
5488 normal)  LD_MODEL=''   ;;
5489 debug)   LD_MODEL=$CC_G_OPT ;;
5490 profile) LD_MODEL='-pg';;
5491 shared)  LD_MODEL=''   ;;
5492 esac
5493 echo "$as_me:5493: result: $LD_MODEL" >&5
5494 echo "${ECHO_T}$LD_MODEL" >&6
5495
5496 case $DFT_LWR_MODEL in
5497 shared)
5498
5499 echo "$as_me:5499: checking if rpath option should be used" >&5
5500 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5501
5502 # Check whether --enable-rpath or --disable-rpath was given.
5503 if test "${enable_rpath+set}" = set; then
5504   enableval="$enable_rpath"
5505   cf_cv_enable_rpath=$enableval
5506 else
5507   cf_cv_enable_rpath=no
5508 fi;
5509 echo "$as_me:5509: result: $cf_cv_enable_rpath" >&5
5510 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5511
5512 echo "$as_me:5512: checking if shared libraries should be relinked during install" >&5
5513 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5514
5515 # Check whether --enable-relink or --disable-relink was given.
5516 if test "${enable_relink+set}" = set; then
5517   enableval="$enable_relink"
5518   cf_cv_do_relink=$enableval
5519 else
5520   cf_cv_do_relink=yes
5521 fi;
5522 echo "$as_me:5522: result: $cf_cv_do_relink" >&5
5523 echo "${ECHO_T}$cf_cv_do_relink" >&6
5524         ;;
5525 esac
5526
5527 # we will build libraries one-level down.
5528 rel_builddir=..
5529
5530 LD_RPATH_OPT=
5531 echo "$as_me:5531: checking for an rpath option" >&5
5532 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5533 case $cf_cv_system_name in #(vi
5534 irix*) #(vi
5535         if test "$GCC" = yes; then
5536                 LD_RPATH_OPT="-Wl,-rpath,"
5537         else
5538                 LD_RPATH_OPT="-rpath "
5539         fi
5540         ;;
5541 linux*|gnu*|k*bsd*-gnu) #(vi
5542         LD_RPATH_OPT="-Wl,-rpath,"
5543         ;;
5544 openbsd[2-9].*|mirbsd*) #(vi
5545         LD_RPATH_OPT="-Wl,-rpath,"
5546         ;;
5547 dragonfly*|freebsd*) #(vi
5548         LD_RPATH_OPT="-rpath "
5549         ;;
5550 netbsd*) #(vi
5551         LD_RPATH_OPT="-Wl,-rpath,"
5552         ;;
5553 osf*|mls+*) #(vi
5554         LD_RPATH_OPT="-rpath "
5555         ;;
5556 solaris2*) #(vi
5557         LD_RPATH_OPT="-R"
5558         ;;
5559 *)
5560         ;;
5561 esac
5562 echo "$as_me:5562: result: $LD_RPATH_OPT" >&5
5563 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5564
5565 case "x$LD_RPATH_OPT" in #(vi
5566 x-R*)
5567         echo "$as_me:5567: checking if we need a space after rpath option" >&5
5568 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5569         cf_save_LIBS="$LIBS"
5570
5571 cf_add_libs="${LD_RPATH_OPT}$libdir"
5572 # Filter out duplicates - this happens with badly-designed ".pc" files...
5573 for cf_add_1lib in $LIBS
5574 do
5575         for cf_add_2lib in $cf_add_libs
5576         do
5577                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5578                 then
5579                         cf_add_1lib=
5580                         break
5581                 fi
5582         done
5583         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5584 done
5585 LIBS="$cf_add_libs"
5586
5587         cat >conftest.$ac_ext <<_ACEOF
5588 #line 5588 "configure"
5589 #include "confdefs.h"
5590
5591 int
5592 main ()
5593 {
5594
5595   ;
5596   return 0;
5597 }
5598 _ACEOF
5599 rm -f conftest.$ac_objext conftest$ac_exeext
5600 if { (eval echo "$as_me:5600: \"$ac_link\"") >&5
5601   (eval $ac_link) 2>&5
5602   ac_status=$?
5603   echo "$as_me:5603: \$? = $ac_status" >&5
5604   (exit $ac_status); } &&
5605          { ac_try='test -s conftest$ac_exeext'
5606   { (eval echo "$as_me:5606: \"$ac_try\"") >&5
5607   (eval $ac_try) 2>&5
5608   ac_status=$?
5609   echo "$as_me:5609: \$? = $ac_status" >&5
5610   (exit $ac_status); }; }; then
5611   cf_rpath_space=no
5612 else
5613   echo "$as_me: failed program was:" >&5
5614 cat conftest.$ac_ext >&5
5615 cf_rpath_space=yes
5616 fi
5617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5618         LIBS="$cf_save_LIBS"
5619         echo "$as_me:5619: result: $cf_rpath_space" >&5
5620 echo "${ECHO_T}$cf_rpath_space" >&6
5621         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5622         ;;
5623 esac
5624
5625         RM_SHARED_OPTS=
5626         LOCAL_LDFLAGS=
5627         LOCAL_LDFLAGS2=
5628         LD_SHARED_OPTS=
5629         INSTALL_LIB="-m 644"
5630         : ${rel_builddir:=.}
5631
5632         shlibdir=$libdir
5633
5634         MAKE_DLLS="#"
5635
5636         cf_cv_do_symlinks=no
5637         cf_ld_rpath_opt=
5638         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5639
5640         echo "$as_me:5640: checking if release/abi version should be used for shared libs" >&5
5641 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5642
5643 # Check whether --with-shlib-version or --without-shlib-version was given.
5644 if test "${with_shlib_version+set}" = set; then
5645   withval="$with_shlib_version"
5646   test -z "$withval" && withval=auto
5647         case $withval in #(vi
5648         yes) #(vi
5649                 cf_cv_shlib_version=auto
5650                 ;;
5651         rel|abi|auto|no) #(vi
5652                 cf_cv_shlib_version=$withval
5653                 ;;
5654         *)
5655                 { { echo "$as_me:5655: error: option value must be one of: rel, abi, auto or no" >&5
5656 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5657    { (exit 1); exit 1; }; }
5658                 ;;
5659         esac
5660
5661 else
5662   cf_cv_shlib_version=auto
5663 fi;
5664         echo "$as_me:5664: result: $cf_cv_shlib_version" >&5
5665 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5666
5667         cf_cv_rm_so_locs=no
5668         cf_try_cflags=
5669
5670         # Some less-capable ports of gcc support only -fpic
5671         CC_SHARED_OPTS=
5672         if test "$GCC" = yes
5673         then
5674                 echo "$as_me:5674: checking which $CC option to use" >&5
5675 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5676                 cf_save_CFLAGS="$CFLAGS"
5677                 for CC_SHARED_OPTS in -fPIC -fpic ''
5678                 do
5679                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5680                         cat >conftest.$ac_ext <<_ACEOF
5681 #line 5681 "configure"
5682 #include "confdefs.h"
5683 #include <stdio.h>
5684 int
5685 main ()
5686 {
5687 int x = 1
5688   ;
5689   return 0;
5690 }
5691 _ACEOF
5692 rm -f conftest.$ac_objext
5693 if { (eval echo "$as_me:5693: \"$ac_compile\"") >&5
5694   (eval $ac_compile) 2>&5
5695   ac_status=$?
5696   echo "$as_me:5696: \$? = $ac_status" >&5
5697   (exit $ac_status); } &&
5698          { ac_try='test -s conftest.$ac_objext'
5699   { (eval echo "$as_me:5699: \"$ac_try\"") >&5
5700   (eval $ac_try) 2>&5
5701   ac_status=$?
5702   echo "$as_me:5702: \$? = $ac_status" >&5
5703   (exit $ac_status); }; }; then
5704   break
5705 else
5706   echo "$as_me: failed program was:" >&5
5707 cat conftest.$ac_ext >&5
5708 fi
5709 rm -f conftest.$ac_objext conftest.$ac_ext
5710                 done
5711                 echo "$as_me:5711: result: $CC_SHARED_OPTS" >&5
5712 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5713                 CFLAGS="$cf_save_CFLAGS"
5714         fi
5715
5716         cf_cv_shlib_version_infix=no
5717
5718         case $cf_cv_system_name in #(vi
5719         aix4.3-9*|aix[5-7]*) #(vi
5720                 if test "$GCC" = yes; then
5721                         CC_SHARED_OPTS=
5722                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5723                 else
5724                         # CC_SHARED_OPTS='-qpic=large -G'
5725                         # perhaps "-bM:SRE -bnoentry -bexpall"
5726                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5727                 fi
5728                 ;;
5729         beos*) #(vi
5730                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5731                 ;;
5732         cygwin*) #(vi
5733                 CC_SHARED_OPTS=
5734                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5735                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5736                 cf_cv_shlib_version=cygdll
5737                 cf_cv_shlib_version_infix=cygdll
5738                 shlibdir=$bindir
5739                 MAKE_DLLS=
5740                 cat >mk_shared_lib.sh <<-CF_EOF
5741                 #!/bin/sh
5742                 SHARED_LIB=\$1
5743                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5744                 shift
5745                 cat <<-EOF
5746                 Linking shared library
5747                 ** SHARED_LIB \$SHARED_LIB
5748                 ** IMPORT_LIB \$IMPORT_LIB
5749 EOF
5750                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5751 CF_EOF
5752                 chmod +x mk_shared_lib.sh
5753                 ;;
5754         msys*) #(vi
5755                 CC_SHARED_OPTS=
5756                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5757                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5758                 cf_cv_shlib_version=msysdll
5759                 cf_cv_shlib_version_infix=msysdll
5760                 shlibdir=$bindir
5761                 MAKE_DLLS=
5762                 cat >mk_shared_lib.sh <<-CF_EOF
5763                 #!/bin/sh
5764                 SHARED_LIB=\$1
5765                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5766                 shift
5767                 cat <<-EOF
5768                 Linking shared library
5769                 ** SHARED_LIB \$SHARED_LIB
5770                 ** IMPORT_LIB \$IMPORT_LIB
5771 EOF
5772                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5773 CF_EOF
5774                 chmod +x mk_shared_lib.sh
5775                 ;;
5776         darwin*) #(vi
5777                 cf_try_cflags="no-cpp-precomp"
5778                 CC_SHARED_OPTS="-dynamic"
5779                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5780                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5781                 cf_cv_shlib_version_infix=yes
5782                 echo "$as_me:5782: checking if ld -search_paths_first works" >&5
5783 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5784 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5785   echo $ECHO_N "(cached) $ECHO_C" >&6
5786 else
5787
5788                         cf_save_LDFLAGS=$LDFLAGS
5789                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5790                         cat >conftest.$ac_ext <<_ACEOF
5791 #line 5791 "configure"
5792 #include "confdefs.h"
5793
5794 int
5795 main ()
5796 {
5797 int i;
5798   ;
5799   return 0;
5800 }
5801 _ACEOF
5802 rm -f conftest.$ac_objext conftest$ac_exeext
5803 if { (eval echo "$as_me:5803: \"$ac_link\"") >&5
5804   (eval $ac_link) 2>&5
5805   ac_status=$?
5806   echo "$as_me:5806: \$? = $ac_status" >&5
5807   (exit $ac_status); } &&
5808          { ac_try='test -s conftest$ac_exeext'
5809   { (eval echo "$as_me:5809: \"$ac_try\"") >&5
5810   (eval $ac_try) 2>&5
5811   ac_status=$?
5812   echo "$as_me:5812: \$? = $ac_status" >&5
5813   (exit $ac_status); }; }; then
5814   cf_cv_ldflags_search_paths_first=yes
5815 else
5816   echo "$as_me: failed program was:" >&5
5817 cat conftest.$ac_ext >&5
5818 cf_cv_ldflags_search_paths_first=no
5819 fi
5820 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5821                                 LDFLAGS=$cf_save_LDFLAGS
5822 fi
5823 echo "$as_me:5823: result: $cf_cv_ldflags_search_paths_first" >&5
5824 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5825                 if test $cf_cv_ldflags_search_paths_first = yes; then
5826                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5827                 fi
5828                 ;;
5829         hpux[7-8]*) #(vi
5830                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5831                 if test "$GCC" != yes; then
5832                         CC_SHARED_OPTS='+Z'
5833                 fi
5834                 MK_SHARED_LIB='${LD} -b -o $@'
5835                 INSTALL_LIB="-m 555"
5836                 ;;
5837         hpux*) #(vi
5838                 # (tested with gcc 2.7.2 -- I don't have c89)
5839                 if test "$GCC" = yes; then
5840                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5841                 else
5842                         CC_SHARED_OPTS='+Z'
5843                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5844                 fi
5845                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5846                 # HP-UX shared libraries must be executable, and should be
5847                 # readonly to exploit a quirk in the memory manager.
5848                 INSTALL_LIB="-m 555"
5849                 ;;
5850         interix*)
5851                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5852                 if test "$cf_cv_shlib_version" = rel; then
5853                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5854                 else
5855                         cf_shared_soname='`basename `'
5856                 fi
5857                 CC_SHARED_OPTS=
5858                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5859                 ;;
5860         irix*) #(vi
5861                 if test "$cf_cv_enable_rpath" = yes ; then
5862                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5863                 fi
5864                 # tested with IRIX 5.2 and 'cc'.
5865                 if test "$GCC" != yes; then
5866                         CC_SHARED_OPTS='-KPIC'
5867                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5868                 else
5869                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5870                 fi
5871                 cf_cv_rm_so_locs=yes
5872                 ;;
5873         linux*|gnu*|k*bsd*-gnu) #(vi
5874                 if test "$DFT_LWR_MODEL" = "shared" ; then
5875                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5876                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5877                 fi
5878                 if test "$cf_cv_enable_rpath" = yes ; then
5879                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5880                 fi
5881
5882         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5883         if test "$cf_cv_shlib_version" = rel; then
5884                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5885         else
5886                 cf_cv_shared_soname='`basename $@`'
5887         fi
5888
5889                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5890                 ;;
5891         mingw*) #(vi
5892                 cf_cv_shlib_version=mingw
5893                 cf_cv_shlib_version_infix=mingw
5894                 shlibdir=$bindir
5895                 MAKE_DLLS=
5896                 if test "$DFT_LWR_MODEL" = "shared" ; then
5897                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5898                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5899                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5900                 fi
5901                 CC_SHARED_OPTS=
5902                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5903                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5904                 cat >mk_shared_lib.sh <<-CF_EOF
5905                 #!/bin/sh
5906                 SHARED_LIB=\$1
5907                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5908                 shift
5909                 cat <<-EOF
5910                 Linking shared library
5911                 ** SHARED_LIB \$SHARED_LIB
5912                 ** IMPORT_LIB \$IMPORT_LIB
5913 EOF
5914                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5915 CF_EOF
5916                 chmod +x mk_shared_lib.sh
5917                 ;;
5918         openbsd[2-9].*|mirbsd*) #(vi
5919                 if test "$DFT_LWR_MODEL" = "shared" ; then
5920                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5921                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5922                 fi
5923                 if test "$cf_cv_enable_rpath" = yes ; then
5924                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5925                 fi
5926                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5927
5928         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5929         if test "$cf_cv_shlib_version" = rel; then
5930                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5931         else
5932                 cf_cv_shared_soname='`basename $@`'
5933         fi
5934
5935                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5936                 ;;
5937         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5938                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5939                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5940                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5941                 ;;
5942         dragonfly*|freebsd*) #(vi
5943                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5944                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5945                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5946                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5947                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5948                 fi
5949
5950         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5951         if test "$cf_cv_shlib_version" = rel; then
5952                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5953         else
5954                 cf_cv_shared_soname='`basename $@`'
5955         fi
5956
5957                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5958                 ;;
5959         netbsd*) #(vi
5960                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5961                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5962                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5963                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5964                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5965                         if test "$cf_cv_shlib_version" = auto; then
5966                         if test -f /usr/libexec/ld.elf_so; then
5967                                 cf_cv_shlib_version=abi
5968                         else
5969                                 cf_cv_shlib_version=rel
5970                         fi
5971                         fi
5972
5973         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5974         if test "$cf_cv_shlib_version" = rel; then
5975                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5976         else
5977                 cf_cv_shared_soname='`basename $@`'
5978         fi
5979
5980                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5981                 else
5982                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
5983                 fi
5984                 ;;
5985         osf*|mls+*) #(vi
5986                 # tested with OSF/1 V3.2 and 'cc'
5987                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5988                 # link with shared libs).
5989                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5990                 case $host_os in #(vi
5991                 osf4*)
5992                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5993                         ;;
5994                 esac
5995                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5996                 if test "$DFT_LWR_MODEL" = "shared" ; then
5997                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5998                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5999                 fi
6000                 cf_cv_rm_so_locs=yes
6001                 ;;
6002         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
6003                 # tested with osr5.0.5
6004                 if test "$GCC" != yes; then
6005                         CC_SHARED_OPTS='-belf -KPIC'
6006                 fi
6007                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6008                 if test "$cf_cv_enable_rpath" = yes ; then
6009                         # only way is to set LD_RUN_PATH but no switch for it
6010                         RUN_PATH=$libdir
6011                 fi
6012                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6013                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6014                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6015                 ;;
6016         sunos4*) #(vi
6017                 # tested with SunOS 4.1.1 and gcc 2.7.0
6018                 if test "$GCC" != yes; then
6019                         CC_SHARED_OPTS='-KPIC'
6020                 fi
6021                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6022                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6023                 ;;
6024         solaris2*) #(vi
6025                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6026                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6027                 if test "$DFT_LWR_MODEL" = "shared" ; then
6028                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6029                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6030                 fi
6031                 if test "$cf_cv_enable_rpath" = yes ; then
6032                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6033                 fi
6034
6035         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6036         if test "$cf_cv_shlib_version" = rel; then
6037                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6038         else
6039                 cf_cv_shared_soname='`basename $@`'
6040         fi
6041
6042                 if test "$GCC" != yes; then
6043                         cf_save_CFLAGS="$CFLAGS"
6044                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6045                         do
6046                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6047                                 cat >conftest.$ac_ext <<_ACEOF
6048 #line 6048 "configure"
6049 #include "confdefs.h"
6050 #include <stdio.h>
6051 int
6052 main ()
6053 {
6054 printf("Hello\n");
6055   ;
6056   return 0;
6057 }
6058 _ACEOF
6059 rm -f conftest.$ac_objext
6060 if { (eval echo "$as_me:6060: \"$ac_compile\"") >&5
6061   (eval $ac_compile) 2>&5
6062   ac_status=$?
6063   echo "$as_me:6063: \$? = $ac_status" >&5
6064   (exit $ac_status); } &&
6065          { ac_try='test -s conftest.$ac_objext'
6066   { (eval echo "$as_me:6066: \"$ac_try\"") >&5
6067   (eval $ac_try) 2>&5
6068   ac_status=$?
6069   echo "$as_me:6069: \$? = $ac_status" >&5
6070   (exit $ac_status); }; }; then
6071   break
6072 else
6073   echo "$as_me: failed program was:" >&5
6074 cat conftest.$ac_ext >&5
6075 fi
6076 rm -f conftest.$ac_objext conftest.$ac_ext
6077                         done
6078                         CFLAGS="$cf_save_CFLAGS"
6079                         CC_SHARED_OPTS=$cf_shared_opts
6080                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6081                 else
6082                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6083                 fi
6084                 ;;
6085         sysv5uw7*|unix_sv*) #(vi
6086                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6087                 if test "$GCC" != yes; then
6088                         CC_SHARED_OPTS='-KPIC'
6089                 fi
6090                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6091                 ;;
6092         *)
6093                 CC_SHARED_OPTS='unknown'
6094                 MK_SHARED_LIB='echo unknown'
6095                 ;;
6096         esac
6097
6098         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6099         case "$cf_cv_shlib_version" in #(vi
6100         rel|abi)
6101                 case "$MK_SHARED_LIB" in #(vi
6102                 *'-o $@') #(vi
6103                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6104                         ;;
6105                 *)
6106                         { echo "$as_me:6106: WARNING: ignored --with-shlib-version" >&5
6107 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6108                         ;;
6109                 esac
6110                 ;;
6111         esac
6112
6113         if test -n "$cf_try_cflags"
6114         then
6115 cat > conftest.$ac_ext <<EOF
6116 #line 6116 "${as_me:-configure}"
6117 #include <stdio.h>
6118 int main(int argc, char *argv[])
6119 {
6120         printf("hello\n");
6121         return (argv[argc-1] == 0) ;
6122 }
6123 EOF
6124                 cf_save_CFLAGS="$CFLAGS"
6125                 for cf_opt in $cf_try_cflags
6126                 do
6127                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6128                         echo "$as_me:6128: checking if CFLAGS option -$cf_opt works" >&5
6129 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6130                         if { (eval echo "$as_me:6130: \"$ac_compile\"") >&5
6131   (eval $ac_compile) 2>&5
6132   ac_status=$?
6133   echo "$as_me:6133: \$? = $ac_status" >&5
6134   (exit $ac_status); }; then
6135                                 echo "$as_me:6135: result: yes" >&5
6136 echo "${ECHO_T}yes" >&6
6137                                 cf_save_CFLAGS="$CFLAGS"
6138                         else
6139                                 echo "$as_me:6139: result: no" >&5
6140 echo "${ECHO_T}no" >&6
6141                         fi
6142                 done
6143                 CFLAGS="$cf_save_CFLAGS"
6144         fi
6145
6146         # RPATH_LIST is a colon-separated list of directories
6147         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6148         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6149
6150         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6151
6152         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6153
6154 echo "${as_me:-configure}:6154: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6155
6156         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6157
6158 echo "${as_me:-configure}:6158: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6159
6160 if test "$CC_SHARED_OPTS" = "unknown"; then
6161         for model in $cf_list_models; do
6162                 if test "$model" = "shared"; then
6163                         { { echo "$as_me:6163: error: Shared libraries are not supported in this version" >&5
6164 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6165    { (exit 1); exit 1; }; }
6166                 fi
6167         done
6168 fi
6169
6170 # pretend that ncurses==ncursesw==ncursest
6171 echo "$as_me:6171: checking if you want to disable library suffixes" >&5
6172 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6173
6174 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6175 if test "${enable_lib_suffixes+set}" = set; then
6176   enableval="$enable_lib_suffixes"
6177   disable_lib_suffixes=$enableval
6178 else
6179   disable_lib_suffixes=no
6180 fi;
6181 echo "$as_me:6181: result: $disable_lib_suffixes" >&5
6182 echo "${ECHO_T}$disable_lib_suffixes" >&6
6183
6184 ### If we're building with rpath, try to link non-standard libs that way too.
6185 if test "$DFT_LWR_MODEL" = "shared"; then
6186
6187 echo "$as_me:6187: checking if rpath-hack should be disabled" >&5
6188 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6189
6190 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6191 if test "${enable_rpath_hack+set}" = set; then
6192   enableval="$enable_rpath_hack"
6193   test "$enableval" != no && enableval=yes
6194   if test "$enableval" != "yes" ; then
6195     cf_disable_rpath_hack=yes
6196   else
6197     cf_disable_rpath_hack=no
6198   fi
6199 else
6200   enableval=yes
6201   cf_disable_rpath_hack=no
6202
6203 fi;
6204 echo "$as_me:6204: result: $cf_disable_rpath_hack" >&5
6205 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6206 if test "$cf_disable_rpath_hack" = no ; then
6207
6208 echo "$as_me:6208: checking for updated LDFLAGS" >&5
6209 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6210 if test -n "$LD_RPATH_OPT" ; then
6211         echo "$as_me:6211: result: maybe" >&5
6212 echo "${ECHO_T}maybe" >&6
6213
6214         for ac_prog in ldd
6215 do
6216   # Extract the first word of "$ac_prog", so it can be a program name with args.
6217 set dummy $ac_prog; ac_word=$2
6218 echo "$as_me:6218: checking for $ac_word" >&5
6219 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6220 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6221   echo $ECHO_N "(cached) $ECHO_C" >&6
6222 else
6223   if test -n "$cf_ldd_prog"; then
6224   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6225 else
6226   ac_save_IFS=$IFS; IFS=$ac_path_separator
6227 ac_dummy="$PATH"
6228 for ac_dir in $ac_dummy; do
6229   IFS=$ac_save_IFS
6230   test -z "$ac_dir" && ac_dir=.
6231   $as_executable_p "$ac_dir/$ac_word" || continue
6232 ac_cv_prog_cf_ldd_prog="$ac_prog"
6233 echo "$as_me:6233: found $ac_dir/$ac_word" >&5
6234 break
6235 done
6236
6237 fi
6238 fi
6239 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6240 if test -n "$cf_ldd_prog"; then
6241   echo "$as_me:6241: result: $cf_ldd_prog" >&5
6242 echo "${ECHO_T}$cf_ldd_prog" >&6
6243 else
6244   echo "$as_me:6244: result: no" >&5
6245 echo "${ECHO_T}no" >&6
6246 fi
6247
6248   test -n "$cf_ldd_prog" && break
6249 done
6250 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6251
6252         cf_rpath_list="/usr/lib /lib"
6253         if test "$cf_ldd_prog" != no
6254         then
6255                 cf_rpath_oops=
6256
6257 cat >conftest.$ac_ext <<_ACEOF
6258 #line 6258 "configure"
6259 #include "confdefs.h"
6260 #include <stdio.h>
6261 int
6262 main ()
6263 {
6264 printf("Hello");
6265   ;
6266   return 0;
6267 }
6268 _ACEOF
6269 rm -f conftest.$ac_objext conftest$ac_exeext
6270 if { (eval echo "$as_me:6270: \"$ac_link\"") >&5
6271   (eval $ac_link) 2>&5
6272   ac_status=$?
6273   echo "$as_me:6273: \$? = $ac_status" >&5
6274   (exit $ac_status); } &&
6275          { ac_try='test -s conftest$ac_exeext'
6276   { (eval echo "$as_me:6276: \"$ac_try\"") >&5
6277   (eval $ac_try) 2>&5
6278   ac_status=$?
6279   echo "$as_me:6279: \$? = $ac_status" >&5
6280   (exit $ac_status); }; }; then
6281   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6282                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6283 else
6284   echo "$as_me: failed program was:" >&5
6285 cat conftest.$ac_ext >&5
6286 fi
6287 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6288
6289                 # If we passed the link-test, but get a "not found" on a given library,
6290                 # this could be due to inept reconfiguration of gcc to make it only
6291                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6292                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6293                 # /usr/local libraries.
6294                 if test -n "$cf_rpath_oops"
6295                 then
6296                         for cf_rpath_src in $cf_rpath_oops
6297                         do
6298                                 for cf_rpath_dir in \
6299                                         /usr/local \
6300                                         /usr/pkg \
6301                                         /opt/sfw
6302                                 do
6303                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6304                                         then
6305                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6306
6307 echo "${as_me:-configure}:6307: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6308
6309                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6310                                                 break
6311                                         fi
6312                                 done
6313                         done
6314                 fi
6315         fi
6316
6317         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6318
6319 echo "${as_me:-configure}:6319: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6320
6321 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6322
6323 echo "${as_me:-configure}:6323: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6324
6325 cf_rpath_dst=
6326 for cf_rpath_src in $LDFLAGS
6327 do
6328         case $cf_rpath_src in #(vi
6329         -L*) #(vi
6330
6331                 # check if this refers to a directory which we will ignore
6332                 cf_rpath_skip=no
6333                 if test -n "$cf_rpath_list"
6334                 then
6335                         for cf_rpath_item in $cf_rpath_list
6336                         do
6337                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6338                                 then
6339                                         cf_rpath_skip=yes
6340                                         break
6341                                 fi
6342                         done
6343                 fi
6344
6345                 if test "$cf_rpath_skip" = no
6346                 then
6347                         # transform the option
6348                         if test "$LD_RPATH_OPT" = "-R " ; then
6349                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6350                         else
6351                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6352                         fi
6353
6354                         # if we have not already added this, add it now
6355                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6356                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6357                         then
6358                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6359
6360 echo "${as_me:-configure}:6360: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6361
6362                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6363                         fi
6364                 fi
6365                 ;;
6366         esac
6367         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6368 done
6369 LDFLAGS=$cf_rpath_dst
6370
6371 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6372
6373 echo "${as_me:-configure}:6373: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6374
6375 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6376
6377 echo "${as_me:-configure}:6377: testing ...checking LIBS $LIBS ..." 1>&5
6378
6379 cf_rpath_dst=
6380 for cf_rpath_src in $LIBS
6381 do
6382         case $cf_rpath_src in #(vi
6383         -L*) #(vi
6384
6385                 # check if this refers to a directory which we will ignore
6386                 cf_rpath_skip=no
6387                 if test -n "$cf_rpath_list"
6388                 then
6389                         for cf_rpath_item in $cf_rpath_list
6390                         do
6391                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6392                                 then
6393                                         cf_rpath_skip=yes
6394                                         break
6395                                 fi
6396                         done
6397                 fi
6398
6399                 if test "$cf_rpath_skip" = no
6400                 then
6401                         # transform the option
6402                         if test "$LD_RPATH_OPT" = "-R " ; then
6403                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6404                         else
6405                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6406                         fi
6407
6408                         # if we have not already added this, add it now
6409                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6410                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6411                         then
6412                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6413
6414 echo "${as_me:-configure}:6414: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6415
6416                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6417                         fi
6418                 fi
6419                 ;;
6420         esac
6421         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6422 done
6423 LIBS=$cf_rpath_dst
6424
6425 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6426
6427 echo "${as_me:-configure}:6427: testing ...checked LIBS $LIBS ..." 1>&5
6428
6429         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6430
6431 echo "${as_me:-configure}:6431: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6432
6433 else
6434         echo "$as_me:6434: result: no" >&5
6435 echo "${ECHO_T}no" >&6
6436 fi
6437
6438 fi
6439
6440 fi
6441
6442 ###############################################################################
6443
6444 ###     use option --disable-overwrite to leave out the link to -lcurses
6445 echo "$as_me:6445: checking if you wish to install ncurses overwriting curses" >&5
6446 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6447
6448 # Check whether --enable-overwrite or --disable-overwrite was given.
6449 if test "${enable_overwrite+set}" = set; then
6450   enableval="$enable_overwrite"
6451   with_overwrite=$enableval
6452 else
6453   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6454 fi;
6455 echo "$as_me:6455: result: $with_overwrite" >&5
6456 echo "${ECHO_T}$with_overwrite" >&6
6457
6458 echo "$as_me:6458: checking if external terminfo-database is used" >&5
6459 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6460
6461 # Check whether --enable-database or --disable-database was given.
6462 if test "${enable_database+set}" = set; then
6463   enableval="$enable_database"
6464   use_database=$enableval
6465 else
6466   use_database=yes
6467 fi;
6468 echo "$as_me:6468: result: $use_database" >&5
6469 echo "${ECHO_T}$use_database" >&6
6470
6471 case $host_os in #(vi
6472 os2*) #(vi
6473         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6474         ;;
6475 *) #(vi
6476         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6477         ;;
6478 esac
6479
6480 NCURSES_USE_DATABASE=0
6481 if test "$use_database" != no ; then
6482         NCURSES_USE_DATABASE=1
6483
6484         echo "$as_me:6484: checking which terminfo source-file will be installed" >&5
6485 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6486
6487 # Check whether --with-database or --without-database was given.
6488 if test "${with_database+set}" = set; then
6489   withval="$with_database"
6490   TERMINFO_SRC=$withval
6491 fi;
6492         echo "$as_me:6492: result: $TERMINFO_SRC" >&5
6493 echo "${ECHO_T}$TERMINFO_SRC" >&6
6494
6495         echo "$as_me:6495: checking whether to use hashed database instead of directory/tree" >&5
6496 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6497
6498 # Check whether --with-hashed-db or --without-hashed-db was given.
6499 if test "${with_hashed_db+set}" = set; then
6500   withval="$with_hashed_db"
6501
6502 else
6503   with_hashed_db=no
6504 fi;
6505         echo "$as_me:6505: result: $with_hashed_db" >&5
6506 echo "${ECHO_T}$with_hashed_db" >&6
6507 else
6508         with_hashed_db=no
6509 fi
6510
6511 echo "$as_me:6511: checking for list of fallback descriptions" >&5
6512 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6513
6514 # Check whether --with-fallbacks or --without-fallbacks was given.
6515 if test "${with_fallbacks+set}" = set; then
6516   withval="$with_fallbacks"
6517   with_fallback=$withval
6518 else
6519   with_fallback=
6520 fi;
6521 echo "$as_me:6521: result: $with_fallback" >&5
6522 echo "${ECHO_T}$with_fallback" >&6
6523 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6524
6525 echo "$as_me:6525: checking if you want modern xterm or antique" >&5
6526 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6527
6528 # Check whether --with-xterm-new or --without-xterm-new was given.
6529 if test "${with_xterm_new+set}" = set; then
6530   withval="$with_xterm_new"
6531   with_xterm_new=$withval
6532 else
6533   with_xterm_new=yes
6534 fi;
6535 case $with_xterm_new in
6536 no)     with_xterm_new=xterm-old;;
6537 *)      with_xterm_new=xterm-new;;
6538 esac
6539 echo "$as_me:6539: result: $with_xterm_new" >&5
6540 echo "${ECHO_T}$with_xterm_new" >&6
6541 WHICH_XTERM=$with_xterm_new
6542
6543 echo "$as_me:6543: checking if xterm backspace sends BS or DEL" >&5
6544 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6545
6546 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6547 if test "${with_xterm_kbs+set}" = set; then
6548   withval="$with_xterm_kbs"
6549   with_xterm_kbs=$withval
6550 else
6551   with_xterm_kbs=BS
6552 fi;
6553 case x$with_xterm_kbs in
6554 xyes|xno|xBS|xbs|x8)
6555         with_xterm_kbs=BS
6556         ;;
6557 xDEL|xdel|x127)
6558         with_xterm_kbs=DEL
6559         ;;
6560 *)
6561         with_xterm_kbs=$withval
6562         ;;
6563 esac
6564 echo "$as_me:6564: result: $with_xterm_kbs" >&5
6565 echo "${ECHO_T}$with_xterm_kbs" >&6
6566 XTERM_KBS=$with_xterm_kbs
6567
6568 MAKE_TERMINFO=
6569 if test "$use_database" = no ; then
6570         TERMINFO="${datadir}/terminfo"
6571         MAKE_TERMINFO="#"
6572 else
6573
6574 echo "$as_me:6574: checking for list of terminfo directories" >&5
6575 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6576
6577 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6578 if test "${with_terminfo_dirs+set}" = set; then
6579   withval="$with_terminfo_dirs"
6580
6581 else
6582   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6583 fi;
6584 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6585 cf_dst_path=
6586 for cf_src_path in $withval
6587 do
6588
6589 if test "x$prefix" != xNONE; then
6590   cf_path_syntax="$prefix"
6591 else
6592   cf_path_syntax="$ac_default_prefix"
6593 fi
6594
6595 case ".$cf_src_path" in #(vi
6596 .\$\(*\)*|.\'*\'*) #(vi
6597   ;;
6598 ..|./*|.\\*) #(vi
6599   ;;
6600 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6601   ;;
6602 .\${*prefix}*|.\${*dir}*) #(vi
6603   eval cf_src_path="$cf_src_path"
6604   case ".$cf_src_path" in #(vi
6605   .NONE/*)
6606     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6607     ;;
6608   esac
6609   ;; #(vi
6610 .no|.NONE/*)
6611   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6612   ;;
6613 *)
6614   { { echo "$as_me:6614: error: expected a pathname, not \"$cf_src_path\"" >&5
6615 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6616    { (exit 1); exit 1; }; }
6617   ;;
6618 esac
6619
6620   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6621   cf_dst_path="${cf_dst_path}${cf_src_path}"
6622 done
6623 IFS="$ac_save_ifs"
6624
6625 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6626 # so we have to check/work around.  We do prefer the result of "eval"...
6627 eval cf_dst_eval="$cf_dst_path"
6628 case "x$cf_dst_eval" in #(vi
6629 xNONE*) #(vi
6630         TERMINFO_DIRS=$cf_dst_path
6631         ;;
6632 *)
6633         TERMINFO_DIRS="$cf_dst_eval"
6634         ;;
6635 esac
6636
6637 echo "$as_me:6637: result: $TERMINFO_DIRS" >&5
6638 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6639 test -n "$TERMINFO_DIRS" &&
6640 cat >>confdefs.h <<EOF
6641 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6642 EOF
6643
6644 echo "$as_me:6644: checking for default terminfo directory" >&5
6645 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6646
6647 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6648 if test "${with_default_terminfo_dir+set}" = set; then
6649   withval="$with_default_terminfo_dir"
6650
6651 else
6652   withval="${TERMINFO:-${datadir}/terminfo}"
6653 fi; if test -n "${datadir}/terminfo" ; then
6654
6655 if test "x$prefix" != xNONE; then
6656   cf_path_syntax="$prefix"
6657 else
6658   cf_path_syntax="$ac_default_prefix"
6659 fi
6660
6661 case ".$withval" in #(vi
6662 .\$\(*\)*|.\'*\'*) #(vi
6663   ;;
6664 ..|./*|.\\*) #(vi
6665   ;;
6666 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6667   ;;
6668 .\${*prefix}*|.\${*dir}*) #(vi
6669   eval withval="$withval"
6670   case ".$withval" in #(vi
6671   .NONE/*)
6672     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6673     ;;
6674   esac
6675   ;; #(vi
6676 .no|.NONE/*)
6677   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6678   ;;
6679 *)
6680   { { echo "$as_me:6680: error: expected a pathname, not \"$withval\"" >&5
6681 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6682    { (exit 1); exit 1; }; }
6683   ;;
6684 esac
6685
6686 fi
6687 eval TERMINFO="$withval"
6688
6689 echo "$as_me:6689: result: $TERMINFO" >&5
6690 echo "${ECHO_T}$TERMINFO" >&6
6691
6692 cat >>confdefs.h <<EOF
6693 #define TERMINFO "$TERMINFO"
6694 EOF
6695
6696 fi
6697
6698 ###     use option --disable-big-core to make tic run on small machines
6699 ###     We need 4Mb, check if we can allocate 50% more than that.
6700 echo "$as_me:6700: checking if big-core option selected" >&5
6701 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6702
6703 # Check whether --enable-big-core or --disable-big-core was given.
6704 if test "${enable_big_core+set}" = set; then
6705   enableval="$enable_big_core"
6706   with_big_core=$enableval
6707 else
6708   if test "$cross_compiling" = yes; then
6709   with_big_core=no
6710 else
6711   cat >conftest.$ac_ext <<_ACEOF
6712 #line 6712 "configure"
6713 #include "confdefs.h"
6714
6715 #include <stdlib.h>
6716 #include <string.h>
6717 int main() {
6718         unsigned long n = 6000000L;
6719         char *s = malloc(n);
6720         if (s != 0)
6721                 s[0] = s[n-1] = 0;
6722         ${cf_cv_main_return:-return}(s == 0);
6723 }
6724 _ACEOF
6725 rm -f conftest$ac_exeext
6726 if { (eval echo "$as_me:6726: \"$ac_link\"") >&5
6727   (eval $ac_link) 2>&5
6728   ac_status=$?
6729   echo "$as_me:6729: \$? = $ac_status" >&5
6730   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6731   { (eval echo "$as_me:6731: \"$ac_try\"") >&5
6732   (eval $ac_try) 2>&5
6733   ac_status=$?
6734   echo "$as_me:6734: \$? = $ac_status" >&5
6735   (exit $ac_status); }; }; then
6736   with_big_core=yes
6737 else
6738   echo "$as_me: program exited with status $ac_status" >&5
6739 echo "$as_me: failed program was:" >&5
6740 cat conftest.$ac_ext >&5
6741 with_big_core=no
6742 fi
6743 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6744 fi
6745 fi;
6746 echo "$as_me:6746: result: $with_big_core" >&5
6747 echo "${ECHO_T}$with_big_core" >&6
6748 test "x$with_big_core" = "xyes" &&
6749 cat >>confdefs.h <<\EOF
6750 #define HAVE_BIG_CORE 1
6751 EOF
6752
6753 ### ISO C only guarantees 512-char strings, we have tables which load faster
6754 ### when constructed using "big" strings.  More than the C compiler, the awk
6755 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6756 echo "$as_me:6756: checking if big-strings option selected" >&5
6757 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6758
6759 # Check whether --enable-big-strings or --disable-big-strings was given.
6760 if test "${enable_big_strings+set}" = set; then
6761   enableval="$enable_big_strings"
6762   with_big_strings=$enableval
6763 else
6764
6765         case x$AWK in #(vi
6766         x)
6767                 eval with_big_strings=no
6768                 ;;
6769         *) #(vi
6770                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6771                         | $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
6772                         eval with_big_strings=yes
6773                 else
6774                         eval with_big_strings=no
6775                 fi
6776                 ;;
6777         esac
6778
6779 fi;
6780 echo "$as_me:6780: result: $with_big_strings" >&5
6781 echo "${ECHO_T}$with_big_strings" >&6
6782
6783 USE_BIG_STRINGS=0
6784 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
6785
6786 ###     use option --enable-termcap to compile in the termcap fallback support
6787 echo "$as_me:6787: checking if you want termcap-fallback support" >&5
6788 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6789
6790 # Check whether --enable-termcap or --disable-termcap was given.
6791 if test "${enable_termcap+set}" = set; then
6792   enableval="$enable_termcap"
6793   with_termcap=$enableval
6794 else
6795   with_termcap=no
6796 fi;
6797 echo "$as_me:6797: result: $with_termcap" >&5
6798 echo "${ECHO_T}$with_termcap" >&6
6799
6800 NCURSES_USE_TERMCAP=0
6801 if test "x$with_termcap" != "xyes" ; then
6802         if test "$use_database" = no ; then
6803                 if test -z "$with_fallback" ; then
6804                         { { echo "$as_me:6804: error: You have disabled the database w/o specifying fallbacks" >&5
6805 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6806    { (exit 1); exit 1; }; }
6807                 fi
6808         fi
6809
6810 cat >>confdefs.h <<\EOF
6811 #define PURE_TERMINFO 1
6812 EOF
6813
6814 else
6815
6816         if test "$with_ticlib" != no ; then
6817                 { { echo "$as_me:6817: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6818 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6819    { (exit 1); exit 1; }; }
6820         fi
6821
6822         NCURSES_USE_TERMCAP=1
6823         echo "$as_me:6823: checking for list of termcap files" >&5
6824 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6825
6826 # Check whether --with-termpath or --without-termpath was given.
6827 if test "${with_termpath+set}" = set; then
6828   withval="$with_termpath"
6829
6830 else
6831   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6832 fi;
6833 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6834 cf_dst_path=
6835 for cf_src_path in $withval
6836 do
6837
6838 if test "x$prefix" != xNONE; then
6839   cf_path_syntax="$prefix"
6840 else
6841   cf_path_syntax="$ac_default_prefix"
6842 fi
6843
6844 case ".$cf_src_path" in #(vi
6845 .\$\(*\)*|.\'*\'*) #(vi
6846   ;;
6847 ..|./*|.\\*) #(vi
6848   ;;
6849 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6850   ;;
6851 .\${*prefix}*|.\${*dir}*) #(vi
6852   eval cf_src_path="$cf_src_path"
6853   case ".$cf_src_path" in #(vi
6854   .NONE/*)
6855     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6856     ;;
6857   esac
6858   ;; #(vi
6859 .no|.NONE/*)
6860   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6861   ;;
6862 *)
6863   { { echo "$as_me:6863: error: expected a pathname, not \"$cf_src_path\"" >&5
6864 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6865    { (exit 1); exit 1; }; }
6866   ;;
6867 esac
6868
6869   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6870   cf_dst_path="${cf_dst_path}${cf_src_path}"
6871 done
6872 IFS="$ac_save_ifs"
6873
6874 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6875 # so we have to check/work around.  We do prefer the result of "eval"...
6876 eval cf_dst_eval="$cf_dst_path"
6877 case "x$cf_dst_eval" in #(vi
6878 xNONE*) #(vi
6879         TERMPATH=$cf_dst_path
6880         ;;
6881 *)
6882         TERMPATH="$cf_dst_eval"
6883         ;;
6884 esac
6885
6886         echo "$as_me:6886: result: $TERMPATH" >&5
6887 echo "${ECHO_T}$TERMPATH" >&6
6888         test -n "$TERMPATH" &&
6889 cat >>confdefs.h <<EOF
6890 #define TERMPATH "$TERMPATH"
6891 EOF
6892
6893         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6894         echo "$as_me:6894: checking if fast termcap-loader is needed" >&5
6895 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6896
6897 # Check whether --enable-getcap or --disable-getcap was given.
6898 if test "${enable_getcap+set}" = set; then
6899   enableval="$enable_getcap"
6900   with_getcap=$enableval
6901 else
6902   with_getcap=no
6903 fi;
6904         echo "$as_me:6904: result: $with_getcap" >&5
6905 echo "${ECHO_T}$with_getcap" >&6
6906         test "x$with_getcap" = "xyes" &&
6907 cat >>confdefs.h <<\EOF
6908 #define USE_GETCAP 1
6909 EOF
6910
6911         echo "$as_me:6911: checking if translated termcaps will be cached in ~/.terminfo" >&5
6912 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6913
6914 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6915 if test "${enable_getcap_cache+set}" = set; then
6916   enableval="$enable_getcap_cache"
6917   with_getcap_cache=$enableval
6918 else
6919   with_getcap_cache=no
6920 fi;
6921         echo "$as_me:6921: result: $with_getcap_cache" >&5
6922 echo "${ECHO_T}$with_getcap_cache" >&6
6923         test "x$with_getcap_cache" = "xyes" &&
6924 cat >>confdefs.h <<\EOF
6925 #define USE_GETCAP_CACHE 1
6926 EOF
6927
6928 fi
6929
6930 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6931 echo "$as_me:6931: checking if ~/.terminfo is wanted" >&5
6932 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6933
6934 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6935 if test "${enable_home_terminfo+set}" = set; then
6936   enableval="$enable_home_terminfo"
6937   with_home_terminfo=$enableval
6938 else
6939   with_home_terminfo=yes
6940 fi;
6941 echo "$as_me:6941: result: $with_home_terminfo" >&5
6942 echo "${ECHO_T}$with_home_terminfo" >&6
6943 test "x$with_home_terminfo" = "xyes" &&
6944 cat >>confdefs.h <<\EOF
6945 #define USE_HOME_TERMINFO 1
6946 EOF
6947
6948 echo "$as_me:6948: checking if you want to use restricted environment when running as root" >&5
6949 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6950
6951 # Check whether --enable-root-environ or --disable-root-environ was given.
6952 if test "${enable_root_environ+set}" = set; then
6953   enableval="$enable_root_environ"
6954   with_root_environ=$enableval
6955 else
6956   with_root_environ=yes
6957 fi;
6958 echo "$as_me:6958: result: $with_root_environ" >&5
6959 echo "${ECHO_T}$with_root_environ" >&6
6960 test "x$with_root_environ" = xyes &&
6961 cat >>confdefs.h <<\EOF
6962 #define USE_ROOT_ENVIRON 1
6963 EOF
6964
6965 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6966 ###   to reduce storage requirements for the terminfo database.
6967
6968 for ac_func in \
6969         remove \
6970         unlink
6971 do
6972 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6973 echo "$as_me:6973: checking for $ac_func" >&5
6974 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6975 if eval "test \"\${$as_ac_var+set}\" = set"; then
6976   echo $ECHO_N "(cached) $ECHO_C" >&6
6977 else
6978   cat >conftest.$ac_ext <<_ACEOF
6979 #line 6979 "configure"
6980 #include "confdefs.h"
6981 /* System header to define __stub macros and hopefully few prototypes,
6982     which can conflict with char $ac_func (); below.  */
6983 #include <assert.h>
6984 /* Override any gcc2 internal prototype to avoid an error.  */
6985 #ifdef __cplusplus
6986 extern "C"
6987 #endif
6988 /* We use char because int might match the return type of a gcc2
6989    builtin and then its argument prototype would still apply.  */
6990 char $ac_func ();
6991 char (*f) ();
6992
6993 int
6994 main ()
6995 {
6996 /* The GNU C library defines this for functions which it implements
6997     to always fail with ENOSYS.  Some functions are actually named
6998     something starting with __ and the normal name is an alias.  */
6999 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7000 choke me
7001 #else
7002 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7003 #endif
7004
7005   ;
7006   return 0;
7007 }
7008 _ACEOF
7009 rm -f conftest.$ac_objext conftest$ac_exeext
7010 if { (eval echo "$as_me:7010: \"$ac_link\"") >&5
7011   (eval $ac_link) 2>&5
7012   ac_status=$?
7013   echo "$as_me:7013: \$? = $ac_status" >&5
7014   (exit $ac_status); } &&
7015          { ac_try='test -s conftest$ac_exeext'
7016   { (eval echo "$as_me:7016: \"$ac_try\"") >&5
7017   (eval $ac_try) 2>&5
7018   ac_status=$?
7019   echo "$as_me:7019: \$? = $ac_status" >&5
7020   (exit $ac_status); }; }; then
7021   eval "$as_ac_var=yes"
7022 else
7023   echo "$as_me: failed program was:" >&5
7024 cat conftest.$ac_ext >&5
7025 eval "$as_ac_var=no"
7026 fi
7027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7028 fi
7029 echo "$as_me:7029: result: `eval echo '${'$as_ac_var'}'`" >&5
7030 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7031 if test `eval echo '${'$as_ac_var'}'` = yes; then
7032   cat >>confdefs.h <<EOF
7033 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7034 EOF
7035
7036 fi
7037 done
7038
7039 if test "$cross_compiling" = yes ; then
7040
7041 for ac_func in \
7042                 link \
7043                 symlink
7044 do
7045 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7046 echo "$as_me:7046: checking for $ac_func" >&5
7047 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7048 if eval "test \"\${$as_ac_var+set}\" = set"; then
7049   echo $ECHO_N "(cached) $ECHO_C" >&6
7050 else
7051   cat >conftest.$ac_ext <<_ACEOF
7052 #line 7052 "configure"
7053 #include "confdefs.h"
7054 /* System header to define __stub macros and hopefully few prototypes,
7055     which can conflict with char $ac_func (); below.  */
7056 #include <assert.h>
7057 /* Override any gcc2 internal prototype to avoid an error.  */
7058 #ifdef __cplusplus
7059 extern "C"
7060 #endif
7061 /* We use char because int might match the return type of a gcc2
7062    builtin and then its argument prototype would still apply.  */
7063 char $ac_func ();
7064 char (*f) ();
7065
7066 int
7067 main ()
7068 {
7069 /* The GNU C library defines this for functions which it implements
7070     to always fail with ENOSYS.  Some functions are actually named
7071     something starting with __ and the normal name is an alias.  */
7072 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7073 choke me
7074 #else
7075 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7076 #endif
7077
7078   ;
7079   return 0;
7080 }
7081 _ACEOF
7082 rm -f conftest.$ac_objext conftest$ac_exeext
7083 if { (eval echo "$as_me:7083: \"$ac_link\"") >&5
7084   (eval $ac_link) 2>&5
7085   ac_status=$?
7086   echo "$as_me:7086: \$? = $ac_status" >&5
7087   (exit $ac_status); } &&
7088          { ac_try='test -s conftest$ac_exeext'
7089   { (eval echo "$as_me:7089: \"$ac_try\"") >&5
7090   (eval $ac_try) 2>&5
7091   ac_status=$?
7092   echo "$as_me:7092: \$? = $ac_status" >&5
7093   (exit $ac_status); }; }; then
7094   eval "$as_ac_var=yes"
7095 else
7096   echo "$as_me: failed program was:" >&5
7097 cat conftest.$ac_ext >&5
7098 eval "$as_ac_var=no"
7099 fi
7100 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7101 fi
7102 echo "$as_me:7102: result: `eval echo '${'$as_ac_var'}'`" >&5
7103 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7104 if test `eval echo '${'$as_ac_var'}'` = yes; then
7105   cat >>confdefs.h <<EOF
7106 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7107 EOF
7108
7109 fi
7110 done
7111
7112 else
7113         echo "$as_me:7113: checking if link/symlink functions work" >&5
7114 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7115 if test "${cf_cv_link_funcs+set}" = set; then
7116   echo $ECHO_N "(cached) $ECHO_C" >&6
7117 else
7118
7119                 cf_cv_link_funcs=
7120                 for cf_func in link symlink ; do
7121                         if test "$cross_compiling" = yes; then
7122
7123                         eval 'ac_cv_func_'$cf_func'=error'
7124 else
7125   cat >conftest.$ac_ext <<_ACEOF
7126 #line 7126 "configure"
7127 #include "confdefs.h"
7128
7129 #include <sys/types.h>
7130 #include <sys/stat.h>
7131 #ifdef HAVE_UNISTD_H
7132 #include <unistd.h>
7133 #endif
7134 int main()
7135 {
7136         int fail = 0;
7137         char *src = "config.log";
7138         char *dst = "conftest.chk";
7139         struct stat src_sb;
7140         struct stat dst_sb;
7141
7142         stat(src, &src_sb);
7143         fail = ($cf_func("config.log", "conftest.chk") < 0)
7144             || (stat(dst, &dst_sb) < 0)
7145             || (dst_sb.st_mtime != src_sb.st_mtime);
7146 #ifdef HAVE_UNLINK
7147         unlink(dst);
7148 #else
7149         remove(dst);
7150 #endif
7151         ${cf_cv_main_return:-return} (fail);
7152 }
7153
7154 _ACEOF
7155 rm -f conftest$ac_exeext
7156 if { (eval echo "$as_me:7156: \"$ac_link\"") >&5
7157   (eval $ac_link) 2>&5
7158   ac_status=$?
7159   echo "$as_me:7159: \$? = $ac_status" >&5
7160   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7161   { (eval echo "$as_me:7161: \"$ac_try\"") >&5
7162   (eval $ac_try) 2>&5
7163   ac_status=$?
7164   echo "$as_me:7164: \$? = $ac_status" >&5
7165   (exit $ac_status); }; }; then
7166
7167                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7168                         eval 'ac_cv_func_'$cf_func'=yes'
7169 else
7170   echo "$as_me: program exited with status $ac_status" >&5
7171 echo "$as_me: failed program was:" >&5
7172 cat conftest.$ac_ext >&5
7173
7174                         eval 'ac_cv_func_'$cf_func'=no'
7175 fi
7176 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7177 fi
7178                 done
7179                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7180
7181 fi
7182 echo "$as_me:7182: result: $cf_cv_link_funcs" >&5
7183 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7184         test "$ac_cv_func_link"    = yes &&
7185 cat >>confdefs.h <<\EOF
7186 #define HAVE_LINK 1
7187 EOF
7188
7189         test "$ac_cv_func_symlink" = yes &&
7190 cat >>confdefs.h <<\EOF
7191 #define HAVE_SYMLINK 1
7192 EOF
7193
7194 fi
7195
7196 with_links=no
7197 with_symlinks=no
7198
7199 # soft links (symbolic links) are useful for some systems where hard links do
7200 # not work, or to make it simpler to copy terminfo trees around.
7201 if test "x$ac_cv_func_symlink" = xyes ; then
7202     echo "$as_me:7202: checking if tic should use symbolic links" >&5
7203 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7204
7205 # Check whether --enable-symlinks or --disable-symlinks was given.
7206 if test "${enable_symlinks+set}" = set; then
7207   enableval="$enable_symlinks"
7208   with_symlinks=$enableval
7209 else
7210   with_symlinks=no
7211 fi;
7212     echo "$as_me:7212: result: $with_symlinks" >&5
7213 echo "${ECHO_T}$with_symlinks" >&6
7214 fi
7215
7216 # If we have hard links and did not choose to use soft links instead, there is
7217 # no reason to make this choice optional - use the hard links.
7218 if test "$with_symlinks" = no ; then
7219     echo "$as_me:7219: checking if tic should use hard links" >&5
7220 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7221     if test "x$ac_cv_func_link" = xyes ; then
7222         with_links=yes
7223     else
7224         with_links=no
7225     fi
7226     echo "$as_me:7226: result: $with_links" >&5
7227 echo "${ECHO_T}$with_links" >&6
7228 fi
7229
7230 test "x$with_links" = xyes &&
7231 cat >>confdefs.h <<\EOF
7232 #define USE_LINKS 1
7233 EOF
7234
7235 test "x$with_symlinks" = xyes &&
7236 cat >>confdefs.h <<\EOF
7237 #define USE_SYMLINKS 1
7238 EOF
7239
7240 ###   use option --enable-broken-linker to force on use of broken-linker support
7241 echo "$as_me:7241: checking if you want broken-linker support code" >&5
7242 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7243
7244 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7245 if test "${enable_broken_linker+set}" = set; then
7246   enableval="$enable_broken_linker"
7247   with_broken_linker=$enableval
7248 else
7249   with_broken_linker=${BROKEN_LINKER:-no}
7250 fi;
7251 echo "$as_me:7251: result: $with_broken_linker" >&5
7252 echo "${ECHO_T}$with_broken_linker" >&6
7253
7254 BROKEN_LINKER=0
7255 if test "x$with_broken_linker" = xyes ; then
7256
7257 cat >>confdefs.h <<\EOF
7258 #define BROKEN_LINKER 1
7259 EOF
7260
7261         BROKEN_LINKER=1
7262 elif test "$DFT_LWR_MODEL" = shared ; then
7263         case $cf_cv_system_name in #(vi
7264         cygwin*)
7265
7266 cat >>confdefs.h <<\EOF
7267 #define BROKEN_LINKER 1
7268 EOF
7269
7270                 BROKEN_LINKER=1
7271                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7272
7273 echo "${as_me:-configure}:7273: testing cygwin linker is broken anyway ..." 1>&5
7274
7275                 ;;
7276         esac
7277 fi
7278
7279 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7280 echo "$as_me:7280: checking if tputs should process BSD-style prefix padding" >&5
7281 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7282
7283 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7284 if test "${enable_bsdpad+set}" = set; then
7285   enableval="$enable_bsdpad"
7286   with_bsdpad=$enableval
7287 else
7288   with_bsdpad=no
7289 fi;
7290 echo "$as_me:7290: result: $with_bsdpad" >&5
7291 echo "${ECHO_T}$with_bsdpad" >&6
7292 test "x$with_bsdpad" = xyes &&
7293 cat >>confdefs.h <<\EOF
7294 #define BSD_TPUTS 1
7295 EOF
7296
7297 ###   use option --enable-widec to turn on use of wide-character support
7298 NCURSES_CH_T=chtype
7299 NCURSES_LIBUTF8=0
7300
7301 NEED_WCHAR_H=0
7302 NCURSES_MBSTATE_T=0
7303 NCURSES_WCHAR_T=0
7304 NCURSES_WINT_T=0
7305
7306 # Check to define _XOPEN_SOURCE "automatically"
7307
7308 cf_XOPEN_SOURCE=500
7309 cf_POSIX_C_SOURCE=199506L
7310 cf_xopen_source=
7311
7312 case $host_os in #(vi
7313 aix[4-7]*) #(vi
7314         cf_xopen_source="-D_ALL_SOURCE"
7315         ;;
7316 cygwin|msys) #(vi
7317         cf_XOPEN_SOURCE=600
7318         ;;
7319 darwin[0-8].*) #(vi
7320         cf_xopen_source="-D_APPLE_C_SOURCE"
7321         ;;
7322 darwin*) #(vi
7323         cf_xopen_source="-D_DARWIN_C_SOURCE"
7324         cf_XOPEN_SOURCE=
7325         ;;
7326 freebsd*|dragonfly*) #(vi
7327         # 5.x headers associate
7328         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7329         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7330         cf_POSIX_C_SOURCE=200112L
7331         cf_XOPEN_SOURCE=600
7332         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7333         ;;
7334 hpux11*) #(vi
7335         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7336         ;;
7337 hpux*) #(vi
7338         cf_xopen_source="-D_HPUX_SOURCE"
7339         ;;
7340 irix[56].*) #(vi
7341         cf_xopen_source="-D_SGI_SOURCE"
7342         cf_XOPEN_SOURCE=
7343         ;;
7344 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7345
7346 echo "$as_me:7346: checking if we must define _GNU_SOURCE" >&5
7347 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7348 if test "${cf_cv_gnu_source+set}" = set; then
7349   echo $ECHO_N "(cached) $ECHO_C" >&6
7350 else
7351
7352 cat >conftest.$ac_ext <<_ACEOF
7353 #line 7353 "configure"
7354 #include "confdefs.h"
7355 #include <sys/types.h>
7356 int
7357 main ()
7358 {
7359
7360 #ifndef _XOPEN_SOURCE
7361 make an error
7362 #endif
7363   ;
7364   return 0;
7365 }
7366 _ACEOF
7367 rm -f conftest.$ac_objext
7368 if { (eval echo "$as_me:7368: \"$ac_compile\"") >&5
7369   (eval $ac_compile) 2>&5
7370   ac_status=$?
7371   echo "$as_me:7371: \$? = $ac_status" >&5
7372   (exit $ac_status); } &&
7373          { ac_try='test -s conftest.$ac_objext'
7374   { (eval echo "$as_me:7374: \"$ac_try\"") >&5
7375   (eval $ac_try) 2>&5
7376   ac_status=$?
7377   echo "$as_me:7377: \$? = $ac_status" >&5
7378   (exit $ac_status); }; }; then
7379   cf_cv_gnu_source=no
7380 else
7381   echo "$as_me: failed program was:" >&5
7382 cat conftest.$ac_ext >&5
7383 cf_save="$CPPFLAGS"
7384          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7385          cat >conftest.$ac_ext <<_ACEOF
7386 #line 7386 "configure"
7387 #include "confdefs.h"
7388 #include <sys/types.h>
7389 int
7390 main ()
7391 {
7392
7393 #ifdef _XOPEN_SOURCE
7394 make an error
7395 #endif
7396   ;
7397   return 0;
7398 }
7399 _ACEOF
7400 rm -f conftest.$ac_objext
7401 if { (eval echo "$as_me:7401: \"$ac_compile\"") >&5
7402   (eval $ac_compile) 2>&5
7403   ac_status=$?
7404   echo "$as_me:7404: \$? = $ac_status" >&5
7405   (exit $ac_status); } &&
7406          { ac_try='test -s conftest.$ac_objext'
7407   { (eval echo "$as_me:7407: \"$ac_try\"") >&5
7408   (eval $ac_try) 2>&5
7409   ac_status=$?
7410   echo "$as_me:7410: \$? = $ac_status" >&5
7411   (exit $ac_status); }; }; then
7412   cf_cv_gnu_source=no
7413 else
7414   echo "$as_me: failed program was:" >&5
7415 cat conftest.$ac_ext >&5
7416 cf_cv_gnu_source=yes
7417 fi
7418 rm -f conftest.$ac_objext conftest.$ac_ext
7419         CPPFLAGS="$cf_save"
7420
7421 fi
7422 rm -f conftest.$ac_objext conftest.$ac_ext
7423
7424 fi
7425 echo "$as_me:7425: result: $cf_cv_gnu_source" >&5
7426 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7427 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7428
7429         ;;
7430 mirbsd*) #(vi
7431         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7432         cf_XOPEN_SOURCE=
7433
7434 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7435
7436 cf_save_CFLAGS="$CFLAGS"
7437 cf_save_CPPFLAGS="$CPPFLAGS"
7438
7439 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7440         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7441                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7442
7443 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7444         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7445                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7446
7447 echo "$as_me:7447: checking if we should define _POSIX_C_SOURCE" >&5
7448 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7449 if test "${cf_cv_posix_c_source+set}" = set; then
7450   echo $ECHO_N "(cached) $ECHO_C" >&6
7451 else
7452
7453 echo "${as_me:-configure}:7453: testing if the symbol is already defined go no further ..." 1>&5
7454
7455         cat >conftest.$ac_ext <<_ACEOF
7456 #line 7456 "configure"
7457 #include "confdefs.h"
7458 #include <sys/types.h>
7459 int
7460 main ()
7461 {
7462
7463 #ifndef _POSIX_C_SOURCE
7464 make an error
7465 #endif
7466   ;
7467   return 0;
7468 }
7469 _ACEOF
7470 rm -f conftest.$ac_objext
7471 if { (eval echo "$as_me:7471: \"$ac_compile\"") >&5
7472   (eval $ac_compile) 2>&5
7473   ac_status=$?
7474   echo "$as_me:7474: \$? = $ac_status" >&5
7475   (exit $ac_status); } &&
7476          { ac_try='test -s conftest.$ac_objext'
7477   { (eval echo "$as_me:7477: \"$ac_try\"") >&5
7478   (eval $ac_try) 2>&5
7479   ac_status=$?
7480   echo "$as_me:7480: \$? = $ac_status" >&5
7481   (exit $ac_status); }; }; then
7482   cf_cv_posix_c_source=no
7483 else
7484   echo "$as_me: failed program was:" >&5
7485 cat conftest.$ac_ext >&5
7486 cf_want_posix_source=no
7487          case .$cf_POSIX_C_SOURCE in #(vi
7488          .[12]??*) #(vi
7489                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7490                 ;;
7491          .2) #(vi
7492                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7493                 cf_want_posix_source=yes
7494                 ;;
7495          .*)
7496                 cf_want_posix_source=yes
7497                 ;;
7498          esac
7499          if test "$cf_want_posix_source" = yes ; then
7500                 cat >conftest.$ac_ext <<_ACEOF
7501 #line 7501 "configure"
7502 #include "confdefs.h"
7503 #include <sys/types.h>
7504 int
7505 main ()
7506 {
7507
7508 #ifdef _POSIX_SOURCE
7509 make an error
7510 #endif
7511   ;
7512   return 0;
7513 }
7514 _ACEOF
7515 rm -f conftest.$ac_objext
7516 if { (eval echo "$as_me:7516: \"$ac_compile\"") >&5
7517   (eval $ac_compile) 2>&5
7518   ac_status=$?
7519   echo "$as_me:7519: \$? = $ac_status" >&5
7520   (exit $ac_status); } &&
7521          { ac_try='test -s conftest.$ac_objext'
7522   { (eval echo "$as_me:7522: \"$ac_try\"") >&5
7523   (eval $ac_try) 2>&5
7524   ac_status=$?
7525   echo "$as_me:7525: \$? = $ac_status" >&5
7526   (exit $ac_status); }; }; then
7527   :
7528 else
7529   echo "$as_me: failed program was:" >&5
7530 cat conftest.$ac_ext >&5
7531 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7532 fi
7533 rm -f conftest.$ac_objext conftest.$ac_ext
7534          fi
7535
7536 echo "${as_me:-configure}:7536: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7537
7538          CFLAGS="$cf_trim_CFLAGS"
7539          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7540
7541 echo "${as_me:-configure}:7541: testing if the second compile does not leave our definition intact error ..." 1>&5
7542
7543          cat >conftest.$ac_ext <<_ACEOF
7544 #line 7544 "configure"
7545 #include "confdefs.h"
7546 #include <sys/types.h>
7547 int
7548 main ()
7549 {
7550
7551 #ifndef _POSIX_C_SOURCE
7552 make an error
7553 #endif
7554   ;
7555   return 0;
7556 }
7557 _ACEOF
7558 rm -f conftest.$ac_objext
7559 if { (eval echo "$as_me:7559: \"$ac_compile\"") >&5
7560   (eval $ac_compile) 2>&5
7561   ac_status=$?
7562   echo "$as_me:7562: \$? = $ac_status" >&5
7563   (exit $ac_status); } &&
7564          { ac_try='test -s conftest.$ac_objext'
7565   { (eval echo "$as_me:7565: \"$ac_try\"") >&5
7566   (eval $ac_try) 2>&5
7567   ac_status=$?
7568   echo "$as_me:7568: \$? = $ac_status" >&5
7569   (exit $ac_status); }; }; then
7570   :
7571 else
7572   echo "$as_me: failed program was:" >&5
7573 cat conftest.$ac_ext >&5
7574 cf_cv_posix_c_source=no
7575 fi
7576 rm -f conftest.$ac_objext conftest.$ac_ext
7577          CFLAGS="$cf_save_CFLAGS"
7578          CPPFLAGS="$cf_save_CPPFLAGS"
7579
7580 fi
7581 rm -f conftest.$ac_objext conftest.$ac_ext
7582
7583 fi
7584 echo "$as_me:7584: result: $cf_cv_posix_c_source" >&5
7585 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7586
7587 if test "$cf_cv_posix_c_source" != no ; then
7588         CFLAGS="$cf_trim_CFLAGS"
7589         CPPFLAGS="$cf_trim_CPPFLAGS"
7590
7591 cf_fix_cppflags=no
7592 cf_new_cflags=
7593 cf_new_cppflags=
7594 cf_new_extra_cppflags=
7595
7596 for cf_add_cflags in $cf_cv_posix_c_source
7597 do
7598 case $cf_fix_cppflags in
7599 no)
7600         case $cf_add_cflags in #(vi
7601         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7602                 case $cf_add_cflags in
7603                 -D*)
7604                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7605
7606                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7607                                 && test -z "${cf_tst_cflags}" \
7608                                 && cf_fix_cppflags=yes
7609
7610                         if test $cf_fix_cppflags = yes ; then
7611                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7612                                 continue
7613                         elif test "${cf_tst_cflags}" = "\"'" ; then
7614                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7615                                 continue
7616                         fi
7617                         ;;
7618                 esac
7619                 case "$CPPFLAGS" in
7620                 *$cf_add_cflags) #(vi
7621                         ;;
7622                 *) #(vi
7623                         case $cf_add_cflags in #(vi
7624                         -D*)
7625                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7626
7627 CPPFLAGS=`echo "$CPPFLAGS" | \
7628         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7629                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7630
7631                                 ;;
7632                         esac
7633                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7634                         ;;
7635                 esac
7636                 ;;
7637         *)
7638                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7639                 ;;
7640         esac
7641         ;;
7642 yes)
7643         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7644
7645         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7646
7647         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7648                 && test -z "${cf_tst_cflags}" \
7649                 && cf_fix_cppflags=no
7650         ;;
7651 esac
7652 done
7653
7654 if test -n "$cf_new_cflags" ; then
7655
7656         CFLAGS="$CFLAGS $cf_new_cflags"
7657 fi
7658
7659 if test -n "$cf_new_cppflags" ; then
7660
7661         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7662 fi
7663
7664 if test -n "$cf_new_extra_cppflags" ; then
7665
7666         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7667 fi
7668
7669 fi
7670
7671         ;;
7672 netbsd*) #(vi
7673         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7674         ;;
7675 openbsd[4-9]*) #(vi
7676         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7677         cf_xopen_source="-D_BSD_SOURCE"
7678         cf_XOPEN_SOURCE=600
7679         ;;
7680 openbsd*) #(vi
7681         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7682         ;;
7683 osf[45]*) #(vi
7684         cf_xopen_source="-D_OSF_SOURCE"
7685         ;;
7686 nto-qnx*) #(vi
7687         cf_xopen_source="-D_QNX_SOURCE"
7688         ;;
7689 sco*) #(vi
7690         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7691         ;;
7692 solaris2.*) #(vi
7693         cf_xopen_source="-D__EXTENSIONS__"
7694         cf_cv_xopen_source=broken
7695         ;;
7696 *)
7697
7698 echo "$as_me:7698: checking if we should define _XOPEN_SOURCE" >&5
7699 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7700 if test "${cf_cv_xopen_source+set}" = set; then
7701   echo $ECHO_N "(cached) $ECHO_C" >&6
7702 else
7703
7704         cat >conftest.$ac_ext <<_ACEOF
7705 #line 7705 "configure"
7706 #include "confdefs.h"
7707
7708 #include <stdlib.h>
7709 #include <string.h>
7710 #include <sys/types.h>
7711
7712 int
7713 main ()
7714 {
7715
7716 #ifndef _XOPEN_SOURCE
7717 make an error
7718 #endif
7719   ;
7720   return 0;
7721 }
7722 _ACEOF
7723 rm -f conftest.$ac_objext
7724 if { (eval echo "$as_me:7724: \"$ac_compile\"") >&5
7725   (eval $ac_compile) 2>&5
7726   ac_status=$?
7727   echo "$as_me:7727: \$? = $ac_status" >&5
7728   (exit $ac_status); } &&
7729          { ac_try='test -s conftest.$ac_objext'
7730   { (eval echo "$as_me:7730: \"$ac_try\"") >&5
7731   (eval $ac_try) 2>&5
7732   ac_status=$?
7733   echo "$as_me:7733: \$? = $ac_status" >&5
7734   (exit $ac_status); }; }; then
7735   cf_cv_xopen_source=no
7736 else
7737   echo "$as_me: failed program was:" >&5
7738 cat conftest.$ac_ext >&5
7739 cf_save="$CPPFLAGS"
7740          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7741          cat >conftest.$ac_ext <<_ACEOF
7742 #line 7742 "configure"
7743 #include "confdefs.h"
7744
7745 #include <stdlib.h>
7746 #include <string.h>
7747 #include <sys/types.h>
7748
7749 int
7750 main ()
7751 {
7752
7753 #ifdef _XOPEN_SOURCE
7754 make an error
7755 #endif
7756   ;
7757   return 0;
7758 }
7759 _ACEOF
7760 rm -f conftest.$ac_objext
7761 if { (eval echo "$as_me:7761: \"$ac_compile\"") >&5
7762   (eval $ac_compile) 2>&5
7763   ac_status=$?
7764   echo "$as_me:7764: \$? = $ac_status" >&5
7765   (exit $ac_status); } &&
7766          { ac_try='test -s conftest.$ac_objext'
7767   { (eval echo "$as_me:7767: \"$ac_try\"") >&5
7768   (eval $ac_try) 2>&5
7769   ac_status=$?
7770   echo "$as_me:7770: \$? = $ac_status" >&5
7771   (exit $ac_status); }; }; then
7772   cf_cv_xopen_source=no
7773 else
7774   echo "$as_me: failed program was:" >&5
7775 cat conftest.$ac_ext >&5
7776 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7777 fi
7778 rm -f conftest.$ac_objext conftest.$ac_ext
7779         CPPFLAGS="$cf_save"
7780
7781 fi
7782 rm -f conftest.$ac_objext conftest.$ac_ext
7783
7784 fi
7785 echo "$as_me:7785: result: $cf_cv_xopen_source" >&5
7786 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7787
7788 if test "$cf_cv_xopen_source" != no ; then
7789
7790 CFLAGS=`echo "$CFLAGS" | \
7791         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7792                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7793
7794 CPPFLAGS=`echo "$CPPFLAGS" | \
7795         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7796                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7797
7798         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7799
7800 cf_fix_cppflags=no
7801 cf_new_cflags=
7802 cf_new_cppflags=
7803 cf_new_extra_cppflags=
7804
7805 for cf_add_cflags in $cf_temp_xopen_source
7806 do
7807 case $cf_fix_cppflags in
7808 no)
7809         case $cf_add_cflags in #(vi
7810         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7811                 case $cf_add_cflags in
7812                 -D*)
7813                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7814
7815                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7816                                 && test -z "${cf_tst_cflags}" \
7817                                 && cf_fix_cppflags=yes
7818
7819                         if test $cf_fix_cppflags = yes ; then
7820                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7821                                 continue
7822                         elif test "${cf_tst_cflags}" = "\"'" ; then
7823                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7824                                 continue
7825                         fi
7826                         ;;
7827                 esac
7828                 case "$CPPFLAGS" in
7829                 *$cf_add_cflags) #(vi
7830                         ;;
7831                 *) #(vi
7832                         case $cf_add_cflags in #(vi
7833                         -D*)
7834                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7835
7836 CPPFLAGS=`echo "$CPPFLAGS" | \
7837         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7838                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7839
7840                                 ;;
7841                         esac
7842                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7843                         ;;
7844                 esac
7845                 ;;
7846         *)
7847                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7848                 ;;
7849         esac
7850         ;;
7851 yes)
7852         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7853
7854         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7855
7856         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7857                 && test -z "${cf_tst_cflags}" \
7858                 && cf_fix_cppflags=no
7859         ;;
7860 esac
7861 done
7862
7863 if test -n "$cf_new_cflags" ; then
7864
7865         CFLAGS="$CFLAGS $cf_new_cflags"
7866 fi
7867
7868 if test -n "$cf_new_cppflags" ; then
7869
7870         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7871 fi
7872
7873 if test -n "$cf_new_extra_cppflags" ; then
7874
7875         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7876 fi
7877
7878 fi
7879
7880 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7881
7882 cf_save_CFLAGS="$CFLAGS"
7883 cf_save_CPPFLAGS="$CPPFLAGS"
7884
7885 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7886         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7887                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7888
7889 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7890         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7891                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7892
7893 echo "$as_me:7893: checking if we should define _POSIX_C_SOURCE" >&5
7894 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7895 if test "${cf_cv_posix_c_source+set}" = set; then
7896   echo $ECHO_N "(cached) $ECHO_C" >&6
7897 else
7898
7899 echo "${as_me:-configure}:7899: testing if the symbol is already defined go no further ..." 1>&5
7900
7901         cat >conftest.$ac_ext <<_ACEOF
7902 #line 7902 "configure"
7903 #include "confdefs.h"
7904 #include <sys/types.h>
7905 int
7906 main ()
7907 {
7908
7909 #ifndef _POSIX_C_SOURCE
7910 make an error
7911 #endif
7912   ;
7913   return 0;
7914 }
7915 _ACEOF
7916 rm -f conftest.$ac_objext
7917 if { (eval echo "$as_me:7917: \"$ac_compile\"") >&5
7918   (eval $ac_compile) 2>&5
7919   ac_status=$?
7920   echo "$as_me:7920: \$? = $ac_status" >&5
7921   (exit $ac_status); } &&
7922          { ac_try='test -s conftest.$ac_objext'
7923   { (eval echo "$as_me:7923: \"$ac_try\"") >&5
7924   (eval $ac_try) 2>&5
7925   ac_status=$?
7926   echo "$as_me:7926: \$? = $ac_status" >&5
7927   (exit $ac_status); }; }; then
7928   cf_cv_posix_c_source=no
7929 else
7930   echo "$as_me: failed program was:" >&5
7931 cat conftest.$ac_ext >&5
7932 cf_want_posix_source=no
7933          case .$cf_POSIX_C_SOURCE in #(vi
7934          .[12]??*) #(vi
7935                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7936                 ;;
7937          .2) #(vi
7938                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7939                 cf_want_posix_source=yes
7940                 ;;
7941          .*)
7942                 cf_want_posix_source=yes
7943                 ;;
7944          esac
7945          if test "$cf_want_posix_source" = yes ; then
7946                 cat >conftest.$ac_ext <<_ACEOF
7947 #line 7947 "configure"
7948 #include "confdefs.h"
7949 #include <sys/types.h>
7950 int
7951 main ()
7952 {
7953
7954 #ifdef _POSIX_SOURCE
7955 make an error
7956 #endif
7957   ;
7958   return 0;
7959 }
7960 _ACEOF
7961 rm -f conftest.$ac_objext
7962 if { (eval echo "$as_me:7962: \"$ac_compile\"") >&5
7963   (eval $ac_compile) 2>&5
7964   ac_status=$?
7965   echo "$as_me:7965: \$? = $ac_status" >&5
7966   (exit $ac_status); } &&
7967          { ac_try='test -s conftest.$ac_objext'
7968   { (eval echo "$as_me:7968: \"$ac_try\"") >&5
7969   (eval $ac_try) 2>&5
7970   ac_status=$?
7971   echo "$as_me:7971: \$? = $ac_status" >&5
7972   (exit $ac_status); }; }; then
7973   :
7974 else
7975   echo "$as_me: failed program was:" >&5
7976 cat conftest.$ac_ext >&5
7977 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7978 fi
7979 rm -f conftest.$ac_objext conftest.$ac_ext
7980          fi
7981
7982 echo "${as_me:-configure}:7982: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7983
7984          CFLAGS="$cf_trim_CFLAGS"
7985          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7986
7987 echo "${as_me:-configure}:7987: testing if the second compile does not leave our definition intact error ..." 1>&5
7988
7989          cat >conftest.$ac_ext <<_ACEOF
7990 #line 7990 "configure"
7991 #include "confdefs.h"
7992 #include <sys/types.h>
7993 int
7994 main ()
7995 {
7996
7997 #ifndef _POSIX_C_SOURCE
7998 make an error
7999 #endif
8000   ;
8001   return 0;
8002 }
8003 _ACEOF
8004 rm -f conftest.$ac_objext
8005 if { (eval echo "$as_me:8005: \"$ac_compile\"") >&5
8006   (eval $ac_compile) 2>&5
8007   ac_status=$?
8008   echo "$as_me:8008: \$? = $ac_status" >&5
8009   (exit $ac_status); } &&
8010          { ac_try='test -s conftest.$ac_objext'
8011   { (eval echo "$as_me:8011: \"$ac_try\"") >&5
8012   (eval $ac_try) 2>&5
8013   ac_status=$?
8014   echo "$as_me:8014: \$? = $ac_status" >&5
8015   (exit $ac_status); }; }; then
8016   :
8017 else
8018   echo "$as_me: failed program was:" >&5
8019 cat conftest.$ac_ext >&5
8020 cf_cv_posix_c_source=no
8021 fi
8022 rm -f conftest.$ac_objext conftest.$ac_ext
8023          CFLAGS="$cf_save_CFLAGS"
8024          CPPFLAGS="$cf_save_CPPFLAGS"
8025
8026 fi
8027 rm -f conftest.$ac_objext conftest.$ac_ext
8028
8029 fi
8030 echo "$as_me:8030: result: $cf_cv_posix_c_source" >&5
8031 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8032
8033 if test "$cf_cv_posix_c_source" != no ; then
8034         CFLAGS="$cf_trim_CFLAGS"
8035         CPPFLAGS="$cf_trim_CPPFLAGS"
8036
8037 cf_fix_cppflags=no
8038 cf_new_cflags=
8039 cf_new_cppflags=
8040 cf_new_extra_cppflags=
8041
8042 for cf_add_cflags in $cf_cv_posix_c_source
8043 do
8044 case $cf_fix_cppflags in
8045 no)
8046         case $cf_add_cflags in #(vi
8047         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8048                 case $cf_add_cflags in
8049                 -D*)
8050                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8051
8052                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8053                                 && test -z "${cf_tst_cflags}" \
8054                                 && cf_fix_cppflags=yes
8055
8056                         if test $cf_fix_cppflags = yes ; then
8057                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8058                                 continue
8059                         elif test "${cf_tst_cflags}" = "\"'" ; then
8060                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8061                                 continue
8062                         fi
8063                         ;;
8064                 esac
8065                 case "$CPPFLAGS" in
8066                 *$cf_add_cflags) #(vi
8067                         ;;
8068                 *) #(vi
8069                         case $cf_add_cflags in #(vi
8070                         -D*)
8071                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8072
8073 CPPFLAGS=`echo "$CPPFLAGS" | \
8074         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8075                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8076
8077                                 ;;
8078                         esac
8079                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8080                         ;;
8081                 esac
8082                 ;;
8083         *)
8084                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8085                 ;;
8086         esac
8087         ;;
8088 yes)
8089         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8090
8091         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8092
8093         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8094                 && test -z "${cf_tst_cflags}" \
8095                 && cf_fix_cppflags=no
8096         ;;
8097 esac
8098 done
8099
8100 if test -n "$cf_new_cflags" ; then
8101
8102         CFLAGS="$CFLAGS $cf_new_cflags"
8103 fi
8104
8105 if test -n "$cf_new_cppflags" ; then
8106
8107         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8108 fi
8109
8110 if test -n "$cf_new_extra_cppflags" ; then
8111
8112         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8113 fi
8114
8115 fi
8116
8117         ;;
8118 esac
8119
8120 if test -n "$cf_xopen_source" ; then
8121
8122 cf_fix_cppflags=no
8123 cf_new_cflags=
8124 cf_new_cppflags=
8125 cf_new_extra_cppflags=
8126
8127 for cf_add_cflags in $cf_xopen_source
8128 do
8129 case $cf_fix_cppflags in
8130 no)
8131         case $cf_add_cflags in #(vi
8132         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8133                 case $cf_add_cflags in
8134                 -D*)
8135                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8136
8137                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8138                                 && test -z "${cf_tst_cflags}" \
8139                                 && cf_fix_cppflags=yes
8140
8141                         if test $cf_fix_cppflags = yes ; then
8142                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8143                                 continue
8144                         elif test "${cf_tst_cflags}" = "\"'" ; then
8145                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8146                                 continue
8147                         fi
8148                         ;;
8149                 esac
8150                 case "$CPPFLAGS" in
8151                 *$cf_add_cflags) #(vi
8152                         ;;
8153                 *) #(vi
8154                         case $cf_add_cflags in #(vi
8155                         -D*)
8156                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8157
8158 CPPFLAGS=`echo "$CPPFLAGS" | \
8159         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8160                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8161
8162                                 ;;
8163                         esac
8164                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8165                         ;;
8166                 esac
8167                 ;;
8168         *)
8169                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8170                 ;;
8171         esac
8172         ;;
8173 yes)
8174         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8175
8176         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8177
8178         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8179                 && test -z "${cf_tst_cflags}" \
8180                 && cf_fix_cppflags=no
8181         ;;
8182 esac
8183 done
8184
8185 if test -n "$cf_new_cflags" ; then
8186
8187         CFLAGS="$CFLAGS $cf_new_cflags"
8188 fi
8189
8190 if test -n "$cf_new_cppflags" ; then
8191
8192         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8193 fi
8194
8195 if test -n "$cf_new_extra_cppflags" ; then
8196
8197         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8198 fi
8199
8200 fi
8201
8202 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8203         echo "$as_me:8203: checking if _XOPEN_SOURCE really is set" >&5
8204 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8205         cat >conftest.$ac_ext <<_ACEOF
8206 #line 8206 "configure"
8207 #include "confdefs.h"
8208 #include <stdlib.h>
8209 int
8210 main ()
8211 {
8212
8213 #ifndef _XOPEN_SOURCE
8214 make an error
8215 #endif
8216   ;
8217   return 0;
8218 }
8219 _ACEOF
8220 rm -f conftest.$ac_objext
8221 if { (eval echo "$as_me:8221: \"$ac_compile\"") >&5
8222   (eval $ac_compile) 2>&5
8223   ac_status=$?
8224   echo "$as_me:8224: \$? = $ac_status" >&5
8225   (exit $ac_status); } &&
8226          { ac_try='test -s conftest.$ac_objext'
8227   { (eval echo "$as_me:8227: \"$ac_try\"") >&5
8228   (eval $ac_try) 2>&5
8229   ac_status=$?
8230   echo "$as_me:8230: \$? = $ac_status" >&5
8231   (exit $ac_status); }; }; then
8232   cf_XOPEN_SOURCE_set=yes
8233 else
8234   echo "$as_me: failed program was:" >&5
8235 cat conftest.$ac_ext >&5
8236 cf_XOPEN_SOURCE_set=no
8237 fi
8238 rm -f conftest.$ac_objext conftest.$ac_ext
8239         echo "$as_me:8239: result: $cf_XOPEN_SOURCE_set" >&5
8240 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8241         if test $cf_XOPEN_SOURCE_set = yes
8242         then
8243                 cat >conftest.$ac_ext <<_ACEOF
8244 #line 8244 "configure"
8245 #include "confdefs.h"
8246 #include <stdlib.h>
8247 int
8248 main ()
8249 {
8250
8251 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8252 make an error
8253 #endif
8254   ;
8255   return 0;
8256 }
8257 _ACEOF
8258 rm -f conftest.$ac_objext
8259 if { (eval echo "$as_me:8259: \"$ac_compile\"") >&5
8260   (eval $ac_compile) 2>&5
8261   ac_status=$?
8262   echo "$as_me:8262: \$? = $ac_status" >&5
8263   (exit $ac_status); } &&
8264          { ac_try='test -s conftest.$ac_objext'
8265   { (eval echo "$as_me:8265: \"$ac_try\"") >&5
8266   (eval $ac_try) 2>&5
8267   ac_status=$?
8268   echo "$as_me:8268: \$? = $ac_status" >&5
8269   (exit $ac_status); }; }; then
8270   cf_XOPEN_SOURCE_set_ok=yes
8271 else
8272   echo "$as_me: failed program was:" >&5
8273 cat conftest.$ac_ext >&5
8274 cf_XOPEN_SOURCE_set_ok=no
8275 fi
8276 rm -f conftest.$ac_objext conftest.$ac_ext
8277                 if test $cf_XOPEN_SOURCE_set_ok = no
8278                 then
8279                         { echo "$as_me:8279: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8280 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8281                 fi
8282         else
8283
8284 echo "$as_me:8284: checking if we should define _XOPEN_SOURCE" >&5
8285 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8286 if test "${cf_cv_xopen_source+set}" = set; then
8287   echo $ECHO_N "(cached) $ECHO_C" >&6
8288 else
8289
8290         cat >conftest.$ac_ext <<_ACEOF
8291 #line 8291 "configure"
8292 #include "confdefs.h"
8293
8294 #include <stdlib.h>
8295 #include <string.h>
8296 #include <sys/types.h>
8297
8298 int
8299 main ()
8300 {
8301
8302 #ifndef _XOPEN_SOURCE
8303 make an error
8304 #endif
8305   ;
8306   return 0;
8307 }
8308 _ACEOF
8309 rm -f conftest.$ac_objext
8310 if { (eval echo "$as_me:8310: \"$ac_compile\"") >&5
8311   (eval $ac_compile) 2>&5
8312   ac_status=$?
8313   echo "$as_me:8313: \$? = $ac_status" >&5
8314   (exit $ac_status); } &&
8315          { ac_try='test -s conftest.$ac_objext'
8316   { (eval echo "$as_me:8316: \"$ac_try\"") >&5
8317   (eval $ac_try) 2>&5
8318   ac_status=$?
8319   echo "$as_me:8319: \$? = $ac_status" >&5
8320   (exit $ac_status); }; }; then
8321   cf_cv_xopen_source=no
8322 else
8323   echo "$as_me: failed program was:" >&5
8324 cat conftest.$ac_ext >&5
8325 cf_save="$CPPFLAGS"
8326          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8327          cat >conftest.$ac_ext <<_ACEOF
8328 #line 8328 "configure"
8329 #include "confdefs.h"
8330
8331 #include <stdlib.h>
8332 #include <string.h>
8333 #include <sys/types.h>
8334
8335 int
8336 main ()
8337 {
8338
8339 #ifdef _XOPEN_SOURCE
8340 make an error
8341 #endif
8342   ;
8343   return 0;
8344 }
8345 _ACEOF
8346 rm -f conftest.$ac_objext
8347 if { (eval echo "$as_me:8347: \"$ac_compile\"") >&5
8348   (eval $ac_compile) 2>&5
8349   ac_status=$?
8350   echo "$as_me:8350: \$? = $ac_status" >&5
8351   (exit $ac_status); } &&
8352          { ac_try='test -s conftest.$ac_objext'
8353   { (eval echo "$as_me:8353: \"$ac_try\"") >&5
8354   (eval $ac_try) 2>&5
8355   ac_status=$?
8356   echo "$as_me:8356: \$? = $ac_status" >&5
8357   (exit $ac_status); }; }; then
8358   cf_cv_xopen_source=no
8359 else
8360   echo "$as_me: failed program was:" >&5
8361 cat conftest.$ac_ext >&5
8362 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8363 fi
8364 rm -f conftest.$ac_objext conftest.$ac_ext
8365         CPPFLAGS="$cf_save"
8366
8367 fi
8368 rm -f conftest.$ac_objext conftest.$ac_ext
8369
8370 fi
8371 echo "$as_me:8371: result: $cf_cv_xopen_source" >&5
8372 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8373
8374 if test "$cf_cv_xopen_source" != no ; then
8375
8376 CFLAGS=`echo "$CFLAGS" | \
8377         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8378                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8379
8380 CPPFLAGS=`echo "$CPPFLAGS" | \
8381         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8382                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8383
8384         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8385
8386 cf_fix_cppflags=no
8387 cf_new_cflags=
8388 cf_new_cppflags=
8389 cf_new_extra_cppflags=
8390
8391 for cf_add_cflags in $cf_temp_xopen_source
8392 do
8393 case $cf_fix_cppflags in
8394 no)
8395         case $cf_add_cflags in #(vi
8396         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8397                 case $cf_add_cflags in
8398                 -D*)
8399                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8400
8401                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8402                                 && test -z "${cf_tst_cflags}" \
8403                                 && cf_fix_cppflags=yes
8404
8405                         if test $cf_fix_cppflags = yes ; then
8406                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8407                                 continue
8408                         elif test "${cf_tst_cflags}" = "\"'" ; then
8409                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8410                                 continue
8411                         fi
8412                         ;;
8413                 esac
8414                 case "$CPPFLAGS" in
8415                 *$cf_add_cflags) #(vi
8416                         ;;
8417                 *) #(vi
8418                         case $cf_add_cflags in #(vi
8419                         -D*)
8420                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8421
8422 CPPFLAGS=`echo "$CPPFLAGS" | \
8423         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8424                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8425
8426                                 ;;
8427                         esac
8428                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8429                         ;;
8430                 esac
8431                 ;;
8432         *)
8433                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8434                 ;;
8435         esac
8436         ;;
8437 yes)
8438         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8439
8440         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8441
8442         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8443                 && test -z "${cf_tst_cflags}" \
8444                 && cf_fix_cppflags=no
8445         ;;
8446 esac
8447 done
8448
8449 if test -n "$cf_new_cflags" ; then
8450
8451         CFLAGS="$CFLAGS $cf_new_cflags"
8452 fi
8453
8454 if test -n "$cf_new_cppflags" ; then
8455
8456         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8457 fi
8458
8459 if test -n "$cf_new_extra_cppflags" ; then
8460
8461         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8462 fi
8463
8464 fi
8465
8466         fi
8467 fi
8468
8469 # Work around breakage on OS X
8470
8471 echo "$as_me:8471: checking if SIGWINCH is defined" >&5
8472 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8473 if test "${cf_cv_define_sigwinch+set}" = set; then
8474   echo $ECHO_N "(cached) $ECHO_C" >&6
8475 else
8476
8477         cat >conftest.$ac_ext <<_ACEOF
8478 #line 8478 "configure"
8479 #include "confdefs.h"
8480
8481 #include <sys/types.h>
8482 #include <sys/signal.h>
8483
8484 int
8485 main ()
8486 {
8487 int x = SIGWINCH
8488   ;
8489   return 0;
8490 }
8491 _ACEOF
8492 rm -f conftest.$ac_objext
8493 if { (eval echo "$as_me:8493: \"$ac_compile\"") >&5
8494   (eval $ac_compile) 2>&5
8495   ac_status=$?
8496   echo "$as_me:8496: \$? = $ac_status" >&5
8497   (exit $ac_status); } &&
8498          { ac_try='test -s conftest.$ac_objext'
8499   { (eval echo "$as_me:8499: \"$ac_try\"") >&5
8500   (eval $ac_try) 2>&5
8501   ac_status=$?
8502   echo "$as_me:8502: \$? = $ac_status" >&5
8503   (exit $ac_status); }; }; then
8504   cf_cv_define_sigwinch=yes
8505 else
8506   echo "$as_me: failed program was:" >&5
8507 cat conftest.$ac_ext >&5
8508 cat >conftest.$ac_ext <<_ACEOF
8509 #line 8509 "configure"
8510 #include "confdefs.h"
8511
8512 #undef _XOPEN_SOURCE
8513 #undef _POSIX_SOURCE
8514 #undef _POSIX_C_SOURCE
8515 #include <sys/types.h>
8516 #include <sys/signal.h>
8517
8518 int
8519 main ()
8520 {
8521 int x = SIGWINCH
8522   ;
8523   return 0;
8524 }
8525 _ACEOF
8526 rm -f conftest.$ac_objext
8527 if { (eval echo "$as_me:8527: \"$ac_compile\"") >&5
8528   (eval $ac_compile) 2>&5
8529   ac_status=$?
8530   echo "$as_me:8530: \$? = $ac_status" >&5
8531   (exit $ac_status); } &&
8532          { ac_try='test -s conftest.$ac_objext'
8533   { (eval echo "$as_me:8533: \"$ac_try\"") >&5
8534   (eval $ac_try) 2>&5
8535   ac_status=$?
8536   echo "$as_me:8536: \$? = $ac_status" >&5
8537   (exit $ac_status); }; }; then
8538   cf_cv_define_sigwinch=maybe
8539 else
8540   echo "$as_me: failed program was:" >&5
8541 cat conftest.$ac_ext >&5
8542 cf_cv_define_sigwinch=no
8543 fi
8544 rm -f conftest.$ac_objext conftest.$ac_ext
8545
8546 fi
8547 rm -f conftest.$ac_objext conftest.$ac_ext
8548
8549 fi
8550 echo "$as_me:8550: result: $cf_cv_define_sigwinch" >&5
8551 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8552
8553 if test "$cf_cv_define_sigwinch" = maybe ; then
8554 echo "$as_me:8554: checking for actual SIGWINCH definition" >&5
8555 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8556 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8557   echo $ECHO_N "(cached) $ECHO_C" >&6
8558 else
8559
8560 cf_cv_fixup_sigwinch=unknown
8561 cf_sigwinch=32
8562 while test $cf_sigwinch != 1
8563 do
8564         cat >conftest.$ac_ext <<_ACEOF
8565 #line 8565 "configure"
8566 #include "confdefs.h"
8567
8568 #undef _XOPEN_SOURCE
8569 #undef _POSIX_SOURCE
8570 #undef _POSIX_C_SOURCE
8571 #include <sys/types.h>
8572 #include <sys/signal.h>
8573
8574 int
8575 main ()
8576 {
8577
8578 #if SIGWINCH != $cf_sigwinch
8579 make an error
8580 #endif
8581 int x = SIGWINCH
8582   ;
8583   return 0;
8584 }
8585 _ACEOF
8586 rm -f conftest.$ac_objext
8587 if { (eval echo "$as_me:8587: \"$ac_compile\"") >&5
8588   (eval $ac_compile) 2>&5
8589   ac_status=$?
8590   echo "$as_me:8590: \$? = $ac_status" >&5
8591   (exit $ac_status); } &&
8592          { ac_try='test -s conftest.$ac_objext'
8593   { (eval echo "$as_me:8593: \"$ac_try\"") >&5
8594   (eval $ac_try) 2>&5
8595   ac_status=$?
8596   echo "$as_me:8596: \$? = $ac_status" >&5
8597   (exit $ac_status); }; }; then
8598   cf_cv_fixup_sigwinch=$cf_sigwinch
8599          break
8600 else
8601   echo "$as_me: failed program was:" >&5
8602 cat conftest.$ac_ext >&5
8603 fi
8604 rm -f conftest.$ac_objext conftest.$ac_ext
8605
8606 cf_sigwinch=`expr $cf_sigwinch - 1`
8607 done
8608
8609 fi
8610 echo "$as_me:8610: result: $cf_cv_fixup_sigwinch" >&5
8611 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8612
8613         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8614                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8615         fi
8616 fi
8617
8618 # Checks for CODESET support.
8619
8620   echo "$as_me:8620: checking for nl_langinfo and CODESET" >&5
8621 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8622 if test "${am_cv_langinfo_codeset+set}" = set; then
8623   echo $ECHO_N "(cached) $ECHO_C" >&6
8624 else
8625   cat >conftest.$ac_ext <<_ACEOF
8626 #line 8626 "configure"
8627 #include "confdefs.h"
8628 #include <langinfo.h>
8629 int
8630 main ()
8631 {
8632 char* cs = nl_langinfo(CODESET);
8633   ;
8634   return 0;
8635 }
8636 _ACEOF
8637 rm -f conftest.$ac_objext conftest$ac_exeext
8638 if { (eval echo "$as_me:8638: \"$ac_link\"") >&5
8639   (eval $ac_link) 2>&5
8640   ac_status=$?
8641   echo "$as_me:8641: \$? = $ac_status" >&5
8642   (exit $ac_status); } &&
8643          { ac_try='test -s conftest$ac_exeext'
8644   { (eval echo "$as_me:8644: \"$ac_try\"") >&5
8645   (eval $ac_try) 2>&5
8646   ac_status=$?
8647   echo "$as_me:8647: \$? = $ac_status" >&5
8648   (exit $ac_status); }; }; then
8649   am_cv_langinfo_codeset=yes
8650 else
8651   echo "$as_me: failed program was:" >&5
8652 cat conftest.$ac_ext >&5
8653 am_cv_langinfo_codeset=no
8654 fi
8655 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8656
8657 fi
8658 echo "$as_me:8658: result: $am_cv_langinfo_codeset" >&5
8659 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8660   if test $am_cv_langinfo_codeset = yes; then
8661
8662 cat >>confdefs.h <<\EOF
8663 #define HAVE_LANGINFO_CODESET 1
8664 EOF
8665
8666   fi
8667
8668 # use these variables to work around a defect in gcc's fixincludes.
8669 NCURSES_OK_WCHAR_T=
8670 NCURSES_OK_WINT_T=
8671
8672 echo "$as_me:8672: checking if you want wide-character code" >&5
8673 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8674
8675 # Check whether --enable-widec or --disable-widec was given.
8676 if test "${enable_widec+set}" = set; then
8677   enableval="$enable_widec"
8678   with_widec=$enableval
8679 else
8680   with_widec=no
8681 fi;
8682 echo "$as_me:8682: result: $with_widec" >&5
8683 echo "${ECHO_T}$with_widec" >&6
8684 if test "x$with_widec" = xyes ; then
8685         if test "x$disable_lib_suffixes" = xno ; then
8686                 LIB_SUFFIX="w${LIB_SUFFIX}"
8687         fi
8688
8689 cat >>confdefs.h <<\EOF
8690 #define USE_WIDEC_SUPPORT 1
8691 EOF
8692
8693 cat >>confdefs.h <<\EOF
8694 #define NCURSES_WIDECHAR 1
8695 EOF
8696
8697 echo "$as_me:8697: checking if wchar.h can be used as is" >&5
8698 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8699 if test "${cf_cv_wchar_h_okay+set}" = set; then
8700   echo $ECHO_N "(cached) $ECHO_C" >&6
8701 else
8702
8703 cat >conftest.$ac_ext <<_ACEOF
8704 #line 8704 "configure"
8705 #include "confdefs.h"
8706
8707 #include <stdlib.h>
8708 #include <wchar.h>
8709
8710 int
8711 main ()
8712 {
8713
8714         wint_t foo = 0;
8715         int bar = iswpunct(foo)
8716   ;
8717   return 0;
8718 }
8719 _ACEOF
8720 rm -f conftest.$ac_objext
8721 if { (eval echo "$as_me:8721: \"$ac_compile\"") >&5
8722   (eval $ac_compile) 2>&5
8723   ac_status=$?
8724   echo "$as_me:8724: \$? = $ac_status" >&5
8725   (exit $ac_status); } &&
8726          { ac_try='test -s conftest.$ac_objext'
8727   { (eval echo "$as_me:8727: \"$ac_try\"") >&5
8728   (eval $ac_try) 2>&5
8729   ac_status=$?
8730   echo "$as_me:8730: \$? = $ac_status" >&5
8731   (exit $ac_status); }; }; then
8732   cf_cv_wchar_h_okay=yes
8733 else
8734   echo "$as_me: failed program was:" >&5
8735 cat conftest.$ac_ext >&5
8736 cf_cv_wchar_h_okay=no
8737 fi
8738 rm -f conftest.$ac_objext conftest.$ac_ext
8739 fi
8740 echo "$as_me:8740: result: $cf_cv_wchar_h_okay" >&5
8741 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8742
8743 if test $cf_cv_wchar_h_okay = no
8744 then
8745
8746 echo "$as_me:8746: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8747 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8748 cat >conftest.$ac_ext <<_ACEOF
8749 #line 8749 "configure"
8750 #include "confdefs.h"
8751 #include <sys/types.h>
8752
8753 int
8754 main ()
8755 {
8756
8757 #ifndef _XOPEN_SOURCE_EXTENDED
8758 make an error
8759 #endif
8760   ;
8761   return 0;
8762 }
8763 _ACEOF
8764 rm -f conftest.$ac_objext
8765 if { (eval echo "$as_me:8765: \"$ac_compile\"") >&5
8766   (eval $ac_compile) 2>&5
8767   ac_status=$?
8768   echo "$as_me:8768: \$? = $ac_status" >&5
8769   (exit $ac_status); } &&
8770          { ac_try='test -s conftest.$ac_objext'
8771   { (eval echo "$as_me:8771: \"$ac_try\"") >&5
8772   (eval $ac_try) 2>&5
8773   ac_status=$?
8774   echo "$as_me:8774: \$? = $ac_status" >&5
8775   (exit $ac_status); }; }; then
8776   cf_result=no
8777 else
8778   echo "$as_me: failed program was:" >&5
8779 cat conftest.$ac_ext >&5
8780 cf_result=yes
8781 fi
8782 rm -f conftest.$ac_objext conftest.$ac_ext
8783 echo "$as_me:8783: result: $cf_result" >&5
8784 echo "${ECHO_T}$cf_result" >&6
8785
8786 if test "$cf_result" = yes ; then
8787         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8788 elif test "x" != "x" ; then
8789         echo "$as_me:8789: checking checking for compatible value versus " >&5
8790 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8791         cat >conftest.$ac_ext <<_ACEOF
8792 #line 8792 "configure"
8793 #include "confdefs.h"
8794 #include <sys/types.h>
8795
8796 int
8797 main ()
8798 {
8799
8800 #if _XOPEN_SOURCE_EXTENDED- < 0
8801 make an error
8802 #endif
8803   ;
8804   return 0;
8805 }
8806 _ACEOF
8807 rm -f conftest.$ac_objext
8808 if { (eval echo "$as_me:8808: \"$ac_compile\"") >&5
8809   (eval $ac_compile) 2>&5
8810   ac_status=$?
8811   echo "$as_me:8811: \$? = $ac_status" >&5
8812   (exit $ac_status); } &&
8813          { ac_try='test -s conftest.$ac_objext'
8814   { (eval echo "$as_me:8814: \"$ac_try\"") >&5
8815   (eval $ac_try) 2>&5
8816   ac_status=$?
8817   echo "$as_me:8817: \$? = $ac_status" >&5
8818   (exit $ac_status); }; }; then
8819   cf_result=yes
8820 else
8821   echo "$as_me: failed program was:" >&5
8822 cat conftest.$ac_ext >&5
8823 cf_result=no
8824 fi
8825 rm -f conftest.$ac_objext conftest.$ac_ext
8826         echo "$as_me:8826: result: $cf_result" >&5
8827 echo "${ECHO_T}$cf_result" >&6
8828         if test "$cf_result" = no ; then
8829                 # perhaps we can override it - try...
8830                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8831         fi
8832 fi
8833
8834 fi
8835
8836         # with_overwrite=no
8837         NCURSES_CH_T=cchar_t
8838
8839 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8840 do
8841 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8842 echo "$as_me:8842: checking for $ac_func" >&5
8843 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8844 if eval "test \"\${$as_ac_var+set}\" = set"; then
8845   echo $ECHO_N "(cached) $ECHO_C" >&6
8846 else
8847   cat >conftest.$ac_ext <<_ACEOF
8848 #line 8848 "configure"
8849 #include "confdefs.h"
8850 /* System header to define __stub macros and hopefully few prototypes,
8851     which can conflict with char $ac_func (); below.  */
8852 #include <assert.h>
8853 /* Override any gcc2 internal prototype to avoid an error.  */
8854 #ifdef __cplusplus
8855 extern "C"
8856 #endif
8857 /* We use char because int might match the return type of a gcc2
8858    builtin and then its argument prototype would still apply.  */
8859 char $ac_func ();
8860 char (*f) ();
8861
8862 int
8863 main ()
8864 {
8865 /* The GNU C library defines this for functions which it implements
8866     to always fail with ENOSYS.  Some functions are actually named
8867     something starting with __ and the normal name is an alias.  */
8868 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8869 choke me
8870 #else
8871 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8872 #endif
8873
8874   ;
8875   return 0;
8876 }
8877 _ACEOF
8878 rm -f conftest.$ac_objext conftest$ac_exeext
8879 if { (eval echo "$as_me:8879: \"$ac_link\"") >&5
8880   (eval $ac_link) 2>&5
8881   ac_status=$?
8882   echo "$as_me:8882: \$? = $ac_status" >&5
8883   (exit $ac_status); } &&
8884          { ac_try='test -s conftest$ac_exeext'
8885   { (eval echo "$as_me:8885: \"$ac_try\"") >&5
8886   (eval $ac_try) 2>&5
8887   ac_status=$?
8888   echo "$as_me:8888: \$? = $ac_status" >&5
8889   (exit $ac_status); }; }; then
8890   eval "$as_ac_var=yes"
8891 else
8892   echo "$as_me: failed program was:" >&5
8893 cat conftest.$ac_ext >&5
8894 eval "$as_ac_var=no"
8895 fi
8896 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8897 fi
8898 echo "$as_me:8898: result: `eval echo '${'$as_ac_var'}'`" >&5
8899 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8900 if test `eval echo '${'$as_ac_var'}'` = yes; then
8901   cat >>confdefs.h <<EOF
8902 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8903 EOF
8904
8905 fi
8906 done
8907
8908         if test "x$ac_cv_func_putwc" != xyes ; then
8909
8910 echo "$as_me:8910: checking for multibyte character support" >&5
8911 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8912 if test "${cf_cv_utf8_lib+set}" = set; then
8913   echo $ECHO_N "(cached) $ECHO_C" >&6
8914 else
8915
8916         cf_save_LIBS="$LIBS"
8917         cat >conftest.$ac_ext <<_ACEOF
8918 #line 8918 "configure"
8919 #include "confdefs.h"
8920
8921 #include <stdlib.h>
8922 int
8923 main ()
8924 {
8925 putwc(0,0);
8926   ;
8927   return 0;
8928 }
8929 _ACEOF
8930 rm -f conftest.$ac_objext conftest$ac_exeext
8931 if { (eval echo "$as_me:8931: \"$ac_link\"") >&5
8932   (eval $ac_link) 2>&5
8933   ac_status=$?
8934   echo "$as_me:8934: \$? = $ac_status" >&5
8935   (exit $ac_status); } &&
8936          { ac_try='test -s conftest$ac_exeext'
8937   { (eval echo "$as_me:8937: \"$ac_try\"") >&5
8938   (eval $ac_try) 2>&5
8939   ac_status=$?
8940   echo "$as_me:8940: \$? = $ac_status" >&5
8941   (exit $ac_status); }; }; then
8942   cf_cv_utf8_lib=yes
8943 else
8944   echo "$as_me: failed program was:" >&5
8945 cat conftest.$ac_ext >&5
8946
8947 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8948 # will be set on completion of the AC_TRY_LINK below.
8949 cf_cv_header_path_utf8=
8950 cf_cv_library_path_utf8=
8951
8952 echo "${as_me:-configure}:8952: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8953
8954 cf_save_LIBS="$LIBS"
8955
8956 cat >conftest.$ac_ext <<_ACEOF
8957 #line 8957 "configure"
8958 #include "confdefs.h"
8959
8960 #include <libutf8.h>
8961 int
8962 main ()
8963 {
8964 putwc(0,0);
8965   ;
8966   return 0;
8967 }
8968 _ACEOF
8969 rm -f conftest.$ac_objext conftest$ac_exeext
8970 if { (eval echo "$as_me:8970: \"$ac_link\"") >&5
8971   (eval $ac_link) 2>&5
8972   ac_status=$?
8973   echo "$as_me:8973: \$? = $ac_status" >&5
8974   (exit $ac_status); } &&
8975          { ac_try='test -s conftest$ac_exeext'
8976   { (eval echo "$as_me:8976: \"$ac_try\"") >&5
8977   (eval $ac_try) 2>&5
8978   ac_status=$?
8979   echo "$as_me:8979: \$? = $ac_status" >&5
8980   (exit $ac_status); }; }; then
8981
8982         cf_cv_find_linkage_utf8=yes
8983         cf_cv_header_path_utf8=/usr/include
8984         cf_cv_library_path_utf8=/usr/lib
8985
8986 else
8987   echo "$as_me: failed program was:" >&5
8988 cat conftest.$ac_ext >&5
8989
8990 LIBS="-lutf8  $cf_save_LIBS"
8991
8992 cat >conftest.$ac_ext <<_ACEOF
8993 #line 8993 "configure"
8994 #include "confdefs.h"
8995
8996 #include <libutf8.h>
8997 int
8998 main ()
8999 {
9000 putwc(0,0);
9001   ;
9002   return 0;
9003 }
9004 _ACEOF
9005 rm -f conftest.$ac_objext conftest$ac_exeext
9006 if { (eval echo "$as_me:9006: \"$ac_link\"") >&5
9007   (eval $ac_link) 2>&5
9008   ac_status=$?
9009   echo "$as_me:9009: \$? = $ac_status" >&5
9010   (exit $ac_status); } &&
9011          { ac_try='test -s conftest$ac_exeext'
9012   { (eval echo "$as_me:9012: \"$ac_try\"") >&5
9013   (eval $ac_try) 2>&5
9014   ac_status=$?
9015   echo "$as_me:9015: \$? = $ac_status" >&5
9016   (exit $ac_status); }; }; then
9017
9018         cf_cv_find_linkage_utf8=yes
9019         cf_cv_header_path_utf8=/usr/include
9020         cf_cv_library_path_utf8=/usr/lib
9021         cf_cv_library_file_utf8="-lutf8"
9022
9023 else
9024   echo "$as_me: failed program was:" >&5
9025 cat conftest.$ac_ext >&5
9026
9027         cf_cv_find_linkage_utf8=no
9028         LIBS="$cf_save_LIBS"
9029
9030     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
9031
9032 echo "${as_me:-configure}:9032: testing find linkage for utf8 library ..." 1>&5
9033
9034 echo "${as_me:-configure}:9034: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9035
9036     cf_save_CPPFLAGS="$CPPFLAGS"
9037     cf_test_CPPFLAGS="$CPPFLAGS"
9038
9039 cf_search=
9040
9041 # collect the current set of include-directories from compiler flags
9042 cf_header_path_list=""
9043 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9044         for cf_header_path in $CPPFLAGS $CFLAGS
9045         do
9046                 case $cf_header_path in #(vi
9047                 -I*)
9048                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9049
9050 test "x$cf_header_path" != "xNONE" && \
9051 test -d "$cf_header_path" && \
9052  {
9053         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9054         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9055         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9056         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9057         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9058         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9059 }
9060
9061                         cf_header_path_list="$cf_header_path_list $cf_search"
9062                         ;;
9063                 esac
9064         done
9065 fi
9066
9067 # add the variations for the package we are looking for
9068
9069 cf_search=
9070
9071 test "x/usr" != "x$prefix" && \
9072 test -d "/usr" && \
9073 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
9074         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
9075         test -d /usr/include &&          cf_search="$cf_search /usr/include"
9076         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
9077         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
9078         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
9079         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
9080 }
9081
9082 test "x$prefix" != "xNONE" && \
9083 test -d "$prefix" && \
9084  {
9085         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9086         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9087         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9088         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9089         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9090         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9091 }
9092
9093 test "x/usr/local" != "x$prefix" && \
9094 test -d "/usr/local" && \
9095 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
9096         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
9097         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
9098         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
9099         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
9100         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
9101         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
9102 }
9103
9104 test "x/opt" != "x$prefix" && \
9105 test -d "/opt" && \
9106 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
9107         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
9108         test -d /opt/include &&          cf_search="$cf_search /opt/include"
9109         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
9110         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
9111         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
9112         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
9113 }
9114
9115 test "x$HOME" != "x$prefix" && \
9116 test -d "$HOME" && \
9117 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
9118         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
9119         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
9120         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
9121         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
9122         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
9123         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
9124 }
9125
9126 test "$includedir" != NONE && \
9127 test "$includedir" != "/usr/include" && \
9128 test -d "$includedir" && {
9129         test -d $includedir &&    cf_search="$cf_search $includedir"
9130         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9131 }
9132
9133 test "$oldincludedir" != NONE && \
9134 test "$oldincludedir" != "/usr/include" && \
9135 test -d "$oldincludedir" && {
9136         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9137         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9138 }
9139
9140 cf_search="$cf_search $cf_header_path_list"
9141
9142     for cf_cv_header_path_utf8 in $cf_search
9143     do
9144       if test -d $cf_cv_header_path_utf8 ; then
9145         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9146
9147 echo "${as_me:-configure}:9147: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9148
9149         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9150         cat >conftest.$ac_ext <<_ACEOF
9151 #line 9151 "configure"
9152 #include "confdefs.h"
9153
9154 #include <libutf8.h>
9155 int
9156 main ()
9157 {
9158 putwc(0,0);
9159   ;
9160   return 0;
9161 }
9162 _ACEOF
9163 rm -f conftest.$ac_objext
9164 if { (eval echo "$as_me:9164: \"$ac_compile\"") >&5
9165   (eval $ac_compile) 2>&5
9166   ac_status=$?
9167   echo "$as_me:9167: \$? = $ac_status" >&5
9168   (exit $ac_status); } &&
9169          { ac_try='test -s conftest.$ac_objext'
9170   { (eval echo "$as_me:9170: \"$ac_try\"") >&5
9171   (eval $ac_try) 2>&5
9172   ac_status=$?
9173   echo "$as_me:9173: \$? = $ac_status" >&5
9174   (exit $ac_status); }; }; then
9175
9176             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9177
9178 echo "${as_me:-configure}:9178: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9179
9180             cf_cv_find_linkage_utf8=maybe
9181             cf_test_CPPFLAGS="$CPPFLAGS"
9182             break
9183 else
9184   echo "$as_me: failed program was:" >&5
9185 cat conftest.$ac_ext >&5
9186
9187             CPPFLAGS="$cf_save_CPPFLAGS"
9188
9189 fi
9190 rm -f conftest.$ac_objext conftest.$ac_ext
9191       fi
9192     done
9193
9194     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9195
9196 echo "${as_me:-configure}:9196: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9197
9198       cf_save_LIBS="$LIBS"
9199       cf_save_LDFLAGS="$LDFLAGS"
9200
9201       if test "$cf_cv_find_linkage_utf8" != yes ; then
9202
9203 cf_search=
9204 cf_library_path_list=""
9205 if test -n "${LDFLAGS}${LIBS}" ; then
9206         for cf_library_path in $LDFLAGS $LIBS
9207         do
9208                 case $cf_library_path in #(vi
9209                 -L*)
9210                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9211
9212 test "x$cf_library_path" != "xNONE" && \
9213 test -d "$cf_library_path" && \
9214  {
9215         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9216         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9217         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9218         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9219         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9220         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9221 }
9222
9223                         cf_library_path_list="$cf_library_path_list $cf_search"
9224                         ;;
9225                 esac
9226         done
9227 fi
9228
9229 cf_search=
9230
9231 test "x/usr" != "x$prefix" && \
9232 test -d "/usr" && \
9233 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
9234         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9235         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9236         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9237         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9238         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9239         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9240 }
9241
9242 test "x$prefix" != "xNONE" && \
9243 test -d "$prefix" && \
9244  {
9245         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9246         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9247         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9248         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9249         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9250         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9251 }
9252
9253 test "x/usr/local" != "x$prefix" && \
9254 test -d "/usr/local" && \
9255 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
9256         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9257         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9258         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9259         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9260         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9261         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9262 }
9263
9264 test "x/opt" != "x$prefix" && \
9265 test -d "/opt" && \
9266 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
9267         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9268         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9269         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9270         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9271         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9272         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9273 }
9274
9275 test "x$HOME" != "x$prefix" && \
9276 test -d "$HOME" && \
9277 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
9278         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9279         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9280         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9281         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9282         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9283         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9284 }
9285
9286 cf_search="$cf_library_path_list $cf_search"
9287
9288         for cf_cv_library_path_utf8 in $cf_search
9289         do
9290           if test -d $cf_cv_library_path_utf8 ; then
9291             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9292
9293 echo "${as_me:-configure}:9293: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9294
9295             CPPFLAGS="$cf_test_CPPFLAGS"
9296             LIBS="-lutf8  $cf_save_LIBS"
9297             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9298             cat >conftest.$ac_ext <<_ACEOF
9299 #line 9299 "configure"
9300 #include "confdefs.h"
9301
9302 #include <libutf8.h>
9303 int
9304 main ()
9305 {
9306 putwc(0,0);
9307   ;
9308   return 0;
9309 }
9310 _ACEOF
9311 rm -f conftest.$ac_objext conftest$ac_exeext
9312 if { (eval echo "$as_me:9312: \"$ac_link\"") >&5
9313   (eval $ac_link) 2>&5
9314   ac_status=$?
9315   echo "$as_me:9315: \$? = $ac_status" >&5
9316   (exit $ac_status); } &&
9317          { ac_try='test -s conftest$ac_exeext'
9318   { (eval echo "$as_me:9318: \"$ac_try\"") >&5
9319   (eval $ac_try) 2>&5
9320   ac_status=$?
9321   echo "$as_me:9321: \$? = $ac_status" >&5
9322   (exit $ac_status); }; }; then
9323
9324                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9325
9326 echo "${as_me:-configure}:9326: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9327
9328                 cf_cv_find_linkage_utf8=yes
9329                 cf_cv_library_file_utf8="-lutf8"
9330                 break
9331 else
9332   echo "$as_me: failed program was:" >&5
9333 cat conftest.$ac_ext >&5
9334
9335                 CPPFLAGS="$cf_save_CPPFLAGS"
9336                 LIBS="$cf_save_LIBS"
9337                 LDFLAGS="$cf_save_LDFLAGS"
9338
9339 fi
9340 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9341           fi
9342         done
9343         CPPFLAGS="$cf_save_CPPFLAGS"
9344         LDFLAGS="$cf_save_LDFLAGS"
9345       fi
9346
9347     else
9348       cf_cv_find_linkage_utf8=no
9349     fi
9350
9351 fi
9352 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9353
9354 fi
9355 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9356
9357 LIBS="$cf_save_LIBS"
9358
9359 if test "$cf_cv_find_linkage_utf8" = yes ; then
9360 cf_cv_utf8_lib=add-on
9361 else
9362 cf_cv_utf8_lib=no
9363 fi
9364
9365 fi
9366 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9367 fi
9368 echo "$as_me:9368: result: $cf_cv_utf8_lib" >&5
9369 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9370
9371 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9372 # ncurses/ncursesw:
9373 if test "$cf_cv_utf8_lib" = "add-on" ; then
9374
9375 cat >>confdefs.h <<\EOF
9376 #define HAVE_LIBUTF8_H 1
9377 EOF
9378
9379 if test -n "$cf_cv_header_path_utf8" ; then
9380   for cf_add_incdir in $cf_cv_header_path_utf8
9381   do
9382         while test $cf_add_incdir != /usr/include
9383         do
9384           if test -d $cf_add_incdir
9385           then
9386                 cf_have_incdir=no
9387                 if test -n "$CFLAGS$CPPFLAGS" ; then
9388                   # a loop is needed to ensure we can add subdirs of existing dirs
9389                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9390                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9391                           cf_have_incdir=yes; break
9392                         fi
9393                   done
9394                 fi
9395
9396                 if test "$cf_have_incdir" = no ; then
9397                   if test "$cf_add_incdir" = /usr/local/include ; then
9398                         if test "$GCC" = yes
9399                         then
9400                           cf_save_CPPFLAGS=$CPPFLAGS
9401                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9402                           cat >conftest.$ac_ext <<_ACEOF
9403 #line 9403 "configure"
9404 #include "confdefs.h"
9405 #include <stdio.h>
9406 int
9407 main ()
9408 {
9409 printf("Hello")
9410   ;
9411   return 0;
9412 }
9413 _ACEOF
9414 rm -f conftest.$ac_objext
9415 if { (eval echo "$as_me:9415: \"$ac_compile\"") >&5
9416   (eval $ac_compile) 2>&5
9417   ac_status=$?
9418   echo "$as_me:9418: \$? = $ac_status" >&5
9419   (exit $ac_status); } &&
9420          { ac_try='test -s conftest.$ac_objext'
9421   { (eval echo "$as_me:9421: \"$ac_try\"") >&5
9422   (eval $ac_try) 2>&5
9423   ac_status=$?
9424   echo "$as_me:9424: \$? = $ac_status" >&5
9425   (exit $ac_status); }; }; then
9426   :
9427 else
9428   echo "$as_me: failed program was:" >&5
9429 cat conftest.$ac_ext >&5
9430 cf_have_incdir=yes
9431 fi
9432 rm -f conftest.$ac_objext conftest.$ac_ext
9433                           CPPFLAGS=$cf_save_CPPFLAGS
9434                         fi
9435                   fi
9436                 fi
9437
9438                 if test "$cf_have_incdir" = no ; then
9439                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9440
9441 echo "${as_me:-configure}:9441: testing adding $cf_add_incdir to include-path ..." 1>&5
9442
9443                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9444
9445                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9446                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9447                   cf_add_incdir="$cf_top_incdir"
9448                 else
9449                   break
9450                 fi
9451           fi
9452         done
9453   done
9454 fi
9455
9456 if test -n "$cf_cv_library_path_utf8" ; then
9457   for cf_add_libdir in $cf_cv_library_path_utf8
9458   do
9459     if test $cf_add_libdir = /usr/lib ; then
9460       :
9461     elif test -d $cf_add_libdir
9462     then
9463       cf_have_libdir=no
9464       if test -n "$LDFLAGS$LIBS" ; then
9465         # a loop is needed to ensure we can add subdirs of existing dirs
9466         for cf_test_libdir in $LDFLAGS $LIBS ; do
9467           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9468             cf_have_libdir=yes; break
9469           fi
9470         done
9471       fi
9472       if test "$cf_have_libdir" = no ; then
9473         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9474
9475 echo "${as_me:-configure}:9475: testing adding $cf_add_libdir to library-path ..." 1>&5
9476
9477         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9478       fi
9479     fi
9480   done
9481 fi
9482
9483 cf_add_libs="$cf_cv_library_file_utf8"
9484 # Filter out duplicates - this happens with badly-designed ".pc" files...
9485 for cf_add_1lib in $LIBS
9486 do
9487         for cf_add_2lib in $cf_add_libs
9488         do
9489                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9490                 then
9491                         cf_add_1lib=
9492                         break
9493                 fi
9494         done
9495         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9496 done
9497 LIBS="$cf_add_libs"
9498
9499 fi
9500
9501                 if test "$cf_cv_utf8_lib" != no ; then
9502                         NCURSES_LIBUTF8=1
9503                 fi
9504         fi
9505
9506 # This is needed on Tru64 5.0 to declare mbstate_t
9507 echo "$as_me:9507: checking if we must include wchar.h to declare mbstate_t" >&5
9508 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9509 if test "${cf_cv_mbstate_t+set}" = set; then
9510   echo $ECHO_N "(cached) $ECHO_C" >&6
9511 else
9512
9513 cat >conftest.$ac_ext <<_ACEOF
9514 #line 9514 "configure"
9515 #include "confdefs.h"
9516
9517 #include <stdlib.h>
9518 #include <stdarg.h>
9519 #include <stdio.h>
9520 #ifdef HAVE_LIBUTF8_H
9521 #include <libutf8.h>
9522 #endif
9523 int
9524 main ()
9525 {
9526 mbstate_t state
9527   ;
9528   return 0;
9529 }
9530 _ACEOF
9531 rm -f conftest.$ac_objext
9532 if { (eval echo "$as_me:9532: \"$ac_compile\"") >&5
9533   (eval $ac_compile) 2>&5
9534   ac_status=$?
9535   echo "$as_me:9535: \$? = $ac_status" >&5
9536   (exit $ac_status); } &&
9537          { ac_try='test -s conftest.$ac_objext'
9538   { (eval echo "$as_me:9538: \"$ac_try\"") >&5
9539   (eval $ac_try) 2>&5
9540   ac_status=$?
9541   echo "$as_me:9541: \$? = $ac_status" >&5
9542   (exit $ac_status); }; }; then
9543   cf_cv_mbstate_t=no
9544 else
9545   echo "$as_me: failed program was:" >&5
9546 cat conftest.$ac_ext >&5
9547 cat >conftest.$ac_ext <<_ACEOF
9548 #line 9548 "configure"
9549 #include "confdefs.h"
9550
9551 #include <stdlib.h>
9552 #include <stdarg.h>
9553 #include <stdio.h>
9554 #include <wchar.h>
9555 #ifdef HAVE_LIBUTF8_H
9556 #include <libutf8.h>
9557 #endif
9558 int
9559 main ()
9560 {
9561 mbstate_t value
9562   ;
9563   return 0;
9564 }
9565 _ACEOF
9566 rm -f conftest.$ac_objext
9567 if { (eval echo "$as_me:9567: \"$ac_compile\"") >&5
9568   (eval $ac_compile) 2>&5
9569   ac_status=$?
9570   echo "$as_me:9570: \$? = $ac_status" >&5
9571   (exit $ac_status); } &&
9572          { ac_try='test -s conftest.$ac_objext'
9573   { (eval echo "$as_me:9573: \"$ac_try\"") >&5
9574   (eval $ac_try) 2>&5
9575   ac_status=$?
9576   echo "$as_me:9576: \$? = $ac_status" >&5
9577   (exit $ac_status); }; }; then
9578   cf_cv_mbstate_t=yes
9579 else
9580   echo "$as_me: failed program was:" >&5
9581 cat conftest.$ac_ext >&5
9582 cf_cv_mbstate_t=unknown
9583 fi
9584 rm -f conftest.$ac_objext conftest.$ac_ext
9585 fi
9586 rm -f conftest.$ac_objext conftest.$ac_ext
9587 fi
9588 echo "$as_me:9588: result: $cf_cv_mbstate_t" >&5
9589 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9590
9591 if test "$cf_cv_mbstate_t" = yes ; then
9592
9593 cat >>confdefs.h <<\EOF
9594 #define NEED_WCHAR_H 1
9595 EOF
9596
9597         NEED_WCHAR_H=1
9598 fi
9599
9600 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9601 if test "$cf_cv_mbstate_t" = unknown ; then
9602         NCURSES_MBSTATE_T=1
9603 fi
9604
9605 # This is needed on Tru64 5.0 to declare wchar_t
9606 echo "$as_me:9606: checking if we must include wchar.h to declare wchar_t" >&5
9607 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9608 if test "${cf_cv_wchar_t+set}" = set; then
9609   echo $ECHO_N "(cached) $ECHO_C" >&6
9610 else
9611
9612 cat >conftest.$ac_ext <<_ACEOF
9613 #line 9613 "configure"
9614 #include "confdefs.h"
9615
9616 #include <stdlib.h>
9617 #include <stdarg.h>
9618 #include <stdio.h>
9619 #ifdef HAVE_LIBUTF8_H
9620 #include <libutf8.h>
9621 #endif
9622 int
9623 main ()
9624 {
9625 wchar_t state
9626   ;
9627   return 0;
9628 }
9629 _ACEOF
9630 rm -f conftest.$ac_objext
9631 if { (eval echo "$as_me:9631: \"$ac_compile\"") >&5
9632   (eval $ac_compile) 2>&5
9633   ac_status=$?
9634   echo "$as_me:9634: \$? = $ac_status" >&5
9635   (exit $ac_status); } &&
9636          { ac_try='test -s conftest.$ac_objext'
9637   { (eval echo "$as_me:9637: \"$ac_try\"") >&5
9638   (eval $ac_try) 2>&5
9639   ac_status=$?
9640   echo "$as_me:9640: \$? = $ac_status" >&5
9641   (exit $ac_status); }; }; then
9642   cf_cv_wchar_t=no
9643 else
9644   echo "$as_me: failed program was:" >&5
9645 cat conftest.$ac_ext >&5
9646 cat >conftest.$ac_ext <<_ACEOF
9647 #line 9647 "configure"
9648 #include "confdefs.h"
9649
9650 #include <stdlib.h>
9651 #include <stdarg.h>
9652 #include <stdio.h>
9653 #include <wchar.h>
9654 #ifdef HAVE_LIBUTF8_H
9655 #include <libutf8.h>
9656 #endif
9657 int
9658 main ()
9659 {
9660 wchar_t value
9661   ;
9662   return 0;
9663 }
9664 _ACEOF
9665 rm -f conftest.$ac_objext
9666 if { (eval echo "$as_me:9666: \"$ac_compile\"") >&5
9667   (eval $ac_compile) 2>&5
9668   ac_status=$?
9669   echo "$as_me:9669: \$? = $ac_status" >&5
9670   (exit $ac_status); } &&
9671          { ac_try='test -s conftest.$ac_objext'
9672   { (eval echo "$as_me:9672: \"$ac_try\"") >&5
9673   (eval $ac_try) 2>&5
9674   ac_status=$?
9675   echo "$as_me:9675: \$? = $ac_status" >&5
9676   (exit $ac_status); }; }; then
9677   cf_cv_wchar_t=yes
9678 else
9679   echo "$as_me: failed program was:" >&5
9680 cat conftest.$ac_ext >&5
9681 cf_cv_wchar_t=unknown
9682 fi
9683 rm -f conftest.$ac_objext conftest.$ac_ext
9684 fi
9685 rm -f conftest.$ac_objext conftest.$ac_ext
9686 fi
9687 echo "$as_me:9687: result: $cf_cv_wchar_t" >&5
9688 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9689
9690 if test "$cf_cv_wchar_t" = yes ; then
9691
9692 cat >>confdefs.h <<\EOF
9693 #define NEED_WCHAR_H 1
9694 EOF
9695
9696         NEED_WCHAR_H=1
9697 fi
9698
9699 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9700 if test "$cf_cv_wchar_t" = unknown ; then
9701         NCURSES_WCHAR_T=1
9702 fi
9703
9704 # if we find wchar_t in either place, use substitution to provide a fallback.
9705 if test "$cf_cv_wchar_t" != unknown ; then
9706         NCURSES_OK_WCHAR_T=1
9707 fi
9708
9709 # This is needed on Tru64 5.0 to declare wint_t
9710 echo "$as_me:9710: checking if we must include wchar.h to declare wint_t" >&5
9711 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9712 if test "${cf_cv_wint_t+set}" = set; then
9713   echo $ECHO_N "(cached) $ECHO_C" >&6
9714 else
9715
9716 cat >conftest.$ac_ext <<_ACEOF
9717 #line 9717 "configure"
9718 #include "confdefs.h"
9719
9720 #include <stdlib.h>
9721 #include <stdarg.h>
9722 #include <stdio.h>
9723 #ifdef HAVE_LIBUTF8_H
9724 #include <libutf8.h>
9725 #endif
9726 int
9727 main ()
9728 {
9729 wint_t state
9730   ;
9731   return 0;
9732 }
9733 _ACEOF
9734 rm -f conftest.$ac_objext
9735 if { (eval echo "$as_me:9735: \"$ac_compile\"") >&5
9736   (eval $ac_compile) 2>&5
9737   ac_status=$?
9738   echo "$as_me:9738: \$? = $ac_status" >&5
9739   (exit $ac_status); } &&
9740          { ac_try='test -s conftest.$ac_objext'
9741   { (eval echo "$as_me:9741: \"$ac_try\"") >&5
9742   (eval $ac_try) 2>&5
9743   ac_status=$?
9744   echo "$as_me:9744: \$? = $ac_status" >&5
9745   (exit $ac_status); }; }; then
9746   cf_cv_wint_t=no
9747 else
9748   echo "$as_me: failed program was:" >&5
9749 cat conftest.$ac_ext >&5
9750 cat >conftest.$ac_ext <<_ACEOF
9751 #line 9751 "configure"
9752 #include "confdefs.h"
9753
9754 #include <stdlib.h>
9755 #include <stdarg.h>
9756 #include <stdio.h>
9757 #include <wchar.h>
9758 #ifdef HAVE_LIBUTF8_H
9759 #include <libutf8.h>
9760 #endif
9761 int
9762 main ()
9763 {
9764 wint_t value
9765   ;
9766   return 0;
9767 }
9768 _ACEOF
9769 rm -f conftest.$ac_objext
9770 if { (eval echo "$as_me:9770: \"$ac_compile\"") >&5
9771   (eval $ac_compile) 2>&5
9772   ac_status=$?
9773   echo "$as_me:9773: \$? = $ac_status" >&5
9774   (exit $ac_status); } &&
9775          { ac_try='test -s conftest.$ac_objext'
9776   { (eval echo "$as_me:9776: \"$ac_try\"") >&5
9777   (eval $ac_try) 2>&5
9778   ac_status=$?
9779   echo "$as_me:9779: \$? = $ac_status" >&5
9780   (exit $ac_status); }; }; then
9781   cf_cv_wint_t=yes
9782 else
9783   echo "$as_me: failed program was:" >&5
9784 cat conftest.$ac_ext >&5
9785 cf_cv_wint_t=unknown
9786 fi
9787 rm -f conftest.$ac_objext conftest.$ac_ext
9788 fi
9789 rm -f conftest.$ac_objext conftest.$ac_ext
9790 fi
9791 echo "$as_me:9791: result: $cf_cv_wint_t" >&5
9792 echo "${ECHO_T}$cf_cv_wint_t" >&6
9793
9794 if test "$cf_cv_wint_t" = yes ; then
9795
9796 cat >>confdefs.h <<\EOF
9797 #define NEED_WCHAR_H 1
9798 EOF
9799
9800         NEED_WCHAR_H=1
9801 fi
9802
9803 # if we do not find wint_t in either place, use substitution to provide a fallback.
9804 if test "$cf_cv_wint_t" = unknown ; then
9805         NCURSES_WINT_T=1
9806 fi
9807
9808 # if we find wint_t in either place, use substitution to provide a fallback.
9809 if test "$cf_cv_wint_t" != unknown ; then
9810         NCURSES_OK_WINT_T=1
9811 fi
9812
9813         if test "$NCURSES_MBSTATE_T" != 0; then
9814
9815 cat >>confdefs.h <<\EOF
9816 #define NEED_MBSTATE_T_DEF 1
9817 EOF
9818
9819         fi
9820 fi
9821
9822 ###   use option --disable-lp64 to allow long chtype
9823 case $cf_cv_abi_version in
9824 [345]*)
9825         default_with_lp64=no
9826         ;;
9827 *)
9828         default_with_lp64=yes
9829         ;;
9830 esac
9831
9832 echo "$as_me:9832: checking whether to enable _LP64 definition in curses.h" >&5
9833 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9834
9835 # Check whether --enable-lp64 or --disable-lp64 was given.
9836 if test "${enable_lp64+set}" = set; then
9837   enableval="$enable_lp64"
9838   with_lp64=$enableval
9839 else
9840   with_lp64=$default_with_lp64
9841 fi;
9842 echo "$as_me:9842: result: $with_lp64" >&5
9843 echo "${ECHO_T}$with_lp64" >&6
9844
9845 if test "x$with_lp64" = xyes ; then
9846         cf_cv_enable_lp64=1
9847 else
9848         cf_cv_enable_lp64=0
9849 fi
9850
9851 # Check whether --enable-largefile or --disable-largefile was given.
9852 if test "${enable_largefile+set}" = set; then
9853   enableval="$enable_largefile"
9854
9855 fi;
9856 if test "$enable_largefile" != no; then
9857
9858   echo "$as_me:9858: checking for special C compiler options needed for large files" >&5
9859 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9860 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9861   echo $ECHO_N "(cached) $ECHO_C" >&6
9862 else
9863   ac_cv_sys_largefile_CC=no
9864      if test "$GCC" != yes; then
9865        ac_save_CC=$CC
9866        while :; do
9867          # IRIX 6.2 and later do not support large files by default,
9868          # so use the C compiler's -n32 option if that helps.
9869          cat >conftest.$ac_ext <<_ACEOF
9870 #line 9870 "configure"
9871 #include "confdefs.h"
9872 #include <sys/types.h>
9873  /* Check that off_t can represent 2**63 - 1 correctly.
9874     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9875     since some C++ compilers masquerading as C compilers
9876     incorrectly reject 9223372036854775807.  */
9877 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9878   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9879                        && LARGE_OFF_T % 2147483647 == 1)
9880                       ? 1 : -1];
9881 int
9882 main ()
9883 {
9884
9885   ;
9886   return 0;
9887 }
9888 _ACEOF
9889          rm -f conftest.$ac_objext
9890 if { (eval echo "$as_me:9890: \"$ac_compile\"") >&5
9891   (eval $ac_compile) 2>&5
9892   ac_status=$?
9893   echo "$as_me:9893: \$? = $ac_status" >&5
9894   (exit $ac_status); } &&
9895          { ac_try='test -s conftest.$ac_objext'
9896   { (eval echo "$as_me:9896: \"$ac_try\"") >&5
9897   (eval $ac_try) 2>&5
9898   ac_status=$?
9899   echo "$as_me:9899: \$? = $ac_status" >&5
9900   (exit $ac_status); }; }; then
9901   break
9902 else
9903   echo "$as_me: failed program was:" >&5
9904 cat conftest.$ac_ext >&5
9905 fi
9906 rm -f conftest.$ac_objext
9907          CC="$CC -n32"
9908          rm -f conftest.$ac_objext
9909 if { (eval echo "$as_me:9909: \"$ac_compile\"") >&5
9910   (eval $ac_compile) 2>&5
9911   ac_status=$?
9912   echo "$as_me:9912: \$? = $ac_status" >&5
9913   (exit $ac_status); } &&
9914          { ac_try='test -s conftest.$ac_objext'
9915   { (eval echo "$as_me:9915: \"$ac_try\"") >&5
9916   (eval $ac_try) 2>&5
9917   ac_status=$?
9918   echo "$as_me:9918: \$? = $ac_status" >&5
9919   (exit $ac_status); }; }; then
9920   ac_cv_sys_largefile_CC=' -n32'; break
9921 else
9922   echo "$as_me: failed program was:" >&5
9923 cat conftest.$ac_ext >&5
9924 fi
9925 rm -f conftest.$ac_objext
9926          break
9927        done
9928        CC=$ac_save_CC
9929        rm -f conftest.$ac_ext
9930     fi
9931 fi
9932 echo "$as_me:9932: result: $ac_cv_sys_largefile_CC" >&5
9933 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9934   if test "$ac_cv_sys_largefile_CC" != no; then
9935     CC=$CC$ac_cv_sys_largefile_CC
9936   fi
9937
9938   echo "$as_me:9938: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9939 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9940 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9941   echo $ECHO_N "(cached) $ECHO_C" >&6
9942 else
9943   while :; do
9944   ac_cv_sys_file_offset_bits=no
9945   cat >conftest.$ac_ext <<_ACEOF
9946 #line 9946 "configure"
9947 #include "confdefs.h"
9948 #include <sys/types.h>
9949  /* Check that off_t can represent 2**63 - 1 correctly.
9950     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9951     since some C++ compilers masquerading as C compilers
9952     incorrectly reject 9223372036854775807.  */
9953 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9954   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9955                        && LARGE_OFF_T % 2147483647 == 1)
9956                       ? 1 : -1];
9957 int
9958 main ()
9959 {
9960
9961   ;
9962   return 0;
9963 }
9964 _ACEOF
9965 rm -f conftest.$ac_objext
9966 if { (eval echo "$as_me:9966: \"$ac_compile\"") >&5
9967   (eval $ac_compile) 2>&5
9968   ac_status=$?
9969   echo "$as_me:9969: \$? = $ac_status" >&5
9970   (exit $ac_status); } &&
9971          { ac_try='test -s conftest.$ac_objext'
9972   { (eval echo "$as_me:9972: \"$ac_try\"") >&5
9973   (eval $ac_try) 2>&5
9974   ac_status=$?
9975   echo "$as_me:9975: \$? = $ac_status" >&5
9976   (exit $ac_status); }; }; then
9977   break
9978 else
9979   echo "$as_me: failed program was:" >&5
9980 cat conftest.$ac_ext >&5
9981 fi
9982 rm -f conftest.$ac_objext conftest.$ac_ext
9983   cat >conftest.$ac_ext <<_ACEOF
9984 #line 9984 "configure"
9985 #include "confdefs.h"
9986 #define _FILE_OFFSET_BITS 64
9987 #include <sys/types.h>
9988  /* Check that off_t can represent 2**63 - 1 correctly.
9989     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9990     since some C++ compilers masquerading as C compilers
9991     incorrectly reject 9223372036854775807.  */
9992 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9993   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9994                        && LARGE_OFF_T % 2147483647 == 1)
9995                       ? 1 : -1];
9996 int
9997 main ()
9998 {
9999
10000   ;
10001   return 0;
10002 }
10003 _ACEOF
10004 rm -f conftest.$ac_objext
10005 if { (eval echo "$as_me:10005: \"$ac_compile\"") >&5
10006   (eval $ac_compile) 2>&5
10007   ac_status=$?
10008   echo "$as_me:10008: \$? = $ac_status" >&5
10009   (exit $ac_status); } &&
10010          { ac_try='test -s conftest.$ac_objext'
10011   { (eval echo "$as_me:10011: \"$ac_try\"") >&5
10012   (eval $ac_try) 2>&5
10013   ac_status=$?
10014   echo "$as_me:10014: \$? = $ac_status" >&5
10015   (exit $ac_status); }; }; then
10016   ac_cv_sys_file_offset_bits=64; break
10017 else
10018   echo "$as_me: failed program was:" >&5
10019 cat conftest.$ac_ext >&5
10020 fi
10021 rm -f conftest.$ac_objext conftest.$ac_ext
10022   break
10023 done
10024 fi
10025 echo "$as_me:10025: result: $ac_cv_sys_file_offset_bits" >&5
10026 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10027 if test "$ac_cv_sys_file_offset_bits" != no; then
10028
10029 cat >>confdefs.h <<EOF
10030 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10031 EOF
10032
10033 fi
10034 rm -rf conftest*
10035   echo "$as_me:10035: checking for _LARGE_FILES value needed for large files" >&5
10036 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10037 if test "${ac_cv_sys_large_files+set}" = set; then
10038   echo $ECHO_N "(cached) $ECHO_C" >&6
10039 else
10040   while :; do
10041   ac_cv_sys_large_files=no
10042   cat >conftest.$ac_ext <<_ACEOF
10043 #line 10043 "configure"
10044 #include "confdefs.h"
10045 #include <sys/types.h>
10046  /* Check that off_t can represent 2**63 - 1 correctly.
10047     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10048     since some C++ compilers masquerading as C compilers
10049     incorrectly reject 9223372036854775807.  */
10050 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10051   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10052                        && LARGE_OFF_T % 2147483647 == 1)
10053                       ? 1 : -1];
10054 int
10055 main ()
10056 {
10057
10058   ;
10059   return 0;
10060 }
10061 _ACEOF
10062 rm -f conftest.$ac_objext
10063 if { (eval echo "$as_me:10063: \"$ac_compile\"") >&5
10064   (eval $ac_compile) 2>&5
10065   ac_status=$?
10066   echo "$as_me:10066: \$? = $ac_status" >&5
10067   (exit $ac_status); } &&
10068          { ac_try='test -s conftest.$ac_objext'
10069   { (eval echo "$as_me:10069: \"$ac_try\"") >&5
10070   (eval $ac_try) 2>&5
10071   ac_status=$?
10072   echo "$as_me:10072: \$? = $ac_status" >&5
10073   (exit $ac_status); }; }; then
10074   break
10075 else
10076   echo "$as_me: failed program was:" >&5
10077 cat conftest.$ac_ext >&5
10078 fi
10079 rm -f conftest.$ac_objext conftest.$ac_ext
10080   cat >conftest.$ac_ext <<_ACEOF
10081 #line 10081 "configure"
10082 #include "confdefs.h"
10083 #define _LARGE_FILES 1
10084 #include <sys/types.h>
10085  /* Check that off_t can represent 2**63 - 1 correctly.
10086     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10087     since some C++ compilers masquerading as C compilers
10088     incorrectly reject 9223372036854775807.  */
10089 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10090   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10091                        && LARGE_OFF_T % 2147483647 == 1)
10092                       ? 1 : -1];
10093 int
10094 main ()
10095 {
10096
10097   ;
10098   return 0;
10099 }
10100 _ACEOF
10101 rm -f conftest.$ac_objext
10102 if { (eval echo "$as_me:10102: \"$ac_compile\"") >&5
10103   (eval $ac_compile) 2>&5
10104   ac_status=$?
10105   echo "$as_me:10105: \$? = $ac_status" >&5
10106   (exit $ac_status); } &&
10107          { ac_try='test -s conftest.$ac_objext'
10108   { (eval echo "$as_me:10108: \"$ac_try\"") >&5
10109   (eval $ac_try) 2>&5
10110   ac_status=$?
10111   echo "$as_me:10111: \$? = $ac_status" >&5
10112   (exit $ac_status); }; }; then
10113   ac_cv_sys_large_files=1; break
10114 else
10115   echo "$as_me: failed program was:" >&5
10116 cat conftest.$ac_ext >&5
10117 fi
10118 rm -f conftest.$ac_objext conftest.$ac_ext
10119   break
10120 done
10121 fi
10122 echo "$as_me:10122: result: $ac_cv_sys_large_files" >&5
10123 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10124 if test "$ac_cv_sys_large_files" != no; then
10125
10126 cat >>confdefs.h <<EOF
10127 #define _LARGE_FILES $ac_cv_sys_large_files
10128 EOF
10129
10130 fi
10131 rm -rf conftest*
10132 fi
10133
10134     if test "$enable_largefile" != no ; then
10135         echo "$as_me:10135: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10136 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10137 if test "${ac_cv_sys_largefile_source+set}" = set; then
10138   echo $ECHO_N "(cached) $ECHO_C" >&6
10139 else
10140   while :; do
10141   ac_cv_sys_largefile_source=no
10142   cat >conftest.$ac_ext <<_ACEOF
10143 #line 10143 "configure"
10144 #include "confdefs.h"
10145 #include <stdio.h>
10146 int
10147 main ()
10148 {
10149 return !fseeko;
10150   ;
10151   return 0;
10152 }
10153 _ACEOF
10154 rm -f conftest.$ac_objext
10155 if { (eval echo "$as_me:10155: \"$ac_compile\"") >&5
10156   (eval $ac_compile) 2>&5
10157   ac_status=$?
10158   echo "$as_me:10158: \$? = $ac_status" >&5
10159   (exit $ac_status); } &&
10160          { ac_try='test -s conftest.$ac_objext'
10161   { (eval echo "$as_me:10161: \"$ac_try\"") >&5
10162   (eval $ac_try) 2>&5
10163   ac_status=$?
10164   echo "$as_me:10164: \$? = $ac_status" >&5
10165   (exit $ac_status); }; }; then
10166   break
10167 else
10168   echo "$as_me: failed program was:" >&5
10169 cat conftest.$ac_ext >&5
10170 fi
10171 rm -f conftest.$ac_objext conftest.$ac_ext
10172   cat >conftest.$ac_ext <<_ACEOF
10173 #line 10173 "configure"
10174 #include "confdefs.h"
10175 #define _LARGEFILE_SOURCE 1
10176 #include <stdio.h>
10177 int
10178 main ()
10179 {
10180 return !fseeko;
10181   ;
10182   return 0;
10183 }
10184 _ACEOF
10185 rm -f conftest.$ac_objext
10186 if { (eval echo "$as_me:10186: \"$ac_compile\"") >&5
10187   (eval $ac_compile) 2>&5
10188   ac_status=$?
10189   echo "$as_me:10189: \$? = $ac_status" >&5
10190   (exit $ac_status); } &&
10191          { ac_try='test -s conftest.$ac_objext'
10192   { (eval echo "$as_me:10192: \"$ac_try\"") >&5
10193   (eval $ac_try) 2>&5
10194   ac_status=$?
10195   echo "$as_me:10195: \$? = $ac_status" >&5
10196   (exit $ac_status); }; }; then
10197   ac_cv_sys_largefile_source=1; break
10198 else
10199   echo "$as_me: failed program was:" >&5
10200 cat conftest.$ac_ext >&5
10201 fi
10202 rm -f conftest.$ac_objext conftest.$ac_ext
10203   break
10204 done
10205 fi
10206 echo "$as_me:10206: result: $ac_cv_sys_largefile_source" >&5
10207 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10208 if test "$ac_cv_sys_largefile_source" != no; then
10209
10210 cat >>confdefs.h <<EOF
10211 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10212 EOF
10213
10214 fi
10215 rm -rf conftest*
10216
10217 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10218 # in glibc 2.1.3, but that breaks too many other things.
10219 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10220 echo "$as_me:10220: checking for fseeko" >&5
10221 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10222 if test "${ac_cv_func_fseeko+set}" = set; then
10223   echo $ECHO_N "(cached) $ECHO_C" >&6
10224 else
10225   cat >conftest.$ac_ext <<_ACEOF
10226 #line 10226 "configure"
10227 #include "confdefs.h"
10228 #include <stdio.h>
10229 int
10230 main ()
10231 {
10232 return fseeko && fseeko (stdin, 0, 0);
10233   ;
10234   return 0;
10235 }
10236 _ACEOF
10237 rm -f conftest.$ac_objext conftest$ac_exeext
10238 if { (eval echo "$as_me:10238: \"$ac_link\"") >&5
10239   (eval $ac_link) 2>&5
10240   ac_status=$?
10241   echo "$as_me:10241: \$? = $ac_status" >&5
10242   (exit $ac_status); } &&
10243          { ac_try='test -s conftest$ac_exeext'
10244   { (eval echo "$as_me:10244: \"$ac_try\"") >&5
10245   (eval $ac_try) 2>&5
10246   ac_status=$?
10247   echo "$as_me:10247: \$? = $ac_status" >&5
10248   (exit $ac_status); }; }; then
10249   ac_cv_func_fseeko=yes
10250 else
10251   echo "$as_me: failed program was:" >&5
10252 cat conftest.$ac_ext >&5
10253 ac_cv_func_fseeko=no
10254 fi
10255 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10256 fi
10257 echo "$as_me:10257: result: $ac_cv_func_fseeko" >&5
10258 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10259 if test $ac_cv_func_fseeko = yes; then
10260
10261 cat >>confdefs.h <<\EOF
10262 #define HAVE_FSEEKO 1
10263 EOF
10264
10265 fi
10266
10267         # Normally we would collect these definitions in the config.h,
10268         # but (like _XOPEN_SOURCE), some environments rely on having these
10269         # defined before any of the system headers are included.  Another
10270         # case comes up with C++, e.g., on AIX the compiler compiles the
10271         # header files by themselves before looking at the body files it is
10272         # told to compile.  For ncurses, those header files do not include
10273         # the config.h
10274         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10275         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10276         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10277
10278         echo "$as_me:10278: checking whether to use struct dirent64" >&5
10279 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10280 if test "${cf_cv_struct_dirent64+set}" = set; then
10281   echo $ECHO_N "(cached) $ECHO_C" >&6
10282 else
10283
10284                 cat >conftest.$ac_ext <<_ACEOF
10285 #line 10285 "configure"
10286 #include "confdefs.h"
10287
10288 #include <sys/types.h>
10289 #include <dirent.h>
10290
10291 int
10292 main ()
10293 {
10294
10295                 /* if transitional largefile support is setup, this is true */
10296                 extern struct dirent64 * readdir(DIR *);
10297                 struct dirent64 *x = readdir((DIR *)0);
10298                 struct dirent *y = readdir((DIR *)0);
10299                 int z = x - y;
10300
10301   ;
10302   return 0;
10303 }
10304 _ACEOF
10305 rm -f conftest.$ac_objext
10306 if { (eval echo "$as_me:10306: \"$ac_compile\"") >&5
10307   (eval $ac_compile) 2>&5
10308   ac_status=$?
10309   echo "$as_me:10309: \$? = $ac_status" >&5
10310   (exit $ac_status); } &&
10311          { ac_try='test -s conftest.$ac_objext'
10312   { (eval echo "$as_me:10312: \"$ac_try\"") >&5
10313   (eval $ac_try) 2>&5
10314   ac_status=$?
10315   echo "$as_me:10315: \$? = $ac_status" >&5
10316   (exit $ac_status); }; }; then
10317   cf_cv_struct_dirent64=yes
10318 else
10319   echo "$as_me: failed program was:" >&5
10320 cat conftest.$ac_ext >&5
10321 cf_cv_struct_dirent64=no
10322 fi
10323 rm -f conftest.$ac_objext conftest.$ac_ext
10324
10325 fi
10326 echo "$as_me:10326: result: $cf_cv_struct_dirent64" >&5
10327 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10328         test "$cf_cv_struct_dirent64" = yes &&
10329 cat >>confdefs.h <<\EOF
10330 #define HAVE_STRUCT_DIRENT64 1
10331 EOF
10332
10333     fi
10334
10335 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10336 echo "$as_me:10336: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10337 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10338
10339 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10340 if test "${enable_tparm_varargs+set}" = set; then
10341   enableval="$enable_tparm_varargs"
10342   with_tparm_varargs=$enableval
10343 else
10344   with_tparm_varargs=yes
10345 fi;
10346 echo "$as_me:10346: result: $with_tparm_varargs" >&5
10347 echo "${ECHO_T}$with_tparm_varargs" >&6
10348 NCURSES_TPARM_VARARGS=0
10349 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10350
10351 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10352 if test "$with_ticlib" != no ; then
10353 echo "$as_me:10353: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10354 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10355
10356 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10357 if test "${enable_tic_depends+set}" = set; then
10358   enableval="$enable_tic_depends"
10359   with_tic_depends=$enableval
10360 else
10361   with_tic_depends=yes
10362 fi;
10363 echo "$as_me:10363: result: $with_tic_depends" >&5
10364 echo "${ECHO_T}$with_tic_depends" >&6
10365 else
10366         with_tic_depends=no
10367 fi
10368
10369 ###   use option --with-bool to override bool's type
10370 echo "$as_me:10370: checking for type of bool" >&5
10371 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10372
10373 # Check whether --with-bool or --without-bool was given.
10374 if test "${with_bool+set}" = set; then
10375   withval="$with_bool"
10376   NCURSES_BOOL="$withval"
10377 else
10378   NCURSES_BOOL=auto
10379 fi;
10380 echo "$as_me:10380: result: $NCURSES_BOOL" >&5
10381 echo "${ECHO_T}$NCURSES_BOOL" >&6
10382
10383 echo "$as_me:10383: checking for alternate terminal capabilities file" >&5
10384 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10385
10386 # Check whether --with-caps or --without-caps was given.
10387 if test "${with_caps+set}" = set; then
10388   withval="$with_caps"
10389   TERMINFO_CAPS=Caps.$withval
10390 else
10391   TERMINFO_CAPS=Caps
10392 fi;
10393 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10394 echo "$as_me:10394: result: $TERMINFO_CAPS" >&5
10395 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10396
10397 ###   use option --with-chtype to override chtype's type
10398 echo "$as_me:10398: checking for type of chtype" >&5
10399 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10400
10401 # Check whether --with-chtype or --without-chtype was given.
10402 if test "${with_chtype+set}" = set; then
10403   withval="$with_chtype"
10404   NCURSES_CHTYPE="$withval"
10405 else
10406   NCURSES_CHTYPE=auto
10407 fi;
10408 echo "$as_me:10408: result: $NCURSES_CHTYPE" >&5
10409 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10410
10411 ###   use option --with-ospeed to override ospeed's type
10412 echo "$as_me:10412: checking for type of ospeed" >&5
10413 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10414
10415 # Check whether --with-ospeed or --without-ospeed was given.
10416 if test "${with_ospeed+set}" = set; then
10417   withval="$with_ospeed"
10418   NCURSES_OSPEED="$withval"
10419 else
10420   NCURSES_OSPEED=short
10421 fi;
10422 echo "$as_me:10422: result: $NCURSES_OSPEED" >&5
10423 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10424
10425 ###   use option --with-mmask-t to override mmask_t's type
10426 echo "$as_me:10426: checking for type of mmask_t" >&5
10427 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10428
10429 # Check whether --with-mmask-t or --without-mmask-t was given.
10430 if test "${with_mmask_t+set}" = set; then
10431   withval="$with_mmask_t"
10432   NCURSES_MMASK_T="$withval"
10433 else
10434   NCURSES_MMASK_T=auto
10435 fi;
10436 echo "$as_me:10436: result: $NCURSES_MMASK_T" >&5
10437 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10438
10439 ###   use option --with-ccharw-max to override CCHARW_MAX size
10440 echo "$as_me:10440: checking for size CCHARW_MAX" >&5
10441 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10442
10443 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10444 if test "${with_ccharw_max+set}" = set; then
10445   withval="$with_ccharw_max"
10446   NCURSES_CCHARW_MAX="$withval"
10447 else
10448   NCURSES_CCHARW_MAX=5
10449 fi;
10450 echo "$as_me:10450: result: $NCURSES_CCHARW_MAX" >&5
10451 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10452
10453 ###   use option --with-tparm-arg to override tparm's argument type
10454 echo "$as_me:10454: checking for type of tparm args" >&5
10455 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10456
10457 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10458 if test "${with_tparm_arg+set}" = set; then
10459   withval="$with_tparm_arg"
10460   NCURSES_TPARM_ARG="$withval"
10461 else
10462   NCURSES_TPARM_ARG=long
10463 fi;
10464 echo "$as_me:10464: result: $NCURSES_TPARM_ARG" >&5
10465 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10466
10467 ### Enable compiling-in rcs id's
10468 echo "$as_me:10468: checking if RCS identifiers should be compiled-in" >&5
10469 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10470
10471 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10472 if test "${with_rcs_ids+set}" = set; then
10473   withval="$with_rcs_ids"
10474   with_rcs_ids=$withval
10475 else
10476   with_rcs_ids=no
10477 fi;
10478 echo "$as_me:10478: result: $with_rcs_ids" >&5
10479 echo "${ECHO_T}$with_rcs_ids" >&6
10480 test "x$with_rcs_ids" = xyes &&
10481 cat >>confdefs.h <<\EOF
10482 #define USE_RCS_IDS 1
10483 EOF
10484
10485 ###############################################################################
10486
10487 echo "$as_me:10487: checking format of man-pages" >&5
10488 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10489
10490 # Check whether --with-manpage-format or --without-manpage-format was given.
10491 if test "${with_manpage_format+set}" = set; then
10492   withval="$with_manpage_format"
10493   MANPAGE_FORMAT=$withval
10494 else
10495   MANPAGE_FORMAT=unknown
10496 fi;
10497
10498 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10499 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10500
10501 cf_unknown=
10502
10503 case $MANPAGE_FORMAT in
10504 unknown)
10505   if test -z "$MANPATH" ; then
10506     MANPATH="/usr/man:/usr/share/man"
10507   fi
10508
10509   # look for the 'date' man-page (it's most likely to be installed!)
10510   MANPAGE_FORMAT=
10511   cf_preform=no
10512   cf_catonly=yes
10513   cf_example=date
10514
10515   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10516   for cf_dir in $MANPATH; do
10517     test -z "$cf_dir" && cf_dir=/usr/man
10518     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
10519     do
10520       cf_test=`echo $cf_name | sed -e 's/*//'`
10521       if test "x$cf_test" = "x$cf_name" ; then
10522
10523         case "$cf_name" in
10524         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10525         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10526         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10527         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10528         esac
10529
10530         case "$cf_name" in
10531         $cf_dir/man*)
10532           cf_catonly=no
10533           ;;
10534         $cf_dir/cat*)
10535           cf_preform=yes
10536           ;;
10537         esac
10538         break
10539       fi
10540
10541       # if we found a match in either man* or cat*, stop looking
10542       if test -n "$MANPAGE_FORMAT" ; then
10543         cf_found=no
10544         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10545         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10546         case "$cf_name" in
10547         $cf_dir/cat*)
10548           cf_found=yes
10549           ;;
10550         esac
10551         test $cf_found=yes && break
10552       fi
10553     done
10554     # only check the first directory in $MANPATH where we find manpages
10555     if test -n "$MANPAGE_FORMAT" ; then
10556        break
10557     fi
10558   done
10559   # if we did not find the example, just assume it is normal
10560   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10561   IFS="$ac_save_ifs"
10562   ;;
10563 *)
10564   for cf_option in $MANPAGE_FORMAT; do
10565      case $cf_option in #(vi
10566      gzip|compress|BSDI|normal|formatted|catonly)
10567        ;;
10568      *)
10569        cf_unknown="$cf_unknown $cf_option"
10570        ;;
10571      esac
10572   done
10573   ;;
10574 esac
10575
10576 echo "$as_me:10576: result: $MANPAGE_FORMAT" >&5
10577 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10578 if test -n "$cf_unknown" ; then
10579   { echo "$as_me:10579: WARNING: Unexpected manpage-format $cf_unknown" >&5
10580 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10581 fi
10582
10583 echo "$as_me:10583: checking for manpage renaming" >&5
10584 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10585
10586 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10587 if test "${with_manpage_renames+set}" = set; then
10588   withval="$with_manpage_renames"
10589   MANPAGE_RENAMES=$withval
10590 else
10591   MANPAGE_RENAMES=yes
10592 fi;
10593
10594 case ".$MANPAGE_RENAMES" in #(vi
10595 .no) #(vi
10596   ;;
10597 .|.yes)
10598   # Debian 'man' program?
10599   if test -f /etc/debian_version ; then
10600     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10601   else
10602     MANPAGE_RENAMES=no
10603   fi
10604   ;;
10605 esac
10606
10607 if test "$MANPAGE_RENAMES" != no ; then
10608   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10609     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10610   elif test ! -f $MANPAGE_RENAMES ; then
10611     { { echo "$as_me:10611: error: not a filename: $MANPAGE_RENAMES" >&5
10612 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10613    { (exit 1); exit 1; }; }
10614   fi
10615
10616   test ! -d man && mkdir man
10617
10618   # Construct a sed-script to perform renaming within man-pages
10619   if test -n "$MANPAGE_RENAMES" ; then
10620     test ! -d man && mkdir man
10621     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10622   fi
10623 fi
10624
10625 echo "$as_me:10625: result: $MANPAGE_RENAMES" >&5
10626 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10627
10628 echo "$as_me:10628: checking if manpage aliases will be installed" >&5
10629 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10630
10631 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10632 if test "${with_manpage_aliases+set}" = set; then
10633   withval="$with_manpage_aliases"
10634   MANPAGE_ALIASES=$withval
10635 else
10636   MANPAGE_ALIASES=yes
10637 fi;
10638
10639 echo "$as_me:10639: result: $MANPAGE_ALIASES" >&5
10640 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10641
10642 case "x$LN_S" in #(vi
10643 xln*) #(vi
10644         cf_use_symlinks=yes
10645         ;;
10646 *)
10647         cf_use_symlinks=no
10648         ;;
10649 esac
10650
10651 MANPAGE_SYMLINKS=no
10652 if test "$MANPAGE_ALIASES" = yes ; then
10653 echo "$as_me:10653: checking if manpage symlinks should be used" >&5
10654 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10655
10656 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10657 if test "${with_manpage_symlinks+set}" = set; then
10658   withval="$with_manpage_symlinks"
10659   MANPAGE_SYMLINKS=$withval
10660 else
10661   MANPAGE_SYMLINKS=$cf_use_symlinks
10662 fi;
10663
10664 if test "$$cf_use_symlinks" = no; then
10665 if test "$MANPAGE_SYMLINKS" = yes ; then
10666         { echo "$as_me:10666: WARNING: cannot make symlinks" >&5
10667 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10668         MANPAGE_SYMLINKS=no
10669 fi
10670 fi
10671
10672 echo "$as_me:10672: result: $MANPAGE_SYMLINKS" >&5
10673 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10674 fi
10675
10676 echo "$as_me:10676: checking for manpage tbl" >&5
10677 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10678
10679 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10680 if test "${with_manpage_tbl+set}" = set; then
10681   withval="$with_manpage_tbl"
10682   MANPAGE_TBL=$withval
10683 else
10684   MANPAGE_TBL=no
10685 fi;
10686
10687 echo "$as_me:10687: result: $MANPAGE_TBL" >&5
10688 echo "${ECHO_T}$MANPAGE_TBL" >&6
10689
10690   if test "$prefix" = "NONE" ; then
10691      cf_prefix="$ac_default_prefix"
10692   else
10693      cf_prefix="$prefix"
10694   fi
10695
10696   case "$MANPAGE_FORMAT" in # (vi
10697   *catonly*) # (vi
10698     cf_format=yes
10699     cf_inboth=no
10700     ;;
10701   *formatted*) # (vi
10702     cf_format=yes
10703     cf_inboth=yes
10704     ;;
10705   *)
10706     cf_format=no
10707     cf_inboth=no
10708     ;;
10709   esac
10710
10711 test ! -d man && mkdir man
10712
10713 cf_so_strip=
10714 cf_compress=
10715 case "$MANPAGE_FORMAT" in #(vi
10716 *compress*) #(vi
10717         cf_so_strip="Z"
10718         cf_compress=compress
10719   ;;
10720 *gzip*)
10721         cf_so_strip="gz"
10722         cf_compress=gzip
10723   ;;
10724 esac
10725
10726 cf_edit_man=./edit_man.sh
10727 cf_man_alias=`pwd`/man_alias.sed
10728
10729 cat >$cf_edit_man <<CF_EOF
10730 #! /bin/sh
10731 # this script is generated by the configure-script CF_MAN_PAGES macro.
10732
10733 prefix="$cf_prefix"
10734 datarootdir="$datarootdir"
10735 datadir="$datadir"
10736
10737 NCURSES_MAJOR="$NCURSES_MAJOR"
10738 NCURSES_MINOR="$NCURSES_MINOR"
10739 NCURSES_PATCH="$NCURSES_PATCH"
10740
10741 NCURSES_OSPEED="$NCURSES_OSPEED"
10742 TERMINFO="$TERMINFO"
10743
10744 INSTALL="$INSTALL"
10745 INSTALL_DATA="$INSTALL_DATA"
10746
10747 transform="$program_transform_name"
10748
10749 TMP=\${TMPDIR:=/tmp}/man\$\$
10750 trap "rm -f \$TMP" 0 1 2 5 15
10751
10752 form=\$1
10753 shift || exit 1
10754
10755 verb=\$1
10756 shift || exit 1
10757
10758 mandir=\$1
10759 shift || exit 1
10760
10761 srcdir=\$1
10762 top_srcdir=\$srcdir/..
10763 shift || exit 1
10764
10765 if test "\$form" = normal ; then
10766         if test "$cf_format" = yes ; then
10767         if test "$cf_inboth" = no ; then
10768                 sh \$0 format \$verb \$mandir \$srcdir \$*
10769                 exit $?
10770         fi
10771         fi
10772         cf_subdir=\$mandir/man
10773         cf_tables=$MANPAGE_TBL
10774 else
10775         cf_subdir=\$mandir/cat
10776         cf_tables=yes
10777 fi
10778
10779 # process the list of source-files
10780 for i in \$* ; do
10781 case \$i in #(vi
10782 *.orig|*.rej) ;; #(vi
10783 *.[0-9]*)
10784         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10785         if test \$verb = installing ; then
10786         if test ! -d \$cf_subdir\${section} ; then
10787                 mkdir -p \$cf_subdir\$section
10788         fi
10789         fi
10790
10791         # replace variables in man page
10792         if test ! -f $cf_man_alias ; then
10793 cat >>$cf_man_alias <<-CF_EOF2
10794                 s,@DATADIR@,\$datadir,g
10795                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
10796                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
10797                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
10798                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
10799                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
10800                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
10801 CF_EOF
10802
10803         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10804         do
10805                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10806                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10807 cat >>$cf_edit_man <<-CF_EOF
10808                 s,@$cf_NAME@,$cf_name,g
10809 CF_EOF
10810         done
10811
10812 cat >>$cf_edit_man <<CF_EOF
10813 CF_EOF2
10814                 echo "...made $cf_man_alias"
10815         fi
10816
10817         aliases=
10818         cf_source=\`basename \$i\`
10819         inalias=\$cf_source
10820         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10821         if test ! -f \$inalias ; then
10822                 echo .. skipped \$cf_source
10823                 continue
10824         fi
10825 CF_EOF
10826
10827 if test "$MANPAGE_ALIASES" != no ; then
10828 cat >>$cf_edit_man <<CF_EOF
10829         nCurses=ignore.3x
10830         test $with_curses_h = yes && nCurses=ncurses.3x
10831         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10832 CF_EOF
10833 fi
10834
10835 if test "$MANPAGE_RENAMES" = no ; then
10836 cat >>$cf_edit_man <<CF_EOF
10837         # perform program transformations for section 1 man pages
10838         if test \$section = 1 ; then
10839                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10840         else
10841                 cf_target=\$cf_subdir\${section}/\$cf_source
10842         fi
10843 CF_EOF
10844 else
10845 cat >>$cf_edit_man <<CF_EOF
10846         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10847         if test -z "\$cf_target" ; then
10848                 echo '? missing rename for '\$cf_source
10849                 cf_target="\$cf_source"
10850         fi
10851         cf_target="\$cf_subdir\${section}/\${cf_target}"
10852
10853 CF_EOF
10854 fi
10855
10856 cat >>$cf_edit_man <<CF_EOF
10857         sed     -f $cf_man_alias \\
10858 CF_EOF
10859
10860 if test -f $MANPAGE_RENAMES ; then
10861 cat >>$cf_edit_man <<CF_EOF
10862                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10863 CF_EOF
10864 else
10865 cat >>$cf_edit_man <<CF_EOF
10866                 < \$i >\$TMP
10867 CF_EOF
10868 fi
10869
10870 cat >>$cf_edit_man <<CF_EOF
10871 if test \$cf_tables = yes ; then
10872         tbl \$TMP >\$TMP.out
10873         mv \$TMP.out \$TMP
10874 fi
10875 CF_EOF
10876
10877 if test $with_overwrite != yes ; then
10878 cat >>$cf_edit_man <<CF_EOF
10879         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10880         mv \$TMP.out \$TMP
10881 CF_EOF
10882 fi
10883
10884 if test $with_curses_h != yes ; then
10885 cat >>$cf_edit_man <<CF_EOF
10886         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10887         mv \$TMP.out \$TMP
10888 CF_EOF
10889 fi
10890
10891 cat >>$cf_edit_man <<CF_EOF
10892         if test \$form = format ; then
10893                 nroff -man \$TMP >\$TMP.out
10894                 mv \$TMP.out \$TMP
10895         fi
10896 CF_EOF
10897
10898 if test -n "$cf_compress" ; then
10899 cat >>$cf_edit_man <<CF_EOF
10900         if test \$verb = installing ; then
10901         if ( $cf_compress -f \$TMP )
10902         then
10903                 mv \$TMP.$cf_so_strip \$TMP
10904         fi
10905         fi
10906         cf_target="\$cf_target.$cf_so_strip"
10907 CF_EOF
10908 fi
10909
10910 case "$MANPAGE_FORMAT" in #(vi
10911 *BSDI*)
10912 cat >>$cf_edit_man <<CF_EOF
10913         if test \$form = format ; then
10914                 # BSDI installs only .0 suffixes in the cat directories
10915                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10916         fi
10917 CF_EOF
10918   ;;
10919 esac
10920
10921 cat >>$cf_edit_man <<CF_EOF
10922         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10923         if test \$verb = installing ; then
10924                 echo \$verb \$cf_target
10925                 \$INSTALL_DATA \$TMP \$cf_target
10926                 test -d \$cf_subdir\${section} &&
10927                 test -n "\$aliases" && (
10928                         cd \$cf_subdir\${section} && (
10929                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10930                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10931                                 cf_target=\`basename \$cf_target\`
10932                                 for cf_alias in \$aliases
10933                                 do
10934                                         if test \$section = 1 ; then
10935                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10936                                         fi
10937
10938                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10939                                                 if test -f \$cf_alias\${suffix} ; then
10940                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10941                                                         then
10942                                                                 continue
10943                                                         fi
10944                                                 fi
10945                                                 echo .. \$verb alias \$cf_alias\${suffix}
10946 CF_EOF
10947 case "x$LN_S" in #(vi
10948 *-f) #(vi
10949 cat >>$cf_edit_man <<CF_EOF
10950                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10951 CF_EOF
10952         ;;
10953 *)
10954 cat >>$cf_edit_man <<CF_EOF
10955                                                 rm -f \$cf_alias\${suffix}
10956                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10957 CF_EOF
10958         ;;
10959 esac
10960 cat >>$cf_edit_man <<CF_EOF
10961                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10962                                                 echo ".so \$cf_source" >\$TMP
10963 CF_EOF
10964 if test -n "$cf_compress" ; then
10965 cat >>$cf_edit_man <<CF_EOF
10966                                                 if test -n "$cf_so_strip" ; then
10967                                                         $cf_compress -f \$TMP
10968                                                         mv \$TMP.$cf_so_strip \$TMP
10969                                                 fi
10970 CF_EOF
10971 fi
10972 cat >>$cf_edit_man <<CF_EOF
10973                                                 echo .. \$verb alias \$cf_alias\${suffix}
10974                                                 rm -f \$cf_alias\${suffix}
10975                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10976                                         fi
10977                                 done
10978                         )
10979                 )
10980         elif test \$verb = removing ; then
10981                 test -f \$cf_target && (
10982                         echo \$verb \$cf_target
10983                         rm -f \$cf_target
10984                 )
10985                 test -d \$cf_subdir\${section} &&
10986                 test -n "\$aliases" && (
10987                         cd \$cf_subdir\${section} && (
10988                                 for cf_alias in \$aliases
10989                                 do
10990                                         if test \$section = 1 ; then
10991                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10992                                         fi
10993
10994                                         echo .. \$verb alias \$cf_alias\${suffix}
10995                                         rm -f \$cf_alias\${suffix}
10996                                 done
10997                         )
10998                 )
10999         else
11000 #               echo ".hy 0"
11001                 cat \$TMP
11002         fi
11003         ;;
11004 esac
11005 done
11006
11007 if test $cf_inboth = yes ; then
11008 if test \$form != format ; then
11009         sh \$0 format \$verb \$mandir \$srcdir \$*
11010 fi
11011 fi
11012
11013 exit 0
11014 CF_EOF
11015 chmod 755 $cf_edit_man
11016
11017 ###############################################################################
11018
11019 ### Note that some functions (such as const) are normally disabled anyway.
11020 echo "$as_me:11020: checking if you want to build with function extensions" >&5
11021 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11022
11023 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11024 if test "${enable_ext_funcs+set}" = set; then
11025   enableval="$enable_ext_funcs"
11026   with_ext_funcs=$enableval
11027 else
11028   with_ext_funcs=yes
11029 fi;
11030 echo "$as_me:11030: result: $with_ext_funcs" >&5
11031 echo "${ECHO_T}$with_ext_funcs" >&6
11032 if test "x$with_ext_funcs" = xyes ; then
11033         NCURSES_EXT_FUNCS=1
11034
11035 cat >>confdefs.h <<\EOF
11036 #define HAVE_ASSUME_DEFAULT_COLORS 1
11037 EOF
11038
11039 cat >>confdefs.h <<\EOF
11040 #define HAVE_CURSES_VERSION 1
11041 EOF
11042
11043 cat >>confdefs.h <<\EOF
11044 #define HAVE_HAS_KEY 1
11045 EOF
11046
11047 cat >>confdefs.h <<\EOF
11048 #define HAVE_RESIZETERM 1
11049 EOF
11050
11051 cat >>confdefs.h <<\EOF
11052 #define HAVE_RESIZE_TERM 1
11053 EOF
11054
11055 cat >>confdefs.h <<\EOF
11056 #define HAVE_TERM_ENTRY_H 1
11057 EOF
11058
11059 cat >>confdefs.h <<\EOF
11060 #define HAVE_USE_DEFAULT_COLORS 1
11061 EOF
11062
11063 cat >>confdefs.h <<\EOF
11064 #define HAVE_USE_SCREEN 1
11065 EOF
11066
11067 cat >>confdefs.h <<\EOF
11068 #define HAVE_USE_WINDOW 1
11069 EOF
11070
11071 cat >>confdefs.h <<\EOF
11072 #define HAVE_WRESIZE 1
11073 EOF
11074
11075 cat >>confdefs.h <<\EOF
11076 #define NCURSES_EXT_FUNCS 1
11077 EOF
11078
11079         GENERATED_EXT_FUNCS=generated
11080 else
11081         NCURSES_EXT_FUNCS=0
11082         GENERATED_EXT_FUNCS=
11083 fi
11084
11085 echo "$as_me:11085: checking if you want to build with experimental SCREEN extensions" >&5
11086 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
11087
11088 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11089 if test "${enable_sp_funcs+set}" = set; then
11090   enableval="$enable_sp_funcs"
11091   with_sp_funcs=$enableval
11092 else
11093   with_sp_funcs=no
11094 fi;
11095 echo "$as_me:11095: result: $with_sp_funcs" >&5
11096 echo "${ECHO_T}$with_sp_funcs" >&6
11097 if test "x$with_sp_funcs" = xyes ; then
11098         NCURSES_SP_FUNCS=1
11099
11100 cat >>confdefs.h <<\EOF
11101 #define NCURSES_SP_FUNCS 1
11102 EOF
11103
11104         GENERATED_SP_FUNCS=generated
11105 else
11106         NCURSES_SP_FUNCS=0
11107         GENERATED_SP_FUNCS=
11108 fi
11109
11110 echo "$as_me:11110: checking if you want to build with experimental terminal-driver" >&5
11111 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
11112
11113 # Check whether --enable-term-driver or --disable-term-driver was given.
11114 if test "${enable_term_driver+set}" = set; then
11115   enableval="$enable_term_driver"
11116   with_term_driver=$enableval
11117 else
11118   with_term_driver=no
11119 fi;
11120 echo "$as_me:11120: result: $with_term_driver" >&5
11121 echo "${ECHO_T}$with_term_driver" >&6
11122 if test "x$with_term_driver" = xyes ; then
11123
11124 cat >>confdefs.h <<\EOF
11125 #define USE_TERM_DRIVER 1
11126 EOF
11127
11128         if test "x$with_sp_funcs" != xyes ; then
11129                 { { echo "$as_me:11129: error: The term-driver option relies upon sp-funcs" >&5
11130 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11131    { (exit 1); exit 1; }; }
11132         fi
11133 fi
11134
11135 ###   use option --enable-const to turn on use of const beyond that in XSI.
11136 echo "$as_me:11136: checking for extended use of const keyword" >&5
11137 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11138
11139 # Check whether --enable-const or --disable-const was given.
11140 if test "${enable_const+set}" = set; then
11141   enableval="$enable_const"
11142   with_ext_const=$enableval
11143 else
11144   with_ext_const=no
11145 fi;
11146 echo "$as_me:11146: result: $with_ext_const" >&5
11147 echo "${ECHO_T}$with_ext_const" >&6
11148 NCURSES_CONST='/*nothing*/'
11149 if test "x$with_ext_const" = xyes ; then
11150         NCURSES_CONST=const
11151 fi
11152
11153 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11154 echo "$as_me:11154: checking if you want to use extended colors" >&5
11155 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11156
11157 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11158 if test "${enable_ext_colors+set}" = set; then
11159   enableval="$enable_ext_colors"
11160   with_ext_colors=$enableval
11161 else
11162   with_ext_colors=no
11163 fi;
11164 echo "$as_me:11164: result: $with_ext_colors" >&5
11165 echo "${ECHO_T}$with_ext_colors" >&6
11166 NCURSES_EXT_COLORS=0
11167 if test "x$with_ext_colors" = xyes ; then
11168         if test "x$with_widec" != xyes ; then
11169                 { { echo "$as_me:11169: error: This option applies only to wide-character library" >&5
11170 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11171    { (exit 1); exit 1; }; }
11172         else
11173                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11174
11175 if test "${with_abi_version+set}" != set; then
11176         case $cf_cv_rel_version in
11177         5.*)
11178                 cf_cv_rel_version=6.0
11179                 cf_cv_abi_version=6
11180                 { echo "$as_me:11180: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11181 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11182                 ;;
11183         esac
11184 fi
11185
11186         fi
11187         NCURSES_EXT_COLORS=1
11188
11189 cat >>confdefs.h <<\EOF
11190 #define NCURSES_EXT_COLORS 1
11191 EOF
11192
11193 fi
11194
11195 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11196 echo "$as_me:11196: checking if you want to use extended mouse encoding" >&5
11197 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11198
11199 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11200 if test "${enable_ext_mouse+set}" = set; then
11201   enableval="$enable_ext_mouse"
11202   with_ext_mouse=$enableval
11203 else
11204   with_ext_mouse=no
11205 fi;
11206 echo "$as_me:11206: result: $with_ext_mouse" >&5
11207 echo "${ECHO_T}$with_ext_mouse" >&6
11208 NCURSES_MOUSE_VERSION=1
11209 if test "x$with_ext_mouse" = xyes ; then
11210         NCURSES_MOUSE_VERSION=2
11211
11212 if test "${with_abi_version+set}" != set; then
11213         case $cf_cv_rel_version in
11214         5.*)
11215                 cf_cv_rel_version=6.0
11216                 cf_cv_abi_version=6
11217                 { echo "$as_me:11217: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11218 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11219                 ;;
11220         esac
11221 fi
11222
11223 fi
11224
11225 echo "$as_me:11225: checking if you want \$NCURSES_NO_PADDING code" >&5
11226 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11227
11228 # Check whether --enable-no-padding or --disable-no-padding was given.
11229 if test "${enable_no_padding+set}" = set; then
11230   enableval="$enable_no_padding"
11231   with_no_padding=$enableval
11232 else
11233   with_no_padding=$with_ext_funcs
11234 fi;
11235 echo "$as_me:11235: result: $with_no_padding" >&5
11236 echo "${ECHO_T}$with_no_padding" >&6
11237 test "x$with_no_padding" = xyes &&
11238 cat >>confdefs.h <<\EOF
11239 #define NCURSES_NO_PADDING 1
11240 EOF
11241
11242 echo "$as_me:11242: checking for ANSI C header files" >&5
11243 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11244 if test "${ac_cv_header_stdc+set}" = set; then
11245   echo $ECHO_N "(cached) $ECHO_C" >&6
11246 else
11247   cat >conftest.$ac_ext <<_ACEOF
11248 #line 11248 "configure"
11249 #include "confdefs.h"
11250 #include <stdlib.h>
11251 #include <stdarg.h>
11252 #include <string.h>
11253 #include <float.h>
11254
11255 _ACEOF
11256 if { (eval echo "$as_me:11256: \"$ac_cpp conftest.$ac_ext\"") >&5
11257   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11258   ac_status=$?
11259   egrep -v '^ *\+' conftest.er1 >conftest.err
11260   rm -f conftest.er1
11261   cat conftest.err >&5
11262   echo "$as_me:11262: \$? = $ac_status" >&5
11263   (exit $ac_status); } >/dev/null; then
11264   if test -s conftest.err; then
11265     ac_cpp_err=$ac_c_preproc_warn_flag
11266   else
11267     ac_cpp_err=
11268   fi
11269 else
11270   ac_cpp_err=yes
11271 fi
11272 if test -z "$ac_cpp_err"; then
11273   ac_cv_header_stdc=yes
11274 else
11275   echo "$as_me: failed program was:" >&5
11276   cat conftest.$ac_ext >&5
11277   ac_cv_header_stdc=no
11278 fi
11279 rm -f conftest.err conftest.$ac_ext
11280
11281 if test $ac_cv_header_stdc = yes; then
11282   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11283   cat >conftest.$ac_ext <<_ACEOF
11284 #line 11284 "configure"
11285 #include "confdefs.h"
11286 #include <string.h>
11287
11288 _ACEOF
11289 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11290   egrep "memchr" >/dev/null 2>&1; then
11291   :
11292 else
11293   ac_cv_header_stdc=no
11294 fi
11295 rm -rf conftest*
11296
11297 fi
11298
11299 if test $ac_cv_header_stdc = yes; then
11300   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11301   cat >conftest.$ac_ext <<_ACEOF
11302 #line 11302 "configure"
11303 #include "confdefs.h"
11304 #include <stdlib.h>
11305
11306 _ACEOF
11307 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11308   egrep "free" >/dev/null 2>&1; then
11309   :
11310 else
11311   ac_cv_header_stdc=no
11312 fi
11313 rm -rf conftest*
11314
11315 fi
11316
11317 if test $ac_cv_header_stdc = yes; then
11318   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11319   if test "$cross_compiling" = yes; then
11320   :
11321 else
11322   cat >conftest.$ac_ext <<_ACEOF
11323 #line 11323 "configure"
11324 #include "confdefs.h"
11325 #include <ctype.h>
11326 #if ((' ' & 0x0FF) == 0x020)
11327 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11328 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11329 #else
11330 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11331                      || ('j' <= (c) && (c) <= 'r') \
11332                      || ('s' <= (c) && (c) <= 'z'))
11333 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11334 #endif
11335
11336 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11337 int
11338 main ()
11339 {
11340   int i;
11341   for (i = 0; i < 256; i++)
11342     if (XOR (islower (i), ISLOWER (i))
11343         || toupper (i) != TOUPPER (i))
11344       $ac_main_return(2);
11345   $ac_main_return (0);
11346 }
11347 _ACEOF
11348 rm -f conftest$ac_exeext
11349 if { (eval echo "$as_me:11349: \"$ac_link\"") >&5
11350   (eval $ac_link) 2>&5
11351   ac_status=$?
11352   echo "$as_me:11352: \$? = $ac_status" >&5
11353   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11354   { (eval echo "$as_me:11354: \"$ac_try\"") >&5
11355   (eval $ac_try) 2>&5
11356   ac_status=$?
11357   echo "$as_me:11357: \$? = $ac_status" >&5
11358   (exit $ac_status); }; }; then
11359   :
11360 else
11361   echo "$as_me: program exited with status $ac_status" >&5
11362 echo "$as_me: failed program was:" >&5
11363 cat conftest.$ac_ext >&5
11364 ac_cv_header_stdc=no
11365 fi
11366 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11367 fi
11368 fi
11369 fi
11370 echo "$as_me:11370: result: $ac_cv_header_stdc" >&5
11371 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11372 if test $ac_cv_header_stdc = yes; then
11373
11374 cat >>confdefs.h <<\EOF
11375 #define STDC_HEADERS 1
11376 EOF
11377
11378 fi
11379
11380 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11381
11382 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11383                   inttypes.h stdint.h unistd.h
11384 do
11385 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11386 echo "$as_me:11386: checking for $ac_header" >&5
11387 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11388 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11389   echo $ECHO_N "(cached) $ECHO_C" >&6
11390 else
11391   cat >conftest.$ac_ext <<_ACEOF
11392 #line 11392 "configure"
11393 #include "confdefs.h"
11394 $ac_includes_default
11395 #include <$ac_header>
11396 _ACEOF
11397 rm -f conftest.$ac_objext
11398 if { (eval echo "$as_me:11398: \"$ac_compile\"") >&5
11399   (eval $ac_compile) 2>&5
11400   ac_status=$?
11401   echo "$as_me:11401: \$? = $ac_status" >&5
11402   (exit $ac_status); } &&
11403          { ac_try='test -s conftest.$ac_objext'
11404   { (eval echo "$as_me:11404: \"$ac_try\"") >&5
11405   (eval $ac_try) 2>&5
11406   ac_status=$?
11407   echo "$as_me:11407: \$? = $ac_status" >&5
11408   (exit $ac_status); }; }; then
11409   eval "$as_ac_Header=yes"
11410 else
11411   echo "$as_me: failed program was:" >&5
11412 cat conftest.$ac_ext >&5
11413 eval "$as_ac_Header=no"
11414 fi
11415 rm -f conftest.$ac_objext conftest.$ac_ext
11416 fi
11417 echo "$as_me:11417: result: `eval echo '${'$as_ac_Header'}'`" >&5
11418 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11419 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11420   cat >>confdefs.h <<EOF
11421 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11422 EOF
11423
11424 fi
11425 done
11426
11427 echo "$as_me:11427: checking for signed char" >&5
11428 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11429 if test "${ac_cv_type_signed_char+set}" = set; then
11430   echo $ECHO_N "(cached) $ECHO_C" >&6
11431 else
11432   cat >conftest.$ac_ext <<_ACEOF
11433 #line 11433 "configure"
11434 #include "confdefs.h"
11435 $ac_includes_default
11436 int
11437 main ()
11438 {
11439 if ((signed char *) 0)
11440   return 0;
11441 if (sizeof (signed char))
11442   return 0;
11443   ;
11444   return 0;
11445 }
11446 _ACEOF
11447 rm -f conftest.$ac_objext
11448 if { (eval echo "$as_me:11448: \"$ac_compile\"") >&5
11449   (eval $ac_compile) 2>&5
11450   ac_status=$?
11451   echo "$as_me:11451: \$? = $ac_status" >&5
11452   (exit $ac_status); } &&
11453          { ac_try='test -s conftest.$ac_objext'
11454   { (eval echo "$as_me:11454: \"$ac_try\"") >&5
11455   (eval $ac_try) 2>&5
11456   ac_status=$?
11457   echo "$as_me:11457: \$? = $ac_status" >&5
11458   (exit $ac_status); }; }; then
11459   ac_cv_type_signed_char=yes
11460 else
11461   echo "$as_me: failed program was:" >&5
11462 cat conftest.$ac_ext >&5
11463 ac_cv_type_signed_char=no
11464 fi
11465 rm -f conftest.$ac_objext conftest.$ac_ext
11466 fi
11467 echo "$as_me:11467: result: $ac_cv_type_signed_char" >&5
11468 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11469
11470 echo "$as_me:11470: checking size of signed char" >&5
11471 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11472 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11473   echo $ECHO_N "(cached) $ECHO_C" >&6
11474 else
11475   if test "$ac_cv_type_signed_char" = yes; then
11476   if test "$cross_compiling" = yes; then
11477   # Depending upon the size, compute the lo and hi bounds.
11478 cat >conftest.$ac_ext <<_ACEOF
11479 #line 11479 "configure"
11480 #include "confdefs.h"
11481 $ac_includes_default
11482 int
11483 main ()
11484 {
11485 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11486   ;
11487   return 0;
11488 }
11489 _ACEOF
11490 rm -f conftest.$ac_objext
11491 if { (eval echo "$as_me:11491: \"$ac_compile\"") >&5
11492   (eval $ac_compile) 2>&5
11493   ac_status=$?
11494   echo "$as_me:11494: \$? = $ac_status" >&5
11495   (exit $ac_status); } &&
11496          { ac_try='test -s conftest.$ac_objext'
11497   { (eval echo "$as_me:11497: \"$ac_try\"") >&5
11498   (eval $ac_try) 2>&5
11499   ac_status=$?
11500   echo "$as_me:11500: \$? = $ac_status" >&5
11501   (exit $ac_status); }; }; then
11502   ac_lo=0 ac_mid=0
11503   while :; do
11504     cat >conftest.$ac_ext <<_ACEOF
11505 #line 11505 "configure"
11506 #include "confdefs.h"
11507 $ac_includes_default
11508 int
11509 main ()
11510 {
11511 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11512   ;
11513   return 0;
11514 }
11515 _ACEOF
11516 rm -f conftest.$ac_objext
11517 if { (eval echo "$as_me:11517: \"$ac_compile\"") >&5
11518   (eval $ac_compile) 2>&5
11519   ac_status=$?
11520   echo "$as_me:11520: \$? = $ac_status" >&5
11521   (exit $ac_status); } &&
11522          { ac_try='test -s conftest.$ac_objext'
11523   { (eval echo "$as_me:11523: \"$ac_try\"") >&5
11524   (eval $ac_try) 2>&5
11525   ac_status=$?
11526   echo "$as_me:11526: \$? = $ac_status" >&5
11527   (exit $ac_status); }; }; then
11528   ac_hi=$ac_mid; break
11529 else
11530   echo "$as_me: failed program was:" >&5
11531 cat conftest.$ac_ext >&5
11532 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11533 fi
11534 rm -f conftest.$ac_objext conftest.$ac_ext
11535   done
11536 else
11537   echo "$as_me: failed program was:" >&5
11538 cat conftest.$ac_ext >&5
11539 ac_hi=-1 ac_mid=-1
11540   while :; do
11541     cat >conftest.$ac_ext <<_ACEOF
11542 #line 11542 "configure"
11543 #include "confdefs.h"
11544 $ac_includes_default
11545 int
11546 main ()
11547 {
11548 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11549   ;
11550   return 0;
11551 }
11552 _ACEOF
11553 rm -f conftest.$ac_objext
11554 if { (eval echo "$as_me:11554: \"$ac_compile\"") >&5
11555   (eval $ac_compile) 2>&5
11556   ac_status=$?
11557   echo "$as_me:11557: \$? = $ac_status" >&5
11558   (exit $ac_status); } &&
11559          { ac_try='test -s conftest.$ac_objext'
11560   { (eval echo "$as_me:11560: \"$ac_try\"") >&5
11561   (eval $ac_try) 2>&5
11562   ac_status=$?
11563   echo "$as_me:11563: \$? = $ac_status" >&5
11564   (exit $ac_status); }; }; then
11565   ac_lo=$ac_mid; break
11566 else
11567   echo "$as_me: failed program was:" >&5
11568 cat conftest.$ac_ext >&5
11569 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11570 fi
11571 rm -f conftest.$ac_objext conftest.$ac_ext
11572   done
11573 fi
11574 rm -f conftest.$ac_objext conftest.$ac_ext
11575 # Binary search between lo and hi bounds.
11576 while test "x$ac_lo" != "x$ac_hi"; do
11577   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11578   cat >conftest.$ac_ext <<_ACEOF
11579 #line 11579 "configure"
11580 #include "confdefs.h"
11581 $ac_includes_default
11582 int
11583 main ()
11584 {
11585 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11586   ;
11587   return 0;
11588 }
11589 _ACEOF
11590 rm -f conftest.$ac_objext
11591 if { (eval echo "$as_me:11591: \"$ac_compile\"") >&5
11592   (eval $ac_compile) 2>&5
11593   ac_status=$?
11594   echo "$as_me:11594: \$? = $ac_status" >&5
11595   (exit $ac_status); } &&
11596          { ac_try='test -s conftest.$ac_objext'
11597   { (eval echo "$as_me:11597: \"$ac_try\"") >&5
11598   (eval $ac_try) 2>&5
11599   ac_status=$?
11600   echo "$as_me:11600: \$? = $ac_status" >&5
11601   (exit $ac_status); }; }; then
11602   ac_hi=$ac_mid
11603 else
11604   echo "$as_me: failed program was:" >&5
11605 cat conftest.$ac_ext >&5
11606 ac_lo=`expr $ac_mid + 1`
11607 fi
11608 rm -f conftest.$ac_objext conftest.$ac_ext
11609 done
11610 ac_cv_sizeof_signed_char=$ac_lo
11611 else
11612   if test "$cross_compiling" = yes; then
11613   { { echo "$as_me:11613: error: cannot run test program while cross compiling" >&5
11614 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11615    { (exit 1); exit 1; }; }
11616 else
11617   cat >conftest.$ac_ext <<_ACEOF
11618 #line 11618 "configure"
11619 #include "confdefs.h"
11620 $ac_includes_default
11621 int
11622 main ()
11623 {
11624 FILE *f = fopen ("conftest.val", "w");
11625 if (!f)
11626   $ac_main_return (1);
11627 fprintf (f, "%d", (sizeof (signed char)));
11628 fclose (f);
11629   ;
11630   return 0;
11631 }
11632 _ACEOF
11633 rm -f conftest$ac_exeext
11634 if { (eval echo "$as_me:11634: \"$ac_link\"") >&5
11635   (eval $ac_link) 2>&5
11636   ac_status=$?
11637   echo "$as_me:11637: \$? = $ac_status" >&5
11638   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11639   { (eval echo "$as_me:11639: \"$ac_try\"") >&5
11640   (eval $ac_try) 2>&5
11641   ac_status=$?
11642   echo "$as_me:11642: \$? = $ac_status" >&5
11643   (exit $ac_status); }; }; then
11644   ac_cv_sizeof_signed_char=`cat conftest.val`
11645 else
11646   echo "$as_me: program exited with status $ac_status" >&5
11647 echo "$as_me: failed program was:" >&5
11648 cat conftest.$ac_ext >&5
11649 fi
11650 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11651 fi
11652 fi
11653 rm -f conftest.val
11654 else
11655   ac_cv_sizeof_signed_char=0
11656 fi
11657 fi
11658 echo "$as_me:11658: result: $ac_cv_sizeof_signed_char" >&5
11659 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11660 cat >>confdefs.h <<EOF
11661 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11662 EOF
11663
11664 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11665         NCURSES_SBOOL="signed char"
11666 else
11667         NCURSES_SBOOL="char"
11668 fi
11669 echo "$as_me:11669: checking if you want to use signed Boolean array in term.h" >&5
11670 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11671
11672 # Check whether --enable-signed-char or --disable-signed-char was given.
11673 if test "${enable_signed_char+set}" = set; then
11674   enableval="$enable_signed_char"
11675   with_signed_char=$enableval
11676 else
11677   with_signed_char=no
11678 fi;
11679 echo "$as_me:11679: result: $with_signed_char" >&5
11680 echo "${ECHO_T}$with_signed_char" >&6
11681 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11682
11683 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11684 echo "$as_me:11684: checking if you want SIGWINCH handler" >&5
11685 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11686
11687 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11688 if test "${enable_sigwinch+set}" = set; then
11689   enableval="$enable_sigwinch"
11690   with_sigwinch=$enableval
11691 else
11692   with_sigwinch=$with_ext_funcs
11693 fi;
11694 echo "$as_me:11694: result: $with_sigwinch" >&5
11695 echo "${ECHO_T}$with_sigwinch" >&6
11696 test "x$with_sigwinch" = xyes &&
11697 cat >>confdefs.h <<\EOF
11698 #define USE_SIGWINCH 1
11699 EOF
11700
11701 ###   use option --enable-tcap-names to allow user to define new capabilities
11702 echo "$as_me:11702: checking if you want user-definable terminal capabilities like termcap" >&5
11703 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11704
11705 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11706 if test "${enable_tcap_names+set}" = set; then
11707   enableval="$enable_tcap_names"
11708   with_tcap_names=$enableval
11709 else
11710   with_tcap_names=$with_ext_funcs
11711 fi;
11712 echo "$as_me:11712: result: $with_tcap_names" >&5
11713 echo "${ECHO_T}$with_tcap_names" >&6
11714 NCURSES_XNAMES=0
11715 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
11716
11717 ###############################################################################
11718 # These options are relatively safe to experiment with.
11719
11720 echo "$as_me:11720: checking if you want all development code" >&5
11721 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11722
11723 # Check whether --with-develop or --without-develop was given.
11724 if test "${with_develop+set}" = set; then
11725   withval="$with_develop"
11726   with_develop=$withval
11727 else
11728   with_develop=no
11729 fi;
11730 echo "$as_me:11730: result: $with_develop" >&5
11731 echo "${ECHO_T}$with_develop" >&6
11732
11733 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11734 echo "$as_me:11734: checking if you want hard-tabs code" >&5
11735 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11736
11737 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11738 if test "${enable_hard_tabs+set}" = set; then
11739   enableval="$enable_hard_tabs"
11740
11741 else
11742   enable_hard_tabs=$with_develop
11743 fi;
11744 echo "$as_me:11744: result: $enable_hard_tabs" >&5
11745 echo "${ECHO_T}$enable_hard_tabs" >&6
11746 test "x$enable_hard_tabs" = xyes &&
11747 cat >>confdefs.h <<\EOF
11748 #define USE_HARD_TABS 1
11749 EOF
11750
11751 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11752 echo "$as_me:11752: checking if you want limited support for xmc" >&5
11753 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11754
11755 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11756 if test "${enable_xmc_glitch+set}" = set; then
11757   enableval="$enable_xmc_glitch"
11758
11759 else
11760   enable_xmc_glitch=$with_develop
11761 fi;
11762 echo "$as_me:11762: result: $enable_xmc_glitch" >&5
11763 echo "${ECHO_T}$enable_xmc_glitch" >&6
11764 test "x$enable_xmc_glitch" = xyes &&
11765 cat >>confdefs.h <<\EOF
11766 #define USE_XMC_SUPPORT 1
11767 EOF
11768
11769 ###############################################################################
11770 # These are just experimental, probably should not be in a package:
11771
11772 echo "$as_me:11772: checking if you do not want to assume colors are white-on-black" >&5
11773 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11774
11775 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11776 if test "${enable_assumed_color+set}" = set; then
11777   enableval="$enable_assumed_color"
11778   with_assumed_color=$enableval
11779 else
11780   with_assumed_color=yes
11781 fi;
11782 echo "$as_me:11782: result: $with_assumed_color" >&5
11783 echo "${ECHO_T}$with_assumed_color" >&6
11784 test "x$with_assumed_color" = xyes &&
11785 cat >>confdefs.h <<\EOF
11786 #define USE_ASSUMED_COLOR 1
11787 EOF
11788
11789 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11790 echo "$as_me:11790: checking if you want hashmap scrolling-optimization code" >&5
11791 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11792
11793 # Check whether --enable-hashmap or --disable-hashmap was given.
11794 if test "${enable_hashmap+set}" = set; then
11795   enableval="$enable_hashmap"
11796   with_hashmap=$enableval
11797 else
11798   with_hashmap=yes
11799 fi;
11800 echo "$as_me:11800: result: $with_hashmap" >&5
11801 echo "${ECHO_T}$with_hashmap" >&6
11802 test "x$with_hashmap" = xyes &&
11803 cat >>confdefs.h <<\EOF
11804 #define USE_HASHMAP 1
11805 EOF
11806
11807 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11808 echo "$as_me:11808: checking if you want colorfgbg code" >&5
11809 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11810
11811 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11812 if test "${enable_colorfgbg+set}" = set; then
11813   enableval="$enable_colorfgbg"
11814   with_colorfgbg=$enableval
11815 else
11816   with_colorfgbg=no
11817 fi;
11818 echo "$as_me:11818: result: $with_colorfgbg" >&5
11819 echo "${ECHO_T}$with_colorfgbg" >&6
11820 test "x$with_colorfgbg" = xyes &&
11821 cat >>confdefs.h <<\EOF
11822 #define USE_COLORFGBG 1
11823 EOF
11824
11825 ###   use option --enable-interop to turn on use of bindings used for interop
11826 echo "$as_me:11826: checking if you want interop bindings" >&5
11827 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11828
11829 # Check whether --enable-interop or --disable-interop was given.
11830 if test "${enable_interop+set}" = set; then
11831   enableval="$enable_interop"
11832   with_exp_interop=$enableval
11833 else
11834   with_exp_interop=no
11835 fi;
11836 echo "$as_me:11836: result: $with_exp_interop" >&5
11837 echo "${ECHO_T}$with_exp_interop" >&6
11838
11839 NCURSES_INTEROP_FUNCS=0
11840 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
11841
11842 # This is still experimental (20080329), but should ultimately be moved to
11843 # the script-block --with-normal, etc.
11844
11845 echo "$as_me:11845: checking if you want to link with the pthread library" >&5
11846 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11847
11848 # Check whether --with-pthread or --without-pthread was given.
11849 if test "${with_pthread+set}" = set; then
11850   withval="$with_pthread"
11851   with_pthread=$withval
11852 else
11853   with_pthread=no
11854 fi;
11855 echo "$as_me:11855: result: $with_pthread" >&5
11856 echo "${ECHO_T}$with_pthread" >&6
11857
11858 if test "$with_pthread" != no ; then
11859     echo "$as_me:11859: checking for pthread.h" >&5
11860 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11861 if test "${ac_cv_header_pthread_h+set}" = set; then
11862   echo $ECHO_N "(cached) $ECHO_C" >&6
11863 else
11864   cat >conftest.$ac_ext <<_ACEOF
11865 #line 11865 "configure"
11866 #include "confdefs.h"
11867 #include <pthread.h>
11868 _ACEOF
11869 if { (eval echo "$as_me:11869: \"$ac_cpp conftest.$ac_ext\"") >&5
11870   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11871   ac_status=$?
11872   egrep -v '^ *\+' conftest.er1 >conftest.err
11873   rm -f conftest.er1
11874   cat conftest.err >&5
11875   echo "$as_me:11875: \$? = $ac_status" >&5
11876   (exit $ac_status); } >/dev/null; then
11877   if test -s conftest.err; then
11878     ac_cpp_err=$ac_c_preproc_warn_flag
11879   else
11880     ac_cpp_err=
11881   fi
11882 else
11883   ac_cpp_err=yes
11884 fi
11885 if test -z "$ac_cpp_err"; then
11886   ac_cv_header_pthread_h=yes
11887 else
11888   echo "$as_me: failed program was:" >&5
11889   cat conftest.$ac_ext >&5
11890   ac_cv_header_pthread_h=no
11891 fi
11892 rm -f conftest.err conftest.$ac_ext
11893 fi
11894 echo "$as_me:11894: result: $ac_cv_header_pthread_h" >&5
11895 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11896 if test $ac_cv_header_pthread_h = yes; then
11897
11898 cat >>confdefs.h <<\EOF
11899 #define HAVE_PTHREADS_H 1
11900 EOF
11901
11902         for cf_lib_pthread in pthread c_r
11903         do
11904             echo "$as_me:11904: checking if we can link with the $cf_lib_pthread library" >&5
11905 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11906             cf_save_LIBS="$LIBS"
11907
11908 cf_add_libs="-l$cf_lib_pthread"
11909 # Filter out duplicates - this happens with badly-designed ".pc" files...
11910 for cf_add_1lib in $LIBS
11911 do
11912         for cf_add_2lib in $cf_add_libs
11913         do
11914                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11915                 then
11916                         cf_add_1lib=
11917                         break
11918                 fi
11919         done
11920         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11921 done
11922 LIBS="$cf_add_libs"
11923
11924             cat >conftest.$ac_ext <<_ACEOF
11925 #line 11925 "configure"
11926 #include "confdefs.h"
11927
11928 #include <pthread.h>
11929
11930 int
11931 main ()
11932 {
11933
11934                 int rc = pthread_create(0,0,0,0);
11935                 int r2 = pthread_mutexattr_settype(0, 0);
11936
11937   ;
11938   return 0;
11939 }
11940 _ACEOF
11941 rm -f conftest.$ac_objext conftest$ac_exeext
11942 if { (eval echo "$as_me:11942: \"$ac_link\"") >&5
11943   (eval $ac_link) 2>&5
11944   ac_status=$?
11945   echo "$as_me:11945: \$? = $ac_status" >&5
11946   (exit $ac_status); } &&
11947          { ac_try='test -s conftest$ac_exeext'
11948   { (eval echo "$as_me:11948: \"$ac_try\"") >&5
11949   (eval $ac_try) 2>&5
11950   ac_status=$?
11951   echo "$as_me:11951: \$? = $ac_status" >&5
11952   (exit $ac_status); }; }; then
11953   with_pthread=yes
11954 else
11955   echo "$as_me: failed program was:" >&5
11956 cat conftest.$ac_ext >&5
11957 with_pthread=no
11958 fi
11959 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11960             LIBS="$cf_save_LIBS"
11961             echo "$as_me:11961: result: $with_pthread" >&5
11962 echo "${ECHO_T}$with_pthread" >&6
11963             test "$with_pthread" = yes && break
11964         done
11965
11966         if test "$with_pthread" = yes ; then
11967
11968 cf_add_libs="-l$cf_lib_pthread"
11969 # Filter out duplicates - this happens with badly-designed ".pc" files...
11970 for cf_add_1lib in $LIBS
11971 do
11972         for cf_add_2lib in $cf_add_libs
11973         do
11974                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11975                 then
11976                         cf_add_1lib=
11977                         break
11978                 fi
11979         done
11980         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11981 done
11982 LIBS="$cf_add_libs"
11983
11984 cat >>confdefs.h <<\EOF
11985 #define HAVE_LIBPTHREADS 1
11986 EOF
11987
11988         else
11989             { { echo "$as_me:11989: error: Cannot link with pthread library" >&5
11990 echo "$as_me: error: Cannot link with pthread library" >&2;}
11991    { (exit 1); exit 1; }; }
11992         fi
11993
11994 fi
11995
11996 fi
11997
11998 if test "x$with_pthread" != xno; then
11999         echo "$as_me:11999: checking for pthread_kill" >&5
12000 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12001 if test "${ac_cv_func_pthread_kill+set}" = set; then
12002   echo $ECHO_N "(cached) $ECHO_C" >&6
12003 else
12004   cat >conftest.$ac_ext <<_ACEOF
12005 #line 12005 "configure"
12006 #include "confdefs.h"
12007 /* System header to define __stub macros and hopefully few prototypes,
12008     which can conflict with char pthread_kill (); below.  */
12009 #include <assert.h>
12010 /* Override any gcc2 internal prototype to avoid an error.  */
12011 #ifdef __cplusplus
12012 extern "C"
12013 #endif
12014 /* We use char because int might match the return type of a gcc2
12015    builtin and then its argument prototype would still apply.  */
12016 char pthread_kill ();
12017 char (*f) ();
12018
12019 int
12020 main ()
12021 {
12022 /* The GNU C library defines this for functions which it implements
12023     to always fail with ENOSYS.  Some functions are actually named
12024     something starting with __ and the normal name is an alias.  */
12025 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12026 choke me
12027 #else
12028 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12029 #endif
12030
12031   ;
12032   return 0;
12033 }
12034 _ACEOF
12035 rm -f conftest.$ac_objext conftest$ac_exeext
12036 if { (eval echo "$as_me:12036: \"$ac_link\"") >&5
12037   (eval $ac_link) 2>&5
12038   ac_status=$?
12039   echo "$as_me:12039: \$? = $ac_status" >&5
12040   (exit $ac_status); } &&
12041          { ac_try='test -s conftest$ac_exeext'
12042   { (eval echo "$as_me:12042: \"$ac_try\"") >&5
12043   (eval $ac_try) 2>&5
12044   ac_status=$?
12045   echo "$as_me:12045: \$? = $ac_status" >&5
12046   (exit $ac_status); }; }; then
12047   ac_cv_func_pthread_kill=yes
12048 else
12049   echo "$as_me: failed program was:" >&5
12050 cat conftest.$ac_ext >&5
12051 ac_cv_func_pthread_kill=no
12052 fi
12053 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12054 fi
12055 echo "$as_me:12055: result: $ac_cv_func_pthread_kill" >&5
12056 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12057 if test $ac_cv_func_pthread_kill = yes; then
12058
12059                 echo "$as_me:12059: checking if you want to allow EINTR in wgetch with pthreads" >&5
12060 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12061
12062 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12063 if test "${enable_pthreads_eintr+set}" = set; then
12064   enableval="$enable_pthreads_eintr"
12065   use_pthreads_eintr=$enableval
12066 else
12067   use_pthreads_eintr=no
12068 fi;
12069                 echo "$as_me:12069: result: $use_pthreads_eintr" >&5
12070 echo "${ECHO_T}$use_pthreads_eintr" >&6
12071                 if test "x$use_pthreads_eintr" = xyes ; then
12072
12073 cat >>confdefs.h <<\EOF
12074 #define USE_PTHREADS_EINTR 1
12075 EOF
12076
12077                 fi
12078 fi
12079
12080         echo "$as_me:12080: checking if you want to use weak-symbols for pthreads" >&5
12081 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12082
12083 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12084 if test "${enable_weak_symbols+set}" = set; then
12085   enableval="$enable_weak_symbols"
12086   use_weak_symbols=$enableval
12087 else
12088   use_weak_symbols=no
12089 fi;
12090         echo "$as_me:12090: result: $use_weak_symbols" >&5
12091 echo "${ECHO_T}$use_weak_symbols" >&6
12092         if test "x$use_weak_symbols" = xyes ; then
12093
12094 echo "$as_me:12094: checking if $CC supports weak symbols" >&5
12095 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12096 if test "${cf_cv_weak_symbols+set}" = set; then
12097   echo $ECHO_N "(cached) $ECHO_C" >&6
12098 else
12099
12100 cat >conftest.$ac_ext <<_ACEOF
12101 #line 12101 "configure"
12102 #include "confdefs.h"
12103
12104 #include <stdio.h>
12105 int
12106 main ()
12107 {
12108
12109 #if defined(__GNUC__)
12110 #  if defined __USE_ISOC99
12111 #    define _cat_pragma(exp)    _Pragma(#exp)
12112 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12113 #  else
12114 #    define _weak_pragma(exp)
12115 #  endif
12116 #  define _declare(name)        __extension__ extern __typeof__(name) name
12117 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12118 #endif
12119
12120 weak_symbol(fopen);
12121
12122   ;
12123   return 0;
12124 }
12125 _ACEOF
12126 rm -f conftest.$ac_objext
12127 if { (eval echo "$as_me:12127: \"$ac_compile\"") >&5
12128   (eval $ac_compile) 2>&5
12129   ac_status=$?
12130   echo "$as_me:12130: \$? = $ac_status" >&5
12131   (exit $ac_status); } &&
12132          { ac_try='test -s conftest.$ac_objext'
12133   { (eval echo "$as_me:12133: \"$ac_try\"") >&5
12134   (eval $ac_try) 2>&5
12135   ac_status=$?
12136   echo "$as_me:12136: \$? = $ac_status" >&5
12137   (exit $ac_status); }; }; then
12138   cf_cv_weak_symbols=yes
12139 else
12140   echo "$as_me: failed program was:" >&5
12141 cat conftest.$ac_ext >&5
12142 cf_cv_weak_symbols=no
12143 fi
12144 rm -f conftest.$ac_objext conftest.$ac_ext
12145
12146 fi
12147 echo "$as_me:12147: result: $cf_cv_weak_symbols" >&5
12148 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12149
12150         else
12151                 cf_cv_weak_symbols=no
12152         fi
12153
12154         if test "x$cf_cv_weak_symbols" = xyes ; then
12155
12156 cat >>confdefs.h <<\EOF
12157 #define USE_WEAK_SYMBOLS 1
12158 EOF
12159
12160         fi
12161 fi
12162
12163 PTHREAD=
12164 if test "x$with_pthread" = "xyes" ; then
12165
12166 cat >>confdefs.h <<\EOF
12167 #define USE_PTHREADS 1
12168 EOF
12169
12170     enable_reentrant=yes
12171     if test "x$cf_cv_weak_symbols" = xyes ; then
12172         PTHREAD=-lpthread
12173     fi
12174 fi
12175
12176 # Reentrant code has to be opaque; there's little advantage to making ncurses
12177 # opaque outside of that, so there is no --enable-opaque option.  We can use
12178 # this option without --with-pthreads, but this will be always set for
12179 # pthreads.
12180 echo "$as_me:12180: checking if you want experimental reentrant code" >&5
12181 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12182
12183 # Check whether --enable-reentrant or --disable-reentrant was given.
12184 if test "${enable_reentrant+set}" = set; then
12185   enableval="$enable_reentrant"
12186   with_reentrant=$enableval
12187 else
12188   with_reentrant=no
12189 fi;
12190 echo "$as_me:12190: result: $with_reentrant" >&5
12191 echo "${ECHO_T}$with_reentrant" >&6
12192 if test "x$with_reentrant" = xyes ; then
12193         cf_cv_enable_reentrant=1
12194         cf_cv_enable_opaque="NCURSES_INTERNALS"
12195         NCURSES_OPAQUE=1
12196         NCURSES_SIZE_T=int
12197         if test "x$cf_cv_weak_symbols" = xyes ; then
12198
12199 # remove pthread library from $LIBS
12200 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12201
12202 cf_add_libs="-lpthread"
12203 # Filter out duplicates - this happens with badly-designed ".pc" files...
12204 for cf_add_1lib in $TEST_LIBS
12205 do
12206         for cf_add_2lib in $cf_add_libs
12207         do
12208                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12209                 then
12210                         cf_add_1lib=
12211                         break
12212                 fi
12213         done
12214         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12215 done
12216 TEST_LIBS="$cf_add_libs"
12217
12218 cf_add_libs="-lpthread"
12219 # Filter out duplicates - this happens with badly-designed ".pc" files...
12220 for cf_add_1lib in $TEST_LIBS2
12221 do
12222         for cf_add_2lib in $cf_add_libs
12223         do
12224                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12225                 then
12226                         cf_add_1lib=
12227                         break
12228                 fi
12229         done
12230         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12231 done
12232 TEST_LIBS2="$cf_add_libs"
12233
12234         else
12235                 # when not using weak symbols but with_reentrant,
12236                 # add 't' to the library suffix on all platforms
12237                 # except cygwin, where we only do that if ALSO
12238                 # compiling with full thread support.
12239                 case "$host" in
12240                 *cygwin* | *msys*) #(vi
12241                         if test "$with_pthread" = "yes" ; then
12242                                 if test "x$disable_lib_suffixes" = "xno" ; then
12243                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12244                                 fi
12245                         fi ;;
12246                 *)
12247                         if test "x$disable_lib_suffixes" = "xno" ; then
12248                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12249                         fi
12250                         ;;
12251                 esac
12252         fi
12253
12254 cat >>confdefs.h <<\EOF
12255 #define USE_REENTRANT 1
12256 EOF
12257
12258 if test "${with_abi_version+set}" != set; then
12259         case $cf_cv_rel_version in
12260         5.*)
12261                 cf_cv_rel_version=6.0
12262                 cf_cv_abi_version=6
12263                 { echo "$as_me:12263: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12264 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12265                 ;;
12266         esac
12267 fi
12268
12269 else
12270         cf_cv_enable_reentrant=0
12271         cf_cv_enable_opaque="NCURSES_OPAQUE"
12272         NCURSES_OPAQUE=0
12273         NCURSES_SIZE_T=short
12274 fi
12275
12276 ### Allow using a different wrap-prefix
12277 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12278         echo "$as_me:12278: checking for prefix used to wrap public variables" >&5
12279 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12280
12281 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12282 if test "${with_wrap_prefix+set}" = set; then
12283   withval="$with_wrap_prefix"
12284   NCURSES_WRAP_PREFIX=$withval
12285 else
12286   NCURSES_WRAP_PREFIX=_nc_
12287 fi;
12288         echo "$as_me:12288: result: $NCURSES_WRAP_PREFIX" >&5
12289 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12290 else
12291         NCURSES_WRAP_PREFIX=_nc_
12292 fi
12293
12294 cat >>confdefs.h <<EOF
12295 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12296 EOF
12297
12298 echo "$as_me:12298: checking if you want experimental safe-sprintf code" >&5
12299 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12300
12301 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12302 if test "${enable_safe_sprintf+set}" = set; then
12303   enableval="$enable_safe_sprintf"
12304   with_safe_sprintf=$enableval
12305 else
12306   with_safe_sprintf=no
12307 fi;
12308 echo "$as_me:12308: result: $with_safe_sprintf" >&5
12309 echo "${ECHO_T}$with_safe_sprintf" >&6
12310 test "x$with_safe_sprintf" = xyes &&
12311 cat >>confdefs.h <<\EOF
12312 #define USE_SAFE_SPRINTF 1
12313 EOF
12314
12315 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12316 # when hashmap is used scroll hints are useless
12317 if test "$with_hashmap" = no ; then
12318 echo "$as_me:12318: checking if you want to experiment without scrolling-hints code" >&5
12319 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12320
12321 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12322 if test "${enable_scroll_hints+set}" = set; then
12323   enableval="$enable_scroll_hints"
12324   with_scroll_hints=$enableval
12325 else
12326   with_scroll_hints=yes
12327 fi;
12328 echo "$as_me:12328: result: $with_scroll_hints" >&5
12329 echo "${ECHO_T}$with_scroll_hints" >&6
12330 test "x$with_scroll_hints" = xyes &&
12331 cat >>confdefs.h <<\EOF
12332 #define USE_SCROLL_HINTS 1
12333 EOF
12334
12335 fi
12336
12337 echo "$as_me:12337: checking if you want experimental wgetch-events code" >&5
12338 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12339
12340 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12341 if test "${enable_wgetch_events+set}" = set; then
12342   enableval="$enable_wgetch_events"
12343   with_wgetch_events=$enableval
12344 else
12345   with_wgetch_events=no
12346 fi;
12347 echo "$as_me:12347: result: $with_wgetch_events" >&5
12348 echo "${ECHO_T}$with_wgetch_events" >&6
12349 test "x$with_wgetch_events" = xyes &&
12350 cat >>confdefs.h <<\EOF
12351 #define NCURSES_WGETCH_EVENTS 1
12352 EOF
12353
12354 ###############################################################################
12355
12356 ###     use option --disable-echo to suppress full display compiling commands
12357
12358 echo "$as_me:12358: checking if you want to see long compiling messages" >&5
12359 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12360
12361 # Check whether --enable-echo or --disable-echo was given.
12362 if test "${enable_echo+set}" = set; then
12363   enableval="$enable_echo"
12364   test "$enableval" != no && enableval=yes
12365   if test "$enableval" != "yes" ; then
12366
12367     ECHO_LT='--silent'
12368     ECHO_LD='@echo linking $@;'
12369     RULE_CC='@echo compiling $<'
12370     SHOW_CC='@echo compiling $@'
12371     ECHO_CC='@'
12372
12373   else
12374
12375     ECHO_LT=''
12376     ECHO_LD=''
12377     RULE_CC=''
12378     SHOW_CC=''
12379     ECHO_CC=''
12380
12381   fi
12382 else
12383   enableval=yes
12384
12385     ECHO_LT=''
12386     ECHO_LD=''
12387     RULE_CC=''
12388     SHOW_CC=''
12389     ECHO_CC=''
12390
12391 fi;
12392 echo "$as_me:12392: result: $enableval" >&5
12393 echo "${ECHO_T}$enableval" >&6
12394
12395 if test "x$enable_echo" = xyes; then
12396         ECHO_LINK=
12397 else
12398         ECHO_LINK='@ echo linking $@ ... ;'
12399         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12400         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12401 fi
12402
12403 ###     use option --enable-warnings to turn on all gcc warnings
12404 echo "$as_me:12404: checking if you want to see compiler warnings" >&5
12405 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12406
12407 # Check whether --enable-warnings or --disable-warnings was given.
12408 if test "${enable_warnings+set}" = set; then
12409   enableval="$enable_warnings"
12410   with_warnings=$enableval
12411 fi;
12412 echo "$as_me:12412: result: $with_warnings" >&5
12413 echo "${ECHO_T}$with_warnings" >&6
12414
12415 if test "x$with_warnings" = "xyes"; then
12416
12417         ADAFLAGS="$ADAFLAGS -gnatg"
12418
12419 INTEL_COMPILER=no
12420
12421 if test "$GCC" = yes ; then
12422         case $host_os in
12423         linux*|gnu*)
12424                 echo "$as_me:12424: checking if this is really Intel C compiler" >&5
12425 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12426                 cf_save_CFLAGS="$CFLAGS"
12427                 CFLAGS="$CFLAGS -no-gcc"
12428                 cat >conftest.$ac_ext <<_ACEOF
12429 #line 12429 "configure"
12430 #include "confdefs.h"
12431
12432 int
12433 main ()
12434 {
12435
12436 #ifdef __INTEL_COMPILER
12437 #else
12438 make an error
12439 #endif
12440
12441   ;
12442   return 0;
12443 }
12444 _ACEOF
12445 rm -f conftest.$ac_objext
12446 if { (eval echo "$as_me:12446: \"$ac_compile\"") >&5
12447   (eval $ac_compile) 2>&5
12448   ac_status=$?
12449   echo "$as_me:12449: \$? = $ac_status" >&5
12450   (exit $ac_status); } &&
12451          { ac_try='test -s conftest.$ac_objext'
12452   { (eval echo "$as_me:12452: \"$ac_try\"") >&5
12453   (eval $ac_try) 2>&5
12454   ac_status=$?
12455   echo "$as_me:12455: \$? = $ac_status" >&5
12456   (exit $ac_status); }; }; then
12457   INTEL_COMPILER=yes
12458 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12459
12460 else
12461   echo "$as_me: failed program was:" >&5
12462 cat conftest.$ac_ext >&5
12463 fi
12464 rm -f conftest.$ac_objext conftest.$ac_ext
12465                 CFLAGS="$cf_save_CFLAGS"
12466                 echo "$as_me:12466: result: $INTEL_COMPILER" >&5
12467 echo "${ECHO_T}$INTEL_COMPILER" >&6
12468                 ;;
12469         esac
12470 fi
12471
12472 CLANG_COMPILER=no
12473
12474 if test "$GCC" = yes ; then
12475         echo "$as_me:12475: checking if this is really Clang C compiler" >&5
12476 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12477         cf_save_CFLAGS="$CFLAGS"
12478         CFLAGS="$CFLAGS -Qunused-arguments"
12479         cat >conftest.$ac_ext <<_ACEOF
12480 #line 12480 "configure"
12481 #include "confdefs.h"
12482
12483 int
12484 main ()
12485 {
12486
12487 #ifdef __clang__
12488 #else
12489 make an error
12490 #endif
12491
12492   ;
12493   return 0;
12494 }
12495 _ACEOF
12496 rm -f conftest.$ac_objext
12497 if { (eval echo "$as_me:12497: \"$ac_compile\"") >&5
12498   (eval $ac_compile) 2>&5
12499   ac_status=$?
12500   echo "$as_me:12500: \$? = $ac_status" >&5
12501   (exit $ac_status); } &&
12502          { ac_try='test -s conftest.$ac_objext'
12503   { (eval echo "$as_me:12503: \"$ac_try\"") >&5
12504   (eval $ac_try) 2>&5
12505   ac_status=$?
12506   echo "$as_me:12506: \$? = $ac_status" >&5
12507   (exit $ac_status); }; }; then
12508   CLANG_COMPILER=yes
12509 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12510
12511 else
12512   echo "$as_me: failed program was:" >&5
12513 cat conftest.$ac_ext >&5
12514 fi
12515 rm -f conftest.$ac_objext conftest.$ac_ext
12516         CFLAGS="$cf_save_CFLAGS"
12517         echo "$as_me:12517: result: $CLANG_COMPILER" >&5
12518 echo "${ECHO_T}$CLANG_COMPILER" >&6
12519 fi
12520
12521 cat > conftest.$ac_ext <<EOF
12522 #line 12522 "${as_me:-configure}"
12523 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12524 EOF
12525
12526 if test "$INTEL_COMPILER" = yes
12527 then
12528 # The "-wdXXX" options suppress warnings:
12529 # remark #1419: external declaration in primary source file
12530 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12531 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12532 # remark #193: zero used for undefined preprocessing identifier
12533 # remark #593: variable "curs_sb_left_arrow" was set but never used
12534 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12535 # remark #869: parameter "tw" was never referenced
12536 # remark #981: operands are evaluated in unspecified order
12537 # warning #279: controlling expression is constant
12538
12539         { echo "$as_me:12539: checking for $CC warning options..." >&5
12540 echo "$as_me: checking for $CC warning options..." >&6;}
12541         cf_save_CFLAGS="$CFLAGS"
12542         EXTRA_CFLAGS="-Wall"
12543         for cf_opt in \
12544                 wd1419 \
12545                 wd1683 \
12546                 wd1684 \
12547                 wd193 \
12548                 wd593 \
12549                 wd279 \
12550                 wd810 \
12551                 wd869 \
12552                 wd981
12553         do
12554                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12555                 if { (eval echo "$as_me:12555: \"$ac_compile\"") >&5
12556   (eval $ac_compile) 2>&5
12557   ac_status=$?
12558   echo "$as_me:12558: \$? = $ac_status" >&5
12559   (exit $ac_status); }; then
12560                         test -n "$verbose" && echo "$as_me:12560: result: ... -$cf_opt" >&5
12561 echo "${ECHO_T}... -$cf_opt" >&6
12562                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12563                 fi
12564         done
12565         CFLAGS="$cf_save_CFLAGS"
12566
12567 elif test "$GCC" = yes
12568 then
12569         { echo "$as_me:12569: checking for $CC warning options..." >&5
12570 echo "$as_me: checking for $CC warning options..." >&6;}
12571         cf_save_CFLAGS="$CFLAGS"
12572         EXTRA_CFLAGS=
12573         cf_warn_CONST=""
12574         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12575         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12576         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12577         for cf_opt in W Wall \
12578                 Wbad-function-cast \
12579                 Wcast-align \
12580                 Wcast-qual \
12581                 Wdeclaration-after-statement \
12582                 Wextra \
12583                 Winline \
12584                 Wmissing-declarations \
12585                 Wmissing-prototypes \
12586                 Wnested-externs \
12587                 Wpointer-arith \
12588                 Wshadow \
12589                 Wstrict-prototypes \
12590                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
12591         do
12592                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12593                 if { (eval echo "$as_me:12593: \"$ac_compile\"") >&5
12594   (eval $ac_compile) 2>&5
12595   ac_status=$?
12596   echo "$as_me:12596: \$? = $ac_status" >&5
12597   (exit $ac_status); }; then
12598                         test -n "$verbose" && echo "$as_me:12598: result: ... -$cf_opt" >&5
12599 echo "${ECHO_T}... -$cf_opt" >&6
12600                         case $cf_opt in #(vi
12601                         Wcast-qual) #(vi
12602                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12603                                 ;;
12604                         Winline) #(vi
12605                                 case $GCC_VERSION in
12606                                 [34].*)
12607                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12608
12609 echo "${as_me:-configure}:12609: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12610
12611                                         continue;;
12612                                 esac
12613                                 ;;
12614                         Wpointer-arith) #(vi
12615                                 case $GCC_VERSION in
12616                                 [12].*)
12617                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12618
12619 echo "${as_me:-configure}:12619: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12620
12621                                         continue;;
12622                                 esac
12623                                 ;;
12624                         esac
12625                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12626                 fi
12627         done
12628         CFLAGS="$cf_save_CFLAGS"
12629 fi
12630 rm -rf conftest*
12631
12632         if test "x$cf_with_cxx" = xyes ; then
12633
12634 INTEL_CPLUSPLUS=no
12635
12636 if test "$GCC" = yes ; then
12637         case $host_os in
12638         linux*|gnu*)
12639                 echo "$as_me:12639: checking if this is really Intel C++ compiler" >&5
12640 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12641                 cf_save_CFLAGS="$CXXFLAGS"
12642                 CXXFLAGS="$CXXFLAGS -no-gcc"
12643                 cat >conftest.$ac_ext <<_ACEOF
12644 #line 12644 "configure"
12645 #include "confdefs.h"
12646
12647 int
12648 main ()
12649 {
12650
12651 #ifdef __INTEL_COMPILER
12652 #else
12653 make an error
12654 #endif
12655
12656   ;
12657   return 0;
12658 }
12659 _ACEOF
12660 rm -f conftest.$ac_objext
12661 if { (eval echo "$as_me:12661: \"$ac_compile\"") >&5
12662   (eval $ac_compile) 2>&5
12663   ac_status=$?
12664   echo "$as_me:12664: \$? = $ac_status" >&5
12665   (exit $ac_status); } &&
12666          { ac_try='test -s conftest.$ac_objext'
12667   { (eval echo "$as_me:12667: \"$ac_try\"") >&5
12668   (eval $ac_try) 2>&5
12669   ac_status=$?
12670   echo "$as_me:12670: \$? = $ac_status" >&5
12671   (exit $ac_status); }; }; then
12672   INTEL_CPLUSPLUS=yes
12673 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12674
12675 else
12676   echo "$as_me: failed program was:" >&5
12677 cat conftest.$ac_ext >&5
12678 fi
12679 rm -f conftest.$ac_objext conftest.$ac_ext
12680                 CXXFLAGS="$cf_save_CFLAGS"
12681                 echo "$as_me:12681: result: $INTEL_CPLUSPLUS" >&5
12682 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12683                 ;;
12684         esac
12685 fi
12686
12687 CLANG_CPLUSPLUS=no
12688
12689 if test "$GCC" = yes ; then
12690         echo "$as_me:12690: checking if this is really Clang C++ compiler" >&5
12691 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12692         cf_save_CFLAGS="$CXXFLAGS"
12693         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12694         cat >conftest.$ac_ext <<_ACEOF
12695 #line 12695 "configure"
12696 #include "confdefs.h"
12697
12698 int
12699 main ()
12700 {
12701
12702 #ifdef __clang__
12703 #else
12704 make an error
12705 #endif
12706
12707   ;
12708   return 0;
12709 }
12710 _ACEOF
12711 rm -f conftest.$ac_objext
12712 if { (eval echo "$as_me:12712: \"$ac_compile\"") >&5
12713   (eval $ac_compile) 2>&5
12714   ac_status=$?
12715   echo "$as_me:12715: \$? = $ac_status" >&5
12716   (exit $ac_status); } &&
12717          { ac_try='test -s conftest.$ac_objext'
12718   { (eval echo "$as_me:12718: \"$ac_try\"") >&5
12719   (eval $ac_try) 2>&5
12720   ac_status=$?
12721   echo "$as_me:12721: \$? = $ac_status" >&5
12722   (exit $ac_status); }; }; then
12723   CLANG_CPLUSPLUS=yes
12724 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12725
12726 else
12727   echo "$as_me: failed program was:" >&5
12728 cat conftest.$ac_ext >&5
12729 fi
12730 rm -f conftest.$ac_objext conftest.$ac_ext
12731         CXXFLAGS="$cf_save_CFLAGS"
12732         echo "$as_me:12732: result: $CLANG_CPLUSPLUS" >&5
12733 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12734 fi
12735
12736 ac_ext=cc
12737 ac_cpp='$CXXCPP $CPPFLAGS'
12738 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12739 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12740 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12741 ac_main_return=return
12742
12743 cat > conftest.$ac_ext <<EOF
12744 #line 12744 "configure"
12745 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12746 EOF
12747
12748 if test "$INTEL_CPLUSPLUS" = yes
12749 then
12750 # The "-wdXXX" options suppress warnings:
12751 # remark #1419: external declaration in primary source file
12752 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12753 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12754 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12755 # remark #193: zero used for undefined preprocessing identifier
12756 # remark #593: variable "curs_sb_left_arrow" was set but never used
12757 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12758 # remark #869: parameter "tw" was never referenced
12759 # remark #981: operands are evaluated in unspecified order
12760 # warning #269: invalid format string conversion
12761
12762         { echo "$as_me:12762: checking for $CC warning options..." >&5
12763 echo "$as_me: checking for $CC warning options..." >&6;}
12764         cf_save_CXXFLAGS="$CXXFLAGS"
12765         EXTRA_CXXFLAGS="-Wall"
12766         for cf_opt in \
12767                 wd1419 \
12768                 wd1682 \
12769                 wd1683 \
12770                 wd1684 \
12771                 wd193 \
12772                 wd279 \
12773                 wd593 \
12774                 wd810 \
12775                 wd869 \
12776                 wd981
12777         do
12778                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12779                 if { (eval echo "$as_me:12779: \"$ac_compile\"") >&5
12780   (eval $ac_compile) 2>&5
12781   ac_status=$?
12782   echo "$as_me:12782: \$? = $ac_status" >&5
12783   (exit $ac_status); }; then
12784                         test -n "$verbose" && echo "$as_me:12784: result: ... -$cf_opt" >&5
12785 echo "${ECHO_T}... -$cf_opt" >&6
12786                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12787                 fi
12788         done
12789         CXXFLAGS="$cf_save_CXXFLAGS"
12790
12791 elif test "$GXX" = yes
12792 then
12793         { echo "$as_me:12793: checking for $CXX warning options..." >&5
12794 echo "$as_me: checking for $CXX warning options..." >&6;}
12795         cf_save_CXXFLAGS="$CXXFLAGS"
12796         EXTRA_CXXFLAGS="-W -Wall"
12797         cf_gxx_extra_warnings=""
12798         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12799         case "$GCC_VERSION" in
12800         [1-2].*)
12801                 ;;
12802         *)
12803                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12804                 ;;
12805         esac
12806         for cf_opt in \
12807                 Wabi \
12808                 fabi-version=0 \
12809                 Wextra \
12810                 Wignored-qualifiers \
12811                 Wlogical-op \
12812                 Woverloaded-virtual \
12813                 Wsign-promo \
12814                 Wsynth \
12815                 Wold-style-cast \
12816                 Wcast-align \
12817                 Wcast-qual \
12818                 Wpointer-arith \
12819                 Wshadow \
12820                 Wundef $cf_gxx_extra_warnings Wno-unused
12821         do
12822                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12823                 if { (eval echo "$as_me:12823: \"$ac_compile\"") >&5
12824   (eval $ac_compile) 2>&5
12825   ac_status=$?
12826   echo "$as_me:12826: \$? = $ac_status" >&5
12827   (exit $ac_status); }; then
12828                         test -n "$verbose" && echo "$as_me:12828: result: ... -$cf_opt" >&5
12829 echo "${ECHO_T}... -$cf_opt" >&6
12830                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12831                 else
12832                         test -n "$verbose" && echo "$as_me:12832: result: ... no -$cf_opt" >&5
12833 echo "${ECHO_T}... no -$cf_opt" >&6
12834                 fi
12835         done
12836         CXXFLAGS="$cf_save_CXXFLAGS"
12837 fi
12838
12839 rm -rf conftest*
12840 ac_ext=c
12841 ac_cpp='$CPP $CPPFLAGS'
12842 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12843 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12844 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12845 ac_main_return=return
12846
12847         fi
12848 fi
12849
12850 if test "$GCC" = yes
12851 then
12852 cat > conftest.i <<EOF
12853 #ifndef GCC_PRINTF
12854 #define GCC_PRINTF 0
12855 #endif
12856 #ifndef GCC_SCANF
12857 #define GCC_SCANF 0
12858 #endif
12859 #ifndef GCC_NORETURN
12860 #define GCC_NORETURN /* nothing */
12861 #endif
12862 #ifndef GCC_UNUSED
12863 #define GCC_UNUSED /* nothing */
12864 #endif
12865 EOF
12866 if test "$GCC" = yes
12867 then
12868         { echo "$as_me:12868: checking for $CC __attribute__ directives..." >&5
12869 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12870 cat > conftest.$ac_ext <<EOF
12871 #line 12871 "${as_me:-configure}"
12872 #include "confdefs.h"
12873 #include "conftest.h"
12874 #include "conftest.i"
12875 #if     GCC_PRINTF
12876 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12877 #else
12878 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12879 #endif
12880 #if     GCC_SCANF
12881 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12882 #else
12883 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12884 #endif
12885 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12886 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12887 extern void foo(void) GCC_NORETURN;
12888 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12889 EOF
12890         cf_printf_attribute=no
12891         cf_scanf_attribute=no
12892         for cf_attribute in scanf printf unused noreturn
12893         do
12894
12895 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12896
12897                 cf_directive="__attribute__(($cf_attribute))"
12898                 echo "checking for $CC $cf_directive" 1>&5
12899
12900                 case $cf_attribute in #(vi
12901                 printf) #(vi
12902                         cf_printf_attribute=yes
12903                         cat >conftest.h <<EOF
12904 #define GCC_$cf_ATTRIBUTE 1
12905 EOF
12906                         ;;
12907                 scanf) #(vi
12908                         cf_scanf_attribute=yes
12909                         cat >conftest.h <<EOF
12910 #define GCC_$cf_ATTRIBUTE 1
12911 EOF
12912                         ;;
12913                 *) #(vi
12914                         cat >conftest.h <<EOF
12915 #define GCC_$cf_ATTRIBUTE $cf_directive
12916 EOF
12917                         ;;
12918                 esac
12919
12920                 if { (eval echo "$as_me:12920: \"$ac_compile\"") >&5
12921   (eval $ac_compile) 2>&5
12922   ac_status=$?
12923   echo "$as_me:12923: \$? = $ac_status" >&5
12924   (exit $ac_status); }; then
12925                         test -n "$verbose" && echo "$as_me:12925: result: ... $cf_attribute" >&5
12926 echo "${ECHO_T}... $cf_attribute" >&6
12927                         cat conftest.h >>confdefs.h
12928                         case $cf_attribute in #(vi
12929                         noreturn) #(vi
12930
12931 cat >>confdefs.h <<EOF
12932 #define GCC_NORETURN $cf_directive
12933 EOF
12934
12935                                 ;;
12936                         printf) #(vi
12937                                 cf_value='/* nothing */'
12938                                 if test "$cf_printf_attribute" != no ; then
12939                                         cf_value='__attribute__((format(printf,fmt,var)))'
12940
12941 cat >>confdefs.h <<\EOF
12942 #define GCC_PRINTF 1
12943 EOF
12944
12945                                 fi
12946
12947 cat >>confdefs.h <<EOF
12948 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12949 EOF
12950
12951                                 ;;
12952                         scanf) #(vi
12953                                 cf_value='/* nothing */'
12954                                 if test "$cf_scanf_attribute" != no ; then
12955                                         cf_value='__attribute__((format(scanf,fmt,var)))'
12956
12957 cat >>confdefs.h <<\EOF
12958 #define GCC_SCANF 1
12959 EOF
12960
12961                                 fi
12962
12963 cat >>confdefs.h <<EOF
12964 #define GCC_SCANFLIKE(fmt,var) $cf_value
12965 EOF
12966
12967                                 ;;
12968                         unused) #(vi
12969
12970 cat >>confdefs.h <<EOF
12971 #define GCC_UNUSED $cf_directive
12972 EOF
12973
12974                                 ;;
12975                         esac
12976                 fi
12977         done
12978 else
12979         fgrep define conftest.i >>confdefs.h
12980 fi
12981 rm -rf conftest*
12982 fi
12983
12984 echo "$as_me:12984: checking if you want to work around bogus compiler/loader warnings" >&5
12985 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12986
12987 # Check whether --enable-string-hacks or --disable-string-hacks was given.
12988 if test "${enable_string_hacks+set}" = set; then
12989   enableval="$enable_string_hacks"
12990   with_string_hacks=$enableval
12991 else
12992   with_string_hacks=no
12993 fi;
12994 echo "$as_me:12994: result: $with_string_hacks" >&5
12995 echo "${ECHO_T}$with_string_hacks" >&6
12996
12997 if test "x$with_string_hacks" = "xyes"; then
12998
12999 cat >>confdefs.h <<\EOF
13000 #define USE_STRING_HACKS 1
13001 EOF
13002
13003         { echo "$as_me:13003: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13004 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13005
13006 for ac_func in strlcat strlcpy snprintf
13007 do
13008 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13009 echo "$as_me:13009: checking for $ac_func" >&5
13010 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13011 if eval "test \"\${$as_ac_var+set}\" = set"; then
13012   echo $ECHO_N "(cached) $ECHO_C" >&6
13013 else
13014   cat >conftest.$ac_ext <<_ACEOF
13015 #line 13015 "configure"
13016 #include "confdefs.h"
13017 /* System header to define __stub macros and hopefully few prototypes,
13018     which can conflict with char $ac_func (); below.  */
13019 #include <assert.h>
13020 /* Override any gcc2 internal prototype to avoid an error.  */
13021 #ifdef __cplusplus
13022 extern "C"
13023 #endif
13024 /* We use char because int might match the return type of a gcc2
13025    builtin and then its argument prototype would still apply.  */
13026 char $ac_func ();
13027 char (*f) ();
13028
13029 int
13030 main ()
13031 {
13032 /* The GNU C library defines this for functions which it implements
13033     to always fail with ENOSYS.  Some functions are actually named
13034     something starting with __ and the normal name is an alias.  */
13035 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13036 choke me
13037 #else
13038 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13039 #endif
13040
13041   ;
13042   return 0;
13043 }
13044 _ACEOF
13045 rm -f conftest.$ac_objext conftest$ac_exeext
13046 if { (eval echo "$as_me:13046: \"$ac_link\"") >&5
13047   (eval $ac_link) 2>&5
13048   ac_status=$?
13049   echo "$as_me:13049: \$? = $ac_status" >&5
13050   (exit $ac_status); } &&
13051          { ac_try='test -s conftest$ac_exeext'
13052   { (eval echo "$as_me:13052: \"$ac_try\"") >&5
13053   (eval $ac_try) 2>&5
13054   ac_status=$?
13055   echo "$as_me:13055: \$? = $ac_status" >&5
13056   (exit $ac_status); }; }; then
13057   eval "$as_ac_var=yes"
13058 else
13059   echo "$as_me: failed program was:" >&5
13060 cat conftest.$ac_ext >&5
13061 eval "$as_ac_var=no"
13062 fi
13063 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13064 fi
13065 echo "$as_me:13065: result: `eval echo '${'$as_ac_var'}'`" >&5
13066 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13067 if test `eval echo '${'$as_ac_var'}'` = yes; then
13068   cat >>confdefs.h <<EOF
13069 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13070 EOF
13071
13072 fi
13073 done
13074
13075 fi
13076
13077 ###     use option --enable-assertions to turn on generation of assertion code
13078 echo "$as_me:13078: checking if you want to enable runtime assertions" >&5
13079 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13080
13081 # Check whether --enable-assertions or --disable-assertions was given.
13082 if test "${enable_assertions+set}" = set; then
13083   enableval="$enable_assertions"
13084   with_assertions=$enableval
13085 else
13086   with_assertions=no
13087 fi;
13088 echo "$as_me:13088: result: $with_assertions" >&5
13089 echo "${ECHO_T}$with_assertions" >&6
13090 if test -n "$GCC"
13091 then
13092         if test "$with_assertions" = no
13093         then
13094                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13095         else
13096
13097         ADAFLAGS="$ADAFLAGS -gnata"
13098
13099         fi
13100 fi
13101
13102 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13103
13104 echo "$as_me:13104: checking if you want to use dmalloc for testing" >&5
13105 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13106
13107 # Check whether --with-dmalloc or --without-dmalloc was given.
13108 if test "${with_dmalloc+set}" = set; then
13109   withval="$with_dmalloc"
13110
13111 cat >>confdefs.h <<EOF
13112 #define USE_DMALLOC 1
13113 EOF
13114
13115         : ${with_cflags:=-g}
13116         : ${with_no_leaks:=yes}
13117          with_dmalloc=yes
13118 else
13119   with_dmalloc=
13120 fi;
13121 echo "$as_me:13121: result: ${with_dmalloc:-no}" >&5
13122 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13123
13124 case .$with_cflags in #(vi
13125 .*-g*)
13126         case .$CFLAGS in #(vi
13127         .*-g*) #(vi
13128                 ;;
13129         *)
13130
13131 cf_fix_cppflags=no
13132 cf_new_cflags=
13133 cf_new_cppflags=
13134 cf_new_extra_cppflags=
13135
13136 for cf_add_cflags in -g
13137 do
13138 case $cf_fix_cppflags in
13139 no)
13140         case $cf_add_cflags in #(vi
13141         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13142                 case $cf_add_cflags in
13143                 -D*)
13144                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13145
13146                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13147                                 && test -z "${cf_tst_cflags}" \
13148                                 && cf_fix_cppflags=yes
13149
13150                         if test $cf_fix_cppflags = yes ; then
13151                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13152                                 continue
13153                         elif test "${cf_tst_cflags}" = "\"'" ; then
13154                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13155                                 continue
13156                         fi
13157                         ;;
13158                 esac
13159                 case "$CPPFLAGS" in
13160                 *$cf_add_cflags) #(vi
13161                         ;;
13162                 *) #(vi
13163                         case $cf_add_cflags in #(vi
13164                         -D*)
13165                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13166
13167 CPPFLAGS=`echo "$CPPFLAGS" | \
13168         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13169                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13170
13171                                 ;;
13172                         esac
13173                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13174                         ;;
13175                 esac
13176                 ;;
13177         *)
13178                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13179                 ;;
13180         esac
13181         ;;
13182 yes)
13183         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13184
13185         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13186
13187         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13188                 && test -z "${cf_tst_cflags}" \
13189                 && cf_fix_cppflags=no
13190         ;;
13191 esac
13192 done
13193
13194 if test -n "$cf_new_cflags" ; then
13195
13196         CFLAGS="$CFLAGS $cf_new_cflags"
13197 fi
13198
13199 if test -n "$cf_new_cppflags" ; then
13200
13201         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13202 fi
13203
13204 if test -n "$cf_new_extra_cppflags" ; then
13205
13206         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13207 fi
13208
13209                 ;;
13210         esac
13211         ;;
13212 esac
13213
13214 if test "$with_dmalloc" = yes ; then
13215         echo "$as_me:13215: checking for dmalloc.h" >&5
13216 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13217 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13218   echo $ECHO_N "(cached) $ECHO_C" >&6
13219 else
13220   cat >conftest.$ac_ext <<_ACEOF
13221 #line 13221 "configure"
13222 #include "confdefs.h"
13223 #include <dmalloc.h>
13224 _ACEOF
13225 if { (eval echo "$as_me:13225: \"$ac_cpp conftest.$ac_ext\"") >&5
13226   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13227   ac_status=$?
13228   egrep -v '^ *\+' conftest.er1 >conftest.err
13229   rm -f conftest.er1
13230   cat conftest.err >&5
13231   echo "$as_me:13231: \$? = $ac_status" >&5
13232   (exit $ac_status); } >/dev/null; then
13233   if test -s conftest.err; then
13234     ac_cpp_err=$ac_c_preproc_warn_flag
13235   else
13236     ac_cpp_err=
13237   fi
13238 else
13239   ac_cpp_err=yes
13240 fi
13241 if test -z "$ac_cpp_err"; then
13242   ac_cv_header_dmalloc_h=yes
13243 else
13244   echo "$as_me: failed program was:" >&5
13245   cat conftest.$ac_ext >&5
13246   ac_cv_header_dmalloc_h=no
13247 fi
13248 rm -f conftest.err conftest.$ac_ext
13249 fi
13250 echo "$as_me:13250: result: $ac_cv_header_dmalloc_h" >&5
13251 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13252 if test $ac_cv_header_dmalloc_h = yes; then
13253
13254 echo "$as_me:13254: checking for dmalloc_debug in -ldmalloc" >&5
13255 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13256 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13257   echo $ECHO_N "(cached) $ECHO_C" >&6
13258 else
13259   ac_check_lib_save_LIBS=$LIBS
13260 LIBS="-ldmalloc  $LIBS"
13261 cat >conftest.$ac_ext <<_ACEOF
13262 #line 13262 "configure"
13263 #include "confdefs.h"
13264
13265 /* Override any gcc2 internal prototype to avoid an error.  */
13266 #ifdef __cplusplus
13267 extern "C"
13268 #endif
13269 /* We use char because int might match the return type of a gcc2
13270    builtin and then its argument prototype would still apply.  */
13271 char dmalloc_debug ();
13272 int
13273 main ()
13274 {
13275 dmalloc_debug ();
13276   ;
13277   return 0;
13278 }
13279 _ACEOF
13280 rm -f conftest.$ac_objext conftest$ac_exeext
13281 if { (eval echo "$as_me:13281: \"$ac_link\"") >&5
13282   (eval $ac_link) 2>&5
13283   ac_status=$?
13284   echo "$as_me:13284: \$? = $ac_status" >&5
13285   (exit $ac_status); } &&
13286          { ac_try='test -s conftest$ac_exeext'
13287   { (eval echo "$as_me:13287: \"$ac_try\"") >&5
13288   (eval $ac_try) 2>&5
13289   ac_status=$?
13290   echo "$as_me:13290: \$? = $ac_status" >&5
13291   (exit $ac_status); }; }; then
13292   ac_cv_lib_dmalloc_dmalloc_debug=yes
13293 else
13294   echo "$as_me: failed program was:" >&5
13295 cat conftest.$ac_ext >&5
13296 ac_cv_lib_dmalloc_dmalloc_debug=no
13297 fi
13298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13299 LIBS=$ac_check_lib_save_LIBS
13300 fi
13301 echo "$as_me:13301: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13302 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13303 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13304   cat >>confdefs.h <<EOF
13305 #define HAVE_LIBDMALLOC 1
13306 EOF
13307
13308   LIBS="-ldmalloc $LIBS"
13309
13310 fi
13311
13312 fi
13313
13314 fi
13315
13316 echo "$as_me:13316: checking if you want to use dbmalloc for testing" >&5
13317 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13318
13319 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13320 if test "${with_dbmalloc+set}" = set; then
13321   withval="$with_dbmalloc"
13322
13323 cat >>confdefs.h <<EOF
13324 #define USE_DBMALLOC 1
13325 EOF
13326
13327         : ${with_cflags:=-g}
13328         : ${with_no_leaks:=yes}
13329          with_dbmalloc=yes
13330 else
13331   with_dbmalloc=
13332 fi;
13333 echo "$as_me:13333: result: ${with_dbmalloc:-no}" >&5
13334 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13335
13336 case .$with_cflags in #(vi
13337 .*-g*)
13338         case .$CFLAGS in #(vi
13339         .*-g*) #(vi
13340                 ;;
13341         *)
13342
13343 cf_fix_cppflags=no
13344 cf_new_cflags=
13345 cf_new_cppflags=
13346 cf_new_extra_cppflags=
13347
13348 for cf_add_cflags in -g
13349 do
13350 case $cf_fix_cppflags in
13351 no)
13352         case $cf_add_cflags in #(vi
13353         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13354                 case $cf_add_cflags in
13355                 -D*)
13356                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13357
13358                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13359                                 && test -z "${cf_tst_cflags}" \
13360                                 && cf_fix_cppflags=yes
13361
13362                         if test $cf_fix_cppflags = yes ; then
13363                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13364                                 continue
13365                         elif test "${cf_tst_cflags}" = "\"'" ; then
13366                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13367                                 continue
13368                         fi
13369                         ;;
13370                 esac
13371                 case "$CPPFLAGS" in
13372                 *$cf_add_cflags) #(vi
13373                         ;;
13374                 *) #(vi
13375                         case $cf_add_cflags in #(vi
13376                         -D*)
13377                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13378
13379 CPPFLAGS=`echo "$CPPFLAGS" | \
13380         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13381                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13382
13383                                 ;;
13384                         esac
13385                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13386                         ;;
13387                 esac
13388                 ;;
13389         *)
13390                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13391                 ;;
13392         esac
13393         ;;
13394 yes)
13395         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13396
13397         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13398
13399         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13400                 && test -z "${cf_tst_cflags}" \
13401                 && cf_fix_cppflags=no
13402         ;;
13403 esac
13404 done
13405
13406 if test -n "$cf_new_cflags" ; then
13407
13408         CFLAGS="$CFLAGS $cf_new_cflags"
13409 fi
13410
13411 if test -n "$cf_new_cppflags" ; then
13412
13413         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13414 fi
13415
13416 if test -n "$cf_new_extra_cppflags" ; then
13417
13418         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13419 fi
13420
13421                 ;;
13422         esac
13423         ;;
13424 esac
13425
13426 if test "$with_dbmalloc" = yes ; then
13427         echo "$as_me:13427: checking for dbmalloc.h" >&5
13428 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13429 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13430   echo $ECHO_N "(cached) $ECHO_C" >&6
13431 else
13432   cat >conftest.$ac_ext <<_ACEOF
13433 #line 13433 "configure"
13434 #include "confdefs.h"
13435 #include <dbmalloc.h>
13436 _ACEOF
13437 if { (eval echo "$as_me:13437: \"$ac_cpp conftest.$ac_ext\"") >&5
13438   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13439   ac_status=$?
13440   egrep -v '^ *\+' conftest.er1 >conftest.err
13441   rm -f conftest.er1
13442   cat conftest.err >&5
13443   echo "$as_me:13443: \$? = $ac_status" >&5
13444   (exit $ac_status); } >/dev/null; then
13445   if test -s conftest.err; then
13446     ac_cpp_err=$ac_c_preproc_warn_flag
13447   else
13448     ac_cpp_err=
13449   fi
13450 else
13451   ac_cpp_err=yes
13452 fi
13453 if test -z "$ac_cpp_err"; then
13454   ac_cv_header_dbmalloc_h=yes
13455 else
13456   echo "$as_me: failed program was:" >&5
13457   cat conftest.$ac_ext >&5
13458   ac_cv_header_dbmalloc_h=no
13459 fi
13460 rm -f conftest.err conftest.$ac_ext
13461 fi
13462 echo "$as_me:13462: result: $ac_cv_header_dbmalloc_h" >&5
13463 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13464 if test $ac_cv_header_dbmalloc_h = yes; then
13465
13466 echo "$as_me:13466: checking for debug_malloc in -ldbmalloc" >&5
13467 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13468 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13469   echo $ECHO_N "(cached) $ECHO_C" >&6
13470 else
13471   ac_check_lib_save_LIBS=$LIBS
13472 LIBS="-ldbmalloc  $LIBS"
13473 cat >conftest.$ac_ext <<_ACEOF
13474 #line 13474 "configure"
13475 #include "confdefs.h"
13476
13477 /* Override any gcc2 internal prototype to avoid an error.  */
13478 #ifdef __cplusplus
13479 extern "C"
13480 #endif
13481 /* We use char because int might match the return type of a gcc2
13482    builtin and then its argument prototype would still apply.  */
13483 char debug_malloc ();
13484 int
13485 main ()
13486 {
13487 debug_malloc ();
13488   ;
13489   return 0;
13490 }
13491 _ACEOF
13492 rm -f conftest.$ac_objext conftest$ac_exeext
13493 if { (eval echo "$as_me:13493: \"$ac_link\"") >&5
13494   (eval $ac_link) 2>&5
13495   ac_status=$?
13496   echo "$as_me:13496: \$? = $ac_status" >&5
13497   (exit $ac_status); } &&
13498          { ac_try='test -s conftest$ac_exeext'
13499   { (eval echo "$as_me:13499: \"$ac_try\"") >&5
13500   (eval $ac_try) 2>&5
13501   ac_status=$?
13502   echo "$as_me:13502: \$? = $ac_status" >&5
13503   (exit $ac_status); }; }; then
13504   ac_cv_lib_dbmalloc_debug_malloc=yes
13505 else
13506   echo "$as_me: failed program was:" >&5
13507 cat conftest.$ac_ext >&5
13508 ac_cv_lib_dbmalloc_debug_malloc=no
13509 fi
13510 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13511 LIBS=$ac_check_lib_save_LIBS
13512 fi
13513 echo "$as_me:13513: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13514 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13515 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13516   cat >>confdefs.h <<EOF
13517 #define HAVE_LIBDBMALLOC 1
13518 EOF
13519
13520   LIBS="-ldbmalloc $LIBS"
13521
13522 fi
13523
13524 fi
13525
13526 fi
13527
13528 echo "$as_me:13528: checking if you want to use valgrind for testing" >&5
13529 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13530
13531 # Check whether --with-valgrind or --without-valgrind was given.
13532 if test "${with_valgrind+set}" = set; then
13533   withval="$with_valgrind"
13534
13535 cat >>confdefs.h <<EOF
13536 #define USE_VALGRIND 1
13537 EOF
13538
13539         : ${with_cflags:=-g}
13540         : ${with_no_leaks:=yes}
13541          with_valgrind=yes
13542 else
13543   with_valgrind=
13544 fi;
13545 echo "$as_me:13545: result: ${with_valgrind:-no}" >&5
13546 echo "${ECHO_T}${with_valgrind:-no}" >&6
13547
13548 case .$with_cflags in #(vi
13549 .*-g*)
13550         case .$CFLAGS in #(vi
13551         .*-g*) #(vi
13552                 ;;
13553         *)
13554
13555 cf_fix_cppflags=no
13556 cf_new_cflags=
13557 cf_new_cppflags=
13558 cf_new_extra_cppflags=
13559
13560 for cf_add_cflags in -g
13561 do
13562 case $cf_fix_cppflags in
13563 no)
13564         case $cf_add_cflags in #(vi
13565         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13566                 case $cf_add_cflags in
13567                 -D*)
13568                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13569
13570                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13571                                 && test -z "${cf_tst_cflags}" \
13572                                 && cf_fix_cppflags=yes
13573
13574                         if test $cf_fix_cppflags = yes ; then
13575                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13576                                 continue
13577                         elif test "${cf_tst_cflags}" = "\"'" ; then
13578                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13579                                 continue
13580                         fi
13581                         ;;
13582                 esac
13583                 case "$CPPFLAGS" in
13584                 *$cf_add_cflags) #(vi
13585                         ;;
13586                 *) #(vi
13587                         case $cf_add_cflags in #(vi
13588                         -D*)
13589                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13590
13591 CPPFLAGS=`echo "$CPPFLAGS" | \
13592         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13593                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13594
13595                                 ;;
13596                         esac
13597                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13598                         ;;
13599                 esac
13600                 ;;
13601         *)
13602                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13603                 ;;
13604         esac
13605         ;;
13606 yes)
13607         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13608
13609         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13610
13611         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13612                 && test -z "${cf_tst_cflags}" \
13613                 && cf_fix_cppflags=no
13614         ;;
13615 esac
13616 done
13617
13618 if test -n "$cf_new_cflags" ; then
13619
13620         CFLAGS="$CFLAGS $cf_new_cflags"
13621 fi
13622
13623 if test -n "$cf_new_cppflags" ; then
13624
13625         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13626 fi
13627
13628 if test -n "$cf_new_extra_cppflags" ; then
13629
13630         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13631 fi
13632
13633                 ;;
13634         esac
13635         ;;
13636 esac
13637
13638 echo "$as_me:13638: checking if you want to perform memory-leak testing" >&5
13639 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13640
13641 # Check whether --enable-leaks or --disable-leaks was given.
13642 if test "${enable_leaks+set}" = set; then
13643   enableval="$enable_leaks"
13644   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13645 else
13646   : ${with_no_leaks:=no}
13647 fi;
13648 echo "$as_me:13648: result: $with_no_leaks" >&5
13649 echo "${ECHO_T}$with_no_leaks" >&6
13650
13651 if test "$with_no_leaks" = yes ; then
13652
13653 cat >>confdefs.h <<\EOF
13654 #define NO_LEAKS 1
13655 EOF
13656
13657 cat >>confdefs.h <<\EOF
13658 #define YY_NO_LEAKS 1
13659 EOF
13660
13661 fi
13662
13663 cat >>confdefs.h <<\EOF
13664 #define HAVE_NC_ALLOC_H 1
13665 EOF
13666
13667 ###     use option --enable-expanded to generate certain macros as functions
13668
13669 # Check whether --enable-expanded or --disable-expanded was given.
13670 if test "${enable_expanded+set}" = set; then
13671   enableval="$enable_expanded"
13672   test "x$enableval" = xyes &&
13673 cat >>confdefs.h <<\EOF
13674 #define NCURSES_EXPANDED 1
13675 EOF
13676
13677 fi;
13678
13679 ###     use option --disable-macros to suppress macros in favor of functions
13680
13681 # Check whether --enable-macros or --disable-macros was given.
13682 if test "${enable_macros+set}" = set; then
13683   enableval="$enable_macros"
13684   test "$enableval" = no &&
13685 cat >>confdefs.h <<\EOF
13686 #define NCURSES_NOMACROS 1
13687 EOF
13688
13689 fi;
13690
13691 # Normally we only add trace() to the debug-library.  Allow this to be
13692 # extended to all models of the ncurses library:
13693 cf_all_traces=no
13694 case "$CFLAGS $CPPFLAGS" in
13695 *-DTRACE*)
13696         cf_all_traces=yes
13697         ;;
13698 esac
13699
13700 echo "$as_me:13700: checking whether to add trace feature to all models" >&5
13701 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13702
13703 # Check whether --with-trace or --without-trace was given.
13704 if test "${with_trace+set}" = set; then
13705   withval="$with_trace"
13706   cf_with_trace=$withval
13707 else
13708   cf_with_trace=$cf_all_traces
13709 fi;
13710 echo "$as_me:13710: result: $cf_with_trace" >&5
13711 echo "${ECHO_T}$cf_with_trace" >&6
13712
13713 if test "x$cf_with_trace" = xyes ; then
13714         LIB_TRACING=all
13715         ADA_TRACE=TRUE
13716
13717 cf_fix_cppflags=no
13718 cf_new_cflags=
13719 cf_new_cppflags=
13720 cf_new_extra_cppflags=
13721
13722 for cf_add_cflags in -DTRACE
13723 do
13724 case $cf_fix_cppflags in
13725 no)
13726         case $cf_add_cflags in #(vi
13727         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13728                 case $cf_add_cflags in
13729                 -D*)
13730                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13731
13732                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13733                                 && test -z "${cf_tst_cflags}" \
13734                                 && cf_fix_cppflags=yes
13735
13736                         if test $cf_fix_cppflags = yes ; then
13737                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13738                                 continue
13739                         elif test "${cf_tst_cflags}" = "\"'" ; then
13740                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13741                                 continue
13742                         fi
13743                         ;;
13744                 esac
13745                 case "$CPPFLAGS" in
13746                 *$cf_add_cflags) #(vi
13747                         ;;
13748                 *) #(vi
13749                         case $cf_add_cflags in #(vi
13750                         -D*)
13751                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13752
13753 CPPFLAGS=`echo "$CPPFLAGS" | \
13754         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13755                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13756
13757                                 ;;
13758                         esac
13759                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13760                         ;;
13761                 esac
13762                 ;;
13763         *)
13764                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13765                 ;;
13766         esac
13767         ;;
13768 yes)
13769         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13770
13771         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13772
13773         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13774                 && test -z "${cf_tst_cflags}" \
13775                 && cf_fix_cppflags=no
13776         ;;
13777 esac
13778 done
13779
13780 if test -n "$cf_new_cflags" ; then
13781
13782         CFLAGS="$CFLAGS $cf_new_cflags"
13783 fi
13784
13785 if test -n "$cf_new_cppflags" ; then
13786
13787         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13788 fi
13789
13790 if test -n "$cf_new_extra_cppflags" ; then
13791
13792         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13793 fi
13794
13795 else
13796         LIB_TRACING=DEBUG
13797         ADA_TRACE=FALSE
13798 fi
13799
13800 echo "$as_me:13800: checking if we want to use GNAT projects" >&5
13801 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
13802
13803 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
13804 if test "${enable_gnat_projects+set}" = set; then
13805   enableval="$enable_gnat_projects"
13806   test "$enableval" != no && enableval=yes
13807   if test "$enableval" != "yes" ; then
13808     enable_gnat_projects=no
13809   else
13810     enable_gnat_projects=yes
13811   fi
13812 else
13813   enableval=yes
13814   enable_gnat_projects=yes
13815
13816 fi;
13817 echo "$as_me:13817: result: $enable_gnat_projects" >&5
13818 echo "${ECHO_T}$enable_gnat_projects" >&6
13819
13820 ###     Checks for libraries.
13821 case $cf_cv_system_name in #(vi
13822 *mingw32*) #(vi
13823         LIBS=" -lpsapi $LIBS"
13824         ;;
13825 *)
13826 echo "$as_me:13826: checking for gettimeofday" >&5
13827 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13828 if test "${ac_cv_func_gettimeofday+set}" = set; then
13829   echo $ECHO_N "(cached) $ECHO_C" >&6
13830 else
13831   cat >conftest.$ac_ext <<_ACEOF
13832 #line 13832 "configure"
13833 #include "confdefs.h"
13834 /* System header to define __stub macros and hopefully few prototypes,
13835     which can conflict with char gettimeofday (); below.  */
13836 #include <assert.h>
13837 /* Override any gcc2 internal prototype to avoid an error.  */
13838 #ifdef __cplusplus
13839 extern "C"
13840 #endif
13841 /* We use char because int might match the return type of a gcc2
13842    builtin and then its argument prototype would still apply.  */
13843 char gettimeofday ();
13844 char (*f) ();
13845
13846 int
13847 main ()
13848 {
13849 /* The GNU C library defines this for functions which it implements
13850     to always fail with ENOSYS.  Some functions are actually named
13851     something starting with __ and the normal name is an alias.  */
13852 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13853 choke me
13854 #else
13855 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13856 #endif
13857
13858   ;
13859   return 0;
13860 }
13861 _ACEOF
13862 rm -f conftest.$ac_objext conftest$ac_exeext
13863 if { (eval echo "$as_me:13863: \"$ac_link\"") >&5
13864   (eval $ac_link) 2>&5
13865   ac_status=$?
13866   echo "$as_me:13866: \$? = $ac_status" >&5
13867   (exit $ac_status); } &&
13868          { ac_try='test -s conftest$ac_exeext'
13869   { (eval echo "$as_me:13869: \"$ac_try\"") >&5
13870   (eval $ac_try) 2>&5
13871   ac_status=$?
13872   echo "$as_me:13872: \$? = $ac_status" >&5
13873   (exit $ac_status); }; }; then
13874   ac_cv_func_gettimeofday=yes
13875 else
13876   echo "$as_me: failed program was:" >&5
13877 cat conftest.$ac_ext >&5
13878 ac_cv_func_gettimeofday=no
13879 fi
13880 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13881 fi
13882 echo "$as_me:13882: result: $ac_cv_func_gettimeofday" >&5
13883 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13884 if test $ac_cv_func_gettimeofday = yes; then
13885
13886 cat >>confdefs.h <<\EOF
13887 #define HAVE_GETTIMEOFDAY 1
13888 EOF
13889
13890 else
13891
13892 echo "$as_me:13892: checking for gettimeofday in -lbsd" >&5
13893 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13894 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13895   echo $ECHO_N "(cached) $ECHO_C" >&6
13896 else
13897   ac_check_lib_save_LIBS=$LIBS
13898 LIBS="-lbsd  $LIBS"
13899 cat >conftest.$ac_ext <<_ACEOF
13900 #line 13900 "configure"
13901 #include "confdefs.h"
13902
13903 /* Override any gcc2 internal prototype to avoid an error.  */
13904 #ifdef __cplusplus
13905 extern "C"
13906 #endif
13907 /* We use char because int might match the return type of a gcc2
13908    builtin and then its argument prototype would still apply.  */
13909 char gettimeofday ();
13910 int
13911 main ()
13912 {
13913 gettimeofday ();
13914   ;
13915   return 0;
13916 }
13917 _ACEOF
13918 rm -f conftest.$ac_objext conftest$ac_exeext
13919 if { (eval echo "$as_me:13919: \"$ac_link\"") >&5
13920   (eval $ac_link) 2>&5
13921   ac_status=$?
13922   echo "$as_me:13922: \$? = $ac_status" >&5
13923   (exit $ac_status); } &&
13924          { ac_try='test -s conftest$ac_exeext'
13925   { (eval echo "$as_me:13925: \"$ac_try\"") >&5
13926   (eval $ac_try) 2>&5
13927   ac_status=$?
13928   echo "$as_me:13928: \$? = $ac_status" >&5
13929   (exit $ac_status); }; }; then
13930   ac_cv_lib_bsd_gettimeofday=yes
13931 else
13932   echo "$as_me: failed program was:" >&5
13933 cat conftest.$ac_ext >&5
13934 ac_cv_lib_bsd_gettimeofday=no
13935 fi
13936 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13937 LIBS=$ac_check_lib_save_LIBS
13938 fi
13939 echo "$as_me:13939: result: $ac_cv_lib_bsd_gettimeofday" >&5
13940 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13941 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13942
13943 cat >>confdefs.h <<\EOF
13944 #define HAVE_GETTIMEOFDAY 1
13945 EOF
13946
13947 cf_add_libs="-lbsd"
13948 # Filter out duplicates - this happens with badly-designed ".pc" files...
13949 for cf_add_1lib in $LIBS
13950 do
13951         for cf_add_2lib in $cf_add_libs
13952         do
13953                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13954                 then
13955                         cf_add_1lib=
13956                         break
13957                 fi
13958         done
13959         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13960 done
13961 LIBS="$cf_add_libs"
13962
13963 fi
13964
13965 fi
13966         ;;
13967 esac
13968
13969 echo "$as_me:13969: checking if -lm needed for math functions" >&5
13970 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13971 if test "${cf_cv_need_libm+set}" = set; then
13972   echo $ECHO_N "(cached) $ECHO_C" >&6
13973 else
13974
13975         cat >conftest.$ac_ext <<_ACEOF
13976 #line 13976 "configure"
13977 #include "confdefs.h"
13978
13979         #include <stdio.h>
13980         #include <math.h>
13981
13982 int
13983 main ()
13984 {
13985 double x = rand(); printf("result = %g\n", pow(sin(x),x))
13986   ;
13987   return 0;
13988 }
13989 _ACEOF
13990 rm -f conftest.$ac_objext conftest$ac_exeext
13991 if { (eval echo "$as_me:13991: \"$ac_link\"") >&5
13992   (eval $ac_link) 2>&5
13993   ac_status=$?
13994   echo "$as_me:13994: \$? = $ac_status" >&5
13995   (exit $ac_status); } &&
13996          { ac_try='test -s conftest$ac_exeext'
13997   { (eval echo "$as_me:13997: \"$ac_try\"") >&5
13998   (eval $ac_try) 2>&5
13999   ac_status=$?
14000   echo "$as_me:14000: \$? = $ac_status" >&5
14001   (exit $ac_status); }; }; then
14002   cf_cv_need_libm=no
14003 else
14004   echo "$as_me: failed program was:" >&5
14005 cat conftest.$ac_ext >&5
14006 cf_cv_need_libm=yes
14007 fi
14008 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14009 fi
14010 echo "$as_me:14010: result: $cf_cv_need_libm" >&5
14011 echo "${ECHO_T}$cf_cv_need_libm" >&6
14012 if test "$cf_cv_need_libm" = yes
14013 then
14014 MATH_LIB=-lm
14015 fi
14016
14017 ###     Checks for header files.
14018 echo "$as_me:14018: checking for ANSI C header files" >&5
14019 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14020 if test "${ac_cv_header_stdc+set}" = set; then
14021   echo $ECHO_N "(cached) $ECHO_C" >&6
14022 else
14023   cat >conftest.$ac_ext <<_ACEOF
14024 #line 14024 "configure"
14025 #include "confdefs.h"
14026 #include <stdlib.h>
14027 #include <stdarg.h>
14028 #include <string.h>
14029 #include <float.h>
14030
14031 _ACEOF
14032 if { (eval echo "$as_me:14032: \"$ac_cpp conftest.$ac_ext\"") >&5
14033   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14034   ac_status=$?
14035   egrep -v '^ *\+' conftest.er1 >conftest.err
14036   rm -f conftest.er1
14037   cat conftest.err >&5
14038   echo "$as_me:14038: \$? = $ac_status" >&5
14039   (exit $ac_status); } >/dev/null; then
14040   if test -s conftest.err; then
14041     ac_cpp_err=$ac_c_preproc_warn_flag
14042   else
14043     ac_cpp_err=
14044   fi
14045 else
14046   ac_cpp_err=yes
14047 fi
14048 if test -z "$ac_cpp_err"; then
14049   ac_cv_header_stdc=yes
14050 else
14051   echo "$as_me: failed program was:" >&5
14052   cat conftest.$ac_ext >&5
14053   ac_cv_header_stdc=no
14054 fi
14055 rm -f conftest.err conftest.$ac_ext
14056
14057 if test $ac_cv_header_stdc = yes; then
14058   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14059   cat >conftest.$ac_ext <<_ACEOF
14060 #line 14060 "configure"
14061 #include "confdefs.h"
14062 #include <string.h>
14063
14064 _ACEOF
14065 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14066   egrep "memchr" >/dev/null 2>&1; then
14067   :
14068 else
14069   ac_cv_header_stdc=no
14070 fi
14071 rm -rf conftest*
14072
14073 fi
14074
14075 if test $ac_cv_header_stdc = yes; then
14076   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14077   cat >conftest.$ac_ext <<_ACEOF
14078 #line 14078 "configure"
14079 #include "confdefs.h"
14080 #include <stdlib.h>
14081
14082 _ACEOF
14083 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14084   egrep "free" >/dev/null 2>&1; then
14085   :
14086 else
14087   ac_cv_header_stdc=no
14088 fi
14089 rm -rf conftest*
14090
14091 fi
14092
14093 if test $ac_cv_header_stdc = yes; then
14094   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14095   if test "$cross_compiling" = yes; then
14096   :
14097 else
14098   cat >conftest.$ac_ext <<_ACEOF
14099 #line 14099 "configure"
14100 #include "confdefs.h"
14101 #include <ctype.h>
14102 #if ((' ' & 0x0FF) == 0x020)
14103 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14104 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14105 #else
14106 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14107                      || ('j' <= (c) && (c) <= 'r') \
14108                      || ('s' <= (c) && (c) <= 'z'))
14109 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14110 #endif
14111
14112 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14113 int
14114 main ()
14115 {
14116   int i;
14117   for (i = 0; i < 256; i++)
14118     if (XOR (islower (i), ISLOWER (i))
14119         || toupper (i) != TOUPPER (i))
14120       $ac_main_return(2);
14121   $ac_main_return (0);
14122 }
14123 _ACEOF
14124 rm -f conftest$ac_exeext
14125 if { (eval echo "$as_me:14125: \"$ac_link\"") >&5
14126   (eval $ac_link) 2>&5
14127   ac_status=$?
14128   echo "$as_me:14128: \$? = $ac_status" >&5
14129   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14130   { (eval echo "$as_me:14130: \"$ac_try\"") >&5
14131   (eval $ac_try) 2>&5
14132   ac_status=$?
14133   echo "$as_me:14133: \$? = $ac_status" >&5
14134   (exit $ac_status); }; }; then
14135   :
14136 else
14137   echo "$as_me: program exited with status $ac_status" >&5
14138 echo "$as_me: failed program was:" >&5
14139 cat conftest.$ac_ext >&5
14140 ac_cv_header_stdc=no
14141 fi
14142 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14143 fi
14144 fi
14145 fi
14146 echo "$as_me:14146: result: $ac_cv_header_stdc" >&5
14147 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14148 if test $ac_cv_header_stdc = yes; then
14149
14150 cat >>confdefs.h <<\EOF
14151 #define STDC_HEADERS 1
14152 EOF
14153
14154 fi
14155
14156 ac_header_dirent=no
14157 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14158   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14159 echo "$as_me:14159: checking for $ac_hdr that defines DIR" >&5
14160 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14161 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14162   echo $ECHO_N "(cached) $ECHO_C" >&6
14163 else
14164   cat >conftest.$ac_ext <<_ACEOF
14165 #line 14165 "configure"
14166 #include "confdefs.h"
14167 #include <sys/types.h>
14168 #include <$ac_hdr>
14169
14170 int
14171 main ()
14172 {
14173 if ((DIR *) 0)
14174 return 0;
14175   ;
14176   return 0;
14177 }
14178 _ACEOF
14179 rm -f conftest.$ac_objext
14180 if { (eval echo "$as_me:14180: \"$ac_compile\"") >&5
14181   (eval $ac_compile) 2>&5
14182   ac_status=$?
14183   echo "$as_me:14183: \$? = $ac_status" >&5
14184   (exit $ac_status); } &&
14185          { ac_try='test -s conftest.$ac_objext'
14186   { (eval echo "$as_me:14186: \"$ac_try\"") >&5
14187   (eval $ac_try) 2>&5
14188   ac_status=$?
14189   echo "$as_me:14189: \$? = $ac_status" >&5
14190   (exit $ac_status); }; }; then
14191   eval "$as_ac_Header=yes"
14192 else
14193   echo "$as_me: failed program was:" >&5
14194 cat conftest.$ac_ext >&5
14195 eval "$as_ac_Header=no"
14196 fi
14197 rm -f conftest.$ac_objext conftest.$ac_ext
14198 fi
14199 echo "$as_me:14199: result: `eval echo '${'$as_ac_Header'}'`" >&5
14200 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14201 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14202   cat >>confdefs.h <<EOF
14203 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14204 EOF
14205
14206 ac_header_dirent=$ac_hdr; break
14207 fi
14208
14209 done
14210 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14211 if test $ac_header_dirent = dirent.h; then
14212   echo "$as_me:14212: checking for opendir in -ldir" >&5
14213 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14214 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14215   echo $ECHO_N "(cached) $ECHO_C" >&6
14216 else
14217   ac_check_lib_save_LIBS=$LIBS
14218 LIBS="-ldir  $LIBS"
14219 cat >conftest.$ac_ext <<_ACEOF
14220 #line 14220 "configure"
14221 #include "confdefs.h"
14222
14223 /* Override any gcc2 internal prototype to avoid an error.  */
14224 #ifdef __cplusplus
14225 extern "C"
14226 #endif
14227 /* We use char because int might match the return type of a gcc2
14228    builtin and then its argument prototype would still apply.  */
14229 char opendir ();
14230 int
14231 main ()
14232 {
14233 opendir ();
14234   ;
14235   return 0;
14236 }
14237 _ACEOF
14238 rm -f conftest.$ac_objext conftest$ac_exeext
14239 if { (eval echo "$as_me:14239: \"$ac_link\"") >&5
14240   (eval $ac_link) 2>&5
14241   ac_status=$?
14242   echo "$as_me:14242: \$? = $ac_status" >&5
14243   (exit $ac_status); } &&
14244          { ac_try='test -s conftest$ac_exeext'
14245   { (eval echo "$as_me:14245: \"$ac_try\"") >&5
14246   (eval $ac_try) 2>&5
14247   ac_status=$?
14248   echo "$as_me:14248: \$? = $ac_status" >&5
14249   (exit $ac_status); }; }; then
14250   ac_cv_lib_dir_opendir=yes
14251 else
14252   echo "$as_me: failed program was:" >&5
14253 cat conftest.$ac_ext >&5
14254 ac_cv_lib_dir_opendir=no
14255 fi
14256 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14257 LIBS=$ac_check_lib_save_LIBS
14258 fi
14259 echo "$as_me:14259: result: $ac_cv_lib_dir_opendir" >&5
14260 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14261 if test $ac_cv_lib_dir_opendir = yes; then
14262   LIBS="$LIBS -ldir"
14263 fi
14264
14265 else
14266   echo "$as_me:14266: checking for opendir in -lx" >&5
14267 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14268 if test "${ac_cv_lib_x_opendir+set}" = set; then
14269   echo $ECHO_N "(cached) $ECHO_C" >&6
14270 else
14271   ac_check_lib_save_LIBS=$LIBS
14272 LIBS="-lx  $LIBS"
14273 cat >conftest.$ac_ext <<_ACEOF
14274 #line 14274 "configure"
14275 #include "confdefs.h"
14276
14277 /* Override any gcc2 internal prototype to avoid an error.  */
14278 #ifdef __cplusplus
14279 extern "C"
14280 #endif
14281 /* We use char because int might match the return type of a gcc2
14282    builtin and then its argument prototype would still apply.  */
14283 char opendir ();
14284 int
14285 main ()
14286 {
14287 opendir ();
14288   ;
14289   return 0;
14290 }
14291 _ACEOF
14292 rm -f conftest.$ac_objext conftest$ac_exeext
14293 if { (eval echo "$as_me:14293: \"$ac_link\"") >&5
14294   (eval $ac_link) 2>&5
14295   ac_status=$?
14296   echo "$as_me:14296: \$? = $ac_status" >&5
14297   (exit $ac_status); } &&
14298          { ac_try='test -s conftest$ac_exeext'
14299   { (eval echo "$as_me:14299: \"$ac_try\"") >&5
14300   (eval $ac_try) 2>&5
14301   ac_status=$?
14302   echo "$as_me:14302: \$? = $ac_status" >&5
14303   (exit $ac_status); }; }; then
14304   ac_cv_lib_x_opendir=yes
14305 else
14306   echo "$as_me: failed program was:" >&5
14307 cat conftest.$ac_ext >&5
14308 ac_cv_lib_x_opendir=no
14309 fi
14310 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14311 LIBS=$ac_check_lib_save_LIBS
14312 fi
14313 echo "$as_me:14313: result: $ac_cv_lib_x_opendir" >&5
14314 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14315 if test $ac_cv_lib_x_opendir = yes; then
14316   LIBS="$LIBS -lx"
14317 fi
14318
14319 fi
14320
14321 echo "$as_me:14321: checking whether time.h and sys/time.h may both be included" >&5
14322 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14323 if test "${ac_cv_header_time+set}" = set; then
14324   echo $ECHO_N "(cached) $ECHO_C" >&6
14325 else
14326   cat >conftest.$ac_ext <<_ACEOF
14327 #line 14327 "configure"
14328 #include "confdefs.h"
14329 #include <sys/types.h>
14330 #include <sys/time.h>
14331 #include <time.h>
14332
14333 int
14334 main ()
14335 {
14336 if ((struct tm *) 0)
14337 return 0;
14338   ;
14339   return 0;
14340 }
14341 _ACEOF
14342 rm -f conftest.$ac_objext
14343 if { (eval echo "$as_me:14343: \"$ac_compile\"") >&5
14344   (eval $ac_compile) 2>&5
14345   ac_status=$?
14346   echo "$as_me:14346: \$? = $ac_status" >&5
14347   (exit $ac_status); } &&
14348          { ac_try='test -s conftest.$ac_objext'
14349   { (eval echo "$as_me:14349: \"$ac_try\"") >&5
14350   (eval $ac_try) 2>&5
14351   ac_status=$?
14352   echo "$as_me:14352: \$? = $ac_status" >&5
14353   (exit $ac_status); }; }; then
14354   ac_cv_header_time=yes
14355 else
14356   echo "$as_me: failed program was:" >&5
14357 cat conftest.$ac_ext >&5
14358 ac_cv_header_time=no
14359 fi
14360 rm -f conftest.$ac_objext conftest.$ac_ext
14361 fi
14362 echo "$as_me:14362: result: $ac_cv_header_time" >&5
14363 echo "${ECHO_T}$ac_cv_header_time" >&6
14364 if test $ac_cv_header_time = yes; then
14365
14366 cat >>confdefs.h <<\EOF
14367 #define TIME_WITH_SYS_TIME 1
14368 EOF
14369
14370 fi
14371
14372 cf_regex_func=no
14373
14374 cf_regex_libs="regex re"
14375 case $host_os in #(vi
14376 mingw*)
14377         cf_regex_libs="gnurx $cf_regex_libs"
14378         ;;
14379 esac
14380
14381 echo "$as_me:14381: checking for regcomp" >&5
14382 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14383 if test "${ac_cv_func_regcomp+set}" = set; then
14384   echo $ECHO_N "(cached) $ECHO_C" >&6
14385 else
14386   cat >conftest.$ac_ext <<_ACEOF
14387 #line 14387 "configure"
14388 #include "confdefs.h"
14389 /* System header to define __stub macros and hopefully few prototypes,
14390     which can conflict with char regcomp (); below.  */
14391 #include <assert.h>
14392 /* Override any gcc2 internal prototype to avoid an error.  */
14393 #ifdef __cplusplus
14394 extern "C"
14395 #endif
14396 /* We use char because int might match the return type of a gcc2
14397    builtin and then its argument prototype would still apply.  */
14398 char regcomp ();
14399 char (*f) ();
14400
14401 int
14402 main ()
14403 {
14404 /* The GNU C library defines this for functions which it implements
14405     to always fail with ENOSYS.  Some functions are actually named
14406     something starting with __ and the normal name is an alias.  */
14407 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14408 choke me
14409 #else
14410 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14411 #endif
14412
14413   ;
14414   return 0;
14415 }
14416 _ACEOF
14417 rm -f conftest.$ac_objext conftest$ac_exeext
14418 if { (eval echo "$as_me:14418: \"$ac_link\"") >&5
14419   (eval $ac_link) 2>&5
14420   ac_status=$?
14421   echo "$as_me:14421: \$? = $ac_status" >&5
14422   (exit $ac_status); } &&
14423          { ac_try='test -s conftest$ac_exeext'
14424   { (eval echo "$as_me:14424: \"$ac_try\"") >&5
14425   (eval $ac_try) 2>&5
14426   ac_status=$?
14427   echo "$as_me:14427: \$? = $ac_status" >&5
14428   (exit $ac_status); }; }; then
14429   ac_cv_func_regcomp=yes
14430 else
14431   echo "$as_me: failed program was:" >&5
14432 cat conftest.$ac_ext >&5
14433 ac_cv_func_regcomp=no
14434 fi
14435 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14436 fi
14437 echo "$as_me:14437: result: $ac_cv_func_regcomp" >&5
14438 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14439 if test $ac_cv_func_regcomp = yes; then
14440   cf_regex_func=regcomp
14441 else
14442
14443         for cf_regex_lib in $cf_regex_libs
14444         do
14445                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14446 echo "$as_me:14446: checking for regcomp in -l$cf_regex_lib" >&5
14447 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14448 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14449   echo $ECHO_N "(cached) $ECHO_C" >&6
14450 else
14451   ac_check_lib_save_LIBS=$LIBS
14452 LIBS="-l$cf_regex_lib  $LIBS"
14453 cat >conftest.$ac_ext <<_ACEOF
14454 #line 14454 "configure"
14455 #include "confdefs.h"
14456
14457 /* Override any gcc2 internal prototype to avoid an error.  */
14458 #ifdef __cplusplus
14459 extern "C"
14460 #endif
14461 /* We use char because int might match the return type of a gcc2
14462    builtin and then its argument prototype would still apply.  */
14463 char regcomp ();
14464 int
14465 main ()
14466 {
14467 regcomp ();
14468   ;
14469   return 0;
14470 }
14471 _ACEOF
14472 rm -f conftest.$ac_objext conftest$ac_exeext
14473 if { (eval echo "$as_me:14473: \"$ac_link\"") >&5
14474   (eval $ac_link) 2>&5
14475   ac_status=$?
14476   echo "$as_me:14476: \$? = $ac_status" >&5
14477   (exit $ac_status); } &&
14478          { ac_try='test -s conftest$ac_exeext'
14479   { (eval echo "$as_me:14479: \"$ac_try\"") >&5
14480   (eval $ac_try) 2>&5
14481   ac_status=$?
14482   echo "$as_me:14482: \$? = $ac_status" >&5
14483   (exit $ac_status); }; }; then
14484   eval "$as_ac_Lib=yes"
14485 else
14486   echo "$as_me: failed program was:" >&5
14487 cat conftest.$ac_ext >&5
14488 eval "$as_ac_Lib=no"
14489 fi
14490 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14491 LIBS=$ac_check_lib_save_LIBS
14492 fi
14493 echo "$as_me:14493: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14494 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14495 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14496
14497 cf_add_libs="-l$cf_regex_lib"
14498 # Filter out duplicates - this happens with badly-designed ".pc" files...
14499 for cf_add_1lib in $LIBS
14500 do
14501         for cf_add_2lib in $cf_add_libs
14502         do
14503                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14504                 then
14505                         cf_add_1lib=
14506                         break
14507                 fi
14508         done
14509         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14510 done
14511 LIBS="$cf_add_libs"
14512
14513                                 cf_regex_func=regcomp
14514                                 break
14515 fi
14516
14517         done
14518
14519 fi
14520
14521 if test "$cf_regex_func" = no ; then
14522         echo "$as_me:14522: checking for compile" >&5
14523 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14524 if test "${ac_cv_func_compile+set}" = set; then
14525   echo $ECHO_N "(cached) $ECHO_C" >&6
14526 else
14527   cat >conftest.$ac_ext <<_ACEOF
14528 #line 14528 "configure"
14529 #include "confdefs.h"
14530 /* System header to define __stub macros and hopefully few prototypes,
14531     which can conflict with char compile (); below.  */
14532 #include <assert.h>
14533 /* Override any gcc2 internal prototype to avoid an error.  */
14534 #ifdef __cplusplus
14535 extern "C"
14536 #endif
14537 /* We use char because int might match the return type of a gcc2
14538    builtin and then its argument prototype would still apply.  */
14539 char compile ();
14540 char (*f) ();
14541
14542 int
14543 main ()
14544 {
14545 /* The GNU C library defines this for functions which it implements
14546     to always fail with ENOSYS.  Some functions are actually named
14547     something starting with __ and the normal name is an alias.  */
14548 #if defined (__stub_compile) || defined (__stub___compile)
14549 choke me
14550 #else
14551 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14552 #endif
14553
14554   ;
14555   return 0;
14556 }
14557 _ACEOF
14558 rm -f conftest.$ac_objext conftest$ac_exeext
14559 if { (eval echo "$as_me:14559: \"$ac_link\"") >&5
14560   (eval $ac_link) 2>&5
14561   ac_status=$?
14562   echo "$as_me:14562: \$? = $ac_status" >&5
14563   (exit $ac_status); } &&
14564          { ac_try='test -s conftest$ac_exeext'
14565   { (eval echo "$as_me:14565: \"$ac_try\"") >&5
14566   (eval $ac_try) 2>&5
14567   ac_status=$?
14568   echo "$as_me:14568: \$? = $ac_status" >&5
14569   (exit $ac_status); }; }; then
14570   ac_cv_func_compile=yes
14571 else
14572   echo "$as_me: failed program was:" >&5
14573 cat conftest.$ac_ext >&5
14574 ac_cv_func_compile=no
14575 fi
14576 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14577 fi
14578 echo "$as_me:14578: result: $ac_cv_func_compile" >&5
14579 echo "${ECHO_T}$ac_cv_func_compile" >&6
14580 if test $ac_cv_func_compile = yes; then
14581   cf_regex_func=compile
14582 else
14583
14584                 echo "$as_me:14584: checking for compile in -lgen" >&5
14585 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14586 if test "${ac_cv_lib_gen_compile+set}" = set; then
14587   echo $ECHO_N "(cached) $ECHO_C" >&6
14588 else
14589   ac_check_lib_save_LIBS=$LIBS
14590 LIBS="-lgen  $LIBS"
14591 cat >conftest.$ac_ext <<_ACEOF
14592 #line 14592 "configure"
14593 #include "confdefs.h"
14594
14595 /* Override any gcc2 internal prototype to avoid an error.  */
14596 #ifdef __cplusplus
14597 extern "C"
14598 #endif
14599 /* We use char because int might match the return type of a gcc2
14600    builtin and then its argument prototype would still apply.  */
14601 char compile ();
14602 int
14603 main ()
14604 {
14605 compile ();
14606   ;
14607   return 0;
14608 }
14609 _ACEOF
14610 rm -f conftest.$ac_objext conftest$ac_exeext
14611 if { (eval echo "$as_me:14611: \"$ac_link\"") >&5
14612   (eval $ac_link) 2>&5
14613   ac_status=$?
14614   echo "$as_me:14614: \$? = $ac_status" >&5
14615   (exit $ac_status); } &&
14616          { ac_try='test -s conftest$ac_exeext'
14617   { (eval echo "$as_me:14617: \"$ac_try\"") >&5
14618   (eval $ac_try) 2>&5
14619   ac_status=$?
14620   echo "$as_me:14620: \$? = $ac_status" >&5
14621   (exit $ac_status); }; }; then
14622   ac_cv_lib_gen_compile=yes
14623 else
14624   echo "$as_me: failed program was:" >&5
14625 cat conftest.$ac_ext >&5
14626 ac_cv_lib_gen_compile=no
14627 fi
14628 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14629 LIBS=$ac_check_lib_save_LIBS
14630 fi
14631 echo "$as_me:14631: result: $ac_cv_lib_gen_compile" >&5
14632 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14633 if test $ac_cv_lib_gen_compile = yes; then
14634
14635 cf_add_libs="-lgen"
14636 # Filter out duplicates - this happens with badly-designed ".pc" files...
14637 for cf_add_1lib in $LIBS
14638 do
14639         for cf_add_2lib in $cf_add_libs
14640         do
14641                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14642                 then
14643                         cf_add_1lib=
14644                         break
14645                 fi
14646         done
14647         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14648 done
14649 LIBS="$cf_add_libs"
14650
14651                                 cf_regex_func=compile
14652 fi
14653
14654 fi
14655
14656 fi
14657
14658 if test "$cf_regex_func" = no ; then
14659         { echo "$as_me:14659: WARNING: cannot find regular expression library" >&5
14660 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14661 fi
14662
14663 echo "$as_me:14663: checking for regular-expression headers" >&5
14664 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14665 if test "${cf_cv_regex_hdrs+set}" = set; then
14666   echo $ECHO_N "(cached) $ECHO_C" >&6
14667 else
14668
14669 cf_cv_regex_hdrs=no
14670 case $cf_regex_func in #(vi
14671 compile) #(vi
14672         for cf_regex_hdr in regexp.h regexpr.h
14673         do
14674                 cat >conftest.$ac_ext <<_ACEOF
14675 #line 14675 "configure"
14676 #include "confdefs.h"
14677 #include <$cf_regex_hdr>
14678 int
14679 main ()
14680 {
14681
14682                         char *p = compile("", "", "", 0);
14683                         int x = step("", "");
14684
14685   ;
14686   return 0;
14687 }
14688 _ACEOF
14689 rm -f conftest.$ac_objext conftest$ac_exeext
14690 if { (eval echo "$as_me:14690: \"$ac_link\"") >&5
14691   (eval $ac_link) 2>&5
14692   ac_status=$?
14693   echo "$as_me:14693: \$? = $ac_status" >&5
14694   (exit $ac_status); } &&
14695          { ac_try='test -s conftest$ac_exeext'
14696   { (eval echo "$as_me:14696: \"$ac_try\"") >&5
14697   (eval $ac_try) 2>&5
14698   ac_status=$?
14699   echo "$as_me:14699: \$? = $ac_status" >&5
14700   (exit $ac_status); }; }; then
14701
14702                         cf_cv_regex_hdrs=$cf_regex_hdr
14703                         break
14704
14705 else
14706   echo "$as_me: failed program was:" >&5
14707 cat conftest.$ac_ext >&5
14708 fi
14709 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14710         done
14711         ;;
14712 *)
14713         for cf_regex_hdr in regex.h
14714         do
14715                 cat >conftest.$ac_ext <<_ACEOF
14716 #line 14716 "configure"
14717 #include "confdefs.h"
14718 #include <sys/types.h>
14719 #include <$cf_regex_hdr>
14720 int
14721 main ()
14722 {
14723
14724                         regex_t *p;
14725                         int x = regcomp(p, "", 0);
14726                         int y = regexec(p, "", 0, 0, 0);
14727                         regfree(p);
14728
14729   ;
14730   return 0;
14731 }
14732 _ACEOF
14733 rm -f conftest.$ac_objext conftest$ac_exeext
14734 if { (eval echo "$as_me:14734: \"$ac_link\"") >&5
14735   (eval $ac_link) 2>&5
14736   ac_status=$?
14737   echo "$as_me:14737: \$? = $ac_status" >&5
14738   (exit $ac_status); } &&
14739          { ac_try='test -s conftest$ac_exeext'
14740   { (eval echo "$as_me:14740: \"$ac_try\"") >&5
14741   (eval $ac_try) 2>&5
14742   ac_status=$?
14743   echo "$as_me:14743: \$? = $ac_status" >&5
14744   (exit $ac_status); }; }; then
14745
14746                         cf_cv_regex_hdrs=$cf_regex_hdr
14747                         break
14748
14749 else
14750   echo "$as_me: failed program was:" >&5
14751 cat conftest.$ac_ext >&5
14752 fi
14753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14754         done
14755         ;;
14756 esac
14757
14758 fi
14759 echo "$as_me:14759: result: $cf_cv_regex_hdrs" >&5
14760 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14761
14762 case $cf_cv_regex_hdrs in #(vi
14763     no)        { echo "$as_me:14763: WARNING: no regular expression header found" >&5
14764 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14765     regex.h)
14766 cat >>confdefs.h <<\EOF
14767 #define HAVE_REGEX_H_FUNCS 1
14768 EOF
14769  ;; #(vi
14770     regexp.h)
14771 cat >>confdefs.h <<\EOF
14772 #define HAVE_REGEXP_H_FUNCS 1
14773 EOF
14774  ;; #(vi
14775     regexpr.h)
14776 cat >>confdefs.h <<\EOF
14777 #define HAVE_REGEXPR_H_FUNCS 1
14778 EOF
14779  ;;
14780 esac
14781
14782 for ac_header in \
14783 fcntl.h \
14784 getopt.h \
14785 limits.h \
14786 locale.h \
14787 math.h \
14788 poll.h \
14789 sys/bsdtypes.h \
14790 sys/ioctl.h \
14791 sys/param.h \
14792 sys/poll.h \
14793 sys/select.h \
14794 sys/time.h \
14795 sys/times.h \
14796 ttyent.h \
14797 unistd.h \
14798 wctype.h \
14799
14800 do
14801 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14802 echo "$as_me:14802: checking for $ac_header" >&5
14803 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14804 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14805   echo $ECHO_N "(cached) $ECHO_C" >&6
14806 else
14807   cat >conftest.$ac_ext <<_ACEOF
14808 #line 14808 "configure"
14809 #include "confdefs.h"
14810 #include <$ac_header>
14811 _ACEOF
14812 if { (eval echo "$as_me:14812: \"$ac_cpp conftest.$ac_ext\"") >&5
14813   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14814   ac_status=$?
14815   egrep -v '^ *\+' conftest.er1 >conftest.err
14816   rm -f conftest.er1
14817   cat conftest.err >&5
14818   echo "$as_me:14818: \$? = $ac_status" >&5
14819   (exit $ac_status); } >/dev/null; then
14820   if test -s conftest.err; then
14821     ac_cpp_err=$ac_c_preproc_warn_flag
14822   else
14823     ac_cpp_err=
14824   fi
14825 else
14826   ac_cpp_err=yes
14827 fi
14828 if test -z "$ac_cpp_err"; then
14829   eval "$as_ac_Header=yes"
14830 else
14831   echo "$as_me: failed program was:" >&5
14832   cat conftest.$ac_ext >&5
14833   eval "$as_ac_Header=no"
14834 fi
14835 rm -f conftest.err conftest.$ac_ext
14836 fi
14837 echo "$as_me:14837: result: `eval echo '${'$as_ac_Header'}'`" >&5
14838 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14839 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14840   cat >>confdefs.h <<EOF
14841 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14842 EOF
14843
14844 fi
14845 done
14846
14847 for ac_header in unistd.h getopt.h
14848 do
14849 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14850 echo "$as_me:14850: checking for $ac_header" >&5
14851 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14852 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14853   echo $ECHO_N "(cached) $ECHO_C" >&6
14854 else
14855   cat >conftest.$ac_ext <<_ACEOF
14856 #line 14856 "configure"
14857 #include "confdefs.h"
14858 #include <$ac_header>
14859 _ACEOF
14860 if { (eval echo "$as_me:14860: \"$ac_cpp conftest.$ac_ext\"") >&5
14861   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14862   ac_status=$?
14863   egrep -v '^ *\+' conftest.er1 >conftest.err
14864   rm -f conftest.er1
14865   cat conftest.err >&5
14866   echo "$as_me:14866: \$? = $ac_status" >&5
14867   (exit $ac_status); } >/dev/null; then
14868   if test -s conftest.err; then
14869     ac_cpp_err=$ac_c_preproc_warn_flag
14870   else
14871     ac_cpp_err=
14872   fi
14873 else
14874   ac_cpp_err=yes
14875 fi
14876 if test -z "$ac_cpp_err"; then
14877   eval "$as_ac_Header=yes"
14878 else
14879   echo "$as_me: failed program was:" >&5
14880   cat conftest.$ac_ext >&5
14881   eval "$as_ac_Header=no"
14882 fi
14883 rm -f conftest.err conftest.$ac_ext
14884 fi
14885 echo "$as_me:14885: result: `eval echo '${'$as_ac_Header'}'`" >&5
14886 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14887 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14888   cat >>confdefs.h <<EOF
14889 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14890 EOF
14891
14892 fi
14893 done
14894
14895 echo "$as_me:14895: checking for header declaring getopt variables" >&5
14896 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14897 if test "${cf_cv_getopt_header+set}" = set; then
14898   echo $ECHO_N "(cached) $ECHO_C" >&6
14899 else
14900
14901 cf_cv_getopt_header=none
14902 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14903 do
14904 cat >conftest.$ac_ext <<_ACEOF
14905 #line 14905 "configure"
14906 #include "confdefs.h"
14907
14908 #include <$cf_header>
14909 int
14910 main ()
14911 {
14912 int x = optind; char *y = optarg
14913   ;
14914   return 0;
14915 }
14916 _ACEOF
14917 rm -f conftest.$ac_objext
14918 if { (eval echo "$as_me:14918: \"$ac_compile\"") >&5
14919   (eval $ac_compile) 2>&5
14920   ac_status=$?
14921   echo "$as_me:14921: \$? = $ac_status" >&5
14922   (exit $ac_status); } &&
14923          { ac_try='test -s conftest.$ac_objext'
14924   { (eval echo "$as_me:14924: \"$ac_try\"") >&5
14925   (eval $ac_try) 2>&5
14926   ac_status=$?
14927   echo "$as_me:14927: \$? = $ac_status" >&5
14928   (exit $ac_status); }; }; then
14929   cf_cv_getopt_header=$cf_header
14930  break
14931 else
14932   echo "$as_me: failed program was:" >&5
14933 cat conftest.$ac_ext >&5
14934 fi
14935 rm -f conftest.$ac_objext conftest.$ac_ext
14936 done
14937
14938 fi
14939 echo "$as_me:14939: result: $cf_cv_getopt_header" >&5
14940 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14941 if test $cf_cv_getopt_header != none ; then
14942
14943 cat >>confdefs.h <<\EOF
14944 #define HAVE_GETOPT_HEADER 1
14945 EOF
14946
14947 fi
14948
14949 # check for ISC (this may also define _POSIX_SOURCE)
14950 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14951 if test "x$ISC" = xyes ; then
14952
14953 echo "$as_me:14953: checking for main in -lcposix" >&5
14954 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14955 if test "${ac_cv_lib_cposix_main+set}" = set; then
14956   echo $ECHO_N "(cached) $ECHO_C" >&6
14957 else
14958   ac_check_lib_save_LIBS=$LIBS
14959 LIBS="-lcposix  $LIBS"
14960 cat >conftest.$ac_ext <<_ACEOF
14961 #line 14961 "configure"
14962 #include "confdefs.h"
14963
14964 int
14965 main ()
14966 {
14967 main ();
14968   ;
14969   return 0;
14970 }
14971 _ACEOF
14972 rm -f conftest.$ac_objext conftest$ac_exeext
14973 if { (eval echo "$as_me:14973: \"$ac_link\"") >&5
14974   (eval $ac_link) 2>&5
14975   ac_status=$?
14976   echo "$as_me:14976: \$? = $ac_status" >&5
14977   (exit $ac_status); } &&
14978          { ac_try='test -s conftest$ac_exeext'
14979   { (eval echo "$as_me:14979: \"$ac_try\"") >&5
14980   (eval $ac_try) 2>&5
14981   ac_status=$?
14982   echo "$as_me:14982: \$? = $ac_status" >&5
14983   (exit $ac_status); }; }; then
14984   ac_cv_lib_cposix_main=yes
14985 else
14986   echo "$as_me: failed program was:" >&5
14987 cat conftest.$ac_ext >&5
14988 ac_cv_lib_cposix_main=no
14989 fi
14990 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14991 LIBS=$ac_check_lib_save_LIBS
14992 fi
14993 echo "$as_me:14993: result: $ac_cv_lib_cposix_main" >&5
14994 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14995 if test $ac_cv_lib_cposix_main = yes; then
14996   cat >>confdefs.h <<EOF
14997 #define HAVE_LIBCPOSIX 1
14998 EOF
14999
15000   LIBS="-lcposix $LIBS"
15001
15002 fi
15003
15004         echo "$as_me:15004: checking for bzero in -linet" >&5
15005 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15006 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15007   echo $ECHO_N "(cached) $ECHO_C" >&6
15008 else
15009   ac_check_lib_save_LIBS=$LIBS
15010 LIBS="-linet  $LIBS"
15011 cat >conftest.$ac_ext <<_ACEOF
15012 #line 15012 "configure"
15013 #include "confdefs.h"
15014
15015 /* Override any gcc2 internal prototype to avoid an error.  */
15016 #ifdef __cplusplus
15017 extern "C"
15018 #endif
15019 /* We use char because int might match the return type of a gcc2
15020    builtin and then its argument prototype would still apply.  */
15021 char bzero ();
15022 int
15023 main ()
15024 {
15025 bzero ();
15026   ;
15027   return 0;
15028 }
15029 _ACEOF
15030 rm -f conftest.$ac_objext conftest$ac_exeext
15031 if { (eval echo "$as_me:15031: \"$ac_link\"") >&5
15032   (eval $ac_link) 2>&5
15033   ac_status=$?
15034   echo "$as_me:15034: \$? = $ac_status" >&5
15035   (exit $ac_status); } &&
15036          { ac_try='test -s conftest$ac_exeext'
15037   { (eval echo "$as_me:15037: \"$ac_try\"") >&5
15038   (eval $ac_try) 2>&5
15039   ac_status=$?
15040   echo "$as_me:15040: \$? = $ac_status" >&5
15041   (exit $ac_status); }; }; then
15042   ac_cv_lib_inet_bzero=yes
15043 else
15044   echo "$as_me: failed program was:" >&5
15045 cat conftest.$ac_ext >&5
15046 ac_cv_lib_inet_bzero=no
15047 fi
15048 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15049 LIBS=$ac_check_lib_save_LIBS
15050 fi
15051 echo "$as_me:15051: result: $ac_cv_lib_inet_bzero" >&5
15052 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15053 if test $ac_cv_lib_inet_bzero = yes; then
15054
15055 cf_add_libs="-linet"
15056 # Filter out duplicates - this happens with badly-designed ".pc" files...
15057 for cf_add_1lib in $LIBS
15058 do
15059         for cf_add_2lib in $cf_add_libs
15060         do
15061                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15062                 then
15063                         cf_add_1lib=
15064                         break
15065                 fi
15066         done
15067         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15068 done
15069 LIBS="$cf_add_libs"
15070
15071 fi
15072 fi
15073
15074 echo "$as_me:15074: checking if sys/time.h works with sys/select.h" >&5
15075 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15076 if test "${cf_cv_sys_time_select+set}" = set; then
15077   echo $ECHO_N "(cached) $ECHO_C" >&6
15078 else
15079
15080 cat >conftest.$ac_ext <<_ACEOF
15081 #line 15081 "configure"
15082 #include "confdefs.h"
15083
15084 #include <sys/types.h>
15085 #ifdef HAVE_SYS_TIME_H
15086 #include <sys/time.h>
15087 #endif
15088 #ifdef HAVE_SYS_SELECT_H
15089 #include <sys/select.h>
15090 #endif
15091
15092 int
15093 main ()
15094 {
15095
15096   ;
15097   return 0;
15098 }
15099 _ACEOF
15100 rm -f conftest.$ac_objext
15101 if { (eval echo "$as_me:15101: \"$ac_compile\"") >&5
15102   (eval $ac_compile) 2>&5
15103   ac_status=$?
15104   echo "$as_me:15104: \$? = $ac_status" >&5
15105   (exit $ac_status); } &&
15106          { ac_try='test -s conftest.$ac_objext'
15107   { (eval echo "$as_me:15107: \"$ac_try\"") >&5
15108   (eval $ac_try) 2>&5
15109   ac_status=$?
15110   echo "$as_me:15110: \$? = $ac_status" >&5
15111   (exit $ac_status); }; }; then
15112   cf_cv_sys_time_select=yes
15113 else
15114   echo "$as_me: failed program was:" >&5
15115 cat conftest.$ac_ext >&5
15116 cf_cv_sys_time_select=no
15117 fi
15118 rm -f conftest.$ac_objext conftest.$ac_ext
15119
15120 fi
15121
15122 echo "$as_me:15122: result: $cf_cv_sys_time_select" >&5
15123 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15124 test "$cf_cv_sys_time_select" = yes &&
15125 cat >>confdefs.h <<\EOF
15126 #define HAVE_SYS_TIME_SELECT 1
15127 EOF
15128
15129 ###     checks for compiler characteristics
15130 ac_ext=c
15131 ac_cpp='$CPP $CPPFLAGS'
15132 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15133 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15134 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15135 ac_main_return=return
15136
15137 echo "$as_me:15137: checking for an ANSI C-conforming const" >&5
15138 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15139 if test "${ac_cv_c_const+set}" = set; then
15140   echo $ECHO_N "(cached) $ECHO_C" >&6
15141 else
15142   cat >conftest.$ac_ext <<_ACEOF
15143 #line 15143 "configure"
15144 #include "confdefs.h"
15145
15146 int
15147 main ()
15148 {
15149 /* FIXME: Include the comments suggested by Paul. */
15150 #ifndef __cplusplus
15151   /* Ultrix mips cc rejects this.  */
15152   typedef int charset[2];
15153   const charset x;
15154   /* SunOS 4.1.1 cc rejects this.  */
15155   char const *const *ccp;
15156   char **p;
15157   /* NEC SVR4.0.2 mips cc rejects this.  */
15158   struct point {int x, y;};
15159   static struct point const zero = {0,0};
15160   /* AIX XL C 1.02.0.0 rejects this.
15161      It does not let you subtract one const X* pointer from another in
15162      an arm of an if-expression whose if-part is not a constant
15163      expression */
15164   const char *g = "string";
15165   ccp = &g + (g ? g-g : 0);
15166   /* HPUX 7.0 cc rejects these. */
15167   ++ccp;
15168   p = (char**) ccp;
15169   ccp = (char const *const *) p;
15170   { /* SCO 3.2v4 cc rejects this.  */
15171     char *t;
15172     char const *s = 0 ? (char *) 0 : (char const *) 0;
15173
15174     *t++ = 0;
15175   }
15176   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15177     int x[] = {25, 17};
15178     const int *foo = &x[0];
15179     ++foo;
15180   }
15181   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15182     typedef const int *iptr;
15183     iptr p = 0;
15184     ++p;
15185   }
15186   { /* AIX XL C 1.02.0.0 rejects this saying
15187        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15188     struct s { int j; const int *ap[3]; };
15189     struct s *b; b->j = 5;
15190   }
15191   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15192     const int foo = 10;
15193   }
15194 #endif
15195
15196   ;
15197   return 0;
15198 }
15199 _ACEOF
15200 rm -f conftest.$ac_objext
15201 if { (eval echo "$as_me:15201: \"$ac_compile\"") >&5
15202   (eval $ac_compile) 2>&5
15203   ac_status=$?
15204   echo "$as_me:15204: \$? = $ac_status" >&5
15205   (exit $ac_status); } &&
15206          { ac_try='test -s conftest.$ac_objext'
15207   { (eval echo "$as_me:15207: \"$ac_try\"") >&5
15208   (eval $ac_try) 2>&5
15209   ac_status=$?
15210   echo "$as_me:15210: \$? = $ac_status" >&5
15211   (exit $ac_status); }; }; then
15212   ac_cv_c_const=yes
15213 else
15214   echo "$as_me: failed program was:" >&5
15215 cat conftest.$ac_ext >&5
15216 ac_cv_c_const=no
15217 fi
15218 rm -f conftest.$ac_objext conftest.$ac_ext
15219 fi
15220 echo "$as_me:15220: result: $ac_cv_c_const" >&5
15221 echo "${ECHO_T}$ac_cv_c_const" >&6
15222 if test $ac_cv_c_const = no; then
15223
15224 cat >>confdefs.h <<\EOF
15225 #define const
15226 EOF
15227
15228 fi
15229
15230 echo "$as_me:15230: checking for inline" >&5
15231 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15232 if test "${ac_cv_c_inline+set}" = set; then
15233   echo $ECHO_N "(cached) $ECHO_C" >&6
15234 else
15235   ac_cv_c_inline=no
15236 for ac_kw in inline __inline__ __inline; do
15237   cat >conftest.$ac_ext <<_ACEOF
15238 #line 15238 "configure"
15239 #include "confdefs.h"
15240 #ifndef __cplusplus
15241 static $ac_kw int static_foo () {return 0; }
15242 $ac_kw int foo () {return 0; }
15243 #endif
15244
15245 _ACEOF
15246 rm -f conftest.$ac_objext
15247 if { (eval echo "$as_me:15247: \"$ac_compile\"") >&5
15248   (eval $ac_compile) 2>&5
15249   ac_status=$?
15250   echo "$as_me:15250: \$? = $ac_status" >&5
15251   (exit $ac_status); } &&
15252          { ac_try='test -s conftest.$ac_objext'
15253   { (eval echo "$as_me:15253: \"$ac_try\"") >&5
15254   (eval $ac_try) 2>&5
15255   ac_status=$?
15256   echo "$as_me:15256: \$? = $ac_status" >&5
15257   (exit $ac_status); }; }; then
15258   ac_cv_c_inline=$ac_kw; break
15259 else
15260   echo "$as_me: failed program was:" >&5
15261 cat conftest.$ac_ext >&5
15262 fi
15263 rm -f conftest.$ac_objext conftest.$ac_ext
15264 done
15265
15266 fi
15267 echo "$as_me:15267: result: $ac_cv_c_inline" >&5
15268 echo "${ECHO_T}$ac_cv_c_inline" >&6
15269 case $ac_cv_c_inline in
15270   inline | yes) ;;
15271   no)
15272 cat >>confdefs.h <<\EOF
15273 #define inline
15274 EOF
15275  ;;
15276   *)  cat >>confdefs.h <<EOF
15277 #define inline $ac_cv_c_inline
15278 EOF
15279  ;;
15280 esac
15281
15282 NCURSES_INLINE=
15283 if test "$ac_cv_c_inline" != no ; then
15284   NCURSES_INLINE=inline
15285   if test "$INTEL_COMPILER" = yes
15286   then
15287     :
15288   elif test "$CLANG_COMPILER" = yes
15289   then
15290     :
15291   elif test "$GCC" = yes
15292   then
15293     echo "$as_me:15293: checking if $CC supports options to tune inlining" >&5
15294 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15295 if test "${cf_cv_gcc_inline+set}" = set; then
15296   echo $ECHO_N "(cached) $ECHO_C" >&6
15297 else
15298
15299       cf_save_CFLAGS=$CFLAGS
15300       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15301       cat >conftest.$ac_ext <<_ACEOF
15302 #line 15302 "configure"
15303 #include "confdefs.h"
15304 inline int foo(void) { return 1; }
15305 int
15306 main ()
15307 {
15308 ${cf_cv_main_return:-return} foo()
15309   ;
15310   return 0;
15311 }
15312 _ACEOF
15313 rm -f conftest.$ac_objext
15314 if { (eval echo "$as_me:15314: \"$ac_compile\"") >&5
15315   (eval $ac_compile) 2>&5
15316   ac_status=$?
15317   echo "$as_me:15317: \$? = $ac_status" >&5
15318   (exit $ac_status); } &&
15319          { ac_try='test -s conftest.$ac_objext'
15320   { (eval echo "$as_me:15320: \"$ac_try\"") >&5
15321   (eval $ac_try) 2>&5
15322   ac_status=$?
15323   echo "$as_me:15323: \$? = $ac_status" >&5
15324   (exit $ac_status); }; }; then
15325   cf_cv_gcc_inline=yes
15326 else
15327   echo "$as_me: failed program was:" >&5
15328 cat conftest.$ac_ext >&5
15329 cf_cv_gcc_inline=no
15330 fi
15331 rm -f conftest.$ac_objext conftest.$ac_ext
15332       CFLAGS=$cf_save_CFLAGS
15333
15334 fi
15335 echo "$as_me:15335: result: $cf_cv_gcc_inline" >&5
15336 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15337     if test "$cf_cv_gcc_inline" = yes ; then
15338
15339 cf_fix_cppflags=no
15340 cf_new_cflags=
15341 cf_new_cppflags=
15342 cf_new_extra_cppflags=
15343
15344 for cf_add_cflags in --param max-inline-insns-single=1200
15345 do
15346 case $cf_fix_cppflags in
15347 no)
15348         case $cf_add_cflags in #(vi
15349         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15350                 case $cf_add_cflags in
15351                 -D*)
15352                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15353
15354                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15355                                 && test -z "${cf_tst_cflags}" \
15356                                 && cf_fix_cppflags=yes
15357
15358                         if test $cf_fix_cppflags = yes ; then
15359                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15360                                 continue
15361                         elif test "${cf_tst_cflags}" = "\"'" ; then
15362                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15363                                 continue
15364                         fi
15365                         ;;
15366                 esac
15367                 case "$CPPFLAGS" in
15368                 *$cf_add_cflags) #(vi
15369                         ;;
15370                 *) #(vi
15371                         case $cf_add_cflags in #(vi
15372                         -D*)
15373                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15374
15375 CPPFLAGS=`echo "$CPPFLAGS" | \
15376         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15377                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15378
15379                                 ;;
15380                         esac
15381                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15382                         ;;
15383                 esac
15384                 ;;
15385         *)
15386                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15387                 ;;
15388         esac
15389         ;;
15390 yes)
15391         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15392
15393         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15394
15395         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15396                 && test -z "${cf_tst_cflags}" \
15397                 && cf_fix_cppflags=no
15398         ;;
15399 esac
15400 done
15401
15402 if test -n "$cf_new_cflags" ; then
15403
15404         CFLAGS="$CFLAGS $cf_new_cflags"
15405 fi
15406
15407 if test -n "$cf_new_cppflags" ; then
15408
15409         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15410 fi
15411
15412 if test -n "$cf_new_extra_cppflags" ; then
15413
15414         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15415 fi
15416
15417     fi
15418   fi
15419 fi
15420
15421 echo "$as_me:15421: checking for signal global datatype" >&5
15422 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15423 if test "${cf_cv_sig_atomic_t+set}" = set; then
15424   echo $ECHO_N "(cached) $ECHO_C" >&6
15425 else
15426
15427         for cf_type in \
15428                 "volatile sig_atomic_t" \
15429                 "sig_atomic_t" \
15430                 "int"
15431         do
15432         cat >conftest.$ac_ext <<_ACEOF
15433 #line 15433 "configure"
15434 #include "confdefs.h"
15435
15436 #include <sys/types.h>
15437 #include <signal.h>
15438 #include <stdio.h>
15439
15440 extern $cf_type x;
15441 $cf_type x;
15442 static void handler(int sig)
15443 {
15444         x = 5;
15445 }
15446 int
15447 main ()
15448 {
15449 signal(SIGINT, handler);
15450                  x = 1
15451   ;
15452   return 0;
15453 }
15454 _ACEOF
15455 rm -f conftest.$ac_objext
15456 if { (eval echo "$as_me:15456: \"$ac_compile\"") >&5
15457   (eval $ac_compile) 2>&5
15458   ac_status=$?
15459   echo "$as_me:15459: \$? = $ac_status" >&5
15460   (exit $ac_status); } &&
15461          { ac_try='test -s conftest.$ac_objext'
15462   { (eval echo "$as_me:15462: \"$ac_try\"") >&5
15463   (eval $ac_try) 2>&5
15464   ac_status=$?
15465   echo "$as_me:15465: \$? = $ac_status" >&5
15466   (exit $ac_status); }; }; then
15467   cf_cv_sig_atomic_t=$cf_type
15468 else
15469   echo "$as_me: failed program was:" >&5
15470 cat conftest.$ac_ext >&5
15471 cf_cv_sig_atomic_t=no
15472 fi
15473 rm -f conftest.$ac_objext conftest.$ac_ext
15474                 test "$cf_cv_sig_atomic_t" != no && break
15475         done
15476
15477 fi
15478
15479 echo "$as_me:15479: result: $cf_cv_sig_atomic_t" >&5
15480 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15481 test "$cf_cv_sig_atomic_t" != no &&
15482 cat >>confdefs.h <<EOF
15483 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15484 EOF
15485
15486 if test $NCURSES_CHTYPE = auto ; then
15487
15488 echo "$as_me:15488: checking for type of chtype" >&5
15489 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15490 if test "${cf_cv_typeof_chtype+set}" = set; then
15491   echo $ECHO_N "(cached) $ECHO_C" >&6
15492 else
15493
15494                 if test "$cross_compiling" = yes; then
15495   cf_cv_typeof_chtype=long
15496 else
15497   cat >conftest.$ac_ext <<_ACEOF
15498 #line 15498 "configure"
15499 #include "confdefs.h"
15500
15501 #define WANT_BITS 31
15502 #include <stdio.h>
15503 int main()
15504 {
15505         FILE *fp = fopen("cf_test.out", "w");
15506         if (fp != 0) {
15507                 char *result = "long";
15508                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15509                         int n;
15510                         unsigned int x, y;
15511                         for (n = 0; n < WANT_BITS; n++) {
15512                                 x = (1 << n);
15513                                 y = (x >> n);
15514                                 if (y != 1 || x == 0) {
15515                                         x = 0;
15516                                         break;
15517                                 }
15518                         }
15519                         /*
15520                          * If x is nonzero, an int is big enough for the bits
15521                          * that we want.
15522                          */
15523                         result = (x != 0) ? "int" : "long";
15524                 }
15525                 fputs(result, fp);
15526                 fclose(fp);
15527         }
15528         ${cf_cv_main_return:-return}(0);
15529 }
15530
15531 _ACEOF
15532 rm -f conftest$ac_exeext
15533 if { (eval echo "$as_me:15533: \"$ac_link\"") >&5
15534   (eval $ac_link) 2>&5
15535   ac_status=$?
15536   echo "$as_me:15536: \$? = $ac_status" >&5
15537   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15538   { (eval echo "$as_me:15538: \"$ac_try\"") >&5
15539   (eval $ac_try) 2>&5
15540   ac_status=$?
15541   echo "$as_me:15541: \$? = $ac_status" >&5
15542   (exit $ac_status); }; }; then
15543   cf_cv_typeof_chtype=`cat cf_test.out`
15544 else
15545   echo "$as_me: program exited with status $ac_status" >&5
15546 echo "$as_me: failed program was:" >&5
15547 cat conftest.$ac_ext >&5
15548 cf_cv_typeof_chtype=long
15549 fi
15550 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15551 fi
15552                 rm -f cf_test.out
15553
15554 fi
15555
15556 echo "$as_me:15556: result: $cf_cv_typeof_chtype" >&5
15557 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15558
15559 cat >>confdefs.h <<EOF
15560 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15561 EOF
15562
15563 else
15564         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15565 fi
15566 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15567
15568 echo "$as_me:15568: checking if unsigned literals are legal" >&5
15569 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15570 if test "${cf_cv_unsigned_literals+set}" = set; then
15571   echo $ECHO_N "(cached) $ECHO_C" >&6
15572 else
15573
15574         cat >conftest.$ac_ext <<_ACEOF
15575 #line 15575 "configure"
15576 #include "confdefs.h"
15577
15578 int
15579 main ()
15580 {
15581 long x = 1L + 1UL + 1U + 1
15582   ;
15583   return 0;
15584 }
15585 _ACEOF
15586 rm -f conftest.$ac_objext
15587 if { (eval echo "$as_me:15587: \"$ac_compile\"") >&5
15588   (eval $ac_compile) 2>&5
15589   ac_status=$?
15590   echo "$as_me:15590: \$? = $ac_status" >&5
15591   (exit $ac_status); } &&
15592          { ac_try='test -s conftest.$ac_objext'
15593   { (eval echo "$as_me:15593: \"$ac_try\"") >&5
15594   (eval $ac_try) 2>&5
15595   ac_status=$?
15596   echo "$as_me:15596: \$? = $ac_status" >&5
15597   (exit $ac_status); }; }; then
15598   cf_cv_unsigned_literals=yes
15599 else
15600   echo "$as_me: failed program was:" >&5
15601 cat conftest.$ac_ext >&5
15602 cf_cv_unsigned_literals=no
15603 fi
15604 rm -f conftest.$ac_objext conftest.$ac_ext
15605
15606 fi
15607
15608 echo "$as_me:15608: result: $cf_cv_unsigned_literals" >&5
15609 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15610
15611 cf_cv_1UL="1"
15612 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15613 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15614
15615 if test $NCURSES_MMASK_T = auto ; then
15616         cf_cv_typeof_mmask_t=long
15617 else
15618         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15619 fi
15620 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15621
15622 ###     Checks for external-data
15623
15624 echo "$as_me:15624: checking if external errno is declared" >&5
15625 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15626 if test "${cf_cv_dcl_errno+set}" = set; then
15627   echo $ECHO_N "(cached) $ECHO_C" >&6
15628 else
15629
15630     cat >conftest.$ac_ext <<_ACEOF
15631 #line 15631 "configure"
15632 #include "confdefs.h"
15633
15634 #ifdef HAVE_STDLIB_H
15635 #include <stdlib.h>
15636 #endif
15637 #include <stdio.h>
15638 #include <sys/types.h>
15639 #include <errno.h>
15640 int
15641 main ()
15642 {
15643 int x = (int) errno
15644   ;
15645   return 0;
15646 }
15647 _ACEOF
15648 rm -f conftest.$ac_objext
15649 if { (eval echo "$as_me:15649: \"$ac_compile\"") >&5
15650   (eval $ac_compile) 2>&5
15651   ac_status=$?
15652   echo "$as_me:15652: \$? = $ac_status" >&5
15653   (exit $ac_status); } &&
15654          { ac_try='test -s conftest.$ac_objext'
15655   { (eval echo "$as_me:15655: \"$ac_try\"") >&5
15656   (eval $ac_try) 2>&5
15657   ac_status=$?
15658   echo "$as_me:15658: \$? = $ac_status" >&5
15659   (exit $ac_status); }; }; then
15660   cf_cv_dcl_errno=yes
15661 else
15662   echo "$as_me: failed program was:" >&5
15663 cat conftest.$ac_ext >&5
15664 cf_cv_dcl_errno=no
15665 fi
15666 rm -f conftest.$ac_objext conftest.$ac_ext
15667
15668 fi
15669 echo "$as_me:15669: result: $cf_cv_dcl_errno" >&5
15670 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15671
15672 if test "$cf_cv_dcl_errno" = no ; then
15673
15674 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15675
15676     cat >>confdefs.h <<EOF
15677 #define $cf_result 1
15678 EOF
15679
15680 fi
15681
15682 # It's possible (for near-UNIX clones) that the data doesn't exist
15683
15684 echo "$as_me:15684: checking if external errno exists" >&5
15685 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15686 if test "${cf_cv_have_errno+set}" = set; then
15687   echo $ECHO_N "(cached) $ECHO_C" >&6
15688 else
15689
15690     cat >conftest.$ac_ext <<_ACEOF
15691 #line 15691 "configure"
15692 #include "confdefs.h"
15693
15694 #undef errno
15695 extern int errno;
15696
15697 int
15698 main ()
15699 {
15700 errno = 2
15701   ;
15702   return 0;
15703 }
15704 _ACEOF
15705 rm -f conftest.$ac_objext conftest$ac_exeext
15706 if { (eval echo "$as_me:15706: \"$ac_link\"") >&5
15707   (eval $ac_link) 2>&5
15708   ac_status=$?
15709   echo "$as_me:15709: \$? = $ac_status" >&5
15710   (exit $ac_status); } &&
15711          { ac_try='test -s conftest$ac_exeext'
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   cf_cv_have_errno=yes
15718 else
15719   echo "$as_me: failed program was:" >&5
15720 cat conftest.$ac_ext >&5
15721 cf_cv_have_errno=no
15722 fi
15723 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15724
15725 fi
15726 echo "$as_me:15726: result: $cf_cv_have_errno" >&5
15727 echo "${ECHO_T}$cf_cv_have_errno" >&6
15728
15729 if test "$cf_cv_have_errno" = yes ; then
15730
15731 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15732
15733     cat >>confdefs.h <<EOF
15734 #define $cf_result 1
15735 EOF
15736
15737 fi
15738
15739 echo "$as_me:15739: checking if data-only library module links" >&5
15740 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15741 if test "${cf_cv_link_dataonly+set}" = set; then
15742   echo $ECHO_N "(cached) $ECHO_C" >&6
15743 else
15744
15745         rm -f conftest.a
15746         cat >conftest.$ac_ext <<EOF
15747 #line 15747 "configure"
15748 int     testdata[3] = { 123, 456, 789 };
15749 EOF
15750         if { (eval echo "$as_me:15750: \"$ac_compile\"") >&5
15751   (eval $ac_compile) 2>&5
15752   ac_status=$?
15753   echo "$as_me:15753: \$? = $ac_status" >&5
15754   (exit $ac_status); } ; then
15755                 mv conftest.o data.o && \
15756                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15757         fi
15758         rm -f conftest.$ac_ext data.o
15759         cat >conftest.$ac_ext <<EOF
15760 #line 15760 "configure"
15761 int     testfunc()
15762 {
15763 #if defined(NeXT)
15764         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15765 #else
15766         extern int testdata[3];
15767         return testdata[0] == 123
15768            &&  testdata[1] == 456
15769            &&  testdata[2] == 789;
15770 #endif
15771 }
15772 EOF
15773         if { (eval echo "$as_me:15773: \"$ac_compile\"") >&5
15774   (eval $ac_compile) 2>&5
15775   ac_status=$?
15776   echo "$as_me:15776: \$? = $ac_status" >&5
15777   (exit $ac_status); }; then
15778                 mv conftest.o func.o && \
15779                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15780         fi
15781         rm -f conftest.$ac_ext func.o
15782         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15783         cf_saveLIBS="$LIBS"
15784         LIBS="conftest.a $LIBS"
15785         if test "$cross_compiling" = yes; then
15786   cf_cv_link_dataonly=unknown
15787 else
15788   cat >conftest.$ac_ext <<_ACEOF
15789 #line 15789 "configure"
15790 #include "confdefs.h"
15791
15792         int main()
15793         {
15794                 extern int testfunc();
15795                 ${cf_cv_main_return:-return} (!testfunc());
15796         }
15797
15798 _ACEOF
15799 rm -f conftest$ac_exeext
15800 if { (eval echo "$as_me:15800: \"$ac_link\"") >&5
15801   (eval $ac_link) 2>&5
15802   ac_status=$?
15803   echo "$as_me:15803: \$? = $ac_status" >&5
15804   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15805   { (eval echo "$as_me:15805: \"$ac_try\"") >&5
15806   (eval $ac_try) 2>&5
15807   ac_status=$?
15808   echo "$as_me:15808: \$? = $ac_status" >&5
15809   (exit $ac_status); }; }; then
15810   cf_cv_link_dataonly=yes
15811 else
15812   echo "$as_me: program exited with status $ac_status" >&5
15813 echo "$as_me: failed program was:" >&5
15814 cat conftest.$ac_ext >&5
15815 cf_cv_link_dataonly=no
15816 fi
15817 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15818 fi
15819         LIBS="$cf_saveLIBS"
15820
15821 fi
15822
15823 echo "$as_me:15823: result: $cf_cv_link_dataonly" >&5
15824 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15825
15826 if test "$cf_cv_link_dataonly" = no ; then
15827
15828 cat >>confdefs.h <<\EOF
15829 #define BROKEN_LINKER 1
15830 EOF
15831
15832         BROKEN_LINKER=1
15833 fi
15834
15835 ###     Checks for library functions.
15836
15837 for ac_func in \
15838 getcwd \
15839 getegid \
15840 geteuid \
15841 getttynam \
15842 issetugid \
15843 poll \
15844 putenv \
15845 remove \
15846 select \
15847 setbuf \
15848 setbuffer \
15849 setenv \
15850 setvbuf \
15851 sigaction \
15852 sigvec \
15853 strdup \
15854 strstr \
15855 tcgetpgrp \
15856 times \
15857 vsnprintf \
15858
15859 do
15860 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15861 echo "$as_me:15861: checking for $ac_func" >&5
15862 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15863 if eval "test \"\${$as_ac_var+set}\" = set"; then
15864   echo $ECHO_N "(cached) $ECHO_C" >&6
15865 else
15866   cat >conftest.$ac_ext <<_ACEOF
15867 #line 15867 "configure"
15868 #include "confdefs.h"
15869 /* System header to define __stub macros and hopefully few prototypes,
15870     which can conflict with char $ac_func (); below.  */
15871 #include <assert.h>
15872 /* Override any gcc2 internal prototype to avoid an error.  */
15873 #ifdef __cplusplus
15874 extern "C"
15875 #endif
15876 /* We use char because int might match the return type of a gcc2
15877    builtin and then its argument prototype would still apply.  */
15878 char $ac_func ();
15879 char (*f) ();
15880
15881 int
15882 main ()
15883 {
15884 /* The GNU C library defines this for functions which it implements
15885     to always fail with ENOSYS.  Some functions are actually named
15886     something starting with __ and the normal name is an alias.  */
15887 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15888 choke me
15889 #else
15890 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15891 #endif
15892
15893   ;
15894   return 0;
15895 }
15896 _ACEOF
15897 rm -f conftest.$ac_objext conftest$ac_exeext
15898 if { (eval echo "$as_me:15898: \"$ac_link\"") >&5
15899   (eval $ac_link) 2>&5
15900   ac_status=$?
15901   echo "$as_me:15901: \$? = $ac_status" >&5
15902   (exit $ac_status); } &&
15903          { ac_try='test -s conftest$ac_exeext'
15904   { (eval echo "$as_me:15904: \"$ac_try\"") >&5
15905   (eval $ac_try) 2>&5
15906   ac_status=$?
15907   echo "$as_me:15907: \$? = $ac_status" >&5
15908   (exit $ac_status); }; }; then
15909   eval "$as_ac_var=yes"
15910 else
15911   echo "$as_me: failed program was:" >&5
15912 cat conftest.$ac_ext >&5
15913 eval "$as_ac_var=no"
15914 fi
15915 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15916 fi
15917 echo "$as_me:15917: result: `eval echo '${'$as_ac_var'}'`" >&5
15918 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15919 if test `eval echo '${'$as_ac_var'}'` = yes; then
15920   cat >>confdefs.h <<EOF
15921 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15922 EOF
15923
15924 fi
15925 done
15926
15927 if test "x$with_getcap" = "xyes" ; then
15928
15929 echo "$as_me:15929: checking for terminal-capability database functions" >&5
15930 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15931 if test "${cf_cv_cgetent+set}" = set; then
15932   echo $ECHO_N "(cached) $ECHO_C" >&6
15933 else
15934
15935 cat >conftest.$ac_ext <<_ACEOF
15936 #line 15936 "configure"
15937 #include "confdefs.h"
15938
15939 #include <stdlib.h>
15940 int
15941 main ()
15942 {
15943
15944         char temp[128];
15945         char *buf = temp;
15946         char *db_array = temp;
15947         cgetent(&buf, &db_array, "vt100");
15948         cgetcap(buf, "tc", '=');
15949         cgetmatch(buf, "tc");
15950
15951   ;
15952   return 0;
15953 }
15954 _ACEOF
15955 rm -f conftest.$ac_objext conftest$ac_exeext
15956 if { (eval echo "$as_me:15956: \"$ac_link\"") >&5
15957   (eval $ac_link) 2>&5
15958   ac_status=$?
15959   echo "$as_me:15959: \$? = $ac_status" >&5
15960   (exit $ac_status); } &&
15961          { ac_try='test -s conftest$ac_exeext'
15962   { (eval echo "$as_me:15962: \"$ac_try\"") >&5
15963   (eval $ac_try) 2>&5
15964   ac_status=$?
15965   echo "$as_me:15965: \$? = $ac_status" >&5
15966   (exit $ac_status); }; }; then
15967   cf_cv_cgetent=yes
15968 else
15969   echo "$as_me: failed program was:" >&5
15970 cat conftest.$ac_ext >&5
15971 cf_cv_cgetent=no
15972 fi
15973 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15974
15975 fi
15976 echo "$as_me:15976: result: $cf_cv_cgetent" >&5
15977 echo "${ECHO_T}$cf_cv_cgetent" >&6
15978
15979 if test "$cf_cv_cgetent" = yes
15980 then
15981
15982 cat >>confdefs.h <<\EOF
15983 #define HAVE_BSD_CGETENT 1
15984 EOF
15985
15986 echo "$as_me:15986: checking if cgetent uses const parameter" >&5
15987 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15988 if test "${cf_cv_cgetent_const+set}" = set; then
15989   echo $ECHO_N "(cached) $ECHO_C" >&6
15990 else
15991
15992 cat >conftest.$ac_ext <<_ACEOF
15993 #line 15993 "configure"
15994 #include "confdefs.h"
15995
15996 #include <stdlib.h>
15997 int
15998 main ()
15999 {
16000
16001         char temp[128];
16002         char *buf = temp;
16003 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16004         const char *db_array = temp;
16005         cgetent(&buf, &db_array, "vt100");
16006 #endif
16007         cgetcap(buf, "tc", '=');
16008         cgetmatch(buf, "tc");
16009
16010   ;
16011   return 0;
16012 }
16013 _ACEOF
16014 rm -f conftest.$ac_objext conftest$ac_exeext
16015 if { (eval echo "$as_me:16015: \"$ac_link\"") >&5
16016   (eval $ac_link) 2>&5
16017   ac_status=$?
16018   echo "$as_me:16018: \$? = $ac_status" >&5
16019   (exit $ac_status); } &&
16020          { ac_try='test -s conftest$ac_exeext'
16021   { (eval echo "$as_me:16021: \"$ac_try\"") >&5
16022   (eval $ac_try) 2>&5
16023   ac_status=$?
16024   echo "$as_me:16024: \$? = $ac_status" >&5
16025   (exit $ac_status); }; }; then
16026   cf_cv_cgetent_const=yes
16027 else
16028   echo "$as_me: failed program was:" >&5
16029 cat conftest.$ac_ext >&5
16030 cf_cv_cgetent_const=no
16031 fi
16032 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16033
16034 fi
16035 echo "$as_me:16035: result: $cf_cv_cgetent_const" >&5
16036 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16037         if test "$cf_cv_cgetent_const" = yes
16038         then
16039
16040 cat >>confdefs.h <<EOF
16041 #define CGETENT_CONST const
16042 EOF
16043
16044         fi
16045 fi
16046
16047 fi
16048
16049 echo "$as_me:16049: checking for isascii" >&5
16050 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16051 if test "${cf_cv_have_isascii+set}" = set; then
16052   echo $ECHO_N "(cached) $ECHO_C" >&6
16053 else
16054
16055         cat >conftest.$ac_ext <<_ACEOF
16056 #line 16056 "configure"
16057 #include "confdefs.h"
16058 #include <ctype.h>
16059 int
16060 main ()
16061 {
16062 int x = isascii(' ')
16063   ;
16064   return 0;
16065 }
16066 _ACEOF
16067 rm -f conftest.$ac_objext conftest$ac_exeext
16068 if { (eval echo "$as_me:16068: \"$ac_link\"") >&5
16069   (eval $ac_link) 2>&5
16070   ac_status=$?
16071   echo "$as_me:16071: \$? = $ac_status" >&5
16072   (exit $ac_status); } &&
16073          { ac_try='test -s conftest$ac_exeext'
16074   { (eval echo "$as_me:16074: \"$ac_try\"") >&5
16075   (eval $ac_try) 2>&5
16076   ac_status=$?
16077   echo "$as_me:16077: \$? = $ac_status" >&5
16078   (exit $ac_status); }; }; then
16079   cf_cv_have_isascii=yes
16080 else
16081   echo "$as_me: failed program was:" >&5
16082 cat conftest.$ac_ext >&5
16083 cf_cv_have_isascii=no
16084 fi
16085 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16086
16087 fi
16088 echo "$as_me:16088: result: $cf_cv_have_isascii" >&5
16089 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16090 test "$cf_cv_have_isascii" = yes &&
16091 cat >>confdefs.h <<\EOF
16092 #define HAVE_ISASCII 1
16093 EOF
16094
16095 if test "$ac_cv_func_sigaction" = yes; then
16096 echo "$as_me:16096: checking whether sigaction needs _POSIX_SOURCE" >&5
16097 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16098 cat >conftest.$ac_ext <<_ACEOF
16099 #line 16099 "configure"
16100 #include "confdefs.h"
16101
16102 #include <sys/types.h>
16103 #include <signal.h>
16104 int
16105 main ()
16106 {
16107 struct sigaction act
16108   ;
16109   return 0;
16110 }
16111 _ACEOF
16112 rm -f conftest.$ac_objext
16113 if { (eval echo "$as_me:16113: \"$ac_compile\"") >&5
16114   (eval $ac_compile) 2>&5
16115   ac_status=$?
16116   echo "$as_me:16116: \$? = $ac_status" >&5
16117   (exit $ac_status); } &&
16118          { ac_try='test -s conftest.$ac_objext'
16119   { (eval echo "$as_me:16119: \"$ac_try\"") >&5
16120   (eval $ac_try) 2>&5
16121   ac_status=$?
16122   echo "$as_me:16122: \$? = $ac_status" >&5
16123   (exit $ac_status); }; }; then
16124   sigact_bad=no
16125 else
16126   echo "$as_me: failed program was:" >&5
16127 cat conftest.$ac_ext >&5
16128
16129 cat >conftest.$ac_ext <<_ACEOF
16130 #line 16130 "configure"
16131 #include "confdefs.h"
16132
16133 #define _POSIX_SOURCE
16134 #include <sys/types.h>
16135 #include <signal.h>
16136 int
16137 main ()
16138 {
16139 struct sigaction act
16140   ;
16141   return 0;
16142 }
16143 _ACEOF
16144 rm -f conftest.$ac_objext
16145 if { (eval echo "$as_me:16145: \"$ac_compile\"") >&5
16146   (eval $ac_compile) 2>&5
16147   ac_status=$?
16148   echo "$as_me:16148: \$? = $ac_status" >&5
16149   (exit $ac_status); } &&
16150          { ac_try='test -s conftest.$ac_objext'
16151   { (eval echo "$as_me:16151: \"$ac_try\"") >&5
16152   (eval $ac_try) 2>&5
16153   ac_status=$?
16154   echo "$as_me:16154: \$? = $ac_status" >&5
16155   (exit $ac_status); }; }; then
16156   sigact_bad=yes
16157
16158 cat >>confdefs.h <<\EOF
16159 #define _POSIX_SOURCE 1
16160 EOF
16161
16162 else
16163   echo "$as_me: failed program was:" >&5
16164 cat conftest.$ac_ext >&5
16165 sigact_bad=unknown
16166 fi
16167 rm -f conftest.$ac_objext conftest.$ac_ext
16168 fi
16169 rm -f conftest.$ac_objext conftest.$ac_ext
16170 echo "$as_me:16170: result: $sigact_bad" >&5
16171 echo "${ECHO_T}$sigact_bad" >&6
16172 fi
16173
16174 echo "$as_me:16174: checking if nanosleep really works" >&5
16175 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16176 if test "${cf_cv_func_nanosleep+set}" = set; then
16177   echo $ECHO_N "(cached) $ECHO_C" >&6
16178 else
16179
16180 if test "$cross_compiling" = yes; then
16181   cf_cv_func_nanosleep=unknown
16182 else
16183   cat >conftest.$ac_ext <<_ACEOF
16184 #line 16184 "configure"
16185 #include "confdefs.h"
16186
16187 #include <stdio.h>
16188 #include <errno.h>
16189 #include <time.h>
16190
16191 #ifdef HAVE_SYS_TIME_H
16192 #include <sys/time.h>
16193 #endif
16194
16195 int main() {
16196         struct timespec ts1, ts2;
16197         int code;
16198         ts1.tv_sec  = 0;
16199         ts1.tv_nsec = 750000000;
16200         ts2.tv_sec  = 0;
16201         ts2.tv_nsec = 0;
16202         errno = 0;
16203         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16204         ${cf_cv_main_return:-return}(code != 0);
16205 }
16206
16207 _ACEOF
16208 rm -f conftest$ac_exeext
16209 if { (eval echo "$as_me:16209: \"$ac_link\"") >&5
16210   (eval $ac_link) 2>&5
16211   ac_status=$?
16212   echo "$as_me:16212: \$? = $ac_status" >&5
16213   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16214   { (eval echo "$as_me:16214: \"$ac_try\"") >&5
16215   (eval $ac_try) 2>&5
16216   ac_status=$?
16217   echo "$as_me:16217: \$? = $ac_status" >&5
16218   (exit $ac_status); }; }; then
16219   cf_cv_func_nanosleep=yes
16220 else
16221   echo "$as_me: program exited with status $ac_status" >&5
16222 echo "$as_me: failed program was:" >&5
16223 cat conftest.$ac_ext >&5
16224 cf_cv_func_nanosleep=no
16225 fi
16226 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16227 fi
16228 fi
16229 echo "$as_me:16229: result: $cf_cv_func_nanosleep" >&5
16230 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16231
16232 test "$cf_cv_func_nanosleep" = "yes" &&
16233 cat >>confdefs.h <<\EOF
16234 #define HAVE_NANOSLEEP 1
16235 EOF
16236
16237 for ac_header in \
16238 termio.h \
16239 termios.h \
16240 unistd.h \
16241
16242 do
16243 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16244 echo "$as_me:16244: checking for $ac_header" >&5
16245 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16246 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16247   echo $ECHO_N "(cached) $ECHO_C" >&6
16248 else
16249   cat >conftest.$ac_ext <<_ACEOF
16250 #line 16250 "configure"
16251 #include "confdefs.h"
16252 #include <$ac_header>
16253 _ACEOF
16254 if { (eval echo "$as_me:16254: \"$ac_cpp conftest.$ac_ext\"") >&5
16255   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16256   ac_status=$?
16257   egrep -v '^ *\+' conftest.er1 >conftest.err
16258   rm -f conftest.er1
16259   cat conftest.err >&5
16260   echo "$as_me:16260: \$? = $ac_status" >&5
16261   (exit $ac_status); } >/dev/null; then
16262   if test -s conftest.err; then
16263     ac_cpp_err=$ac_c_preproc_warn_flag
16264   else
16265     ac_cpp_err=
16266   fi
16267 else
16268   ac_cpp_err=yes
16269 fi
16270 if test -z "$ac_cpp_err"; then
16271   eval "$as_ac_Header=yes"
16272 else
16273   echo "$as_me: failed program was:" >&5
16274   cat conftest.$ac_ext >&5
16275   eval "$as_ac_Header=no"
16276 fi
16277 rm -f conftest.err conftest.$ac_ext
16278 fi
16279 echo "$as_me:16279: result: `eval echo '${'$as_ac_Header'}'`" >&5
16280 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16281 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16282   cat >>confdefs.h <<EOF
16283 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16284 EOF
16285
16286 fi
16287 done
16288
16289 if test "$ISC" = yes ; then
16290
16291 for ac_header in sys/termio.h
16292 do
16293 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16294 echo "$as_me:16294: checking for $ac_header" >&5
16295 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16296 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16297   echo $ECHO_N "(cached) $ECHO_C" >&6
16298 else
16299   cat >conftest.$ac_ext <<_ACEOF
16300 #line 16300 "configure"
16301 #include "confdefs.h"
16302 #include <$ac_header>
16303 _ACEOF
16304 if { (eval echo "$as_me:16304: \"$ac_cpp conftest.$ac_ext\"") >&5
16305   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16306   ac_status=$?
16307   egrep -v '^ *\+' conftest.er1 >conftest.err
16308   rm -f conftest.er1
16309   cat conftest.err >&5
16310   echo "$as_me:16310: \$? = $ac_status" >&5
16311   (exit $ac_status); } >/dev/null; then
16312   if test -s conftest.err; then
16313     ac_cpp_err=$ac_c_preproc_warn_flag
16314   else
16315     ac_cpp_err=
16316   fi
16317 else
16318   ac_cpp_err=yes
16319 fi
16320 if test -z "$ac_cpp_err"; then
16321   eval "$as_ac_Header=yes"
16322 else
16323   echo "$as_me: failed program was:" >&5
16324   cat conftest.$ac_ext >&5
16325   eval "$as_ac_Header=no"
16326 fi
16327 rm -f conftest.err conftest.$ac_ext
16328 fi
16329 echo "$as_me:16329: result: `eval echo '${'$as_ac_Header'}'`" >&5
16330 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16331 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16332   cat >>confdefs.h <<EOF
16333 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16334 EOF
16335
16336 fi
16337 done
16338
16339 fi
16340 if test "$ac_cv_header_termios_h" = yes ; then
16341         case "$CFLAGS $CPPFLAGS" in
16342         *-D_POSIX_SOURCE*)
16343                 termios_bad=dunno ;;
16344         *)      termios_bad=maybe ;;
16345         esac
16346         if test "$termios_bad" = maybe ; then
16347         echo "$as_me:16347: checking whether termios.h needs _POSIX_SOURCE" >&5
16348 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16349         cat >conftest.$ac_ext <<_ACEOF
16350 #line 16350 "configure"
16351 #include "confdefs.h"
16352 #include <termios.h>
16353 int
16354 main ()
16355 {
16356 struct termios foo; int x = foo.c_iflag
16357   ;
16358   return 0;
16359 }
16360 _ACEOF
16361 rm -f conftest.$ac_objext
16362 if { (eval echo "$as_me:16362: \"$ac_compile\"") >&5
16363   (eval $ac_compile) 2>&5
16364   ac_status=$?
16365   echo "$as_me:16365: \$? = $ac_status" >&5
16366   (exit $ac_status); } &&
16367          { ac_try='test -s conftest.$ac_objext'
16368   { (eval echo "$as_me:16368: \"$ac_try\"") >&5
16369   (eval $ac_try) 2>&5
16370   ac_status=$?
16371   echo "$as_me:16371: \$? = $ac_status" >&5
16372   (exit $ac_status); }; }; then
16373   termios_bad=no
16374 else
16375   echo "$as_me: failed program was:" >&5
16376 cat conftest.$ac_ext >&5
16377
16378                 cat >conftest.$ac_ext <<_ACEOF
16379 #line 16379 "configure"
16380 #include "confdefs.h"
16381
16382 #define _POSIX_SOURCE
16383 #include <termios.h>
16384 int
16385 main ()
16386 {
16387 struct termios foo; int x = foo.c_iflag
16388   ;
16389   return 0;
16390 }
16391 _ACEOF
16392 rm -f conftest.$ac_objext
16393 if { (eval echo "$as_me:16393: \"$ac_compile\"") >&5
16394   (eval $ac_compile) 2>&5
16395   ac_status=$?
16396   echo "$as_me:16396: \$? = $ac_status" >&5
16397   (exit $ac_status); } &&
16398          { ac_try='test -s conftest.$ac_objext'
16399   { (eval echo "$as_me:16399: \"$ac_try\"") >&5
16400   (eval $ac_try) 2>&5
16401   ac_status=$?
16402   echo "$as_me:16402: \$? = $ac_status" >&5
16403   (exit $ac_status); }; }; then
16404   termios_bad=unknown
16405 else
16406   echo "$as_me: failed program was:" >&5
16407 cat conftest.$ac_ext >&5
16408 termios_bad=yes
16409 cat >>confdefs.h <<\EOF
16410 #define _POSIX_SOURCE 1
16411 EOF
16412
16413 fi
16414 rm -f conftest.$ac_objext conftest.$ac_ext
16415
16416 fi
16417 rm -f conftest.$ac_objext conftest.$ac_ext
16418         echo "$as_me:16418: result: $termios_bad" >&5
16419 echo "${ECHO_T}$termios_bad" >&6
16420         fi
16421 fi
16422
16423 echo "$as_me:16423: checking for tcgetattr" >&5
16424 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16425 if test "${cf_cv_have_tcgetattr+set}" = set; then
16426   echo $ECHO_N "(cached) $ECHO_C" >&6
16427 else
16428
16429 cat >conftest.$ac_ext <<_ACEOF
16430 #line 16430 "configure"
16431 #include "confdefs.h"
16432
16433 #include <sys/types.h>
16434 #ifdef HAVE_UNISTD_H
16435 #include <unistd.h>
16436 #endif
16437 #ifdef HAVE_TERMIOS_H
16438 #include <termios.h>
16439 #define TTY struct termios
16440 #else
16441 #ifdef HAVE_TERMIO_H
16442 #include <termio.h>
16443 #define TTY struct termio
16444 #endif
16445 #endif
16446
16447 int
16448 main ()
16449 {
16450
16451 TTY foo;
16452 tcgetattr(1, &foo);
16453   ;
16454   return 0;
16455 }
16456 _ACEOF
16457 rm -f conftest.$ac_objext conftest$ac_exeext
16458 if { (eval echo "$as_me:16458: \"$ac_link\"") >&5
16459   (eval $ac_link) 2>&5
16460   ac_status=$?
16461   echo "$as_me:16461: \$? = $ac_status" >&5
16462   (exit $ac_status); } &&
16463          { ac_try='test -s conftest$ac_exeext'
16464   { (eval echo "$as_me:16464: \"$ac_try\"") >&5
16465   (eval $ac_try) 2>&5
16466   ac_status=$?
16467   echo "$as_me:16467: \$? = $ac_status" >&5
16468   (exit $ac_status); }; }; then
16469   cf_cv_have_tcgetattr=yes
16470 else
16471   echo "$as_me: failed program was:" >&5
16472 cat conftest.$ac_ext >&5
16473 cf_cv_have_tcgetattr=no
16474 fi
16475 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16476 fi
16477 echo "$as_me:16477: result: $cf_cv_have_tcgetattr" >&5
16478 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16479 test "$cf_cv_have_tcgetattr" = yes &&
16480 cat >>confdefs.h <<\EOF
16481 #define HAVE_TCGETATTR 1
16482 EOF
16483
16484 echo "$as_me:16484: checking for vsscanf function or workaround" >&5
16485 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16486 if test "${cf_cv_func_vsscanf+set}" = set; then
16487   echo $ECHO_N "(cached) $ECHO_C" >&6
16488 else
16489
16490 cat >conftest.$ac_ext <<_ACEOF
16491 #line 16491 "configure"
16492 #include "confdefs.h"
16493
16494 #include <stdarg.h>
16495 #include <stdio.h>
16496 int
16497 main ()
16498 {
16499
16500         va_list ap;
16501         vsscanf("from", "%d", ap)
16502   ;
16503   return 0;
16504 }
16505 _ACEOF
16506 rm -f conftest.$ac_objext conftest$ac_exeext
16507 if { (eval echo "$as_me:16507: \"$ac_link\"") >&5
16508   (eval $ac_link) 2>&5
16509   ac_status=$?
16510   echo "$as_me:16510: \$? = $ac_status" >&5
16511   (exit $ac_status); } &&
16512          { ac_try='test -s conftest$ac_exeext'
16513   { (eval echo "$as_me:16513: \"$ac_try\"") >&5
16514   (eval $ac_try) 2>&5
16515   ac_status=$?
16516   echo "$as_me:16516: \$? = $ac_status" >&5
16517   (exit $ac_status); }; }; then
16518   cf_cv_func_vsscanf=vsscanf
16519 else
16520   echo "$as_me: failed program was:" >&5
16521 cat conftest.$ac_ext >&5
16522
16523 cat >conftest.$ac_ext <<_ACEOF
16524 #line 16524 "configure"
16525 #include "confdefs.h"
16526
16527 #include <stdarg.h>
16528 #include <stdio.h>
16529 int
16530 main ()
16531 {
16532
16533     FILE strbuf;
16534     char *str = "from";
16535
16536     strbuf._flag = _IOREAD;
16537     strbuf._ptr = strbuf._base = (unsigned char *) str;
16538     strbuf._cnt = strlen(str);
16539     strbuf._file = _NFILE;
16540     return (vfscanf(&strbuf, "%d", ap))
16541   ;
16542   return 0;
16543 }
16544 _ACEOF
16545 rm -f conftest.$ac_objext conftest$ac_exeext
16546 if { (eval echo "$as_me:16546: \"$ac_link\"") >&5
16547   (eval $ac_link) 2>&5
16548   ac_status=$?
16549   echo "$as_me:16549: \$? = $ac_status" >&5
16550   (exit $ac_status); } &&
16551          { ac_try='test -s conftest$ac_exeext'
16552   { (eval echo "$as_me:16552: \"$ac_try\"") >&5
16553   (eval $ac_try) 2>&5
16554   ac_status=$?
16555   echo "$as_me:16555: \$? = $ac_status" >&5
16556   (exit $ac_status); }; }; then
16557   cf_cv_func_vsscanf=vfscanf
16558 else
16559   echo "$as_me: failed program was:" >&5
16560 cat conftest.$ac_ext >&5
16561
16562 cat >conftest.$ac_ext <<_ACEOF
16563 #line 16563 "configure"
16564 #include "confdefs.h"
16565
16566 #include <stdarg.h>
16567 #include <stdio.h>
16568 int
16569 main ()
16570 {
16571
16572     FILE strbuf;
16573     char *str = "from";
16574
16575     strbuf._flag = _IOREAD;
16576     strbuf._ptr = strbuf._base = (unsigned char *) str;
16577     strbuf._cnt = strlen(str);
16578     strbuf._file = _NFILE;
16579     return (_doscan(&strbuf, "%d", ap))
16580   ;
16581   return 0;
16582 }
16583 _ACEOF
16584 rm -f conftest.$ac_objext conftest$ac_exeext
16585 if { (eval echo "$as_me:16585: \"$ac_link\"") >&5
16586   (eval $ac_link) 2>&5
16587   ac_status=$?
16588   echo "$as_me:16588: \$? = $ac_status" >&5
16589   (exit $ac_status); } &&
16590          { ac_try='test -s conftest$ac_exeext'
16591   { (eval echo "$as_me:16591: \"$ac_try\"") >&5
16592   (eval $ac_try) 2>&5
16593   ac_status=$?
16594   echo "$as_me:16594: \$? = $ac_status" >&5
16595   (exit $ac_status); }; }; then
16596   cf_cv_func_vsscanf=_doscan
16597 else
16598   echo "$as_me: failed program was:" >&5
16599 cat conftest.$ac_ext >&5
16600
16601 cf_cv_func_vsscanf=no
16602 fi
16603 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16604 fi
16605 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16606 fi
16607 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16608 fi
16609 echo "$as_me:16609: result: $cf_cv_func_vsscanf" >&5
16610 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16611
16612 case $cf_cv_func_vsscanf in #(vi
16613 vsscanf)
16614 cat >>confdefs.h <<\EOF
16615 #define HAVE_VSSCANF 1
16616 EOF
16617 ;; #(vi
16618 vfscanf)
16619 cat >>confdefs.h <<\EOF
16620 #define HAVE_VFSCANF 1
16621 EOF
16622 ;; #(vi
16623 _doscan)
16624 cat >>confdefs.h <<\EOF
16625 #define HAVE__DOSCAN 1
16626 EOF
16627 ;;
16628 esac
16629
16630 echo "$as_me:16630: checking for working mkstemp" >&5
16631 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16632 if test "${cf_cv_func_mkstemp+set}" = set; then
16633   echo $ECHO_N "(cached) $ECHO_C" >&6
16634 else
16635
16636 rm -rf conftest*
16637 if test "$cross_compiling" = yes; then
16638   cf_cv_func_mkstemp=maybe
16639 else
16640   cat >conftest.$ac_ext <<_ACEOF
16641 #line 16641 "configure"
16642 #include "confdefs.h"
16643
16644 #include <sys/types.h>
16645 #include <stdlib.h>
16646 #include <stdio.h>
16647 #include <string.h>
16648 #include <sys/stat.h>
16649 int main()
16650 {
16651         char *tmpl = "conftestXXXXXX";
16652         char name[2][80];
16653         int n;
16654         int result = 0;
16655         int fd;
16656         struct stat sb;
16657
16658         umask(077);
16659         for (n = 0; n < 2; ++n) {
16660                 strcpy(name[n], tmpl);
16661                 if ((fd = mkstemp(name[n])) >= 0) {
16662                         if (!strcmp(name[n], tmpl)
16663                          || stat(name[n], &sb) != 0
16664                          || (sb.st_mode & S_IFMT) != S_IFREG
16665                          || (sb.st_mode & 077) != 0) {
16666                                 result = 1;
16667                         }
16668                         close(fd);
16669                 }
16670         }
16671         if (result == 0
16672          && !strcmp(name[0], name[1]))
16673                 result = 1;
16674         ${cf_cv_main_return:-return}(result);
16675 }
16676
16677 _ACEOF
16678 rm -f conftest$ac_exeext
16679 if { (eval echo "$as_me:16679: \"$ac_link\"") >&5
16680   (eval $ac_link) 2>&5
16681   ac_status=$?
16682   echo "$as_me:16682: \$? = $ac_status" >&5
16683   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16684   { (eval echo "$as_me:16684: \"$ac_try\"") >&5
16685   (eval $ac_try) 2>&5
16686   ac_status=$?
16687   echo "$as_me:16687: \$? = $ac_status" >&5
16688   (exit $ac_status); }; }; then
16689   cf_cv_func_mkstemp=yes
16690
16691 else
16692   echo "$as_me: program exited with status $ac_status" >&5
16693 echo "$as_me: failed program was:" >&5
16694 cat conftest.$ac_ext >&5
16695 cf_cv_func_mkstemp=no
16696
16697 fi
16698 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16699 fi
16700
16701 fi
16702 echo "$as_me:16702: result: $cf_cv_func_mkstemp" >&5
16703 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16704 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16705         echo "$as_me:16705: checking for mkstemp" >&5
16706 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16707 if test "${ac_cv_func_mkstemp+set}" = set; then
16708   echo $ECHO_N "(cached) $ECHO_C" >&6
16709 else
16710   cat >conftest.$ac_ext <<_ACEOF
16711 #line 16711 "configure"
16712 #include "confdefs.h"
16713 /* System header to define __stub macros and hopefully few prototypes,
16714     which can conflict with char mkstemp (); below.  */
16715 #include <assert.h>
16716 /* Override any gcc2 internal prototype to avoid an error.  */
16717 #ifdef __cplusplus
16718 extern "C"
16719 #endif
16720 /* We use char because int might match the return type of a gcc2
16721    builtin and then its argument prototype would still apply.  */
16722 char mkstemp ();
16723 char (*f) ();
16724
16725 int
16726 main ()
16727 {
16728 /* The GNU C library defines this for functions which it implements
16729     to always fail with ENOSYS.  Some functions are actually named
16730     something starting with __ and the normal name is an alias.  */
16731 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16732 choke me
16733 #else
16734 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16735 #endif
16736
16737   ;
16738   return 0;
16739 }
16740 _ACEOF
16741 rm -f conftest.$ac_objext conftest$ac_exeext
16742 if { (eval echo "$as_me:16742: \"$ac_link\"") >&5
16743   (eval $ac_link) 2>&5
16744   ac_status=$?
16745   echo "$as_me:16745: \$? = $ac_status" >&5
16746   (exit $ac_status); } &&
16747          { ac_try='test -s conftest$ac_exeext'
16748   { (eval echo "$as_me:16748: \"$ac_try\"") >&5
16749   (eval $ac_try) 2>&5
16750   ac_status=$?
16751   echo "$as_me:16751: \$? = $ac_status" >&5
16752   (exit $ac_status); }; }; then
16753   ac_cv_func_mkstemp=yes
16754 else
16755   echo "$as_me: failed program was:" >&5
16756 cat conftest.$ac_ext >&5
16757 ac_cv_func_mkstemp=no
16758 fi
16759 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16760 fi
16761 echo "$as_me:16761: result: $ac_cv_func_mkstemp" >&5
16762 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16763
16764 fi
16765 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16766
16767 cat >>confdefs.h <<\EOF
16768 #define HAVE_MKSTEMP 1
16769 EOF
16770
16771 fi
16772
16773 # setup for prototype of fallback for vsscanf()
16774
16775 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16776         HAVE_VSSCANF=1
16777 else
16778         HAVE_VSSCANF=0
16779 fi
16780
16781 if test "x$cross_compiling" = xyes ; then
16782         { echo "$as_me:16782: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16783 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16784 else
16785         echo "$as_me:16785: checking whether setvbuf arguments are reversed" >&5
16786 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16787 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16788   echo $ECHO_N "(cached) $ECHO_C" >&6
16789 else
16790   if test "$cross_compiling" = yes; then
16791   { { echo "$as_me:16791: error: cannot run test program while cross compiling" >&5
16792 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16793    { (exit 1); exit 1; }; }
16794 else
16795   cat >conftest.$ac_ext <<_ACEOF
16796 #line 16796 "configure"
16797 #include "confdefs.h"
16798 #include <stdio.h>
16799 /* If setvbuf has the reversed format, exit 0. */
16800 int
16801 main ()
16802 {
16803   /* This call has the arguments reversed.
16804      A reversed system may check and see that the address of main
16805      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16806   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16807     $ac_main_return(1);
16808   putc('\r', stdout);
16809   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16810 }
16811 _ACEOF
16812 rm -f conftest$ac_exeext
16813 if { (eval echo "$as_me:16813: \"$ac_link\"") >&5
16814   (eval $ac_link) 2>&5
16815   ac_status=$?
16816   echo "$as_me:16816: \$? = $ac_status" >&5
16817   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16818   { (eval echo "$as_me:16818: \"$ac_try\"") >&5
16819   (eval $ac_try) 2>&5
16820   ac_status=$?
16821   echo "$as_me:16821: \$? = $ac_status" >&5
16822   (exit $ac_status); }; }; then
16823   ac_cv_func_setvbuf_reversed=yes
16824 else
16825   echo "$as_me: program exited with status $ac_status" >&5
16826 echo "$as_me: failed program was:" >&5
16827 cat conftest.$ac_ext >&5
16828 ac_cv_func_setvbuf_reversed=no
16829 fi
16830 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16831 fi
16832 rm -f core core.* *.core
16833 fi
16834 echo "$as_me:16834: result: $ac_cv_func_setvbuf_reversed" >&5
16835 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16836 if test $ac_cv_func_setvbuf_reversed = yes; then
16837
16838 cat >>confdefs.h <<\EOF
16839 #define SETVBUF_REVERSED 1
16840 EOF
16841
16842 fi
16843
16844 fi
16845 echo "$as_me:16845: checking for intptr_t" >&5
16846 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16847 if test "${ac_cv_type_intptr_t+set}" = set; then
16848   echo $ECHO_N "(cached) $ECHO_C" >&6
16849 else
16850   cat >conftest.$ac_ext <<_ACEOF
16851 #line 16851 "configure"
16852 #include "confdefs.h"
16853 $ac_includes_default
16854 int
16855 main ()
16856 {
16857 if ((intptr_t *) 0)
16858   return 0;
16859 if (sizeof (intptr_t))
16860   return 0;
16861   ;
16862   return 0;
16863 }
16864 _ACEOF
16865 rm -f conftest.$ac_objext
16866 if { (eval echo "$as_me:16866: \"$ac_compile\"") >&5
16867   (eval $ac_compile) 2>&5
16868   ac_status=$?
16869   echo "$as_me:16869: \$? = $ac_status" >&5
16870   (exit $ac_status); } &&
16871          { ac_try='test -s conftest.$ac_objext'
16872   { (eval echo "$as_me:16872: \"$ac_try\"") >&5
16873   (eval $ac_try) 2>&5
16874   ac_status=$?
16875   echo "$as_me:16875: \$? = $ac_status" >&5
16876   (exit $ac_status); }; }; then
16877   ac_cv_type_intptr_t=yes
16878 else
16879   echo "$as_me: failed program was:" >&5
16880 cat conftest.$ac_ext >&5
16881 ac_cv_type_intptr_t=no
16882 fi
16883 rm -f conftest.$ac_objext conftest.$ac_ext
16884 fi
16885 echo "$as_me:16885: result: $ac_cv_type_intptr_t" >&5
16886 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16887 if test $ac_cv_type_intptr_t = yes; then
16888   :
16889 else
16890
16891 cat >>confdefs.h <<EOF
16892 #define intptr_t long
16893 EOF
16894
16895 fi
16896
16897 echo "$as_me:16897: checking for type sigaction_t" >&5
16898 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16899 if test "${cf_cv_type_sigaction+set}" = set; then
16900   echo $ECHO_N "(cached) $ECHO_C" >&6
16901 else
16902
16903         cat >conftest.$ac_ext <<_ACEOF
16904 #line 16904 "configure"
16905 #include "confdefs.h"
16906
16907 #include <signal.h>
16908 int
16909 main ()
16910 {
16911 sigaction_t x
16912   ;
16913   return 0;
16914 }
16915 _ACEOF
16916 rm -f conftest.$ac_objext
16917 if { (eval echo "$as_me:16917: \"$ac_compile\"") >&5
16918   (eval $ac_compile) 2>&5
16919   ac_status=$?
16920   echo "$as_me:16920: \$? = $ac_status" >&5
16921   (exit $ac_status); } &&
16922          { ac_try='test -s conftest.$ac_objext'
16923   { (eval echo "$as_me:16923: \"$ac_try\"") >&5
16924   (eval $ac_try) 2>&5
16925   ac_status=$?
16926   echo "$as_me:16926: \$? = $ac_status" >&5
16927   (exit $ac_status); }; }; then
16928   cf_cv_type_sigaction=yes
16929 else
16930   echo "$as_me: failed program was:" >&5
16931 cat conftest.$ac_ext >&5
16932 cf_cv_type_sigaction=no
16933 fi
16934 rm -f conftest.$ac_objext conftest.$ac_ext
16935 fi
16936
16937 echo "$as_me:16937: result: $cf_cv_type_sigaction" >&5
16938 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16939 test "$cf_cv_type_sigaction" = yes &&
16940 cat >>confdefs.h <<\EOF
16941 #define HAVE_TYPE_SIGACTION 1
16942 EOF
16943
16944 echo "$as_me:16944: checking declaration of size-change" >&5
16945 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16946 if test "${cf_cv_sizechange+set}" = set; then
16947   echo $ECHO_N "(cached) $ECHO_C" >&6
16948 else
16949
16950     cf_cv_sizechange=unknown
16951     cf_save_CPPFLAGS="$CPPFLAGS"
16952
16953 for cf_opts in "" "NEED_PTEM_H"
16954 do
16955
16956     CPPFLAGS="$cf_save_CPPFLAGS"
16957     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16958     cat >conftest.$ac_ext <<_ACEOF
16959 #line 16959 "configure"
16960 #include "confdefs.h"
16961 #include <sys/types.h>
16962 #ifdef HAVE_TERMIOS_H
16963 #include <termios.h>
16964 #else
16965 #ifdef HAVE_TERMIO_H
16966 #include <termio.h>
16967 #endif
16968 #endif
16969 #ifdef NEED_PTEM_H
16970 /* This is a workaround for SCO:  they neglected to define struct winsize in
16971  * termios.h -- it's only in termio.h and ptem.h
16972  */
16973 #include        <sys/stream.h>
16974 #include        <sys/ptem.h>
16975 #endif
16976 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16977 #include <sys/ioctl.h>
16978 #endif
16979
16980 int
16981 main ()
16982 {
16983
16984 #ifdef TIOCGSIZE
16985         struct ttysize win;     /* FIXME: what system is this? */
16986         int y = win.ts_lines;
16987         int x = win.ts_cols;
16988 #else
16989 #ifdef TIOCGWINSZ
16990         struct winsize win;
16991         int y = win.ws_row;
16992         int x = win.ws_col;
16993 #else
16994         no TIOCGSIZE or TIOCGWINSZ
16995 #endif /* TIOCGWINSZ */
16996 #endif /* TIOCGSIZE */
16997
16998   ;
16999   return 0;
17000 }
17001 _ACEOF
17002 rm -f conftest.$ac_objext
17003 if { (eval echo "$as_me:17003: \"$ac_compile\"") >&5
17004   (eval $ac_compile) 2>&5
17005   ac_status=$?
17006   echo "$as_me:17006: \$? = $ac_status" >&5
17007   (exit $ac_status); } &&
17008          { ac_try='test -s conftest.$ac_objext'
17009   { (eval echo "$as_me:17009: \"$ac_try\"") >&5
17010   (eval $ac_try) 2>&5
17011   ac_status=$?
17012   echo "$as_me:17012: \$? = $ac_status" >&5
17013   (exit $ac_status); }; }; then
17014   cf_cv_sizechange=yes
17015 else
17016   echo "$as_me: failed program was:" >&5
17017 cat conftest.$ac_ext >&5
17018 cf_cv_sizechange=no
17019 fi
17020 rm -f conftest.$ac_objext conftest.$ac_ext
17021
17022         CPPFLAGS="$cf_save_CPPFLAGS"
17023         if test "$cf_cv_sizechange" = yes ; then
17024                 echo "size-change succeeded ($cf_opts)" >&5
17025                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17026                 break
17027         fi
17028 done
17029
17030 fi
17031 echo "$as_me:17031: result: $cf_cv_sizechange" >&5
17032 echo "${ECHO_T}$cf_cv_sizechange" >&6
17033 if test "$cf_cv_sizechange" != no ; then
17034
17035 cat >>confdefs.h <<\EOF
17036 #define HAVE_SIZECHANGE 1
17037 EOF
17038
17039         case $cf_cv_sizechange in #(vi
17040         NEED*)
17041                 cat >>confdefs.h <<EOF
17042 #define $cf_cv_sizechange  1
17043 EOF
17044
17045                 ;;
17046         esac
17047 fi
17048
17049 echo "$as_me:17049: checking for memmove" >&5
17050 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17051 if test "${ac_cv_func_memmove+set}" = set; then
17052   echo $ECHO_N "(cached) $ECHO_C" >&6
17053 else
17054   cat >conftest.$ac_ext <<_ACEOF
17055 #line 17055 "configure"
17056 #include "confdefs.h"
17057 /* System header to define __stub macros and hopefully few prototypes,
17058     which can conflict with char memmove (); below.  */
17059 #include <assert.h>
17060 /* Override any gcc2 internal prototype to avoid an error.  */
17061 #ifdef __cplusplus
17062 extern "C"
17063 #endif
17064 /* We use char because int might match the return type of a gcc2
17065    builtin and then its argument prototype would still apply.  */
17066 char memmove ();
17067 char (*f) ();
17068
17069 int
17070 main ()
17071 {
17072 /* The GNU C library defines this for functions which it implements
17073     to always fail with ENOSYS.  Some functions are actually named
17074     something starting with __ and the normal name is an alias.  */
17075 #if defined (__stub_memmove) || defined (__stub___memmove)
17076 choke me
17077 #else
17078 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17079 #endif
17080
17081   ;
17082   return 0;
17083 }
17084 _ACEOF
17085 rm -f conftest.$ac_objext conftest$ac_exeext
17086 if { (eval echo "$as_me:17086: \"$ac_link\"") >&5
17087   (eval $ac_link) 2>&5
17088   ac_status=$?
17089   echo "$as_me:17089: \$? = $ac_status" >&5
17090   (exit $ac_status); } &&
17091          { ac_try='test -s conftest$ac_exeext'
17092   { (eval echo "$as_me:17092: \"$ac_try\"") >&5
17093   (eval $ac_try) 2>&5
17094   ac_status=$?
17095   echo "$as_me:17095: \$? = $ac_status" >&5
17096   (exit $ac_status); }; }; then
17097   ac_cv_func_memmove=yes
17098 else
17099   echo "$as_me: failed program was:" >&5
17100 cat conftest.$ac_ext >&5
17101 ac_cv_func_memmove=no
17102 fi
17103 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17104 fi
17105 echo "$as_me:17105: result: $ac_cv_func_memmove" >&5
17106 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17107 if test $ac_cv_func_memmove = yes; then
17108   :
17109 else
17110
17111 echo "$as_me:17111: checking for bcopy" >&5
17112 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17113 if test "${ac_cv_func_bcopy+set}" = set; then
17114   echo $ECHO_N "(cached) $ECHO_C" >&6
17115 else
17116   cat >conftest.$ac_ext <<_ACEOF
17117 #line 17117 "configure"
17118 #include "confdefs.h"
17119 /* System header to define __stub macros and hopefully few prototypes,
17120     which can conflict with char bcopy (); below.  */
17121 #include <assert.h>
17122 /* Override any gcc2 internal prototype to avoid an error.  */
17123 #ifdef __cplusplus
17124 extern "C"
17125 #endif
17126 /* We use char because int might match the return type of a gcc2
17127    builtin and then its argument prototype would still apply.  */
17128 char bcopy ();
17129 char (*f) ();
17130
17131 int
17132 main ()
17133 {
17134 /* The GNU C library defines this for functions which it implements
17135     to always fail with ENOSYS.  Some functions are actually named
17136     something starting with __ and the normal name is an alias.  */
17137 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17138 choke me
17139 #else
17140 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17141 #endif
17142
17143   ;
17144   return 0;
17145 }
17146 _ACEOF
17147 rm -f conftest.$ac_objext conftest$ac_exeext
17148 if { (eval echo "$as_me:17148: \"$ac_link\"") >&5
17149   (eval $ac_link) 2>&5
17150   ac_status=$?
17151   echo "$as_me:17151: \$? = $ac_status" >&5
17152   (exit $ac_status); } &&
17153          { ac_try='test -s conftest$ac_exeext'
17154   { (eval echo "$as_me:17154: \"$ac_try\"") >&5
17155   (eval $ac_try) 2>&5
17156   ac_status=$?
17157   echo "$as_me:17157: \$? = $ac_status" >&5
17158   (exit $ac_status); }; }; then
17159   ac_cv_func_bcopy=yes
17160 else
17161   echo "$as_me: failed program was:" >&5
17162 cat conftest.$ac_ext >&5
17163 ac_cv_func_bcopy=no
17164 fi
17165 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17166 fi
17167 echo "$as_me:17167: result: $ac_cv_func_bcopy" >&5
17168 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17169 if test $ac_cv_func_bcopy = yes; then
17170
17171         echo "$as_me:17171: checking if bcopy does overlapping moves" >&5
17172 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17173 if test "${cf_cv_good_bcopy+set}" = set; then
17174   echo $ECHO_N "(cached) $ECHO_C" >&6
17175 else
17176
17177                 if test "$cross_compiling" = yes; then
17178   cf_cv_good_bcopy=unknown
17179 else
17180   cat >conftest.$ac_ext <<_ACEOF
17181 #line 17181 "configure"
17182 #include "confdefs.h"
17183
17184 int main() {
17185         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17186         char temp[40];
17187         bcopy(data, temp, sizeof(data));
17188         bcopy(temp+10, temp, 15);
17189         bcopy(temp+5, temp+15, 10);
17190         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17191 }
17192
17193 _ACEOF
17194 rm -f conftest$ac_exeext
17195 if { (eval echo "$as_me:17195: \"$ac_link\"") >&5
17196   (eval $ac_link) 2>&5
17197   ac_status=$?
17198   echo "$as_me:17198: \$? = $ac_status" >&5
17199   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17200   { (eval echo "$as_me:17200: \"$ac_try\"") >&5
17201   (eval $ac_try) 2>&5
17202   ac_status=$?
17203   echo "$as_me:17203: \$? = $ac_status" >&5
17204   (exit $ac_status); }; }; then
17205   cf_cv_good_bcopy=yes
17206 else
17207   echo "$as_me: program exited with status $ac_status" >&5
17208 echo "$as_me: failed program was:" >&5
17209 cat conftest.$ac_ext >&5
17210 cf_cv_good_bcopy=no
17211 fi
17212 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17213 fi
17214
17215 fi
17216 echo "$as_me:17216: result: $cf_cv_good_bcopy" >&5
17217 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17218
17219 else
17220   cf_cv_good_bcopy=no
17221 fi
17222
17223         if test "$cf_cv_good_bcopy" = yes ; then
17224
17225 cat >>confdefs.h <<\EOF
17226 #define USE_OK_BCOPY 1
17227 EOF
17228
17229         else
17230
17231 cat >>confdefs.h <<\EOF
17232 #define USE_MY_MEMMOVE 1
17233 EOF
17234
17235         fi
17236
17237 fi
17238
17239 echo "$as_me:17239: checking if poll really works" >&5
17240 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17241 if test "${cf_cv_working_poll+set}" = set; then
17242   echo $ECHO_N "(cached) $ECHO_C" >&6
17243 else
17244
17245 if test "$cross_compiling" = yes; then
17246   cf_cv_working_poll=unknown
17247 else
17248   cat >conftest.$ac_ext <<_ACEOF
17249 #line 17249 "configure"
17250 #include "confdefs.h"
17251
17252 #include <stdlib.h>
17253 #include <stdio.h>
17254 #include <unistd.h>
17255 #include <fcntl.h>
17256 #ifdef HAVE_POLL_H
17257 #include <poll.h>
17258 #else
17259 #include <sys/poll.h>
17260 #endif
17261 int main() {
17262         struct pollfd myfds;
17263         int ret;
17264
17265         /* check for Darwin bug with respect to "devices" */
17266         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17267         if (myfds.fd < 0)
17268                 myfds.fd = 0;
17269         myfds.events = POLLIN;
17270         myfds.revents = 0;
17271
17272         ret = poll(&myfds, 1, 100);
17273
17274         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17275                 ret = -1;
17276         } else {
17277                 int fd = 0;
17278                 if (!isatty(fd)) {
17279                         fd = open("/dev/tty", 2);       /* O_RDWR */
17280                 }
17281
17282                 if (fd >= 0) {
17283                         /* also check with standard input */
17284                         myfds.fd = fd;
17285                         myfds.events = POLLIN;
17286                         myfds.revents = 0;
17287                         ret = poll(&myfds, 1, 100);
17288                 } else {
17289                         ret = -1;
17290                 }
17291         }
17292         ${cf_cv_main_return:-return}(ret < 0);
17293 }
17294 _ACEOF
17295 rm -f conftest$ac_exeext
17296 if { (eval echo "$as_me:17296: \"$ac_link\"") >&5
17297   (eval $ac_link) 2>&5
17298   ac_status=$?
17299   echo "$as_me:17299: \$? = $ac_status" >&5
17300   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17301   { (eval echo "$as_me:17301: \"$ac_try\"") >&5
17302   (eval $ac_try) 2>&5
17303   ac_status=$?
17304   echo "$as_me:17304: \$? = $ac_status" >&5
17305   (exit $ac_status); }; }; then
17306   cf_cv_working_poll=yes
17307 else
17308   echo "$as_me: program exited with status $ac_status" >&5
17309 echo "$as_me: failed program was:" >&5
17310 cat conftest.$ac_ext >&5
17311 cf_cv_working_poll=no
17312 fi
17313 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17314 fi
17315 fi
17316 echo "$as_me:17316: result: $cf_cv_working_poll" >&5
17317 echo "${ECHO_T}$cf_cv_working_poll" >&6
17318 test "$cf_cv_working_poll" = "yes" &&
17319 cat >>confdefs.h <<\EOF
17320 #define HAVE_WORKING_POLL 1
17321 EOF
17322
17323 echo "$as_me:17323: checking for va_copy" >&5
17324 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17325 if test "${cf_cv_have_va_copy+set}" = set; then
17326   echo $ECHO_N "(cached) $ECHO_C" >&6
17327 else
17328
17329 cat >conftest.$ac_ext <<_ACEOF
17330 #line 17330 "configure"
17331 #include "confdefs.h"
17332
17333 #include <stdarg.h>
17334
17335 int
17336 main ()
17337 {
17338
17339         static va_list dst;
17340         static va_list src;
17341         va_copy(dst, src)
17342   ;
17343   return 0;
17344 }
17345 _ACEOF
17346 rm -f conftest.$ac_objext conftest$ac_exeext
17347 if { (eval echo "$as_me:17347: \"$ac_link\"") >&5
17348   (eval $ac_link) 2>&5
17349   ac_status=$?
17350   echo "$as_me:17350: \$? = $ac_status" >&5
17351   (exit $ac_status); } &&
17352          { ac_try='test -s conftest$ac_exeext'
17353   { (eval echo "$as_me:17353: \"$ac_try\"") >&5
17354   (eval $ac_try) 2>&5
17355   ac_status=$?
17356   echo "$as_me:17356: \$? = $ac_status" >&5
17357   (exit $ac_status); }; }; then
17358   cf_cv_have_va_copy=yes
17359 else
17360   echo "$as_me: failed program was:" >&5
17361 cat conftest.$ac_ext >&5
17362 cf_cv_have_va_copy=no
17363 fi
17364 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17365 fi
17366 echo "$as_me:17366: result: $cf_cv_have_va_copy" >&5
17367 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17368
17369 test "$cf_cv_have_va_copy" = yes &&
17370 cat >>confdefs.h <<\EOF
17371 #define HAVE_VA_COPY 1
17372 EOF
17373
17374 echo "$as_me:17374: checking for __va_copy" >&5
17375 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17376 if test "${cf_cv_have___va_copy+set}" = set; then
17377   echo $ECHO_N "(cached) $ECHO_C" >&6
17378 else
17379
17380 cat >conftest.$ac_ext <<_ACEOF
17381 #line 17381 "configure"
17382 #include "confdefs.h"
17383
17384 #include <stdarg.h>
17385
17386 int
17387 main ()
17388 {
17389
17390         static va_list dst;
17391         static va_list src;
17392         __va_copy(dst, src)
17393   ;
17394   return 0;
17395 }
17396 _ACEOF
17397 rm -f conftest.$ac_objext conftest$ac_exeext
17398 if { (eval echo "$as_me:17398: \"$ac_link\"") >&5
17399   (eval $ac_link) 2>&5
17400   ac_status=$?
17401   echo "$as_me:17401: \$? = $ac_status" >&5
17402   (exit $ac_status); } &&
17403          { ac_try='test -s conftest$ac_exeext'
17404   { (eval echo "$as_me:17404: \"$ac_try\"") >&5
17405   (eval $ac_try) 2>&5
17406   ac_status=$?
17407   echo "$as_me:17407: \$? = $ac_status" >&5
17408   (exit $ac_status); }; }; then
17409   cf_cv_have___va_copy=yes
17410 else
17411   echo "$as_me: failed program was:" >&5
17412 cat conftest.$ac_ext >&5
17413 cf_cv_have___va_copy=no
17414 fi
17415 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17416 fi
17417 echo "$as_me:17417: result: $cf_cv_have___va_copy" >&5
17418 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17419
17420 test "$cf_cv_have___va_copy" = yes &&
17421 cat >>confdefs.h <<\EOF
17422 #define HAVE___VA_COPY 1
17423 EOF
17424
17425 echo "$as_me:17425: checking for pid_t" >&5
17426 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17427 if test "${ac_cv_type_pid_t+set}" = set; then
17428   echo $ECHO_N "(cached) $ECHO_C" >&6
17429 else
17430   cat >conftest.$ac_ext <<_ACEOF
17431 #line 17431 "configure"
17432 #include "confdefs.h"
17433 $ac_includes_default
17434 int
17435 main ()
17436 {
17437 if ((pid_t *) 0)
17438   return 0;
17439 if (sizeof (pid_t))
17440   return 0;
17441   ;
17442   return 0;
17443 }
17444 _ACEOF
17445 rm -f conftest.$ac_objext
17446 if { (eval echo "$as_me:17446: \"$ac_compile\"") >&5
17447   (eval $ac_compile) 2>&5
17448   ac_status=$?
17449   echo "$as_me:17449: \$? = $ac_status" >&5
17450   (exit $ac_status); } &&
17451          { ac_try='test -s conftest.$ac_objext'
17452   { (eval echo "$as_me:17452: \"$ac_try\"") >&5
17453   (eval $ac_try) 2>&5
17454   ac_status=$?
17455   echo "$as_me:17455: \$? = $ac_status" >&5
17456   (exit $ac_status); }; }; then
17457   ac_cv_type_pid_t=yes
17458 else
17459   echo "$as_me: failed program was:" >&5
17460 cat conftest.$ac_ext >&5
17461 ac_cv_type_pid_t=no
17462 fi
17463 rm -f conftest.$ac_objext conftest.$ac_ext
17464 fi
17465 echo "$as_me:17465: result: $ac_cv_type_pid_t" >&5
17466 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17467 if test $ac_cv_type_pid_t = yes; then
17468   :
17469 else
17470
17471 cat >>confdefs.h <<EOF
17472 #define pid_t int
17473 EOF
17474
17475 fi
17476
17477 for ac_header in unistd.h vfork.h
17478 do
17479 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17480 echo "$as_me:17480: checking for $ac_header" >&5
17481 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17482 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17483   echo $ECHO_N "(cached) $ECHO_C" >&6
17484 else
17485   cat >conftest.$ac_ext <<_ACEOF
17486 #line 17486 "configure"
17487 #include "confdefs.h"
17488 #include <$ac_header>
17489 _ACEOF
17490 if { (eval echo "$as_me:17490: \"$ac_cpp conftest.$ac_ext\"") >&5
17491   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17492   ac_status=$?
17493   egrep -v '^ *\+' conftest.er1 >conftest.err
17494   rm -f conftest.er1
17495   cat conftest.err >&5
17496   echo "$as_me:17496: \$? = $ac_status" >&5
17497   (exit $ac_status); } >/dev/null; then
17498   if test -s conftest.err; then
17499     ac_cpp_err=$ac_c_preproc_warn_flag
17500   else
17501     ac_cpp_err=
17502   fi
17503 else
17504   ac_cpp_err=yes
17505 fi
17506 if test -z "$ac_cpp_err"; then
17507   eval "$as_ac_Header=yes"
17508 else
17509   echo "$as_me: failed program was:" >&5
17510   cat conftest.$ac_ext >&5
17511   eval "$as_ac_Header=no"
17512 fi
17513 rm -f conftest.err conftest.$ac_ext
17514 fi
17515 echo "$as_me:17515: result: `eval echo '${'$as_ac_Header'}'`" >&5
17516 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17517 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17518   cat >>confdefs.h <<EOF
17519 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17520 EOF
17521
17522 fi
17523 done
17524
17525 for ac_func in fork vfork
17526 do
17527 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17528 echo "$as_me:17528: checking for $ac_func" >&5
17529 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17530 if eval "test \"\${$as_ac_var+set}\" = set"; then
17531   echo $ECHO_N "(cached) $ECHO_C" >&6
17532 else
17533   cat >conftest.$ac_ext <<_ACEOF
17534 #line 17534 "configure"
17535 #include "confdefs.h"
17536 /* System header to define __stub macros and hopefully few prototypes,
17537     which can conflict with char $ac_func (); below.  */
17538 #include <assert.h>
17539 /* Override any gcc2 internal prototype to avoid an error.  */
17540 #ifdef __cplusplus
17541 extern "C"
17542 #endif
17543 /* We use char because int might match the return type of a gcc2
17544    builtin and then its argument prototype would still apply.  */
17545 char $ac_func ();
17546 char (*f) ();
17547
17548 int
17549 main ()
17550 {
17551 /* The GNU C library defines this for functions which it implements
17552     to always fail with ENOSYS.  Some functions are actually named
17553     something starting with __ and the normal name is an alias.  */
17554 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17555 choke me
17556 #else
17557 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17558 #endif
17559
17560   ;
17561   return 0;
17562 }
17563 _ACEOF
17564 rm -f conftest.$ac_objext conftest$ac_exeext
17565 if { (eval echo "$as_me:17565: \"$ac_link\"") >&5
17566   (eval $ac_link) 2>&5
17567   ac_status=$?
17568   echo "$as_me:17568: \$? = $ac_status" >&5
17569   (exit $ac_status); } &&
17570          { ac_try='test -s conftest$ac_exeext'
17571   { (eval echo "$as_me:17571: \"$ac_try\"") >&5
17572   (eval $ac_try) 2>&5
17573   ac_status=$?
17574   echo "$as_me:17574: \$? = $ac_status" >&5
17575   (exit $ac_status); }; }; then
17576   eval "$as_ac_var=yes"
17577 else
17578   echo "$as_me: failed program was:" >&5
17579 cat conftest.$ac_ext >&5
17580 eval "$as_ac_var=no"
17581 fi
17582 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17583 fi
17584 echo "$as_me:17584: result: `eval echo '${'$as_ac_var'}'`" >&5
17585 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17586 if test `eval echo '${'$as_ac_var'}'` = yes; then
17587   cat >>confdefs.h <<EOF
17588 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17589 EOF
17590
17591 fi
17592 done
17593
17594 ac_cv_func_fork_works=$ac_cv_func_fork
17595 if test "x$ac_cv_func_fork" = xyes; then
17596   echo "$as_me:17596: checking for working fork" >&5
17597 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17598 if test "${ac_cv_func_fork_works+set}" = set; then
17599   echo $ECHO_N "(cached) $ECHO_C" >&6
17600 else
17601   if test "$cross_compiling" = yes; then
17602   ac_cv_func_fork_works=cross
17603 else
17604   cat >conftest.$ac_ext <<_ACEOF
17605 /* By Rüdiger Kuhlmann. */
17606       #include <sys/types.h>
17607       #if HAVE_UNISTD_H
17608       # include <unistd.h>
17609       #endif
17610       /* Some systems only have a dummy stub for fork() */
17611       int main ()
17612       {
17613         if (fork() < 0)
17614           $ac_main_return (1);
17615         $ac_main_return (0);
17616       }
17617 _ACEOF
17618 rm -f conftest$ac_exeext
17619 if { (eval echo "$as_me:17619: \"$ac_link\"") >&5
17620   (eval $ac_link) 2>&5
17621   ac_status=$?
17622   echo "$as_me:17622: \$? = $ac_status" >&5
17623   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17624   { (eval echo "$as_me:17624: \"$ac_try\"") >&5
17625   (eval $ac_try) 2>&5
17626   ac_status=$?
17627   echo "$as_me:17627: \$? = $ac_status" >&5
17628   (exit $ac_status); }; }; then
17629   ac_cv_func_fork_works=yes
17630 else
17631   echo "$as_me: program exited with status $ac_status" >&5
17632 echo "$as_me: failed program was:" >&5
17633 cat conftest.$ac_ext >&5
17634 ac_cv_func_fork_works=no
17635 fi
17636 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17637 fi
17638 fi
17639 echo "$as_me:17639: result: $ac_cv_func_fork_works" >&5
17640 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17641
17642 fi
17643 if test "x$ac_cv_func_fork_works" = xcross; then
17644   case $host in
17645     *-*-amigaos* | *-*-msdosdjgpp*)
17646       # Override, as these systems have only a dummy fork() stub
17647       ac_cv_func_fork_works=no
17648       ;;
17649     *)
17650       ac_cv_func_fork_works=yes
17651       ;;
17652   esac
17653   { echo "$as_me:17653: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17654 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17655 fi
17656 ac_cv_func_vfork_works=$ac_cv_func_vfork
17657 if test "x$ac_cv_func_vfork" = xyes; then
17658   echo "$as_me:17658: checking for working vfork" >&5
17659 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17660 if test "${ac_cv_func_vfork_works+set}" = set; then
17661   echo $ECHO_N "(cached) $ECHO_C" >&6
17662 else
17663   if test "$cross_compiling" = yes; then
17664   ac_cv_func_vfork_works=cross
17665 else
17666   cat >conftest.$ac_ext <<_ACEOF
17667 #line 17667 "configure"
17668 #include "confdefs.h"
17669 /* Thanks to Paul Eggert for this test.  */
17670 #include <stdio.h>
17671 #include <sys/types.h>
17672 #include <sys/stat.h>
17673 #if HAVE_UNISTD_H
17674 # include <unistd.h>
17675 #endif
17676 #if HAVE_VFORK_H
17677 # include <vfork.h>
17678 #endif
17679 /* On some sparc systems, changes by the child to local and incoming
17680    argument registers are propagated back to the parent.  The compiler
17681    is told about this with #include <vfork.h>, but some compilers
17682    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17683    static variable whose address is put into a register that is
17684    clobbered by the vfork.  */
17685 static
17686 #ifdef __cplusplus
17687 sparc_address_test (int arg)
17688 # else
17689 sparc_address_test (arg) int arg;
17690 #endif
17691 {
17692   static pid_t child;
17693   if (!child) {
17694     child = vfork ();
17695     if (child < 0) {
17696       perror ("vfork");
17697       _exit(2);
17698     }
17699     if (!child) {
17700       arg = getpid();
17701       write(-1, "", 0);
17702       _exit (arg);
17703     }
17704   }
17705 }
17706
17707 int
17708 main ()
17709 {
17710   pid_t parent = getpid ();
17711   pid_t child;
17712
17713   sparc_address_test ();
17714
17715   child = vfork ();
17716
17717   if (child == 0) {
17718     /* Here is another test for sparc vfork register problems.  This
17719        test uses lots of local variables, at least as many local
17720        variables as main has allocated so far including compiler
17721        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17722        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17723        reuse the register of parent for one of the local variables,
17724        since it will think that parent can't possibly be used any more
17725        in this routine.  Assigning to the local variable will thus
17726        munge parent in the parent process.  */
17727     pid_t
17728       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17729       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17730     /* Convince the compiler that p..p7 are live; otherwise, it might
17731        use the same hardware register for all 8 local variables.  */
17732     if (p != p1 || p != p2 || p != p3 || p != p4
17733         || p != p5 || p != p6 || p != p7)
17734       _exit(1);
17735
17736     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17737        from child file descriptors.  If the child closes a descriptor
17738        before it execs or exits, this munges the parent's descriptor
17739        as well.  Test for this by closing stdout in the child.  */
17740     _exit(close(fileno(stdout)) != 0);
17741   } else {
17742     int status;
17743     struct stat st;
17744
17745     while (wait(&status) != child)
17746       ;
17747     $ac_main_return(
17748          /* Was there some problem with vforking?  */
17749          child < 0
17750
17751          /* Did the child fail?  (This shouldn't happen.)  */
17752          || status
17753
17754          /* Did the vfork/compiler bug occur?  */
17755          || parent != getpid()
17756
17757          /* Did the file descriptor bug occur?  */
17758          || fstat(fileno(stdout), &st) != 0
17759          );
17760   }
17761 }
17762 _ACEOF
17763 rm -f conftest$ac_exeext
17764 if { (eval echo "$as_me:17764: \"$ac_link\"") >&5
17765   (eval $ac_link) 2>&5
17766   ac_status=$?
17767   echo "$as_me:17767: \$? = $ac_status" >&5
17768   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17769   { (eval echo "$as_me:17769: \"$ac_try\"") >&5
17770   (eval $ac_try) 2>&5
17771   ac_status=$?
17772   echo "$as_me:17772: \$? = $ac_status" >&5
17773   (exit $ac_status); }; }; then
17774   ac_cv_func_vfork_works=yes
17775 else
17776   echo "$as_me: program exited with status $ac_status" >&5
17777 echo "$as_me: failed program was:" >&5
17778 cat conftest.$ac_ext >&5
17779 ac_cv_func_vfork_works=no
17780 fi
17781 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17782 fi
17783 fi
17784 echo "$as_me:17784: result: $ac_cv_func_vfork_works" >&5
17785 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17786
17787 fi;
17788 if test "x$ac_cv_func_fork_works" = xcross; then
17789   ac_cv_func_vfork_works=ac_cv_func_vfork
17790   { echo "$as_me:17790: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17791 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17792 fi
17793
17794 if test "x$ac_cv_func_vfork_works" = xyes; then
17795
17796 cat >>confdefs.h <<\EOF
17797 #define HAVE_WORKING_VFORK 1
17798 EOF
17799
17800 else
17801
17802 cat >>confdefs.h <<\EOF
17803 #define vfork fork
17804 EOF
17805
17806 fi
17807 if test "x$ac_cv_func_fork_works" = xyes; then
17808
17809 cat >>confdefs.h <<\EOF
17810 #define HAVE_WORKING_FORK 1
17811 EOF
17812
17813 fi
17814
17815 # special check for test/ditto.c
17816
17817 echo "$as_me:17817: checking for openpty in -lutil" >&5
17818 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17819 if test "${ac_cv_lib_util_openpty+set}" = set; then
17820   echo $ECHO_N "(cached) $ECHO_C" >&6
17821 else
17822   ac_check_lib_save_LIBS=$LIBS
17823 LIBS="-lutil  $LIBS"
17824 cat >conftest.$ac_ext <<_ACEOF
17825 #line 17825 "configure"
17826 #include "confdefs.h"
17827
17828 /* Override any gcc2 internal prototype to avoid an error.  */
17829 #ifdef __cplusplus
17830 extern "C"
17831 #endif
17832 /* We use char because int might match the return type of a gcc2
17833    builtin and then its argument prototype would still apply.  */
17834 char openpty ();
17835 int
17836 main ()
17837 {
17838 openpty ();
17839   ;
17840   return 0;
17841 }
17842 _ACEOF
17843 rm -f conftest.$ac_objext conftest$ac_exeext
17844 if { (eval echo "$as_me:17844: \"$ac_link\"") >&5
17845   (eval $ac_link) 2>&5
17846   ac_status=$?
17847   echo "$as_me:17847: \$? = $ac_status" >&5
17848   (exit $ac_status); } &&
17849          { ac_try='test -s conftest$ac_exeext'
17850   { (eval echo "$as_me:17850: \"$ac_try\"") >&5
17851   (eval $ac_try) 2>&5
17852   ac_status=$?
17853   echo "$as_me:17853: \$? = $ac_status" >&5
17854   (exit $ac_status); }; }; then
17855   ac_cv_lib_util_openpty=yes
17856 else
17857   echo "$as_me: failed program was:" >&5
17858 cat conftest.$ac_ext >&5
17859 ac_cv_lib_util_openpty=no
17860 fi
17861 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17862 LIBS=$ac_check_lib_save_LIBS
17863 fi
17864 echo "$as_me:17864: result: $ac_cv_lib_util_openpty" >&5
17865 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17866 if test $ac_cv_lib_util_openpty = yes; then
17867   cf_cv_lib_util=yes
17868 else
17869   cf_cv_lib_util=no
17870 fi
17871
17872 echo "$as_me:17872: checking for openpty header" >&5
17873 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17874 if test "${cf_cv_func_openpty+set}" = set; then
17875   echo $ECHO_N "(cached) $ECHO_C" >&6
17876 else
17877
17878     cf_save_LIBS="$LIBS"
17879     test $cf_cv_lib_util = yes &&
17880 cf_add_libs="-lutil"
17881 # Filter out duplicates - this happens with badly-designed ".pc" files...
17882 for cf_add_1lib in $LIBS
17883 do
17884         for cf_add_2lib in $cf_add_libs
17885         do
17886                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17887                 then
17888                         cf_add_1lib=
17889                         break
17890                 fi
17891         done
17892         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17893 done
17894 LIBS="$cf_add_libs"
17895
17896     for cf_header in pty.h libutil.h util.h
17897     do
17898     cat >conftest.$ac_ext <<_ACEOF
17899 #line 17899 "configure"
17900 #include "confdefs.h"
17901
17902 #include <$cf_header>
17903
17904 int
17905 main ()
17906 {
17907
17908     int x = openpty((int *)0, (int *)0, (char *)0,
17909                    (struct termios *)0, (struct winsize *)0);
17910
17911   ;
17912   return 0;
17913 }
17914 _ACEOF
17915 rm -f conftest.$ac_objext conftest$ac_exeext
17916 if { (eval echo "$as_me:17916: \"$ac_link\"") >&5
17917   (eval $ac_link) 2>&5
17918   ac_status=$?
17919   echo "$as_me:17919: \$? = $ac_status" >&5
17920   (exit $ac_status); } &&
17921          { ac_try='test -s conftest$ac_exeext'
17922   { (eval echo "$as_me:17922: \"$ac_try\"") >&5
17923   (eval $ac_try) 2>&5
17924   ac_status=$?
17925   echo "$as_me:17925: \$? = $ac_status" >&5
17926   (exit $ac_status); }; }; then
17927
17928         cf_cv_func_openpty=$cf_header
17929         break
17930
17931 else
17932   echo "$as_me: failed program was:" >&5
17933 cat conftest.$ac_ext >&5
17934
17935         cf_cv_func_openpty=no
17936
17937 fi
17938 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17939     done
17940     LIBS="$cf_save_LIBS"
17941
17942 fi
17943 echo "$as_me:17943: result: $cf_cv_func_openpty" >&5
17944 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17945
17946 if test "$cf_cv_func_openpty" != no ; then
17947
17948 cat >>confdefs.h <<EOF
17949 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17950 EOF
17951
17952 cat >>confdefs.h <<\EOF
17953 #define USE_XTERM_PTY 1
17954 EOF
17955
17956     if test "x$cf_cv_lib_util" = xyes ; then
17957
17958 cf_add_libs="-lutil"
17959 # Filter out duplicates - this happens with badly-designed ".pc" files...
17960 for cf_add_1lib in $TEST_LIBS
17961 do
17962         for cf_add_2lib in $cf_add_libs
17963         do
17964                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17965                 then
17966                         cf_add_1lib=
17967                         break
17968                 fi
17969         done
17970         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17971 done
17972 TEST_LIBS="$cf_add_libs"
17973
17974     fi
17975 fi
17976
17977 if test "$with_hashed_db" != no ; then
17978
17979 cat >>confdefs.h <<\EOF
17980 #define USE_HASHED_DB 1
17981 EOF
17982
17983 case $with_hashed_db in #(vi
17984 yes|*able*) #(vi
17985     ;;
17986 *)
17987     if test -d "$with_hashed_db" ; then
17988
17989 if test -n "$with_hashed_db/include" ; then
17990   for cf_add_incdir in $with_hashed_db/include
17991   do
17992         while test $cf_add_incdir != /usr/include
17993         do
17994           if test -d $cf_add_incdir
17995           then
17996                 cf_have_incdir=no
17997                 if test -n "$CFLAGS$CPPFLAGS" ; then
17998                   # a loop is needed to ensure we can add subdirs of existing dirs
17999                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18000                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18001                           cf_have_incdir=yes; break
18002                         fi
18003                   done
18004                 fi
18005
18006                 if test "$cf_have_incdir" = no ; then
18007                   if test "$cf_add_incdir" = /usr/local/include ; then
18008                         if test "$GCC" = yes
18009                         then
18010                           cf_save_CPPFLAGS=$CPPFLAGS
18011                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18012                           cat >conftest.$ac_ext <<_ACEOF
18013 #line 18013 "configure"
18014 #include "confdefs.h"
18015 #include <stdio.h>
18016 int
18017 main ()
18018 {
18019 printf("Hello")
18020   ;
18021   return 0;
18022 }
18023 _ACEOF
18024 rm -f conftest.$ac_objext
18025 if { (eval echo "$as_me:18025: \"$ac_compile\"") >&5
18026   (eval $ac_compile) 2>&5
18027   ac_status=$?
18028   echo "$as_me:18028: \$? = $ac_status" >&5
18029   (exit $ac_status); } &&
18030          { ac_try='test -s conftest.$ac_objext'
18031   { (eval echo "$as_me:18031: \"$ac_try\"") >&5
18032   (eval $ac_try) 2>&5
18033   ac_status=$?
18034   echo "$as_me:18034: \$? = $ac_status" >&5
18035   (exit $ac_status); }; }; then
18036   :
18037 else
18038   echo "$as_me: failed program was:" >&5
18039 cat conftest.$ac_ext >&5
18040 cf_have_incdir=yes
18041 fi
18042 rm -f conftest.$ac_objext conftest.$ac_ext
18043                           CPPFLAGS=$cf_save_CPPFLAGS
18044                         fi
18045                   fi
18046                 fi
18047
18048                 if test "$cf_have_incdir" = no ; then
18049                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18050
18051 echo "${as_me:-configure}:18051: testing adding $cf_add_incdir to include-path ..." 1>&5
18052
18053                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18054
18055                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18056                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18057                   cf_add_incdir="$cf_top_incdir"
18058                 else
18059                   break
18060                 fi
18061           fi
18062         done
18063   done
18064 fi
18065
18066 if test -n "$with_hashed_db/lib" ; then
18067   for cf_add_libdir in $with_hashed_db/lib
18068   do
18069     if test $cf_add_libdir = /usr/lib ; then
18070       :
18071     elif test -d $cf_add_libdir
18072     then
18073       cf_have_libdir=no
18074       if test -n "$LDFLAGS$LIBS" ; then
18075         # a loop is needed to ensure we can add subdirs of existing dirs
18076         for cf_test_libdir in $LDFLAGS $LIBS ; do
18077           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18078             cf_have_libdir=yes; break
18079           fi
18080         done
18081       fi
18082       if test "$cf_have_libdir" = no ; then
18083         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18084
18085 echo "${as_me:-configure}:18085: testing adding $cf_add_libdir to library-path ..." 1>&5
18086
18087         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18088       fi
18089     fi
18090   done
18091 fi
18092
18093         else
18094                 case "$with_hashed_db" in #(vi
18095                 ./*|../*|/*)
18096                         { echo "$as_me:18096: WARNING: no such directory $with_hashed_db" >&5
18097 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18098                         ;; #(vi
18099                 *)
18100
18101 cf_search=
18102
18103 test "x/usr" != "x$prefix" && \
18104 test -d "/usr" && \
18105 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
18106         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
18107         test -d /usr/include &&          cf_search="$cf_search /usr/include"
18108         test -d /usr/include/$with_hashed_db &&       cf_search="$cf_search /usr/include/$with_hashed_db"
18109         test -d /usr/include/$with_hashed_db/include &&    cf_search="$cf_search /usr/include/$with_hashed_db/include"
18110         test -d /usr/$with_hashed_db/include &&       cf_search="$cf_search /usr/$with_hashed_db/include"
18111         test -d /usr/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /usr/$with_hashed_db/include/$with_hashed_db"
18112 }
18113
18114 test "x$prefix" != "xNONE" && \
18115 test -d "$prefix" && \
18116  {
18117         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18118         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18119         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18120         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18121         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18122         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18123 }
18124
18125 test "x/usr/local" != "x$prefix" && \
18126 test -d "/usr/local" && \
18127 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
18128         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
18129         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
18130         test -d /usr/local/include/$with_hashed_db &&       cf_search="$cf_search /usr/local/include/$with_hashed_db"
18131         test -d /usr/local/include/$with_hashed_db/include &&    cf_search="$cf_search /usr/local/include/$with_hashed_db/include"
18132         test -d /usr/local/$with_hashed_db/include &&       cf_search="$cf_search /usr/local/$with_hashed_db/include"
18133         test -d /usr/local/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /usr/local/$with_hashed_db/include/$with_hashed_db"
18134 }
18135
18136 test "x/opt" != "x$prefix" && \
18137 test -d "/opt" && \
18138 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
18139         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
18140         test -d /opt/include &&          cf_search="$cf_search /opt/include"
18141         test -d /opt/include/$with_hashed_db &&       cf_search="$cf_search /opt/include/$with_hashed_db"
18142         test -d /opt/include/$with_hashed_db/include &&    cf_search="$cf_search /opt/include/$with_hashed_db/include"
18143         test -d /opt/$with_hashed_db/include &&       cf_search="$cf_search /opt/$with_hashed_db/include"
18144         test -d /opt/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /opt/$with_hashed_db/include/$with_hashed_db"
18145 }
18146
18147 test "x$HOME" != "x$prefix" && \
18148 test -d "$HOME" && \
18149 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
18150         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
18151         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
18152         test -d $HOME/include/$with_hashed_db &&       cf_search="$cf_search $HOME/include/$with_hashed_db"
18153         test -d $HOME/include/$with_hashed_db/include &&    cf_search="$cf_search $HOME/include/$with_hashed_db/include"
18154         test -d $HOME/$with_hashed_db/include &&       cf_search="$cf_search $HOME/$with_hashed_db/include"
18155         test -d $HOME/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $HOME/$with_hashed_db/include/$with_hashed_db"
18156 }
18157
18158         for cf_item in $cf_search
18159         do
18160                 case $cf_item in #(vi
18161                 */$with_hashed_db)
18162
18163 if test -n "$cf_item" ; then
18164   for cf_add_incdir in $cf_item
18165   do
18166         while test $cf_add_incdir != /usr/include
18167         do
18168           if test -d $cf_add_incdir
18169           then
18170                 cf_have_incdir=no
18171                 if test -n "$CFLAGS$CPPFLAGS" ; then
18172                   # a loop is needed to ensure we can add subdirs of existing dirs
18173                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18174                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18175                           cf_have_incdir=yes; break
18176                         fi
18177                   done
18178                 fi
18179
18180                 if test "$cf_have_incdir" = no ; then
18181                   if test "$cf_add_incdir" = /usr/local/include ; then
18182                         if test "$GCC" = yes
18183                         then
18184                           cf_save_CPPFLAGS=$CPPFLAGS
18185                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18186                           cat >conftest.$ac_ext <<_ACEOF
18187 #line 18187 "configure"
18188 #include "confdefs.h"
18189 #include <stdio.h>
18190 int
18191 main ()
18192 {
18193 printf("Hello")
18194   ;
18195   return 0;
18196 }
18197 _ACEOF
18198 rm -f conftest.$ac_objext
18199 if { (eval echo "$as_me:18199: \"$ac_compile\"") >&5
18200   (eval $ac_compile) 2>&5
18201   ac_status=$?
18202   echo "$as_me:18202: \$? = $ac_status" >&5
18203   (exit $ac_status); } &&
18204          { ac_try='test -s conftest.$ac_objext'
18205   { (eval echo "$as_me:18205: \"$ac_try\"") >&5
18206   (eval $ac_try) 2>&5
18207   ac_status=$?
18208   echo "$as_me:18208: \$? = $ac_status" >&5
18209   (exit $ac_status); }; }; then
18210   :
18211 else
18212   echo "$as_me: failed program was:" >&5
18213 cat conftest.$ac_ext >&5
18214 cf_have_incdir=yes
18215 fi
18216 rm -f conftest.$ac_objext conftest.$ac_ext
18217                           CPPFLAGS=$cf_save_CPPFLAGS
18218                         fi
18219                   fi
18220                 fi
18221
18222                 if test "$cf_have_incdir" = no ; then
18223                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18224
18225 echo "${as_me:-configure}:18225: testing adding $cf_add_incdir to include-path ..." 1>&5
18226
18227                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18228
18229                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18230                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18231                   cf_add_incdir="$cf_top_incdir"
18232                 else
18233                   break
18234                 fi
18235           fi
18236         done
18237   done
18238 fi
18239
18240                         ;;
18241                 esac
18242         done
18243
18244 cf_search=
18245
18246 test "x/usr" != "x$prefix" && \
18247 test -d "/usr" && \
18248 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
18249         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
18250         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
18251         test -d /usr/lib/$with_hashed_db &&       cf_search="$cf_search /usr/lib/$with_hashed_db"
18252         test -d /usr/lib/$with_hashed_db/lib &&    cf_search="$cf_search /usr/lib/$with_hashed_db/lib"
18253         test -d /usr/$with_hashed_db/lib &&       cf_search="$cf_search /usr/$with_hashed_db/lib"
18254         test -d /usr/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /usr/$with_hashed_db/lib/$with_hashed_db"
18255 }
18256
18257 test "x$prefix" != "xNONE" && \
18258 test -d "$prefix" && \
18259  {
18260         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18261         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18262         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18263         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18264         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18265         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18266 }
18267
18268 test "x/usr/local" != "x$prefix" && \
18269 test -d "/usr/local" && \
18270 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
18271         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
18272         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
18273         test -d /usr/local/lib/$with_hashed_db &&       cf_search="$cf_search /usr/local/lib/$with_hashed_db"
18274         test -d /usr/local/lib/$with_hashed_db/lib &&    cf_search="$cf_search /usr/local/lib/$with_hashed_db/lib"
18275         test -d /usr/local/$with_hashed_db/lib &&       cf_search="$cf_search /usr/local/$with_hashed_db/lib"
18276         test -d /usr/local/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /usr/local/$with_hashed_db/lib/$with_hashed_db"
18277 }
18278
18279 test "x/opt" != "x$prefix" && \
18280 test -d "/opt" && \
18281 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
18282         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
18283         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
18284         test -d /opt/lib/$with_hashed_db &&       cf_search="$cf_search /opt/lib/$with_hashed_db"
18285         test -d /opt/lib/$with_hashed_db/lib &&    cf_search="$cf_search /opt/lib/$with_hashed_db/lib"
18286         test -d /opt/$with_hashed_db/lib &&       cf_search="$cf_search /opt/$with_hashed_db/lib"
18287         test -d /opt/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /opt/$with_hashed_db/lib/$with_hashed_db"
18288 }
18289
18290 test "x$HOME" != "x$prefix" && \
18291 test -d "$HOME" && \
18292 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
18293         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
18294         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
18295         test -d $HOME/lib/$with_hashed_db &&       cf_search="$cf_search $HOME/lib/$with_hashed_db"
18296         test -d $HOME/lib/$with_hashed_db/lib &&    cf_search="$cf_search $HOME/lib/$with_hashed_db/lib"
18297         test -d $HOME/$with_hashed_db/lib &&       cf_search="$cf_search $HOME/$with_hashed_db/lib"
18298         test -d $HOME/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $HOME/$with_hashed_db/lib/$with_hashed_db"
18299 }
18300
18301         for cf_item in $cf_search
18302         do
18303                 case $cf_item in #(vi
18304                 */$with_hashed_db)
18305
18306 if test -n "$cf_item" ; then
18307   for cf_add_libdir in $cf_item
18308   do
18309     if test $cf_add_libdir = /usr/lib ; then
18310       :
18311     elif test -d $cf_add_libdir
18312     then
18313       cf_have_libdir=no
18314       if test -n "$LDFLAGS$LIBS" ; then
18315         # a loop is needed to ensure we can add subdirs of existing dirs
18316         for cf_test_libdir in $LDFLAGS $LIBS ; do
18317           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18318             cf_have_libdir=yes; break
18319           fi
18320         done
18321       fi
18322       if test "$cf_have_libdir" = no ; then
18323         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18324
18325 echo "${as_me:-configure}:18325: testing adding $cf_add_libdir to library-path ..." 1>&5
18326
18327         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18328       fi
18329     fi
18330   done
18331 fi
18332
18333                         ;;
18334                 esac
18335         done
18336
18337                         ;;
18338                 esac
18339     fi
18340 esac
18341
18342 echo "$as_me:18342: checking for db.h" >&5
18343 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18344 if test "${ac_cv_header_db_h+set}" = set; then
18345   echo $ECHO_N "(cached) $ECHO_C" >&6
18346 else
18347   cat >conftest.$ac_ext <<_ACEOF
18348 #line 18348 "configure"
18349 #include "confdefs.h"
18350 #include <db.h>
18351 _ACEOF
18352 if { (eval echo "$as_me:18352: \"$ac_cpp conftest.$ac_ext\"") >&5
18353   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18354   ac_status=$?
18355   egrep -v '^ *\+' conftest.er1 >conftest.err
18356   rm -f conftest.er1
18357   cat conftest.err >&5
18358   echo "$as_me:18358: \$? = $ac_status" >&5
18359   (exit $ac_status); } >/dev/null; then
18360   if test -s conftest.err; then
18361     ac_cpp_err=$ac_c_preproc_warn_flag
18362   else
18363     ac_cpp_err=
18364   fi
18365 else
18366   ac_cpp_err=yes
18367 fi
18368 if test -z "$ac_cpp_err"; then
18369   ac_cv_header_db_h=yes
18370 else
18371   echo "$as_me: failed program was:" >&5
18372   cat conftest.$ac_ext >&5
18373   ac_cv_header_db_h=no
18374 fi
18375 rm -f conftest.err conftest.$ac_ext
18376 fi
18377 echo "$as_me:18377: result: $ac_cv_header_db_h" >&5
18378 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18379 if test $ac_cv_header_db_h = yes; then
18380
18381 echo "$as_me:18381: checking for version of db" >&5
18382 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18383 if test "${cf_cv_hashed_db_version+set}" = set; then
18384   echo $ECHO_N "(cached) $ECHO_C" >&6
18385 else
18386
18387 cf_cv_hashed_db_version=unknown
18388
18389 for cf_db_version in 1 2 3 4 5 6
18390 do
18391
18392 echo "${as_me:-configure}:18392: testing checking for db version $cf_db_version ..." 1>&5
18393
18394         cat >conftest.$ac_ext <<_ACEOF
18395 #line 18395 "configure"
18396 #include "confdefs.h"
18397
18398 $ac_includes_default
18399 #include <db.h>
18400
18401 #ifdef DB_VERSION_MAJOR
18402         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18403 #if $cf_db_version == DB_VERSION_MAJOR
18404         /* ok */
18405 #else
18406         make an error
18407 #endif
18408 #else
18409 #if $cf_db_version == 1
18410         /* ok: assuming this is DB 1.8.5 */
18411 #else
18412         make an error
18413 #endif
18414 #endif
18415
18416 int
18417 main ()
18418 {
18419 DBT *foo = 0
18420   ;
18421   return 0;
18422 }
18423 _ACEOF
18424 rm -f conftest.$ac_objext
18425 if { (eval echo "$as_me:18425: \"$ac_compile\"") >&5
18426   (eval $ac_compile) 2>&5
18427   ac_status=$?
18428   echo "$as_me:18428: \$? = $ac_status" >&5
18429   (exit $ac_status); } &&
18430          { ac_try='test -s conftest.$ac_objext'
18431   { (eval echo "$as_me:18431: \"$ac_try\"") >&5
18432   (eval $ac_try) 2>&5
18433   ac_status=$?
18434   echo "$as_me:18434: \$? = $ac_status" >&5
18435   (exit $ac_status); }; }; then
18436
18437         cf_cv_hashed_db_version=$cf_db_version
18438         break
18439
18440 else
18441   echo "$as_me: failed program was:" >&5
18442 cat conftest.$ac_ext >&5
18443 fi
18444 rm -f conftest.$ac_objext conftest.$ac_ext
18445 done
18446
18447 fi
18448 echo "$as_me:18448: result: $cf_cv_hashed_db_version" >&5
18449 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
18450
18451 if test "$cf_cv_hashed_db_version" = unknown ; then
18452         { { echo "$as_me:18452: error: Cannot determine version of db" >&5
18453 echo "$as_me: error: Cannot determine version of db" >&2;}
18454    { (exit 1); exit 1; }; }
18455 else
18456
18457 echo "$as_me:18457: checking for db libraries" >&5
18458 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
18459 if test "${cf_cv_hashed_db_libs+set}" = set; then
18460   echo $ECHO_N "(cached) $ECHO_C" >&6
18461 else
18462
18463 cf_cv_hashed_db_libs=unknown
18464 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
18465 do
18466         cf_save_libs="$LIBS"
18467         if test -n "$cf_db_libs"; then
18468
18469 cf_add_libs="-l$cf_db_libs"
18470 # Filter out duplicates - this happens with badly-designed ".pc" files...
18471 for cf_add_1lib in $LIBS
18472 do
18473         for cf_add_2lib in $cf_add_libs
18474         do
18475                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18476                 then
18477                         cf_add_1lib=
18478                         break
18479                 fi
18480         done
18481         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18482 done
18483 LIBS="$cf_add_libs"
18484
18485         fi
18486
18487 echo "${as_me:-configure}:18487: testing checking for library "$cf_db_libs" ..." 1>&5
18488
18489         cat >conftest.$ac_ext <<_ACEOF
18490 #line 18490 "configure"
18491 #include "confdefs.h"
18492
18493 $ac_includes_default
18494 #include <db.h>
18495
18496 int
18497 main ()
18498 {
18499
18500         char *path = "/tmp/foo";
18501 #ifdef DB_VERSION_MAJOR
18502 #if DB_VERSION_MAJOR >= 4
18503         DB *result = 0;
18504         db_create(&result, NULL, 0);
18505         result->open(result,
18506                 NULL,
18507                 path,
18508                 path,
18509                 DB_HASH,
18510                 DB_CREATE,
18511                 0644);
18512 #elif DB_VERSION_MAJOR >= 3
18513         DB *result = 0;
18514         db_create(&result, NULL, 0);
18515         result->open(result,
18516                 path,
18517                 path,
18518                 DB_HASH,
18519                 DB_CREATE,
18520                 0644);
18521 #elif DB_VERSION_MAJOR >= 2
18522         DB *result = 0;
18523         db_open(path,
18524                 DB_HASH,
18525                 DB_CREATE,
18526                 0644,
18527                 (DB_ENV *) 0,
18528                 (DB_INFO *) 0,
18529                 &result);
18530 #endif /* DB_VERSION_MAJOR */
18531 #else
18532         DB *result = dbopen(path,
18533                      2,
18534                      0644,
18535                      DB_HASH,
18536                      0);
18537 #endif
18538         ${cf_cv_main_return:-return}(result != 0)
18539
18540   ;
18541   return 0;
18542 }
18543 _ACEOF
18544 rm -f conftest.$ac_objext conftest$ac_exeext
18545 if { (eval echo "$as_me:18545: \"$ac_link\"") >&5
18546   (eval $ac_link) 2>&5
18547   ac_status=$?
18548   echo "$as_me:18548: \$? = $ac_status" >&5
18549   (exit $ac_status); } &&
18550          { ac_try='test -s conftest$ac_exeext'
18551   { (eval echo "$as_me:18551: \"$ac_try\"") >&5
18552   (eval $ac_try) 2>&5
18553   ac_status=$?
18554   echo "$as_me:18554: \$? = $ac_status" >&5
18555   (exit $ac_status); }; }; then
18556
18557         if test -n "$cf_db_libs" ; then
18558                 cf_cv_hashed_db_libs=$cf_db_libs
18559         else
18560                 cf_cv_hashed_db_libs=default
18561         fi
18562         LIBS="$cf_save_libs"
18563         break
18564
18565 else
18566   echo "$as_me: failed program was:" >&5
18567 cat conftest.$ac_ext >&5
18568 fi
18569 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18570         LIBS="$cf_save_libs"
18571 done
18572
18573 fi
18574 echo "$as_me:18574: result: $cf_cv_hashed_db_libs" >&5
18575 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
18576
18577         if test "$cf_cv_hashed_db_libs" = unknown ; then
18578                 { { echo "$as_me:18578: error: Cannot determine library for db" >&5
18579 echo "$as_me: error: Cannot determine library for db" >&2;}
18580    { (exit 1); exit 1; }; }
18581         elif test "$cf_cv_hashed_db_libs" != default ; then
18582
18583 cf_add_libs="-l$cf_cv_hashed_db_libs"
18584 # Filter out duplicates - this happens with badly-designed ".pc" files...
18585 for cf_add_1lib in $LIBS
18586 do
18587         for cf_add_2lib in $cf_add_libs
18588         do
18589                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18590                 then
18591                         cf_add_1lib=
18592                         break
18593                 fi
18594         done
18595         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18596 done
18597 LIBS="$cf_add_libs"
18598
18599         fi
18600 fi
18601
18602 else
18603
18604         { { echo "$as_me:18604: error: Cannot find db.h" >&5
18605 echo "$as_me: error: Cannot find db.h" >&2;}
18606    { (exit 1); exit 1; }; }
18607
18608 fi
18609
18610 fi
18611
18612 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
18613         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18614         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18615 fi
18616
18617 # Just in case, check if the C compiler has a bool type.
18618
18619 echo "$as_me:18619: checking if we should include stdbool.h" >&5
18620 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18621
18622 if test "${cf_cv_header_stdbool_h+set}" = set; then
18623   echo $ECHO_N "(cached) $ECHO_C" >&6
18624 else
18625
18626         cat >conftest.$ac_ext <<_ACEOF
18627 #line 18627 "configure"
18628 #include "confdefs.h"
18629
18630 int
18631 main ()
18632 {
18633 bool foo = false
18634   ;
18635   return 0;
18636 }
18637 _ACEOF
18638 rm -f conftest.$ac_objext
18639 if { (eval echo "$as_me:18639: \"$ac_compile\"") >&5
18640   (eval $ac_compile) 2>&5
18641   ac_status=$?
18642   echo "$as_me:18642: \$? = $ac_status" >&5
18643   (exit $ac_status); } &&
18644          { ac_try='test -s conftest.$ac_objext'
18645   { (eval echo "$as_me:18645: \"$ac_try\"") >&5
18646   (eval $ac_try) 2>&5
18647   ac_status=$?
18648   echo "$as_me:18648: \$? = $ac_status" >&5
18649   (exit $ac_status); }; }; then
18650   cf_cv_header_stdbool_h=0
18651 else
18652   echo "$as_me: failed program was:" >&5
18653 cat conftest.$ac_ext >&5
18654 cat >conftest.$ac_ext <<_ACEOF
18655 #line 18655 "configure"
18656 #include "confdefs.h"
18657
18658 #ifndef __BEOS__
18659 #include <stdbool.h>
18660 #endif
18661
18662 int
18663 main ()
18664 {
18665 bool foo = false
18666   ;
18667   return 0;
18668 }
18669 _ACEOF
18670 rm -f conftest.$ac_objext
18671 if { (eval echo "$as_me:18671: \"$ac_compile\"") >&5
18672   (eval $ac_compile) 2>&5
18673   ac_status=$?
18674   echo "$as_me:18674: \$? = $ac_status" >&5
18675   (exit $ac_status); } &&
18676          { ac_try='test -s conftest.$ac_objext'
18677   { (eval echo "$as_me:18677: \"$ac_try\"") >&5
18678   (eval $ac_try) 2>&5
18679   ac_status=$?
18680   echo "$as_me:18680: \$? = $ac_status" >&5
18681   (exit $ac_status); }; }; then
18682   cf_cv_header_stdbool_h=1
18683 else
18684   echo "$as_me: failed program was:" >&5
18685 cat conftest.$ac_ext >&5
18686 cf_cv_header_stdbool_h=0
18687 fi
18688 rm -f conftest.$ac_objext conftest.$ac_ext
18689 fi
18690 rm -f conftest.$ac_objext conftest.$ac_ext
18691 fi
18692
18693 if test "$cf_cv_header_stdbool_h" = 1
18694 then    echo "$as_me:18694: result: yes" >&5
18695 echo "${ECHO_T}yes" >&6
18696 else    echo "$as_me:18696: result: no" >&5
18697 echo "${ECHO_T}no" >&6
18698 fi
18699
18700 echo "$as_me:18700: checking for builtin bool type" >&5
18701 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18702
18703 if test "${cf_cv_cc_bool_type+set}" = set; then
18704   echo $ECHO_N "(cached) $ECHO_C" >&6
18705 else
18706
18707         cat >conftest.$ac_ext <<_ACEOF
18708 #line 18708 "configure"
18709 #include "confdefs.h"
18710
18711 #include <stdio.h>
18712 #include <sys/types.h>
18713
18714 int
18715 main ()
18716 {
18717 bool x = false
18718   ;
18719   return 0;
18720 }
18721 _ACEOF
18722 rm -f conftest.$ac_objext
18723 if { (eval echo "$as_me:18723: \"$ac_compile\"") >&5
18724   (eval $ac_compile) 2>&5
18725   ac_status=$?
18726   echo "$as_me:18726: \$? = $ac_status" >&5
18727   (exit $ac_status); } &&
18728          { ac_try='test -s conftest.$ac_objext'
18729   { (eval echo "$as_me:18729: \"$ac_try\"") >&5
18730   (eval $ac_try) 2>&5
18731   ac_status=$?
18732   echo "$as_me:18732: \$? = $ac_status" >&5
18733   (exit $ac_status); }; }; then
18734   cf_cv_cc_bool_type=1
18735 else
18736   echo "$as_me: failed program was:" >&5
18737 cat conftest.$ac_ext >&5
18738 cf_cv_cc_bool_type=0
18739 fi
18740 rm -f conftest.$ac_objext conftest.$ac_ext
18741
18742 fi
18743
18744 if test "$cf_cv_cc_bool_type" = 1
18745 then    echo "$as_me:18745: result: yes" >&5
18746 echo "${ECHO_T}yes" >&6
18747 else    echo "$as_me:18747: result: no" >&5
18748 echo "${ECHO_T}no" >&6
18749 fi
18750
18751 # Check for C++ compiler characteristics (and ensure that it's there!)
18752 if test -n "$CXX" ; then
18753         ac_ext=cc
18754 ac_cpp='$CXXCPP $CPPFLAGS'
18755 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18756 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18757 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18758 ac_main_return=return
18759
18760 if test -n "$GXX" ; then
18761 case $cf_cv_system_name in #(vi
18762 os2*) #(vi
18763         cf_stdcpp_libname=stdcpp
18764         ;;
18765 *)
18766         cf_stdcpp_libname=stdc++
18767         ;;
18768 esac
18769 echo "$as_me:18769: checking for library $cf_stdcpp_libname" >&5
18770 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
18771 if test "${cf_cv_libstdcpp+set}" = set; then
18772   echo $ECHO_N "(cached) $ECHO_C" >&6
18773 else
18774
18775         cf_save="$LIBS"
18776
18777 cf_add_libs="-l$cf_stdcpp_libname"
18778 # Filter out duplicates - this happens with badly-designed ".pc" files...
18779 for cf_add_1lib in $LIBS
18780 do
18781         for cf_add_2lib in $cf_add_libs
18782         do
18783                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18784                 then
18785                         cf_add_1lib=
18786                         break
18787                 fi
18788         done
18789         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18790 done
18791 LIBS="$cf_add_libs"
18792
18793 cat >conftest.$ac_ext <<_ACEOF
18794 #line 18794 "configure"
18795 #include "confdefs.h"
18796
18797 #include <strstream.h>
18798 int
18799 main ()
18800 {
18801
18802 char buf[80];
18803 strstreambuf foo(buf, sizeof(buf))
18804
18805   ;
18806   return 0;
18807 }
18808 _ACEOF
18809 rm -f conftest.$ac_objext conftest$ac_exeext
18810 if { (eval echo "$as_me:18810: \"$ac_link\"") >&5
18811   (eval $ac_link) 2>&5
18812   ac_status=$?
18813   echo "$as_me:18813: \$? = $ac_status" >&5
18814   (exit $ac_status); } &&
18815          { ac_try='test -s conftest$ac_exeext'
18816   { (eval echo "$as_me:18816: \"$ac_try\"") >&5
18817   (eval $ac_try) 2>&5
18818   ac_status=$?
18819   echo "$as_me:18819: \$? = $ac_status" >&5
18820   (exit $ac_status); }; }; then
18821   cf_cv_libstdcpp=yes
18822 else
18823   echo "$as_me: failed program was:" >&5
18824 cat conftest.$ac_ext >&5
18825 cf_cv_libstdcpp=no
18826 fi
18827 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18828         LIBS="$cf_save"
18829
18830 fi
18831 echo "$as_me:18831: result: $cf_cv_libstdcpp" >&5
18832 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18833 test "$cf_cv_libstdcpp" = yes &&
18834 cf_add_libs="-l$cf_stdcpp_libname"
18835 # Filter out duplicates - this happens with badly-designed ".pc" files...
18836 for cf_add_1lib in $CXXLIBS
18837 do
18838         for cf_add_2lib in $cf_add_libs
18839         do
18840                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18841                 then
18842                         cf_add_1lib=
18843                         break
18844                 fi
18845         done
18846         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18847 done
18848 CXXLIBS="$cf_add_libs"
18849
18850 fi
18851
18852         echo "$as_me:18852: checking whether $CXX understands -c and -o together" >&5
18853 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18854 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18855   echo $ECHO_N "(cached) $ECHO_C" >&6
18856 else
18857
18858 cat > conftest.$ac_ext <<CF_EOF
18859 #include <stdio.h>
18860 int main()
18861 {
18862         ${cf_cv_main_return:-return}(0);
18863 }
18864 CF_EOF
18865 # We do the test twice because some compilers refuse to overwrite an
18866 # existing .o file with -o, though they will create one.
18867 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18868 if { (eval echo "$as_me:18868: \"$ac_try\"") >&5
18869   (eval $ac_try) 2>&5
18870   ac_status=$?
18871   echo "$as_me:18871: \$? = $ac_status" >&5
18872   (exit $ac_status); } &&
18873   test -f conftest2.$ac_objext && { (eval echo "$as_me:18873: \"$ac_try\"") >&5
18874   (eval $ac_try) 2>&5
18875   ac_status=$?
18876   echo "$as_me:18876: \$? = $ac_status" >&5
18877   (exit $ac_status); };
18878 then
18879   eval cf_cv_prog_CXX_c_o=yes
18880 else
18881   eval cf_cv_prog_CXX_c_o=no
18882 fi
18883 rm -rf conftest*
18884
18885 fi
18886 if test $cf_cv_prog_CXX_c_o = yes; then
18887   echo "$as_me:18887: result: yes" >&5
18888 echo "${ECHO_T}yes" >&6
18889 else
18890   echo "$as_me:18890: result: no" >&5
18891 echo "${ECHO_T}no" >&6
18892 fi
18893
18894         case $GXX_VERSION in
18895         1*|2.0-6*)
18896                 cf_cxx_library=yes
18897                 ;;
18898         *-2.7*|2.7*)
18899
18900 cf_cxx_library=unknown
18901 case $cf_cv_system_name in #(vi
18902 os2*) #(vi
18903         cf_gpp_libname=gpp
18904         ;;
18905 *)
18906         cf_gpp_libname=g++
18907         ;;
18908 esac
18909 if test "$GXX" = yes; then
18910         echo "$as_me:18910: checking for lib$cf_gpp_libname" >&5
18911 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18912         cf_save="$LIBS"
18913
18914 cf_add_libs="-l$cf_gpp_libname"
18915 # Filter out duplicates - this happens with badly-designed ".pc" files...
18916 for cf_add_1lib in $LIBS
18917 do
18918         for cf_add_2lib in $cf_add_libs
18919         do
18920                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18921                 then
18922                         cf_add_1lib=
18923                         break
18924                 fi
18925         done
18926         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18927 done
18928 LIBS="$cf_add_libs"
18929
18930         cat >conftest.$ac_ext <<_ACEOF
18931 #line 18931 "configure"
18932 #include "confdefs.h"
18933
18934 #include <$cf_gpp_libname/builtin.h>
18935
18936 int
18937 main ()
18938 {
18939 two_arg_error_handler_t foo2 = lib_error_handler
18940   ;
18941   return 0;
18942 }
18943 _ACEOF
18944 rm -f conftest.$ac_objext conftest$ac_exeext
18945 if { (eval echo "$as_me:18945: \"$ac_link\"") >&5
18946   (eval $ac_link) 2>&5
18947   ac_status=$?
18948   echo "$as_me:18948: \$? = $ac_status" >&5
18949   (exit $ac_status); } &&
18950          { ac_try='test -s conftest$ac_exeext'
18951   { (eval echo "$as_me:18951: \"$ac_try\"") >&5
18952   (eval $ac_try) 2>&5
18953   ac_status=$?
18954   echo "$as_me:18954: \$? = $ac_status" >&5
18955   (exit $ac_status); }; }; then
18956   cf_cxx_library=yes
18957
18958 cf_add_libs="-l$cf_gpp_libname"
18959 # Filter out duplicates - this happens with badly-designed ".pc" files...
18960 for cf_add_1lib in $CXXLIBS
18961 do
18962         for cf_add_2lib in $cf_add_libs
18963         do
18964                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18965                 then
18966                         cf_add_1lib=
18967                         break
18968                 fi
18969         done
18970         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18971 done
18972 CXXLIBS="$cf_add_libs"
18973
18974          if test "$cf_gpp_libname" = cpp ; then
18975
18976 cat >>confdefs.h <<\EOF
18977 #define HAVE_GPP_BUILTIN_H 1
18978 EOF
18979
18980          else
18981
18982 cat >>confdefs.h <<\EOF
18983 #define HAVE_GXX_BUILTIN_H 1
18984 EOF
18985
18986          fi
18987 else
18988   echo "$as_me: failed program was:" >&5
18989 cat conftest.$ac_ext >&5
18990 cat >conftest.$ac_ext <<_ACEOF
18991 #line 18991 "configure"
18992 #include "confdefs.h"
18993
18994 #include <builtin.h>
18995
18996 int
18997 main ()
18998 {
18999 two_arg_error_handler_t foo2 = lib_error_handler
19000   ;
19001   return 0;
19002 }
19003 _ACEOF
19004 rm -f conftest.$ac_objext conftest$ac_exeext
19005 if { (eval echo "$as_me:19005: \"$ac_link\"") >&5
19006   (eval $ac_link) 2>&5
19007   ac_status=$?
19008   echo "$as_me:19008: \$? = $ac_status" >&5
19009   (exit $ac_status); } &&
19010          { ac_try='test -s conftest$ac_exeext'
19011   { (eval echo "$as_me:19011: \"$ac_try\"") >&5
19012   (eval $ac_try) 2>&5
19013   ac_status=$?
19014   echo "$as_me:19014: \$? = $ac_status" >&5
19015   (exit $ac_status); }; }; then
19016   cf_cxx_library=yes
19017
19018 cf_add_libs="-l$cf_gpp_libname"
19019 # Filter out duplicates - this happens with badly-designed ".pc" files...
19020 for cf_add_1lib in $CXXLIBS
19021 do
19022         for cf_add_2lib in $cf_add_libs
19023         do
19024                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19025                 then
19026                         cf_add_1lib=
19027                         break
19028                 fi
19029         done
19030         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19031 done
19032 CXXLIBS="$cf_add_libs"
19033
19034 cat >>confdefs.h <<\EOF
19035 #define HAVE_BUILTIN_H 1
19036 EOF
19037
19038 else
19039   echo "$as_me: failed program was:" >&5
19040 cat conftest.$ac_ext >&5
19041 cf_cxx_library=no
19042 fi
19043 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19044 fi
19045 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19046         LIBS="$cf_save"
19047         echo "$as_me:19047: result: $cf_cxx_library" >&5
19048 echo "${ECHO_T}$cf_cxx_library" >&6
19049 fi
19050
19051                 ;;
19052         *)
19053                 cf_cxx_library=no
19054                 ;;
19055         esac
19056
19057         ac_ext=cc
19058 ac_cpp='$CXXCPP $CPPFLAGS'
19059 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19060 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19061 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19062 ac_main_return=return
19063 echo "$as_me:19063: checking how to run the C++ preprocessor" >&5
19064 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19065 if test -z "$CXXCPP"; then
19066   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19067   echo $ECHO_N "(cached) $ECHO_C" >&6
19068 else
19069       # Double quotes because CXXCPP needs to be expanded
19070     for CXXCPP in "$CXX -E" "/lib/cpp"
19071     do
19072       ac_preproc_ok=false
19073 for ac_cxx_preproc_warn_flag in '' yes
19074 do
19075   # Use a header file that comes with gcc, so configuring glibc
19076   # with a fresh cross-compiler works.
19077   # On the NeXT, cc -E runs the code through the compiler's parser,
19078   # not just through cpp. "Syntax error" is here to catch this case.
19079   cat >conftest.$ac_ext <<_ACEOF
19080 #line 19080 "configure"
19081 #include "confdefs.h"
19082 #include <assert.h>
19083                      Syntax error
19084 _ACEOF
19085 if { (eval echo "$as_me:19085: \"$ac_cpp conftest.$ac_ext\"") >&5
19086   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19087   ac_status=$?
19088   egrep -v '^ *\+' conftest.er1 >conftest.err
19089   rm -f conftest.er1
19090   cat conftest.err >&5
19091   echo "$as_me:19091: \$? = $ac_status" >&5
19092   (exit $ac_status); } >/dev/null; then
19093   if test -s conftest.err; then
19094     ac_cpp_err=$ac_cxx_preproc_warn_flag
19095   else
19096     ac_cpp_err=
19097   fi
19098 else
19099   ac_cpp_err=yes
19100 fi
19101 if test -z "$ac_cpp_err"; then
19102   :
19103 else
19104   echo "$as_me: failed program was:" >&5
19105   cat conftest.$ac_ext >&5
19106   # Broken: fails on valid input.
19107 continue
19108 fi
19109 rm -f conftest.err conftest.$ac_ext
19110
19111   # OK, works on sane cases.  Now check whether non-existent headers
19112   # can be detected and how.
19113   cat >conftest.$ac_ext <<_ACEOF
19114 #line 19114 "configure"
19115 #include "confdefs.h"
19116 #include <ac_nonexistent.h>
19117 _ACEOF
19118 if { (eval echo "$as_me:19118: \"$ac_cpp conftest.$ac_ext\"") >&5
19119   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19120   ac_status=$?
19121   egrep -v '^ *\+' conftest.er1 >conftest.err
19122   rm -f conftest.er1
19123   cat conftest.err >&5
19124   echo "$as_me:19124: \$? = $ac_status" >&5
19125   (exit $ac_status); } >/dev/null; then
19126   if test -s conftest.err; then
19127     ac_cpp_err=$ac_cxx_preproc_warn_flag
19128   else
19129     ac_cpp_err=
19130   fi
19131 else
19132   ac_cpp_err=yes
19133 fi
19134 if test -z "$ac_cpp_err"; then
19135   # Broken: success on invalid input.
19136 continue
19137 else
19138   echo "$as_me: failed program was:" >&5
19139   cat conftest.$ac_ext >&5
19140   # Passes both tests.
19141 ac_preproc_ok=:
19142 break
19143 fi
19144 rm -f conftest.err conftest.$ac_ext
19145
19146 done
19147 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19148 rm -f conftest.err conftest.$ac_ext
19149 if $ac_preproc_ok; then
19150   break
19151 fi
19152
19153     done
19154     ac_cv_prog_CXXCPP=$CXXCPP
19155
19156 fi
19157   CXXCPP=$ac_cv_prog_CXXCPP
19158 else
19159   ac_cv_prog_CXXCPP=$CXXCPP
19160 fi
19161 echo "$as_me:19161: result: $CXXCPP" >&5
19162 echo "${ECHO_T}$CXXCPP" >&6
19163 ac_preproc_ok=false
19164 for ac_cxx_preproc_warn_flag in '' yes
19165 do
19166   # Use a header file that comes with gcc, so configuring glibc
19167   # with a fresh cross-compiler works.
19168   # On the NeXT, cc -E runs the code through the compiler's parser,
19169   # not just through cpp. "Syntax error" is here to catch this case.
19170   cat >conftest.$ac_ext <<_ACEOF
19171 #line 19171 "configure"
19172 #include "confdefs.h"
19173 #include <assert.h>
19174                      Syntax error
19175 _ACEOF
19176 if { (eval echo "$as_me:19176: \"$ac_cpp conftest.$ac_ext\"") >&5
19177   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19178   ac_status=$?
19179   egrep -v '^ *\+' conftest.er1 >conftest.err
19180   rm -f conftest.er1
19181   cat conftest.err >&5
19182   echo "$as_me:19182: \$? = $ac_status" >&5
19183   (exit $ac_status); } >/dev/null; then
19184   if test -s conftest.err; then
19185     ac_cpp_err=$ac_cxx_preproc_warn_flag
19186   else
19187     ac_cpp_err=
19188   fi
19189 else
19190   ac_cpp_err=yes
19191 fi
19192 if test -z "$ac_cpp_err"; then
19193   :
19194 else
19195   echo "$as_me: failed program was:" >&5
19196   cat conftest.$ac_ext >&5
19197   # Broken: fails on valid input.
19198 continue
19199 fi
19200 rm -f conftest.err conftest.$ac_ext
19201
19202   # OK, works on sane cases.  Now check whether non-existent headers
19203   # can be detected and how.
19204   cat >conftest.$ac_ext <<_ACEOF
19205 #line 19205 "configure"
19206 #include "confdefs.h"
19207 #include <ac_nonexistent.h>
19208 _ACEOF
19209 if { (eval echo "$as_me:19209: \"$ac_cpp conftest.$ac_ext\"") >&5
19210   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19211   ac_status=$?
19212   egrep -v '^ *\+' conftest.er1 >conftest.err
19213   rm -f conftest.er1
19214   cat conftest.err >&5
19215   echo "$as_me:19215: \$? = $ac_status" >&5
19216   (exit $ac_status); } >/dev/null; then
19217   if test -s conftest.err; then
19218     ac_cpp_err=$ac_cxx_preproc_warn_flag
19219   else
19220     ac_cpp_err=
19221   fi
19222 else
19223   ac_cpp_err=yes
19224 fi
19225 if test -z "$ac_cpp_err"; then
19226   # Broken: success on invalid input.
19227 continue
19228 else
19229   echo "$as_me: failed program was:" >&5
19230   cat conftest.$ac_ext >&5
19231   # Passes both tests.
19232 ac_preproc_ok=:
19233 break
19234 fi
19235 rm -f conftest.err conftest.$ac_ext
19236
19237 done
19238 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19239 rm -f conftest.err conftest.$ac_ext
19240 if $ac_preproc_ok; then
19241   :
19242 else
19243   { { echo "$as_me:19243: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19244 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19245    { (exit 1); exit 1; }; }
19246 fi
19247
19248 ac_ext=cc
19249 ac_cpp='$CXXCPP $CPPFLAGS'
19250 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19251 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19252 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19253 ac_main_return=return
19254
19255 for ac_header in typeinfo
19256 do
19257 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19258 echo "$as_me:19258: checking for $ac_header" >&5
19259 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19260 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19261   echo $ECHO_N "(cached) $ECHO_C" >&6
19262 else
19263   cat >conftest.$ac_ext <<_ACEOF
19264 #line 19264 "configure"
19265 #include "confdefs.h"
19266 #include <$ac_header>
19267 _ACEOF
19268 if { (eval echo "$as_me:19268: \"$ac_cpp conftest.$ac_ext\"") >&5
19269   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19270   ac_status=$?
19271   egrep -v '^ *\+' conftest.er1 >conftest.err
19272   rm -f conftest.er1
19273   cat conftest.err >&5
19274   echo "$as_me:19274: \$? = $ac_status" >&5
19275   (exit $ac_status); } >/dev/null; then
19276   if test -s conftest.err; then
19277     ac_cpp_err=$ac_cxx_preproc_warn_flag
19278   else
19279     ac_cpp_err=
19280   fi
19281 else
19282   ac_cpp_err=yes
19283 fi
19284 if test -z "$ac_cpp_err"; then
19285   eval "$as_ac_Header=yes"
19286 else
19287   echo "$as_me: failed program was:" >&5
19288   cat conftest.$ac_ext >&5
19289   eval "$as_ac_Header=no"
19290 fi
19291 rm -f conftest.err conftest.$ac_ext
19292 fi
19293 echo "$as_me:19293: result: `eval echo '${'$as_ac_Header'}'`" >&5
19294 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19295 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19296   cat >>confdefs.h <<EOF
19297 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19298 EOF
19299
19300 fi
19301 done
19302
19303 for ac_header in iostream
19304 do
19305 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19306 echo "$as_me:19306: checking for $ac_header" >&5
19307 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19308 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19309   echo $ECHO_N "(cached) $ECHO_C" >&6
19310 else
19311   cat >conftest.$ac_ext <<_ACEOF
19312 #line 19312 "configure"
19313 #include "confdefs.h"
19314 #include <$ac_header>
19315 _ACEOF
19316 if { (eval echo "$as_me:19316: \"$ac_cpp conftest.$ac_ext\"") >&5
19317   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19318   ac_status=$?
19319   egrep -v '^ *\+' conftest.er1 >conftest.err
19320   rm -f conftest.er1
19321   cat conftest.err >&5
19322   echo "$as_me:19322: \$? = $ac_status" >&5
19323   (exit $ac_status); } >/dev/null; then
19324   if test -s conftest.err; then
19325     ac_cpp_err=$ac_cxx_preproc_warn_flag
19326   else
19327     ac_cpp_err=
19328   fi
19329 else
19330   ac_cpp_err=yes
19331 fi
19332 if test -z "$ac_cpp_err"; then
19333   eval "$as_ac_Header=yes"
19334 else
19335   echo "$as_me: failed program was:" >&5
19336   cat conftest.$ac_ext >&5
19337   eval "$as_ac_Header=no"
19338 fi
19339 rm -f conftest.err conftest.$ac_ext
19340 fi
19341 echo "$as_me:19341: result: `eval echo '${'$as_ac_Header'}'`" >&5
19342 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19343 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19344   cat >>confdefs.h <<EOF
19345 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19346 EOF
19347
19348 fi
19349 done
19350
19351 if test x"$ac_cv_header_iostream" = xyes ; then
19352         echo "$as_me:19352: checking if iostream uses std-namespace" >&5
19353 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
19354         cat >conftest.$ac_ext <<_ACEOF
19355 #line 19355 "configure"
19356 #include "confdefs.h"
19357
19358 #include <iostream>
19359 using std::endl;
19360 using std::cerr;
19361 int
19362 main ()
19363 {
19364
19365 cerr << "testing" << endl;
19366
19367   ;
19368   return 0;
19369 }
19370 _ACEOF
19371 rm -f conftest.$ac_objext
19372 if { (eval echo "$as_me:19372: \"$ac_compile\"") >&5
19373   (eval $ac_compile) 2>&5
19374   ac_status=$?
19375   echo "$as_me:19375: \$? = $ac_status" >&5
19376   (exit $ac_status); } &&
19377          { ac_try='test -s conftest.$ac_objext'
19378   { (eval echo "$as_me:19378: \"$ac_try\"") >&5
19379   (eval $ac_try) 2>&5
19380   ac_status=$?
19381   echo "$as_me:19381: \$? = $ac_status" >&5
19382   (exit $ac_status); }; }; then
19383   cf_iostream_namespace=yes
19384 else
19385   echo "$as_me: failed program was:" >&5
19386 cat conftest.$ac_ext >&5
19387 cf_iostream_namespace=no
19388 fi
19389 rm -f conftest.$ac_objext conftest.$ac_ext
19390         echo "$as_me:19390: result: $cf_iostream_namespace" >&5
19391 echo "${ECHO_T}$cf_iostream_namespace" >&6
19392         if test "$cf_iostream_namespace" = yes ; then
19393
19394 cat >>confdefs.h <<\EOF
19395 #define IOSTREAM_NAMESPACE 1
19396 EOF
19397
19398         fi
19399 fi
19400
19401 echo "$as_me:19401: checking if we should include stdbool.h" >&5
19402 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19403
19404 if test "${cf_cv_header_stdbool_h+set}" = set; then
19405   echo $ECHO_N "(cached) $ECHO_C" >&6
19406 else
19407
19408         cat >conftest.$ac_ext <<_ACEOF
19409 #line 19409 "configure"
19410 #include "confdefs.h"
19411
19412 int
19413 main ()
19414 {
19415 bool foo = false
19416   ;
19417   return 0;
19418 }
19419 _ACEOF
19420 rm -f conftest.$ac_objext
19421 if { (eval echo "$as_me:19421: \"$ac_compile\"") >&5
19422   (eval $ac_compile) 2>&5
19423   ac_status=$?
19424   echo "$as_me:19424: \$? = $ac_status" >&5
19425   (exit $ac_status); } &&
19426          { ac_try='test -s conftest.$ac_objext'
19427   { (eval echo "$as_me:19427: \"$ac_try\"") >&5
19428   (eval $ac_try) 2>&5
19429   ac_status=$?
19430   echo "$as_me:19430: \$? = $ac_status" >&5
19431   (exit $ac_status); }; }; then
19432   cf_cv_header_stdbool_h=0
19433 else
19434   echo "$as_me: failed program was:" >&5
19435 cat conftest.$ac_ext >&5
19436 cat >conftest.$ac_ext <<_ACEOF
19437 #line 19437 "configure"
19438 #include "confdefs.h"
19439
19440 #ifndef __BEOS__
19441 #include <stdbool.h>
19442 #endif
19443
19444 int
19445 main ()
19446 {
19447 bool foo = false
19448   ;
19449   return 0;
19450 }
19451 _ACEOF
19452 rm -f conftest.$ac_objext
19453 if { (eval echo "$as_me:19453: \"$ac_compile\"") >&5
19454   (eval $ac_compile) 2>&5
19455   ac_status=$?
19456   echo "$as_me:19456: \$? = $ac_status" >&5
19457   (exit $ac_status); } &&
19458          { ac_try='test -s conftest.$ac_objext'
19459   { (eval echo "$as_me:19459: \"$ac_try\"") >&5
19460   (eval $ac_try) 2>&5
19461   ac_status=$?
19462   echo "$as_me:19462: \$? = $ac_status" >&5
19463   (exit $ac_status); }; }; then
19464   cf_cv_header_stdbool_h=1
19465 else
19466   echo "$as_me: failed program was:" >&5
19467 cat conftest.$ac_ext >&5
19468 cf_cv_header_stdbool_h=0
19469 fi
19470 rm -f conftest.$ac_objext conftest.$ac_ext
19471 fi
19472 rm -f conftest.$ac_objext conftest.$ac_ext
19473 fi
19474
19475 if test "$cf_cv_header_stdbool_h" = 1
19476 then    echo "$as_me:19476: result: yes" >&5
19477 echo "${ECHO_T}yes" >&6
19478 else    echo "$as_me:19478: result: no" >&5
19479 echo "${ECHO_T}no" >&6
19480 fi
19481
19482 echo "$as_me:19482: checking for builtin bool type" >&5
19483 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19484
19485 if test "${cf_cv_builtin_bool+set}" = set; then
19486   echo $ECHO_N "(cached) $ECHO_C" >&6
19487 else
19488
19489         cat >conftest.$ac_ext <<_ACEOF
19490 #line 19490 "configure"
19491 #include "confdefs.h"
19492
19493 #include <stdio.h>
19494 #include <sys/types.h>
19495
19496 int
19497 main ()
19498 {
19499 bool x = false
19500   ;
19501   return 0;
19502 }
19503 _ACEOF
19504 rm -f conftest.$ac_objext
19505 if { (eval echo "$as_me:19505: \"$ac_compile\"") >&5
19506   (eval $ac_compile) 2>&5
19507   ac_status=$?
19508   echo "$as_me:19508: \$? = $ac_status" >&5
19509   (exit $ac_status); } &&
19510          { ac_try='test -s conftest.$ac_objext'
19511   { (eval echo "$as_me:19511: \"$ac_try\"") >&5
19512   (eval $ac_try) 2>&5
19513   ac_status=$?
19514   echo "$as_me:19514: \$? = $ac_status" >&5
19515   (exit $ac_status); }; }; then
19516   cf_cv_builtin_bool=1
19517 else
19518   echo "$as_me: failed program was:" >&5
19519 cat conftest.$ac_ext >&5
19520 cf_cv_builtin_bool=0
19521 fi
19522 rm -f conftest.$ac_objext conftest.$ac_ext
19523
19524 fi
19525
19526 if test "$cf_cv_builtin_bool" = 1
19527 then    echo "$as_me:19527: result: yes" >&5
19528 echo "${ECHO_T}yes" >&6
19529 else    echo "$as_me:19529: result: no" >&5
19530 echo "${ECHO_T}no" >&6
19531 fi
19532
19533 echo "$as_me:19533: checking for size of bool" >&5
19534 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19535 if test "${cf_cv_type_of_bool+set}" = set; then
19536   echo $ECHO_N "(cached) $ECHO_C" >&6
19537 else
19538
19539         rm -f cf_test.out
19540         if test "$cross_compiling" = yes; then
19541   cf_cv_type_of_bool=unknown
19542 else
19543   cat >conftest.$ac_ext <<_ACEOF
19544 #line 19544 "configure"
19545 #include "confdefs.h"
19546
19547 #include <stdlib.h>
19548 #include <stdio.h>
19549
19550 #if defined(__cplusplus)
19551
19552 #ifdef HAVE_GXX_BUILTIN_H
19553 #include <g++/builtin.h>
19554 #elif HAVE_GPP_BUILTIN_H
19555 #include <gpp/builtin.h>
19556 #elif HAVE_BUILTIN_H
19557 #include <builtin.h>
19558 #endif
19559
19560 #else
19561
19562 #if $cf_cv_header_stdbool_h
19563 #include <stdbool.h>
19564 #endif
19565
19566 #endif
19567
19568 int main()
19569 {
19570         FILE *fp = fopen("cf_test.out", "w");
19571         if (fp != 0) {
19572                 bool x = true;
19573                 if ((bool)(-x) >= 0)
19574                         fputs("unsigned ", fp);
19575                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19576                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19577                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19578                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19579                 fclose(fp);
19580         }
19581         ${cf_cv_main_return:-return}(0);
19582 }
19583
19584 _ACEOF
19585 rm -f conftest$ac_exeext
19586 if { (eval echo "$as_me:19586: \"$ac_link\"") >&5
19587   (eval $ac_link) 2>&5
19588   ac_status=$?
19589   echo "$as_me:19589: \$? = $ac_status" >&5
19590   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19591   { (eval echo "$as_me:19591: \"$ac_try\"") >&5
19592   (eval $ac_try) 2>&5
19593   ac_status=$?
19594   echo "$as_me:19594: \$? = $ac_status" >&5
19595   (exit $ac_status); }; }; then
19596   cf_cv_type_of_bool=`cat cf_test.out`
19597                  if test -z "$cf_cv_type_of_bool"; then
19598                    cf_cv_type_of_bool=unknown
19599                  fi
19600 else
19601   echo "$as_me: program exited with status $ac_status" >&5
19602 echo "$as_me: failed program was:" >&5
19603 cat conftest.$ac_ext >&5
19604 cf_cv_type_of_bool=unknown
19605 fi
19606 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19607 fi
19608
19609 fi
19610
19611         rm -f cf_test.out
19612 echo "$as_me:19612: result: $cf_cv_type_of_bool" >&5
19613 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19614 if test "$cf_cv_type_of_bool" = unknown ; then
19615         case .$NCURSES_BOOL in #(vi
19616         .auto|.) NCURSES_BOOL=unsigned;;
19617         esac
19618         { echo "$as_me:19618: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19619 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19620         cf_cv_type_of_bool=$NCURSES_BOOL
19621 fi
19622
19623 echo "$as_me:19623: checking for special defines needed for etip.h" >&5
19624 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
19625 cf_save_CXXFLAGS="$CXXFLAGS"
19626 cf_result="none"
19627
19628 # etip.h includes ncurses.h which includes ncurses_dll.h
19629 # But ncurses_dll.h is generated - fix here.
19630 test -d include || mkdir include
19631 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
19632
19633 for cf_math in "" MATH_H
19634 do
19635 for cf_excp in "" MATH_EXCEPTION
19636 do
19637         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
19638         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
19639         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
19640 cat >conftest.$ac_ext <<_ACEOF
19641 #line 19641 "configure"
19642 #include "confdefs.h"
19643
19644 #include <etip.h.in>
19645
19646 int
19647 main ()
19648 {
19649
19650   ;
19651   return 0;
19652 }
19653 _ACEOF
19654 rm -f conftest.$ac_objext
19655 if { (eval echo "$as_me:19655: \"$ac_compile\"") >&5
19656   (eval $ac_compile) 2>&5
19657   ac_status=$?
19658   echo "$as_me:19658: \$? = $ac_status" >&5
19659   (exit $ac_status); } &&
19660          { ac_try='test -s conftest.$ac_objext'
19661   { (eval echo "$as_me:19661: \"$ac_try\"") >&5
19662   (eval $ac_try) 2>&5
19663   ac_status=$?
19664   echo "$as_me:19664: \$? = $ac_status" >&5
19665   (exit $ac_status); }; }; then
19666
19667         test -n "$cf_math" && cat >>confdefs.h <<EOF
19668 #define ETIP_NEEDS_${cf_math} 1
19669 EOF
19670
19671         test -n "$cf_excp" && cat >>confdefs.h <<EOF
19672 #define ETIP_NEEDS_${cf_excp} 1
19673 EOF
19674
19675         cf_result="$cf_math $cf_excp"
19676         break 2
19677
19678 else
19679   echo "$as_me: failed program was:" >&5
19680 cat conftest.$ac_ext >&5
19681 fi
19682 rm -f conftest.$ac_objext conftest.$ac_ext
19683 done
19684 done
19685 echo "$as_me:19685: result: $cf_result" >&5
19686 echo "${ECHO_T}$cf_result" >&6
19687 CXXFLAGS="$cf_save_CXXFLAGS"
19688
19689 if test -n "$CXX"; then
19690 echo "$as_me:19690: checking if $CXX accepts parameter initialization" >&5
19691 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
19692 if test "${cf_cv_cpp_param_init+set}" = set; then
19693   echo $ECHO_N "(cached) $ECHO_C" >&6
19694 else
19695
19696         ac_ext=cc
19697 ac_cpp='$CXXCPP $CPPFLAGS'
19698 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19699 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19700 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19701 ac_main_return=return
19702
19703         if test "$cross_compiling" = yes; then
19704   cf_cv_cpp_param_init=unknown
19705 else
19706   cat >conftest.$ac_ext <<_ACEOF
19707 #line 19707 "configure"
19708 #include "confdefs.h"
19709
19710 class TEST {
19711 private:
19712         int value;
19713 public:
19714         TEST(int x = 1);
19715         ~TEST();
19716 };
19717
19718 TEST::TEST(int x = 1)   // some compilers do not like second initializer
19719 {
19720         value = x;
19721 }
19722 int main() { }
19723
19724 _ACEOF
19725 rm -f conftest$ac_exeext
19726 if { (eval echo "$as_me:19726: \"$ac_link\"") >&5
19727   (eval $ac_link) 2>&5
19728   ac_status=$?
19729   echo "$as_me:19729: \$? = $ac_status" >&5
19730   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19731   { (eval echo "$as_me:19731: \"$ac_try\"") >&5
19732   (eval $ac_try) 2>&5
19733   ac_status=$?
19734   echo "$as_me:19734: \$? = $ac_status" >&5
19735   (exit $ac_status); }; }; then
19736   cf_cv_cpp_param_init=yes
19737 else
19738   echo "$as_me: program exited with status $ac_status" >&5
19739 echo "$as_me: failed program was:" >&5
19740 cat conftest.$ac_ext >&5
19741 cf_cv_cpp_param_init=no
19742 fi
19743 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19744 fi
19745         ac_ext=cc
19746 ac_cpp='$CXXCPP $CPPFLAGS'
19747 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19748 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19749 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19750 ac_main_return=return
19751
19752 fi
19753 echo "$as_me:19753: result: $cf_cv_cpp_param_init" >&5
19754 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
19755 fi
19756 test "$cf_cv_cpp_param_init" = yes &&
19757 cat >>confdefs.h <<\EOF
19758 #define CPP_HAS_PARAM_INIT 1
19759 EOF
19760
19761 if test -n "$CXX"; then
19762
19763 echo "$as_me:19763: checking if $CXX accepts static_cast" >&5
19764 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
19765 if test "${cf_cv_cpp_static_cast+set}" = set; then
19766   echo $ECHO_N "(cached) $ECHO_C" >&6
19767 else
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         cat >conftest.$ac_ext <<_ACEOF
19777 #line 19777 "configure"
19778 #include "confdefs.h"
19779
19780 class NCursesPanel
19781 {
19782 public:
19783   NCursesPanel(int nlines,
19784                int ncols,
19785                int begin_y = 0,
19786                int begin_x = 0)
19787   {
19788   }
19789   NCursesPanel();
19790   ~NCursesPanel();
19791 };
19792
19793 template<class T> class NCursesUserPanel : public NCursesPanel
19794 {
19795 public:
19796   NCursesUserPanel (int nlines,
19797                     int ncols,
19798                     int begin_y = 0,
19799                     int begin_x = 0,
19800                     const T* p_UserData = static_cast<T*>(0))
19801     : NCursesPanel (nlines, ncols, begin_y, begin_x)
19802   {
19803   };
19804   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
19805   {
19806   };
19807
19808   virtual ~NCursesUserPanel() {};
19809 };
19810
19811 int
19812 main ()
19813 {
19814
19815         const char* p_UserData = static_cast<char*>(0)
19816   ;
19817   return 0;
19818 }
19819 _ACEOF
19820 rm -f conftest.$ac_objext
19821 if { (eval echo "$as_me:19821: \"$ac_compile\"") >&5
19822   (eval $ac_compile) 2>&5
19823   ac_status=$?
19824   echo "$as_me:19824: \$? = $ac_status" >&5
19825   (exit $ac_status); } &&
19826          { ac_try='test -s conftest.$ac_objext'
19827   { (eval echo "$as_me:19827: \"$ac_try\"") >&5
19828   (eval $ac_try) 2>&5
19829   ac_status=$?
19830   echo "$as_me:19830: \$? = $ac_status" >&5
19831   (exit $ac_status); }; }; then
19832   cf_cv_cpp_static_cast=yes
19833 else
19834   echo "$as_me: failed program was:" >&5
19835 cat conftest.$ac_ext >&5
19836 cf_cv_cpp_static_cast=no
19837 fi
19838 rm -f conftest.$ac_objext conftest.$ac_ext
19839
19840         ac_ext=cc
19841 ac_cpp='$CXXCPP $CPPFLAGS'
19842 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19843 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19844 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19845 ac_main_return=return
19846
19847 fi
19848 echo "$as_me:19848: result: $cf_cv_cpp_static_cast" >&5
19849 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
19850
19851 fi
19852
19853 test "$cf_cv_cpp_static_cast" = yes &&
19854 cat >>confdefs.h <<\EOF
19855 #define CPP_HAS_STATIC_CAST 1
19856 EOF
19857
19858         CXX_AR='$(AR)'
19859         CXX_ARFLAGS='$(ARFLAGS)'
19860         case $cf_cv_system_name in #(vi
19861         irix*) #(vi
19862             if test "$GXX" != yes ; then
19863                 CXX_AR='$(CXX)'
19864                 CXX_ARFLAGS='-ar -o'
19865             fi
19866             ;;
19867         sco3.2v5*) #(vi
19868             CXXLDFLAGS="-u main"
19869             ;;
19870         solaris2*)
19871             if test "$GXX" != yes ; then
19872                 CXX_AR='$(CXX)'
19873                 CXX_ARFLAGS='-xar -o'
19874             fi
19875             ;;
19876         esac
19877
19878 else
19879         cf_cxx_library=no
19880         cf_cv_builtin_bool=1
19881
19882         # Just because we are not configuring against C++ right now does not
19883         # mean that a user will not want to use C++.  Some distributors disable
19884         # the C++ portion of this configuration as a shortcut (or just to avoid
19885         # compiling the demo in the c++ directory).  So we need a reasonable
19886         # default for the 'bool' type.
19887         #
19888         # Caveat: since the storage of the bool type is not standardized, it
19889         # may change.
19890
19891         if test "$NCURSES_BOOL" != auto ; then
19892                 cf_cv_type_of_bool=$NCURSES_BOOL
19893                 cf_cv_header_stdbool_h=0
19894         else
19895                 if test "$cf_cv_header_stdbool_h" = 1 ; then
19896
19897 echo "$as_me:19897: checking for size of bool" >&5
19898 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19899 if test "${cf_cv_type_of_bool+set}" = set; then
19900   echo $ECHO_N "(cached) $ECHO_C" >&6
19901 else
19902
19903         rm -f cf_test.out
19904         if test "$cross_compiling" = yes; then
19905   cf_cv_type_of_bool=unknown
19906 else
19907   cat >conftest.$ac_ext <<_ACEOF
19908 #line 19908 "configure"
19909 #include "confdefs.h"
19910
19911 #include <stdlib.h>
19912 #include <stdio.h>
19913
19914 #if defined(__cplusplus)
19915
19916 #ifdef HAVE_GXX_BUILTIN_H
19917 #include <g++/builtin.h>
19918 #elif HAVE_GPP_BUILTIN_H
19919 #include <gpp/builtin.h>
19920 #elif HAVE_BUILTIN_H
19921 #include <builtin.h>
19922 #endif
19923
19924 #else
19925
19926 #if $cf_cv_header_stdbool_h
19927 #include <stdbool.h>
19928 #endif
19929
19930 #endif
19931
19932 int main()
19933 {
19934         FILE *fp = fopen("cf_test.out", "w");
19935         if (fp != 0) {
19936                 bool x = true;
19937                 if ((bool)(-x) >= 0)
19938                         fputs("unsigned ", fp);
19939                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19940                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19941                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19942                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19943                 fclose(fp);
19944         }
19945         ${cf_cv_main_return:-return}(0);
19946 }
19947
19948 _ACEOF
19949 rm -f conftest$ac_exeext
19950 if { (eval echo "$as_me:19950: \"$ac_link\"") >&5
19951   (eval $ac_link) 2>&5
19952   ac_status=$?
19953   echo "$as_me:19953: \$? = $ac_status" >&5
19954   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19955   { (eval echo "$as_me:19955: \"$ac_try\"") >&5
19956   (eval $ac_try) 2>&5
19957   ac_status=$?
19958   echo "$as_me:19958: \$? = $ac_status" >&5
19959   (exit $ac_status); }; }; then
19960   cf_cv_type_of_bool=`cat cf_test.out`
19961                  if test -z "$cf_cv_type_of_bool"; then
19962                    cf_cv_type_of_bool=unknown
19963                  fi
19964 else
19965   echo "$as_me: program exited with status $ac_status" >&5
19966 echo "$as_me: failed program was:" >&5
19967 cat conftest.$ac_ext >&5
19968 cf_cv_type_of_bool=unknown
19969 fi
19970 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19971 fi
19972
19973 fi
19974
19975         rm -f cf_test.out
19976 echo "$as_me:19976: result: $cf_cv_type_of_bool" >&5
19977 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19978 if test "$cf_cv_type_of_bool" = unknown ; then
19979         case .$NCURSES_BOOL in #(vi
19980         .auto|.) NCURSES_BOOL=unsigned;;
19981         esac
19982         { echo "$as_me:19982: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19983 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19984         cf_cv_type_of_bool=$NCURSES_BOOL
19985 fi
19986
19987                 else
19988                         echo "$as_me:19988: checking for fallback type of bool" >&5
19989 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19990                         case "$host_cpu" in #(vi
19991                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19992                         *)      cf_cv_type_of_bool=int  ;;
19993                         esac
19994                         echo "$as_me:19994: result: $cf_cv_type_of_bool" >&5
19995 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19996                 fi
19997         fi
19998 fi
19999
20000 # If the C compiler did not declare bool, and we did not determine that the C++
20001 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20002 # ncurses library use the same type as C++ bool.  Note that this allows one to
20003 # specify the type of bool in a configure-script option and postpone
20004 # integration with the C++ compiler provided that the types are compatible.
20005 USE_CXX_BOOL=1
20006 if test $cf_cv_cc_bool_type = 1
20007 then
20008         # oops: C has a bool.  Unlikely, but C++ could differ.
20009         USE_CXX_BOOL=0
20010 elif test $cf_cv_builtin_bool = 0
20011 then
20012         # C++ has no bool
20013         USE_CXX_BOOL=0
20014 else
20015         # this is the normal case
20016         USE_CXX_BOOL='defined(__cplusplus)'
20017 fi
20018
20019 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20020
20021         if test "$cf_with_ada" != "no" ; then
20022                 if test "$with_libtool" != "no"; then
20023                         { echo "$as_me:20023: WARNING: libtool does not support Ada - disabling feature" >&5
20024 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20025                         cf_with_ada=no
20026                 fi
20027         fi
20028
20029         if test "$cf_with_ada" != "no" ; then
20030
20031 cf_ada_make=gnatmake
20032 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20033 set dummy $cf_ada_make; ac_word=$2
20034 echo "$as_me:20034: checking for $ac_word" >&5
20035 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20036 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20037   echo $ECHO_N "(cached) $ECHO_C" >&6
20038 else
20039   if test -n "$gnat_exists"; then
20040   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20041 else
20042   ac_save_IFS=$IFS; IFS=$ac_path_separator
20043 ac_dummy="$PATH"
20044 for ac_dir in $ac_dummy; do
20045   IFS=$ac_save_IFS
20046   test -z "$ac_dir" && ac_dir=.
20047   $as_executable_p "$ac_dir/$ac_word" || continue
20048 ac_cv_prog_gnat_exists="yes"
20049 echo "$as_me:20049: found $ac_dir/$ac_word" >&5
20050 break
20051 done
20052
20053   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20054 fi
20055 fi
20056 gnat_exists=$ac_cv_prog_gnat_exists
20057 if test -n "$gnat_exists"; then
20058   echo "$as_me:20058: result: $gnat_exists" >&5
20059 echo "${ECHO_T}$gnat_exists" >&6
20060 else
20061   echo "$as_me:20061: result: no" >&5
20062 echo "${ECHO_T}no" >&6
20063 fi
20064
20065 if test "$ac_cv_prog_gnat_exists" = no; then
20066    cf_ada_make=
20067    cf_cv_prog_gnat_correct=no
20068 else
20069
20070 echo "$as_me:20070: checking for gnat version" >&5
20071 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20072 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20073         grep '[0-9].[0-9][0-9]*' |\
20074     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20075 echo "$as_me:20075: result: $cf_gnat_version" >&5
20076 echo "${ECHO_T}$cf_gnat_version" >&6
20077
20078 case $cf_gnat_version in #(vi
20079 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
20080         cf_cv_prog_gnat_correct=yes
20081         ;;
20082 *)
20083         { echo "$as_me:20083: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20084 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20085         cf_cv_prog_gnat_correct=no
20086         ;;
20087 esac
20088
20089    # Extract the first word of "m4", so it can be a program name with args.
20090 set dummy m4; ac_word=$2
20091 echo "$as_me:20091: checking for $ac_word" >&5
20092 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20093 if test "${ac_cv_prog_M4_exists+set}" = set; then
20094   echo $ECHO_N "(cached) $ECHO_C" >&6
20095 else
20096   if test -n "$M4_exists"; then
20097   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20098 else
20099   ac_save_IFS=$IFS; IFS=$ac_path_separator
20100 ac_dummy="$PATH"
20101 for ac_dir in $ac_dummy; do
20102   IFS=$ac_save_IFS
20103   test -z "$ac_dir" && ac_dir=.
20104   $as_executable_p "$ac_dir/$ac_word" || continue
20105 ac_cv_prog_M4_exists="yes"
20106 echo "$as_me:20106: found $ac_dir/$ac_word" >&5
20107 break
20108 done
20109
20110   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20111 fi
20112 fi
20113 M4_exists=$ac_cv_prog_M4_exists
20114 if test -n "$M4_exists"; then
20115   echo "$as_me:20115: result: $M4_exists" >&5
20116 echo "${ECHO_T}$M4_exists" >&6
20117 else
20118   echo "$as_me:20118: result: no" >&5
20119 echo "${ECHO_T}no" >&6
20120 fi
20121
20122    if test "$ac_cv_prog_M4_exists" = no; then
20123       cf_cv_prog_gnat_correct=no
20124       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20125    fi
20126    if test "$cf_cv_prog_gnat_correct" = yes; then
20127       echo "$as_me:20127: checking if GNAT works" >&5
20128 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20129
20130 rm -rf conftest* *~conftest*
20131 cat >>conftest.ads <<CF_EOF
20132 procedure conftest;
20133 CF_EOF
20134 cat >>conftest.adb <<CF_EOF
20135 with Text_IO;
20136 with GNAT.OS_Lib;
20137 procedure conftest is
20138 begin
20139    Text_IO.Put ("Hello World");
20140    Text_IO.New_Line;
20141    GNAT.OS_Lib.OS_Exit (0);
20142 end conftest;
20143 CF_EOF
20144 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20145    if ( ./conftest 1>&5 2>&1 ) ; then
20146       cf_cv_prog_gnat_correct=yes
20147    else
20148       cf_cv_prog_gnat_correct=no
20149    fi
20150 else
20151    cf_cv_prog_gnat_correct=no
20152 fi
20153 rm -rf conftest* *~conftest*
20154
20155       echo "$as_me:20155: result: $cf_cv_prog_gnat_correct" >&5
20156 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20157    fi
20158 fi
20159
20160                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20161
20162         ADAFLAGS="$ADAFLAGS -gnatpn"
20163
20164         echo "$as_me:20164: checking optimization options for ADAFLAGS" >&5
20165 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20166         case "$CFLAGS" in
20167         *-g*)
20168
20169         ADAFLAGS="$ADAFLAGS -g"
20170
20171                 ;;
20172         esac
20173         case "$CFLAGS" in
20174         *-O*)
20175                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20176
20177         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20178
20179                 ;;
20180         esac
20181         echo "$as_me:20181: result: $ADAFLAGS" >&5
20182 echo "${ECHO_T}$ADAFLAGS" >&6
20183
20184 echo "$as_me:20184: checking if GNAT supports generics" >&5
20185 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20186 case $cf_gnat_version in #(vi
20187 3.[1-9]*|[4-9].*) #(vi
20188         cf_gnat_generics=yes
20189         ;;
20190 *)
20191         cf_gnat_generics=no
20192         ;;
20193 esac
20194 echo "$as_me:20194: result: $cf_gnat_generics" >&5
20195 echo "${ECHO_T}$cf_gnat_generics" >&6
20196
20197 if test "$cf_gnat_generics" = yes
20198 then
20199         cf_compile_generics=generics
20200         cf_generic_objects="\${GENOBJS}"
20201 else
20202         cf_compile_generics=
20203         cf_generic_objects=
20204 fi
20205
20206 echo "$as_me:20206: checking if GNAT supports SIGINT" >&5
20207 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20208 if test "${cf_cv_gnat_sigint+set}" = set; then
20209   echo $ECHO_N "(cached) $ECHO_C" >&6
20210 else
20211
20212 rm -rf conftest* *~conftest*
20213 cat >>conftest.ads <<CF_EOF
20214 with Ada.Interrupts.Names;
20215
20216 package ConfTest is
20217
20218    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20219    pragma Unreserve_All_Interrupts;
20220    pragma Warnings (On);
20221
20222    protected Process is
20223       procedure Stop;
20224       function Continue return Boolean;
20225       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20226    private
20227       Done : Boolean := False;
20228    end Process;
20229
20230 end ConfTest;
20231 CF_EOF
20232 cat >>conftest.adb <<CF_EOF
20233 package body ConfTest is
20234    protected body Process is
20235       procedure Stop is
20236       begin
20237          Done := True;
20238       end Stop;
20239       function Continue return Boolean is
20240       begin
20241          return not Done;
20242       end Continue;
20243    end Process;
20244 end ConfTest;
20245 CF_EOF
20246 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20247       cf_cv_gnat_sigint=yes
20248 else
20249    cf_cv_gnat_sigint=no
20250 fi
20251 rm -rf conftest* *~conftest*
20252
20253 fi
20254 echo "$as_me:20254: result: $cf_cv_gnat_sigint" >&5
20255 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20256
20257 if test $cf_cv_gnat_sigint = yes ; then
20258         USE_GNAT_SIGINT=""
20259 else
20260         USE_GNAT_SIGINT="#"
20261 fi
20262
20263 cf_gnat_libraries=no
20264 cf_gnat_projects=no
20265
20266 if test "$enable_gnat_projects" != no ; then
20267 echo "$as_me:20267: checking if GNAT supports project files" >&5
20268 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20269 case $cf_gnat_version in #(vi
20270 3.[0-9]*) #(vi
20271         ;;
20272 *)
20273         case $cf_cv_system_name in #(vi
20274         cygwin*|msys*) #(vi
20275                 ;;
20276         *)
20277                 mkdir conftest.src conftest.bin conftest.lib
20278                 cd conftest.src
20279                 rm -rf conftest* *~conftest*
20280                 cat >>library.gpr <<CF_EOF
20281 project Library is
20282   Kind := External ("LIB_KIND");
20283   for Library_Name use "ConfTest";
20284   for Object_Dir use ".";
20285   for Library_ALI_Dir use External("LIBRARY_DIR");
20286   for Library_Version use External ("SONAME");
20287   for Library_Kind use Kind;
20288   for Library_Dir use External("BUILD_DIR");
20289   Source_Dir := External ("SOURCE_DIR");
20290   for Source_Dirs use (Source_Dir);
20291 end Library;
20292 CF_EOF
20293                 cat >>confpackage.ads <<CF_EOF
20294 package ConfPackage is
20295    procedure conftest;
20296 end ConfPackage;
20297 CF_EOF
20298                 cat >>confpackage.adb <<CF_EOF
20299 with Text_IO;
20300 package body ConfPackage is
20301    procedure conftest is
20302    begin
20303       Text_IO.Put ("Hello World");
20304       Text_IO.New_Line;
20305    end conftest;
20306 end ConfPackage;
20307 CF_EOF
20308                 if ( $cf_ada_make $ADAFLAGS \
20309                                 -Plibrary.gpr \
20310                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
20311                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
20312                                 -XSOURCE_DIR=`pwd` \
20313                                 -XSONAME=libConfTest.so.1 \
20314                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
20315                         cf_gnat_projects=yes
20316                 fi
20317                 cd ..
20318                 if test -f conftest.lib/confpackage.ali
20319                 then
20320                         cf_gnat_libraries=yes
20321                 fi
20322                 rm -rf conftest* *~conftest*
20323                 ;;
20324         esac
20325         ;;
20326 esac
20327 echo "$as_me:20327: result: $cf_gnat_projects" >&5
20328 echo "${ECHO_T}$cf_gnat_projects" >&6
20329 fi # enable_gnat_projects
20330
20331 if test $cf_gnat_projects = yes
20332 then
20333         echo "$as_me:20333: checking if GNAT supports libraries" >&5
20334 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
20335         echo "$as_me:20335: result: $cf_gnat_libraries" >&5
20336 echo "${ECHO_T}$cf_gnat_libraries" >&6
20337 fi
20338
20339 if test "$cf_gnat_projects" = yes
20340 then
20341         USE_OLD_MAKERULES="#"
20342         USE_GNAT_PROJECTS=""
20343 else
20344         USE_OLD_MAKERULES=""
20345         USE_GNAT_PROJECTS="#"
20346 fi
20347
20348 if test "$cf_gnat_libraries" = yes
20349 then
20350         USE_GNAT_LIBRARIES=""
20351 else
20352         USE_GNAT_LIBRARIES="#"
20353 fi
20354
20355 echo "$as_me:20355: checking for ada-compiler" >&5
20356 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
20357
20358 # Check whether --with-ada-compiler or --without-ada-compiler was given.
20359 if test "${with_ada_compiler+set}" = set; then
20360   withval="$with_ada_compiler"
20361   cf_ada_compiler=$withval
20362 else
20363   cf_ada_compiler=gnatmake
20364 fi;
20365
20366 echo "$as_me:20366: result: $cf_ada_compiler" >&5
20367 echo "${ECHO_T}$cf_ada_compiler" >&6
20368
20369                         cf_ada_package=terminal_interface
20370
20371 echo "$as_me:20371: checking for ada-include" >&5
20372 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
20373
20374 # Check whether --with-ada-include or --without-ada-include was given.
20375 if test "${with_ada_include+set}" = set; then
20376   withval="$with_ada_include"
20377
20378 else
20379   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20380 fi; if test -n "$prefix/share/ada/adainclude" ; then
20381
20382 if test "x$prefix" != xNONE; then
20383   cf_path_syntax="$prefix"
20384 else
20385   cf_path_syntax="$ac_default_prefix"
20386 fi
20387
20388 case ".$withval" in #(vi
20389 .\$\(*\)*|.\'*\'*) #(vi
20390   ;;
20391 ..|./*|.\\*) #(vi
20392   ;;
20393 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20394   ;;
20395 .\${*prefix}*|.\${*dir}*) #(vi
20396   eval withval="$withval"
20397   case ".$withval" in #(vi
20398   .NONE/*)
20399     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20400     ;;
20401   esac
20402   ;; #(vi
20403 .no|.NONE/*)
20404   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20405   ;;
20406 *)
20407   { { echo "$as_me:20407: error: expected a pathname, not \"$withval\"" >&5
20408 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20409    { (exit 1); exit 1; }; }
20410   ;;
20411 esac
20412
20413 fi
20414 eval ADA_INCLUDE="$withval"
20415
20416 echo "$as_me:20416: result: $ADA_INCLUDE" >&5
20417 echo "${ECHO_T}$ADA_INCLUDE" >&6
20418
20419 echo "$as_me:20419: checking for ada-objects" >&5
20420 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
20421
20422 # Check whether --with-ada-objects or --without-ada-objects was given.
20423 if test "${with_ada_objects+set}" = set; then
20424   withval="$with_ada_objects"
20425
20426 else
20427   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
20428 fi; if test -n "$prefix/lib/ada/adalib" ; then
20429
20430 if test "x$prefix" != xNONE; then
20431   cf_path_syntax="$prefix"
20432 else
20433   cf_path_syntax="$ac_default_prefix"
20434 fi
20435
20436 case ".$withval" in #(vi
20437 .\$\(*\)*|.\'*\'*) #(vi
20438   ;;
20439 ..|./*|.\\*) #(vi
20440   ;;
20441 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20442   ;;
20443 .\${*prefix}*|.\${*dir}*) #(vi
20444   eval withval="$withval"
20445   case ".$withval" in #(vi
20446   .NONE/*)
20447     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20448     ;;
20449   esac
20450   ;; #(vi
20451 .no|.NONE/*)
20452   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20453   ;;
20454 *)
20455   { { echo "$as_me:20455: error: expected a pathname, not \"$withval\"" >&5
20456 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20457    { (exit 1); exit 1; }; }
20458   ;;
20459 esac
20460
20461 fi
20462 eval ADA_OBJECTS="$withval"
20463
20464 echo "$as_me:20464: result: $ADA_OBJECTS" >&5
20465 echo "${ECHO_T}$ADA_OBJECTS" >&6
20466
20467 echo "$as_me:20467: checking if an Ada95 shared-library should be built" >&5
20468 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
20469
20470 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
20471 if test "${with_ada_sharedlib+set}" = set; then
20472   withval="$with_ada_sharedlib"
20473   with_ada_sharedlib=$withval
20474 else
20475   with_ada_sharedlib=no
20476 fi;
20477 echo "$as_me:20477: result: $with_ada_sharedlib" >&5
20478 echo "${ECHO_T}$with_ada_sharedlib" >&6
20479
20480 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
20481 MAKE_ADA_SHAREDLIB="#"
20482
20483 if test "x$with_ada_sharedlib" != xno
20484 then
20485         MAKE_ADA_SHAREDLIB=
20486         if test "x$with_ada_sharedlib" != xyes
20487         then
20488                 ADA_SHAREDLIB="$with_ada_sharedlib"
20489         fi
20490 fi
20491
20492                 fi
20493         fi
20494 else
20495         cf_with_ada=no
20496 fi
20497
20498 # do this "late" to avoid conflict with header-checks
20499 if test "x$with_widec" = xyes ; then
20500         echo "$as_me:20500: checking for wchar_t" >&5
20501 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
20502 if test "${ac_cv_type_wchar_t+set}" = set; then
20503   echo $ECHO_N "(cached) $ECHO_C" >&6
20504 else
20505   cat >conftest.$ac_ext <<_ACEOF
20506 #line 20506 "configure"
20507 #include "confdefs.h"
20508 $ac_includes_default
20509 int
20510 main ()
20511 {
20512 if ((wchar_t *) 0)
20513   return 0;
20514 if (sizeof (wchar_t))
20515   return 0;
20516   ;
20517   return 0;
20518 }
20519 _ACEOF
20520 rm -f conftest.$ac_objext
20521 if { (eval echo "$as_me:20521: \"$ac_compile\"") >&5
20522   (eval $ac_compile) 2>&5
20523   ac_status=$?
20524   echo "$as_me:20524: \$? = $ac_status" >&5
20525   (exit $ac_status); } &&
20526          { ac_try='test -s conftest.$ac_objext'
20527   { (eval echo "$as_me:20527: \"$ac_try\"") >&5
20528   (eval $ac_try) 2>&5
20529   ac_status=$?
20530   echo "$as_me:20530: \$? = $ac_status" >&5
20531   (exit $ac_status); }; }; then
20532   ac_cv_type_wchar_t=yes
20533 else
20534   echo "$as_me: failed program was:" >&5
20535 cat conftest.$ac_ext >&5
20536 ac_cv_type_wchar_t=no
20537 fi
20538 rm -f conftest.$ac_objext conftest.$ac_ext
20539 fi
20540 echo "$as_me:20540: result: $ac_cv_type_wchar_t" >&5
20541 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
20542
20543 echo "$as_me:20543: checking size of wchar_t" >&5
20544 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
20545 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
20546   echo $ECHO_N "(cached) $ECHO_C" >&6
20547 else
20548   if test "$ac_cv_type_wchar_t" = yes; then
20549   if test "$cross_compiling" = yes; then
20550   # Depending upon the size, compute the lo and hi bounds.
20551 cat >conftest.$ac_ext <<_ACEOF
20552 #line 20552 "configure"
20553 #include "confdefs.h"
20554 $ac_includes_default
20555 int
20556 main ()
20557 {
20558 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
20559   ;
20560   return 0;
20561 }
20562 _ACEOF
20563 rm -f conftest.$ac_objext
20564 if { (eval echo "$as_me:20564: \"$ac_compile\"") >&5
20565   (eval $ac_compile) 2>&5
20566   ac_status=$?
20567   echo "$as_me:20567: \$? = $ac_status" >&5
20568   (exit $ac_status); } &&
20569          { ac_try='test -s conftest.$ac_objext'
20570   { (eval echo "$as_me:20570: \"$ac_try\"") >&5
20571   (eval $ac_try) 2>&5
20572   ac_status=$?
20573   echo "$as_me:20573: \$? = $ac_status" >&5
20574   (exit $ac_status); }; }; then
20575   ac_lo=0 ac_mid=0
20576   while :; do
20577     cat >conftest.$ac_ext <<_ACEOF
20578 #line 20578 "configure"
20579 #include "confdefs.h"
20580 $ac_includes_default
20581 int
20582 main ()
20583 {
20584 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20585   ;
20586   return 0;
20587 }
20588 _ACEOF
20589 rm -f conftest.$ac_objext
20590 if { (eval echo "$as_me:20590: \"$ac_compile\"") >&5
20591   (eval $ac_compile) 2>&5
20592   ac_status=$?
20593   echo "$as_me:20593: \$? = $ac_status" >&5
20594   (exit $ac_status); } &&
20595          { ac_try='test -s conftest.$ac_objext'
20596   { (eval echo "$as_me:20596: \"$ac_try\"") >&5
20597   (eval $ac_try) 2>&5
20598   ac_status=$?
20599   echo "$as_me:20599: \$? = $ac_status" >&5
20600   (exit $ac_status); }; }; then
20601   ac_hi=$ac_mid; break
20602 else
20603   echo "$as_me: failed program was:" >&5
20604 cat conftest.$ac_ext >&5
20605 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
20606 fi
20607 rm -f conftest.$ac_objext conftest.$ac_ext
20608   done
20609 else
20610   echo "$as_me: failed program was:" >&5
20611 cat conftest.$ac_ext >&5
20612 ac_hi=-1 ac_mid=-1
20613   while :; do
20614     cat >conftest.$ac_ext <<_ACEOF
20615 #line 20615 "configure"
20616 #include "confdefs.h"
20617 $ac_includes_default
20618 int
20619 main ()
20620 {
20621 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
20622   ;
20623   return 0;
20624 }
20625 _ACEOF
20626 rm -f conftest.$ac_objext
20627 if { (eval echo "$as_me:20627: \"$ac_compile\"") >&5
20628   (eval $ac_compile) 2>&5
20629   ac_status=$?
20630   echo "$as_me:20630: \$? = $ac_status" >&5
20631   (exit $ac_status); } &&
20632          { ac_try='test -s conftest.$ac_objext'
20633   { (eval echo "$as_me:20633: \"$ac_try\"") >&5
20634   (eval $ac_try) 2>&5
20635   ac_status=$?
20636   echo "$as_me:20636: \$? = $ac_status" >&5
20637   (exit $ac_status); }; }; then
20638   ac_lo=$ac_mid; break
20639 else
20640   echo "$as_me: failed program was:" >&5
20641 cat conftest.$ac_ext >&5
20642 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
20643 fi
20644 rm -f conftest.$ac_objext conftest.$ac_ext
20645   done
20646 fi
20647 rm -f conftest.$ac_objext conftest.$ac_ext
20648 # Binary search between lo and hi bounds.
20649 while test "x$ac_lo" != "x$ac_hi"; do
20650   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20651   cat >conftest.$ac_ext <<_ACEOF
20652 #line 20652 "configure"
20653 #include "confdefs.h"
20654 $ac_includes_default
20655 int
20656 main ()
20657 {
20658 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20659   ;
20660   return 0;
20661 }
20662 _ACEOF
20663 rm -f conftest.$ac_objext
20664 if { (eval echo "$as_me:20664: \"$ac_compile\"") >&5
20665   (eval $ac_compile) 2>&5
20666   ac_status=$?
20667   echo "$as_me:20667: \$? = $ac_status" >&5
20668   (exit $ac_status); } &&
20669          { ac_try='test -s conftest.$ac_objext'
20670   { (eval echo "$as_me:20670: \"$ac_try\"") >&5
20671   (eval $ac_try) 2>&5
20672   ac_status=$?
20673   echo "$as_me:20673: \$? = $ac_status" >&5
20674   (exit $ac_status); }; }; then
20675   ac_hi=$ac_mid
20676 else
20677   echo "$as_me: failed program was:" >&5
20678 cat conftest.$ac_ext >&5
20679 ac_lo=`expr $ac_mid + 1`
20680 fi
20681 rm -f conftest.$ac_objext conftest.$ac_ext
20682 done
20683 ac_cv_sizeof_wchar_t=$ac_lo
20684 else
20685   if test "$cross_compiling" = yes; then
20686   { { echo "$as_me:20686: error: cannot run test program while cross compiling" >&5
20687 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20688    { (exit 1); exit 1; }; }
20689 else
20690   cat >conftest.$ac_ext <<_ACEOF
20691 #line 20691 "configure"
20692 #include "confdefs.h"
20693 $ac_includes_default
20694 int
20695 main ()
20696 {
20697 FILE *f = fopen ("conftest.val", "w");
20698 if (!f)
20699   $ac_main_return (1);
20700 fprintf (f, "%d", (sizeof (wchar_t)));
20701 fclose (f);
20702   ;
20703   return 0;
20704 }
20705 _ACEOF
20706 rm -f conftest$ac_exeext
20707 if { (eval echo "$as_me:20707: \"$ac_link\"") >&5
20708   (eval $ac_link) 2>&5
20709   ac_status=$?
20710   echo "$as_me:20710: \$? = $ac_status" >&5
20711   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20712   { (eval echo "$as_me:20712: \"$ac_try\"") >&5
20713   (eval $ac_try) 2>&5
20714   ac_status=$?
20715   echo "$as_me:20715: \$? = $ac_status" >&5
20716   (exit $ac_status); }; }; then
20717   ac_cv_sizeof_wchar_t=`cat conftest.val`
20718 else
20719   echo "$as_me: program exited with status $ac_status" >&5
20720 echo "$as_me: failed program was:" >&5
20721 cat conftest.$ac_ext >&5
20722 fi
20723 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20724 fi
20725 fi
20726 rm -f conftest.val
20727 else
20728   ac_cv_sizeof_wchar_t=0
20729 fi
20730 fi
20731 echo "$as_me:20731: result: $ac_cv_sizeof_wchar_t" >&5
20732 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
20733 cat >>confdefs.h <<EOF
20734 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
20735 EOF
20736
20737 fi
20738
20739 ### Construct the ncurses library-subsets, if any, from this set of keywords:
20740 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
20741 ###
20742 ### ticlib modules may be a separate library, otherwise contained in termlib.
20743 ### termlib modules may be a separate library, otherwise contained in ncurses.
20744 ###
20745 ### The of "+" or " " between the tokens controls the way the script
20746 ### chooses to split module lists into libraries.
20747 ###
20748 ### (see CF_LIB_RULES).
20749 echo "$as_me:20749: checking for library subsets" >&5
20750 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
20751 LIB_SUBSETS=
20752
20753 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
20754         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
20755         if test "$with_ticlib" != no ; then
20756                 LIB_SUBSETS="${LIB_SUBSETS} "
20757         else
20758                 LIB_SUBSETS="${LIB_SUBSETS}+"
20759         fi
20760 fi
20761
20762 LIB_SUBSETS="${LIB_SUBSETS}termlib"
20763 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
20764
20765 if test "$with_termlib" != no ; then
20766         LIB_SUBSETS="${LIB_SUBSETS} "
20767 else
20768         LIB_SUBSETS="${LIB_SUBSETS}+"
20769 fi
20770
20771 LIB_SUBSETS="${LIB_SUBSETS}base"
20772
20773 # Most term-driver calls are to tinfo, but some like init_pair are to the
20774 # base library (so it resides in base).
20775 if test "$with_term_driver" != no ; then
20776         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
20777         case $cf_cv_system_name in #(vi
20778         *mingw32*) #(vi
20779                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
20780                 ;;
20781         *) #(vi
20782                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
20783                 ;;
20784         esac
20785 fi
20786
20787 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
20788 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
20789
20790 echo "$as_me:20790: result: $LIB_SUBSETS" >&5
20791 echo "${ECHO_T}$LIB_SUBSETS" >&6
20792
20793 ### Construct the list of include-directories to be generated
20794
20795 if test "$GCC" != yes; then
20796         CPPFLAGS="-I\${includedir} $CPPFLAGS"
20797 elif test "$includedir" != "/usr/include"; then
20798         if test "$includedir" = '${prefix}/include' ; then
20799                 if test x$prefix != x/usr ; then
20800                         CPPFLAGS="-I\${includedir} $CPPFLAGS"
20801                 fi
20802         else
20803                 CPPFLAGS="-I\${includedir} $CPPFLAGS"
20804         fi
20805 fi
20806 if test "$srcdir" != "."; then
20807         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
20808 fi
20809 CPPFLAGS="-I. -I../include $CPPFLAGS"
20810
20811 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
20812 if test "$srcdir" != "."; then
20813         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
20814 fi
20815 if test "$GCC" != yes; then
20816         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20817 elif test "$includedir" != "/usr/include"; then
20818         if test "$includedir" = '${prefix}/include' ; then
20819                 if test x$prefix != x/usr ; then
20820                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20821                 fi
20822         else
20823                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20824         fi
20825 fi
20826
20827 ### Build up pieces for makefile rules
20828 echo "$as_me:20828: checking default library suffix" >&5
20829 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
20830
20831         case $DFT_LWR_MODEL in
20832         libtool) DFT_ARG_SUFFIX=''   ;;
20833         normal)  DFT_ARG_SUFFIX=''   ;;
20834         debug)   DFT_ARG_SUFFIX='_g' ;;
20835         profile) DFT_ARG_SUFFIX='_p' ;;
20836         shared)  DFT_ARG_SUFFIX=''   ;;
20837         esac
20838         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
20839 echo "$as_me:20839: result: $DFT_ARG_SUFFIX" >&5
20840 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
20841
20842 echo "$as_me:20842: checking default library-dependency suffix" >&5
20843 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
20844
20845         case X$DFT_LWR_MODEL in #(vi
20846         Xlibtool) #(vi
20847                 DFT_LIB_SUFFIX='.la'
20848                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20849                 ;;
20850         Xdebug) #(vi
20851                 DFT_LIB_SUFFIX='_g.a'
20852                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20853                 ;;
20854         Xprofile) #(vi
20855                 DFT_LIB_SUFFIX='_p.a'
20856                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20857                 ;;
20858         Xshared) #(vi
20859                 case $cf_cv_system_name in
20860                 aix[5-7]*) #(vi
20861                         DFT_LIB_SUFFIX='.so'
20862                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20863                         ;;
20864                 cygwin*|msys*|mingw*) #(vi
20865                         DFT_LIB_SUFFIX='.dll'
20866                         DFT_DEP_SUFFIX='.dll.a'
20867                         ;;
20868                 darwin*) #(vi
20869                         DFT_LIB_SUFFIX='.dylib'
20870                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20871                         ;;
20872                 hpux*) #(vi
20873                         case $target in
20874                         ia64*) #(vi
20875                                 DFT_LIB_SUFFIX='.so'
20876                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20877                                 ;;
20878                         *) #(vi
20879                                 DFT_LIB_SUFFIX='.sl'
20880                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20881                                 ;;
20882                         esac
20883                         ;;
20884                 *) #(vi
20885                         DFT_LIB_SUFFIX='.so'
20886                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20887                         ;;
20888                 esac
20889                 ;;
20890         *)
20891                 DFT_LIB_SUFFIX='.a'
20892                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20893                 ;;
20894         esac
20895         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
20896         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
20897 echo "$as_me:20897: result: $DFT_DEP_SUFFIX" >&5
20898 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
20899
20900 echo "$as_me:20900: checking default object directory" >&5
20901 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
20902
20903         case $DFT_LWR_MODEL in
20904         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
20905         normal)  DFT_OBJ_SUBDIR='objects' ;;
20906         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
20907         profile) DFT_OBJ_SUBDIR='obj_p' ;;
20908         shared)
20909                 case $cf_cv_system_name in #(vi
20910                 cygwin|msys) #(vi
20911                         DFT_OBJ_SUBDIR='objects' ;;
20912                 *)
20913                         DFT_OBJ_SUBDIR='obj_s' ;;
20914                 esac
20915         esac
20916 echo "$as_me:20916: result: $DFT_OBJ_SUBDIR" >&5
20917 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
20918
20919 if test "x$cf_with_cxx" = xyes ; then
20920 echo "$as_me:20920: checking c++ library-dependency suffix" >&5
20921 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
20922 if test "$with_libtool" != "no"; then
20923         # libtool thinks it can make c++ shared libraries (perhaps only g++)
20924         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20925 elif test "$with_shared_cxx" != "no"; then
20926         # also for g++ users...
20927         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20928 else
20929         # we normally make a static library because C/C++ library rules differ
20930
20931         case Xnormal in #(vi
20932         Xlibtool) #(vi
20933                 CXX_LIB_SUFFIX='.la'
20934                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20935                 ;;
20936         Xdebug) #(vi
20937                 CXX_LIB_SUFFIX='_g.a'
20938                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20939                 ;;
20940         Xprofile) #(vi
20941                 CXX_LIB_SUFFIX='_p.a'
20942                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20943                 ;;
20944         Xshared) #(vi
20945                 case $cf_cv_system_name in
20946                 aix[5-7]*) #(vi
20947                         CXX_LIB_SUFFIX='.so'
20948                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20949                         ;;
20950                 cygwin*|msys*|mingw*) #(vi
20951                         CXX_LIB_SUFFIX='.dll'
20952                         CXX_DEP_SUFFIX='.dll.a'
20953                         ;;
20954                 darwin*) #(vi
20955                         CXX_LIB_SUFFIX='.dylib'
20956                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20957                         ;;
20958                 hpux*) #(vi
20959                         case $target in
20960                         ia64*) #(vi
20961                                 CXX_LIB_SUFFIX='.so'
20962                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20963                                 ;;
20964                         *) #(vi
20965                                 CXX_LIB_SUFFIX='.sl'
20966                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20967                                 ;;
20968                         esac
20969                         ;;
20970                 *) #(vi
20971                         CXX_LIB_SUFFIX='.so'
20972                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20973                         ;;
20974                 esac
20975                 ;;
20976         *)
20977                 CXX_LIB_SUFFIX='.a'
20978                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20979                 ;;
20980         esac
20981         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
20982         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
20983
20984 fi
20985 echo "$as_me:20985: result: $CXX_LIB_SUFFIX" >&5
20986 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
20987
20988 fi
20989
20990 # do not want -ldl in build except as needed for -lncurses dependency
20991 if test "x$with_dlsym" = xyes ; then
20992 if test $DFT_LWR_MODEL = shared || \
20993    test $DFT_LWR_MODEL = libtool ; then
20994
20995 # remove dl library from $LIBS
20996 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
20997
20998 fi
20999 fi
21000 ### Set up low-level terminfo dependencies for makefiles.
21001
21002 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21003 # do not need libdl
21004 TICS_LIST=
21005 if test "x$with_dlsym" = xyes ; then
21006
21007 # remove dl library from $SHLIB_LIST
21008 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21009
21010 fi
21011
21012 if test "$with_ticlib" != no ; then
21013
21014         if test "x$with_ticlib" != xyes ; then
21015                 TICS_NAME=$with_ticlib
21016                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21017                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21018                 TICS_LIB_SUFFIX="${with_ticlib}"
21019         else
21020                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
21021                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21022                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
21023         fi
21024         TICS_LDFLAGS="-L${LIB_DIR}"
21025         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21026 else
21027         TICS_LDFLAGS="-L${LIB_DIR}"
21028         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21029 fi
21030
21031 if test "$with_termlib" != no ; then
21032
21033         if test "x$with_termlib" != xyes ; then
21034                 TINFO_NAME=$with_termlib
21035                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21036                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21037                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21038                 TINFO_LIB_SUFFIX="${with_termlib}"
21039         else
21040                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21041                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
21042                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21043                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
21044         fi
21045
21046         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21047         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21048         if test "$DFT_LWR_MODEL" = "libtool"; then
21049                 TEST_ARGS="${TEST_DEPS}"
21050                 TEST_ARG2="${TEST_DEP2}"
21051                 TINFO_LDFLAGS="-L${LIB_DIR}"
21052                 TINFO_LIBS="$TEST_ARGS"
21053                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21054                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21055         else
21056                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21057                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21058                 if test "x$with_term_driver" != xno ; then
21059                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21060                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21061                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21062                 else
21063                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21064                         TINFO_LIBS="$TEST_ARGS"
21065                 fi
21066                 TINFO_LDFLAGS="-L${LIB_DIR}"
21067                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21068         fi
21069 else
21070         # the next lines are needed for linking libtic over libncurses
21071         TINFO_NAME=${LIB_NAME}
21072         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21073         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
21074         if test "x$with_tic_depends" = xyes ; then
21075                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21076         else
21077                 TICS_LIST="$SHLIB_LIST"
21078         fi
21079
21080         TINFO_LDFLAGS="-L${LIB_DIR}"
21081         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21082 fi
21083
21084 if test "$DFT_LWR_MODEL" = shared ; then
21085         case $cf_cv_system_name in #(vi
21086         cygwin*|msys*)
21087                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21088                 TINFO_SUFFIX=.dll
21089                 ;;
21090         esac
21091 fi
21092
21093 if test "x$with_dlsym" = xyes ; then
21094
21095 # remove dl library from $TICS_LIST
21096 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21097
21098 fi
21099
21100 if test "$DFT_LWR_MODEL" = "libtool"; then
21101     OBJEXT=lo
21102 fi
21103
21104 # needed for Ada95
21105 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21106
21107 case $DFT_LWR_MODEL in
21108 normal|debug|profile)
21109
21110 if test "$GCC" = yes ; then
21111         case $cf_cv_system_name in #(
21112         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
21113                 LDFLAGS_STATIC=
21114                 LDFLAGS_SHARED=
21115                 ;;
21116     *)  #( normally, except when broken
21117         LDFLAGS_STATIC=-static
21118         LDFLAGS_SHARED=-dynamic
21119         ;;
21120     esac
21121 else
21122         case $cf_cv_system_name in #(
21123         aix[4-7]*)      #( from ld manpage
21124                 LDFLAGS_STATIC=-bstatic
21125                 LDFLAGS_SHARED=-bdynamic
21126                 ;;
21127         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
21128                 # We could also use just "archive" and "shared".
21129                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21130                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21131                 ;;
21132         irix*)          #( from ld manpage IRIX64
21133                 LDFLAGS_STATIC=-Bstatic
21134                 LDFLAGS_SHARED=-Bdynamic
21135                 ;;
21136         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
21137                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21138                 LDFLAGS_STATIC=-noso
21139                 LDFLAGS_SHARED=-so_archive
21140                 ;;
21141         solaris2*)
21142                 LDFLAGS_STATIC=-Bstatic
21143                 LDFLAGS_SHARED=-Bdynamic
21144                 ;;
21145         esac
21146 fi
21147
21148 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21149 then
21150         echo "$as_me:21150: checking if linker supports switching between static/dynamic" >&5
21151 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21152
21153         rm -f libconftest.a
21154         cat >conftest.$ac_ext <<EOF
21155 #line 21155 "configure"
21156 #include <stdio.h>
21157 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21158 EOF
21159         if { (eval echo "$as_me:21159: \"$ac_compile\"") >&5
21160   (eval $ac_compile) 2>&5
21161   ac_status=$?
21162   echo "$as_me:21162: \$? = $ac_status" >&5
21163   (exit $ac_status); } ; then
21164                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21165                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21166         fi
21167         rm -f conftest.*
21168
21169         cf_save_LIBS="$LIBS"
21170
21171         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21172         cat >conftest.$ac_ext <<_ACEOF
21173 #line 21173 "configure"
21174 #include "confdefs.h"
21175
21176 #line 21176 "configure"
21177 #include <stdio.h>
21178 int cf_ldflags_static(FILE *fp);
21179
21180 int
21181 main ()
21182 {
21183
21184         return cf_ldflags_static(stdin);
21185
21186   ;
21187   return 0;
21188 }
21189 _ACEOF
21190 rm -f conftest.$ac_objext conftest$ac_exeext
21191 if { (eval echo "$as_me:21191: \"$ac_link\"") >&5
21192   (eval $ac_link) 2>&5
21193   ac_status=$?
21194   echo "$as_me:21194: \$? = $ac_status" >&5
21195   (exit $ac_status); } &&
21196          { ac_try='test -s conftest$ac_exeext'
21197   { (eval echo "$as_me:21197: \"$ac_try\"") >&5
21198   (eval $ac_try) 2>&5
21199   ac_status=$?
21200   echo "$as_me:21200: \$? = $ac_status" >&5
21201   (exit $ac_status); }; }; then
21202
21203         # some linkers simply ignore the -dynamic
21204         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
21205         *static*) # (vi
21206                 cf_ldflags_static=no
21207                 ;;
21208         *)
21209                 cf_ldflags_static=yes
21210                 ;;
21211         esac
21212
21213 else
21214   echo "$as_me: failed program was:" >&5
21215 cat conftest.$ac_ext >&5
21216 cf_ldflags_static=no
21217 fi
21218 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21219
21220         rm -f libconftest.*
21221         LIBS="$cf_save_LIBS"
21222
21223         echo "$as_me:21223: result: $cf_ldflags_static" >&5
21224 echo "${ECHO_T}$cf_ldflags_static" >&6
21225
21226         if test $cf_ldflags_static != yes
21227         then
21228                 LDFLAGS_STATIC=
21229                 LDFLAGS_SHARED=
21230         fi
21231 else
21232         LDFLAGS_STATIC=
21233         LDFLAGS_SHARED=
21234 fi
21235
21236         ;;
21237 esac
21238
21239 echo "$as_me:21239: checking where we will install curses.h" >&5
21240 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21241
21242 includesubdir=
21243 if test "$with_overwrite" = no && \
21244  ( test "x$includedir" = 'x${prefix}/include' || \
21245    test "x$includedir" = "x${prefix}/include" )
21246 then
21247         includesubdir="/ncurses${LIB_SUFFIX}"
21248 fi
21249 echo "$as_me:21249: result: ${includedir}${includesubdir}" >&5
21250 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21251
21252 ### Resolve a conflict between normal and wide-curses by forcing applications
21253 ### that will need libutf8 to add it to their configure script.
21254 if test "$with_overwrite" != no ; then
21255 if test "$NCURSES_LIBUTF8" = 1 ; then
21256         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21257         { echo "$as_me:21257: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21258 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21259 fi
21260 fi
21261 WITH_OVERWRITE=$with_overwrite
21262
21263 # used to separate tack out of the tree
21264 NCURSES_TREE=
21265
21266 ### predefined stuff for the test programs
21267
21268 cat >>confdefs.h <<\EOF
21269 #define HAVE_SLK_COLOR 1
21270 EOF
21271
21272 ### Construct the list of subdirectories for which we'll customize makefiles
21273 ### with the appropriate compile-rules.
21274
21275 echo "$as_me:21275: checking for src modules" >&5
21276 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21277
21278 # dependencies and linker-arguments for test-programs
21279 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21280 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21281 if test "$DFT_LWR_MODEL" = "libtool"; then
21282         TEST_ARGS="${TEST_DEPS}"
21283         TEST_ARG2="${TEST_DEP2}"
21284 else
21285         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21286         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
21287 fi
21288
21289 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
21290 cf_cv_src_modules=
21291 for cf_dir in $modules_to_build
21292 do
21293         if test -f $srcdir/$cf_dir/modules; then
21294
21295                 # We may/may not have tack in the distribution, though the
21296                 # makefile is.
21297                 if test $cf_dir = tack ; then
21298                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
21299                                 continue
21300                         fi
21301                 fi
21302
21303                 if test -z "$cf_cv_src_modules"; then
21304                         cf_cv_src_modules=$cf_dir
21305                 else
21306                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
21307                 fi
21308
21309                 # Make the ncurses_cfg.h file record the library interface files as
21310                 # well.  These are header files that are the same name as their
21311                 # directory.  Ncurses is the only library that does not follow
21312                 # that pattern.
21313                 if test $cf_dir = tack ; then
21314                         continue
21315                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
21316
21317 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21318
21319                         cat >>confdefs.h <<EOF
21320 #define HAVE_${cf_have_include}_H 1
21321 EOF
21322
21323                         cat >>confdefs.h <<EOF
21324 #define HAVE_LIB${cf_have_include} 1
21325 EOF
21326
21327                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
21328                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
21329                         if test "$DFT_LWR_MODEL" = "libtool"; then
21330                                 TEST_ARGS="${TEST_DEPS}"
21331                                 TEST_ARG2="${TEST_DEP2}"
21332                         else
21333                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
21334                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
21335                         fi
21336                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
21337                 fi
21338         fi
21339 done
21340 echo "$as_me:21340: result: $cf_cv_src_modules" >&5
21341 echo "${ECHO_T}$cf_cv_src_modules" >&6
21342
21343 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21344 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21345
21346 SRC_SUBDIRS=
21347 if test "x$cf_with_manpages" != xno ; then
21348         SRC_SUBDIRS="$SRC_SUBDIRS man"
21349 fi
21350 SRC_SUBDIRS="$SRC_SUBDIRS include"
21351 for cf_dir in $cf_cv_src_modules
21352 do
21353         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21354 done
21355 if test "x$cf_with_tests" != "xno" ; then
21356         SRC_SUBDIRS="$SRC_SUBDIRS test"
21357 fi
21358 if test "x$cf_with_db_install" = xyes; then
21359         test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
21360 fi
21361 if test "$cf_with_cxx_binding" != no; then
21362         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
21363         SRC_SUBDIRS="$SRC_SUBDIRS c++"
21364 fi
21365
21366 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21367 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
21368
21369 ADA_SUBDIRS=
21370 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
21371         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
21372         ADA_SUBDIRS="gen src"
21373         if test "x$cf_with_tests" != "xno" ; then
21374                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
21375         fi
21376 fi
21377
21378 SUB_MAKEFILES=
21379 for cf_dir in $SRC_SUBDIRS
21380 do
21381         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
21382 done
21383
21384 if test -n "$ADA_SUBDIRS"; then
21385         for cf_dir in $ADA_SUBDIRS
21386         do
21387                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
21388         done
21389
21390 fi
21391
21392 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21393    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
21394    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
21395 fi
21396
21397 DIRS_TO_MAKE="lib"
21398 for cf_item in $cf_list_models
21399 do
21400
21401         case $cf_item in
21402         libtool) cf_subdir='obj_lo'  ;;
21403         normal)  cf_subdir='objects' ;;
21404         debug)   cf_subdir='obj_g' ;;
21405         profile) cf_subdir='obj_p' ;;
21406         shared)
21407                 case $cf_cv_system_name in #(vi
21408                 cygwin|msys) #(vi
21409                         cf_subdir='objects' ;;
21410                 *)
21411                         cf_subdir='obj_s' ;;
21412                 esac
21413         esac
21414
21415         for cf_item2 in $DIRS_TO_MAKE
21416         do
21417                 test $cf_item2 = $cf_subdir && break
21418         done
21419         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21420 done
21421 for cf_dir in $DIRS_TO_MAKE
21422 do
21423         test ! -d $cf_dir && mkdir $cf_dir
21424 done
21425
21426 # symbols that differ when compiling Ada95 by itself.
21427 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
21428
21429 # values to use as strings
21430
21431 cat >>confdefs.h <<EOF
21432 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
21433 EOF
21434
21435 cat >>confdefs.h <<EOF
21436 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
21437 EOF
21438
21439 ### Now that we're done running tests, add the compiler-warnings, if any
21440
21441 cf_fix_cppflags=no
21442 cf_new_cflags=
21443 cf_new_cppflags=
21444 cf_new_extra_cppflags=
21445
21446 for cf_add_cflags in $EXTRA_CFLAGS
21447 do
21448 case $cf_fix_cppflags in
21449 no)
21450         case $cf_add_cflags in #(vi
21451         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
21452                 case $cf_add_cflags in
21453                 -D*)
21454                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21455
21456                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
21457                                 && test -z "${cf_tst_cflags}" \
21458                                 && cf_fix_cppflags=yes
21459
21460                         if test $cf_fix_cppflags = yes ; then
21461                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21462                                 continue
21463                         elif test "${cf_tst_cflags}" = "\"'" ; then
21464                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21465                                 continue
21466                         fi
21467                         ;;
21468                 esac
21469                 case "$CPPFLAGS" in
21470                 *$cf_add_cflags) #(vi
21471                         ;;
21472                 *) #(vi
21473                         case $cf_add_cflags in #(vi
21474                         -D*)
21475                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21476
21477 CPPFLAGS=`echo "$CPPFLAGS" | \
21478         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21479                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21480
21481                                 ;;
21482                         esac
21483                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
21484                         ;;
21485                 esac
21486                 ;;
21487         *)
21488                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
21489                 ;;
21490         esac
21491         ;;
21492 yes)
21493         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21494
21495         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21496
21497         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
21498                 && test -z "${cf_tst_cflags}" \
21499                 && cf_fix_cppflags=no
21500         ;;
21501 esac
21502 done
21503
21504 if test -n "$cf_new_cflags" ; then
21505
21506         CFLAGS="$CFLAGS $cf_new_cflags"
21507 fi
21508
21509 if test -n "$cf_new_cppflags" ; then
21510
21511         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
21512 fi
21513
21514 if test -n "$cf_new_extra_cppflags" ; then
21515
21516         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
21517 fi
21518
21519 ### Define substitutions for header files to avoid name-pollution
21520
21521 if test "x$cf_cv_have_tcgetattr" = xyes ; then
21522         HAVE_TCGETATTR=1
21523 else
21524         HAVE_TCGETATTR=0
21525 fi
21526
21527 if test "x$ac_cv_header_stdint_h" = xyes ; then
21528         HAVE_STDINT_H=1
21529 else
21530         HAVE_STDINT_H=0
21531 fi
21532
21533 if test "x$ac_cv_header_termio_h" = xyes ; then
21534         HAVE_TERMIO_H=1
21535 else
21536         HAVE_TERMIO_H=0
21537 fi
21538
21539 if test "x$ac_cv_header_termios_h" = xyes ; then
21540         HAVE_TERMIOS_H=1
21541 else
21542         HAVE_TERMIOS_H=0
21543 fi
21544
21545 ################################################################################
21546 test "x$use_database" = xyes && \
21547 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
21548
21549 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
21550 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
21551
21552 if test "x$enable_pc_files" = xyes ; then \
21553 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
21554 MAKE_PC_FILES=
21555 else
21556 MAKE_PC_FILES="#"
21557 fi
21558
21559 # Extract the first word of "tic", so it can be a program name with args.
21560 set dummy tic; ac_word=$2
21561 echo "$as_me:21561: checking for $ac_word" >&5
21562 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21563 if test "${ac_cv_path_TIC_PATH+set}" = set; then
21564   echo $ECHO_N "(cached) $ECHO_C" >&6
21565 else
21566   case $TIC_PATH in
21567   [\\/]* | ?:[\\/]*)
21568   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
21569   ;;
21570   *)
21571   ac_save_IFS=$IFS; IFS=$ac_path_separator
21572 ac_dummy="$PATH:/usr/local/ncurses/bin"
21573 for ac_dir in $ac_dummy; do
21574   IFS=$ac_save_IFS
21575   test -z "$ac_dir" && ac_dir=.
21576   if $as_executable_p "$ac_dir/$ac_word"; then
21577    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
21578    echo "$as_me:21578: found $ac_dir/$ac_word" >&5
21579    break
21580 fi
21581 done
21582
21583   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
21584   ;;
21585 esac
21586 fi
21587 TIC_PATH=$ac_cv_path_TIC_PATH
21588
21589 if test -n "$TIC_PATH"; then
21590   echo "$as_me:21590: result: $TIC_PATH" >&5
21591 echo "${ECHO_T}$TIC_PATH" >&6
21592 else
21593   echo "$as_me:21593: result: no" >&5
21594 echo "${ECHO_T}no" >&6
21595 fi
21596
21597 if test -n "$FALLBACK_LIST"
21598 then
21599         if test "$TIC_PATH" = unknown
21600         then
21601                 { echo "$as_me:21601: WARNING: no tic program found for fallbacks" >&5
21602 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
21603         fi
21604 fi
21605
21606 if test "x$cf_with_tests" != xno ; then
21607         MAKE_TESTS=
21608 else
21609         MAKE_TESTS="#"
21610 fi
21611
21612 ADAHTML_DIR=../../doc/html/ada
21613
21614 # these could be configurable, but are not currently
21615 PANEL_NAME=panel
21616 MENU_NAME=menu
21617 FORM_NAME=form
21618 CXX_NAME=ncurses++
21619
21620 # workaround for g++ versus Solaris (20131116)
21621 case $cf_cv_system_name in #(vi
21622 solaris2*) #(vi
21623         case "x$CPPFLAGS" in #(vi
21624         *-D_XOPEN_SOURCE_EXTENDED*)
21625                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
21626
21627 echo "${as_me:-configure}:21627: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
21628
21629                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
21630                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
21631                 ;;
21632         esac
21633         ;;
21634 esac
21635
21636 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
21637 case "x$NCURSES_OSPEED" in #(vi
21638 *short*) #(vi
21639         cf_compatible=1
21640         ;;
21641 *)
21642         cf_compatible=0
21643         ;;
21644 esac
21645
21646 cat >>confdefs.h <<EOF
21647 #define NCURSES_OSPEED_COMPAT $cf_compatible
21648 EOF
21649
21650 case "x$cf_cv_typeof_chtype" in
21651 xshort|xint|xlong)
21652         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
21653         ;;
21654 esac
21655
21656 case "x$cf_cv_typeof_mmask_t" in
21657 xshort|xint|xlong)
21658         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
21659         ;;
21660 esac
21661
21662 SUB_SCRIPTS=
21663
21664 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"
21665 ac_config_commands="$ac_config_commands default"
21666 cat >confcache <<\_ACEOF
21667 # This file is a shell script that caches the results of configure
21668 # tests run on this system so they can be shared between configure
21669 # scripts and configure runs, see configure's option --config-cache.
21670 # It is not useful on other systems.  If it contains results you don't
21671 # want to keep, you may remove or edit it.
21672 #
21673 # config.status only pays attention to the cache file if you give it
21674 # the --recheck option to rerun configure.
21675 #
21676 # `ac_cv_env_foo' variables (set or unset) will be overriden when
21677 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21678 # following values.
21679
21680 _ACEOF
21681
21682 # The following way of writing the cache mishandles newlines in values,
21683 # but we know of no workaround that is simple, portable, and efficient.
21684 # So, don't put newlines in cache variables' values.
21685 # Ultrix sh set writes to stderr and can't be redirected directly,
21686 # and sets the high bit in the cache file unless we assign to the vars.
21687 {
21688   (set) 2>&1 |
21689     case `(ac_space=' '; set | grep ac_space) 2>&1` in
21690     *ac_space=\ *)
21691       # `set' does not quote correctly, so add quotes (double-quote
21692       # substitution turns \\\\ into \\, and sed turns \\ into \).
21693       sed -n \
21694         "s/'/'\\\\''/g;
21695           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21696       ;;
21697     *)
21698       # `set' quotes correctly as required by POSIX, so do not add quotes.
21699       sed -n \
21700         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
21701       ;;
21702     esac;
21703 } |
21704   sed '
21705      t clear
21706      : clear
21707      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21708      t end
21709      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21710      : end' >>confcache
21711 if cmp -s $cache_file confcache; then :; else
21712   if test -w $cache_file; then
21713     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21714     cat confcache >$cache_file
21715   else
21716     echo "not updating unwritable cache $cache_file"
21717   fi
21718 fi
21719 rm -f confcache
21720
21721 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21722 # Let make expand exec_prefix.
21723 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21724
21725 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21726 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21727 # trailing colons and then remove the whole line if VPATH becomes empty
21728 # (actually we leave an empty line to preserve line numbers).
21729 if test "x$srcdir" = x.; then
21730   ac_vpsub='/^[         ]*VPATH[        ]*=/{
21731 s/:*\$(srcdir):*/:/;
21732 s/:*\${srcdir}:*/:/;
21733 s/:*@srcdir@:*/:/;
21734 s/^\([^=]*=[    ]*\):*/\1/;
21735 s/:*$//;
21736 s/^[^=]*=[      ]*$//;
21737 }'
21738 fi
21739
21740 DEFS=-DHAVE_CONFIG_H
21741
21742 : ${CONFIG_STATUS=./config.status}
21743 ac_clean_files_save=$ac_clean_files
21744 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21745 { echo "$as_me:21745: creating $CONFIG_STATUS" >&5
21746 echo "$as_me: creating $CONFIG_STATUS" >&6;}
21747 cat >$CONFIG_STATUS <<_ACEOF
21748 #! $SHELL
21749 # Generated automatically by configure.
21750 # Run this file to recreate the current configuration.
21751 # Compiler output produced by configure, useful for debugging
21752 # configure, is in config.log if it exists.
21753
21754 debug=false
21755 SHELL=\${CONFIG_SHELL-$SHELL}
21756 ac_cs_invocation="\$0 \$@"
21757
21758 _ACEOF
21759
21760 cat >>$CONFIG_STATUS <<\_ACEOF
21761 # Be Bourne compatible
21762 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21763   emulate sh
21764   NULLCMD=:
21765 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21766   set -o posix
21767 fi
21768
21769 # Name of the executable.
21770 as_me=`echo "$0" |sed 's,.*[\\/],,'`
21771
21772 if expr a : '\(a\)' >/dev/null 2>&1; then
21773   as_expr=expr
21774 else
21775   as_expr=false
21776 fi
21777
21778 rm -f conf$$ conf$$.exe conf$$.file
21779 echo >conf$$.file
21780 if ln -s conf$$.file conf$$ 2>/dev/null; then
21781   # We could just check for DJGPP; but this test a) works b) is more generic
21782   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21783   if test -f conf$$.exe; then
21784     # Don't use ln at all; we don't have any links
21785     as_ln_s='cp -p'
21786   else
21787     as_ln_s='ln -s'
21788   fi
21789 elif ln conf$$.file conf$$ 2>/dev/null; then
21790   as_ln_s=ln
21791 else
21792   as_ln_s='cp -p'
21793 fi
21794 rm -f conf$$ conf$$.exe conf$$.file
21795
21796 as_executable_p="test -f"
21797
21798 # Support unset when possible.
21799 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
21800   as_unset=unset
21801 else
21802   as_unset=false
21803 fi
21804
21805 # NLS nuisances.
21806 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
21807 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
21808 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
21809 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
21810 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
21811 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
21812 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
21813 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
21814
21815 # IFS
21816 # We need space, tab and new line, in precisely that order.
21817 as_nl='
21818 '
21819 IFS="   $as_nl"
21820
21821 # CDPATH.
21822 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
21823
21824 exec 6>&1
21825
21826 _ACEOF
21827
21828 # Files that config.status was made for.
21829 if test -n "$ac_config_files"; then
21830   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21831 fi
21832
21833 if test -n "$ac_config_headers"; then
21834   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21835 fi
21836
21837 if test -n "$ac_config_links"; then
21838   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21839 fi
21840
21841 if test -n "$ac_config_commands"; then
21842   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21843 fi
21844
21845 cat >>$CONFIG_STATUS <<\EOF
21846
21847 ac_cs_usage="\
21848 \`$as_me' instantiates files from templates according to the
21849 current configuration.
21850
21851 Usage: $0 [OPTIONS] [FILE]...
21852
21853   -h, --help       print this help, then exit
21854   -V, --version    print version number, then exit
21855   -d, --debug      don't remove temporary files
21856       --recheck    update $as_me by reconfiguring in the same conditions
21857   --file=FILE[:TEMPLATE]
21858                    instantiate the configuration file FILE
21859   --header=FILE[:TEMPLATE]
21860                    instantiate the configuration header FILE
21861
21862 Configuration files:
21863 $config_files
21864
21865 Configuration headers:
21866 $config_headers
21867
21868 Configuration commands:
21869 $config_commands
21870
21871 Report bugs to <dickey@invisible-island.net>."
21872 EOF
21873
21874 cat >>$CONFIG_STATUS <<EOF
21875 ac_cs_version="\\
21876 config.status
21877 configured by $0, generated by GNU Autoconf 2.52.20121002,
21878   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21879
21880 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
21881 Free Software Foundation, Inc.
21882 This config.status script is free software; the Free Software Foundation
21883 gives unlimited permission to copy, distribute and modify it."
21884 srcdir=$srcdir
21885 INSTALL="$INSTALL"
21886 EOF
21887
21888 cat >>$CONFIG_STATUS <<\EOF
21889 # If no file are specified by the user, then we need to provide default
21890 # value.  By we need to know if files were specified by the user.
21891 ac_need_defaults=:
21892 while test $# != 0
21893 do
21894   case $1 in
21895   --*=*)
21896     ac_option=`expr "x$1" : 'x\([^=]*\)='`
21897     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
21898     shift
21899     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
21900     shift
21901     ;;
21902   -*);;
21903   *) # This is not an option, so the user has probably given explicit
21904      # arguments.
21905      ac_need_defaults=false;;
21906   esac
21907
21908   case $1 in
21909   # Handling of the options.
21910 EOF
21911 cat >>$CONFIG_STATUS <<EOF
21912   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21913     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
21914     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
21915 EOF
21916 cat >>$CONFIG_STATUS <<\EOF
21917   --version | --vers* | -V )
21918     echo "$ac_cs_version"; exit 0 ;;
21919   --he | --h)
21920     # Conflict between --help and --header
21921     { { echo "$as_me:21921: error: ambiguous option: $1
21922 Try \`$0 --help' for more information." >&5
21923 echo "$as_me: error: ambiguous option: $1
21924 Try \`$0 --help' for more information." >&2;}
21925    { (exit 1); exit 1; }; };;
21926   --help | --hel | -h )
21927     echo "$ac_cs_usage"; exit 0 ;;
21928   --debug | --d* | -d )
21929     debug=: ;;
21930   --file | --fil | --fi | --f )
21931     shift
21932     CONFIG_FILES="$CONFIG_FILES $1"
21933     ac_need_defaults=false;;
21934   --header | --heade | --head | --hea )
21935     shift
21936     CONFIG_HEADERS="$CONFIG_HEADERS $1"
21937     ac_need_defaults=false;;
21938
21939   # This is an error.
21940   -*) { { echo "$as_me:21940: error: unrecognized option: $1
21941 Try \`$0 --help' for more information." >&5
21942 echo "$as_me: error: unrecognized option: $1
21943 Try \`$0 --help' for more information." >&2;}
21944    { (exit 1); exit 1; }; } ;;
21945
21946   *) ac_config_targets="$ac_config_targets $1" ;;
21947
21948   esac
21949   shift
21950 done
21951
21952 exec 5>>config.log
21953 cat >&5 << _ACEOF
21954
21955 ## ----------------------- ##
21956 ## Running config.status.  ##
21957 ## ----------------------- ##
21958
21959 This file was extended by $as_me 2.52.20121002, executed with
21960   CONFIG_FILES    = $CONFIG_FILES
21961   CONFIG_HEADERS  = $CONFIG_HEADERS
21962   CONFIG_LINKS    = $CONFIG_LINKS
21963   CONFIG_COMMANDS = $CONFIG_COMMANDS
21964   > $ac_cs_invocation
21965 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21966
21967 _ACEOF
21968 EOF
21969
21970 cat >>$CONFIG_STATUS <<EOF
21971 #
21972 # INIT-COMMANDS section.
21973 #
21974
21975 ### Special initialization commands, used to pass information from the
21976 ### configuration-run into config.status
21977
21978 AWK="$AWK"
21979 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
21980 DFT_LWR_MODEL="$DFT_LWR_MODEL"
21981 ECHO_LD="$ECHO_LD"
21982 LDCONFIG="$LDCONFIG"
21983 LIBTOOL_VERSION="$LIBTOOL_VERSION"
21984 LIB_NAME="$LIB_NAME"
21985 LIB_PREFIX="$LIB_PREFIX"
21986 LIB_SUBSETS="$LIB_SUBSETS"
21987 LIB_SUFFIX="$LIB_SUFFIX"
21988 LIB_TRACING="$LIB_TRACING"
21989 LN_S="$LN_S"
21990 MAKE_TERMINFO="$MAKE_TERMINFO"
21991 NCURSES_MAJOR="$NCURSES_MAJOR"
21992 NCURSES_MINOR="$NCURSES_MINOR"
21993 NCURSES_OSPEED="$NCURSES_OSPEED"
21994 NCURSES_PATCH="$NCURSES_PATCH"
21995 SRC_SUBDIRS="$SRC_SUBDIRS"
21996 TERMINFO="$TERMINFO"
21997 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
21998 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
21999 TICS_NAME="$TICS_NAME"
22000 TIC_PATH="$TIC_PATH"
22001 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22002 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22003 TINFO_NAME="$TINFO_NAME"
22004 TINFO_SUFFIX="$TINFO_SUFFIX"
22005 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22006 WITH_CURSES_H="$with_curses_h"
22007 WITH_ECHO="${enable_echo:=yes}"
22008 WITH_OVERWRITE="$with_overwrite"
22009 cf_LIST_MODELS="$cf_list_models"
22010 cf_cv_abi_version="$cf_cv_abi_version"
22011 cf_cv_do_relink="$cf_cv_do_relink"
22012 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22013 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22014 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22015 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22016 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22017 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22018 cf_cv_rel_version="$cf_cv_rel_version"
22019 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22020 cf_cv_shared_soname='$cf_cv_shared_soname'
22021 cf_cv_shlib_version="$cf_cv_shlib_version"
22022 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22023 cf_cv_system_name="$cf_cv_system_name"
22024 cf_cv_term_driver="$with_term_driver"
22025 cf_with_ada="$cf_with_ada"
22026 cf_with_cxx_binding="$cf_with_cxx_binding"
22027 cf_with_db_install="$cf_with_db_install"
22028 cf_with_manpages="$cf_with_manpages"
22029 cf_with_tests="$cf_with_tests"
22030 with_shared_cxx="$with_shared_cxx"
22031 host="$host"
22032 target="$target"
22033
22034 EOF
22035
22036 cat >>$CONFIG_STATUS <<\EOF
22037 for ac_config_target in $ac_config_targets
22038 do
22039   case "$ac_config_target" in
22040   # Handling of arguments.
22041   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22042   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22043   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22044   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22045   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22046   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22047   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22048   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22049   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22050   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22051   *) { { echo "$as_me:22051: error: invalid argument: $ac_config_target" >&5
22052 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22053    { (exit 1); exit 1; }; };;
22054   esac
22055 done
22056
22057 # If the user did not use the arguments to specify the items to instantiate,
22058 # then the envvar interface is used.  Set only those that are not.
22059 # We use the long form for the default assignment because of an extremely
22060 # bizarre bug on SunOS 4.1.3.
22061 if $ac_need_defaults; then
22062   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22063   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22064   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22065 fi
22066
22067 # Create a temporary directory, and hook for its removal unless debugging.
22068 $debug ||
22069 {
22070   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22071   trap '{ (exit 1); exit 1; }' 1 2 13 15
22072 }
22073
22074 # Create a (secure) tmp directory for tmp files.
22075 : ${TMPDIR=/tmp}
22076 {
22077   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22078   test -n "$tmp" && test -d "$tmp"
22079 }  ||
22080 {
22081   tmp=$TMPDIR/cs$$-$RANDOM
22082   (umask 077 && mkdir $tmp)
22083 } ||
22084 {
22085    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22086    { (exit 1); exit 1; }
22087 }
22088
22089 EOF
22090
22091 cat >>$CONFIG_STATUS <<EOF
22092
22093 #
22094 # CONFIG_FILES section.
22095 #
22096
22097 # No need to generate the scripts if there are no CONFIG_FILES.
22098 # This happens for instance when ./config.status config.h
22099 if test -n "\$CONFIG_FILES"; then
22100   # Protect against being on the right side of a sed subst in config.status.
22101   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22102    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22103 s,@SHELL@,$SHELL,;t t
22104 s,@exec_prefix@,$exec_prefix,;t t
22105 s,@prefix@,$prefix,;t t
22106 s,@program_transform_name@,$program_transform_name,;t t
22107 s,@bindir@,$bindir,;t t
22108 s,@sbindir@,$sbindir,;t t
22109 s,@libexecdir@,$libexecdir,;t t
22110 s,@datarootdir@,$datarootdir,;t t
22111 s,@datadir@,$datadir,;t t
22112 s,@sysconfdir@,$sysconfdir,;t t
22113 s,@sharedstatedir@,$sharedstatedir,;t t
22114 s,@localstatedir@,$localstatedir,;t t
22115 s,@libdir@,$libdir,;t t
22116 s,@includedir@,$includedir,;t t
22117 s,@oldincludedir@,$oldincludedir,;t t
22118 s,@infodir@,$infodir,;t t
22119 s,@mandir@,$mandir,;t t
22120 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22121 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22122 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22123 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22124 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22125 s,@build_alias@,$build_alias,;t t
22126 s,@host_alias@,$host_alias,;t t
22127 s,@target_alias@,$target_alias,;t t
22128 s,@ECHO_C@,$ECHO_C,;t t
22129 s,@ECHO_N@,$ECHO_N,;t t
22130 s,@ECHO_T@,$ECHO_T,;t t
22131 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22132 s,@DEFS@,$DEFS,;t t
22133 s,@LIBS@,$LIBS,;t t
22134 s,@top_builddir@,$top_builddir,;t t
22135 s,@EGREP@,$EGREP,;t t
22136 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22137 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22138 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22139 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22140 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22141 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22142 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22143 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22144 s,@build@,$build,;t t
22145 s,@build_cpu@,$build_cpu,;t t
22146 s,@build_vendor@,$build_vendor,;t t
22147 s,@build_os@,$build_os,;t t
22148 s,@host@,$host,;t t
22149 s,@host_cpu@,$host_cpu,;t t
22150 s,@host_vendor@,$host_vendor,;t t
22151 s,@host_os@,$host_os,;t t
22152 s,@target@,$target,;t t
22153 s,@target_cpu@,$target_cpu,;t t
22154 s,@target_vendor@,$target_vendor,;t t
22155 s,@target_os@,$target_os,;t t
22156 s,@CC@,$CC,;t t
22157 s,@CFLAGS@,$CFLAGS,;t t
22158 s,@LDFLAGS@,$LDFLAGS,;t t
22159 s,@CPPFLAGS@,$CPPFLAGS,;t t
22160 s,@ac_ct_CC@,$ac_ct_CC,;t t
22161 s,@EXEEXT@,$EXEEXT,;t t
22162 s,@OBJEXT@,$OBJEXT,;t t
22163 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22164 s,@CPP@,$CPP,;t t
22165 s,@LDCONFIG@,$LDCONFIG,;t t
22166 s,@CXX@,$CXX,;t t
22167 s,@CXXFLAGS@,$CXXFLAGS,;t t
22168 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22169 s,@AWK@,$AWK,;t t
22170 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22171 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22172 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22173 s,@LINT@,$LINT,;t t
22174 s,@LINT_OPTS@,$LINT_OPTS,;t t
22175 s,@LN_S@,$LN_S,;t t
22176 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22177 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22178 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22179 s,@SET_MAKE@,$SET_MAKE,;t t
22180 s,@CTAGS@,$CTAGS,;t t
22181 s,@ETAGS@,$ETAGS,;t t
22182 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22183 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22184 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22185 s,@RANLIB@,$RANLIB,;t t
22186 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22187 s,@LD@,$LD,;t t
22188 s,@ac_ct_LD@,$ac_ct_LD,;t t
22189 s,@AR@,$AR,;t t
22190 s,@ac_ct_AR@,$ac_ct_AR,;t t
22191 s,@NM@,$NM,;t t
22192 s,@ac_ct_NM@,$ac_ct_NM,;t t
22193 s,@ARFLAGS@,$ARFLAGS,;t t
22194 s,@DESTDIR@,$DESTDIR,;t t
22195 s,@BUILD_CC@,$BUILD_CC,;t t
22196 s,@BUILD_CPP@,$BUILD_CPP,;t t
22197 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22198 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22199 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22200 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22201 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22202 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22203 s,@cf_list_models@,$cf_list_models,;t t
22204 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
22205 s,@LIBTOOL@,$LIBTOOL,;t t
22206 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22207 s,@LT_UNDEF@,$LT_UNDEF,;t t
22208 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22209 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22210 s,@LIB_CREATE@,$LIB_CREATE,;t t
22211 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22212 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22213 s,@LIB_PREP@,$LIB_PREP,;t t
22214 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22215 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22216 s,@LIB_LINK@,$LIB_LINK,;t t
22217 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22218 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
22219 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
22220 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
22221 s,@TICS_NAME@,$TICS_NAME,;t t
22222 s,@TINFO_NAME@,$TINFO_NAME,;t t
22223 s,@LIB_NAME@,$LIB_NAME,;t t
22224 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
22225 s,@CC_G_OPT@,$CC_G_OPT,;t t
22226 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
22227 s,@LD_MODEL@,$LD_MODEL,;t t
22228 s,@shlibdir@,$shlibdir,;t t
22229 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
22230 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
22231 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
22232 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
22233 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
22234 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
22235 s,@LINK_PROGS@,$LINK_PROGS,;t t
22236 s,@LINK_TESTS@,$LINK_TESTS,;t t
22237 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22238 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
22239 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
22240 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
22241 s,@RPATH_LIST@,$RPATH_LIST,;t t
22242 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22243 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
22244 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
22245 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
22246 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
22247 s,@XTERM_KBS@,$XTERM_KBS,;t t
22248 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
22249 s,@TERMINFO@,$TERMINFO,;t t
22250 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
22251 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
22252 s,@TERMPATH@,$TERMPATH,;t t
22253 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
22254 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
22255 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
22256 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
22257 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
22258 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
22259 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
22260 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
22261 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
22262 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
22263 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
22264 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
22265 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
22266 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
22267 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
22268 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
22269 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
22270 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
22271 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
22272 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
22273 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
22274 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
22275 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
22276 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
22277 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
22278 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
22279 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
22280 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
22281 s,@PTHREAD@,$PTHREAD,;t t
22282 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
22283 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
22284 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
22285 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
22286 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
22287 s,@ECHO_LT@,$ECHO_LT,;t t
22288 s,@ECHO_LD@,$ECHO_LD,;t t
22289 s,@RULE_CC@,$RULE_CC,;t t
22290 s,@SHOW_CC@,$SHOW_CC,;t t
22291 s,@ECHO_CC@,$ECHO_CC,;t t
22292 s,@ECHO_LINK@,$ECHO_LINK,;t t
22293 s,@ADAFLAGS@,$ADAFLAGS,;t t
22294 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
22295 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
22296 s,@ADA_TRACE@,$ADA_TRACE,;t t
22297 s,@MATH_LIB@,$MATH_LIB,;t t
22298 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
22299 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
22300 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
22301 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
22302 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
22303 s,@TEST_LIBS@,$TEST_LIBS,;t t
22304 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
22305 s,@CXXCPP@,$CXXCPP,;t t
22306 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
22307 s,@CXX_AR@,$CXX_AR,;t t
22308 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
22309 s,@CXXLIBS@,$CXXLIBS,;t t
22310 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
22311 s,@gnat_exists@,$gnat_exists,;t t
22312 s,@M4_exists@,$M4_exists,;t t
22313 s,@cf_ada_make@,$cf_ada_make,;t t
22314 s,@cf_compile_generics@,$cf_compile_generics,;t t
22315 s,@cf_generic_objects@,$cf_generic_objects,;t t
22316 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
22317 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
22318 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
22319 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
22320 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
22321 s,@cf_ada_package@,$cf_ada_package,;t t
22322 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
22323 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
22324 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
22325 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
22326 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
22327 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
22328 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
22329 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
22330 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
22331 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
22332 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
22333 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
22334 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
22335 s,@TICS_LIBS@,$TICS_LIBS,;t t
22336 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
22337 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
22338 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
22339 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
22340 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
22341 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
22342 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
22343 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
22344 s,@includesubdir@,$includesubdir,;t t
22345 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
22346 s,@TICS_LIST@,$TICS_LIST,;t t
22347 s,@TINFO_LIST@,$TINFO_LIST,;t t
22348 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
22349 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
22350 s,@TEST_ARGS@,$TEST_ARGS,;t t
22351 s,@TEST_DEPS@,$TEST_DEPS,;t t
22352 s,@TEST_ARG2@,$TEST_ARG2,;t t
22353 s,@TEST_DEP2@,$TEST_DEP2,;t t
22354 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
22355 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
22356 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
22357 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
22358 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
22359 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
22360 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
22361 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
22362 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22363 s,@cross_compiling@,$cross_compiling,;t t
22364 s,@TIC_PATH@,$TIC_PATH,;t t
22365 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
22366 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
22367 s,@PANEL_NAME@,$PANEL_NAME,;t t
22368 s,@MENU_NAME@,$MENU_NAME,;t t
22369 s,@FORM_NAME@,$FORM_NAME,;t t
22370 s,@CXX_NAME@,$CXX_NAME,;t t
22371 CEOF
22372
22373 EOF
22374
22375   cat >>$CONFIG_STATUS <<\EOF
22376   # Split the substitutions into bite-sized pieces for seds with
22377   # small command number limits, like on Digital OSF/1 and HP-UX.
22378   ac_max_sed_lines=48
22379   ac_sed_frag=1 # Number of current file.
22380   ac_beg=1 # First line for current file.
22381   ac_end=$ac_max_sed_lines # Line after last line for current file.
22382   ac_more_lines=:
22383   ac_sed_cmds=
22384   while $ac_more_lines; do
22385     if test $ac_beg -gt 1; then
22386       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22387     else
22388       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22389     fi
22390     if test ! -s $tmp/subs.frag; then
22391       ac_more_lines=false
22392     else
22393       # The purpose of the label and of the branching condition is to
22394       # speed up the sed processing (if there are no `@' at all, there
22395       # is no need to browse any of the substitutions).
22396       # These are the two extra sed commands mentioned above.
22397       (echo ':t
22398   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22399       if test -z "$ac_sed_cmds"; then
22400         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
22401       else
22402         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22403       fi
22404       ac_sed_frag=`expr $ac_sed_frag + 1`
22405       ac_beg=$ac_end
22406       ac_end=`expr $ac_end + $ac_max_sed_lines`
22407     fi
22408   done
22409   if test -z "$ac_sed_cmds"; then
22410     ac_sed_cmds=cat
22411   fi
22412 fi # test -n "$CONFIG_FILES"
22413
22414 EOF
22415 cat >>$CONFIG_STATUS <<\EOF
22416 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22417   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22418   case $ac_file in
22419   - | *:- | *:-:* ) # input from stdin
22420         cat >$tmp/stdin
22421         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22422         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22423   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22424         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22425   * )   ac_file_in=$ac_file.in ;;
22426   esac
22427
22428   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22429   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22430          X"$ac_file" : 'X\(//\)[^/]' \| \
22431          X"$ac_file" : 'X\(//\)$' \| \
22432          X"$ac_file" : 'X\(/\)' \| \
22433          .     : '\(.\)' 2>/dev/null ||
22434 echo X"$ac_file" |
22435     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22436           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22437           /^X\(\/\/\)$/{ s//\1/; q; }
22438           /^X\(\/\).*/{ s//\1/; q; }
22439           s/.*/./; q'`
22440   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22441     { case "$ac_dir" in
22442   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22443   *)                      as_incr_dir=.;;
22444 esac
22445 as_dummy="$ac_dir"
22446 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22447   case $as_mkdir_dir in
22448     # Skip DOS drivespec
22449     ?:) as_incr_dir=$as_mkdir_dir ;;
22450     *)
22451       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22452       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22453     ;;
22454   esac
22455 done; }
22456
22457     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
22458     # A "../" for each directory in $ac_dir_suffix.
22459     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
22460   else
22461     ac_dir_suffix= ac_dots=
22462   fi
22463
22464   case $srcdir in
22465   .)  ac_srcdir=.
22466       if test -z "$ac_dots"; then
22467          ac_top_srcdir=.
22468       else
22469          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
22470       fi ;;
22471   [\\/]* | ?:[\\/]* )
22472       ac_srcdir=$srcdir$ac_dir_suffix;
22473       ac_top_srcdir=$srcdir ;;
22474   *) # Relative path.
22475     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
22476     ac_top_srcdir=$ac_dots$srcdir ;;
22477   esac
22478
22479   case $INSTALL in
22480   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22481   *) ac_INSTALL=$ac_dots$INSTALL ;;
22482   esac
22483
22484   if test x"$ac_file" != x-; then
22485     { echo "$as_me:22485: creating $ac_file" >&5
22486 echo "$as_me: creating $ac_file" >&6;}
22487     rm -f "$ac_file"
22488   fi
22489   # Let's still pretend it is `configure' which instantiates (i.e., don't
22490   # use $as_me), people would be surprised to read:
22491   #    /* config.h.  Generated automatically by config.status.  */
22492   configure_input="Generated automatically from `echo $ac_file_in |
22493                                                  sed 's,.*/,,'` by configure."
22494
22495   # First look for the input files in the build tree, otherwise in the
22496   # src tree.
22497   ac_file_inputs=`IFS=:
22498     for f in $ac_file_in; do
22499       case $f in
22500       -) echo $tmp/stdin ;;
22501       [\\/$]*)
22502          # Absolute (can't be DOS-style, as IFS=:)
22503          test -f "$f" || { { echo "$as_me:22503: error: cannot find input file: $f" >&5
22504 echo "$as_me: error: cannot find input file: $f" >&2;}
22505    { (exit 1); exit 1; }; }
22506          echo $f;;
22507       *) # Relative
22508          if test -f "$f"; then
22509            # Build tree
22510            echo $f
22511          elif test -f "$srcdir/$f"; then
22512            # Source tree
22513            echo $srcdir/$f
22514          else
22515            # /dev/null tree
22516            { { echo "$as_me:22516: error: cannot find input file: $f" >&5
22517 echo "$as_me: error: cannot find input file: $f" >&2;}
22518    { (exit 1); exit 1; }; }
22519          fi;;
22520       esac
22521     done` || { (exit 1); exit 1; }
22522 EOF
22523 cat >>$CONFIG_STATUS <<\EOF
22524   ac_warn_datarootdir=no
22525   if test x"$ac_file" != x-; then
22526     for ac_item in $ac_file_inputs
22527     do
22528       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
22529       if test -n "$ac_seen"; then
22530         ac_used=`grep '@datarootdir@' $ac_item`
22531         if test -z "$ac_used"; then
22532           { echo "$as_me:22532: WARNING: datarootdir was used implicitly but not set:
22533 $ac_seen" >&5
22534 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
22535 $ac_seen" >&2;}
22536           ac_warn_datarootdir=yes
22537         fi
22538       fi
22539       ac_seen=`grep '${datarootdir}' $ac_item`
22540       if test -n "$ac_seen"; then
22541         { echo "$as_me:22541: WARNING: datarootdir was used explicitly but not set:
22542 $ac_seen" >&5
22543 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
22544 $ac_seen" >&2;}
22545         ac_warn_datarootdir=yes
22546       fi
22547     done
22548   fi
22549
22550 if test "x$ac_warn_datarootdir" = xyes; then
22551   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
22552 fi
22553
22554 EOF
22555 cat >>$CONFIG_STATUS <<EOF
22556   sed "$ac_vpsub
22557 $extrasub
22558 EOF
22559 cat >>$CONFIG_STATUS <<\EOF
22560 :t
22561 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22562 s,@configure_input@,$configure_input,;t t
22563 s,@srcdir@,$ac_srcdir,;t t
22564 s,@top_srcdir@,$ac_top_srcdir,;t t
22565 s,@INSTALL@,$ac_INSTALL,;t t
22566 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22567   rm -f $tmp/stdin
22568   if test x"$ac_file" != x-; then
22569     cp $tmp/out $ac_file
22570
22571     for ac_name in prefix exec_prefix datarootdir
22572     do
22573         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
22574         if test -n "$ac_seen"; then
22575             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
22576             if test -z "$ac_init"; then
22577               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
22578               { echo "$as_me:22578: WARNING: Variable $ac_name is used but was not set:
22579 $ac_seen" >&5
22580 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
22581 $ac_seen" >&2;}
22582             fi
22583         fi
22584     done
22585     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
22586     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
22587     if test -s $tmp/out; then
22588       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
22589       { echo "$as_me:22589: WARNING: Some variables may not be substituted:
22590 $ac_seen" >&5
22591 echo "$as_me: WARNING: Some variables may not be substituted:
22592 $ac_seen" >&2;}
22593     fi
22594   else
22595     cat $tmp/out
22596   fi
22597   rm -f $tmp/out
22598
22599 done
22600 EOF
22601 cat >>$CONFIG_STATUS <<\EOF
22602
22603 #
22604 # CONFIG_HEADER section.
22605 #
22606
22607 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22608 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22609 #
22610 # ac_d sets the value in "#define NAME VALUE" lines.
22611 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22612 ac_dB='[        ].*$,\1#\2'
22613 ac_dC=' '
22614 ac_dD=',;t'
22615 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22616 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22617 ac_iB='\([      ]\),\1#\2define\3'
22618 ac_iC=' '
22619 ac_iD='\4,;t'
22620 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22621 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22622 ac_uB='$,\1#\2define\3'
22623 ac_uC=' '
22624 ac_uD=',;t'
22625
22626 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22627   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22628   case $ac_file in
22629   - | *:- | *:-:* ) # input from stdin
22630         cat >$tmp/stdin
22631         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22632         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22633   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22634         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22635   * )   ac_file_in=$ac_file.in ;;
22636   esac
22637
22638   test x"$ac_file" != x- && { echo "$as_me:22638: creating $ac_file" >&5
22639 echo "$as_me: creating $ac_file" >&6;}
22640
22641   # First look for the input files in the build tree, otherwise in the
22642   # src tree.
22643   ac_file_inputs=`IFS=:
22644     for f in $ac_file_in; do
22645       case $f in
22646       -) echo $tmp/stdin ;;
22647       [\\/$]*)
22648          # Absolute (can't be DOS-style, as IFS=:)
22649          test -f "$f" || { { echo "$as_me:22649: error: cannot find input file: $f" >&5
22650 echo "$as_me: error: cannot find input file: $f" >&2;}
22651    { (exit 1); exit 1; }; }
22652          echo $f;;
22653       *) # Relative
22654          if test -f "$f"; then
22655            # Build tree
22656            echo $f
22657          elif test -f "$srcdir/$f"; then
22658            # Source tree
22659            echo $srcdir/$f
22660          else
22661            # /dev/null tree
22662            { { echo "$as_me:22662: error: cannot find input file: $f" >&5
22663 echo "$as_me: error: cannot find input file: $f" >&2;}
22664    { (exit 1); exit 1; }; }
22665          fi;;
22666       esac
22667     done` || { (exit 1); exit 1; }
22668   # Remove the trailing spaces.
22669   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
22670
22671 EOF
22672
22673 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
22674 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
22675 # be either 'cat' or 'sort'.
22676 cat confdefs.h | uniq >conftest.vals
22677
22678 # Break up conftest.vals because some shells have a limit on
22679 # the size of here documents, and old seds have small limits too.
22680
22681 rm -f conftest.tail
22682 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
22683 while grep . conftest.vals >/dev/null
22684 do
22685   # Write chunks of a limited-size here document to conftest.frag.
22686   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
22687   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
22688   echo 'CEOF' >> $CONFIG_STATUS
22689   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22690   rm -f conftest.vals
22691   mv conftest.tail conftest.vals
22692 done
22693 rm -f conftest.vals
22694
22695 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
22696 # marker @DEFS@.
22697 echo '  cat >> conftest.edit <<CEOF
22698 /@DEFS@/r conftest.frag
22699 /@DEFS@/d
22700 CEOF
22701 sed -f conftest.edit $tmp/in > $tmp/out
22702 rm -f $tmp/in
22703 mv $tmp/out $tmp/in
22704 rm -f conftest.edit conftest.frag
22705 ' >> $CONFIG_STATUS
22706
22707 cat >>$CONFIG_STATUS <<\EOF
22708   # Let's still pretend it is `configure' which instantiates (i.e., don't
22709   # use $as_me), people would be surprised to read:
22710   #    /* config.h.  Generated automatically by config.status.  */
22711   if test x"$ac_file" = x-; then
22712     echo "/* Generated automatically by configure.  */" >$tmp/config.h
22713   else
22714     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
22715   fi
22716   cat $tmp/in >>$tmp/config.h
22717   rm -f $tmp/in
22718   if test x"$ac_file" != x-; then
22719     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
22720       { echo "$as_me:22720: $ac_file is unchanged" >&5
22721 echo "$as_me: $ac_file is unchanged" >&6;}
22722     else
22723       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22724          X"$ac_file" : 'X\(//\)[^/]' \| \
22725          X"$ac_file" : 'X\(//\)$' \| \
22726          X"$ac_file" : 'X\(/\)' \| \
22727          .     : '\(.\)' 2>/dev/null ||
22728 echo X"$ac_file" |
22729     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22730           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22731           /^X\(\/\/\)$/{ s//\1/; q; }
22732           /^X\(\/\).*/{ s//\1/; q; }
22733           s/.*/./; q'`
22734       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22735         { case "$ac_dir" in
22736   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22737   *)                      as_incr_dir=.;;
22738 esac
22739 as_dummy="$ac_dir"
22740 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22741   case $as_mkdir_dir in
22742     # Skip DOS drivespec
22743     ?:) as_incr_dir=$as_mkdir_dir ;;
22744     *)
22745       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22746       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22747     ;;
22748   esac
22749 done; }
22750
22751       fi
22752       rm -f $ac_file
22753       mv $tmp/config.h $ac_file
22754     fi
22755   else
22756     cat $tmp/config.h
22757     rm -f $tmp/config.h
22758   fi
22759 done
22760 EOF
22761 cat >>$CONFIG_STATUS <<\EOF
22762 #
22763 # CONFIG_COMMANDS section.
22764 #
22765 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22766   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22767   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22768
22769   case $ac_dest in
22770     default )
22771 if test "x$cf_with_tests" != xno ; then
22772
22773 for cf_dir in test
22774 do
22775         if test ! -d $srcdir/$cf_dir; then
22776                 continue
22777         elif test -f $srcdir/$cf_dir/programs; then
22778                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
22779         fi
22780 done
22781
22782 fi
22783
22784 cf_prefix=$LIB_PREFIX
22785
22786 case $cf_cv_shlib_version in #(vi
22787 cygdll|msysdll|mingw)
22788         TINFO_NAME=$TINFO_ARG_SUFFIX
22789         TINFO_SUFFIX=.dll
22790         ;;
22791 esac
22792
22793 if test -n "$TINFO_SUFFIX" ; then
22794         case $TINFO_SUFFIX in
22795         tw*)
22796                 TINFO_NAME="${TINFO_NAME}tw"
22797                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
22798                 ;;
22799         t*)
22800                 TINFO_NAME="${TINFO_NAME}t"
22801                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
22802                 ;;
22803         w*)
22804                 TINFO_NAME="${TINFO_NAME}w"
22805                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
22806                 ;;
22807         esac
22808 fi
22809
22810 for cf_dir in $SRC_SUBDIRS
22811 do
22812         if test ! -d $srcdir/$cf_dir ; then
22813                 continue
22814         elif test -f $srcdir/$cf_dir/modules; then
22815
22816                 SHARED_LIB=
22817                 Libs_To_Make=
22818                 for cf_item in $cf_LIST_MODELS
22819                 do
22820
22821         case X$cf_item in #(vi
22822         Xlibtool) #(vi
22823                 cf_suffix='.la'
22824                 cf_depsuf=$cf_suffix
22825                 ;;
22826         Xdebug) #(vi
22827                 cf_suffix='_g.a'
22828                 cf_depsuf=$cf_suffix
22829                 ;;
22830         Xprofile) #(vi
22831                 cf_suffix='_p.a'
22832                 cf_depsuf=$cf_suffix
22833                 ;;
22834         Xshared) #(vi
22835                 case $cf_cv_system_name in
22836                 aix[5-7]*) #(vi
22837                         cf_suffix='.so'
22838                         cf_depsuf=$cf_suffix
22839                         ;;
22840                 cygwin*|msys*|mingw*) #(vi
22841                         cf_suffix='.dll'
22842                         cf_depsuf='.dll.a'
22843                         ;;
22844                 darwin*) #(vi
22845                         cf_suffix='.dylib'
22846                         cf_depsuf=$cf_suffix
22847                         ;;
22848                 hpux*) #(vi
22849                         case $target in
22850                         ia64*) #(vi
22851                                 cf_suffix='.so'
22852                                 cf_depsuf=$cf_suffix
22853                                 ;;
22854                         *) #(vi
22855                                 cf_suffix='.sl'
22856                                 cf_depsuf=$cf_suffix
22857                                 ;;
22858                         esac
22859                         ;;
22860                 *) #(vi
22861                         cf_suffix='.so'
22862                         cf_depsuf=$cf_suffix
22863                         ;;
22864                 esac
22865                 ;;
22866         *)
22867                 cf_suffix='.a'
22868                 cf_depsuf=$cf_suffix
22869                 ;;
22870         esac
22871         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22872         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22873
22874                         cf_libname=$cf_dir
22875                         test "$cf_dir" = c++ && cf_libname=ncurses++
22876                         if test $cf_item = shared ; then
22877                                 if test -n "${LIB_SUFFIX}"
22878                                 then
22879                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
22880                                 else
22881                                         cf_shared_suffix="$cf_suffix"
22882                                 fi
22883                                 if test "$cf_cv_do_symlinks" = yes ; then
22884                                         cf_version_name=
22885
22886                                         case "$cf_cv_shlib_version" in #(vi
22887                                         rel) #(vi
22888                                                 cf_version_name=REL_VERSION
22889                                                 ;;
22890                                         abi)
22891                                                 cf_version_name=ABI_VERSION
22892                                                 ;;
22893                                         esac
22894
22895                                         if test -n "$cf_version_name"
22896                                         then
22897                                                 case "$cf_cv_system_name" in #(vi
22898                                                 darwin*)
22899                                                         # "w", etc?
22900                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
22901                                                         ;; #(vi
22902                                                 *)
22903                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
22904                                                         ;;
22905                                                 esac
22906                                         fi
22907                                         if test -n "${LIB_SUFFIX}"
22908                                         then
22909                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
22910                                         else
22911                                                 cf_shared_suffix="$cf_suffix"
22912                                         fi
22913                                 fi
22914                                 # cygwin needs import library, and has unique naming convention
22915                                 # use autodetected ${cf_prefix} for import lib and static lib, but
22916                                 # use 'cyg' prefix for shared lib.
22917                                 case $cf_cv_shlib_version in #(vi
22918                                 cygdll) #(vi
22919                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22920                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
22921                                         continue
22922                                         ;;
22923                                 msysdll) #(vi
22924                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22925                                         Libs_To_Make="$Libs_To_Make ../lib/msys-${cf_libname}${cf_cygsuf}"
22926                                         continue
22927                                         ;;
22928                                 mingw)
22929                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22930                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
22931                                         continue
22932                                         ;;
22933                                 esac
22934                         fi
22935                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
22936                 done
22937
22938                 if test $cf_dir = ncurses ; then
22939                         cf_subsets="$LIB_SUBSETS"
22940                         cf_r_parts="$cf_subsets"
22941                         cf_liblist="$Libs_To_Make"
22942
22943                         while test -n "$cf_r_parts"
22944                         do
22945                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
22946                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
22947                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
22948                                         cf_item=
22949                                         case $cf_l_parts in #(vi
22950                                         *termlib*) #(vi
22951                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
22952                                                 ;;
22953                                         *ticlib*)
22954                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
22955                                                 ;;
22956                                         *)
22957                                                 break
22958                                                 ;;
22959                                         esac
22960                                         if test -n "$cf_item"; then
22961                                                 Libs_To_Make="$cf_item $Libs_To_Make"
22962                                         fi
22963                                 else
22964                                         break
22965                                 fi
22966                         done
22967                 else
22968                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
22969                 fi
22970
22971                 if test $cf_dir = c++; then
22972                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
22973                                 cf_list=
22974                                 for cf_item in $Libs_To_Make
22975                                 do
22976                                         case $cf_item in
22977                                         *.a)
22978                                                 ;;
22979                                         *)
22980                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
22981                                                 ;;
22982                                         esac
22983                                         for cf_test in $cf_list
22984                                         do
22985                                                 if test "$cf_test" = "$cf_item"
22986                                                 then
22987                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
22988                                                         cf_item=
22989                                                         break
22990                                                 fi
22991                                         done
22992                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
22993                                 done
22994                                 Libs_To_Make="$cf_list"
22995                         fi
22996                 fi
22997
22998                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
22999                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23000                         $cf_dir/Makefile >$cf_dir/Makefile.out
23001                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23002
23003                 $AWK -f $srcdir/mk-0th.awk \
23004                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23005                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23006
23007                 for cf_subset in $cf_subsets
23008                 do
23009                         cf_subdirs=
23010                         for cf_item in $cf_LIST_MODELS
23011                         do
23012
23013                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23014
23015 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23016
23017                         CXX_MODEL=$cf_ITEM
23018                         if test "$CXX_MODEL" = SHARED; then
23019                                 case $cf_cv_shlib_version in #(vi
23020                                 cygdll|msysdll|mingw) #(vi
23021                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23022
23023 echo "${as_me:-configure}:23023: testing overriding CXX_MODEL to SHARED ..." 1>&5
23024
23025                                         with_shared_cxx=yes
23026                                         ;;
23027                                 *)
23028                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23029                                         ;;
23030                                 esac
23031                         fi
23032
23033         case X$cf_item in #(vi
23034         Xlibtool) #(vi
23035                 cf_suffix='.la'
23036                 cf_depsuf=$cf_suffix
23037                 ;;
23038         Xdebug) #(vi
23039                 cf_suffix='_g.a'
23040                 cf_depsuf=$cf_suffix
23041                 ;;
23042         Xprofile) #(vi
23043                 cf_suffix='_p.a'
23044                 cf_depsuf=$cf_suffix
23045                 ;;
23046         Xshared) #(vi
23047                 case $cf_cv_system_name in
23048                 aix[5-7]*) #(vi
23049                         cf_suffix='.so'
23050                         cf_depsuf=$cf_suffix
23051                         ;;
23052                 cygwin*|msys*|mingw*) #(vi
23053                         cf_suffix='.dll'
23054                         cf_depsuf='.dll.a'
23055                         ;;
23056                 darwin*) #(vi
23057                         cf_suffix='.dylib'
23058                         cf_depsuf=$cf_suffix
23059                         ;;
23060                 hpux*) #(vi
23061                         case $target in
23062                         ia64*) #(vi
23063                                 cf_suffix='.so'
23064                                 cf_depsuf=$cf_suffix
23065                                 ;;
23066                         *) #(vi
23067                                 cf_suffix='.sl'
23068                                 cf_depsuf=$cf_suffix
23069                                 ;;
23070                         esac
23071                         ;;
23072                 *) #(vi
23073                         cf_suffix='.so'
23074                         cf_depsuf=$cf_suffix
23075                         ;;
23076                 esac
23077                 ;;
23078         *)
23079                 cf_suffix='.a'
23080                 cf_depsuf=$cf_suffix
23081                 ;;
23082         esac
23083         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23084         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23085
23086         case $cf_item in
23087         libtool) cf_subdir='obj_lo'  ;;
23088         normal)  cf_subdir='objects' ;;
23089         debug)   cf_subdir='obj_g' ;;
23090         profile) cf_subdir='obj_p' ;;
23091         shared)
23092                 case $cf_cv_system_name in #(vi
23093                 cygwin|msys) #(vi
23094                         cf_subdir='objects' ;;
23095                 *)
23096                         cf_subdir='obj_s' ;;
23097                 esac
23098         esac
23099
23100                         # Test for case where we build libtinfo with a different name.
23101                         cf_libname=$cf_dir
23102                         if test $cf_dir = ncurses ; then
23103                                 case $cf_subset in
23104                                 *base*)
23105                                         cf_libname=${cf_libname}$LIB_SUFFIX
23106                                         ;;
23107                                 *termlib*)
23108                                         cf_libname=$TINFO_LIB_SUFFIX
23109                                         ;;
23110                                 ticlib*)
23111                                         cf_libname=$TICS_LIB_SUFFIX
23112                                         ;;
23113                                 esac
23114                         elif test $cf_dir = c++ ; then
23115                                 cf_libname=ncurses++$LIB_SUFFIX
23116                         else
23117                                 cf_libname=${cf_libname}$LIB_SUFFIX
23118                         fi
23119                         if test -n "${DFT_ARG_SUFFIX}" ; then
23120                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
23121                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
23122                         fi
23123
23124                         # These dependencies really are for development, not
23125                         # builds, but they are useful in porting, too.
23126                         cf_depend="../include/ncurses_cfg.h"
23127                         if test "$srcdir" = "."; then
23128                                 cf_reldir="."
23129                         else
23130                                 cf_reldir="\${srcdir}"
23131                         fi
23132
23133                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
23134                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
23135                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
23136                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
23137                         fi
23138
23139                         cf_dir_suffix=
23140                         old_cf_suffix="$cf_suffix"
23141                         if test "$cf_cv_shlib_version_infix" = yes ; then
23142                         if test -n "$LIB_SUFFIX" ; then
23143                                 case $LIB_SUFFIX in
23144                                 tw*)
23145                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
23146                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
23147                                         cf_dir_suffix=tw
23148                                         ;;
23149                                 t*)
23150                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
23151                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
23152                                         cf_dir_suffix=t
23153                                         ;;
23154                                 w*)
23155                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
23156                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
23157                                         cf_dir_suffix=w
23158                                         ;;
23159                                 esac
23160                         fi
23161                         fi
23162
23163                         $AWK -f $srcdir/mk-1st.awk \
23164                                 name=${cf_libname}${cf_dir_suffix} \
23165                                 traces=$LIB_TRACING \
23166                                 MODEL=$cf_ITEM \
23167                                 CXX_MODEL=$CXX_MODEL \
23168                                 model=$cf_subdir \
23169                                 prefix=$cf_prefix \
23170                                 suffix=$cf_suffix \
23171                                 subset=$cf_subset \
23172                                 driver=$cf_cv_term_driver \
23173                                 SymLink="$LN_S" \
23174                                 TermlibRoot=$TINFO_NAME \
23175                                 TermlibSuffix=$TINFO_SUFFIX \
23176                                 ShlibVer=$cf_cv_shlib_version \
23177                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
23178                                 ReLink=${cf_cv_do_relink:-no} \
23179                                 DoLinks=$cf_cv_do_symlinks \
23180                                 rmSoLocs=$cf_cv_rm_so_locs \
23181                                 ldconfig="$LDCONFIG" \
23182                                 overwrite=$WITH_OVERWRITE \
23183                                 depend="$cf_depend" \
23184                                 host="$host" \
23185                                 libtool_version="$LIBTOOL_VERSION" \
23186                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23187
23188                         cf_suffix="$old_cf_suffix"
23189
23190                         for cf_subdir2 in $cf_subdirs lib
23191                         do
23192                                 test $cf_subdir = $cf_subdir2 && break
23193                         done
23194                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
23195                         $AWK -f $srcdir/mk-2nd.awk \
23196                                 name=$cf_dir \
23197                                 traces=$LIB_TRACING \
23198                                 MODEL=$cf_ITEM \
23199                                 model=$cf_subdir \
23200                                 subset=$cf_subset \
23201                                 srcdir=$srcdir \
23202                                 echo=$WITH_ECHO \
23203                                 crenames=$cf_cv_prog_CC_c_o \
23204                                 cxxrenames=$cf_cv_prog_CXX_c_o \
23205                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23206                         cf_subdirs="$cf_subdirs $cf_subdir"
23207                         done
23208                 done
23209         fi
23210
23211         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
23212 done
23213
23214 for cf_dir in $SRC_SUBDIRS
23215 do
23216         if test ! -d $srcdir/$cf_dir ; then
23217                 continue
23218         fi
23219
23220         if test -f $cf_dir/Makefile ; then
23221                 case "$cf_dir" in
23222                 Ada95) #(vi
23223                         echo 'libs \' >> Makefile
23224                         echo 'install.libs \' >> Makefile
23225                         echo 'uninstall.libs ::' >> Makefile
23226                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
23227                         ;;
23228                 esac
23229         fi
23230
23231         if test -f $srcdir/$cf_dir/modules; then
23232                 echo >> Makefile
23233                 if test -f $srcdir/$cf_dir/headers; then
23234 cat >> Makefile <<CF_EOF
23235 install.includes \\
23236 uninstall.includes \\
23237 CF_EOF
23238                 fi
23239 if test "$cf_dir" != "c++" ; then
23240 echo 'lint \' >> Makefile
23241 fi
23242 cat >> Makefile <<CF_EOF
23243 libs \\
23244 lintlib \\
23245 install.libs \\
23246 uninstall.libs \\
23247 install.$cf_dir \\
23248 uninstall.$cf_dir ::
23249         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23250 CF_EOF
23251         elif test -f $srcdir/$cf_dir/headers; then
23252 cat >> Makefile <<CF_EOF
23253
23254 libs \\
23255 install.libs \\
23256 uninstall.libs \\
23257 install.includes \\
23258 uninstall.includes ::
23259         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23260 CF_EOF
23261 fi
23262 done
23263
23264 if test "x$cf_with_db_install" = xyes; then
23265 cat >> Makefile <<CF_EOF
23266
23267 install.libs uninstall.libs \\
23268 install.data uninstall.data ::
23269 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23270 CF_EOF
23271 fi
23272
23273 if test "x$cf_with_manpages" = xyes; then
23274 cat >> Makefile <<CF_EOF
23275
23276 install.man \\
23277 uninstall.man ::
23278         cd man && \${MAKE} \${TOP_MFLAGS} \$@
23279 CF_EOF
23280 fi
23281
23282 cat >> Makefile <<CF_EOF
23283
23284 distclean ::
23285         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
23286         rm -f headers.sh headers.sed mk_shared_lib.sh
23287         rm -f edit_man.* man_alias.*
23288         rm -rf \${DIRS_TO_MAKE}
23289 CF_EOF
23290
23291 # Special case: tack's manpage lives in its own directory.
23292 if test "x$cf_with_manpages" = xyes; then
23293 if test -d tack ; then
23294 if test -f $srcdir/$tack.h; then
23295 cat >> Makefile <<CF_EOF
23296
23297 install.man \\
23298 uninstall.man ::
23299         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
23300 CF_EOF
23301 fi
23302 fi
23303 fi
23304
23305 rm -f headers.sed headers.sh
23306
23307 echo creating headers.sh
23308 cat >headers.sh <<CF_EOF
23309 #! /bin/sh
23310 # This shell script is generated by the 'configure' script.  It is invoked in a
23311 # subdirectory of the build tree.  It generates a sed-script in the parent
23312 # directory that is used to adjust includes for header files that reside in a
23313 # subdirectory of /usr/include, etc.
23314 PRG=""
23315 while test \$# != 3
23316 do
23317 PRG="\$PRG \$1"; shift
23318 done
23319 DST=\$1
23320 REF=\$2
23321 SRC=\$3
23322 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
23323 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
23324 echo installing \$SRC in \$DST
23325 CF_EOF
23326
23327 if test $WITH_CURSES_H = yes; then
23328         cat >>headers.sh <<CF_EOF
23329 case \$DST in
23330 /*/include/*)
23331         END=\`basename \$DST\`
23332         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23333         do
23334                 NAME=\`basename \$i\`
23335                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23336         done
23337         ;;
23338 *)
23339         echo "" >> \$TMPSED
23340         ;;
23341 esac
23342 CF_EOF
23343
23344 else
23345         cat >>headers.sh <<CF_EOF
23346 case \$DST in
23347 /*/include/*)
23348         END=\`basename \$DST\`
23349         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23350         do
23351                 NAME=\`basename \$i\`
23352                 if test "\$NAME" = "curses.h"
23353                 then
23354                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23355                         NAME=ncurses.h
23356                 fi
23357                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23358         done
23359         ;;
23360 *)
23361         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23362         ;;
23363 esac
23364 CF_EOF
23365 fi
23366 cat >>headers.sh <<CF_EOF
23367 rm -f \$TMPSRC
23368 sed -f \$TMPSED \$SRC > \$TMPSRC
23369 NAME=\`basename \$SRC\`
23370 CF_EOF
23371 if test $WITH_CURSES_H != yes; then
23372         cat >>headers.sh <<CF_EOF
23373 test "\$NAME" = "curses.h" && NAME=ncurses.h
23374 CF_EOF
23375 fi
23376 cat >>headers.sh <<CF_EOF
23377 # Just in case someone gzip'd manpages, remove the conflicting copy.
23378 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
23379
23380 eval \$PRG \$TMPSRC \$DST/\$NAME
23381 rm -f \$TMPSRC \$TMPSED
23382 CF_EOF
23383
23384 chmod 0755 headers.sh
23385
23386 for cf_dir in $SRC_SUBDIRS
23387 do
23388         if test ! -d $srcdir/$cf_dir ; then
23389                 continue
23390         fi
23391
23392         if test -f $srcdir/$cf_dir/headers; then
23393                 $AWK -f $srcdir/mk-hdr.awk \
23394                         subset="$LIB_SUBSETS" \
23395                         compat="$WITH_CURSES_H" \
23396                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
23397         fi
23398
23399         if test -f $srcdir/$cf_dir/modules; then
23400                 if test "$cf_dir" != "c++" ; then
23401                         cat >>$cf_dir/Makefile <<"CF_EOF"
23402 depend : ${AUTO_SRC}
23403         makedepend -- ${CPPFLAGS} -- ${C_SRC}
23404
23405 # DO NOT DELETE THIS LINE -- make depend depends on it.
23406 CF_EOF
23407                 fi
23408         fi
23409 done
23410
23411 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23412 if test -z "$USE_OLD_MAKERULES" ; then
23413         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
23414 fi
23415 fi
23416  ;;
23417   esac
23418 done
23419 EOF
23420
23421 cat >>$CONFIG_STATUS <<\EOF
23422
23423 { (exit 0); exit 0; }
23424 EOF
23425 chmod +x $CONFIG_STATUS
23426 ac_clean_files=$ac_clean_files_save
23427
23428 # configure is writing to config.log, and then calls config.status.
23429 # config.status does its own redirection, appending to config.log.
23430 # Unfortunately, on DOS this fails, as config.log is still kept open
23431 # by configure, so config.status won't be able to write to it; its
23432 # output is simply discarded.  So we exec the FD to /dev/null,
23433 # effectively closing config.log, so it can be properly (re)opened and
23434 # appended to by config.status.  When coming back to configure, we
23435 # need to make the FD available again.
23436 if test "$no_create" != yes; then
23437   ac_cs_success=:
23438   exec 5>/dev/null
23439   $SHELL $CONFIG_STATUS || ac_cs_success=false
23440   exec 5>>config.log
23441   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23442   # would make configure fail if this is the last instruction.
23443   $ac_cs_success || { (exit 1); exit 1; }
23444 fi
23445 ${MAKE:-make} preinstall